191
DHCPv6 server configuration examples
Example: Configuring dynamic IPv6 prefix assignment
Network configuration
As shown in Figure 72, the switch acts as a DHCPv6 server to assign an IPv6 prefix, a DNS server
address, a domain name, a SIP server address, and a SIP server name to each DHCPv6 client.
The switch assigns prefix 2001:0410:0201::/48 to the client whose DUID is
00030001CA0006A40000, and assigns prefixes in the range of 2001:0410::/48 to
2001:0410:FFFF::/48 (excluding 2001:0410:0201::/48) to other clients. The DNS server address is
2::2:3. The DHCPv6 clients reside in the domain aaa.com. The SIP server address is 2:2::4, and the
SIP server name is bbb.com.
Figure 72 Network diagram
Procedure
# Specify an IPv6 address for VLAN-interface 2.
<Switch> system-view
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ipv6 address 1::1/64
# Disable RA message suppression on VLAN-interface 2.
[Switch-Vlan-interface2] undo ipv6 nd ra halt
# Set the M flag to 1 in RA advertisements to be sent on VLAN-interface 2. Hosts that receive the RA
advertisements will obtain IPv6 addresses through DHCPv6.
[Switch-Vlan-interface2] ipv6 nd autoconfig managed-address-flag
# Set the O flag to 1 in RA advertisements to be sent on VLAN-interface 2. Hosts that receive the RA
advertisements will obtain information other than IPv6 address through DHCPv6.
[Switch-Vlan-interface2] ipv6 nd autoconfig other-flag
[Switch-Vlan-interface2] quit
# Create prefix pool 1, and specify the prefix 2001:0410::/32 with the assigned prefix length 48.
[Switch] ipv6 dhcp prefix-pool 1 prefix 2001:0410::/32 assign-len 48
# Create address pool 1.
[Switch] ipv6 dhcp pool 1
# In address pool 1, configure subnet 1::/64 where VLAN interface-2 resides.
[Switch-dhcp6-pool-1] network 1::/64