Public bug reported:

I'm having a bit of an issue with avahi-daemon on Ubuntu Gutsy.

My home network consists of an ADSL modem that includes a WiFi & ethernet 
router, into which I have plugged:
1) one laptop, running Gutsy, connected via ethernet; let's call it gutsy-eth.
2) one laptop, running Gutsy, connected via WiFi; let's call it gutsy-wifi.
3) some other computers I don't own, among which a Macbook running MacOS X.

The router/modem has a DHCP server, which I normally use for configuring
the network. (For practical reasons the router is not configurable, thus
I have to just deal with how it works right now.)

So normally every laptop connects to the network (via Network Manager
for Linux, and whatever MacOS uses), asks for an address from the
router's DHCP server, and stuff (almost) just works.

Here come the problem:

The router occasionally resets itself. I don't know why, and it's not
really relevant. The important thing is that when this happens, it takes
a couple minutes, sometimes longer, before each of its services come
back up (ie, ethernet, wifi, internet, not necessarily in that order).

The trouble is that when this happens, the network interfaces get
disconnected (the ethernet laptop is plugged directly into the router,
so it probably sees the cable disconnect during the reboot, and the wifi
laptop just notices the wifi isn't working). At this point, the Network
Manager starts trying to reconnect, which of course it can't because the
router is still rebooting. At some point the networks are both working
(ie, the interfaces come up), but for some reason the DHCP server isn't
running yet on the router. So what happens is that dhclient tries for a
bit, then gives up, and avahi-autoipd comes up and sets a link-local
address (169.blah.blah).

Then the DHCP server comes up, and the Macbook and other computers (not
Gutsy on any of them) notice this, get an address, and just work.

The issue is that the link-local address doesn't work for accessing the
other computers. The two Gutsy machines can talk to each other, but (1)
internet doesn't work, presumably because the gateway on the router is
in the 192.168.1.* domain, (2) the other machines can't see the Gutsy
computers, presumably because they're on the same 192.* domain where the
DHCP server puts them, and (3) the Gutsy computers can't see the other
machines, despite what /etc/network/if-up.d/avahi-autoipd claims to do
(ie, add a default route to allow accessing non-link-local-addressed
machines).

When this happens (randomly, say at night) the two laptops essentially
are removed from the network, which is annoying because (a) one of them
serves files to the other machines and (b) I have to actually walk to
each machine to reset its network.

Now, I can't turn the entire network to link-local addresses (since I don't 
control all machines, including the router), and I don't really want to remove 
avahi-autoipd completely (since I do move the machines to other networks, 
occasionally; also, autoipd is cool). I was wondering if there's a way to (in 
order of preference):
1) Have the laptops to somehow notice when a DHCP server comes up, and switch 
from link-local addresses (if they have them) to a DHCP address; 
2) Increase the timeout before dhclient gives up in favour of avahi-autoipd, to 
give enough time to the router to come up.
3) Disable avahi-autoipd without uninstalling it and without disturbing 
avahi-daemon services (eg, mDNS publishing/discovery on whatever connection 
method succeeded).

** Affects: avahi (Ubuntu)
     Importance: Undecided
         Status: New

-- 
avahi-autoipd takes over when the router fails, breaks DHCP
https://bugs.launchpad.net/bugs/153969
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to