ip dhcp snooping vlan

Enables DHCP snooping on a VLAN or a range of VLANs.
Syntax
ip dhcp snooping vlan vlan-id [ to vlan-id … ]
no ip dhcp snooping vlan vlan-id [ to vlan-id … ]
Command Default

DHCP snooping is disabled by default.

Parameters
vlan-id
Specifies the ID of a configured client or DHCP server VLAN.
to vlan-id
Specifies a range of VLANs.
Modes

Global configuration mode

Usage Guidelines

When DHCP snooping is enabled on a VLAN, DHCP packets are inspected. DHCP snooping must be enabled on the client and the DHCP server VLANs.

DHCP Snooping can be configured for a VLAN or VLANS even before the VLAN or VLANS are created. VLANs and DHCP Snooping configurations on the VLANS are not automatically deleted when the VLAN is deleted.

When configuring DHCP 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.

DHCP snooping can be configured on a maximum of 511 VLANs.

DHCP snooping cannot be enabled for a VLAN that is a member of a VLAN group.

The no form of the command disables DHCP snooping on the specified VLAN or a range of VLANs.

Examples

The following example enables DHCP snooping on VLAN 2.

device# configure terminal
device(config)# ip dhcp snooping vlan 2

The following example configures VLANs 100 through 150, VLAN 160, and VLANs 170 through 200 and enables DHCP snooping on all of the configured VLANs.

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)# ip dhcp snooping vlan 100 to 150 160 170 to 200
History
Release version Command history
08.0.80 The to keyword was added to enable DHCP snooping on a range of VLANs by using a single command.
08.0.95 This command was modified to limit DHCP snooping configurations to a maximum of 511 VLANs.