"); //-->
# ping --help ping: invalid option -- '-' Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface] [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos] [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline] [-W timeout] [hop1 ...] destination
1 # man ping I interface3 interface is either an address, or an interface name. If interface is an4 address, it sets source address to specified interface address. If interface in5 an interface name, it sets source interface to specified interface. For IPv6,6 when doing ping to a link-local scope address, link specification (by the7 '%'-notation in destination, or by this option) is required.
# . PING . (.) ( bytes from .: icmp_seq= ttl= = bytes from .: icmp_seq= ttl= =
# ping I 192.168.187.10 172.16.0.112 PING 172.16.0.11 (172.16.0.11) from 192.168.187.10 : 56(84) bytes of data. From 192.168.187.10 icmp_seq=1 Destination Host Unreachable
# ping I ens33 192.168.187.112 PING 192.168.187.11 (192.168.187.11) from 192.168.187.10 ens33: 56(84) bytes of data. 64 bytes from 192.168.187.11: icmp_seq=1 ttl=64 time=18.1 ms4 64 bytes from 192.168.187.11: icmp_seq=2 ttl=64 time=4.11 ms
1 # ping -I 本机指定网卡名或网卡的IP地址 目标地址
*博客内容为网友个人发布,仅代表博主个人观点,如有侵权请联系工作人员删除。