This document describes how to configure the Wireshark feature for Cisco Catalyst 4500 Series switches.
In order to utilize the Wireshark feature, you must meet these conditions:
The information in this document is based on Cisco Catalyst 4500 Series switches that run Supervisor Engine 7-E.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
The Cisco Catalyst 4500 Series switches that run Supervisor Engine 7-E have a new built-in functionality with Cisco IOS?-XE Versions 3.3(0) / 151.1 or later. This built-in Wireshark feature has the ability to capture packets in a way that replaces the traditional use of Switch Port Analyzer (SPAN) with an attached PC in order to capture packets in a troubleshooting scenario.
This section serves as a quick-start guide in order to begin a capture. The information provided is very general, and you must implement filters and buffer settings as needed in order to limit the excessive capture of packets if you operate in a production network.
Complete these steps in order to configure the Wireshark feature:
4500TEST#show version
Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software
(cat4500e-UNIVERSAL-M), Version 03.03.00.SG RELEASE SOFTWARE (fc3)
<output omitted>
License Information for 'WS-X45-SUP7-E'
License Level: entservices Type: Permanent
Next reboot license Level: entservices
cisco WS-C4507R+E (MPC8572) processor (revision 8)
with 2097152K/20480K bytes of memory.
Processor board ID FOX1512GWG1
MPC8572 CPU at 1.5GHz, Supervisor 7
<output omitted>
4500TEST#show proc cpu history
History information for system:
888844444222222222222222333334444422222222222222255555222222
100
90
80
70
60
50
40
30
20
10 **** ****
0.....5.....1.....1.....2.....2.....3.....3.....4.....4.....5....5
0 5 0 5 0 5 0 5 0 5
CPU% per second (last 60 seconds)
4500TEST#monitor capture MYCAP interface g2/26 both
4500TEST#monitor capture file bootflash:MYCAP.pcap
4500TEST#monitor capture MYCAP match any start
*Sep 13 15:24:32.012: %BUFCAP-6-ENABLE: Capture Point MYCAP enabled.
4500TEST#monitor capture MYCAP start capture-filter "icmp"
*Sep 13 15:25:07.933: %BUFCAP-6-DISABLE_ASYNC:Enter this command in order to manually stop the capture:
Capture Point MYCAP disabled. Reason : Wireshark session ended
4500TEST#monitor capture MYCAP stop
4500TEST#show monitor capture file bootflash:MYCAP.pcap
1 0.000000 44:d3:ca:25:9c:c9 -> 01:00:0c:cc:cc:cc CDP
Device ID: 4500TEST Port ID: GigabitEthernet2/26
2 0.166983 00:19:e7:c1:6a:18 -> 01:80:c2:00:00:00 STP
Conf. Root = 32768/1/00:19:e7:c1:6a:00 Cost = 0 Port = 0x8018
3 0.166983 00:19:e7:c1:6a:18 -> 01:00:0c:cc:cc:cd STP
Conf. Root = 32768/1/00:19:e7:c1:6a:00 Cost = 0 Port = 0x8018
4 1.067989 14.1.98.2 -> 224.0.0.2 HSRP Hello (state Standby)
5 2.173987 00:19:e7:c1:6a:18 -> 01:80:c2:00:00:00 STP
Conf. Root = 32768/1/00:19:e7:c1:6a:00 Cost = 0 Port = 0x8018
4500TEST#show monitor capture file bootflash:MYCAP.pcap display-filter "icmp"
17 4.936999 14.1.98.144 -> 172.18.108.26 ICMP Echo
(ping) request (id=0x0001, seq(be/le)=0/0, ttl=255)
18 4.936999 172.18.108.26 -> 14.1.98.144 ICMP Echo
(ping) reply (id=0x0001, seq(be/le)=0/0, ttl=251)
19 4.938007 14.1.98.144 -> 172.18.108.26 ICMP Echo
(ping) request (id=0x0001, seq(be/le)=1/256, ttl=255)
20 4.938007 172.18.108.26 -> 14.1.98.144 ICMP Echo
(ping) reply (id=0x0001, seq(be/le)=1/256, ttl=251)
21 4.938998 14.1.98.144 -> 172.18.108.26 ICMP Echo
(ping) request (id=0x0001, seq(be/le)=2/512, ttl=255)
22 4.938998 172.18.108.26 -> 14.1.98.144 ICMP Echo
(ping) reply (id=0x0001, seq(be/le)=2/512, ttl=251)
23 4.938998 14.1.98.144 -> 172.18.108.26 ICMP Echo
(ping) request (id=0x0001, seq(be/le)=3/768, ttl=255)
24 4.940005 172.18.108.26 -> 14.1.98.144 ICMP Echo
(ping) reply (id=0x0001, seq(be/le)=3/768, ttl=251)
25 4.942996 14.1.98.144 -> 172.18.108.26 ICMP Echo
(ping) request (id=0x0001, seq(be/le)=4/1024, ttl=255)
26 4.942996 172.18.108.26 -> 14.1.98.144 ICMP Echo
(ping) reply (id=0x0001, seq(be/le)=4/1024, ttl=251)
4500TEST#copy bootflash: ftp://Username:Password@<ftp server address>
4500TEST#copy bootflash: tftp:
4500TEST#no monitor capture MYCAP
4500TEST#show monitor capture MYCAP
<no output>
4500TEST#
By default, the size limit of the capture file is 100 packets, or 60 seconds in a linear file. In order to change the size limit, use the limit option in the monitor capture syntax:
4500TEST#monitor cap MYCAP limit ?
duration Limit total duration of capture in seconds
packet-length Limit the packet length to capture
packets Limit number of packets to capture
The buffer maximum size is 100 MB. This is adjusted, as well as the circular/linear buffer setting, with this command:
4500TEST#monitor cap MYCAP buffer ?
circular circular buffer
size Size of buffer
The built-in Wireshark feature is a very powerful tool if used correctly. It saves time and resources when you troubleshoot a network. However, exercise caution when you utilize the feature, because it might increase CPU utilization in high-traffic situations. Never configure the tool and leave it unattended.
There is currently no verification procedure available for this configuration.
Due to hardware limitations, you might receive out-of-order packets in the capture file. This is due to the separate buffers used for the ingress and egress packet captures. If you have out-of-order packets in your capture, set both of your buffers to ingress. This prevents the packets in egress from processing before the ingress packets when the buffer is processed.
If you see out-of-order packets, it is recommended that you change your configuration from both to in on both interfaces.
Here is the previous command:
4500TEST#monitor capture MYCAP interface g2/26 both
Change the command to these:
4500TEST#monitor capture MYCAP interface g2/26 in
4500TEST#monitor capture MYCAP interface g2/27 in
+------------+
| |
| 4500 |
+------+ | | +------+
| +---------->in out+---------> |
| host | |g2/26 g2/27| | host |
| <----------+out in<---------+ |
+------+ | | +------+
| |
+------------+
Revision | Publish Date | Comments |
---|---|---|
1.0 |
12-Sep-2013 |
Initial Release |