Hands-On Lab: Configuring SPAN (Switched Port Analyzer)

This hands-on lab configures a local SPAN session that mirrors traffic from a specific switch port to a monitoring port, allowing a packet capture tool to inspect traffic without being directly inline with it.

SPAN Session ConfigurationTraffic MirroringMonitor Port

~3 min read · Updated Sep 23, 2026

Lab Objective

Configure a local SPAN session on a switch to mirror traffic from a source port to a destination monitoring port, and verify a packet capture tool connected to the destination port receives a copy of the source port's traffic.

Lab Purpose

Troubleshooting and security monitoring frequently require inspecting the actual traffic passing through a specific port without inserting a separate inline device — SPAN solves this by copying that traffic to a second port where a laptop running packet capture software can observe it non-disruptively.

Lab Topology

Switch1
  Gi1/0/1 ---- PC-A (traffic to monitor)
  Gi1/0/10 ---- Capture-Laptop (running
                Wireshark or similar)

Task 1: Configure a SPAN Session

Configure a SPAN session with Gi1/0/1 as the source and Gi1/0/10 as the destination.

Task 2: Verify the SPAN Session Configuration

Confirm the session shows the correct source and destination ports.

Task 3: Generate Traffic and Capture It

Generate traffic to and from PC-A, and confirm the capture laptop sees copies of that traffic.

Task 4: Verify the Destination Port Cannot Send Normal Traffic

Confirm the destination port behaves as a dedicated monitoring port rather than a normal access port.

Solution and Verification

Switch1(config)# monitor session 1 source interface gigabitethernet1/0/1
Switch1(config)# monitor session 1 destination interface gigabitethernet1/0/10

-- By default, this monitors both inbound
-- and outbound traffic on the source port
-- (equivalent to "both", the default direction)

Switch1# show monitor session 1

Session 1
---------
Type                   : Local Session
Source Ports           :
    Both               : Gi1/0/1
Destination Ports      : Gi1/0/10
    Encapsulation       : Native
    Ingress             : Disabled

PC-A> ping 192.168.1.1

-- Meanwhile, on Capture-Laptop running
-- Wireshark on Gi1/0/10:

Wireshark capture shows:
  ICMP Echo Request from PC-A's MAC/IP
  ICMP Echo Reply destined to PC-A's MAC/IP
-- The capture laptop, despite not being the
-- actual destination of this traffic, sees
-- a complete copy of everything traversing
-- Gi1/0/1

-- Ingress traffic sourced FROM the capture
-- laptop itself is disabled by default on
-- a destination port, as shown in the
-- "Ingress: Disabled" line above -- this
-- prevents the monitoring port from
-- accidentally injecting traffic back into
-- the network it is observing

Key Takeaway

A SPAN destination port is fundamentally different from a normal access port: it receives a copy of specified traffic for passive observation, and by default cannot send its own traffic back into the network, since its entire purpose is one-way visibility rather than normal bidirectional connectivity.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring UDLD

This hands-on lab configures UDLD in aggressive mode on a fiber link between two switches, simulating a unidirectional fiber failure and verifying UDLD detects the mismatch and shuts down the affected port before a Layer 2 loop can form.

Continue

Hands-On Lab: Configuring Loop Guard

This hands-on lab configures Loop Guard on a switch's non-designated ports to prevent a unidirectional link failure from causing a Layer 2 loop, simulating a one-way BPDU loss and verifying the affected port enters a loop-inconsistent blocking state rather than incorrectly transitioning to forwarding.

Continue

Hands-On Lab: Configuring BPDU Guard and BPDU Filter

This hands-on lab configures BPDU Guard globally for PortFast-enabled ports and demonstrates the distinct, riskier behavior of BPDU Filter, comparing how each responds when a switch is connected to an access port that should only ever see end-user devices.

Continue

Hands-On Lab: Configuring Root Guard

This hands-on lab configures Root Guard on switch ports facing access-layer switches to prevent an unauthorized or misconfigured switch from becoming the Spanning Tree root, verifying the port enters a root-inconsistent state when a superior BPDU is received.

Continue

Hands-On Lab: Comprehensive Troubleshooting Challenge

This hands-on lab presents a multi-layer connectivity failure across VLANs, trunking, routing, and NAT simultaneously, requiring systematic bottom-up troubleshooting to identify and correct three independent faults before full connectivity is restored.

Continue

Hands-On Lab: Configuring Enhanced Object Tracking with HSRP

This hands-on lab configures IP SLA-based object tracking on an HSRP-enabled router, automatically lowering its priority when its WAN uplink fails, forcing failover to the standby router without requiring a full interface shutdown.

Continue