ifconfig改了网卡物理地址

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

ifconfig改了网卡物理地址

#1

帖子 elle29 » 2008-10-10 8:03

可是重启就会改回来,如何ubuntu下将他永久的改呢?
kernel说没有这个命令是怎么回事?
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: ifconfig改了网卡物理地址

#2

帖子 elle29 » 2008-10-10 8:41

该了物理地址,又改了ip地址后,网络就不通了,ping是正常的,可是就是上不了网是怎么回事?
zzlyzq
帖子: 1
注册时间: 2008-10-06 12:59

Re: ifconfig改了网卡物理地址

#3

帖子 zzlyzq » 2008-10-10 9:46

dns设置了没有

vi /etc/network/interfaces

# The primary network interface
#auto eth0
#iface eth0 inet static
# address 192.168.2.3
# netmask 255.255.255.0
# network 192.168.2.0
# broadcast 192.168.2.255
# gateway 192.168.2.1
# # dns-* options are implemented by the resolvconf package, if installed
# dns-nameservers XXX
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: ifconfig改了网卡物理地址

#4

帖子 elle29 » 2008-10-11 9:10

已经知道原因
ifconfig eth0 **.**.**.** netmask 255.255.255.0后再改ip就会不行。
另外想问一下如何把这个修改设为永久呢?
头像
dogfox
论坛版主
帖子: 5311
注册时间: 2006-09-02 14:18
来自: 汉桑城
联系:

Re: ifconfig改了网卡物理地址

#5

帖子 dogfox » 2008-10-11 10:04

修改

代码: 全选

/etc/init.d/networking

case "$1" in
start)      
ifconfig eth0 hw ether mac地址
全世界linux爱好者联合起来 !
头像
elle29
帖子: 101
注册时间: 2008-09-09 17:10

Re: ifconfig改了网卡物理地址

#6

帖子 elle29 » 2008-10-11 11:31

ellawu@ellawu-desktop:~$ /etc/init.d/networking
Usage: /etc/init.d/networking {start|stop|restart|force-reload}
头像
dogfox
论坛版主
帖子: 5311
注册时间: 2006-09-02 14:18
来自: 汉桑城
联系:

Re: ifconfig改了网卡物理地址

#7

帖子 dogfox » 2008-10-11 21:18

:em06 少写了个编辑

代码: 全选

sudo kate /etc/init.d/networking
如果你是gnome桌面就使用gedit编辑

具体内容自己学着看看
全世界linux爱好者联合起来 !
回复