Previous Next Contents

3. The Anatomy of IP numbers

Before diving into the delight of sub-networking, we need to establish some IP number basics.

3.1 IP numbers belong to Interfaces - NOT hosts!

First of all, let's clear up a basic cause of misunderstanding - IP numbers are not assigned to hosts. IP numbers are assigned to network interfaces on hosts.

Eh - what's that?

Whilst many (if not most) computers on an IP network will possess a single network interface (and have a single IP number as a consequence), this is not the only way things happen. Computers and other devices can have several (if not many) network interfaces - and each interface has its own IP number.

So a device with 6 active interfaces (such as a router) will have 6 IP numbers - one for each interface to each network to which it is connected. The reason for this becomes clear when we look at an IP network!

Despite this, most people refer to host addresses when referring to an IP number. Just remember, this is simply shorthand for the IP number of this particular interface on this host. Many (if not the majority) of devices on the Internet have only a single interface and thus a single IP number.

3.2 IP Numbers as "Dotted Quads"

In the current (IPv4) implementation of IP numbers, IP numbers consist of 4 (8 bit) bytes - giving a total of 32 bits of available information. This results in numbers that are rather large (even when written in decimal notation). So for readability (and organisational reasons) IP numbers are usually written in the 'dotted quad' format. The IP number

        192.168.1.24

is an example of this - 4 (decimal) numbers separated by (.) dots.

As each one of the four numbers is the decimal representation of an 8 bit byte, each of the 4 numbers can range from 0 to 255 (that is take on 256 unique values - remember, zero is a value too).

In addition, part of the IP number of a host identifies the network on which the host resides, the remaining 'bits' of the IP number identify the host (oops - network interface) itself. Exactly how many bits are used by the network ID and how many are available to identify hosts (interfaces) on that network is determined by the network 'class'.

3.3 Classes of IP Networks

There are three classes of IP numbers

In summary:

        Network class   Usable range of first byte values (decimal)
                A                 1 to 126
                B               128 to 191
                C               192 to 254

There are also special addresses that are reserved for 'unconnected' networks - that is networks that use IP but are not connected to the Internet, These addresses are:-

You will note that this document uses these sequences throughout to avoid confusion with 'real' networks and hosts.

3.4 Network numbers, interface addresses and broadcast addresses

IP numbers can have three possible meanings:-

In summary and to clarify things

For an A class network...
(one byte of network address space followed by three bytes of host
address space)

        10.0.0.0 is an A Class  network number  because all the host
                bits of the address space are 0
        10.0.1.0 is a host address on this network
        10.255.255.255.255 is the broadcast address of this network
                because all the host bits of the address space are 1

For a B class network...
(two bytes of network address space followed by two bytes of host
address space)

        172.17.0.0 is a B Class network number
        172.17.0.1 is a host address on this network
        172.17.255.255 is the network broadcast address

For a C Class network...
(three bytes of network address space followed by one byte of host
address space)

        192.168.3.0 is a C Class network number
        192.168.3.42 is a host address on this network
        192.168.3.255 is the network broadcast address

Almost all IP network numbers remaining available for allocation at present are C Class addresses.

3.5 The network mask

The network mask is more properly called the subnetwork mask. However, it is generally referred to as the network mask.

It is the network mask and its implications on how IP addresses are interpreted locally on an IP network segment that concerns us most here, as this determines what (if any) sub-networking occurs.

The standard (sub-) network mask is all the network bits in an address set to '1' and all the host bits set to '0'. This means that the standard network masks for the three classes of networks are:-

There are two important things to remember about the network mask:-


Previous Next Contents