蓝梦
我知道我不是一个很好的记录者,但我比任何人都喜欢回首自己来时的路,我不断的回首,伫足,然手时光仍下我轰轰烈烈的向前奔去。

1.windows服务器

执行:arp -s 113.105.168.130 00-E0-81-D3-58-54 (可保存成bat文件,并添加到启动项里)

安装arp防火墙antiarp4.1.1.exe

2.Linux

1、先使用arp和 arp -a查看一下当前ARP缓存列表 [root@ftpsvr ~]# arp Address                  HWtype  HWaddress           Flags Mask            Iface 192.168.1.234            ether   00:04:61:AE:11:2B   C                     eth0 192.168.1.145            ether   00:13:20:E9:11:04   C                     eth0 192.168.1.1              ether   00:02:B3:38:08:62   C                     eth0 说明: Address:主机的IP地址 Hwtype:主机的硬件类型 Hwaddress:主机的硬件地址 Flags Mask:记录标志,”C”表示arp高速缓存中的条目,”M”表示静态的arp条目。 [root@ftpsvr ~]# arp -a ? (192.168.1.234) at 00:04:61:AE:11:2B [ether] on eth0 ? (192.168.1.1) at 00:16:76:22:23:86 [ether] on eth0 2、新建一个静态的mac–>ip对应表文件:ip-mac,将要绑定的IP和MAC 地下写入此文件,格式为 ip mac。 [root@ftpsvr ~]# echo ‘192.168.1.1 00:02:B3:38:08:62 ‘ > /etc/ip-mac    (注:ip和mac是网关的ip和mac) [root@ftpsvr ~]# more /etc/ip-mac 192.168.1.1 00:02:B3:38:08:62 3、设置开机自动绑定 [root@ftpsvr ~]# echo ‘arp -f /etc/ip-mac ‘ >> /etc/rc.d/rc.local 4、手动执行一下绑定 [root@ftpsvr ~]# arp -f /etc/ip-mac 5、确认绑定是否成功 [root@ftpsvr ~]# arp Address                  HWtype  HWaddress           Flags Mask            Iface 192.168.0.205            ether   00:02:B3:A7:85:48   C                     eth0 192.168.1.234            ether   00:04:61:AE:11:2B   C                     eth0 192.168.1.1              ether   00:02:B3:38:08:62   CM                    eth0 [root@ftpsvr ~]# arp -a ? (192.168.0.205) at 00:02:B3:A7:85:48 [ether] on eth0 ? (192.168.1.234) at 00:04:61:AE:11:2B [ether] on eth0 ? (192.168.1.1) at 00:02:B3:38:08:62 [ether] PERM on eth0 从绑定前后的ARP缓存列表中,可以看到网关(192.168.1.1)的记录标志已经改变,说明绑定成功。
posted on 2012-11-30 12:03  lanmeng  阅读(364)  评论(0编辑  收藏  举报