上一篇: Linux常用命令名或缩写的由来
Linux 绑定ARP
[ 2009/02/14 14:42 | by selboo ]
假如 192.168.1.1 是我的网关
[root@localhost ~]# ping 192.168.1.1
[root@localhost ~]# arp
Address HWtype HWaddress Flags Mask Iface
192.168.1.1 ether 00:19:E0:F4:30:2A C eth0
网关的MAC 00:19:E0:F4:30:2A
Flags Mask C (表示为静态)
[root@localhost ~]# echo "192.168.1.1 00:19:E0:F4:30:2A" >/etc/ethers
把网关IP和MAC地址写入到 /etc/ethers
[root@localhost ~]# arp -f
[root@localhost ~]# arp
Address HWtype HWaddress Flags Mask Iface
192.168.1.1 ether 00:19:E0:F4:30:2A CM eth0
Flags Mask为 CM (静态网关 表示绑定成功)
如果可以的话最好是做双向绑定