How to check ping packet loss on S series switches


For S series switches (except the S1700), you can run the ping command to check ping packet loss directly. For example:
[HUAWEI] ping -c 100
PING 56 data bytes, press CTRL_C to break
Reply from bytes=56 Sequence=1 ttl=124 time=1 ms
--- ping statistics ---
100 packet(s) transmitted //Total number of sent packets
91 packet(s) received //Total number of received packets
9.00% packet loss //Packet loss ratio
round-trip min/avg/max = 1/1/19 ms

You can also perform the following steps to configure traffic statistics collection to check ping packet loss:

Configure traffic statistics collection for packets received by a switch.
1. Configure an ACL rule.
[HUAWEI] acl number 3000
[HUAWEI-acl-adv-3000] rule permit icmp source 0 destination 0
[HUAWEI-acl-adv-3000] quit

2. Configure a traffic classifier.
[HUAWEI] traffic classifier 3000
[HUAWEI-classifier-3000] if-match acl 3000
[HUAWEI-classifier-3000] quit3. Configure a traffic behavior.
[HUAWEI] traffic behavior 3000
[HUAWEI-behavior-3000] statistic enable
[HUAWEI-behavior-3000] quit

4. Configure a traffic policy.
[HUAWEI] traffic policy 3000
[HUAWEI-trafficpolicy-3000] classifier 3000 behavior 3000
[HUAWEI-trafficpolicy-3000] quit

5. Apply the traffic policy to an interface.
[HUAWEI] interface gigabitethernet 0/0/2
[HUAWEI-GigabitEthernet0/0/2] traffic-policy 3000 inbound
[HUAWEI-GigabitEthernet0/0/2] quit

6. Check traffic statistics of packets received by the switch.
[HUAWEI] display traffic policy statistics interface gigabitethernet 0/0/2 inbound verbose rule-base //The output is omitted.

For more information about ping packet loss, see "Ping Failure Troubleshooting" or "S Series Switches packet Loss Troubleshooting" in "Maintenance Topics" in the Huawei S Series Campus Switches Maintenance Guide.

Other related questions:
The reason of S series switch Ping packet loss
For S-series chassis switches: The Ping packets of the local switch are processed by the switch as a fib-hit packet. For packets of type fib-hit, the switch sends to CPUs at the default CAR value to prevent this type of packets from impacting the CPU. In the case of the default CAR value, the number of ping packets per second is too large for the CAR value, so the switch will discard some packets. Increase the fib value of fib-hit, you can solve the packet loss problem.

DHCP packet checksum check on S series switch
After the dhcp enable command is executed in the system view of S series switches, the switch checks the checksum of all passing DHCP packets as well as IP and UDP checksums.

Reason for ping packet loss on S series switch
For S series modular switches: Ping packets sent from other devices to a switch are processed by the switch as fib-hit packets. The switch sends fib-hit packets to the CPU at the default CAR value to protect the CPU from being attacked by these packets. If the rate of ping packets sent to the CPU exceeds the CAR value, the switch discards the excess packets. To resolve the problem, set a larger CAR value for fib-hit packets.

Question about packet loss when the rate of ping packets is high on S series switches
When another device pings an S series switch (a non-S1700 switch), the device and the switch exchange ICMP packets. To protect the CPU, you can run the icmp rate-limit command to configure a rate threshold for ICMP packets. The undo icmp rate-limit command restores the default rate threshold of ICMP packets.

Why does an S series switch properly transmit small ping packets but discard large ping packets
A small MTU value on an interface of an S series switch may make the switch properly transmit small ping packets and discard large ping packets. You can run the ping -f command to measure the maximum packet length supported by the interface, and then check the MTU value on the interface. Note: The ping command uses ICMP packets. The packet size in the ping command output is the payload length of ICMP packets, excluding the length of the IP and ICMP packet headers. The length of the IP packet header is 20 bytes and that of the ICMP packet header is 8 bytes.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top