www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ROUTE / Module 8 / IPv6 – IPv6 Address Representation

IPv6 – IPv6 Address Representation

There are three ways in which IPv6 addresses can be represented. These three ways are:

  • The Preferred or Complete Address Representation or Form
  • The Compressed Representation
  • The IPv6 Addresses with an Embedded IPv4 Address

While the preferred form or representation is the most commonly used method for representing the 128-bit IPv6 address in text format, it is also important to be familiar with the other two methods of IPv6 address representation. These methods are described in the following sections.

The Preferred Form

The preferred representation for an IPv6 address is the longest format, and is also referred to as the complete form of an IPv6 address. This format represents all 32 Hexadecimal characters that are used to form an IPv6 address. This is performed by writing the address as series of eight 16-bit Hexadecimal fields, separated by a colon, e.g. 3FFF:1234:ABCD:5678:020C:CEFF:FEA7:F3A0.

Each 16-bit field is represented by four Hexadecimal characters, with each of the Hexadecimal character representing 4-bits. The value of each 16-bit Hexadecimal field can have a value of between 0x0000 and 0xFFFF, although, as will be described later in this chapter, different values have been reserved for use in the first 16 bits and all possible values are not used. When writing IPv6 addresses, each Hexadecimal character is not case sensitive. In other words 2001:ABCD:0000 and 2001:abcd:0000 are the exact same thing. The complete form for IPv6 address representation is illustrated in Figure 8-5:

IPv6_Lesson5_image1

Fig.8-5. The Preferred Form For IPv6 Address Representation

The following IPv6 addresses are examples of valid IPv6 addresses in the preferred form:

  • 0000:0000:0000:0000:0000:0000:0000:0001
  • 2001:0000:0000:1234:0000:5678:af23:bcd5
  • 3FFF:0000:0000:1010:1A2B:5000:0B00:DE0F
  • fec0:2004:ab10:00cd:1234: 0000:0000:6789
  • 0000:0000:0000:0000:0000:0000:0000:0000

The Compressed Representation

The compressed representation allows for IPv6 addresses to be compressed in one of two ways. The first method allows a double colon (::) to be used to compress consecutive zero values in a valid IPv6 address for successive 16-bit fields comprised of zeros or for leading zeros in the IPv6 address. When using this method, it is important to remember that the double colon can only be used once in an IPv6 address.

When the compressed format is used, each node and router is responsible for counting the number of bits on either side of the double colon to determine the exact number of zeros it represents. Table 8-1 shows IPv6 addresses in the preferred form and the compressed representation of those addresses:

Complete IPv6 Address Representation Compressed IPv6 Address Representation
0000:0000:0000:0000:0000:0000:0000:0001 ::0001
2001:0000:0000:1234:0000:5678:af23:bcd5 2001::1234:0000:5678:af23:bcd5
3FFF:0000:0000:1010:1A2B:5000:0B00:DE0F 3FFF::1010:1A2B:5000:0B00:DE0F
FEC0:2004:AB10:00CD:1234:0000:0000:6789 FEC0:2004:AB10:00CD:1234::6789
0000:0000:0000:0000:0000:FFFF: 172.16.255.1 ::FFFF: 172.16.255.1
0000:0000:0000:0000:0000:0000:172.16.255.1 ::172.16.255.1
0000:0000:0000:0000:0000:0000:0000:0000 ::
Tab.8-1. Representing Complete IPv6 Addresses in the Preferred Compressed Form

As previously stated, the double colon cannot be used more than once in a single IPv6 address. If, for example, you wanted to represent the complete IPv6 address 2001:0000:0000:1234:0000:0000:af23:bcd5 in compressed form, you could only use the double colon once, even though there are two consecutive strings of zeros within the address. Therefore, attempting to compress the address to 2001::1234::af23:bcd5 would be considered illegal; however, the same IPv6 address could be compressed to either 2001::1234:0000:0000:af23:bcd5 or 2001:0000:0000:1234::af23:bcd5 depending on preference.

The second method of IPv6 compressed address representation is applicable to each 16-bit field and allows leading zeros to be omitted from the IPv6 address. When using this method, if every bit in the 16-bit field is set to 0, then one zero must be used to represent this field. In this case, all the zeros values cannot be omitted.  Table 8-2 shows IPv6 addresses in the preferred form and how they can be compressed using the second method of IPv6 compressed form representation.

Complete IPv6 Address Representation Compressed IPv6 Address Representation
0000:0123:0abc:0000:04b0:0678:f000:0001 0:123:abc:0:4b0:678:f000:1
2001:0000:0000:1234:0000:5678:af23:bcd5 2001:0:0:1234:0:5678:af23:bcd5
3FFF:0000:0000:1010:1A2B:5000:0B00:DE0F 3FFF:0:0:1010:1A2B:5000:B00:DE0F
fec0:2004:ab10:00cd:1234:0000:0000:6789 fec0:2004:ab10:cd:1234:0:0:6789
0000:0000:0000:0000:0000:FFFF: 172.16.255.1 0:0:0:0:0:FFFF: 172.16.255.1
0000:0000:0000:0000:0000:0000:172.16.255.1 0:0:0:0:0:0:172.16.255.1
0000:0000:0000:0000:0000:0000:0000:0000 0:0:0:0:0:0:0:0
Tab.8-2. Representing Complete IPv6 Addresses in the Alternative Compressed Form

While there are two methods of representing the complete IPv6 address is compressed form, it is important to remember that both methods are not mutually exclusive. In other words, these methods can be used at the same time to represent the same IPv6 address. This is commonly used when the complete IPv6 address contains both consecutive strings of zeros as well as leading zeros in other fields within the address. Table 8-3 shows IPv6 addresses in the complete form that include both consecutive strings of zeros and leading zeros and how these addresses are represented in the compressed form:

Complete IPv6 Address Representation Compressed IPv6 Address Representation
0000:0000:0000:0000:01a2b:000c:f123:456 ::1a2b:c:f123:456
FEC0:0004:AB10:00CD:1234:0000:0000:6789 FEC0:4:AB10:CD:1234::6789
3FFF:0c00:0000:1010:1A2B:0000:0000:DE0F 3FFF:c00:0:1010:1A2B::DE0F
2001:0000:0000:1234:0000:5678:af23:00d5 2001::1234:0:5678:af23:d5
Tab.8-3. Representing Complete IPv6 Addresses Using Both Compressed Form Methods

The IPv6 Addresses with an Embedded IPv4 Address

The third representation of an IPv6 address is to use an embedded IPv4 address within the IPv6 address. While valid, it is important to keep in mind that this method is being deprecated and considered obsolete because it is applicable only in the transition of IPv4 to IPv6.

When an IPv6 address is embedded with an IPv4 address, the first part of the IPv6 address uses the Hexadecimal notation and the remainder of the address is in the tradition dotted-decimal notation used by IPv4 addresses. However, it is permissible to convert the 32-bit dotted-decimal IPv4 address into Hexadecimal notation and embed that into the IPv6 address instead. The IPv6 address with an embedded IPv4 address is comprised of six fields of 16-bit Hexadecimal characters and four fields of 8-bit decimal characters. There are two kinds of IPv6 addresses that contain an embedded IPv4 address. These are:

  • IPv4-compatible IPv6 addresses
  • IPv4-mapped IPv6 addresses

While these terms sound similar, there are some significant differences in these addresses that you should be familiar with. First, IPv4-compatible IPv6 addresses are used in the transition from IPv4 to IPv6. These addresses are used to establish automatic tunnels for IPv6 packets over native IPv4 networks. IPv4-compatible IPv6 addresses have the first 96 bits set to 0 and are then followed by the 32-bit IPv4 address as illustrated in Figure 8-6:

IPv6_Lesson5_image2

Fig.8-6. IPv4-compatible IPv6 Addresses

Referencing Figure 8-6,it is important to understand that the compressed form can also be used to represent IPv4-compatible IPv6 addresses. For example, the IPv4-compatible IPv6 addresses for a Loopback interface with the IPv4 address 172.16.255.1/32 would be represented as 0000:0000:0000:0000:0000:0000:172.16.255.1. This same address can then be compressed as 0:0:0:0:0:0:172.16.255.1/32 or simply as ::172.16.255.1/32.  Additionally, it is also important to remember that the decimal IPv4 address could be converted to Hexadecimal and used to create the IPv4-compatible IPv6 address 0:0:0:0:0:0: AC10:FF01/128 or simply ::AC10:FF01/128.

Unlike the IPv4-compatible IPv6 addresses, the IPv4-mapped IPv6 addresses are used locally on devices that are running both IPv4 and IPv6. IPv4-mapped IPv6 addresses are never advertised as IPv6 addresses. These addresses have the first 80 bits set to 0; the next 16 bits set to a value of all 1s, which is FFFF in Hexadecimal notation, and are then followed by the IPv4 dotted-decimal address. Figure 8-7 illustrates the IPv4-mapped IPv6 address format:

IPv6_Lesson5_image3

Fig.8-6. IPv4-mapped IPv6 Addresses

Using IP address 172.16.255.1/32 as an example, this address could be represented in the IPv4-mapped IPv6 address format as 0000:0000:0000:0000:0000:FFFF:172.16.255.1/128. Because it is perfectly legal to represent the address in the compressed form, the same address could also be written as either 0:0:0:0:0:FFFF:172.16.255.1/128 or  ::FFFF:172.16.255.1/128. Additionally, the IPv4 address could be also converted to Hexadecimal producing the IPv4-mapped IPv6 address 0:0:0:0:0: FFFF:AC10:FF01/128 or simply ::FFFF:AC10:FF0/128.

Prev

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.