Today in this post we are going to discuss about Internet Protocol Version 4. IPV4 is the fourth version of the Internet Protocol, which is currently the main protocol for the majority of the Internet.
History of IPV4:
From last few years we have seen rapid growth in the usage of internet which created challenges for internet supervision groups. IPV4 was the first version of the internet protocol invented in the year 1970.
Definition of Internet Protocol Version 4 (IPv4):
IPV4 is the most used version of the Internet protocol. This defines the rules for operating a computer network on the principle of packet exchange. Thus, this can also have a group of rules that determine how data can be sent and received through the network.
IPV4 Address is a protocol that is widely used in data communication through various types of networks. Therefore, IPV4 is a connectionless protocol (whenever you are transmitting the data from sender to receiver here data packets will follow different paths over the network that is why we call it as connectionless protocol) which is used in network layer packets like Ethernet. IPV4 provides a logical connection between network devices by providing identification for each device.
Thus, we already know that the electronic devices especially computer understands the binary language. So, IPV4 is a 32-bit binary number(where binary number uses only 0’s and 1’s) and then converts into decimal format which is easy for the users to understand. A 32-bit numeric address divided into 4 parts, each 8-bit is known as a block and produces numbers 0-255. Where as, IPV4 address can form more then 4 billion unique addresses. The IPV4 address denoted by a dotted decimal notation. For example, 244 . 1 . 195 . 44 and this numbers can vary from 0-255.
IPV4 Datagram header format:
Packets which are used in the IPV4 are called data-grams. The datagram consists of header sections and text sections which are variable length protocols. The header has a length of 20 to 60 bytes and contains essential information for routing and delivery.
IPV4 datagram header format consists of 14 fields in which 13 are important whereas the 14th field is optional. The datagram packet format is shown in the figure below. Now we look on to the brief explanation on each and every field.
The first header field in the IP packet is the 4 bit version field and this field always contains the decimal value 4. Thus, IPV4 only uses this header because different IP versions use different formats of data grams.
2. Header length:
The second field in the IP packet is the header length and another name for the header length is Internet Header Length(IHL). The length of the IP address always lies in between the range of 20 to 60 bytes. Now, we need to find the minimum and maximum length of the IP header. The 32- bit word count in the header will find the variable number of options for specifying the size of the header. So, minimum length of IP header is = 5 * 4 bytes = 20 bytes or 5 * 32 bits = 160 bits = 20 bytes. The size of Options field can go up to 40 bytes. Hence, maximum length of IP header is = 20 bytes + 40 bytes = 60 bytes.
3. Service type:
Service type or the type of service is the third field in the header format. This is a eight bit field where it is used to carry out the information to provide the quality of service(QOS). So, the IPv4 header to distinguish different types of IP datagrams.
4. Total length:
The total length is the fourth field in the header format that has a length of 16 bits which indicates the size of the datagram, including the data, in bytes. Hence, the minimum and maximum length can be calculated:
- Minimum total length of the datagram is 20 bytes (20 bytes header + 0 bytes data).
- Maximum total length of the datagram is 65535 bytes.
Identification is the fifth field in the IP header format which is 16 bit long. The main purpose of the identification field is to identify the fragments of an original IP datagram. Here, each packet is divided into fragments so that each fragment must be marked with the same identifier.
This is the 3-bit field where the functionality is same as the identification which is used to control or identify the IP fragments or it also determines number of fragments remaining in a series of fragments.
Flags follow the certain order for example, high to low order
1. bit 0: Reserved; must be zero.
2. bit 1: Don’t Fragment (DF)
3. bit 2: More Fragments (MF)
7. Fragment offset:
Fragmentation offset is a 13 bit field in the IP header format and the functionality of this is to show the position of fragmented data-grams in unfragmented original IP datagrams.
8. Time to live:
Time to live is a 8-bit field in the IP header format which determines the number of hops that datagram can pass before being rejected or in simple words it determines the duration of datagram fixed on the network.
Protocol is 8-bit field in IP header format which carries the upper layer data that is encapsulated in the datagram.
10. Header checksum:
It is the 16-bit field that ensures the integrity of the header values and contains the checksum value of the total header. Therefore, the purpose of the checksum value is to identify the errors in the IP header.
11. Source IP address:
It is 4-byte(32-bit) internet address which identifies the source of the datagram and contains logical address of the sender of the datagram.
12. Destination IP address:
This is also 4-byte internet address which identifies the final destination of the datagram and contains logical address of the receiver of the datagram.
Options vary between the range of 0 bytes to 40 bytes and provides more functionalities to the IP datagram and can carry fields like
- Control routing
Benefits of IPV4:
- IPv4 offers flexibility and scalability
- It allows flawless data encryption
- Large routing tasks
Limitations of IPV4:
- Security related issues
- It has only 32-bits address space
- No provision for authentication
- No provisions for routing
Hence, Above mentioned are the brief explanation on Internet Protocol Version 4.
By above info now you can understand about IPV4. So, if we miss out any info just comment in the section below. We will be happy to update.