帝王谷资源网 Design By www.wdxyy.com
一、约定
1、网关上已经对下面所带的机器作了绑定。网关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“表示静态的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
[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)的记录标志已经改变,说明绑定成功。 三、添加信任的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。
1、网关上已经对下面所带的机器作了绑定。网关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“表示静态的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
[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)的记录标志已经改变,说明绑定成功。 三、添加信任的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。
帝王谷资源网 Design By www.wdxyy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
帝王谷资源网 Design By www.wdxyy.com
暂无评论...
更新日志
2024年10月25日
2024年10月25日
- 群星2013-青春缤纷辑压箱宝大公开3CD2[新加坡限量版][WAV整轨]
- 林育群.2013-BalladShow(日本版)【环球】【WAV+CUE】
- 陈加洛.1992-痛到感觉不到【宝丽金】【WAV+CUE】
- 群星.2023-宿命之敌电视剧原声带【韶愔音乐】【FLAC分轨】
- 東京事変-大発見[FLAC+CUE]
- 椎名林檎-三文ゴシップ[FLAC+CUE]
- 2024年08月04日
- 裘德《裘德「最后的水族馆」演唱会LIVE》[320K/MP3][228.89MB]
- 裘德《裘德「最后的水族馆」演唱会LIVE》[24bit 48kHz][FLAC/分轨][2.08G]
- 基因三重奏《如果你什么都不说 音乐会现场录音》[320K/MP3][145.37MB]
- 孟庭苇.1996-月亮说话(2020环球24KGOLD限量版)【上华】【WAV+CUE】
- 群星.1997-新艺宝优质音响系列·国语精选监听版【新艺宝】【WAV+CUE】
- 阿桑.2005-寂寞在唱歌(星外星引进版)【华研国际】【WAV+CUE】
- 基因三重奏《如果你什么都不说 音乐会现场录音》[FLAC/分轨][287.43MB]
- 蔡题谦《我爱你,却依然要看你走》[320K/MP3][88.65MB]