A Few Easy Steps: Cisco Switch, Setup Span Port (Port Monitoring for Packet Capture)

In this session of A Few Easy Steps, we will configure a Span Port on a Cisco Switch.  In General this will work on any Cisco Switch. In this session we will be including the setup and verification commands, following the full config sample we will also provide the commands to remove the Span/Monitoring Port. We are adding these steps because often old Span ports cause havoc with new span sessions and leaving Span sessions running is taxing on switchCPU and Memory and should not be done unless required.

Session Prerequisites:

  • You have terminal or console access to your Cisco device.

Session Assumptions:

  • Source Port is Interface FastEthernet 0/1
  • Destination Port is Interface FastEthernet 0/21
  • Monitor Session is 1
  • We will be monitoring both RX and TX traffic

Our goals of this session are:

  • Configure Source Interface
  • Configure Source Interface
  • Verify Span Settings
  • Disable Span Session

Configure Source Interface

!
conf t
!
monitor session 1 source interface fastEthernet 0/1 both
!
end
!
copy running-config startup-config

Configure Destination Interface Interface

!
conf t
!
monitor session 1 destination interface fastEthernet 0/21 
!
end
!
copy running-config startup-config

Verify Span Settings

sh monitor session 1

Entire Session:

!
conf t
!
monitor session 1 source interface fastEthernet 0/1 both
!
monitor session 1 destination interface fastEthernet 0/21 
!
end
!
copy running-config startup-config
!
sh monitor session 1

Disable Span Session

!
conf t
!
no monitor session 1
!
end
!
copy running-config startup-config

Find out more about Span Ports on a Cisco Switch here.

or

Check out this Search at NetworkSuperSearch.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.