我的配置文件如下:
/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
进去电脑后我如下操作:
ifconfig 后上面已经显示eth1 ,并不是以前的eth0,不知为何了!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)
我继续操作:
请问我配置文件哪里出现问题?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,不知道上面的配置文件哪里有问题,请各位帮看看!
谢谢!