IPV6 Header Format
IPV6 is also a datagram and connectionless service like IPV4. But its size and functionality of working is a bit difference than IPV4.
IPv6 headers have one Fixed Header and zero or more Optional Headers.
- Fixed header is also called base header. It is the compulsory part of IPV6 header. All the necessary information which are compulsory for a router is kept in the Fixed Header. IPv6 fixed header is 40 bytes (320 bits) long.
- Optional Headers are also called Extension Headers. The optional Header holds some extra (optional) information that helps routers to understand how to handle a packet or flow control. With 40 bytes of fixed header, some extension headers can also be used which may increase the size of packet.
IPV6 Header contains the following information.
1. Version: it is a4-bit field. It represents version IPV6 in binary 0110 (6).
2. Traffic Class: it is 8-bits filed which also known as priority. These 8 bits are divided into two parts.
- The most significant 6 bits are used for Type of Service. it replaces IPv4’s ‘type of service’ field. It’s basic purpose is to provide quality of service (QoS).
- The least significant 2 bits handles the packets in Congestion (i.e. loop). Instead of dropping packets, last 2-bits use Explicit Congestion Notification (ECN) to handle the packets.
3. Flow Label: it is 20-bits field. It uses the virtual circuit for data transmission. In this way sequential flow of the packets is maintained belonging to a datagram. This field avoid to re-ordering of data packets because all data travel in a single path. It is designed for streaming/real-time media.
4. Payload Length. It is 16-bits field. It tells the routers about the size of payload which belongs to a particular packet. With 16 bits, up to 65535 bytes can be indicated of data.
5. Next Header: it is 8-bits field. It tells the type of Extension Header which are additionally used with base header to send more data or information’s. Some extension headers are given below
If extension header is used along with payload, then corresponding bits value is presented in this filed. It mean if Routing header is used as extension header then 43(in bits) is represented in Next header (8bit) field.
Note: Extension headers are optional, and are used if needed.
6. Hop Limit: it is 8-bits field. This field is used to stop packet to loop in the network infinitely. This is same as TTL in IPv4. The Hop-Limit field value is decremented by 1 as it passes a link (i.e. router). When the value of Hop-limit field reaches 0 the packet is discarded.
7. Source Address(128-bits): This field indicates the address of originator of the packet.
8. Destination Address(128-bits): This field provides the address of intended recipient of the packet.
9. This is the payload portion of the IPv6 packet.
Note: We can say that an IPv6 address (128 bits) is 4 times larger than IPv4 (32bit) address but base header (40bytes) of an IPv6 is only 2 times larger than that of IPv4 header (20bytes).
IPv6 Packet Contains
- base header
- may contains zero, one or more extension headers
- Data, needs to transfer