以太网未检测到

在ubuntu14.04中未检测到以太网。 只有在运行“sudo ethtool -s eth0 autoneg off speed 100”之后才能检测到它,之后它可以正常运行。 必须在每次启动后完成。 如何解决这个问题? ethtool eth0的输出是:

Settings for eth0: Supported ports: Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: Not reported Advertised pause frame use: No Advertised auto-negotiation: No Speed: 100Mb/s Duplex: Half Port: PHYAD: 0 Transceiver: ] Auto-negotiation: off Cannot get wake-on-lan settings: Operation not permitted Current message level: Link detected: yes 

sudo lshw -C网络的输出是:

 *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: logical name: eth0 version: 10 serial: size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: configuration: autonegotiation=off broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=yes multicast=yes port= speed=100Mbit/s 

我建议你在/etc/rc.local中添加所需的行:

 gksudo gedit /etc/rc.local 

如果您没有文本编辑器gedit,请使用nano或kate或leafpad。 在0号出口正上方添加一行:

 ethtool -s eth0 autoneg off speed 100 

仔细校对,保存并关闭文本编辑器。 你应该全力以赴。