INTERNET PROTOCOL VERSION 4 (IPv4)
IPv4 provides hierarchical addressing for the packet that carries out data. It can provide a maximum of 232 possible address spaces, out of which there are about 18 million private addresses and 270 million multicast addresses.
The Anatomy of IPv4 Address
Each device on the network must be uniquely defined and identified. At the network layer, the packets that are to be communicated need to be identified with the source and destination addresses. IPv4 address is represented by 32 bits consisting of 4 octets of 8 bits each. With IPv4, each packet has a 32-bit source address and has 32-bit destination address in the layer 3 header. The network address representations are shown in Figure 1.
Figure 1. Network Address Representations
These addresses are used in the data network in the form of binary patterns. Within the device, digital logic is applied for interpretation. For a human to understand the network, a string of 32-bits is difficult to interpret and remember. Therefore, IPv4 addresses are represented using dotted decimal format. There are three types of address in an IPv4 network which are host address, network address and broadcast address as shown in Figure 2.
Figure 2. Types of Address in an IPv4 Network
The address by which a network is commonly referred to is known as the network address. A special address that is used to send data to all hosts in the network is known as the broadcast address and the address, assigned to the end devices in the network is known as the host address.
Five address classes were defined by the Internet community to accommodate networks of varying sizes. (Hasan Alkhatib & Bruce Wootton 2003) grouped the network address ranges into specific sizes that are called class A, class B and class C, class D and class E addresses. The classification of network address is shown in Figure 3.
Figure 3 Network Classes
Special and Reserved IPv4 Address Ranges
The special addresses are assigned to hosts with restrictions on how these hosts interact within the network. The special address and the reserved address are shown in Table 1.2. Loopback addresses, Link-Local addresses and TEST-NET addresses are known as the special addresses. 127.0.0.1 Address is denoted as loop back address. It is the address used by the host to direct traffic to themselves. The loopback address generates a shortcut way for TCP/IP applications and services that run on the same device to communicate with each other. By using the loopback address instead of the assigned IPv4 host address, two services on the same host can be avoided on the lower layers of the TCP/IP stack. The loopback address can also be pinged to test the configuration of TCP/IP on the local host.
Table 1 Special Addresses and Reserved Addresses
IPv4 addresses 169.254.0.0 to 169.254.255.255 (169.254.0.0 /16) are designated as link-local addresses. These addresses can be automatically allocated to the local host by the available operating system in environments where no IP configuration is available (Fall Kevin & Richard Stevens 2011). The link-local address is used in a small peer-to-peer network or for a host that could not automatically obtain an address from a Dynamic Host Configuration Protocol (DHCP) server.
The address block 192.0.2.0 to 192.0.2.255 (192.0.2.0 /24) is set apart for teaching and learning purposes. They can also be used for documentation purpose. Unlike the experimental addresses, the network devices will accept these addresses in their configurations. These addresses should not appear on the Internet. The reserved IPv4 addresses include experimental addresses, multicast addresses and host addresses. The multicast addresses include link-local address, globally scoped addresses and limited scope addresses. IPv4 experimental addresses range from 240.0.0.0 to 255.255.255.254. They are reserved for future use. Major block of addresses are reserved for special purposes and these are the IPv4 multicast addresses that range from 188.8.131.52 to 184.108.40.206. The IPv4 multicast addresses 220.127.116.11 to 18.104.22.168 are reserved link-local addresses. These addresses are to be used for multicast groups on a local network. Packets to these destinations are always transmitted with a time-to-live (TTL) value of 1. The globally scoped addresses are from 22.214.171.124 to 126.96.36.199 that may be used to multicast data across the Internet. After accounting for the ranges reserved for experimental addresses and multicast addresses, they leave an address range of 0.0.0.0 to 188.8.131.52 that could be used for IPv4 hosts. However, within this range many of the addresses are already reserved as special addresses.
Public and Private Addresses
Though most of the IPv4 host addresses are public addresses that are accessible to the Internet, there are blocks of addresses that are used in networks that require limited or no Internet access. These addresses are the private addresses. These addresses are set aside for private networks. The use of the private addresses need not be unique outside the networks. Numerous hosts in different networks may use the identical private space addresses (Wegner & Rockwell 2000). Packets using these addresses as the source or destination address must not appear on the public Internet.
The router or firewall device at the perimeter of these private networks must block or translate these addresses. Even if these packets were to make their way to the Internet, the routers would not have routes to forward them to the suitable private network. The private address blocks are from10.0.0.0 to 10.255.255.255 (10.0.0.0/8), 172.16.0.0 to 184.108.40.206 (172.16.0.0/12) and 192.168.0.0 to 192.168.255.255 (192.168.0.0/16).