我刚刚重新安装了我的 ubuntu 12.04 服务器,但我无法使网络正常工作,所以我无法更新机器。
有人能给我一些建议,告诉我可以尝试什么解决方案吗?
这里有一些信息供您参考。
$ip link
1: lo: <LOOPBACK, Up,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 cdisc pfifo_fast state UP qlen 1000
link/ether 00:0b:6a:dd:a6:f8 brd:ff:ff:ff:ff:ff:ff
$sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.223
netmask 255.255.255.0
gateway 192.168.0.226
dns-nameservers 192.168.0.228 192.168.5.253
$status networking
networking stop/waiting
$sudo service networking start
networking stop/waiting
$sudo ifdown eth0
$sudo ifup -v eth0
configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: execute /etc/network/if-pre-up.d/wireless-tools
run-parts: execute /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.0.223/255.255.25.0 broadcast + dev eth0 label eth0
ip link set dev eth0 up
ip route add default via 192.168.0.226 metric 100 dev eth0
run-parts --verbrose /etc/netwrok/if-up.d
run-parts: executing /etc/netwrok/if-up.d/000resolvconf
run-parts: executing /etc/netwrok/if-up.d/ntdate
run-parts: executing /etc/netwrok/if-up.d/openssh-server
ssh stop/waiting
ssh start/running, process 2111
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
IP 详细信息全部正确。我知道网络已启动并正在运行,因为我曾使用 Windows 计算机 ping IP 地址,但没有成功,并且我使用 MAC Pro 测试了电缆,它们处于活动状态。
我还注意到,当我插入以太网电缆时,开关上的灯没有亮
如果你需要更多信息请告诉我
谢谢
编辑:
添加了 ifup -v eth0 详细信息
答案1
也许您可以尝试替换iface eth0 inet dhcp
等等static adress
......
对我有用,但我真的不太了解 eth0 配置。