Use this when a switch MAC table is flooded so traffic leaks to all ports.
MAC Flooding
MAC flooding fills a switch's MAC address table with fake addresses so it floods traffic out of all ports, letting an attacker sniff it. Port security limiting MACs per port prevents it.
1. MAC flooding fills the switch CAM table to force flooding.
2. Port security limits MACs per port.
3. Violation action restrict/shutdown.
4. Monitor MAC table size.
5. Alert on violations.
many fake MACs → CAM full → flooding (blocked by port security)
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show mac address-table countVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
show mac address-table count
show port-security interface Gi1/0/5
show port-security address
A sudden jump to the CAM table limit and flooding (unicast seen on all ports) indicate an attack (e.g. macof). Port security with maximum 2 and violation restrict stops it.
Step 2 Common mistakes Narrow the fault
- No port security on access ports.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- A full CAM table makes the switch flood frames.
- Port security limits MACs per port.
- Monitor MAC table size.
show port-security— violationsshow mac address-table count— table usage- Storm control settings — mitigation
ReferenceHow it works1 section · depth on demand
How it works
The attacker floods the switch with frames from thousands of random source MACs. When the CAM table is full, the switch floods unknown unicast to all ports in the VLAN, letting the attacker see traffic meant for others. Tools such as macof generate ~155,000 MACs per minute.
ReferenceConfiguration & state1 section · depth on demand
Configuration
interface GigabitEthernet1/0/10
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security violation restrict
Documented example, not captured output. show port-security interface <if> shows the count and violations.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Common Attacks → MAC Flooding. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://attack.mitre.org/techniques/enterprise/ · confidence 94%