Port Mirroring and SPAN Ports
What you'll learn: How network administrators use legitimate switch features to copy traffic for authorized monitoring and troubleshooting.
In the previous lesson, you learned that MAC flooding is an attacker technique to break out of switch isolation. But what if you're a legitimate administrator who needs to monitor traffic for troubleshooting or security analysis? That's where port mirroring comes in.
What Is Port Mirroring?
Port mirroring is a built-in switch feature that copies all traffic from one or more ports and sends those copies to a designated monitoring port. This lets you connect a monitoring device (running Wireshark, an IDS, or other analysis tools) without disrupting the network.
Think of it like this: Imagine you're watching cars drive down a highway. Port mirroring is like having traffic cameras at specific exits that send a live feed to a monitoring station—the original traffic keeps flowing normally, but you get a duplicate stream to observe.
SPAN (Switched Port Analyzer)
SPAN is Cisco's proprietary name for port mirroring. The terminology varies by vendor (some call it "port monitoring"), but the concept is identical:
- Source ports/VLANs: The ports or VLANs you want to monitor
- Destination port: Where the mirrored traffic is sent
- Direction: You can mirror ingress (incoming), egress (outgoing), or both
Why This Matters for Security
Unlike MAC flooding (an attack), port mirroring is the proper way to capture traffic on switched networks. Security teams use it to:
- Feed traffic to intrusion detection systems
- Perform authorized packet analysis for investigations
- Troubleshoot application or connectivity issues
- Analyze traffic patterns without network disruption
Key Takeaway: Port mirroring (SPAN) is the legitimate, administrator-configured method for capturing switch traffic, providing authorized visibility without breaking the network or flooding the switch.