Switches
Port mirroring (SPAN)
A switch copying every frame of some ports out of another port, where a sensor or capture box listens.
The problem
A capture box on its own switch port sees only its own traffic, not the conversations it should watch.
- Carol's machine will be the capture box; the conversation to watch is alice's, on the port
alice. - officeSwitch is told to copy every frame in and out of
aliceto the portcarol(on Linux, atcmirror rule). - Alice pings bob. The switch forwards each frame to bob as usual, and sends a copy to carol.
- Carol records frames that are not addressed to her, without being in their path.
What you'd see
$ tcpdump -e -nn -i eth0 icmp
18:49:19.765343 b6:a0:12:30:a8:0b > 06:c7:51:36:4e:b8, ethertype IPv4 (0x0800), length 98: 10.0.1.10 > 10.0.1.11: ICMP echo request, id 81, seq 1, length 64
18:49:19.765372 06:c7:51:36:4e:b8 > b6:a0:12:30:a8:0b, ethertype IPv4 (0x0800), length 98: 10.0.1.11 > 10.0.1.10: ICMP echo reply, id 81, seq 1, length 64
- Recorded on carol, while the switch knew both alice and bob, so nothing was flooded.
10.0.1.10 > 10.0.1.11and back: alice and bob's ping, seen by carol only because the port is mirrored.- Bob still got every frame: a mirror copies, it never diverts.
Guess first
Carol's capture box stops. Does alice's ping to bob break?
Show answer
No. The originals still go from alice to bob; only the copies are lost. A mirror can neither slow nor break what it watches.
In short
Port mirroring (SPAN on Cisco) makes a switch send a copy of every frame on chosen source ports out of one destination port, and still forwards the original. An IDS or capture box there sees conversations not addressed to it, and cannot slow or break them. A network TAP does the same in hardware on one cable. If the sources carry more than the destination port can, copies are lost.
Read next
- Switch Joins devices into one network, forwarding each frame toward the port its destination MAC was seen on.
- Network intrusion detection (NIDS/NIPS) A sensor on the wire that flags (IDS) or blocks inline (IPS) traffic matching attack signatures or anomalies.
- Packet forensics Reconstructing an incident after the fact from a saved packet capture of the traffic.
- Packet capture A copy of the packets crossing a network card, read live or saved to a file.