Configure a DHCPv6 Server to Statically Allocate IPv6 Addresses
Network Requirements
- Device2 acts as a DHCPv6 server to allocate IPv6 addresses and DNS server IPv6 addresses in a static manner.
- The DHCPv6 server allocates an IP address to PC1 in DUID binding mode, and allocates an IPv6 address to PC2 in the DUID+IAID binding mode.
Network Topology
Figure 6-1 Configuring a DHCPv6 Server to Statically Allocate IPv6 Addresses
Configuration Steps
Step 1: Configure the IPv6 address of the Device2 interface and the DHCPv6 server.
Device2#configure terminal
Device2(config)#interface vlan2
Device2(config-if-vlan2)#ipv6 address 1::3/64
Device2(config-if-vlan2)#ipv6 dhcp server
Device2(config-if-vlan2)#exit
|
Step 2: Configure the static binding address pool and parameters.
#Configure the address pool binding, and adopt the DUID binding mode to distribute IPv6 address for PC1. Adopt the static DUID+IAID binding mode to distribute the IPv6 address for PC2.
Device2(config)#ipv6 dhcp pool binding
Device2(dhcp6-config)#bind 1::11 duid 000200001613303030313761636635646634
Device2(dhcp6-config)#bind 1::12 duid 000200001613636364383166313037616239 iaid 00010071
Device2(dhcp6-config)#dns-server 1::2
Device2(dhcp6-config)#exit
|
Step 3:Check the result.
#Check the association of the server interface and address.
Device2#show ipv6 dhcp server interface vlan2
DHCPv6 server status information:
DHCP server is enabled on interface: vlan2
Vrf : global
DHCPv6 server pool information:
Available directly-connected pool:
Interface IP: 1::1/64
Pool name: binding
Range:
min: 101::
max: 101::ffff:ffff:ffff:ffff
utilization: 0.00%
#Check the static binding of the server.
Device2#show ipv6 dhcp pool binding binding
IPv6 Address Duid Iaid Type Time Left(s)
------------- -------------------------------------- ---------- -------- ------------
1::11 000200001613303030313761636635646634 00000000 Binding NA
1::12 000200001613636364383166313037616239 00010071 Binding NA
#On Device2, query the IPv6 addresses distributed for PC1 and PC2 via the show ipv6 dhcp pool binding lease command.
Device2#show ipv6 dhcp pool mac-binding lease
IPv6 Address Duid Iaid Type Time Left(s)
------------- ------------------------------------ --------- ------- ------------
1::11 000200001613303030313761636635646634 00000000 Lease 2591974
1::12 000200001613636364383166313037616239 00010071 Lease 2591974
On PC1 and PC2, check whether the got IPv6 addresses, and the IPv6 address of the DNS server are correct.