Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
Thanks! But my interfaces file does not have anything else except "auto lo iface lo inet loopback". I am afraid that something else is going wrong. BTW, I am not using Network Manager. I set up wireless connection via command line. –  chenxicali Jul 25 '11 at 0:16
add comment

Usually when you are getting such an avahi interface either your router or your own network card is not ready (or even has a problem) for some reason.

In my case I solve this quickly with either:
sudo ifdown eth0 && sudo ifup eth0
or
sudo /etc/init.d/networking restart

ps: this question is related.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.