IPv6 address is made up of two parts.
The first 64 bits usually represent the subnet prefix, and the last 64 bits usually represent the address assigned to interface.
2001:db8:a:a::/64 is subnet or prefix
Network interface can have the address
2001:db8:a:a::1 where the last 64 bits, which are ::1
Hosts on this network can have ::10 and ::20 etc and all devices in this network are configured with default gateway 2001:db8:a:a::1
C:\PC1>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . .: 2001:db8:a:a::10
Link-local IPv6 Address . . . . .: fe80::a00:27ff:fe5d:6d6%11 <<<<<<<
IPv4 Address. . . . . . . . . . .: 10.1.1.10
Subnet Mask . . . . . . . . . . .: 255.255.255.192
Default Gateway . . . . . . . . .: 2001:db8:a:a::1
10.1.1.1
Link-local address fe80::a00:27ff:fe5d:6d6 and the global unicast address 2001:db8:a:a::10 (statically configured).
Notice the %11 at the end of the link-local address. This is the interface identification number, and it is needed so that the system knows which interface to send the packets out of; keep in mind that you can have multiple interfaces on the same device with the same link-local address assigned to them.
EUI-64 helps with auto configuring unique IP addresses in IPv6 world because of how big the IPv6 addresses are
allows your end devices to automatically assign their own global unicast and link-local addresses
EUI-64 takes the client’s MAC address
Splits the 48 bits MAC address in half, and inserts the hex values FFFE in the middle.
In addition, it takes the seventh bit from the left and flips it. So, if it is a 1, it becomes a 0, and if it is a 0, it becomes a 1.
fe80 :: a00:27ff:fe5d:6d6
| |
| |
network bit |
|
host bits
Looking at the host bits in address 0a00:27ff:fe5d:06d6
we can see this is an EUI-64 address because it has FFFE in it
For example MAC address is 08-00-27-5D-06-D6
Split it in half and add FFFE in the middle to get 08-00-27-FF-FE-5D-06-D6
08 is hex and in binary it is 000010″0″0.
The seventh bit from left is a 0, so make it a 1. Now you have 000010″1″0 – convert to hex it becomes 0a
making it 0A00:27FF:FE5D:06D6 in address fe80::a00:27ff:fe5d:6d6
By default, routers use EUI-64 when generating the interface portion of the link-local address of an interface
if you want to use EUI-64 for a statically configured global unicast address, use the eui-64 keyword at the end of the ipv6 address
interface gigabitEthernet 0/0
ipv6 address 2001:db8:a:a::/64 eui-64
Manually assigning IP addresses is not a scalable option with IPv6, you have three dynamic options
1. Stateless address autoconfiguration (SLAAC)
2. Stateful DHCPv6
3. stateless DHCPv6.
SLAAC is designed to enable a device to configure its own IPv6 address, prefix, and default gateway without a DHCPv6 server
Windows PCs automatically have SLAAC enabled and generate their own IPv6 addresses and can only be seen in ipconfig /all
C:\PC1>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . .: PC1
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . .: Broadcast
IP Routing Enabled. . . . . . . .: No
WINS Proxy Enabled. . . . . . . .: No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : SWITCH.local
Description . . . . . . . . . . .: Intel(R) PRO/1000 MT Desktop Adapter
Physical Address. . . . . . . . .: 08-00-27-5D-06-D6
DHCP Enabled. . . . . . . . . . .: Yes
Autoconfiguration Enabled . . . .: Yes <<<<<<<
IPv6 Address. . . . . . . . . . .: 2001:db8::a00:27ff:fe5d:6d6(Preferred)
Link-local IPv6 Address . . . . .: fe80::a00:27ff:fe5d:6d6%11(Preferred)
IPv4 Address. . . . . . . . . . . : 10.1.1.10(Preferred)
Subnet Mask . . . . . . . . . . .: 255.255.255.192
When a Windows PC and router interface are enabled for SLAAC, they send a Router Solicitation (RS) message to the all-routers multicast address (ff02::2) to ask if any routers are on local link. Router then sends a Router Advertisement (RA) that identifies following:
The network prefix(es) used on that link (e.g., 2001:db8:1:1::/64),
Flags indicating whether to use SLAAC or DHCPv6,
The router’s lifetime as a default gateway,
And other configuration details.
The PC uses the prefix from the RA and combines it with its own interface identifier (often based on MAC address or a random value) to form a full IPv6 global unicast address.
RA’s source address (the router’s link-local address, usually starting with fe80::) is used by the host as the next-hop (default gateway).
In IPv6, all routers must have a link-local address on each interface, and hosts use that address as the default gateway.
To verify an IPv6 address generated by SLAAC on a router interface, use the show ipv6 interface command
However, note that this occurs only if IPv6 unicast routing was not enabled on the router and, as a result, the router is acting as an end device, that is why next hop router’s link local address is listed as default router.
RA are only generated by default only if
1. Router interface is enabled for IPv6
2. IPv6 unicast routing is enabled
3. RAs are not being suppressed on the interface
4. Make sure that the router interface has a /64 prefix by using the show ipv6 interface command, SLAAC works only if the router is using a /64 prefix
In addition, if you have more than one router on a subnet generating RAs, which can happen with redundant gateways, the clients learn about multiple default gateways from the RAs as shown below
C:\PC1># ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . .: 2001:db8:a:a:a00:27ff:fe5d:6d6
Link-local IPv6 Address . . . . .: fe80::a00:27ff:fe5d:6d6%11
IPv4 Address. . . . . . . . . . .: 10.1.1.10
Subnet Mask . . . . . . . . . . .: 255.255.255.192
Default Gateway . . . . . . . . .: fe80::c80b:eff:fe3c:8%11 <<<<<<<
fe80::c80a:eff:fe3c:8%11 <<<<<<<
10.1.1.1
Although a device is able to determine its IPv6 address, prefix, and default gateway using SLAAC, there is not much else the devices can obtain. In a modern network, the devices may also need information such as Network Time Protocol (NTP) server information, domain name information, DNS server information
Use a DHCPv6 server.
Cisco routers and switches can act as DHCPv6 servers, but for their interface to be able to hand out v6 IP addresses using configured pool we must enable interface command “ipv6 dhcp server [pool-name]
If you are troubleshooting an issue where clients are not receiving IPv6 addressing information or where they are receiving wrong IPv6 addressing information from a router or multilayer switch acting as a DHCPv6 server, check the interface and make sure it was associated with the correct pool.
Stateless DHCPv6 is a combination of SLAAC and DHCPv6. With stateless DHCPv6, clients use a router’s RA to automatically determine the IPv6 address, prefix, and default gateway. Included in the RA is a flag that tells the client to get other non-addressing information from a DHCPv6 server, such as the address of a DNS server etc
To accomplish this, ensure that the ipv6 nd other-config-flag interface configuration command is enabled
This ensures that the RA informs the client that it must contact a DHCPv6 server for other information
DHCPv6 has a four-step negotiation process, like IPv4. However, DHCPv6 uses the following messages:
SOLICIT
xxx
ADVERTISE
xxx
REQUEST
xxx
REPLY
xxx