Lecture 11: The IP Protocol #1

The Internet Protocol, IP

Recall last lecture: the TCP (transport layer) protocol is implemented in the two edge systems involved in communications -- engineers say it's implemented at the "edges" of the network.

TCP relies on the Internet Protocol (IP) to deliver packets of data from one edge system to another. The packets which IP delivers are usually called datagrams.

Datagrams navigate zero or more (sometimes many) routers, interconnecting the individual networks which together make up the Internet. The word "Internet" is just a contraction of the phrase "Interconnected Networks".

A router is essentially a special-purpose computer whose sole function is to transfer datagrams between networks. In earlier times, they were called "IP Gateways". The general structure of the Internet can thus be visualised:

Router-connected networks

IP Addressing

The concept of a global Internet addressing scheme is fundamental to IP. Every Internet-connected system has a unique Internet host address. This is a 32 bit, or 4 byte, binary number.

Internet addresses are always written as a dotted sequence of the form:

where aa, bb, etc, are the decimal values (ranging from 0 to 255) of the 4 bytes which make up the internet address, for example:
This is called the "Common Internet Address Notation". Internet addresses are commonly referred to as "IP addresses".

The dotted sequence is the IP address of "ironbark", or to use its full domain name, ironbark.bendigo.latrobe.edu.au.. Note that the traditional Internet literature refers to internet-connected computers as hosts, which reflects the historical nature of computers as multi-user timeshared systems.

"Two Part" Addresses

The 4 byte internet address consists of 2 parts, the network part and the host part.

Address Classes

Traditionally, the structure of an IP address differs depending on the class of the network to which the host is connected[1].

Class A Network
the first (or leftmost) field, or byte, of the address specifies the network number and class, and can take values from 1 to 126.

Class B network
the leftmost two fields (bytes) specify the network number and class. The first field is in the range from 128 to 191, and the second from 1 to 254.

Class C network
the leftmost three fields specify network number and class. The first field can be from 192 to 223, the second from 0 to 255, and the third from 1 to 254.

[1] Since the mid-1990s, this scheme has been replaced with the newer CIDR allocation algorithm. However, it's still important to have a handle on the older system, because CIDR is really an extension, and generalisation, of it.

More On Address Classes

The Internet address format can be described graphically:
IP address classes
Example 1:
in a class A network, only values from 00000000 to 01111111 are possible. Of these 128 combinations, 126 are permitted (networks 0 and 127 are reserved for other purposes). Hence there can only ever be 126 class A networks, each of which can have a huge number of hosts.

Example 2:
ironbark's IP address is This is a class B network (, and ironbark's host ID within this network is 21.60. Note that when we write an IP address with all-zeroes in the host part, we are referring to the "network number" itself.

Example 3: is a class C address. The network number is, and the host number is 5.

Network numbers above 223 are also reserved for special purposes, outside the scope of this subject.

IP Broadcast Address

The broadcast address is the address used to send a datagram to all hosts on the local network simultaneously. This is the address given by the network number followed by all binary 1's in the host part of the address.

For example: The broadcast address for a host on the La Trobe, Bendigo Class-B IP network would be[2]:
An example class C broadcast address is:
[2] Except for the fact that subnetting is in use, see next slide. There's also some subtlety in what's a valid broadcast address, see the tute for more on this.

IP Subnetting

Where Class-B networks (and, nowadays, class C also) are in use, the host part of the address is commonly split, for management purposes, to allow subnetting -- typically this involves defining 254 subnets each of 254 hosts. Each of these subnets behaves, for all intents, like an independent class-C network: thus:
IP subnet address format
Exactly which bits of the subnetted address are used for the network/subnet part and the host part is defined using an address mask, or netmask thus:
This says that 24 bits of the address are to be interpreted as "network part". For example, at Bendigo the "ironbark" UNIX system address is:
Address = Netmask =
Thus ironbark is addressed as:
class B network: 149.144
subnet: 21
host number: 60

Problems with Class-based Addressing

The Class A, B & C address model worked fine in the early years of the Internet. Towards the end of the 1980s and in the early 90s it became increasingly clear, with the observed exponential growth in the number of Internet hosts, that it would soon "break" under the load.

The main problems were observed to be:

A (temporary) solution to both of these problems was introduced by the IETF in 1993 -- Classless Internet Domain Routing, or CIDR (pronounced like "cider"). In this system, the entire class A, B and C scheme has been discarded for all recent IP address allocations.

CIDR Addresses

A CIDR address has some of the characteristics of a subnetted Class A, B or C address, see earlier. They are written as "aa.bb.cc.dd/x". The new "/x" specifier indicates how many bits of the address, starting from the MSB, are to be interpreted as the "network" part, leaving the remainder to be interpreted as "host" part -- this is obviously related to the older "subnet" model.

For example, suppose an organisation needed about 1000 IP addresses for its Internet-connected hosts. A suitable CIDR allocation would be (eg) This means that the address part is 22 bits, and the host part is 10 bits, giving 1024 host IDs. As usual, we write all zeros in the host part of the address when referring to the "network" itself.

An additional characteristic of CIDR is that IP address blocks are now allocated on a geographic basis, or more correctly, on the basis of domain names. So, for example, virtually all IP addresses recently allocated in Australia now have 203 as their first byte. This is done to simplify routing, see later

La Trobe Uni Logo

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