Configuring the DHCPv6 server on a VRF
Prerequisites
An enabled layer 3 interface.
A VRF.
An external storage device installed and configured (optional).
Procedure
- Assign the DHCPv6 server to a VRF with the command
dhcpv6-server vrf
。这个开关DHCPv6服务器配置context. - If you want the DHCP server to be the sole authority for IP addresses on the VRF, enable authoritative mode with the command
。authoritative
- Define an address pool for the VRF with the command
pool
。This switches to the DHCPv6 server pool context. Customize pool settings as follows:- Define the range of addresses in the pool with the command
range
。 - Set the DHCP lease time for addresses in the pool with the command
lease
。 - Define up to four DNS servers with the command
dns-server
。 - Create static bindings for specific addresses in the pool with the command
static-bind
。 - Configure custom DHCP options for the pool with the command
option
。 - Exit the DHCP server pool context with the command
exit
。
- Define the range of addresses in the pool with the command
- Enable the DHCPv6 server on the VRF with the command
enable
。 - Configure support for persistent external storage of DHCP settings with the command
dhcv6p-server external-storage
。 - View DHCPv6 server configuration settings with the command
show dhcpv6-server all-vrfs
。
Example
This example creates the following configuration:
- Configures a DHCPv6 server on VRFprimary-vrf。
Enables authoritative mode.
Defines the poolprimary-poolwith the following settings:
Address range:2001::1to2001::100。
Lease time: 12 hours.
DNS servers:2101::14and2101::14。
Static binding of2001::101for client ID1:0:a0:24:ab:fb:9c。
DHCP custom option:22with IP address2101::15。
Enables the DHCPv6 server.
switch(config)#dhcpv6-server vrf primaryswitch(config-dhcpv6-server)#pool primary-poolswitch(config-dhcpv6-server-pool)#range 2001::1 2001::100 prefix-len 64switch(config-dhcpv6-server-pool)#lease 12:00:00switch(config-dhcpv6-server-pool)#dns-server 2101::13 2101::14switch(config-dhcpv6-server-pool)#static-bind ipv6 2001::10 client-id 1:0:a0:24:ab:fb:9cswitch(config-dhcpv6-server-pool)#option 22 ipv6 2101::15switch(config-dhcpv6-server-pool)#exitswitch(config-dhcpv6-server)#enable