How to specify the number of ping attempts on S series switches

11

For S series switches (except the S1700), you can specify the number of ping attempts using the ping -c count host command when checking whether a specified IPv4 address is reachable. You can configure the count parameter to specify the transmission times of ICMP Echo Request packets.

Other related questions:
How can an S series switch ping another device using ping packets carrying a specified source IP address
For S series switches (except the S1700), you can specify the source IP address of ping packets by specifying the -a source-ip-address parameter in the ping command. For example, set the source and destination IP addresses of ping packets to 192.168.150.107 and 10.135.19.157, respectively. [HUAWEI] ping -a 192.168.150.107 10.135.19.157

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.

Can I view the port number on an S series switches
No command is available to display the port number of a data packet on an S series switches. To obtain the port number of a data packet, run the display mac-address command to view the source MAC address of the packet, determine the port receiving the packet, and then use Wireshark to capture it.

How is the source IP address of ping packets specified
The -a parameter specifies the source IP address of ping packets. If -a is not specified, the system searches for the outbound interface mapping the destination IP address in the routing table and uses the outbound interface's IP address as the source IP address of ping packets. If there are equal-cost routes to the destination IP address, the system performs the hash algorithm based on the destination IP address, protocol number, ICMP type, and ICMP mode and selects the outbound interface's IP address as the source IP address of ping packets.

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 192.168.2.21 PING 192.168.2.21: 56 data bytes, press CTRL_C to break Reply from 192.168.2.21: bytes=56 Sequence=1 ttl=124 time=1 ms ... --- 192.168.2.21 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 192.168.2.21 0 destination 192.168.2.20 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.

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