[avahi] post-up/up route add

j2u4 j2u4 j2u44u at gmail.com
Wed Feb 24 13:51:01 PST 2010

I have 3 machines on my network, all of which share a common zeroconf
network with at least one other device. 1 machine (bridge.local) has 2
nicks, one of which connects to the dsl modem and provides bridging for the
rest of the NAT'd network from the zeroconf network to the outside world.

Two questions:

1. I have a 'post-up route add' command on both of the non-bridge machines,
where the zerconf name of the gateway 'bridge.local' is used. This almost
never works the first time, upon boot, even though the interface is live and
I can otherwise reach the other .local machines. I always have to do a
'/etc/init.d/network restart' for it to take effect, so that these machines
can get to the rest of the internet (or manually do a 'route add' command).
I assume this has to do with the timing of getting the avahi interface up
and/or resolving the name of 'bridge.local' ... is there anything I can do
to make this work automatically, aside from fragile at/cron scripts? A
standard way to make this work?

2. If I ever need to reboot bridge.local, it comes back up with a new ip
address and now the routes on the rest of the network are broken. Again, I
have to restart networking manually, or adjust the routes manually on these
boxes. I could add a watcher script that notices when the gateway box has an
IP change and then fixes it automatically, but again that seems fragile. Any
standard way to deal with this?

Maybe I'm approaching this entire setup incorrectly? I used to have all
boxes with static IPs on a network. I only switched to avahi
interfaces because I have a HDHomerun on the network that these boxes need
to be able to see, and it only exposes a zeroconf network. Is there a better
way to make all this work together?

Running latest version of Ubuntu (Karmic), if that helps.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/avahi/attachments/20100224/5904dbeb/attachment.htm>

More information about the avahi mailing list