Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently started working with Ubuntu Server 10.04, but I'm having a problem while connecting to WEP-encrypted Wifi.

I've tried the following:

sudo ifconfig wlan0 down
sudo dhclient -r wlan0  
sudo ifconfig wlan0 up  
sudo iwconfig wlan0 essid "<essid>"
sudo iwconfig wlan0 key <hex key>

Then, I tried to connect to the Wifi by running sudo dhclient wlan0, however, I keep getting the same error- No DHCPOFFERS received.

Am I doing this the right way, or is there something I'm forgetting?

sudo ifconfig yields:

wlan0 Link encap: Ethernet HWAaddr 00:1f:1f:3b:3c:3e  
RX packets:0 errors:0 dropped:0 overruns:0 frame:0  
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0  
collisions:0 txqueuelen:1000  
X bytes:0 (0.0B) TX Bytes:0 (0.0B)

While sudo iwconfig yields:

wlan0 IEEE 802.11bg ESSID:"GlobalNetwork"  
Mode:Managed Access Point: Not-Associated Tx-Power:8 dBm  
Retry long limit:7 RTS thr:off Fragment thr:off  
Encryption key:my-hex-key  
Power Management:off

I'm trying to connect with a Ralink RT2561 that shows up with lshw -C network.

Any help you can give me is much appreciated, what am I doing wrong?

share|improve this question
Did you try checking if the driver for the wlan is up-to-date? You could hook up a lan cable until all the updates and drivers are gotten and installed. – Nitin Venkatesh Jun 18 '11 at 21:18
up vote 1 down vote accepted

The error you are receiving ( "No DHCPOFFERS received" ) seems to suggest that there is no DHCP server in your network. So I do not think is a WEP problem...

I assume that your are trying to connect to a "normal" router ( so you do not have separate DHCP server, firewalls or other stuff between your server and the router ).

  1. disable wep and try to connect again to the network. If this works, probably there was an error in the WEP password you entered.

  2. try to connect to the network by cable. This way you can check if through ethernet the DHCP works and an IP address is given to your server. If you receive an IP address the problem could be wireless card drivers or misconfiguration.

  3. check DHCP setting for the router. Maybe something is messed up on the router side, access it's configuration page and try to understand if settings are correct. You can also try to connect to the wifi connection through another computer ( just to be sure that the problem is the server! )

  4. config your server to use a static IP address ( this way you won't be using DHCP ):
    Please remember to check the IP address you will insert ( could be taken by someone else in the network ) and be sure to put the correct gateway address!

share|improve this answer
Wow... nice gravedig. Thanks, but I just scrapped Ubuntu Server and went to Desktop. – element119 Jul 27 '11 at 16:28

Your Answer


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.