IPv4 is the fourth revision of the IP and a widely used protocol for data communication over different kinds of networks. IPv4 is defined and specified in IETF publication RCF 791. It is used in packet-switched link layer in the OSI model. A connectionless protocol provides the logical connection between network devices and providing identification for each device. There are many ways to configure IPv4 addresses on the network devices – including manual and automatic configurations – depending on the network type.IPv4 uses 32-bit addresses for Ethernet communication in five classes, which is A, B, C, D and E. Classes.
Address Architecture of the Internet
While TCP/IP was introduced in the 1980s, at that time internet uses a two-level addressing scheme. At the time, this scheme offered sufficient scalability. The 32-bit-long IPv4 address identifies a network number and a host number, Figure- illustrate the 32-bit address in the 1980s.
Currently, the IPv4 address has also 32 bit and it also contains two portions, network portion, and host portion. Network portion identifies the network of the host and host portion show the number of the host in the network. Host portion is used to identify the device or the host. The router uses the network portion of the address to make routing decisions and to facilitate communication between hosts that belong to different networks.
Like routers and computer, humans can’t work with strings of 32, 1s and 0s. Therefore, 32-bit IP addresses are written using dotted-decimal notation. Each 32-bit address is divided into four groups of eight, called octets. An octet is ranging from 000000000 to 11111111. Each octet is converted to decimal and then separated by decimal points or dots. The range of each octet in decimal is from 0 to 255.
A 32-bit IP address:
- The four octets of the 32-bit address
- 11101101 01011101 10000010 00010101
- Decimal of each octet:
237 93 130 21
- The address was written in dotted decimal notation:
Classes of IP Address
It is very difficult to identify the network portion and host portion of any dotted decimal IP address because that IP addresses are not actually four numbers. They actually consist of 32 different numbers or 32 bits.
In the early days of TCP/IP, a class of IP address was used to define the network and host portions. IPv4 addresses were grouped into five separate classes. This was done according to the value of the first few bits in the first octet of the address. These bits are called high order bits(HOB). Although the class system can still be applied to IP addresses, networks today often ignore the rules of class in favor of a classless IP scheme.
In a class system, IP addresses can be grouped into five different classes:
Where A, B, and C have a different bit length for addressing the network host. Class D addresses are reserved for multicasting, while Class E addresses are reserved for future use.
Each of the four octets of an IP address represents the network portion or the host portion, depending on the address class. The network and host portions of the respective Class A, B, C, and D addresses are shown in Figure 2
The first three classes A, B, and C are used to address actual hosts on IP networks. Class D addresses are used for multicasting. Class E addresses are reserved for experimentation in labs and medical equipment and are not shown in Figure 2.