Configuring DHCPv6 Snooping on Multiple VLANs

DHCPv6 snooping can be enabled on multiple VLANs using one command. The following task configures multiple VLANs and enables DHCPv6 snooping on most of the configured VLANs using a single command.
Note: DHCPv6 snooping can be configured on a maximum number of 511 VLANs at one time.
Note: DHCPv6 Snooping can be configured for a VLAN or VLANS even before the VLAN or VLANS are created. VLANs and DHCPv6 Snooping configurations on the VLANS are not automatically deleted when the VLAN is deleted.
Note: When configuring DHCPv6 snooping on a range of VLANs or multi-VLAN, there cannot not be any VLAN in the range that is a member of a VLAN group or any reserved VLAN. Otherwise, configurations fail on the entire range.
  1. Enter global configuration mode.
    device# configure terminal
  2. Configure the port-based VLANs.
    device(config)# vlan 100 to 150
  3. Add port Ethernet 1/1/12 as a tagged port.
    device(config-mvlan-100-150)# tagged ethernet 1/1/12
  4. Use the exit command to return to global configuration mode.
    device(config-mvlan-100-150)# exit
  5. Configure more port-based VLANs.
    device(config)# vlan 151 to 200
  6. Add port Ethernet 1/1/12 as a tagged port.
    device(config-mvlan-151-200)# tagged ethernet 1/1/12
  7. Use the exit command to return to global configuration mode.
    device(config-mvlan-151-200)# exit
  8. Use the ipv6 dhcp6 snooping command with the to keyword, specifying a VLAN range, to enable DHCPv6 snooping on multiple VLANs.
    device(config)# ipv6 dhcp6 snooping vlan 100 to 150 160 170 to 200
  9. Change the trust setting of the ports that are connected to the DHCP server to trusted at the interface configuration level.
    1. To enable trust on a port, enter interface configuration mode.
      device(config)# interface ethernet 1/1/12
    2. Enable trust on the port.
      device(config-if-e10000-1/1/12)# dhcp6 snooping trust
The following example configures VLANs 100 through 200, and enables DHCPv6 snooping on VLANs 100 through 150, VLAN 160, and VLANs 170 through 200.
device# configure terminal
device(config)# vlan 100 to 150
device(config-mvlan-100-150)# tagged ethernet 1/1/12
device(config-mvlan-100-150)# exit
device(config)# vlan 151 to 200
device(config-mvlan-151-200)# tagged ethernet 1/1/12
device(config-mvlan-100-150)# exit
device(config)# ipv6 dhcp6 snooping vlan 100 to 150 160 170 to 200
device(config)# interface ethernet 1/1/12
device(config-if-e10000-1/1/12)# dhcp6 snooping trust