Archive for May, 2005
Turns out the reason for seeing my default gateway go missing all the time was that the clocks weren’t set right. For example, node1 has the correct date/time, but node2 is still set at 1980. Quagga sees LSA’s from the opposite node and figures that they are “too old” and so discards them. The reason that node2 has the wrong time set is because during the Soekris install proedure, the hwclock is not written to with the correct time. The only time the hwclock gets updated is during a proper shutdown, which, on a Soekris, sometimes never happens. So, we need to make sure that each time we create a new Soekris, we get the right time with ntpdate, and then run hwclock -w to make sure it’s written to the hwclock, so that next time you boot up without network access (as most nodes will) we get the correct date and time and Quagga can do it’s routing magic properly.
May 11th, 2005
Today I spent quite some time working out a generic install procedure for the Rapid Deploy stuff, plus made a few little changes to DHCP server management to make things a bit nicer. I’ve documented the setup procedure at www.crc.net.nz/wiki/RapidDeploySetup
There’s lots of little tricky hacks that go on to make it work, like making resolv.conf resident on /var, and setting up proxy dns stuff during boot time (copying default files to /var, etc) which aren’t very nice. Also need to change the C_PATH variable in /etc/init.d/quagga to point to /var/quagga instead of /etc/quagga, but I guess all those things come with wanting to run on a read-only root filesystem. Doesn’t really make it portable (nicely).
Bleh.. could make a script to do the whole install, but I don’t think I’ll bother for now, it’s probably going to change a lot in the future anyway.
ProxyDNS is not-quite working yet, although at least it’s starting up properly now.. need to talk to Blake about that one. Quagga is doing it’s usual trick of not updating default gateways when links change.. need to know how to force a gateway calculation.. will talk to Matt about that tomorrow hopefully.
Next is somehow getting Rapid Deploy to run on Murray’s box he’s got in South Africa so he can demo it to some guys when he goes to England in the next couple of weeks.. Need to also integrate the signal monitor stuff with the rapid deploy stuff for him, although rapid deploy can do the AP stuff, so it shouldn’t be too hard.
May 8th, 2005
There’s a problem when you’re running a read-only filesystem and you need to get a DHCP lease. /etc/resolv.conf stores the DNS server addresses, which is on the read-only partition. One solution is to remount the partition read-write, get the lease, then remount read-only. There are a couple of disadvantages to this though: First, it’s mounted readonly for a reason - the Compact Flash cards only have a finite number of writes to the same block before they become b0rked. Second, pump (our dhclient) runs as a daemon, so if a lease runs out, it needs to re-write to /etc/resolv.conf, and at that stage we don’t know it’s happening.
At the moment, I’m telling it to ignore DNS, so Murray is having to configure DNS addresses manually on his clients. Bad. So, I figure, let’s make /etc/resolv.conf a symlink to /tmp/resolv.conf. /tmp is a ram-disk, so it can be read and written as often as it likes. A simple script can be written to run at startup to put defaults in to /tmp/resolv.conf (the CRCnet DNS servers). This way the change should be transparent to anything that is running already, and we get the added benefit of being able to get DNS addresses via DHCP, and use these addresses in our proxyDNS system.
May 6th, 2005
Spent much time trying to figure out why I couldn’t see HCHDG sentences coming out of the Garmin. Turns out that there is a recent firmware update on the site which fixes it, so I can now get compass bearing information out of the GPS unit.
Created a Python module today called “pytrex” to interface with the Garmin eTrex Summit GPS system. The python code reads NMEA sentences from the serial port at 4800 baud and stores the data. The module has various methods such as get_latitude(), get_longitude(), etc, etc.
May 5th, 2005