Most IPv6 configuration and verification commands in the Cisco IOS are similar to their IPv4 counterparts. In many cases the only difference is the use of ipv6 in place of ip within the commands.
The interface command to configure an IPv6 global unicast address on an interface is ipv6 address ipv6-address/prefix-length.
Notice that there is not a space between ipv6-address and prefix-length.
The example configuration will use the topology shown in Figure 1 and these IPv6 subnets:
- 2001:0DB8:ACAD:0001:/64 (or 2001:DB8:ACAD:1::/64)
- 2001:0DB8:ACAD:0002:/64 (or 2001:DB8:ACAD:2::/64)
- 2001:0DB8:ACAD:0003:/64 (or 2001:DB8:ACAD:3::/64)
As shown in Figure 2, the commands required to configure the IPv6 global unicast address on the GigabitEthernet 0/0 interface of R1 would be:
Router(config)#interface GigabitEthernet 0/0
Router(config-if)#ipv6 address 2001:db8:acad:1::1/64
Manually configuring the IPv6 address on a host is similar to configuring an IPv4 address.
As shown in Figure 3, the default gateway address configured for PC1 is 2001:DB8:ACAD:1::1, the global unicast address of the R1 GigabitEthernet interface on the same network.
Use the Syntax Checker in Figure 4 to configure the IPv6 global unicast address.
Just as with IPv4, configuring static addresses on clients does not scale to larger environments. For this reason, most network administrators in an IPv6 network will enable dynamic assignment of IPv6 addresses.
There are two ways in which a device can obtain an IPv6 global unicast address automatically:
- Stateless Address Autoconfiguration (SLAAC)