This document describes the Embedded Packet Capture (EPC) feature in Cisco IOS® software.
There are no specific requirements for this document.
The information in this document is based on these software and hardware versions:
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, ensure that you understand the potential impact of any command.
When enabled, the router captures the sent and received packets. The packets are stored within a buffer in DRAM and do not persist through a reload. Once the data is captured, it can be examined in a summary or detailed view on the router.
In addition, the data can be exported as a packet capture (PCAP) file to allow for further examination. The tool is configured in exec mode and is considered a temporary assistance tool. As a result, the tool configuration is not stored within the router configuration and does not remain in place after a system reload.
The Packet Capture Config Generator and Analyzer tool is available for Cisco Customers to aid in the configuration, capture, and extraction of packet captures.
monitor capture buffer BUF size 2048 max-size 1518 linear
ip access-list extended BUF-FILTER
permit ip host 192.168.1.1 host 172.16.1.1
permit ip host 172.16.1.1 host 192.168.1.1
monitor capture buffer BUF filter access-list BUF-FILTER
monitor capture point ip cef POINT fastEthernet 0 both
monitor capture point associate POINT BUF
monitor capture point start POINT
monitor capture point stop POINT
show monitor capture buffer BUF dump
Note: This output only shows the hex dump of the packets captures. In order to see them in human readable there are two ways.
Export the buffer from the router for further analysis:monitor capture buffer BUF export tftp://10.1.1.1/BUF.pcapThe previous method is not always practical as it required T/FTP access to the router. In such situations, take a copy of the hex dump and use any online hex-pcap convertor in order to view the files.
no monitor capture point ip cef POINT fastEthernet 0 both
no monitor capture buffer BUF
The IP Traffic Export is a diferent method to export IP packets that are received on multiple, simultaneous WAN or LAN interfaces.
1. In configuration mode define an IP traffic export profile.
Device(config)# ip traffic-export profile mypcap mode capture
2. Configure bidirectional traffic in the profile.
Device(config-rite)# bidirectional
3. Exit
4. Specify the interface for exported traffic.
Device(config-if)# interface GigabitEthernet 0/1
5. Enable IP traffic export on the interface.
Device(config-if)# ip traffic-export apply mypcap size 10000000
6. Exit
7. Start the capture. The capture is now active. Allow collection of the necessary data.
Device# traffic-export interface GigabitEthernet 0/1 start
8. Stop the capture.
Device# traffic-export interface GigabitEthernet 0/1 stop
9. Export the capture to an external TFTP server.
Device# traffic-export interface GigabitEthernet 0/1 copy tftp://<TFTP_Address>/mypcap.pcap
10. Once the necessary data has been collected, delete the profile.
Device(config)# no ip traffic-export profile mypcap
IP Traffic Export has these disadvantages in comparison with EPC method:
The Embedded Packet Capture feature was introduced in Cisco IOS XE Release 3.7 - 15.2(4)S. The configuration of the capture is different than Cisco IOS because it adds more features.
monitor capture CAP interface GigabitEthernet0/0/1 both
monitor capture CAP match ipv4 protocol tcp any any limit pps 1000000
monitor capture CAP start
monitor capture CAP stop
show monitor capture CAP buffer brief
show monitor capture CAP buffer detailed
monitor capture CAP export tftp://10.0.0.1/CAP.pcap
no monitor capture CAP
match protocol
command under the class-map) are currently not supported.There is currently no verification procedure available for this configuration.
For EPC that runs on Cisco IOS-XE®, this debug command is used to ensure EPC is set up properly:
debug epc provision
debug epc capture-point