Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


request packet-capture start



Captures packet information from the operational mode. You can execute the packet capture from the operational mode with minimal impact to the production system without committing the configurations. You can define the packet filter to trace the type of traffic based on your requirement.

You can request for only one packet capture at a time, and you need to stop each packet capture request before you give an another packet capture request. For each packet capture request, you need to give the respective show command to view the output.

In chassis cluster mode, you must request operational mode packet capture from the primary node. Operational mode packet capture does not function when executed from the secondary node.



Allows to collect bidirectional information.


Name of the capture file. It generates a pcap file, which can support Wireshark by adding the suffix ‘.pcap’.


Number of packets to capture.

  • Range: 10 through 1000000

  • Default: 100


TCP/UDP destination port.


Destination IPv4/IPv6 address prefix to filter the packets.


Name of the logical interface.


The maximum size of packet capture. The packet truncates if the capture size is more than the specified capture size.

  • Range: 68 through 10000

  • Default: 1514


Numeric protocol value.

  • Range: 0 through 255

  • Default: 0


The maximum size of packet capture file.

  • Range: 10240 through 1073741824

  • Default: 50M


TCP/UDP source port.


Source IPv4/IPv6 address prefix to filter the packets.

Required Privilege Level


Output Fields

Table 1 lists the output fields for the request packet-capture start command. Output fields are listed in the approximate order in which they appear.

Table 1: request packet-capture start Output Fields

Field Name

Field Description

packet capture is running

Status of the packet capture session:

  • 0: No packet capture is performing.

  • 1: Packet capture is performing.

counter of packet capture

Number of packets captured.

packet capture capture-file name

Name, location, size and capture length of the packet capture file.


Decimal value corresponding to the type of filter configured. Convert this value to binary or hexadecimal format such as:

  • 0x000 (No filters)

  • 0x001 (Source IP)

  • 0x002 (Destination IP)

  • 0x004 (Protocol)

  • 0x008 (Source port)

  • 0x010 (Destination port)

  • 0x040 (Filter is valid)

  • 0x200 (IPv6 Source IP)

  • 0x400 (IPv6 Destination IP)

  • 0x800 (Interface)

For example if the flag value is 72, convert it to binary or hexadecimal format:

72 = 0x48

  • 0x040 (Filter is valid)

  • 0x008 (Source port)

This means that the filter is valid and only configured with the filter source port.


Source IPv4/IPv6 address.


Destination IPv4/IPv6 address.


Name of the logical interface.


Status of the bidirectional keyword configuration:

  • 0: Not configured.

  • 1: Configured.


Numeric protocol value.


Number of capture files.


The maximum packet capture size.


If index value of interface.

Sample Output

Packet capture using protocol, destination port, destination prefix, and bidirectional options

Packet capture using interface

Packet capture using source prefix

Packet capture using source port

Packet capture using protocol

Release Information

Statement introduced in Junos OS Release 19.3R1.