DHCP Snooping Configuration
Last updated
Last updated
SW1(config)#ip dhcp snooping
# This command will enable "DHCP Snooping" globally on our switch
SW1(config)#ip dhcp snooping vlan 10,20
# This command will enable DHCP snooping to be enabled for the specified VLANs.
SW1(config)#interface eth0/2
# This command will bring us into the sub-configuration mode for the interface we want to configure
SW1(config-if)#ip dhcp snooping trusted
# This command will specify the interfaces that can receive incoming DHCP server messages. *** IMPORTANT NOTE *** The trusted interfaces will add DHCP option 82 to onto the DHCPDiscover message. This option will cause DHCP relay's to drop the DHCP packet.
SW2#debug ip dhcp snooping packets
# This debug command will show us the steps of the DHCP snooping process.
SW2(config)#no ip dhcp snooping information option
# This command will stop the DHCP option 82 from being inserted onto the DHCP packet.
R1(config)#ip dhcp relay information trust-all
# By default, if the gateway address is set to all zeros in the DHCP packet and the relay agent information option is already present in the packet, the DHCP relay agent will discard the packet. Use the ip dhcp relay information trust-all command to override this behavior and accept the packets.