Windows篇:
1.以管理员权限运行CMD.
2.>netsh i i show in
3.得到网卡的index值,(假设为8)
4. >netsh -c “i i” add neighbors 8 “192.168.1.1” “00-1d-0f-6c-1a-ea”
(index值) (绑定的IP地址) (绑定的mac地址)
Linux篇:
1.echo ‘192.168.1.1 00:1D:0F:6C:1A:EA’ >/etc/ip-mac #建立一个文本将要绑定的地址写入
2.cat /etc/ip-mac #确定文本编辑成功
3.echo ‘arp -f /etc/ip-mac’ >> /etc/rc.d/rc.local #开机自动绑定
4.arp -f /etc/ip-mac #手动执行帮定