Ubuntu – No network access due to WLAN0:AVAHI

networkingwireless

I have a laptop with Ubuntu 11.04. Failed to connect my home wireless network, which is composed of a modem and a Netgear router.

ifconfig showing:

wlan0     Link encap:Ethernet  HWaddr 00:24:d6:07:2b:a2  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:30238 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24005 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:26945081 (26.9 MB)  TX bytes:3169731 (3.1 MB)

wlan0:avahi Link encap:Ethernet  HWaddr 00:24:d6:07:2b:a2  
          inet addr:169.254.6.188  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1

iwconfig showing :

wlan0     IEEE 802.11abgn  ESSID:"mywirelessnetwork"  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

I do not quite understand how the virtual interface wlan0:avahi appeared. My guess was, my request sudo dhclient wlan0 failed to get a valid ip, although I did not get any error message from running that command. I executed sudo dhclient wlan0 again, but still no error message or network connection.

Later today, I tried to connect to a public wireless network. Still got the same error. But when I reboot my machine, no such problems.

I am confused by the wired situations. Is there anything wrong with my network configuration? What should I do if I encounter similar problems in future?

Best Answer

May I suggest that you run the command

cat /etc/network/interfaces

This will show the contents of the interfaces file. It should read

auto lo

iface lo inet loopback

If there is anything else in this file then edit it out by this command

gksudo gedit /etc/network/interfaces

This will open the interfaces file in gedit with sudo permissions. So you can edit the file and save it. I had to do this once when I somehow got wlan0:avahi as the wireless connection and I could not remove it any other way. You may need to re-start and then Network manager will do its stuff.

Regards.

Related Question