15-441 Computer NetworkingReview: Internet Protocol (IP)Review: IP ProtocolIP FragmentationReassemblyFragmentation Related FieldsIP Fragmentation Example #1IP Fragmentation Example #2IP Fragmentation Example #3IP ReassemblyFragmentation and Reassembly ConceptsFragmentation is HarmfulInternet Control Message Protocol (ICMP)IP MTU Discovery with ICMPIP MTU Discovery with ICMPIP MTU Discovery with ICMPIP MTU Discovery with ICMPPrivate and Public InternetAltering the Addressing ModelPrivate Network Accessing Public Internet Reducing IP AddressesNetwork Address Translation (NAT)NAT: Opening Client ConnectionNAT: Client RequestNAT: Server ResponseNAT: Enabling ServersProperties of Firewalls with NATExtending Private NetworkSupporting VPN by TunnelingImplementing TunnelingCMU CS VPN ExampleCMU CS VPN ExampleImportant ConceptsIPv6IPv6 AddressingIPv6 Cleanup - Router-friendlyIPv6 Header CleanupIPv6 Header CleanupIPv6 Fragmentation CleanupMigration from IPv4 to IPv615-441 Computer NetworkingInternetworking9-26-06Lecture 9: IP Packets 2Review: Internet Protocol (IP)• Hour Glass Model• Create abstraction layer that hides underlying technology from network application software• Make as minimal as possible• Allows range of current & future technologies• Can support many different types of applicationsemail WWW phone...SMTP HTTP RTP...TCP UDP…IPethernet PPP…CSMA async sonet...copper fiber radio...9-26-06Lecture 9: IP Packets 3Review: IP Protocol• What services does it provide?• What protocol mechanisms to implement the services? 048121619 242831ver-sionHLenTOS LengthIdentFlagsOffsetTTL Protocol ChecksumSource AddressDestination AddressOptions (if any)DataHeaderIPv4 PacketFormat9-26-06Lecture 9: IP Packets 4IP Fragmentation• Every network has own Maximum Transmission Unit (MTU)• Largest IP datagram it can carry within its own packet frame• E.g., Ethernet is 1500 bytes• Don’t know MTUs of all intermediate networks in advance• IP Solution• When hit network with small MTU, fragment packetshosthostrouterrouterMTU = 4000MTU = 1500MTU = 20009-26-06Lecture 9: IP Packets 5Reassembly• Where to do reassembly?• End nodes or at routers?• End nodes• Avoids unnecessary work where large packets are fragmented multiple times • If any fragment missing, delete entire packet• Dangerous to do at intermediate nodes• How much buffer space required at routers?• What if routes in network change?• Multiple paths through network• All fragments only required to go through destination9-26-06Lecture 9: IP Packets 6Fragmentation Related Fields• Length• Length of IP fragment• Identification • To match up with other fragments• Flags• Don’t fragment flag• More fragments flag• Fragment offset• Where this fragment lies in entire IP datagram• Measured in 8 octet units (13 bit field)9-26-06Lecture 9: IP Packets 7IP Fragmentation Example #1hostrouterMTU = 4000IPHeaderIPDataLength = 3820, M=09-26-06Lecture 9: IP Packets 8IP Fragmentation Example #2routerrouterMTU = 2000IPHeaderIPDataLength = 3820, M=03800 bytesIPHeaderIPDataLength = 1996, M=1, Offset = 01976 bytesIPDataIPHeaderLength = 1844, M=0, Offset = 2471824 bytes9-26-06Lecture 9: IP Packets 9IP Fragmentation Example #3IPHeaderIPDataLength = 1996, M=1, Offset = 01976 bytesIPDataIPHeaderLength = 1844, M=0, Offset = 2471824 byteshostrouterMTU = 1500IPHeaderIPDataLength = 1500, M=1, Offset = 01480 bytesIPHeaderIPDataLength = 516, M=1, Offset =185496 bytesIPHeaderIPDataLength = 1500, M=1, Offset =2471480 bytesIPHeaderIPDataLength = 364, M=0, Offset = 432344 bytes9-26-06Lecture 9: IP Packets 10IP Reassembly• Fragments might arrive out-of-order• Don’t know how much memory required until receive final fragment• Some fragments may be duplicated• Keep only one copy• Some fragments may never arrive• After a while, give up entire processIPHeaderIPDataLength = 1500, M=1, Offset = 0IPHeaderIPDataLength = 516, M=1, Offset = 185IPHeaderIPDataLength = 1500, M=1, Offset = 247IPHeaderIPDataLength = 364, M=0, Offset = 432IPDataIPDataIPDataIPData9-26-06Lecture 9: IP Packets 11Fragmentation and Reassembly Concepts• Demonstrates many Internet concepts• Decentralized• Every network can choose MTU• Connectionless• Each (fragment of) packet contains full routing information• Fragments can proceed independently and along different routes• Best effort• Fail by dropping packet• Destination can give up on reassembly• No need to signal sender that failure occurred• Complex endpoints and simple routers• Reassembly at endpoints9-26-06Lecture 9: IP Packets 12Fragmentation is Harmful• Uses resources poorly• Forwarding costs per packet• Best if we can send large chunks of data• Worst case: packet just bigger than MTU• Poor end-to-end performance• Loss of a fragment • Path MTU discovery protocol Æ determines minimum MTU along route• Uses ICMP error messages• Common theme in system design• Assure correctness by implementing complete protocol• Optimize common cases to avoid full complexity9-26-06Lecture 9: IP Packets 13Internet Control Message Protocol (ICMP)• Short messages used to send error & other control information• Examples• Ping request / response• Can use to check whether remote host reachable• Destination unreachable• Indicates how packet got & why couldn’t go further• Flow control• Slow down packet delivery rate• Redirect• Suggest alternate routing path for future messages• Router solicitation / advertisement• Helps newly connected host discover local router• Timeout• Packet exceeded maximum hop limit9-26-06Lecture 9: IP Packets 14IP MTU Discovery with ICMP• Typically send series of packets from one host to another• Typically, all will follow same route• Routes remain stable for minutes at a time• Makes sense to determine path MTU before sending real packets• Operation• Send max-sized packet with “do not fragment” flag set• If encounters problem, ICMP message will be returned• “Destination unreachable: Fragmentation needed”• Usually indicates MTU encounteredhosthostrouterrouterMTU = 4000MTU = 1500MTU = 20009-26-06Lecture 9: IP Packets 15MTU = 4000IP MTU Discovery with ICMPhosthostrouterMTU = 1500MTU = 2000IPPacketLength = 4000, Don’t FragmentrouterICMPFrag. NeededMTU = 20009-26-06Lecture 9: IP Packets 16MTU = 4000IP MTU Discovery with ICMPhosthostMTU = 1500MTU = 2000IPPacketLength = 2000, Don’t
View Full Document