分页: 1 / 2

急!!!学校网络是DHCP分配 ubuntu不能上网!望指教

发表于 : 2008-08-14 0:12
Jeff Hsu
xp下能够正常上网。xp下相关消息为:
IP地址:172.16.19.169
默认网关:172.16.19.1
DHCP服务器:172.16.0.5
DNS服务器:172.16.0.5
172.16.0.6

ubuntu下ifconfig结果:
eth0 Link encap:Ethernet HWaddr 00:c0:26:28:1b:22
inet6 addr: fe80::2c0:26ff:fe28:1b22/64 Scope:Link
UP BROADCAST RUNNING 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:0xc000

eth0:avahi Link encap:Ethernet HWaddr 00:c0:26:28:1b:22
inet addr:169.254.2.155 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0xc000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1332 errors:0 dropped:0 overruns:0 frame:0
TX packets:1332 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:66792 (65.2 KB) TX bytes:66792 (65.2 KB)






$sudo /etc/init.d/networking restart
open: Permission denied
* Reconfiguring network interfaces... ifdown: failed to open statefile /var/run/network/ifstate: Permission denied
ifup: failed to open statefile /var/run/network/ifstate: Permission denied
open: Permission denied
[fail]



感谢高手指教!急等!

发表于 : 2008-08-14 0:40
yyrl
$ sudo vi /etc/network/interfaces
默认的内容是
auto lo
iface lo inet loopback
需要修改为:
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

其中,不一定是eth0
你可以用 ifconfig -a查看,如果你只有一块网卡的话就用那个网卡号改。

发表于 : 2008-08-14 0:47
Jeff Hsu
感谢回复,我试试。谢谢了。 :D

发表于 : 2008-08-14 1:06
Jeff Hsu
2楼说的方法不行啊。
按你说的做,终端结果如下:





auto ludo vi /etc/network/interfaces
iface lo inet loopback



iface eth0 inet dhcp

auto eth0
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/network/interfaces" 8 lines, 66 characters


什么意思啊?
能否说得详细些~~~~~

发表于 : 2008-08-14 1:10
xeoc
networkmanager里弄成漫游模式不行么? :shock:

发表于 : 2008-08-14 7:25
Jeff Hsu
xeoc 写了:networkmanager里弄成漫游模式不行么? :shock:


尝试过这种方法,还是不行啊……
我要弄疯了……~~~~~~ :( :( :( :( :( :evil:

发表于 : 2008-08-14 10:40
Jeff Hsu
难道真的没有人知道怎么解决吗?

看来最终只能卸掉ubuntu了~~~~~~~

发表于 : 2008-08-14 11:49
yyrl
如果5楼方法不行,就用sudo gedit /etc/network/interfaces 修改吧,比vi可能更清楚。

还是像二楼一样改,很好改的,既然是eth0,就把里面的内容全部换成
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

再重启网络
sudo /etc/init.d/networking restart

如果还不行,也别急着删,再看看。

发表于 : 2008-08-14 21:41
Jeff Hsu
我试过了很多方法了,还是不行。
所以,我只有把ubuntu卸载了。
再见!ubuntu。……~~~~~

发表于 : 2008-08-14 21:47
xeoc
那你就按这个设置不完了么,

IP地址:172.16.19.169
默认网关:172.16.19.1
DHCP服务器:172.16.0.5
DNS服务器:172.16.0.5
172.16.0.6

发表于 : 2008-08-14 22:29
想入非非
1.在终端输入 sudo gedit ./ect/network/interfaces,将文件修改成如下格式:
auto etho
iface etho inet static
address ***
netmask ***
gateway ***(就是你自己的静态IP什么的)
2,在终端输入 sudo gedit ./etc/resolv.conf
输入 nameserver ***(自己的DNS)
如果这样还不行的话,转到root下试试,希望对你用帮助!
当初我也是弄了很长时间才行的,不要放弃 :wink:

发表于 : 2008-08-14 22:47
Jeff Hsu
xeoc 写了:那你就按这个设置不完了么,

IP地址:172.16.19.169
默认网关:172.16.19.1
DHCP服务器:172.16.0.5
DNS服务器:172.16.0.5
172.16.0.6

早试过了这个方法,不行。~~~~~……

发表于 : 2008-08-14 23:23
20sanguo
终端里输 sudo dhclient 行不行?
这个文件权限、内容会不会也有关? /var/run/network/ifstate

发表于 : 2008-08-15 2:06
qiang_liu8183
遇到点小麻烦就这样,还是乖乖用Windows吧,以后麻烦会更多

发表于 : 2008-08-16 10:53
love214925
Jeff Hsu 写了:我试过了很多方法了,还是不行。
所以,我只有把ubuntu卸载了。
再见!ubuntu。……~~~~~
不送了阿 这么这么就逃了