环境centos,增添了两张虚拟网卡
能够ping通,能够正常联网,而使用hping工具无论什么域名都ping不通
[root@localhost network-handover]# ping www.baidu.com -I ens33
PING www.a.shifen.com (112.80.248.76) from 192.168.253.128 ens33: 56(84) bytes of data.
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=1 ttl=128 time=17.2 ms
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=2 ttl=128 time=13.9 ms
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=3 ttl=128 time=17.2 ms
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=4 ttl=128 time=17.8 ms
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=5 ttl=128 time=15.5 ms
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=6 ttl=128 time=23.0 ms
64 bytes from 112.80.248.76 (112.80.248.76): icmp_seq=7 ttl=128 time=16.6 ms
^C
--- www.a.shifen.com ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6013ms
rtt min/avg/max/mdev = 13.999/17.374/23.076/2.625 ms
[root@localhost network-handover]# hping www.baidu.com -I ens33
HPING www.baidu.com (ens33 112.80.248.75): NO FLAGS are set, 40 headers + 0 data bytes
^C
--- www.baidu.com hping statistic ---
9 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
[root@localhost network-handover]# hping 192.168.128.1 -I ens33
HPING 192.168.128.1 (ens33 192.168.128.1): NO FLAGS are set, 40 headers + 0 data bytes
^C
--- 192.168.128.1 hping statistic ---
15 packets transmitted, 0 packets received, 100% packet loss
round-trip min/avg/max = 0.0/0.0/0.0 ms
兄弟,hping默认是发tcp的,不是发icmp,icmp加参数 -1,你去网上搜下hping的详细用法。