unable to get /etc/resolv.conf and /etc/network/interfaces configured properly in wheezy
With resolvconf package installed and configured for dynamic
generation of /etc/resolv.conf, I was *unable* to get any non-local
nameservers written into /etc/resolv.conf.
I tried a dns-nameservers line in the /etc/network/interfaces stanza
for the network interface card, and I tried nameserver lines in the
"base" resolvconf config file. Neither worked after a networking
reload/restart.
Documentation shown when going through dpkg-reconfigure for resolvconf
says that a reboot is necessary to make sure all components work
together as they should.
In my case networking did not come back at all and I can no longer ssh in.
I suppose the culprit is the change made to the interfaces file.
Previously, my file followed this format for multiple IP addresses on
a single nic like this (cf
https://wiki.debian.org/NetworkConfiguration):
auto eth0 eth0:1
iface eth0 inet static
address 192.168.1.42
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
auto eth0:1
allow-hotplug eth0:0
iface eth0:1 inet static
address 192.168.1.43
netmask 255.255.255.0
but both /etc/init.d/networking reload and restart had separate
problems besides not solving my resolv.conf problem. So I tried the
newer format at the bottom of the same wiki.debian.org page like this:
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.42
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8
iface eth0 inet static
address 192.168.1.43
netmask 255.255.255.0
Networking seemed OK reloading and restarting, but, sadly, not so when
rebooting, apparently.
Probably I took a wrong turn somewhere when upgrading from squeeze and
will have to rebuild the OS, but if anyone has an idea, I'd be
grateful if they would share it.
Mark
Reply to: