Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityIntermediate

SPAN, RSPAN and RMON: capturing and measuring switch traffic

In short: A switch only sends a frame to the port that needs it, so a laptop running Wireshark sees little. SPAN copies traffic from chosen ports or VLANs to an analyser port. RSPAN carries the copies to another switch in a special VLAN, and ERSPAN sends them over IP in GRE. RMON keeps traffic statistics and raises alarms when thresholds are crossed.

Why you need port mirroring

A switch forwards each unicast frame only out of the port where the destination lives. If you plug a laptop with Wireshark into a spare port, you will see your own traffic and broadcasts, but not the conversation between a user and a server. SPAN (Switched Port Analyzer), often called port mirroring, tells the switch to send a copy of chosen traffic to an analyser port. Security tools such as intrusion detection sensors and network performance monitors are fed the same way.

Local SPAN and RSPANLocal SPANSource and analyser on one switchCopies chosen ports or VLANsDestination port stops normal forwardingRSPANSource and analyser on different switchesCopies travel in a special RSPAN VLANRSPAN VLAN must be on every trunk in thepath
Figure 1. Both send a copy of traffic to an analyser. RSPAN carries the copy across trunks to another switch.

Local SPAN

monitor session 1 source interface GigabitEthernet1/0/10 both
monitor session 1 source vlan 20 rx
monitor session 1 destination interface GigabitEthernet1/0/24
show monitor session 1

Sources can be ports, EtherChannels or whole VLANs, in the receive (rx), transmit (tx) or both directions. The destination port stops behaving as a normal port and only sends the copies. Be aware of oversubscription: mirroring several busy 1 Gb/s ports in both directions to one 1 Gb/s destination drops copies, and the analyser misses packets. Mirror only what you need.

RSPAN and ERSPAN

When the analyser is on another switch, Remote SPAN carries the copies over a dedicated VLAN that must be allowed on every trunk between the two switches.

! on both switches and any switch in between
vlan 950
 name RSPAN
 remote-span
! source switch
monitor session 1 source interface GigabitEthernet1/0/10 both
monitor session 1 destination remote vlan 950
! destination switch
monitor session 1 source remote vlan 950
monitor session 1 destination interface GigabitEthernet1/0/24

MAC learning is turned off in the RSPAN VLAN, so the copies are simply flooded along it. ERSPAN (encapsulated remote SPAN) wraps the copies in GRE and sends them across a routed network, for example from a branch switch to a capture appliance in the data centre. Remember that mirrored traffic can contain passwords and personal data: restrict who can configure sessions and protect the analyser.

RMON: statistics and alarms built into the switch

RMON (Remote Monitoring) is a set of SNMP MIB groups that let the device itself collect statistics and watch thresholds, rather than relying on a management station to poll constantly. On Cisco switches the most used parts are:

  • Statistics: per-interface counts of packets, broadcasts, multicasts, errors and frame sizes.
  • History: the same counts sampled over intervals, so you can see a busy period afterwards.
  • Alarms and events: an alarm watches any SNMP counter and, when it rises above or falls below a threshold, triggers an event that logs a message or sends an SNMP trap.
interface GigabitEthernet1/0/48
 rmon collection stats 1 owner netops
rmon event 1 log trap NETOPS description Uplink-errors owner netops
show rmon statistics
show rmon alarms

RMON alarms suit small sites without a full monitoring system. Larger networks usually rely on SNMP polling, streaming telemetry and flow records instead (see network monitoring).

Real-world example: slow card payments in a supermarket

A supermarket's card terminals took up to 20 seconds to approve payments. The network engineer set up a local SPAN session copying the payment gateway's switch port to a laptop running Wireshark. The capture showed repeated TCP retransmissions and an MTU problem on the VPN to the bank. To keep watching after the fix, the engineer configured RMON statistics on the uplink with an event that sends a trap if errors rise, and removed the SPAN session so the laptop port went back to normal use. For reading captures, see the Wireshark lab.

Practice

Why does a laptop on an ordinary switch port not see traffic between two other hosts?
The switch only forwards unicast frames to the port where the destination lives; SPAN is needed to copy other traffic.
What must be true of the RSPAN VLAN on the trunks between source and destination switches?
It must exist on every switch and be allowed on every trunk in the path.
What do RMON alarms and events do?
An alarm watches a counter against thresholds; when crossed, it triggers an event that logs a message or sends an SNMP trap.

Key takeaways

  • SPAN copies traffic from ports or VLANs to an analyser port on the same switch.
  • RSPAN carries copies across trunks in a dedicated VLAN; ERSPAN sends them over IP in GRE.
  • Avoid oversubscribing the destination port and protect captured data.
  • RMON collects statistics and history and can raise alarms on thresholds.
  • Remove SPAN sessions when you finish so ports return to normal use.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.