Useful Introduction to IPV6 Address


In this article, I will take you through the introduction of IPV6 Address. The evolution of IPV6 Address can be traced back to the time when Internet was evolving where devices needed to have an IP Address to connect to the Internet.

We initially started with 32-bit IPV4 Addressing mechanism back in the time which is still relevant and is widely used around the world. Soon after exploding of digital devices in the market we started realizing a need to have another long term addressing mechanism which can fill the gap after we exhaust the last IPV4 Address.


Why do we need IP Address 

It is required to connect your computer or system to Internet.

What is the problem with IPV4 Address

We can assign IPV4 address to only 4,294,967,296 devices.



Useful Introduction to IPV6 Address 1

Also Read: 30 Most Popular IPTABLES Command in Linux

What is IPV6 Address 

It is a 128 bit hexadecimal address. The address is divided into eight 16-bit hexadecimal blocks separated by colons.


IPV6 Address Header

Useful Introduction to IPV6 Address 2
Credit: IPv6 Fundamentals: A Straight Forward Approach to Understanding IPV6

The IPv6 main header is required and consists of the following fields:-

Version (4 bits): This field contains the version number of the IP (Internet Protocol) header. In IPv6, this field is always the value of 6.


Traffic Class (8 bits): This field has similar functions to the Type of Service (ToS) field in the IPv4 header. It is the same size as the IPv4 ToS field; only the name has changed. The Traffic Class field is used to identify and distinguish between different classes or priorities of IPv6 packets.

IPv6 uses the Differentiated Services technique specified in RFC 2474, Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers. Using 6 bits for the DSCP (Differentiated Services Code Point) allows a possibility of 64 markings. This provides much more granularity in priority selection than the original 3 bits for IPv4 Precedence, with its 8 values.

Flow Label (20 bits): The Flow Label field is used to tag a sequence or flow of IPv6 packets sent from a source to one or more destination nodes. This flow can be used by a source to label sequences of packets for which it requests special handling by the IPv6 routers, such as “real-time” service.

The Flow Label field is used to help identify all the packets within the same flow to ensure that all the packets receive the same type of handling by the IPv6 routers. Flow Label usage is described in RFC 6437, IPv6 Flow Label Specification. Routers keep track of these individual packet flows. Because routers do not have to independently process each packet’s header, these multipacket flows are processed more efficiently. At the time of this writing, this field is still somewhat experimental.

Payload Length (16 bits): This is the length in octets of the payload following the main IP header or, in other words, the data portion of the packet. If the IPv6 packet has one or more extension headers, they are included in the number of bytes contained in the Payload Length field. Extension headers are considered part of the payload.

The IPv6 Payload Length field is similar to the Total Length field in the IPv4 header, except for one important difference. IPv4’s Total Length field includes both the IPv4 header and the data, whereas the IPv6 Payload Length field only specifies the number of bytes of data; it does not include the main IPv6 header.

The IPv4 header can vary in length because of Padding and Options fields, whereas the IPv6 header is fixed at 40 bytes.The Payload Length field is 16 bits, allowing a maximum payload size of 65,535 bytes. IPv6 has a Jumbogram extension header to support larger packet sizes if needed. RFC 2675, IPv6 Jumbograms, specifies an additional 32-bit field to allow the transmission of IPv6 packets with payloads between 65,536 and 4,294,967,295 bytes.

Next Header (8 bits): This field has two benefits. In a situation when there is only the main IPv6 header and no extension headers, the Next Header field specifies the protocol carried in the data portion of the IPv6 packet. This is similar to the Protocol field in the IPv4 header. The same values used in the IPv4 Protocol field are used in the IPv6 Address Next Header field along with additional values.

Hop Limit (8 bits): The Hop Limit field is equivalent to the Time to Live (TTL) field in the IPv4 header. Its name in IPv6 is more reflective of the way that routers treat this field by decrementing the hop limit by 1. Just as with the IPv4 TTL field, if the router decrements the hop limit from 1 to 0, the packet is discarded. In IPv6 Address, an ICMPv6 Time Exceeded message (Type 3, Code 0) is sent to notify the source of the packet that the packet has been dropped.

Source Address (128 bits): This field contains the 128-bit IP address of the originator of the IPv6 packet. As with IPv4, this is the address of the node that originally sent the packet. The source address must be a unicast address.

Destination Address (128 bits): This is the 128-bit IP address of the intended final destination or recipient of the IPv6 packet. It represents the ultimate destination, which can be a unicast or multicast address. Unlike IPv4, there is no broadcast address; however, there is an all-nodes multicast address.

Type of IPv6 Address

A unicast address uniquely identifies an interface of an IPv6 node. A packet sent to a unicast address is delivered to the interface identified by that address.

A multicast address identifies a group of IPv6 interfaces. A packet sent to a multicast address is processed by all members of the multicast group.

An anycast address is assigned to multiple interfaces (usually on multiple nodes). A packet sent to an anycast address is delivered to only one of these interfaces, usually the nearest one.

Rules for IPV6 Address Assignment

IPv6 addresses are assigned to interfaces as in IPv4, not to nodes as in OSI, so each interface of a node needs at least one unicast address.A single interface can also be assigned multiple IPv6 addresses of any type (unicast, multicast, and anycast).

Set an IPV6 Address

root@localhost:~# ip -6 addr add 2001:0db8:0:f101::1/64 dev enp0s3
root@localhost:~# ip addr sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:01:3f:03 brd ff:ff:ff:ff:ff:ff
inet brd scope global dynamic noprefixroute enp0s3
valid_lft 6722sec preferred_lft 6722sec
inet6 2001:db8:0:f101::1/64 scope global
valid_lft forever preferred_lft forever


Also Read: IPV6 Essentials

Reference: IPV6 Fundamentals: A straightforward Approach to understanding IPV6 

Leave a Comment