LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2145|回复: 4

按网上修改MAC地址的配置文件,但还是没有成功修改

[复制链接]
发表于 2006-5-4 13:37:35 | 显示全部楼层 |阅读模式
我想永久修改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 encapocal 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,不知道上面的配置文件哪里有问题,请各位帮看看!
谢谢!
发表于 2006-5-4 14:55:08 | 显示全部楼层
呵呵!! mac 地址也可以修改????
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-4 20:53:57 | 显示全部楼层
我按其它的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)"?
回复 支持 反对

使用道具 举报

发表于 2006-5-4 21:02:50 | 显示全部楼层
如果嫌麻烦的话,直接刷网卡,重新改mac地址就算了
realtak和很多集成网卡的都应该行的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-4 21:13:28 | 显示全部楼层
Post by yadiman
如果嫌麻烦的话,直接刷网卡,重新改mac地址就算了
realtak和很多集成网卡的都应该行的

其实也没什么的
我学校采用捆绑MAC认证的方式上网

然后我的集成网卡出现了点问题,新买一块网卡.
现在是五一假期,学校网络中心没人上班,就想修改一个MAC地址来玩玩一下.

等网络中心人员上班了,再去捆绑新的MAC,以后就不用更改了


不过,后面出现的问题"网络设置"默认为"回环接路(lo)",不知道如何修改成"以太网卡(eth0)"...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表