在解决了这么多问题之后,我现在对 Ubuntu 14.04 感到非常沮丧。
我在工作中使用当前的笔记本电脑,它似乎确实能够通过有线网络正确连接。但是当我在家里尝试同样的事情时,它失败了 - 它似乎没有通过 eth0 找到任何连接,我的旧笔记本电脑(装有 Ubuntu 12)使用相同的电缆就可以正常工作。
我意识到已经有很多关于这个问题的问题,有很多类似/不同的解决方案,在写这个问题之前,我已经测试了很多,但都没有成功:
我尝试过的方法,以任意组合/在其他问题中建议的解决方案:
我在编辑前后尝试过类似的命令 - 也多次重新启动了计算机sudo service network-manager restart
。sudo service network-interface restart INTERFACE=eth0
我编辑了/etc/network/interfaces
,它目前看起来像这样:
auto eth0
iface eth0 inet dhcp
我编辑/etc/resolv.cong
并添加nameserver 8.8.8.8
我编辑了/etc/hosts
我开始managed=true
了/etc/NetworkManager/NetworkManager.conf
(后来又回去了,managed=false
因为似乎不起作用)
我尝试在路由器上根据笔记本电脑的MAC设置固定IP。
我无法通过 GUI 编辑任何内容,所有选项(编辑连接......等)都变灰。
编辑:ethtool eth0
按要求添加了输出。不得不手动输入,现在链接显然在工作时也不起作用(我这边没有变化,笔记本电脑在晚上关机了,昨天在工作时还能用 - 现在,我根本没有任何连接)。
编辑 2:添加了 lscpi 输出
现在,这里是/var/log/syslog
和ifconfig
之后的 a sudo service network-manager restart
:
root@laptop:~# ifconfig
eth0 Link encap:Ethernet HWaddr 28:d2:44:bf:ab:ed
inet6 addr: fe80::2ad2:44ff:febf:abed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:33030 (33.0 KB)
Interrupt:20 Memory:f1600000-f1620000
eth0:avahi Link encap:Ethernet HWaddr 28:d2:44:bf:ab:ed
inet addr:169.254.11.229 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:f1600000-f1620000
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:142 errors:0 dropped:0 overruns:0 frame:0
TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11488 (11.4 KB) TX bytes:11488 (11.4 KB)
wlan0 Link encap:Ethernet HWaddr 28:b2:bd:92:d6:fa
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)
root@laptop:~# tail /var/log/syslog -f
Oct 18 20:45:26 laptop avahi-autoipd(eth0)[2930]: Successfully called chroot().
Oct 18 20:45:26 laptop avahi-autoipd(eth0)[2930]: Successfully dropped root privileges.
Oct 18 20:45:26 laptop avahi-autoipd(eth0)[2930]: Starting with address 169.254.11.229
Oct 18 20:45:33 laptop avahi-autoipd(eth0)[2930]: Callout BIND, address 169.254.11.229 on interface eth0
Oct 18 20:45:33 laptop avahi-daemon[789]: Joining mDNS multicast group on interface eth0.IPv4 with address 169.254.11.229.
Oct 18 20:45:33 laptop avahi-daemon[789]: New relevant interface eth0.IPv4 for mDNS.
Oct 18 20:45:33 laptop avahi-daemon[789]: Registering new address record for 169.254.11.229 on eth0.IPv4.
Oct 18 20:45:37 laptop avahi-autoipd(eth0)[2930]: Successfully claimed IP address 169.254.11.229
Oct 18 20:46:07 laptop ntpdate[2997]: Can't find host ntp.ubuntu.com: Name or service not known (-2)
Oct 18 20:46:07 laptop ntpdate[2997]: no servers can be used, exiting
Oct 18 20:47:12 laptop sudo: pam_ecryptfs: pam_sm_authenticate: /home/katai is already mounted
Oct 18 20:47:12 laptop NetworkManager[2851]: <info> caught signal 15, shutting down normally.
Oct 18 20:47:12 laptop NetworkManager[2851]: <info> (wlan0): device state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
Oct 18 20:47:12 laptop NetworkManager[2851]: <info> (wlan0): cleaning up...
Oct 18 20:47:12 laptop NetworkManager[2851]: <info> (wlan0): taking down device.
Oct 18 20:47:12 laptop NetworkManager[2851]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 18 20:47:12 laptop NetworkManager[2851]: <info> exiting (success)
Oct 18 20:47:12 laptop kernel: [ 733.342547] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Oct 18 20:47:12 laptop ModemManager[2823]: <info> Caught signal, shutting down...
Oct 18 20:47:12 laptop ModemManager[2823]: <info> ModemManager is shut down
Oct 18 20:47:12 laptop ModemManager[3092]: <info> ModemManager (version 1.0.0) starting...
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> NetworkManager (version 0.9.8.8) is starting...
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> Read config file /etc/NetworkManager/NetworkManager.conf
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> WEXT support is enabled
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> VPN: loaded org.freedesktop.NetworkManager.pptp
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> DNS: loaded plugin dnsmasq
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: init!
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: update_system_hostname
Oct 18 20:47:12 laptop NetworkManager[3098]: interface-parser: parsing file /etc/network/interfaces
Oct 18 20:47:12 laptop NetworkManager[3098]: interface-parser: finished parsing file /etc/network/interfaces
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPluginIfupdown: guessed connection type (eth0) = 802-3-ethernet
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: update_connection_setting_from_if_block: name:eth0, type:802-3-ethernet, id:Ifupdown (eth0), uuid: 681b428f-beaf-8932-dce4-687ed5bae28e
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: adding eth0 to connections
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: adding iface eth0 to eni_ifaces
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: autoconnect
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPluginIfupdown: management mode: unmanaged
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:19.0/net/eth0, iface: eth0)
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPluginIfupdown: locking wired connection setting
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0/net/wlan0, iface: wlan0)
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0/net/wlan0, iface: wlan0): no ifupdown configuration found.
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/lo, iface: lo)
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/lo, iface: lo): no ifupdown configuration found.
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: end _init.
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> Loaded plugin ifupdown: (C) 2008 Canonical Ltd. To report bugs please use the NetworkManager mailing list.
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> Loaded plugin keyfile: (c) 2007 - 2010 Red Hat, Inc. To report bugs please use the NetworkManager mailing list.
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ofono: Acquired D-Bus service com.canonical.NMOfono
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ofono: init!
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ofono: end _init.
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> Loaded plugin (null): (null)
Oct 18 20:47:12 laptop NetworkManager[3098]: Ifupdown: get unmanaged devices count: 1
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: (34219568) ... get_connections.
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ifupdown: (34219568) ... get_connections (managed=false): return empty list.
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ofono: (34004416) ... get_connections.
Oct 18 20:47:12 laptop NetworkManager[3098]: SCPlugin-Ofono: (34004416) connections count: 0
Oct 18 20:47:12 laptop NetworkManager[3098]: Ifupdown: get unmanaged devices count: 1
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> monitoring kernel firmware directory '/lib/firmware'.
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> rfkill1: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0/ieee80211/phy0/rfkill1) (driver iwlwifi)
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> WiFi enabled by radio killswitch; enabled by state file
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> WWAN enabled by radio killswitch; enabled by state file
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> WiMAX enabled by radio killswitch; enabled by state file
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> Networking is enabled by state file
Oct 18 20:47:12 laptop NetworkManager[3098]: <warn> failed to allocate link cache: (-12) Object not found
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (eth0): carrier is ON
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (eth0): new Ethernet device (driver: 'e1000e' ifindex: 2)
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (eth0): exported as /org/freedesktop/NetworkManager/Devices/0
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (wlan0): using nl80211 for WiFi device control
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (wlan0): driver supports Access Point (AP) mode
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (wlan0): new 802.11 WiFi device (driver: 'iwlwifi' ifindex: 3)
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (wlan0): exported as /org/freedesktop/NetworkManager/Devices/1
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Oct 18 20:47:12 laptop NetworkManager[3098]: <info> (wlan0): bringing up device.
Oct 18 20:47:12 laptop kernel: [ 733.397446] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S
Oct 18 20:47:12 laptop kernel: [ 733.397698] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0): preparing device.
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0): deactivating device (reason 'managed') [2]
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> NetworkManager state is now CONNECTED_GLOBAL
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 18 20:47:13 laptop NetworkManager[3098]: <warn> /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
Oct 18 20:47:13 laptop kernel: [ 733.409840] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Oct 18 20:47:13 laptop kernel: [ 733.410134] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Oct 18 20:47:13 laptop NetworkManager[3098]: <warn> /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> urfkill disappeared from the bus
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 18 20:47:13 laptop NetworkManager[3098]: message repeated 2 times: [ <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)]
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0) supports 5 scan SSIDs
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0): supplicant interface state: starting -> ready
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> Unmanaged Device found; state CONNECTED forced. (see http://bugs.launchpad.net/bugs/191889)
Oct 18 20:47:13 laptop NetworkManager[3098]: <warn> Trying to remove a non-existant call id.
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> ModemManager available in the bus
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0): supplicant interface state: ready -> disconnected
Oct 18 20:47:13 laptop NetworkManager[3098]: <info> (wlan0) supports 5 scan SSIDs
Oct 18 20:47:15 laptop ModemManager[3092]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:19.0': not supported by any plugin
Oct 18 20:47:15 laptop ModemManager[3092]: <warn> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.1/0000:04:00.0': not supported by any plugin
Oct 18 20:47:16 laptop NetworkManager[3098]: <info> (wlan0): supplicant interface state: disconnected -> inactive
#root@laptop:~$ ethtool eth0
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 2
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
root@laptop:~# lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)
00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d4)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM87 Express LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)
02:00.0 VGA compatible controller: NVIDIA Corporation GK208M [GeForce GT 730M] (rev ff)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
04:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)