decibelcooper |
06-13-2012 07:29 PM |
resolvconf fails to add nameservers from static interface
Hi all.
I have a server running Ubuntu 12.04 Server that acts as, among other things, a dhcp server and gateway for a local network. It has one ethernet interface (eth0) that is on the local network, and another (eth1) that is connected to a WAN. Both interfaces are defined as static in /etc/network/interfaces
Quote:
iface lo inet loopback
auto lo
# The primary network interface
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
auto eth0
iface eth1 inet static
address 129.219.144.14
netmask 255.255.255.192
gateway 129.219.144.1
dns-nameservers 8.8.8.8 8.8.4.4
up ethtool --offload tx off rx off
auto eth1
|
It has worked flawlessly in this manner for a little while, and then apparently some automatic security update has occured and has broken something with the eth1 interface, causing resolvconf to not add the nameservers for the statically defined eth1. The interface still works, and the server still works fine as a gateway, but when administering the server, domains cannot be resolved because /etc/resolv.conf contains only a header.
When calling "sudo ifdown eth1", I get
Quote:
ifdown: interface eth1 not configured
|
When calling "sudo ifup eth1", I get
Quote:
RTNETLINK answers: File exists
Failed to bring up eth1.
|
For "ifconfig", I get
Quote:
eth0 Link encap:Ethernet HWaddr 00:30:67:a5:0a:65
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:67ff:fea5:a65/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5839 errors:0 dropped:0 overruns:0 frame:0
TX packets:6228 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1071957 (1.0 MB) TX bytes:4594693 (4.5 MB)
Interrupt:44 Base address:0xe000
eth1 Link encap:Ethernet HWaddr d8:9d:b9:00:08:de
inet addr:129.219.144.14 Bcast:129.219.144.63 Mask:255.255.255.192
inet6 addr: fe80::da9d:b9ff:fe00:8de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24416 errors:0 dropped:36 overruns:0 frame:0
TX packets:5133 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6431777 (6.4 MB) TX bytes:1002944 (1.0 MB)
Interrupt:45
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:100 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7608 (7.6 KB) TX bytes:7608 (7.6 KB)
|
So the interface is somehow successfully being brought up on boot, even though manually calling ifdown and ifup fails.
Now, I could bandaid the setup by putting my nameservers in the resolvconf header file, but I would rather get to the bottom of this. My question is then, how can I go about tracking down the cause of this problem, and/or how can I fix it?
Thanks in advance.
|