1.3 The IP Service Model

  • IP

    • Datagram service: packet routed according to the header

      • Each router contains a forwarding table (where to send the packets next), use destination address to index in the table to forward

    • Unreliable

    • Best effort: won't drop datagrams arbitrarily, only drop if necessary

      • E.x. congestion (drop), or duplicated by mistakes

    • Connectionless

      • Each datagram individually, independently

  • Why so simple?

    • Simple, dumb, minimal: faster, more streamlined and lower cost to build and maintain

    • The end-to-end principle: where possible, implement features in the end hosts

    • Allows a variety of reliable (or unreliable) services to be built on top

      • E.x. some times there's no need to re-transmit (video services)

    • Works over any link layer: makes very few assumptions about the link layer below

IP Service Model (Details)

  1. Tries to prevent packets looping forever

    1. Likely to happen when forwarding table is changing

    2. Hop-count field (TTL field): decremented by every router it passes through, if reaches 0, then IP concludes that it must be stuck in the loop, delete the datagram

  2. Will fragment packets if they are too long

    1. Ethernet: carry shorter than 1500 bytes packet

    2. IP provides header field to help the router fragment the datagram into two self-contained IP datagrams

  3. Uses a header checksum to reduce the chances of delivering datagram to wrong destination

  4. Allows for new versions of IP

    1. Currently IPv4 with 32 bit addresses

    2. And IPv6 with 128 bit addresses

  5. Allows for new options to be added to header

IPv4 Datagram

  • Protocol ID: what's inside the data field. Allows the destination end host to demultiplex arriving packets, sending them the correct code to process the packet

    • E.x. 6: TCP segment --> TCP code --> parse the segment

    • Total 140 values (representing different transport protocol)

  • Total packet length: up to 64k bytes

  • TTL: prevent looping. Decrement by router. If 0, router drops the packet.

  • Packet ID, flags, fragment offset: help router to fragment

  • Type of service: hint to routers of how important this packet is

  • Header length: how big the header is

  • Checksum: whole header, just in case the header is corrupted, we are not likely to deliver a packet to the wrong destination by mistake

Summary

  • Use IP every time we send and receive datagrams

  • IP provides deliberately simple service:

    • Datagram

    • Unreliable

    • Best-effort

    • Connectionless

Last updated