Home » IPv6 » IPv6


IPv6 addresses are 128 Bit long, and are represented by breaking  into 8 segments where each segment is 16-bit long and each segment is separated by a ‘ : ‘ (colon)

For an example take a look at  IPv6 address – 2001:0000:0010:0123:1111:0000:0000:0000

The address has 8 segments each of which is 16 bits long, making the total address length of IPv6 address to be 128 bits and therefore it can hold  2128 addresses. When compared to the IPv4 addresses which are 32 bits long and can hold about 232 addresses (aproximately 4 Billion).

2001 0000 0010 0123 1111 0000 0000 0000 Total Size is 128 Bits long
16 Bits 16 Bits 16 Bits 16 Bits 16 Bits 16 Bits 16 Bits 16 Bits

Another Example address:  2001:0000:0011:0000:0000:0000:0000:0001

Since these addresses are too long to remember and to write there are certain rules for reducing the size of written IPv6 address

1. Eliminate Leading Zeros in any 16-Bit Segment of the written IPv6 address
2. Any 16-Bit Segment with all Zeros can be represented with a Single Zero instead of 4-Zeros
3. Single Consecutive Segments of all Zeros can be represented by ‘ :: ‘ , (double colon) this representation can happen only once in a written IPv6 address. An address with more than one ‘ :: ‘ can cause ambiguity and therefore is not accepted.

Applying this rule to the above example IPv6 address reduces the size of the address significantly
Original Written Address:         2001:0000:0011:0000:0000:0000:0000:0001
Eliminate Leading Zeros:         2001:0000:11:0000:0000:0000:0000:1
Apply Single Zero Rule:           2001:0:11:0:0:0:0:1
Apply consecutive Zero Rule: 2001:0:11::1

IPv4 and IPv6 addressing and subnetting is not  much different, consider the following example

Example IPv4 Address:

172 16 10 0 /24
Network Portion Subnet Part Host Portion Prefix length

Here the Prefix length is /24. Prefix Length = Network Portion+Subnet which equals to 24 in this example as each Octet in IPv4 address is 8 Bits Long and 3 Octets will equal to 24 Bits.

Similarly look at the IPv6 address :  2001:0000:0123:0010:0000:0000:0000:0000 /64

each segment in Ipv6 address is 16 bits long, so ISP Prefix+subnet = 64 bits, which becomes the prefix length. The Prefix length signifies how many of the first bits of the address are the prefix bits.

When writing an IPv6 Prefix, all the host bits are set to zero, the same way as writing the IPv4 address prefix.

2001 0000 0123 0010 :: /64
ISP Prefix (network portion) Subnet ID Host ID or Interface ID Prefix length

The all Zero address of IPv6 is used in two cases, the first being the default address which is written as :: /0 and the second form of all Zero IPv6 address is :: /128 – this address represents an unspecified address which is used in neighbor discovery protocol procedures.

In IPv4 the subnet portion is taken from the host portion of the address and therefore the host portion in IPv4 address varies depending upon the number of bits you use for the subnet identification.

In IPv6, the Subnet ID field is a part of the network portion of the address, which makes the interface ID or host portion of IPv6 addresses consistent. Benefit of  doing this is that it creates a clear separation of functions where the network Portion provides the location of a device down to specific data link and the host portion provides the identity of the device on that data link.

Interface ID Rule:

For all Unicast addresses except that start with binary 0000, the Interface ID are required to be 64 Bit long and to be constructed in Modified EUI-64 Format to maintain a globally unique character for Interface-ID when ever possible.

Interface-ID can be generated in many different ways

1. Manual Configuration
2. Acquire via DHCPv6
3. Build one from layer-2 address in Modified EUI-64 format.
4. Auto generate Random address
5. Cryptographically generated addresses (CGAs)

The network portion of the IPv6 address introduces to the concept of scope. Scope is used to identify the network domain (physical or logical). Once the network domain (scope) is identified it is easier to manage the traffic with appropriate policies.

IPv6 Address types:

The 3 Address types defined in IPv6 which are


There is no IPv6 Broadcast address, however there is an ‘all nodes’ multicast address which servers the same purpose as a broadcast address.

The IPv6 Unicast address format reflects three predefined scopes

1. Link Local Scope
This scope identifies all hosts within a single layer-2 domain and the unicast addresses within this scope are called as link-local addresses.

2. Unique Local Scope
This scoops identifies all devices reachable within an administrative domain, addresses are called as unique-local addresses (ULAs)

3. Global Scope
This scope identifies all devices reachable across the internet, addresses used are called as global unicast addresses (GUAs)

Global Unicast Address:

Global Unicast Address has a  format as below.

<———Network Portion———–> <—Host Portion—>
Global Routing Prefix (48 Bits Std field Size) Subnet ID (16 Bits Std Size) Interface ID (64 Bits Std Size)

Normally the Interface ID of the global IPv6 address should be 64 Bits long (with very few exceptions) and The Subnet ID Field should be 16 Bits again with a few exceptions. The 16 Bit Subnet field itself could provide 65,536 separate subnets.

In a IPv6 address the First 3 Bits of a Global Unicast Address are Currently 001, therefore global unicast address identification is easy as they start with either 2 or 3 depending on the value in the fourth bit in global routing prefix. Currently IPv6 addresses allocated by RIRs begining with 2001 and Prefixes used by 6Bone (IPv6 research network) start with 3ffe.

The Global unicast addresses are to be used across the IPv6  internet, since they are globally unique and globally routable.

Link-Local Unicast Address:

The Link Local Unicast Address has a scope which is confined to a single link, and is unique only on that one link, which also means that an identical address might exist on another link somewhere, therefore the link local address is not routable off its link. The Link Local addresses also have the source and destination address on the same link therefore they never have to be routed to other links. The link local addresses are useful in neighbor discovery protocols that communicate only on a single link. They also assist devices in IPv6 auto configuration.

The network Portion of the Link Local address is of fixed format which is FE80::/10. The High order 10 bits are binary 1111111010 which is equal to Hex FE8., and the subsequent 54 bits of the network portion are all zeros. The remaining part of the IPv6 address which is the 64 bit Interface ID can be generated based on the Layer-2 MAC address.

A Link can be a group of hosts that can communicate to each other directly without the need of the router, these links can be either point-to-point or broadcast links. Whatever these links maybe, the packets addresses using the link local addressing will never pass though a router. Most of the time these addresses are useful in the IPv6 auto-configuration feature. Again remember the Link Local addresses Start with FE80::/10.
Note that the Link Local addresses are generated by hosts themselves, No router is needed to generate these addresses. Link Local addresses are very useful and in-fact Point-to-Point links between two routers can use the link-local addresses without having the need to use the global unicast address, but since IPv6 has no shortage of addressing space so using link-local addresses in this scenario may not be necessary and is also is not be practical for many reasons.

Unique Local Unicast Address:

Unique local addresses (ULAs) are to be used within the boundary of a predefined domain. Traffic using ULAs either as Source or Destination address should not cross the boundaries of that domain. ULAs can be used to interconnect the local domains as there are no address collisions, and routers connected to multiple local domains can distinguish between them based on the address and thus avoiding additional labels.

ULA Format is FC00::/7

IPv6 Multicast Address:

Multicast Prefix Flags Scope Group ID
8 Bits 4 Bits 4 Bits 112 Bits

The First 8 Bits of the IPv6 multicast address are always all 1s.

Next 4 Bits (flags), have first 3 bits set to 0, as they are currently unused, and the fourth bits can have a value of either 0 or 1, its set to zero if the address is well known(0) and set to one if the value is administratively assigned(1).

Next 4 Bits (Scope) indicate the scope of the address and some of the well known link local scope values are

Scope Value                        Scope
0x0                                     Reserved
0x1                                     Node-Local
0x2                                     Link-Local
0x8                                     Organization Local
0xE                                     Global
0xF                                     Reserved

The last 112 Bits are used as a Group-ID which are used to identify individual multicast groups. Currently only the last 32 bits are used setting the first 80 bits to Zero.

Some of the well known IPv6 Multicast addresses are

Multicast Address            Multicast Group

FF02::1                        All Nodes
FF02::2                        All Routers
FF02::5                        OSPFv3 Routers
FF02::6                        OSPFv3 Designated Routers
FF02::9                        RIPng Routers
FF02::A                        EIGRP Routers
FF02::B                        Mobile Agents
FF02::C                        DHCP Servers/ Relay Agents
FF02::D                        All PIM Routers

Identifying the IPv6 Address Types by looking at the address:

Address Type Hex Values
Global Unicast 2xxx::/4 or 3xxx::/4
Link Local Unicast FF80::/10
Multicast FF00::/8
Unspecified ::/128
Default ::/0
Loopback ::1/128

IPv6 Address assignments

IANA or Regional Internet Registries (RIRs) normally assign a /32 or /35 to Large Internet Service Providers. They in-turn assign the longer prefixes like /48 to their customers.

The allocation depends on the needs and the size of the customer
If a customer needs to address only one subnet then a /64 might be assigned
If a customer is very large then a /48 or shorter prefix can be assigned.
And if only one device is to be addresses then a /128 can also be assigned.

IPv6 Unicast Address Assigned

2001::/16                        IPv6 Internet – ARIN,APNIC, RIPE NCC, LACNIC
2002::/16                        Used For 6-to-4 transition mechanisms

2003::/16                        IPv6 Internet – RIPE NCC.

2400:0000::/19            IPv6 Internet APNIC

2600:0000::/22            IPv6 Internet – ARIN

2A00::0000::/21            IPV6 RIPE NCC

3FFE::/16                        6Bone (IPv6 Research Network)

IANA provides a prefix no longer than 32 bits to regional internet registries (RIRs), the current RIRs are

1. APNIC – Asia pacific network information center
2. ARIN – American Registry for Internet Numbers
3. RIPE NCC – REseaux IP Europeens
4. LACNIC – Regional latin-America and Caribbean IP Address Registry
5. AfriNIC – African Networj Information Center

Assignment Policy for 2001::/3 as an example

IANA (/3) —-> RIR ( /3 to /32) ——> ISP (/32 to /35) ——> Organizations (/48) ——> Local Subnet (/64)

Special Use IPv6 Addresses

The special use IPv6 addresses do not carry any scope.

1. Unspecified address –  ::/128
This is not assigned to any interface and only used as a source address by devices that do not have an IPv6 address or the IPv6 address they have is not yet determined to be unique within the local link.

2. Loopback Address – ::1/128
This is used by every node to refer to itself and is similar to IPv4 In IPv6 the loopback address has 127 bits set to zero and the last bit is set to 1 and is represented as ::1/128

The other two special use IPv6 addresses are for the IPv6 to IPv4 coexistence.

1.  IPv4 compatible IPv6 address was defined to be used for dynamic tunneling and was built by adding the IPv4 address to 32 bits and the other 96 bits set to zero. This method has been depreciated and is no longer used.

2. IPv4 mapped IPv6 address is used to represent the address of an IPv4 node in an IPv6 format. In this method the first 80 bits are set to zero followed by 16 bits set to 1 then  IPv4 address is added to the IPv6 address in 32 bits.

IPv4 mapped IPv6 address will be  ::FFFF:

Summary of Special Use addresses
Unspecified Address    ::/128  (all zeros)
Loopback Address        ::1/128
IPv4 Compatible IPv6 Address (depreciated)    ::IPv4
IPv4 Mapped IPv6 Address         ::FFFF:IPv4

Incoming search terms for the article:

2 thoughts on “IPv6

  1. Chris says:

    This is a very clear article

  2. shilpa says:

    Very nice article..

Leave a Reply