[colug-432] Ubuntu … is not Redhat

Rob Funk rfunk at funknet.net
Sun Apr 21 12:43:36 EDT 2013


On Friday, April 19, 2013 10:42:24 PM Rick Hornsby wrote:
> 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)

debian_version isn't as useful as /etc/os-release and /etc/lsb-release. On 
an unfamiliar Linux system I usually do "cat /etc/*release", which also 
catches redhat_release.

>   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.

update-rc.d came from Debian, along with lots of other update-* commands. I 
think it's useful to type update-TAB and look at all the options of OS parts 
to update.

Howver, Ubuntu uses its own "Upstart" thing to start stuff on boot, though 
it's backward-compatible with the old init stuff. I still tend to run 
"/etc/init.d/whatever restart" instead of using the "service" command (which 
I believe is also on Red Hat), since I always forget the order of arguments 
to "service".

> 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

The default route is set to 172.16.0.1 because of the "gateway" line at the 
end of /etc/network/interfaces. Get rid of that if you don't want that as a 
default route.

Odd netmask you have there, btw.

> 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 that familiar with bind9, but you didn't post any of its 
configuration... Are you sure it's being told not to bind to the eth0 
address?

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

Upstart is irrelevant here. You still have scripts in /etc/init.d that you 
may be able to follow, but the real issue is your configuration elsewhere.




More information about the colug-432 mailing list