13
# Set the O flag to 1 in RA advertisements to be sent on VLAN-interface 3. Hosts that receive
the RA advertisements will obtain configuration information other than IPv6 address through
DHCPv6.
[SwitchB-Vlan-interface3] ipv6 nd autoconfig other-flag
# Configure VLAN-interface 3 to operate in DHCPv6 server mode.
[SwitchB-Vlan-interface3] ipv6 dhcp select server
[SwitchB-Vlan-interface3] quit
# Create IPv6 address pool 1.
[SwitchB] ipv6 dhcp pool 1
[SwitchB-dhcp6-pool-1] network 4001::/64
[SwitchB-dhcp6-pool-1] dns-server 1::1
[SwitchB-dhcp6-pool-1] quit
# Configure an IPv6 static route destined for 2001::/64 and the next hop of the route is 3001::1.
[SwitchB] ipv6 route-static 2001:: 64 3001::1
# Save the configuration.
[SwitchB] save force
3.
Configure Host A.
Configure IPv6 on Host A, and then enable Host A to use DHCPv6 for IPv6 address acquisition.
4.
Configure Host B.
Configure IPv6 on Host B, and then enable Host B to use DHCPv6 for IPv6 address acquisition.
Verifying the configuration
# View the IPv6 addresses assigned by the DHCPv6 server on Switch A.
[SwitchA] display ipv6 dhcp server ip-in-use
Pool: 1
IPv6 address Type Lease expiration
2001::2 Auto(C) Sep 30 11:45:07 2021
# View information about the neighbors of GigabitEthernet 1/0/2 on Switch A.
[SwitchA] display ipv6 neighbors interface gigabitethernet 1/0/2
Type: S-Static D-Dynamic O-Openflow R-Rule IS-Invalid static
IPv6 address MAC address VLAN/VSI Interface State T Aging
2001::2 b025-0b54-0106 -- GE1/0/2 REACH D 29
FE80::B225:BFF:FE54:106 b025-0b54-0106 -- GE1/0/2 REACH D 18
The output shows that Host A has obtained IPv6 global unicast address 2001::2.
# View the IPv6 addresses assigned by the DHCPv6 server on Switch B.
[SwitchB] display ipv6 dhcp server ip-in-use
Pool: 1
IPv6 address Type Lease expiration
4001::2 Auto(C) Sep 30 14:05:49 2021
# View information about the neighbors of GigabitEthernet 1/0/2 on Switch B.
[SwitchB] display ipv6 neighbors interface gigabitethernet 1/0/2
Type: S-Static D-Dynamic O-Openflow R-Rule IS-Invalid static
IPv6 address MAC address VLAN/VSI Interface State T Aging
4001::2 b043-5415-0406 -- GE1/0/2 REACH D 3
FE80::B243:54FF:FE15:406 b043-5415-0406 -- GE1/0/2 REACH D 44