[问题]已经修改了MAC配置文件,但没有成功修改MAC地址!(解决)

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

[问题]已经修改了MAC配置文件,但没有成功修改MAC地址!(解决)

#1

帖子 myfavourite » 2006-05-04 13:40

我想永久修改MAC地址,按网上的步骤去修改的

我的配置文件如下:
/etc/iftab文件:
# This file assigns persistent names to network interfaces.
# See iftab(5) for syntax.

eth0 mac 00:04:61:59:ec:e9 arp 1
/etc/network/interfaces文件:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
#auto lo
#iface lo inet loopback
#hwaddress ether 00:14:78:3B:50:01



iface eth0 inet static
hwaddress ether 00:04:61:59:EC:E9


然后我重启电脑

进去电脑后我如下操作:
myfavourite@ubuntu:~$ ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:14:78:3B:50:01
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x2000

lo Link encap:Local Loopback
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

ifconfig 后上面已经显示eth1 ,并不是以前的eth0,不知为何了!

我继续操作:
myfavourite@ubuntu:~$ ifconfig eth0 up
eth0: ERROR while getting interface flags: 没有那个设备
请问我配置文件哪里出现问题?


我看到上面的ifconfig的信息变成了eth1,
我作如下操作:

#sudo ifconfig eth1 down
#sudo ifconfig eth1 hw ether 00:04:61:59:EC:E9
#sudo ifconfig eth1 up
后,
可以暂时修改MAC地址

我想永久修改MAC,不知道上面的配置文件哪里有问题,请各位帮看看!
谢谢!
头像
myfavourite
帖子: 55
注册时间: 2006-04-24 14:20

#2

帖子 myfavourite » 2006-05-04 20:56

我按其它的linux修改 MAC方法修改成功
直接到: /etc/init.d/rc.local后面加上
ifconfig eth0 down
ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
ifconfig eth0 up
就可以了

不过我发现了点小问题

我进入桌面后,系统->网络工具->设备 ,下面的"网络设备"默认为"回环接路(lo)", 我把它修改成"以太网卡(eth0)"后,重启电脑,又变回"回环接路(lo)",

请问如何把"网络设备"默认值为"以太网卡(eth0)"?
回复