2 Input Packets -------------------------------- Input packet 1: First the packet coming in: Router 1, Input Port A3 VERS = 4, HLEN = 10, ToS = 0, TL = 682 Ident = 43690, Flags = 0, DF = 0, More = 0, FragOffset = 0 TTL = 32, PROT = 6, CheckS = 0 SourceAddr = 172.19.48.21 DestAddr = 172.17.0.15 Option 1 = 1, No-OP; Option 2 = 137, Strict Source Route; L = 19, P = 12 extra Address 1 = 172.19.63.14 extra Address 2 = 172.17.0.13 extra Address 3 = 172.17.240.14 extra Address 4 = 172.18.240.21 Number of data bytes = 642 Strict Source Route, OK thus far, Next Network = 5: 172.17.240.0/24 Output Port A5, direct delivery to host on network V. Next address had better be a router Next the packet(s) going out: Fragment 1 VERS = 4, HLEN = 10, ToS = 0, TL = 576 Ident = 43690, Flags = 1, FragOffset = 0 TTL = 31, PROT = 6, CheckS = 0 SourceAddr = 172.19.48.21 DestAddr = 172.17.240.14 Option1 = 1, Option2 = 137, L = 19, P = 16 extra Address 1 = 172.19.63.14 extra Address 2 = 172.17.0.13 extra Address 3 = 172.17.240.15 extra Address 4 = 172.18.240.21 DataField = 536 bytes Fragment 2 VERS = 4, HLEN = 10, ToS = 0, TL = 146 Ident = 43690, Flags = 0, FragOffset = 67 TTL = 31, PROT = 6, CheckS = 0 SourceAddr = 172.19.48.21 DestAddr = 172.17.240.14 Option1 = 1, Option2 = 137, L = 19, P = 16 extra Address 1 = 172.19.63.14 extra Address 2 = 172.17.0.13 extra Address 3 = 172.17.240.15 extra Address 4 = 172.18.240.21 DataField = 106 bytes --------------------------- Input packet 2: First the packet coming in: Router 1, Input Port A3 VERS = 4, HLEN = 5, ToS = 0, TL = 341 Ident = 21845, Flags = 0, DF = 0, More = 0, FragOffset = 0 TTL = 1, PROT = 17, CheckS = 0 SourceAddr = 128.235.204.72 DestAddr = 171.19.63.1 Number of data bytes = 321 TTL expired, drop packet, send ICMP --------------------------- --------------------------- Discussion. The second packet speaks for itself and will not be discussed. The first packet: This is a strict source route packet from a host on network XII to a host on network VI. The source host specified the route over A26, A23, A3, A8. That source host put its own address in the ``source address field'', that field never changed. The source host put A26 in the destination address field, A23 in the first extra address, A3 in the second extra address, A8 in the third extra address, and the addres of the destination host in the fourth extra address. It let the pointer point at the address of A23. Router R12 moved the address of A23 to the destination address field, put the address of A27 in the first extra address, and moved the pointer to the address of A3. Router R10 moved the address of A3 to the destination address field, put the address of A22 in the second extra address, and moved the pointer to the address of A8. Router R1 checks that the address in the destination address field is indeed the address of the input port (A3). If yes, it moves the address of A8 to the destination address field, puts the address of A5 in the third extra address, moves the pointer to the fourth extra address (the final address), and send the packet to A8. Check for yourself what R3 will do with the packet. How would this work if the final destination is itself a router? (Routers CAN be the final recipients of packets: routers are computers, too! and have IP addresses! Packet 1 has a total length of 682 bytes. Its header is 10*4 = 40 bytes long. So there are 642 data bytes. (20 or more of those are in the TCP header). Since network V has an MTU of 576 bytes, fragmentation occurs. The first fragment has 536 data bytes (of which 20 or more are in the TCP header) and 40 bytes in the IP header. (Option code = 137 = 1000 1001 , so the strict source code option is copied in all fragments. The option code of No-Op is 1 = 0000 0001 , so it is not copied. But then the packet does not end on a 32 bit word boundary, so the No-Op Option is put back in again.). The second fragment has 40 IP header bytes and (642 - 536) = 106 Data Bytes (none of which are from the TCP header). The second fragment therefore has a total length of (106 + 40) = 146 bytes. Since there are 2 fragments, the first fragment has M = 1, the second fragment has M = 0. Since the first fragment contains 536 data bytes, the fragmentation offset in the second fragment is 536/8 = 67. Check for yourself that the TTL was modified correctly. --------------------------