IPv4 Header -Complete description for Gate-Net and other competitive exams

IPv4 Datagram Header

Version of IPv4 datagram is 4. it means we are using 4th generation addressing in internet protocol. It uses 4 bit in IPv4 datagram.
HLEN field is a 4 bit annotation. It means by using this 4 bit we can calculate size of header in datagram. The minimum value of Header length field is 5 and maximum value of Header length field is 15. By using scaling factor of 4 we are calculate the size of Header in IPv4 datagram. The minimum size of IPv4 header is 5×4=20 Byte and the maximum size of header field is 15×4=60 Byte.
Service type is a 8 bit field in IPv4 datagram header. starting 3 bits are denoted as precedence and next four bits are as follows:- DTRC-: D=Low delay , T=High Throughput , R=Reliability , C= Low Cost. Last 8th bit is not use in IPv4 Datagram.
Total Length of Datagram header denotes Header size+ length of data which is 16bit numeric number. Minimum value of this field is 20 Bytes and Maximum value will be 65535 Bytes.
Identification Number is a 16 bit field in IPv4 Datagram Header. It is used to uniquely identify each and every packet fragment which is fragmented at router MTU(Maximum transmitted unit) and group by receiver side with this unique Identification Number.
Flags are 3 bit field and 1st bit is reserved and always be 0. Second bit is DF(Do not fragment) and last bit is More fragment. If MTU is set for router side and DF value is 0 then data is not fragment at router side and drop by router in this situation a ICMP message(Destination not reach) sent to sender side but if DF value is set to 1 then packet is allow for fragment at MTU successfully. MF 0 Denotes that this is the last fragment and if MF 1 then this is not the last fragment and more fragment is coming.
Fragment Offset field in IPv4 datagram header is 13bit. The value of first fragment offset in receiver side is always 0. By using fragment offset we can find out how much data Byte ahead of this fragment. The scaling factor we are using in fragment offset is 8.
Time to Live field hold 8 bit and by using TTL field we can avoid infinite looping of data packet in network. It is also known a datagram life time in network. Before reaching the destination if TTL field is 0 then that packet will be drop by router and send a ICMP message(Time exceeded) to sender. Every data packet has their own TTL field number and it will decrease hop to hop.
Protocol field in IPv4 Header is 8bit number that defines the protocol which are using to pass that data packet in network.
Header Checksum it is a 16 bit field use to detect error in IPv4 datagram. It is calculate on every hope in IPv4 datagram and it is calculate only header part not data part because in TCP header we already calculate Checksum for data field.
Source IP address indicate 32 bit source address. It is denoted in four octet and each octet is 8 bit in size.
Destination IP address indicate 32 bit destination address. It is denoted in four octet and each octet is 8 bit in size.
Options are optional in IPv4 datagram. It is five types and indicate the path and route of packet. These are Strict Source Routing, Lose Source Routing, Record Routing, Time Stamping, Padding. Minimum size of option is 0 Byte and maximum is 40 Byte in datagram header.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *