Lecture 12: IP Networks


IP Datagrams

IP transmits data in packets called datagrams. A datagram contains a header and some data, thus:
IP datagram format
Note: this diagram shows the datagram format of the "current" version of IP, IPv4. The functions of the yellow-shaded header fields are outside the scope of this subject -- see Data Communications if interested.


Datagram Details


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/subnet part of the destination address to see if matches its own network/subnet number -- the current netmask is used to discover if these match. If the network/subnet part does match, 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 sent to a directly-connected router (or IP gateway), using direct delivery as above, for "on-delivery" across the Internet. Note that when the datagram is received at the router, its destination IP address is not that of the router.


IP Routing

Hosts and routers maintain a routing table which is consulted when a datagram cannot be locally delivered. The routing table indicates which router, of those available, is the best next hop for the destination network address of this particular datagram. For hosts, this is commonly done by configuring a default route, since only one router is usually available.

Where the network is more complex (for example, a router can be connected to several other routers) a routing protocol is used to maintain the routing tables. Routing protocols operate by sending routing updates to each of their neighbour routers, informing them of routes which this router "knows about", and with some indication of how "close" it is to the other networks -- this is called a metric. Route information which has been received at a router will be propagated to the next router, and so on. Routers make decisions as to which route is the one they will use, based on the routing metric information.

Different routing protocols are used within Autonomous Systems (AS) -- typically organisation-level networks -- and the various high-speed intercontinental and international backbone networks which make up the "heavy haulage" sections of the Internet. Within an AS, the original routing protocol was RIP, nowadays largely replaced by OSPF. On the backbones, the original protocol was EGP, now replaced by BGP (strictly speaking, BGP4).

Detailed analysis of routing protocol operation is outside the scope of this subject, see Data Communications and Internetworking.


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 datagram may be lost (dropped, discarded, etc) 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
Router IP addresses

Private IP Addresses/Networks

(This is Optional Material)

These are an interesting development in Internetworking. IP addresses have recently become more difficult to obtain, and therefore more expensive. Many organisations (and home users!) have moved to a private address space for their "internal" networks -- ie, networks consisting of machines which do not require globally-valid IP addresses. This has advantages both in terms of cost and security (see later).

RFC1918 specifies a range of addresses: 10.0.0.0, 172.16.0.0 - 172.31.255.255 and 192.168.0.0 - 192.168.255.255 which can be used for this purpose. No IP addresses in these three ranges are ever valid in the Internet (ie, an Internet router should never forward them), and may only be used within private networks.

A variety of technologies are available to allow "internal" (private IP) machines to gain access to services in the outside Internet. The two most common are Network Address Translation (NAT) and SOCKS. For "Web-only" access, an HTTP proxy server can be used.


The Future: IPv6

(This is 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. La Trobe Uni Logo


Copyright © 2004 by Philip Scott, La Trobe University.
Valid HTML 3.2!