Connect to WEP Wireless Network by command line on Ubuntu
Posted
by Tim
on Server Fault
See other posts from Server Fault
or by Tim
Published on 2010-05-15T18:55:18Z
Indexed on
2010/05/15
19:06 UTC
Read the original article
Hit count: 290
Hi,
I am a newbie to both network and Linux. I am now trying to connect to a WEP wireless network by command line on my Ubuntu 8.10, because the Network Manager does not support 64 bit WEP.
(1) I firstly bring down the Network Manager and then try to connect to a wireless network, whose essid is candy and password is 5673212741. But it fails as shown in the following. I wonder why and how to do it correctly?
$ sudo /etc/init.d/NetworkManager stop
* Stopping network connection manager NetworkManager [ OK ]
$ sudo iwconfig wlan0 essid candy
opendo iwconfig wlan0 key 18018ce78e open
$ sudo iwconfig wlan0 key 5673212741 open
$ sudo dhclient wlan0
There is already a pid file /var/run/dhclient.pid with pid 9971
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/wlan0/00:0e:9b:cd:4e:18
Sending on LPF/wlan0/00:0e:9b:cd:4e:18
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
$ ping www.bbc.co.uk
ping: unknown host www.bbc.co.uk
(2) A less important question: why the scan for wireless networ does not work after I bring down the Network Manager?
$ sudo /etc/init.d/NetworkManager stop
* Stopping network connection manager NetworkManager [ OK ]
$ sudo iwlist wlan0 scan
wlan0 Interface doesn't support scanning : Network is down
Thanks and regards!
© Server Fault or respective owner