[colug-432] Ubuntu … is not Redhat

Rick Hornsby richardjhornsby at gmail.com
Fri Apr 19 23:42:24 EDT 2013


It has been a while since I've messed with Ubuntu.  Wow have things changed.  I'm a RHEL admin by day, but have been working on setting up Ubuntu (/etc/debian_version says wheezy/sid) as a NAT/DNS/DHCP box at home.  I'm not used to getting told to stop using the init script directly.  The way that things get started, stopped, and started on boot (update-rc.d instead of chkconfig?) seems to be one of the huge differences between RH and Ubuntu/Debian.  (The differences between yum/rpm and apt I can deal with.  I actually prefer apt.)

At the moment, I'm scratching my head on that front.  I have bind9, dhcpd, and a nat script for setting up the MASQ all working fine sort of.

One thing I can't figure out right now is why the default route is getting set up incorrectly on boot:

rhornsby at archer:/etc/init$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.16.0.1      0.0.0.0         UG    0      0        0 eth1
172.16.0.0      0.0.0.0         255.255.254.0   U     0      0        0 eth1
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

The external interface is eth0.  (192.168.2.0 is the network because the box is on a test bench right now, not directly attached to the internet).  The internal interface is eth1.  I've noticed that if I full stop start the networking service, the routing is set up correctly, but not if the system is booted up.  I can also manually change the routing table after boot and things seem to run fine.  A client attached to eth1 gets an address from dhcpd and can get to the internet.

I think this has to be related somehow - but it looks like in /var/log/syslog, during boot, bind9 has started and restarted several times (really not entirely clear why) before eth1 ever comes up.

This is /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
        address 172.16.0.1
        netmask 255.255.254.0
        gateway 172.16.0.1

Despite telling bind that it should only listen on 172.16.0.1 and 127.0.0.1, the logs show that it is binding to 192.168.2.8 (the DHCP assigned address for eth0).

Apr 13 20:11:35 archer named[996]: listening on IPv4 interface eth0, 192.168.2.8#53

I'm not even sure where to look at this point, because I'm so unfamiliar with this up-start stuff.  Any ideas?

thanks!
-rick


More information about the colug-432 mailing list