Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The IPv6 128-bit address is divided along 16-bit boundaries. Each 16-bit block is then converted to a 4-digit hexadecimal number, separated by colons. The resulting representation is called colon-hexadecimal. This is in contrast to the 32-bit IPv4 address represented in dotted-decimal format, divided along 8-bit boundaries, and then converted to its decimal equivalent, separated by periods.

The following example shows a 128-bit IPv6 address in binary form:

Copy Code
0010000111011010000000001101001100000000000000000010111100111011
0000001010101010000000001111111111111110001010001001110001011010

The following example shows this same address divided along 16-bit boundaries:

Copy Code
0010000111011010   0000000011010011   0000000000000000  
00101111001110110000001010101010   0000000011111111  
1111111000101000   1001110001011010

The following example shows each 16-bit block in the address converted to hexadecimal and delimited with colons.

Copy Code
21DA:00D3:0000:2F3B:02AA:00FF:FE28:9C5A

IPv6 representation can be further simplified by removing the leading zeros within each 16-bit block. However, each block must have at least a single digit. The following example shows the address without the leading zeros:

Copy Code
21DA:D3:0:2F3B:2AA:FF:FE28:9C5A

Compressing zeros

Some types of addresses contain long sequences of zeros. In IPv6 addresses, a contiguous sequence of 16-bit blocks set to 0 in the colon-hexadecimal format can be compressed to :: (known as double-colon). The following list shows examples of compressing zeros:

  • The link-local address of FE80:0:0:0:2AA:FF:FE9A:4CA2 can be compressed to FE80::2AA:FF:FE9A:4CA2.

  • The multicast address of FF02:0:0:0:0:0:0:2 can be compressed to FF02::2.

Zero compression can only be used to compress a single contiguous series of 16-bit blocks expressed in colon-hexadecimal notation. You cannot use zero compression to include part of a 16-bit block. For example, you cannot express FF02:30:0:0:0:0:0:5 as FF02:3::5.

Zero compression can be used only once in an address, which enables you to determine the number of 0 bits represented by each instance of a double-colon (::). To determine how many 0 bits are represented by the ::, you can count the number of blocks in the compressed address, subtract this number from 8, and then multiply the result by 16. For example, in the address FF02::2, there are two blocks (the FF02 block and the 2 block). The number of bits expressed by the :: is 96 (96 = (8 - 2) × 16).

IPv6 prefixes

The prefix is the part of the address that indicates the bits that have fixed values or are the bits of the network identifier. Prefixes for IPv6 routes and subnet identifiers are expressed in the same way as Classless Inter-Domain Routing (CIDR) notation for IPv4. An IPv6 prefix is written in address/prefix-length notation. For example, 21DA:D3::/48 is a route prefix and 21DA:D3:0:2F3B::/64 is a subnet prefix.

Note:
IPv4 implementations commonly use a dotted decimal representation of the network prefix known as the subnet mask. A subnet mask is not used in IPv6. Only prefix-length notation is used.

Scope ID

The scope ID identifies a specific area within the reachability scope for non-global addresses. A node identifies each area of the same scope with a unique scope ID.

The following illustration shows how the scope ID indicates an interface identifier in a link-local address.

This illustration shows how Node A is connected to three links,interface identifiers 1, 2, and 3. These links are identified by the link-local scope ID.

The scope ID identifies the 64-bit interface identifier of the network interface over which traffic is sent and received.

The following illustration depicts how the nodes use the scope ID to identify site scope zones.

As this illustration shows, the interface identifier scope ID is used only by the local node. Other nodes may use a different network interface for the same link. For example, the link that has scope ID (interface identifier) 3 for Node A has scope ID 1 for Node B.

The notation that is used to specify the scope ID with an address is Address%ScopeID. The following list shows the link-local address FE80::2 qualified with a scope ID on the link between Node A and Node B:

  • For Node A, the address is FE80::2%3

  • For Node B, the address is FE80::2%1

See Also

Concepts

IPv6 Addressing