Understanding IPv4 Addressing
Conventional IP Addresses
IP addresses in IPv4 are 32 bits long, and are often written in dotted decimal notation, where each byte is represented by a decimal number between 0 and 255, and these values are separated by a period (a full stop), for example 192.168.11.4 The address for a specific host must have a unique 32-bit address and this in composed from a network prefix and a host part. All of the hosts within a network share a common network prefix, and each host within a network must have a unique host part of the overall address. The boundary between the network part and the host part of the address can occur at different places within the overall 32-bit address, and where this boundary lies for a specific host is defined by the mask for the address. Traditionally these addresses have been defined by network prefix ending on each of the byte boundaries within the addressing field:
- Class A addresses use the most significant byte for the network part, the three remaining byte for the host part of the address
- Class B addresses use the most significant two bytes for the network part, and the remaining bytes for the host part of the address
- Class C addresses use the most significant three bytes for the network part, and the remaining byte for the host part of the address
- Class D addresses are special addresses reserved for multicast; many hosts can listen on the same multicast address for packets sent from one sender.
Reserved IP Addresses
Certain addresses are reserved for special use in IP networks:
- The class A network 127.0.0.0 255.0.0.0 is reserved for loopback use. Packets sent to this address are never presented on the physical interface; instead they are looped back by the TCP/IP stack and presented to the appropriate application on the originating host. So, for example, a host running an ftp server and an ftp client could connect to the local FTP server by using 127.0.0.1 as the destination host address. This approach is sometimes used to test applications without involving a physical network or remote host.
- A Directed Broadcast address has all of the host bits in a particular network set to (binary) 1, and is used to send a packet to all hosts on the network. So for example the destination address 192.168.1.255 is a directed broadcast to all of the hosts in network 192.168.1.0 255.255.255.0
- A Local Broadcast address is used to send a packet to all hosts on the local network, and has all address bits set to (binary) 1. So the destination address 255.255.255.255 sent by a host on network 192.168.1.0 255.255.255.0 would send a packet to all hosts on the local network.
Private IP Addresses
RFC 1918 defines a collection of IP addresses which are reserved for private use. These addresses are not routable across the public Internet, but can be freely used within private networks. If private networks using these ranges need to communicate across the public Internet, they must use some technique for hiding or converting their private addresses, such as Network Address Translation (NAT) or tunnelling. The RFC1918 private address ranges are listed in the table opposite.
Bookmark this article
Share this article using the following sites: