无线连接工作正常,没有任何问题,但是有线连接对我来说不起作用。
我正在运行 Ubuntu 14.04。
我尝试关注许多不同的主题,主要是这些;http://ubuntuforums.org/showthread.php?t=1504618,http://ubuntuforums.org/showthread.php?t=1494628。但到目前为止,我的电缆仍然没有连接。
我对这些文件进行了大量编辑,因为每个人对类似问题给出的说明都不同,但我似乎无法做到正确。请有人帮帮我。
ifconfig:
eth0 Link encap:Ethernet HWaddr ac:22:0b:b0:91:3e
UP 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)
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:65536 Metric:1
RX packets:2424 errors:0 dropped:0 overruns:0 frame:0
TX packets:2424 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:241074 (241.0 KB) TX bytes:241074 (241.0 KB)
wlan0 Link encap:Ethernet HWaddr 48:d2:24:3d:bc:42
inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::4ad2:24ff:fe3d:bc42/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10494 errors:0 dropped:0 overruns:0 frame:0
TX packets:8782 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8283223 (8.2 MB) TX bytes:1409996 (1.4 MB)
在 /etc/网络/接口:
#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
address 127.0.0.1
netmask 255.0.0.0
#The primary network interface
auto eth0
iface eth0 inet dhcp
/etc/resolv.conf:
#Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 192.168.0.1
nameserver 94.208.107.35
#search WL309
答案1
您的 eth0 设备没有 IP 地址。检查 /etc/network/interfaces 并确保它具有类似以下内容。
auto lo eth0
iface eth0 inet dhcp
如果没有,请添加并保存文件。然后运行 -
service networking restart