outline 15 441 641 computer networks
play

Outline 15-441/641: Computer Networks The IP protocol The Internet - PowerPoint PPT Presentation

2/6/2019 Outline 15-441/641: Computer Networks The IP protocol The Internet Protocol IPv4 15-441 Spring 2019 IPv6 Profs Peter Steenkiste & Justine Sherry Tunnels Fall 2019 https://computer-networks.github.io/sp19/ 2 IP


  1. 2/6/2019 Outline 15-441/641: Computer Networks • The IP protocol The Internet Protocol • IPv4 15-441 Spring 2019 • IPv6 Profs Peter Steenkiste & Justine Sherry • Tunnels Fall 2019 https://computer-networks.github.io/sp19/ 2 IP Service Model IP Delivery Model Best effort service IPv4 Packet Format • • Low-level communication Network will do its best to get packet to destination • model provided by 0 4 8 12 16 19 24 28 31 Does NOT guarantee: • version HLen TOS Length Internet Any maximum latency or even ultimate success • Identifier Flag Offset • Datagram: each packet is Informing the sender if packet does not make it • TTL Protocol Checksum Delivery of packets in same order as they were sent self-contained • Source Address Just one copy of packet will arrive • • All information needed to get Destination Address Implications • to destination Options (if any) Scales very well (really, it does) • • No advance setup or Data Higher level protocols must make up for shortcomings • connection maintenance Reliably delivering ordered sequence of bytes  TCP • • Analogous to letter or Some services not feasible (or hard) • telegram Latency or bandwidth guarantees • 3 4 1

  2. 2/6/2019 Designing the IP header What are these tasks? (in network) • Parse packet • Think of the IP header as an interface • Carry packet to the destination • between the source and destination end-systems • between the source and network (routers) • Deal with problems along the way • Contains the information routers need to forward a packet • loops • Designing an interface • corruption • what task(s) are we trying to accomplish? • packet too large • what information is needed to do it? • Accommodate evolution • Specify any special handling • Header reflects information needed for basic tasks 5 6 What information do we need? What information do we need? • Parse packet • Parse packet • IP version number (4 bits), packet length (16 bits) • IP version number (4 bits), packet length (16 bits) • Carry packet to the destination • Carry packet to the destination • Destination’s IP address (32 bits) • Destination’s IP address (32 bits) • Deal with problems along the way • Deal with problems along the way • loops: • loops: TTL (8 bits) • corruption: • corruption: checksum (16 bits) • packet too large: • packet too large: fragmentation fields (32 bits) 8 9 2

  3. 2/6/2019 Header Corruption (Checksum) Preventing Loops (TTL) • Forwarding loops cause packets to cycle for a very • Checksum (16 bits) looong time • Particular form of checksum over packet header • left unchecked would accumulate to consume all capacity • If not correct, router discards packets • So it doesn’t act on bogus information • Checksum recalculated at every router • Time-to-Live (TTL) Field (8 bits) • Why? • decremented at each hop, packet discarded if reaches 0 • …and “time exceeded” message is sent to the source 10 11 What information do we need? Fragmentation • Parse packet • Every link has a “Maximum Transmission Unit” (MTU) • IP version number (4 bits), packet length (16 bits) • largest number of bits it can carry as one unit • Carry packet to the destination • Destination’s IP address (32 bits) • A router can split a packet into multiple “fragments” if • Deal with problems along the way the packet size exceeds the link’s MTU • TTL (8 bits) , checksum (16 bits), fragmentation (32 bits) • Accommodate evolution • Must reassemble to recover original packet • version number (4 bits) (+ fields for special handling) • Specify any special handling • Will return to fragmentation shortly… 12 13 3

  4. 2/6/2019 Options Special handling • Optional directives to the network • not used very often • 16 bits of metadata + option-specific data • “Type of Service” (8 bits) • Examples of options • allow packets to be treated differently based on needs • Record Route • e.g., indicate priority, congestion notification • Strict Source Route • has been redefined several times • Loose Source Route • now called “Differentiated Services Code Point (DSCP)” • Timestamp • Window scaling • … 113 16 IP Router Implementation: What information do we need? Fast Path versus Slow Path • Parse packet • Common case: Switched in silicon (“fast path”) • IP version number (4 bits), packet length (16 bits) Almost everything • Carry packet to the destination • • Weird cases: Handed to CPU (“slow path”, or “process switched”) • Destination’s IP address (32 bits) Fragmentation • • Deal with problems along the way TTL expiration (traceroute) • • TTL (8 bits) , checksum (16 bits), fragmentation (32 bits) IP option handling • • Accommodate evolution • Slow path is evil in today’s environment • version number (4 bits) (+ fields for special handling) “Christmas Tree” attack sets weird IP options, bits, and overloads router • Developers cannot (really) use things on the slow path • Specify any special handling • Slows down their traffic – not good for business • • ToS (8 bits), Options (variable length) If it became popular, they are in trouble! • 15 17 4

  5. 2/6/2019 IP Fragmentation Fragmentation Related Fields IPv4 Packet Format MTU = 2000 • Length host router • Length of IP fragment 0 4 8 12 16 19 24 28 31 router MTU = 1500 host version HLen TOS Length • Identification MTU = 4000 Identifier Flag Offset • To match up with other fragments TTL Protocol Checksum • Every network has own Maximum Transmission Unit (MTU) Source Address • Flags Largest IP datagram it can carry within its own packet frame Destination Address • • Don’t fragment flag Options (if any) E.g., Ethernet is 1500 bytes • • More fragments flag Data Don’t know MTUs of all intermediate networks in advance • • Fragment offset • IP Solution • Where this fragment lies in entire IP datagram When hit network with small MTU, router fragments packet • • Measured in 8 octet units (13 bit field) Destination host reassembles the paper – why? • 17 18 IP Fragmentation Example #1 IP Fragmentation Example #2 MTU = 2000 router router host router MTU = 4000 Length = 2000, M=1, Offset = 0 Length = 3820, M=0 IP IP IP IP Header Data Length = 3820, M=0 Header Data IP IP 1980 bytes Header Data 3800 bytes Length = 1840, M=0, Offset = 1980 (/8) IP IP Header Data 1820 bytes 19 20 5

  6. 2/6/2019 Internet Control Message Protocol Fragmentation is Harmful (ICMP) • Uses resources poorly • Short messages used to send error & other control information Forwarding costs per packet • Best if we can send large chunks of data • • Some functions supported by ICMP: Worst case: packet just bigger than MTU • Ping request /response: check whether remote host reachable • • Poor end-to-end performance Destination unreachable: Indicates how packet got & why couldn’t go further • Loss of a fragment • Flow control: Slow down packet transmit rate • Redirect: Suggest alternate routing path for future messages • Path MTU discovery protocol  determines minimum MTU along route • Router solicitation / advertisement: Helps newly connected host discover local router Uses ICMP error messages • • • Common theme in system design Timeout: Packet exceeded maximum hop limit • Assure correctness by implementing complete protocol • How useful are they functions today? • Optimize common cases to avoid full complexity • 21 22 IP MTU Discovery with ICMP IP MTU Discovery with ICMP MTU = 2000 host router router MTU = 1500 host ICMP MTU = 4000 Frag. Needed MTU = MTU = 2000 2000 • Typically send series of packets from one host to another host router MTU = 1500 router • Typically, all will follow same route – routes are stable for minutes at a time host MTU = 4000 • Makes sense to determine path MTU before sending real packets • Operation: Send max-sized packet with “do not fragment” flag set Length = 4000, Don’t Fragment If a router encounters a problem, it will return ICMP message to the sender • IP Packet “Destination unreachable: Fragmentation needed” • Usually indicates MTU problem encountered • • ICMP abuse? Other solutions? 23 24 6

  7. 2/6/2019 IP MTU Discovery with ICMP IP MTU Discovery with ICMP MTU = 2000 host router ICMP MTU = 1500 Frag. Needed router host MTU = MTU = 1500 MTU = 4000 2000 host router MTU = 1500 router Length = 1500, Don’t Fragment host MTU = 4000 IP Packet Length = 2000, Don’t Fragment • When successful, no reply at IP level IP “No news is good news” • Packet • Higher level protocol might have some form of acknowledgement 25 26 Important Concepts Outline • Base-level protocol (IP) provides minimal service level Allows highly decentralized implementation • Each step involves determining next hop • Most of the work at the endpoints • • The IP protocol • ICMP provides low-level error reporting • IPv4 • IPv6 • IP forwarding  global addressing, alternatives, lookup tables • IP addressing  hierarchical, CIDR • Tunnels • IP service  best effort, simplicity of routers • IP packets  header fields, fragmentation, ICMP Interface to higher layers • 27 28 7

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend