ping 命令 指定特定網卡 發送 ICMP 數據包


Windows : ping -S

Linux : ping -I <device>

-I interface
interface is either an address, or an interface name. If interface is an address, it sets source address to specified interface address. If interface in an
interface name, it sets source interface to specified interface. For IPv6, when doing ping to a link-local scope address, link specification (by the
'%'-notation in destination, or by this option) is required.

➜  Desktop ping -I wlp3s0  baidu.com
PING baidu.com (123.125.115.110) from 10.210.10.160 wlp3s0: 56(84) bytes of data.
➜  Desktop ping -I tun0  baidu.com
PING baidu.com (220.181.57.216) from 10.72.12.142 tun0: 56(84) bytes of data.

保持更新,轉載請標明出處。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM