32.1.1 IPv6 address
- <Structure of this section>
(1) Address notation
An IPv6 address is 128 bits. The notation is as follows:
-
In hexadecimal notation, an IPv6 address is written as eight 16-bit groups, each separated by a colon.
Example: 3ffe:0501:0811:ff02:0000:08ff:fe8b:3090
-
You can omit leading 0s in each of the individual blocks in hexadecimal notation.
Example: 3ffe:501:811:ff02:0:8ff:fe8b:3090
-
You can replace consecutive blocks of 0s with two colons (::). However, only one such replacement is allowed.
Example: You can change the full IPv6 address on the left to the format on the right:
fe80:0000:0000:0000:0000:0000:0000:3090 -> fe80::3090
Example: Only one set of two colons is permitted.
fe80:0000:0000:0000:0000:0000:0000:3090 -> fe80::0::3090 (incorrect)
-
You can use the following formats to specify an address and the prefix length:
-
IPv6 address/prefix length
-
IPv6 address prefixlen prefix-length
The prefix length indicates in decimal the number of bits from the leftmost end of an address that are used for the prefix.
-
(2) Format prefix in the addresses
A 128-bit IPv6 address is divided into subfields. The first bits are called the address format prefix and identify the type of the IPv6 address. The following figure shows an example of an address format prefix.
|
The following table describes the types of address format prefixes.
Prefix (binary) |
Assignment |
---|---|
0000 0000 |
Unassigned |
0000 0001 |
Unassigned |
0000 001 |
Unassigned |
0000 010 |
Unassigned |
0000 011 |
Unassigned |
0000 1 |
Unassigned |
0001 |
Unassigned |
001 |
Aggregation-possible global unicast addresses |
010 |
Unassigned |
011 |
Unassigned |
100 |
Unassigned |
101 |
Unassigned |
110 |
Unassigned |
1110 |
Unassigned |
1111 0 |
Unassigned |
1111 10 |
Unassigned |
1111 110 |
Unique Unicast Address |
1111 1110 0 |
Unassigned |
1111 1110 10 |
Link-local unicast addresses |
1111 1110 11 |
Unassigned |
1111 1111 |
Multicast addresses |
(3) Unicast address
A unicast address identifies a single interface. Packets addressed to a unicast address used as the endpoint address are delivered to the interface indicated by the address. The following figure shows how communication using a unicast address works.
|
(a) Link-local address
The upper 64 bits of the address prefix are fe80:: and the address including the 64-bit interface ID part is called IPv6 link-local address. IPv6 link-local addresses are valid only on a link and are used for address auto-configuration and neighbor discovery, and for networks without routers. When the source address or destination address of a packet is an IPv6 link-local address, the Switch does not forward the packet to other links.
Each interface that uses IPv6 on the Switch is assigned an IPv6 link-local address. You cannot assign multiple link-local addresses per interface. The following figure shows the format of an IPv6 link-local address.
|
(b) Site-local address
The upper 10 bits of the address prefix are 1111 1110 11, and the address including the 64-bit interface ID part is called IPv6 site-local address. The Switch treats IPv6 site-local addresses as IPv6 global addresses in "(c) Global addresses". Therefore, when you assign an IPv6 site-local address to an interface, configure routing or filtering so that the information about the IPv6 site-local address does not leave the site. The following figure shows the format of an IPv6 site-local address. Note that site-local addressing has been deprecated in RFC3879.
|
(c) Global address
Addresses whose higher 3 bits of the address prefix begin with 001 are called IPv6 global addresses. IPv6 global addresses are unique in the world and are used for traffic on the Internet. When the source address of a packet is an IPv6 global address, the packet is forwarded based on routing information. The following figure shows the format of an IPv6 global address.
|
(d) Unspecified address
The address 0:0:0:0:0:0:0:0 (0::0 or ::) with all bits at 0 is defined as an unspecified address. The unspecified address indicates that the interface has no address. This address is used when you start connecting to a node that is not assigned an address. You cannot intentionally assign the unspecified address to a node. The following figure shows the format of the unspecified address.
|
(e) Loopback address
The address 0:0:0:0:0:0:0:1 (0::1 or ::1) is defined as the loopback address. The loopback address is used as the destination address of a packet when the packet is sent to the local node. You cannot assign the loopback address to an interface. When the destination address of an IPv6 packet is the loopback address, the packet is not allowed to be sent to destinations other than the local node nor allowed to be forwarded by routers. The following figure shows the format of the loopback address.
|
(f) IPv4-compatible address
IPv4-compatible IPv6 addresses are used to allow two IPv6 nodes to communicate on an IPv4 routed network. An IPv4-compatible address is a special unicast address whose lower 32 bits contain an IPv4 address. The prefix is 96 bits, all bits of which are set to 0. The following figure shows the format of an IPv4-compatible address. Note that IPv4 compatible addressing is deprecated by RFC4291.
|
(g) IPv4 projection addressing
IPv4-mapped IPv6 addresses are used to communicate with IPv4-only nodes that do not support IPv6. When an IPv6 host needs to send packets to a host that only supports IPv4, the IPv6 host uses an IPv4-mapped IPv6 address. The prefix is 96 bits, the 80 upper bits of which are 0s and the remaining 16 bits are 1s. The following figure shows the format of an IPv4-mapped address.
|
(h) NSAP compatible addressing
This address format is used to convert an NSAP address so that it can be used in IPv6. To support NSAP, the upper 7 bits of the address format prefix are 0000 001. The following figure shows the format of an NSAP-compatible address. Note that NSAP compatible addressing is deprecated by RFC4048.
|
(i) IPX compatible addressing
This address format is used to convert an IPX address so that it can be used in IPv6. To support IPX, the upper 7 bits of the address format prefix are 0000 010. The following figure shows the format of an IPX-compatible address. Note that IPX compatible addressing is deprecated by RFC3513.
|
(j) 6to4 addressing
This address format is used for 6to4 tunneling. Configures IPv4 addressfor sites that are assigned the prefix 2002::/16 and that use tunneling from the 17th bit to the 48th bit. The following figure shows the format of a 6to4 address.
|
(k) IPv4 embedded IPv6 addressing
The address format used to translate IPv4 and IPv6 addresses. There are two forms, one using the well-known prefix as the prefix, and the other using any prefix. The Switch treats it as a normal global address.
The well-known prefix (64:ff9b::/96) format stores IPv4 addressing in the low-order 32-bits. The following diagram shows an IPv4 embedded IPv6 addressusing the well-known prefix.
|
(l) Discard prefix address
The address format used to discard packets at a specific source or destination address. The prefix is 100::/64. The Switch treats it as a normal global address. The following figure shows the discard prefix address.
|
(m) Teredo IPv6 addressing
This is the addressing format used by Teredo for IPv6 tunneling by UDP. 2001::/32 is assigned as the prefix. The Switch treats it as a normal global address. The following diagram shows Teredo IPv6 addressing.
|
(4) Anycast address
A multicast address also identifies a group of interfaces. Packets addressed to an anycast address used as the endpoint address are delivered to the closest interface in the group based on the distance calculated by the routing protocol. Note that the Switches does not support anycast addresses. The following figure shows how communication using an anycast address works.
|
(5) Multicast address
A multicast address also identifies a group of interfaces. Packets addressed to a multicast address used as the endpoint address are delivered to all the interfaces in the group identified by the address. The following figure shows how communication using a multicast address works.
|
The upper 8 bits of the address format prefix are ff. A node can belong to multiple multicast groups. Multicast addresses cannot be used as the source addresses of packets. In a multicast address, the address format prefix is followed by the flag field (4 bits), scope field (4 bits), and group ID field (112 bits). The following figure shows the format of an IPv6 multicast address.
|
Each of the four bits in the flag field is a flag. The fourth bit is defined as the transient (T) flag bit, and its values have the following meaning:
-
If the T flag bit is set to 0: The address is a known multicast address permanently assigned by IANA.
-
If the T flag bit is set to 1: The address is a temporarily used (non-permanent) multicast address
The scope field is a 4-bit flag and used to limit the scope of a multicast group. The following table describes the scope field values for multicast addresses.
Code |
Scope |
---|---|
0 |
Reserved |
1 |
Node-local |
2 |
Link-local |
3 |
Unassigned |
4 |
Admin local scope |
5 |
Site-local |
6 |
Unassigned |
7 |
Unassigned |
8 |
Organization-local |
9 |
Unassigned |
A |
Unassigned |
B |
Unassigned |
C |
Unassigned |
D |
Unassigned |
E |
Global |
F |
Reserved |
(a) Reserved multicast address
The following multicast addresses are reserved and cannot be assigned to any multicast group.
-
ff00:0:0:0:0:0:0:0
-
ff01:0:0:0:0:0:0:0
-
ff02:0:0:0:0:0:0:0
-
ff03:0:0:0:0:0:0:0
-
ff04:0:0:0:0:0:0:0
-
ff05:0:0:0:0:0:0:0
-
ff06:0:0:0:0:0:0:0
-
ff07:0:0:0:0:0:0:0
-
ff08:0:0:0:0:0:0:0
-
ff09:0:0:0:0:0:0:0
-
ff0a:0:0:0:0:0:0:0
-
ff0b:0:0:0:0:0:0:0
-
ff0c:0:0:0:0:0:0:0
-
ff0d:0:0:0:0:0:0:0
-
ff0e:0:0:0:0:0:0:0
-
ff0f:0:0:0:0:0:0:0
(b) All node addresses
An all-nodes address identifies a group of IPv6 nodes in the specified scope. When the destination address of a packet is an all-nodes address, the packet is received by all the nodes in the specified scope. The following all-nodes addresses are available:
-
ff01:0:0:0:0:0:0:1 Node-local all-nodes address
-
ff02:0:0:0:0:0:0:1 Link-local all-nodes address
(c) All router addresses
An all-routers address identifies a group of IPv6 routers in the specified scope. When the destination address of a packet is an all-routers address, the packet is received by all the routers in the specified scope. The following all-routers addresses are available:
-
ff01:0:0:0:0:0:0:2 Node-local all-routers address
-
ff02:0:0:0:0:0:0:2 Link-local all-routers address
-
ff05:0:0:0:0:0:0:2 Site-local all-routers address
(d) Solicited node address
A solicited-node address is created by using the unicast address or anycast address of a node. The lower 24 bits in the unicast or anycast address of the solicited node are added to the 104-bit prefix, ff02:0:0:0:0:1:ff00::/104. The range of solicited-node addresses is as follows:
ff02:0:0:0:0:1:ff00:0000 ~ ff02:0:0:0:0:1:ffff:ffff
If solicited-node addresses need to be created from IPv6 addresses that have a few different upper bits and those bits are different only because each provider of aggregation identifiers uses different bits in the format prefix, all such solicited-node addresses are the same. This decreases the number of multicast groups that nodes need to participate in.