Module 10: IPv6 Addressing Formats and Rules

IPv4 Issues

The limited address space of IPv4 (which supports approximately 4.3 billion addresses) has become a significant issue due to the rapid growth of devices connected to the internet. This led to the depletion of IPv4 addresses, prompting the development of IPv6 as a successor. IPv6 offers a much larger 128-bit address space, providing an immense 340 undecillion possible addresses, solving the address scarcity problem. Additionally, IPv6 includes improvements over IPv4, such as the introduction of ICMPv6, which encompasses address resolution and address autoconfiguration, features that were not present in ICMPv4.

IPv6 Addressing

IPv6 addresses are composed of 128 bits and are written as a sequence of 8 hextets (16-bit groups), separated by colons. Each hextet is represented by 4 hexadecimal digits, so an IPv6 address consists of 32 hexadecimal characters. IPv6 addresses are not case-sensitive, meaning they can be written in either uppercase or lowercase.

An example of a full IPv6 address in the preferred format is:

fe80:0000:0000:0000:0123:4567:89ab:cdef

This address contains all 32 hexadecimal digits in full form, but there are two rules that simplify the writing of IPv6 addresses.

Rule 1 – Omit Leading Zeros

Leading zeros within each hextet can be omitted to reduce the length of the address. However, trailing zeros cannot be omitted. For example:

  • 01ab can be written as 1ab
  • 09f0 can be written as 9f0
  • 0a00 can be written as a00
  • 00ab can be written as ab

Rule 2 – Double Colon (::)

The double colon (::) can be used to represent one or more contiguous 16-bit groups of zeros in an IPv6 address. For example:

  • The address 2001:db8:cafe:1:0:0:0:1 can be simplified to 2001:db8:cafe:1::1 by omitting the three all-zero hextets.

Important considerations regarding the double colon:

  • The double colon can only appear once in an address. This ensures that there is only one possible interpretation of the address.
  • If an address contains multiple contiguous zero groups, best practice is to replace the longest string of zeros with the double colon. If the strings are of equal length, use the double colon for the first string.

IPv4 and IPv6 Coexistence

Both IPv4 and IPv6 can coexist during the transition period, as the complete migration to IPv6 will take several years. The Internet Engineering Task Force (IETF) has established various tools and protocols to assist network administrators in migrating to IPv6.

There are three primary migration techniques:

  1. Dual Stack:

    • Dual Stack devices run both IPv4 and IPv6 protocol stacks simultaneously, allowing them to communicate with both IPv4 and IPv6 devices.
  2. Tunneling:

    • Tunneling involves encapsulating an IPv6 packet inside an IPv4 packet to transport it across an IPv4 network. This allows IPv6 traffic to traverse networks that only support IPv4.
  3. Translation:

    • Translation involves converting IPv6 packets to IPv4 packets and vice versa. NAT64 is a technique that allows IPv6-enabled devices to communicate with IPv4-enabled devices. This method translates an IPv6 address into an IPv4 address when necessary and allows for compatibility between the two addressing schemes.