绑定失败啥原因

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
头像
冲浪板
论坛版主
帖子: 7513
注册时间: 2007-05-06 8:19

Re: 绑定失败啥原因

#16

帖子 冲浪板 » 2008-09-23 20:22

elle29 写了:elle29@elle29-desktop:~$ cat /etc/ip-mac
192.168.1.1 00:0F:E2:35:76:18
elle29@elle29-desktop:~$

这样是不是代表绑定成功了阿 :em06
貌似你这个是为输入方便而做的文件,查看的话
/sbin/arp -a
:em11
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#17

帖子 elle29 » 2008-09-23 21:02

elle29@elle29-desktop:~$ /sbin/arp -a
bash: /sbin/arp: 没有该文件或目录
elle29@elle29-desktop:~$
elle29@elle29-desktop:~$
:em20
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#18

帖子 elle29 » 2008-09-24 22:16

我究竟有没有帮定成功阿?
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#19

帖子 elle29 » 2008-09-25 20:22

elle29@elle29-desktop:~$ arp
地址 类型 硬件地址 标志 Mask 接口
192.168.1.2 ether 00:1B:77:59:A9:7D C eth0
192.168.1.1 ether 00:0F:E2:35:76:18 C eth0
elle29@elle29-desktop:~$
elle29@elle29-desktop:~$
怎么多出一个192.168.1.2?我的电脑又没有连接别的电脑,是被劫持了吗?今天电脑不太正常 :em20
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#20

帖子 elle29 » 2008-09-25 21:25

从网上搜的绑定ip-mac
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)的记录标志已经改变,说明绑定成功。


到了上面第3部就执行不下去了,说no direct file 什么的,什么原因呢?
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#21

帖子 elle29 » 2008-09-25 21:32

elle29@elle29-desktop:~$ su -
口令:
root@elle29-desktop:~# arp
Address HWtype HWaddress Flags Mask Iface
192.168.1.1 ether 00:0F:E2:35:76:18 C eth0
root@elle29-desktop:~# arp -a
? (192.168.1.1) at 00:0F:E2:35:76:18 [ether] on eth0
root@elle29-desktop:~# arp-a
-su: arp-a: command not found
root@elle29-desktop:~# arp -a
? (192.168.1.1) at 00:0F:E2:35:76:18 [ether] on eth0
root@elle29-desktop:~# echo'192.168.1.1 00:0F:E2:35:76:18'> /etc/ip-mac
-su: echo192.168.1.1 00:0F:E2:35:76:18: command not found
root@elle29-desktop:~# more /etc/ip-mac
root@elle29-desktop:~# echo '192.168.1.1 00:0F:E2:35:76:18'> /etc/ip-mac
root@elle29-desktop:~# more /etc/ip-mac
192.168.1.1 00:0F:E2:35:76:18
root@elle29-desktop:~# echo 'arp-f/etc/ip-mac'>> /etc/rc.d/rc.local
-su: /etc/rc.d/rc.local: No such file or directory
root@elle29-desktop:~#
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#22

帖子 elle29 » 2008-09-26 14:11

怎么没人帮忙解答一下阿?
头像
solcomo
帖子: 2838
注册时间: 2007-04-25 13:12

Re: 绑定失败啥原因

#23

帖子 solcomo » 2008-09-26 14:27

/etc/rc.d/rc.local
应该是/etc/init.d/rc.local

还有arp -f /etc/ip-mac
要有空格...
♜♞♝♛♚♝♞♜
♟♟♟♟♟♟♟♟
♙♙♙♙♙♙♙♙
♖♘♗♕♔♗♘♖

☠☯⚔⚓☣☦☃☕
☹☻☪☭☬⚖⚛⚜
ℜℳℬ™ ℋℯℓ℘ ℳℭ
sƂɐʍ рǀɹoʍ əɥʇ oS
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: 绑定失败啥原因

#24

帖子 elle29 » 2008-09-26 20:23

arp发现多出来一个192.168.1.2 的ip,是不是电脑被别黑客黑了?
回复