我可以通过 livecd 成功连接到网络,但无法通过我的硬盘连接到网络。
:~$ sudo ifup eth0
ifup: interface eth0 already configured
:~$ sudo lshw -class network
*-network DISABLED
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: eth0
version: 05
serial: ff:ff:ff:ff:ff:ff
size: 100Mbit/s
capacity: 100Mbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full latency=0 link=no multicast=yes port=MII speed=100Mbit/s
resources: irq:40 ioport:e000(size=256) memory:f0004000-f0004fff memory:f0000000-f0003fff
:~$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... RTNETLINK answers: No such process
SIOCSIFFLAGS: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
RTNETLINK answers: Network is down
run-parts: /etc/network/if-up.d/avahi-autoipd exited with return code 2
[ OK ]
如果您需要更多信息,请告诉我。
答案1
我在使用 Realtek 以太网控制器时也遇到了类似的问题。我使用的是不同的型号,但它表现出的行为与您描述的类似。我可以通过运行以下命令将其连接:
sudo ifconfig eth0 up
必须运行此命令每次我启动了计算机,因此您可能会发现将命令设为 bash 别名或 shell 脚本很有用。如果您需要指南,可以在网上找到很多。
答案2
$ sudo ifup eth0
ifup: interface eth0 already configured
/etc/network/interfaces
eth0 似乎已启动。使用连接编辑器确保 eth0 的配置正确,具体取决于您使用的是ifup
还是NetworkManager
。