IP Datagrams

IP transmits data in packets called datagrams. A datagram contains a header and some data, thus:

Notes:


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.

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 encapsulation and delivery.
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

The ICMP Protocol

The Internet Control Message Protocol is used by the IP datagram delivery system to communicate with the IP delivery system on another host Ñ its operation is internal to the IP software on the hosts, and is not normally visible to the network user.

The IP software encapsulates ICMP messages into the data field of an ordinary datagram. For example, if a router is forced, for some reason, to drop a datagram, it sends an ICMP message to the originator of the datagram explaining the reason. It is up to the originator to take appropriate action to ensure that subsequent datagrams are not droppped.

There are several ICMP message types. The echo request and echo reply types are used by the UNIX and Internet ping utility to test reachability. Ping is by far the single most valuable tool available to the network manager, and we return to its use when we discuss network management, later.


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:


This lecture is also available in PostScript format. The tutorial for this lecture is Tutorial #08.
Phil Scott