netsh 绑定MAC实用大法

原以为用arp -s  ip  mac 的方法来绑定mac地址很好用,但是在cain等工具的攻击下败得一塌糊涂,在同事红春的指引下换netsh,很有效!

方法:

首先、 netsh interface ipv4 show interface

(或 netsh i i show in )
1
找到网络本地连接,本地连接idx=11

索罗想在本地的网卡上绑定网关 172.20.6.1 ,mac地址为:00-d0-02-e5-9c-00

netsh -c interface ipv4  add neighbors 11 172.20.6.1  00-d0-02-e5-9c-00

至此 arp -a 一下,以前的172.20.6.1 的mac地址已被静态绑定了。

绑定之前:

2

绑定之后:

 

3

 

arp -s绑定后 重启后绑定就失效了。但是netsh 静态绑定后重启后依然有效,很给力!

 


如果想去掉绑定,用del即可

netsh -c interface ipv4  del neighbors 11 172.20.6.1  00-d0-02-e5-9c-00

如果想省事,全部重置也可

netsh interface ipv4 reset

 

yantaisolo

作者 yantaisolo