Tools

Packet capture builder

Runs in your browser. Nothing you enter is sent anywhere, and the page’s security policy stops it from contacting other sites.

Describe the traffic you want to see, and get the whole capture procedure for Cisco IOS-XE, NX-OS and tcpdump on Linux, with the Wireshark filter for reading the file. Every one matches the same packets, in both directions, for IPv4 and IPv6.

Try an example:

Traffic
Capture

Commands

What to know

An end is an address, a prefix such as 192.0.2.0/24 or 2001:db8::/48, or “any”. Ports are for TCP and UDP: one port, several with commas between them, or a range such as 1024-65535. A flow with “any” at both ends is captured for IPv4 and IPv6.

The filters are written out in full, one part for each direction, so that they match exactly what you described. A shorter filter such as “host A and host B and port 443” also matches traffic from port 443 of the client, which you did not ask for. Each output is tested against the same packets, at every edge of every prefix and port range.

The Cisco commands follow Cisco’s documentation: Embedded Packet Capture for IOS-XE, on an interface or on the control plane (the traffic to and from the device itself), and ethanalyzer and SPAN to the CPU for NX-OS. I have not tried them on a device, and notes under the commands say where the documentation leaves a question open. A capture uses the device’s memory and CPU, and its access list or monitor session is a configuration change, so run it as you would any other change. The last block removes everything again.

On NX-OS, ethanalyzer sees only packets to or from the switch itself. For traffic through the switch, the output copies a port to the CPU and filters the copies there. What Cisco does not document, such as a filter on that session for IPv6 or saving a filtered capture to a file, is not offered.

To read the result without Wireshark, the packet decoder opens the capture file or a hex dump of it.

The commands are written in your browser and nothing is sent anywhere. The flows and settings are kept in the address bar, so that a result can be bookmarked or shared: a link you share shows the addresses you typed.