(在进行任何更新之前,在上网本上使用 Ubuntu 10.04 LTS)无线工作正常,有线连接已使用 Windows 计算机进行了测试。
从电源管理器中选择 auto eth0 失败。
使用 Wicd 网络管理器 - 按连接到有线网络 - “连接”有线网络:正在获取 IP 地址... - 连接失败:无法获取 IP 地址
alex@alex-laptop:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:24:54:df:22:d5
inet6 addr: fe80::224:54ff:fedf:22d5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8558 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:526280 (526.2 KB) TX bytes:9564 (9.5 KB)
Interrupt:18
在 eth0 上测试 dhclient
alex@alex-laptop:~$ sudo dhclient eth0
[sudo] password for alex:
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:24:54:df:22:d5
Sending on LPF/eth0/00:24:54:df:22:d5
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
运行 dmesg
alex@alex-laptop:~$ dmesg | grep eth0
[ 1.092888] sky2 eth0: addr 00:24:54:df:22:d5
[ 13.521498] sky2 eth0: enabling interface
[ 13.522027] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 15.036628] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx
[ 15.099270] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 21.505203] sky2 eth0: disabling interface
[ 21.516896] sky2 eth0: enabling interface
[ 21.517394] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 21.544054] sky2 eth0: disabling interface
[ 21.573775] sky2 eth0: enabling interface
[ 21.574326] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 23.085959] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx
[ 23.086287] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 33.488031] eth0: no IPv6 routers present
[ 98.269052] sky2 eth0: disabling interface
[ 98.289665] sky2 eth0: enabling interface
[ 98.290176] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 99.795289] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx
[ 99.795826] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 110.272732] eth0: no IPv6 routers present
[ 133.463522] sky2 eth0: Link is down.
[ 7748.854103] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx
运行 ifup
alex@alex-laptop:~$ sudo ifup eth0
[sudo] password for alex:
Ignoring unknown interface eth0=eth0.
运行lspci
alex@alex-laptop:~$ lspci | grep -i ethernet
09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller
alex@alex-laptop:~$ lshw -c Network | driver
WARNING: you should run this program as super-user.
No command 'driver' found, did you mean:
Command 'drivel' from package 'drivel' (universe)
driver: command not found
alex@alex-laptop:~$ lshw -c Network | grep driver
WARNING: you should run this program as super-user.
configuration: broadcast=yes driver=wl0 driverversion=5.60.48.36 latency=0 multicast=yes wireless=IEEE 802.11
configuration: broadcast=yes driver=sky2 driverversion=1.25 firmware=N/A latency=0 multicast=yes
跑步路线
alex@alex-laptop:/etc$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
link-local * 255.255.0.0 U 0 0 0 pan0
link-local * 255.255.0.0 U 0 0 0 eth1
我看到过建议/etc/dhcp3/dhclient.conf
通过在 rfc3442 前面放置 # 来编辑文件并保存并重新启动,但这不起作用。
然后我尝试添加到/etc/network/interfaces
自动 eth0 iface eth0 inet dhcp。最初的接口文件是:
auto lo
iface lo inet loopback
我编辑为:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
然后从启动中删除网络管理器,重新启动后这也没有帮助。任何想法为什么有线连接仍然无法工作?
答案1
您的第一个块表明您的本地网络上没有 DHCP 服务器。当你说网络接口在Windows下测试时是在这个网络上吗?如果是,只需复制设置即可。如果不是,请致电您的 ISP 以获取连接信息。可能需要一些 PPPoE 魔法,甚至需要提供您的 MAC 地址,以便他们能够使其获得 DHCP 配置。