Access Security Guide K/KA/KB.15.15

Figure 270 Show DHCP snooping statistics
Enabling DHCP snooping on VLANs
DHCP snooping on VLANs is disabled by default. To enable DHCP snooping on a VLAN or range
of VLANs enter this command:
HP Switch(config)# dhcp-snooping vlan <vlan-id-range>
You can also use this command in the vlan context, in which case you cannot enter a range of
VLANs for snooping. Below is an example of DHCP snooping enabled on VLAN 4.
Figure 271 DCHP snooping on a VLAN
Using DHCP snooping with option 82
DHCP adds Option 82 (relay information option) to DHCP request packets received on untrusted
ports by default. (See “Configuring DHCP Relay” in the Management and Configuration Guide
for more information on Option 82.)
When DHCP is enabled globally and also enabled on a VLAN, and the switch is acting as a DHCP
relay, the settings for the DHCP relay Option 82 command are ignored when snooping is controlling
Option 82 insertion. Option 82 inserted in this manner allows the association of the client’s lease
with the correct port, even when another device is acting as a DHCP relay or when the server is
on the same subnet as the client.
NOTE: DHCP snooping only overrides the Option 82 settings on a VLAN that has snooping
enabled, not on VLANS without snooping enabled.
If DHCP snooping is enabled on a switch where an edge switch is also using DHCP snooping, it
is desirable to have the packets forwarded so the DHCP bindings are learned. To configure the
policy for DHCP packets from untrusted ports that already have Option 82 present, enter this
command in the global configuration context.
Syntax
[no]dhcp-snooping option 82 [remote-id
<mac|subnet-ip|mgmt-ip>][untrusted-policy<drop|keep|replace>]
Enables DHCP Option 82 insertion in the packet
Using Port Security 371