亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Linux系統(tǒng)下防止 ARP 欺騙_綁定IP地址和MAC地址

  發(fā)布時間:2008-09-08 17:01:49   作者:佚名   我要評論
一、約定 1、網(wǎng)關(guān)上已經(jīng)對下面所帶的機器作了綁定。網(wǎng)關(guān)IP:192.168.1.1 MAC:00:02:B3:38:08:62 2、要進行綁定的Linux主機IP:192.168.1.2 MAC:00:04:61:9A:8D:B2 二、綁定步驟 1、先使用arp和arp -a查看一下當前ARP緩存列表 [root@ftpsvr ~]# arp Addre
一、約定
1、網(wǎng)關(guān)上已經(jīng)對下面所帶的機器作了綁定。網(wǎng)關(guān)IP:192.168.1.1 MAC:00:02:B3:38:08:62
2、要進行綁定的Linux主機IP:192.168.1.2 MAC:00:04:61:9A:8D:B2 二、綁定步驟
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“表示靜態(tài)的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、新建一個靜態(tài)的mac--〉ip對應(yīng)表文件:ip-mac,將要綁定的IP和MAC地下寫入此文件,格式為 ip mac。
[root@ftpsvr ~]# echo ’192.168.1.1 00:02:B3:38:08:62 ’ 〉 /etc/ip-mac
[root@ftpsvr ~]# more /etc/ip-mac
192.168.1.1 00:02:B3:38:08:62 3、設(shè)置開機自動綁定
[root@ftpsvr ~]# echo ’arp -f /etc/ip-mac ’ 〉〉 /etc/rc.d/rc.local 4、手動執(zhí)行一下綁定
[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緩存列表中,可以看到網(wǎng)關(guān)(192.168.1.1)的記錄標志已經(jīng)改變,說明綁定成功。 三、添加信任的Windows主機(192.168.1.10)
1、Linux主機(192.168.1.2)上操作
[root@ftpsvr ~]# echo ’192.168.1.10 00:04:61:AE:09:14’ 〉〉 /etc/ip-mac [root@ftpsvr ~]# arp -f /etc/ip-mac 2、Windows主機(192.168.1.10)上操作
1)清除ARP緩存
C:\Documents and Settings\Administrator〉arp -d 2)綁定Linux主機的IP和MAC地址
C:\Documents and Settings\Administrator〉arp -s 192.168.1.2 00-04-61-9A-8D-B2 你可以將上面2個步驟寫在一個BAT(批處理)文件中,這樣做的好處是,今后如果要增加其它機器的綁定,只需維護這個文件就可以了。例:
@echo off
arp -d
arp -s 192.168.1.2 00-04-61-9A-8D-B2
exit  注意:Linux和Widows上的MAC地址格式不同。Linux表示為:AA:AA:AA:AA:AA:AA,Windows表示為:AA-AA-AA-AA-AA-AA。

相關(guān)文章

最新評論