IP ADDRESSING

IP addresses are divided into five classes labelled A to E. In classes A to C, the 32-bit IP address is divided into two fields: an upper network number field that identifies the network and a host number field that identifies a network interface on a physical system attached to that network. A system connected to more than one network (e.g. a router) will have a different IP number for each network interface. To join the Internet, a host must be allocated at least one IP number in one of the Classes A, B or C, 0.0.0.0 – 223.255.255.255, and thus attached to some network in the Internet.

Figure 1: IP number formats

Each Class A network may have 224 hosts, each Class B network, 216 hosts and each Class C network only 256 hosts. Class D numbers are used for multicasting, i.e. sending to a group of destinations at once; and Class E numbers are reserved. This is summarised in Figure 1 and Table 1, which shows the scope of each class, in the usual dotted-decimal notation. Note that in an IP address, the most significant bit is designated bit 0.

Class

Bit 0-3

Network range

Host range

A

0xxx

0.0.0.0—127.0.0.0

0.0.0—255.255.255 (224 hosts)

B

10xx

128.0.0.0—191.255.0.0

0.0—255.255 (216 hosts)

C

110x

192.0.0.0—223.255.255.0

0—255 (256  hosts)

D

1110

224.0.0.0—239.255.255.255

N/A

E

1111

240.0.0.0—255.255.255

N/A

Table IP number classes

Some IP addresses are reserved for special purposes:

The network number space is under ultimate control of IANA (Internet Assigned Numbers Authority) but assignment of numbers is now delegated to various Regional Internet Registries (ARIN in America, RIPE in Europe etc). Originally an organisation requiring a network number would be allocated a Class A, Class B or Class C number, but as demand increased this scheme proved very inefficient at using the limited address space. To alleviate this problem the Internet authorities have introduced a system known as classless addressing which allows the network number to be any number of bits long (from 2 to 32). The original system using Class A, B and C addresses is now called classful.

Looking at an IP number alonehether a network is classless or classful, its network mask is a 32-bit number which if bitwise ANDed with any IP address belonging to the network would yield the network address. An example of a network with a 24-bit network number is shown in Figure 2.

 

Three ranges are reserved for private networks: 10.x.x.x; 172.16.x.x – 172.31.x.x; and 192.168.0.x – 192.168.255.x and are guaranteed not to be allocated as real Internet addresses. Any network using private addresses must not be directly connected to the Internet but must rather be linked to it by some device capable of address translation: such a device will hide the individual hosts on the private network from the Internet. A host cannot send an IP packet to a private address unless it is on the same private network as that address.