DHCP snooping, DAI and access-port protection

Limit DHCP replies to trusted ports and validate ARP against address bindings.

An unexpected DHCP server can hand clients the wrong addresses or gateway. Limit which switch ports may send server replies, then use those address bindings to validate ARP on the same VLANs.

DHCP snooping

Mark the path to the real DHCP server as trusted. The switch records which client MAC and access port received an address.

ip dhcp snooping
ip dhcp snooping vlan 20,30
no ip dhcp snooping information option
interface Gi1/0/48
 description uplink
 ip dhcp snooping trust
interface range Gi1/0/1-44
 ip dhcp snooping limit rate 15

Dynamic ARP Inspection

DAI checks ARP messages against the binding table. Replies inconsistent with the recorded address and MAC are dropped.

ip arp inspection vlan 20,30
interface Gi1/0/48
 ip arp inspection trust
Static addresses

Printers and cameras with static addresses may have no DHCP entry. Add the appropriate ARP ACL or binding before enabling enforcement on that segment.

Port security

interface range Gi1/0/1-44
 switchport port-security
 switchport port-security maximum 2
 switchport port-security violation restrict
 switchport port-security aging time 60

A limit of two MAC addresses can accommodate a handset and a PC. With restrict, the switch drops traffic from extra MAC addresses without shutting the port down.

Verification

show ip dhcp snooping binding
show ip arp inspection statistics
show port-security interface Gi1/0/5