Configuring the DHCPv6 server on a VRF

Prerequisites
  • An enabled layer 3 interface.

  • A VRF.

  • An external storage device installed and configured (optional).

Procedure
  1. Assign the DHCPv6 server to a VRF with the commanddhcpv6-server vrf。这个开关DHCPv6服务器配置context.
  2. If you want the DHCP server to be the sole authority for IP addresses on the VRF, enable authoritative mode with the commandauthoritative
  3. Define an address pool for the VRF with the commandpool。This switches to the DHCPv6 server pool context. Customize pool settings as follows:
    1. Define the range of addresses in the pool with the commandrange
    2. Set the DHCP lease time for addresses in the pool with the commandlease
    3. Define up to four DNS servers with the commanddns-server
    4. Create static bindings for specific addresses in the pool with the commandstatic-bind
    5. Configure custom DHCP options for the pool with the commandoption
    6. Exit the DHCP server pool context with the commandexit
  4. Enable the DHCPv6 server on the VRF with the commandenable
  5. Configure support for persistent external storage of DHCP settings with the commanddhcv6p-server external-storage
  6. View DHCPv6 server configuration settings with the commandshow 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