Ubuntu

使用 Ubuntu 命令連接到非加密無線網路

  • May 15, 2010

我無法使用 Ubuntu 命令行連接到開放的 ie 非加密無線網路。這就是我所做的。我首先關閉網路管理器,然後打開 wlan0 並關閉加密,然後指定開放的無線網路並連接到它:

$ sudo /etc/init.d/NetworkManager stop   
* Stopping network connection manager NetworkManager [ OK ]   
$ sudo /sbin/ifconfig wlan0 up 
$ sudo /sbin/iwconfig wlan0 enc off   
$ sudo iwconfig wlan0 essid "Cavalier High-Speed 8-4-CAVTEL"  
$ sudo  dhclient wlan0  
There is already a pid file /var/run/dhclient.pid with pid 10812  
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  
DHCPREQUEST of 192.168.1.67 on wlan0 to 255.255.255.255 port 67  
DHCPREQUEST of 192.168.1.67 on wlan0 to 255.255.255.255 port 67  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6  
No DHCPOFFERS received.  
Trying recorded lease 192.168.1.67  
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.  

--- 192.168.1.1 ping statistics ---  
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms  

Trying recorded lease 192.168.1.45  
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.  

--- 192.168.1.1 ping statistics ---  
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms  

No working leases in persistent database - sleeping.   
$ sudo /sbin/iwconfig wlan0  
wlan0     IEEE 802.11bg  Mode:Managed  Frequency:2.422 GHz    
         Access Point: Not-Associated   Tx-Power=27 dBm     
         Retry min limit:7   RTS thr:off   Fragment thr=2352 B     
         Encryption key:off  
         Power Management:off  
         Link Quality:0  Signal level:0  Noise level:0  
         Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0  
         Tx excessive retries:0  Invalid misc:0   Missed beacon:0  

我想知道問題是什麼,我該如何做對?

感謝致敬!

的輸出/sbin/iwconfig wlan0顯示您沒有與任何 AP 關聯。

您需要/sbin/iwlist wlan0 scan搜尋附近的 AP,之前和根據我的經驗,有時之後,您設置/sbin/iwconfig wlan0 essid "essid"

同樣,該應用程序wicd非常適合管理您的無線網路,而無需大量額外功能。

引用自:https://serverfault.com/questions/142252