§ — — Network Administration
Switch security configuration applies practical protections against common Layer 2 attacks. This module focuses on unused ports, port security, VLAN attack mitigation, DHCP snooping, Dynamic ARP Inspection, and STP protections.
By the end of this module, you should be able to:
Unused switch ports should not remain open. A common best practice is to place unused ports into an unused VLAN, disable them, and add a description.
ProReviewer — locked
Drills, code labs, and full solutions.
Port security limits which MAC addresses can use a switch port. It helps reduce MAC flooding and unauthorized device connections.
Port security can learn MAC addresses in several ways:
Port security is configured on access ports, not dynamic trunk ports.
ProReviewer — locked
Drills, code labs, and full solutions.
When a violation occurs, the switch can respond in different ways.
| Mode | Behavior |
|---|---|
| Protect | Drops unauthorized traffic without logging much detail. |
| Restrict | Drops unauthorized traffic and can increment counters/log events. |
| Shutdown | Places the port into an error-disabled state. This is commonly used for strict protection. |
Port security aging removes learned secure MAC addresses after a timer. Aging can be absolute or inactivity-based depending on configuration. This is useful when devices are expected to change, but it should be used carefully in secure environments.
ProReviewer — locked
Drills, code labs, and full solutions.
If a port enters an error-disabled state, investigate the cause before re-enabling it. After correcting the problem, use shutdown and no shutdown on the interface or configure automatic recovery if appropriate.
ProReviewer — locked
Drills, code labs, and full solutions.
To reduce VLAN hopping risk:
ProReviewer — locked
Drills, code labs, and full solutions.
DHCP snooping protects against rogue DHCP servers and helps build a trusted binding table of MAC address, IP address, VLAN, and port information.
Ports are classified as:
DHCP server messages arriving on untrusted ports are dropped.
ProReviewer — locked
Drills, code labs, and full solutions.
Dynamic ARP Inspection checks ARP packets against trusted information, often from the DHCP snooping binding table. It helps stop ARP poisoning by dropping invalid ARP messages on untrusted ports.
DAI requires careful configuration. If bindings are missing for statically addressed hosts, valid ARP traffic may be dropped unless entries or ACLs are configured.
ProReviewer — locked
Drills, code labs, and full solutions.
Use PortFast on access ports connected to end devices, and BPDU Guard to disable an edge port if it receives BPDUs unexpectedly.
ProReviewer — locked
Drills, code labs, and full solutions.
Switch hardening reduces common Layer 2 risks. Disable unused ports, use port security, control trunking, enable DHCP snooping, protect ARP with DAI, and secure edge ports with PortFast and BPDU Guard.
Done with this module? Track it — your progress shows on the subject list.
Up next
WLAN Concepts→←Previous: LAN Security Concepts