Understanding and Configuring DHCP Snooping
Understanding and Configuring DHCP Snooping
This chapter describes how to configure Dynamic Host Configuration Protocol (DHCP) snooping on
Catalyst 4000 family switches. It provides guidelines, procedures, and configuration examples.
This chapter consists of the following major sections:
• Overview of DHCP Snooping, page 17-1
• Configuring DHCP Snooping, page 17-2
• Displaying DHCP Snooping Information, page 17-4
Note For complete syntax and usage information for the switch commands used in this chapter, refer to the
Cisco IOS Command Reference for the Catalyst 4000 Family and related publications at
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat4000/12_1_12/index.htm
Note In order to enable DHCP snooping on a VLAN, you must enable DHCP snooping on the switch.
You can configure DHCP snooping for switches and VLANs. When you enable DHCP snooping on a
switch, the interface acts as a Layer 2 bridge, intercepting and safeguarding DHCP messages going to a
Layer 2 VLAN. When you enable DHCP snooping on a VLAN, the switch acts as a Layer 2 bridge
within a VLAN domain.
Note For DHCP server configuration information, refer to “Configuring DHCP” in the Cisco IOS IP and IP
Routing Configuration Guide at the following URL:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/ip_c/ipcprt1/1cddhcp.htm
If you want to change the default configuration values, see the “Enabling DHCP Snooping” section.
Task Command
Step 1 Enable DHCP snooping globally. Switch(config)# ip dhcp snooping
You can configure DHCP snooping for a single VLAN or a range of VLANs. To configure a single
VLAN, enter a single VLAN number. To configure a range of VLANs, enter a beginning and an ending
VLAN number.
This example shows how to enable DHCP snooping on VLANs 10 through 100:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip dhcp snooping
Switch(config)# ip dhcp snooping vlan 10 100
Switch(config)# ip dhcp snooping information option
Switch(config-if)# ip dhcp snooping trust
Switch(config-if)# ip dhcp snooping limit rate 100
Switch(config)# end
Switch# show ip dhcp snooping
DHCP Snooping is configured on the following VLANs:
10 30-40 100 200-220
Insertion of option 82 information is enabled.
Interface Trusted Rate limit (pps)
--------- ------- ----------------
FastEthernet2/1 yes 10
FastEthernet2/2 yes none
FastEthernet3/1 no 20
Switch#
Table 17-2 describes the fields in the show ip dhcp snooping binding command output.
Field Description
Mac Address Client hardware MAC address
IP Address Client IP address assigned from the DHCP server
Lease (seconds) IP address lease time
Type Binding type; statically configured from CLI or dynamically learned
VLAN VLAN number of the client interface
Interface Interface that connects to the DHCP client host