最近我有一个新的路由器(Fritz.Box 6490),不得不改变我的NAS上的网络设置。我打开了我的基于debian-wheezy的OpenMediaVault-PC,并通过手动编辑/ etc / network / interfaces将eth0设置为DHCP(之前修复为192.168.0.2)。 NAS可以在我的家庭网络上再次访问。然后,我想通过桌面上的SSH根会话升级我的系统,所以我给了 apt-get update
试一试,结果是这个错误对所有来源都是一样的:
Err http://ftp.de.debian.org wheezy Release.gpg
On resolving »ftp.de.debian.org:http« something bad happened (-5 - no hostname belong to this address).
// output translated by myself
我注意到我无法ping通路由器 ping fritz.box
,但在使用时 ping 192.168.178.1
它工作正常。互联网访问似乎也运行良好,因为我甚至可以用它的IP ping google.com。我想因此它不会是网络配置问题。
还有什么可能是这里的问题?我已经检查了其他几个东西,但Linux并不是我的强项,所以我在下面包含了一组可能有助于实现目标的输出。
的/ etc /网络/接口:
# The loopback network interface
auto lo
iface lo inet loopback
# eth0 network interface
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
pre-down ethtool -s $IFACE wol g
iface eth0 inet6 manual
pre-down ip -6 addr flush dev $IFACE
路线-n:
Ziel Router Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.178.1 0.0.0.0 UG 0 0 0 eth0
192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
使用ifconfig:
eth0 Link encap:Ethernet Hardware Adresse d0:50:99:76:10:e9
inet Adresse:192.168.178.27 Bcast:192.168.178.255 Maske:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:2929 errors:0 dropped:0 overruns:0 frame:0
TX packets:2243 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:607082 (592.8 KiB) TX bytes:611104 (596.7 KiB)
Interrupt:136 Basisadresse:0xc000
lo Link encap:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
UP LOOPBACK RUNNING MTU:16436 Metrik:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/etc/apt/sources.list中:
# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150629-08:52]/ wheezy contrib main non-free
# deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official Snapshot amd64 LIVE/INSTALL Binary 20150629-08:52]/ wheezy contrib main non-free
deb http://ftp.de.debian.org/debian/ wheezy main
deb-src http://ftp.de.debian.org/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
# wheezy-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ wheezy-updates main contrib non-free