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 دقیقه مطالعه · آخرین به‌روزرسانی ۱ مهر ۱۴۰۵

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.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه