Course contentsShow
← Security
Lesson 409 of 3,0529. Network Security - Traffic AnalysisFree lesson

Switch Port Security and Defenses

Study switch security features like port security, DHCP snooping, and dynamic ARP inspection to prevent sniffing attacks.

Switch Port Security and Defenses

What you'll learn: How switches defend themselves against the sniffing and spoofing attacks you just studied.

Now that you've explored attacks on switched networks—MAC flooding, ARP poisoning, rogue DHCP—it's time to learn the countermeasures network administrators deploy to stop them.

What Is Switch Port Security?

Port security is a switch feature that restricts which MAC addresses can send traffic through a specific physical port. Think of it as a bouncer at a nightclub checking IDs: only devices on the guest list get in. This prevents MAC flooding and spoofing by limiting the number of MAC addresses per port (often just one or two).

When an unauthorized MAC address appears, the switch can:

  • Drop the frames silently
  • Disable the port entirely (shutdown mode)
  • Log the violation and alert administrators

DHCP Snooping

Remember how attackers use rogue DHCP servers to redirect traffic? DHCP snooping creates a trust boundary: only designated "trusted" ports (where legitimate DHCP servers sit) can offer IP addresses. Untrusted ports—like where user devices connect—cannot send DHCP server responses. The switch builds a binding table (MAC → IP → port) and blocks spoofed DHCP replies.

Dynamic ARP Inspection (DAI)

Dynamic ARP Inspection is the antidote to ARP poisoning. It validates every ARP packet against the DHCP snooping binding table. If someone claims "I'm the gateway at IP 192.168.1.1" but the switch knows that IP belongs to a different MAC address, DAI drops the malicious ARP reply.

Key Takeaway:
Port security, DHCP snooping, and Dynamic ARP Inspection form a layered defense: they lock down MAC addresses, validate DHCP assignments, and verify ARP claims to prevent sniffing and MITM attacks on switched networks.