The packet-capture hardware command configures the packet capture interface, direction, and the queue for storing captured packets in hardware chip-based 5-tuple packet capture.
The undo packet-capture hardware command cancels the setting of the packet capture interface in hardware chip-based 5-tuple packet capture.
packet-capture hardware { all-packet | ipv4-packet acl-number | ipv6-packet acl6-number | no-ip-packet } [ queue queue-id ] interface interface-type interface-number [ inbound | outbound ]
undo packet-capture hardware [ interface interface-type interface-number [ inbound | outbound ] ]
| Parameter | Description | Value |
|---|---|---|
all-packet |
Captures all packets. |
- |
ipv4-packet |
Captures IPv4 packets. |
- |
acl-number |
Specifies the ACL rule for packet capture. |
The value ranges from 3000 to 3999. |
ipv6-packet |
Captures IPv6 packets. |
- |
acl6-number |
Specifies the ACL6 rule for packet capture. |
The value ranges from 3000 to 3999. |
no-ip-packet |
Captures non-IP packets. |
- |
inbound |
Captures incoming packets. |
- |
outbound |
Captures outgoing packets. |
- |
queue queue-id |
Specifies the queue for the packet capture interface to store captured packets. |
The value is an integer ranging from 0 to 3 for the root system and from 0 to 1 for the virtual system. The default value is 0. |
interface interface-type interface-number |
Specifies an interface on which packets are to be captured. The value is case-insensitive. |
- |
FW packets first pass through the NP chip and then are sent to the MPU CPU. After the hardware fast forwarding function is enabled by default, only some traffic is sent to the CPU. Therefore, the packets captured based on the hardware chip are more comprehensive. In addition, it helps reduce the CPU usage and is therefore recommended.
Packets on the management interface are directly sent to the CPU without passing through the NP chip. Therefore, this function cannot be used. You can run the packet-capture command to capture packets.
If no packet capture direction is specified, the default direction is bidirectional.
After finishing network issue locating, to ensure information security and prevent the device performance from being affected, run the
undo packet-capture hardware command to stop packet capture and delete the packet capture configuration, run the reset packet-capture queue hardware all command to clear the packet capture queue, and run the reset packet-capture hardware statistic command to clear the packet capture statistics.