[feisty] nm gives me an ip even if there is no cable

Bug #78078 reported by Nicolò Chieffo
16
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Fix Released
Undecided
Riccardo Setti

Bug Description

Binary package hint: network-manager

when I boot the pc sometimes it can happen that my cable is not plugged. I discovered that in this case someone (I think network manager) gives me an ip and creates a new interface calles eth0:avahi or something similar. this is not usefull since sometimes (rarely) this prevents wireless to work. I think because the default gateway of eth0:avahi have been given more importance than the wireless one.

Revision history for this message
Maftoul Samuel (samuel-maftoul) wrote :

Thanks for your bug report.
I think, the fact that you have an ip address is normal, this is the new feature of avahi called IPv4LL.
you say: "this is not usefull since sometimes (rarely) this prevents wireless to work", do you know when this happens ?
The eth0:avahi interface should not prevent the wireless interface to work.

Changed in avahi:
status: Unconfirmed → Needs Info
Revision history for this message
Nicolò Chieffo (yelo3) wrote : Re: [Bug 78078] Re: [feisty] nm gives me an ip even if there is no cable

It happened two times. Now I cannot give additional info, I'm sorry. I
don't have a wireless lan now. Just have to wait.

Revision history for this message
Laurent Bigonville (bigon) wrote :

Whats that IP? if it begin with 169.... I think it's normal

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

yes it starts with that. but why shoud I need an ip? the cable is not connected!

Revision history for this message
Emmet Hikory (persia) wrote :

Assignment of a local net IP is incorrect if the link status is down. Avahi should only assign the local IP (169.154.x.x) if the link is up and there is neither a static definition nor a DHCP assignment. This would cover the case where a crossover cable or local hub/switch is used, yet not cause spurious assignments in the case that no cable is connected. It is especially desireable to have no address for no cable, as this assists the user in diagnosing access difficulty when the cable is intended to be connected.

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

You are definitely right

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Which information is needed?
I think that the bug can be solved preventing avahi to give an IP to an interface without a plugged cable.

Revision history for this message
didier (did447-deactivatedaccount) wrote :

Is your config detecting that there's no cable? Search for eth messages in /var/log/syslog.

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Feb 6 14:59:46 yelo3-laptop kernel: [ 8021.092000] tg3: eth0: Link is down.

Feb 6 14:59:46 yelo3-laptop avahi-daemon[4580]: Withdrawing address
record for 192.168.1.3 on eth0.
Feb 6 14:59:46 yelo3-laptop avahi-daemon[4580]: Leaving mDNS
multicast group on interface eth0.IPv4 with address 192.168.1.3.
Feb 6 14:59:46 yelo3-laptop avahi-daemon[4580]: Interface eth0.IPv4
no longer relevant for mDNS.
Feb 6 14:59:46 yelo3-laptop avahi-autoipd(eth0)[7369]: Found user
'avahi-autoipd' (UID 109) and group 'avahi-autoipd' (GID 117).
Feb 6 14:59:46 yelo3-laptop avahi-autoipd(eth0)[7369]: Successfully
called chroot().
Feb 6 14:59:46 yelo3-laptop avahi-autoipd(eth0)[7369]: Successfully
dropped root privileges.
Feb 6 14:59:46 yelo3-laptop avahi-autoipd(eth0)[7369]: fopen()
failed: Permission denied
Feb 6 14:59:46 yelo3-laptop avahi-autoipd(eth0)[7369]: Starting with
address 169.254.7.228
Feb 6 14:59:47 yelo3-laptop NetworkManager:
nm_device_is_802_3_ethernet: assertion `dev != NULL' failed
Feb 6 14:59:47 yelo3-laptop NetworkManager:
nm_device_is_802_11_wireless: assertion `dev != NULL' failed
Feb 6 14:59:47 yelo3-laptop avahi-daemon[4580]: Withdrawing address
record for MY-MAC on eth0.
Feb 6 14:59:52 yelo3-laptop avahi-autoipd(eth0)[7369]: Callout BIND,
address 169.254.7.228 on interface eth0
Feb 6 14:59:52 yelo3-laptop avahi-daemon[4580]: Joining mDNS
multicast group on interface eth0.IPv4 with address 169.254.7.228.
Feb 6 14:59:52 yelo3-laptop avahi-daemon[4580]: New relevant
interface eth0.IPv4 for mDNS.
Feb 6 14:59:52 yelo3-laptop avahi-daemon[4580]: Registering new
address record for 169.254.7.228 on eth0.IPv4.
Feb 6 14:59:56 yelo3-laptop avahi-autoipd(eth0)[7369]: Successfully
claimed IP address 169.254.7.228
Feb 6 14:59:56 yelo3-laptop avahi-autoipd(eth0)[7369]: fopen()
failed: Permission denied

Revision history for this message
Stephen Drake (spd106) wrote :

I have this problem on my laptop with a cardbus ethernet adaptor. You can see in the attached log that the card is detected and after dhcp fails it is assigned an address via avahi-autoipd. If I then plug in the cable the kernel reports a link beat and the network works as it is pre-configured. Then when I remove the cable the kernel reports the lost link beat, but network manager does nothing.

Revision history for this message
Massimo Forti (slackwarelife) wrote :

But all works if you edit /etc/network/interface and put # before all line except the line there is "lo"
I open a report bug for this because all how-to in wiki-ubuntu about "nm" say this.

thanks

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

I have everything commented except lo but I get the auto-ip with no cable

Revision history for this message
Massimo Forti (slackwarelife) wrote :

Open the network-admin:

$: gksu network-admin

The cable interface has the roaming mode anabled ???

By default it is not so :(

Revision history for this message
Emmet Hikory (persia) wrote :

On my workstation, both wired interfaces have the roaming mode enabled (I have never adjusted network manager settings).

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

my eth card is in roaming too

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

this happens only if I remove the cable: if I boot without any cable the avahi interface is not enabled

it is important to fix this bug because every application thinks that the system is connected (because it has a default route assigned by avahi)

further info: I don't know what's happening, bug even if avahi is not running and it is disabled from /etc/default/avahi-daemon I get the avahi interface: who is launching avahi-autoipd?

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

I found a simple fix. maybe we have this problem only because we were upgrading from and older ubuntu version

try with this and tell me if it works

 sudo apt-get --purge install avahi-autoipd --reinstall

Revision history for this message
Emmet Hikory (persia) wrote :

    This seems to address the issue. When first running the command, there was no change to my configuration (eth0 with DHCP address, eth1 with none, and eth1:avahi with adhoc address). Unplugging eth0 did not generate any eth0 adhoc address. Connecting eth1 disabled the eth1:avahi interface, and provided a connection. Unplugging eth1 did not regenerate eth1:avahi. Attaching eth0 set everything correctly. Also, the act of reconnecting the cables appears to have disabled roaming mode on both interfaces. I don't have a crossover currently, but I submit that the use of adhoc wired networking still needs to be tested (if I plug my laptop into yours, we should then have a network, which goes away when the cable is disconnected).

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

the adhoc wired network can be tested simply with a switch (not
connected to any dhcp) have you got one? I don't.

Revision history for this message
Emmet Hikory (persia) wrote :

My switch is currently in use by a DHCP server and other users. I should have an opportunity to be alone with the switch in the next couple days, and I'll try then. Thanks for the reminder that I don't need a crossover to establish LINK UP.

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

I managed to disable the dhcp server in my router. the result is that
network manager waits for the dhcp timeout and then it assigns the
no-ip configuration, through the eth0:avahi interface. So everything
is working and I think we can close this bug

Revision history for this message
Emmet Hikory (persia) wrote :

Great! I'm not sure about closing the bug though: is it present in the released 6.10 or 6.06LTS? If so, logic should be in the postinst to clean up the brokenness for upgrades, as otherwise other users may encounter this bug after it has been closed, and open a new one. Perhaps just updating the description to indicate that the problem is related to upgrades, and does not affect new users installing 7.04 or later.

Changed in avahi:
status: Needs Info → Confirmed
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

ok... have anyone tried with a clean feisty install?
anyway previous ubuntu versions didn't have network manager
preinstalled (and so I think that they didn't have avahi too, but I'm
not sure)

at the end the error was that during an upgrade (during feisty
development) a configuration file was not overwritten. maybe people
who are upgrading from edgy/dapper will not have this problem, but I
cannot test it

Revision history for this message
Hannes Heller (hannes-heller) wrote :

I have a similar problem:

upgraded from edgy to feisty. network worked fine for several days. SOME incident then suddenly broke it tis morning (with yet no solution).
the symptomes are: I suddenly get an additional interface eth0:avahi in Network Tools -> Devices. It is one of those, that have a random local IP addressed. That interface seems to be active but not working. The working setup on my second machine does not have such an interface. It uses the normal eth0 with DHCP. The broken machine did use this too before, when it was still working. Now I would like to know, how I can get rid of this eth0:avahi interface. When reading through the documentation on networking, i realize, that most of it seems outdated. The suggestions that are given to solve similar problems dont work, maybe because something always brings up this avahi interface.

Revision history for this message
omingo (henrik-e-westman) wrote :

Hannes,

I had the same problem and did a writeup of the fix here:

http://omingo.zorngrid.com/

Hope it works for you too.

Revision history for this message
Johnathon (kirrus) wrote :

I have a bug report with a similar error log, but I believe it is a separate issue. Bug #110394. Possibly, may be affected by this issue?

Changed in avahi:
assignee: nobody → giskard
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

I think that it is fixed in gutsy. I don't have eth0:avahi no more! Let's mark it fixed for now. Reopen it if you still have this problem in gutsy

Changed in avahi:
status: Confirmed → Fix Released
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Sorry, the bug is still here. I will attach some logs and describe the new situation in gutsy:
now if you boot without the cable, nm will think that you are connected, this is different in feisty, because there was the missing connectivity icon!
When you start gnome you can see the 2 meteors icon, that inform the user that the network is acquiring an address, and then you will get the normal 2 computers icon, which means that you are connected.
If you go to connection information, you see everything 0.0.0.0 0.0.0.0 ecc. but if you do as ifconfig you can see the eth0:avah interface :(

I will do some more tests and describe what happens when I replug the cable after the eth0:avah interface is brought up

Changed in avahi:
status: Fix Released → Confirmed
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

relevant part

Jul 10 10:00:32 yelo3-laptop NetworkManager: <info> Will activate wired connection 'eth0' because it now has a link.

this is not true. The link is down

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

Unfortunately this not only happens on boot, but every time I remove and reinstall the module, with the cable unplugged.
relevant part of /var/log/messages

Jul 10 10:20:24 yelo3-laptop kernel: [ 1232.272000] tg3: eth0: Link is down.
Jul 10 10:20:29 yelo3-laptop kernel: [ 1237.048000] ACPI: PCI interrupt for device 0000:02:00.0 disabled
Jul 10 10:20:36 yelo3-laptop kernel: [ 1244.604000] tg3.c:v3.77 (May 31, 2007)
Jul 10 10:20:36 yelo3-laptop kernel: [ 1244.604000] ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKB] -> GSI 4 (level, low) -> IRQ 4
Jul 10 10:20:37 yelo3-laptop kernel: [ 1244.652000] eth0: Tigon3 [partno(BCM95788A50) rev 3003 PHY(5705)] (PCI:33MHz:32-bit) 10/100/1000Base-T Ethernet 00:11:2f:b5:41:dd
Jul 10 10:20:37 yelo3-laptop kernel: [ 1244.652000] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[0] TSOcap[1]
Jul 10 10:20:37 yelo3-laptop kernel: [ 1244.652000] eth0: dma_rwctrl[763f0000] dma_mask[32-bit]

-----

when I replug the cable
Jul 10 10:24:13 yelo3-laptop kernel: [ 1460.812000] tg3: eth0: Link is up at 100 Mbps, full duplex.
Jul 10 10:24:13 yelo3-laptop kernel: [ 1460.812000] tg3: eth0: Flow control is off for TX and off for RX.
Jul 10 10:24:13 yelo3-laptop kernel: [ 1460.816000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jul 10 10:24:14 yelo3-laptop avahi-daemon[7003]: Registering new address record for fe80::211:2fff:feb5:41dd on eth0.*.

And the interface eth0:avah will remain, so that eth0 is not reconfigured with dhcp
------
if I remove the cable again, the eth0:avah is removed
Jul 10 10:25:39 yelo3-laptop NetworkManager: <info> SWITCH: terminating current connection 'eth0' because it's no longer valid.
Jul 10 10:25:39 yelo3-laptop NetworkManager: <info> Deactivating device eth0.
Jul 10 10:25:39 yelo3-laptop NetworkManager: nm_device_is_802_3_ethernet: assertion `dev != NULL' failed
Jul 10 10:25:39 yelo3-laptop NetworkManager: nm_device_is_802_11_wireless: assertion `dev != NULL' failed
Jul 10 10:25:39 yelo3-laptop avahi-daemon[7003]: Withdrawing address record for 169.254.7.228 on eth0.
Jul 10 10:25:39 yelo3-laptop avahi-daemon[7003]: Leaving mDNS multicast group on interface eth0.IPv4 with address 169.254.7.228.
Jul 10 10:25:39 yelo3-laptop avahi-daemon[7003]: Interface eth0.IPv4 no longer relevant for mDNS.
Jul 10 10:25:39 yelo3-laptop avahi-daemon[7003]: Withdrawing address record for fe80::211:2fff:feb5:41dd on eth0.
------
now if I replug the cable, it gives me the correct address!

So this problem might be a kernel module problem, since it thinks that it has a link only when the module is loading even if there is no cable...
What do you think? Can someone in gutsy test if the things that are happening to me, happens to him, too?
Thanks

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

seems fixed again:

1. 24a_svn2578-gnome354565-fix-ethernet-link-detection-races.patch:
      - prefetch patch from 0.6.0 release branch (rev 2578)

Changed in avahi:
status: Confirmed → Fix Released
Revision history for this message
Paul Geuljans (olcbeheerder) wrote :

I have the same problem described. I am using Linux Mint 4.0, based on Ubuntu 7.10 Gutsy Gibbon quite recent so.
The cause of the problem I can only think of is: I recently reported a bug to Ubuntu. Some program started in the background then. A tab was added, I couldnot refuse that. A screenprint was sent with the bugreport (eog)

https://bugs.launchpad.net/ubuntu/+bug/237812

I tried to Configure eth0: avahi, It was not possible: no Interface it said.
As I unplugged the cable twice the problem was gone.
 There was no longer eth0: avahi and my Internet connection worked again. It seems that I should not ask for help of Ubuntu :)

 I didnot restart my laptop, so I cannot say now if the problem resists.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.