1.3 The IP Service Model
Last updated
Last updated
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
Tries to prevent packets looping forever
Likely to happen when forwarding table is changing
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
Will fragment packets if they are too long
Ethernet: carry shorter than 1500 bytes packet
IP provides header field to help the router fragment the datagram into two self-contained IP datagrams
Uses a header checksum to reduce the chances of delivering datagram to wrong destination
Allows for new versions of IP
Currently IPv4 with 32 bit addresses
And IPv6 with 128 bit addresses
Allows for new options to be added to header
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
Use IP every time we send and receive datagrams
IP provides deliberately simple service:
Datagram
Unreliable
Best-effort
Connectionless