Configuring a Device to Capture Service Packets
Context
If a device fails to forward traffic correctly, configure it to capture service packets for analysis. You can configure ACL rules to match the packets you want to capture.
Procedure
- Run system-view
The system view is displayed.
- Run capture-packet { interface interface-type interface-number | acl { ipv4-acl | ipv6 ipv6-acl } } * [ vlan vlan-id | cvlan cvlan-id ] * destination { file file-name | terminal } * [ car cir car-value | time-out time-out-value | packet-num number | packet-len length | { inbound | outbound } ] *
The device is configured to capture service packets.
- Currently, packets on the management interface, logical stack ports, and stack member ports cannot be captured.
- If the IP addresses of ARP packets on the control plane match the IP addresses in a basic or advanced ACL, these ARP packets can also be captured.
- The packet capture configuration is not saved in the configuration file, and becomes invalid when packet capture is complete.
- Different packet capture instances cannot be executed simultaneously. That is, a new packet capture instance can be executed only when the previous one is complete.
- The system limits the rate of captured packets. The default rate limit is 64 kbit/s. If the rate of packets exceeds the limit, some packets may be discarded.
- The device cannot capture the packets of fast ICMP reply, BFD, 802.1ag, and VBST.
- For the X series cards, to capture packets on an interface that has been added to an Eth-Trunk interface, specify this Eth-Trunk interface in this command.
- When the switch discards the packets that it cannot forward, packets may not be captured in some situations. It is recommended that you obtain packets in other ways, such as mirroring.
- In an SVF system, an Eth-Trunk bound to a fabric port does not support service packet capture.