IP Datagrams

IP transmits data in packets called datagrams. A datagram contains a header and some data, thus:
Note: this diagram shows the datagram format of the "current" version of IP, IPv4.


Datagram Details

[1] although not always: for example, see UDP, later in this lecture.


IP Routing

There are two levels of complexity involved in IP routing:

Local delivery
when the IP software is presented with a datagram for delivery, it first checks the network part of the destination address to see if matches its own network number. If it does, then the datagram can be delivered locally, and is simply handed to the physical network delivery system (typically an Ethernet device driver) for direct delivery over the local network.

Internet delivery
if the network numbers are different, then the datagram must be forwarded to a router (or IP gateway). In this case, the datagram is forwarded (using direct delivery as above) to the appropriate router for on-delivery


IP: Connectionless Datagram Delivery

IP data transfer across an internet is based on three fundamental principles:

Unreliable delivery
delivery of data is not guaranteed. A packet of data may be lost in the network, may be duplicated (ie: delivered twice) or may be delivered out of order. The IP service will not detect such conditions, nor will it notify the sender or receiver if they occur.

Connectionless delivery
each packet is treated entirely indpendently of all others. No information is kept as to which packets have been forwarded, and packets may travel over different routes to the same destination.

Best-Effort delivery
the packet delivery mechanism is engineered to always deliver packets if possible. It will not gratuitously drop packets: unreliability should only occur when underlying resources (eg buffer space) are exhausted.

These specifications allow the IP service to concentrate on its job: delivering packets. As we have seen, higher level protocols (usually TCP) transform the IP service into a reliable, sequenced interprocess communications mechanism.


The Structure of the Internet

The Internet consists of networks (or, more commonly nowadays -- subnets) connected by routers. The traceroute utility shows the path a datagram takes -- the following traceroute is from ironbark to the Victorian Regional Network (VRN).
 
1 r-busbgo.bendigo.latrobe.edu.au (149.144.21.254)  1 ms  2 ms  1 ms
2 r-bgoatm34.bendigo.latrobe.edu.au (149.144.10.250)  1 ms  1 ms  1 ms
3 r-sctech-atm.latrobe.edu.au (131.172.239.3)  5 ms  4 ms  3 ms
4 cisco-ltu-fddi.latrobe.edu.au (131.172.20.12)  5 ms  4 ms  4 ms
5 vic-gw.vrn.EDU.AU (203.21.130.129)  4 ms  5 ms  4 ms

The Transport Layer Revisited: UDP

The User Datagram Protocol provides a connectionless alternative transport service to TCP for applications where reliable stream service is not needed. UDP datagrams can be droppped, duplicated or delivered out of order, exactly as for IP.

The UDP transport service add to IP the ability to deliver a datagram to a specified destination process using a port abstraction, in an analogous way to that used by TCP.

Examples of applications where UDP is used include:


The Future: IPv6

(Optional material)

The current version of IP is widely acknowledged to have many shortcomings. To address these, the Internet Engineering Task Force (IETF) has defined IP version 6[1]. Some of its features include:

[2] or, as it was called during its development, IPng.


This lecture is also available in PostScript format. The tutorial for this lecture is Tutorial #09.
[Previous Lecture] [Lecture Index] [Next Lecture]
Phil Scott