The packet-capture command configures the packet capture interface, direction, and the queue for storing captured packets.
The undo packet-capture command cancels the setting of the packet capture interface.
packet-capture { all-packet | ipv4-packet acl-number | ipv6-packet acl6-number | no-ip-packet } [ queue queue-id ] [ vlan vlan-id1 [ to vlan-id2 ] ] [ interface interface-type interface-number [ inbound | outbound ] ]
undo packet-capture [ 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 that ranges from 0 to 3 for the root system and from 0 to 1 for the virtual system. The default value is 0. |
vlan vlan-id1 to vlan-id2 |
Specifies the VLAN from which packets are to be captured. |
vlan-id ranges from 1 to 4094. This parameter is valid only for Layer-2 interfaces.
|
interface interface-type interface-number |
Specifies an interface for packet capture. This parameter is case-insensitive. |
- |
The default direction is bidirectional. The configured packet capture condition range is large, which affects the device performance. Therefore, you are advised to configure a refined IP address or port number.
After finishing network issue locating, to ensure information security and prevent the device performance from being affected, run the
undo packet-capture command to stop packet capture and delete the packet capture configuration, run the reset packet-capture queue all command to clear the packet capture queue, and run the reset packet-capture statistic command to clear the packet capture statistics.