
在 FreeBSD 上,當我有一個介面有兩個 IP 時:
ifconfig nic0 192.168.0.1 netmask 255.255.255.0
ifconfig nic0 alias 192.168.0.2 netmask 255.255.255.255
如果我 ping 別名,如果我從中 ping 的主機(例如 192.168.0.20)尚未位於 ARP 快取中,則會產生以下 ARP 請求:
Who has 192.168.0.20? Tell 192.168.0.1
也就是說,ARP請求源自於介面主IP。
但是,在 Windows 7 或 Server 2008R2 上,如果我以類似方式設定介面:
netsh int ipv4 set address "LAN" static 192.168.0.1 255.255.255.0
netsh int ipv4 add address "LAN" 192.168.0.2 255.255.255.255 skipassource=true
當我執行相同操作時,會產生以下 ARP 請求:
Who has 192.168.0.20? Tell 192.168.0.2
是否可以對此進行更改,以便在 Windows 上,ARP 請求始終源自於主介面 IP?