Configuring the DHCPv6 server on a VRF

  • An enabled layer 3 interface.

  • A VRF.

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

  1. Assign the DHCPv6 server to a VRF with the command dhcpv6-server vrf. This switches to the DHCPv6 server configuration context.
  2. If you want the DHCP server to be the sole authority for IP addresses on the VRF, enable authoritative mode with the command authoritative.
  3. Define an address pool for the VRF with the command pool. This switches to the DHCPv6 server pool context. Customize pool settings as follows:
    1. Define the range of addresses in the pool with the command range.
    2. Set the DHCP lease time for addresses in the pool with the command lease.
    3. Define up to four DNS servers with the command dns-server.
    4. Create static bindings for specific addresses in the pool with the command static-bind.
    5. Configure custom DHCP options for the pool with the command option.
    6. Exit the DHCP server pool context with the command exit.
  4. Enable the DHCPv6 server on the VRF with the command enable.
  5. Configure support for persistent external storage of DHCP settings with the command dhcv6p-server external-storage.
  6. View DHCPv6 server configuration settings with the command show dhcpv6-server all-vrfs.


This example creates the following configuration:

  • Configures a DHCPv6 server on VRF primary-vrf.
  • Enables authoritative mode.

  • Defines the pool primary-pool with the following settings:

    • Address range: 2001::1 to 2001::100.

    • Lease time: 12 hours.

    • DNS servers: 2101::14 and 2101::14.

    • Static binding of 2001::101 for client ID 1:0:a0:24:ab:fb:9c.

    • DHCP custom option: 22 with IP address 2101::15.

  • Enables the DHCPv6 server.

switch(config)# dhcpv6-server vrf primary
switch(config-dhcpv6-server)# pool primary-pool
switch(config-dhcpv6-server-pool)# range 2001::1 2001::100 prefix-len 64
switch(config-dhcpv6-server-pool)# lease 12:00:00
switch(config-dhcpv6-server-pool)# dns-server 2101::13 2101::14
switch(config-dhcpv6-server-pool)# static-bind ipv6 2001::10 client-id 1:0:a0:24:ab:fb:9c
switch(config-dhcpv6-server-pool)# option 22 ipv6 2101::15
switch(config-dhcpv6-server-pool)# exit
switch(config-dhcpv6-server)# enable