0
2.3kviews
Explain the IPv4 header format and compare it with IPv6.
1 Answer
0
142views

IPv4 header format

| Version (4 Bits) | IHL (4 Bits) | DSCP (6 Bits) | ECN (2 Bits) | Total Length (16 Bits) | | --- | --- | --- | --- | --- | | Identification (16 Bits) | Flags (3 Bits) | Fragment Offset (13 Bits) | | Time to Live (8 Bits) | Protocol (8 Bits) | Header Checksum (16 Bits) | | Source Address (32 Bits) | | Destination Address (32 Bits) | | Options (32 Bits) |  

IP header includes many relevant information including Version Number, which, in this context, is 4. Other details are as follows:

  1. Version: Version no. of Internet Protocol used (e.g. IPv4).
  2. IHL: Internet Header Length; Length of entire IP header.
  3. DSCP: Differentiated Services Code Point; this is Type of Service.
  4. ECN: Explicit Congestion Notification; It carries information about the congestion seen in the route.
  5. Total Length: Length of entire IP Packet (including IP header and IP Payload).
  6. Identification: If IP packet is fragmented during the transmission, all the fragments contain same identification number. to identify original IP packet they belong to.
  7. Flags: As required by the network resources, if IP Packet is too large to handle, these ‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’.
  8. Fragment Offset: This offset tells the exact position of the fragment in the original IP Packet.
  9. Time to Live: To avoid looping in the network, every packet is sent with some TTL value set, which tells the network how many routers (hops) this packet can cross. At each hop, its value is decremented by one and when the value reaches zero, the packet is discarded.
  10. Protocol: Tells the Network layer at the destination host, to which Protocol this packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP is 1, TCP is 6 and UDP is 17.
  11. Header Checksum: This field is used to keep checksum value of entire header which is then used to check if the packet is received error-free.
  12. Source Address: 32-bit address of the Sender (or source) of the packet.
  13. Destination Address: 32-bit address of the Receiver (or destination) of the packet.
  14. Options: This is optional field, which is used if the value of IHL is greater than 5. These options may contain values for options such as Security, Record Route, Time Stamp, etc.

Difference between IPv4 and IPv6 

S.No. IPv4 IPv6
1 IPv4 addresses are 32 bit length. IPv6 addresses are 128 bit length.
2 IPv4 addresses are binary numbers represented in decimals. IPv6 addresses are binary numbers represented in hexadecimals.
3 IPSec support is only optional. Inbuilt IPSec support.
4 Checksum field is available in IPv4 header No checksum field in IPv6 header.
5 Options fields are available in IPv4 header. No option fields, but IPv6 Extension headers are available.
6 IPv4 address uses a subnet mask. IPv6 uses a prefix length.
7 IPv4 is subdivided into classes (A to E) IPv6 is classless.
IPv6 uses a prefix and an Identifier ID known as IPv4 network
8 IPv4 header has 20 bytes. IPv6 header is the double, it has 40 bytes.
9 Broadcast messages are available. Broadcast messages are not available.
Please log in to add an answer.