#windows
先看一下网关MAC
执行
arp -a
执行结果
Internet Address Physical Address Type
10.10.4.1 00-1d-e6-2f-2e-45 dynamic
执行
arp -s 10.10.4.1 00-1d-e6-2f-2e-45
再执行 arp -a 查看绑定结果
执行
arp -a
执行结果
Internet Address Physical Address Type
10.10.4.1 00-1d-e6-2f-2e-45 static
type 显示 static 说明绑定成功
#linux
arp 先看一下网关MAC
执行
arp
执行结果
Address HWtype HWaddress Flags Mask Iface
10.10.4.1 ether 00:1d:e6:2f:2e:45 C eth0
执行 #将IP和MAC信息输入到文件
echo '10.10.4.1 00:1d:e6:2f:2e:45' > /etc/ip-mac
执行 #将这条命令追加到启动脚本
echo 'arp -f /etc/ip-mac' >> /etc/rc.d/rc.local
执行结果
Address HWtype HWaddress Flags Mask Iface
10.10.4.1 ether 00:1d:e6:2f:2e:45 CM eth0
Flags Mask 显示CM 说明绑定成功
该文章出自《中国万网-金光网络-IDC知识库》,原文链接:http://web.jgwl.net/read.php/198.htm
转载时间是: 2011-10-24 09:14:49 请务必保留此链接,谢谢!