Pv6 Address Notation
Because of the length of IPv6 addresses, it is impractical to represent them the same way as IPv4 addresses. At 128 bits, IPv6 addresses are four times the length of IPv4 addresses, so a more efficient way of representing them is called for. As a result, each of the eight groups of 16 bits in an IPv6 address is represented in hex, and these groups are separated by colons, as follows:
1234:5678:9ACB:DEF0:1234:5678:9ABC:DEF0
In IPv6, as in IPv4, unicast addresses have a two-level network:host hierarchy (known in IPv6 as the prefix and interface ID) that can be separated into these two parts on any bit boundary in the address. The prefix portion of the address includes a couple of components, including a global routing prefix and a subnet. However, the two-level hierarchy separates the prefix from the interface ID much like it divides the network and host portions of an IPv4 address. Instead of using a decimal or hex subnet mask, though, IPv6 subnets use slash notation to signify the network portion of the address, as follows:
1234:5678:9ABC:DEF0:1234:5678:9ABC:DEF0/64
An IPv6 address with a prefix length of 64 bits, commonly called a /64 address in this context, sets aside the first half of the address space for the prefix and the last half for the interface ID. After more coverage of the ground rules for IPv6 addressing, this chapter covers the ways that prefixes and interface IDs are developed for unicast addresses, as well as the additional address types used in IPv6 networks.
Address Abbreviation Rules
Even in the relatively efficient format shown earlier, the previous IPv6 addresses can be cumbersome because of their sheer length. As a result, a couple of abbreviation methods are used to make it easier for us to work with them. These methods include the following:
— ■ Whenever one or more successive 16-bit groups in an IPv6 address consist of all 0s, that i Topic portion of the address can be omitted and represented by two colons (::). The two-colon abbreviation can be used only once in an address, to eliminate ambiguity.
■ When a 16-bit group in an IPv6 address begins with one or more 0s, the leading 0s can be omitted. This option applies regardless of whether the double-colon abbreviation method is used anywhere in the address.
Here are some examples of the preceding techniques, given an IPv6 address of 2001:0001:0000:0000:00A1:0CC0:01AB:397A. Valid ways of shortening this address using the preceding rules include these:
/-■"••• 2001:1:0:0:A1:CC0:1AB:397A
(Topic 2001:0001::00A1:0CC0:0174AB:397A
2001:1::A1:CC0:1AB:397A
All of these abbreviated examples unambiguously represent the given address and can be independently interpreted by any IPv6 host as the same address.
Continue reading here: Pv6 Address Types
Was this article helpful?
Readers' Questions
-
Magnus Sackville1 month ago
- Reply
-
marco7 months ago
- Reply