When pinging a device fails or ping packets are lost, you need to find the device that discards the ping packets first. To find this device, you can configure ACLs on the device to count the matching ICMP packets in the inbound and outbound direction. Then compare the counts of ICMP packets in the two directions to determine whether ICMP packets are discarded by the device. The following is an example of applying an ACL in the inbound direction:
1. Configure an ACL rule.
[HUAWEI] acl number 3000 [HUAWEI-acl-adv-3000] rule permit icmp source 192.168.2.2 0 destination 192.168.2.1 0
2. Configure a traffic classifier.
[HUAWEI] traffic classifier 3000 [HUAWEI-classifier-3000] if-match acl 3000
3. Configure a traffic behavior.
[HUAWEI] traffic behavior 3000 [HUAWEI-behavior-3000] statistic enable
4. Configure a traffic policy.
[HUAWEI] traffic policy 3000 [HUAWEI-trafficpolicy-3000] classifier 3000 behavior 3000
5. Apply the traffic policy to an interface.
[HUAWEI-GigabitEthernet3/0/0] traffic-policy 3000 inbound
Apply an ACL rule to the outbound direction is the same way. You simply need to reverse the source and destination addresses in the rule.