我无法使用 Ubuntu 命令行连接到开放的(即非加密的)无线网络。以下是我所做的。我首先关闭网络管理器,然后启动 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
我想知道问题是什么以及我该如何正确解决?
感谢致敬!
答案1
输出/sbin/iwconfig wlan0
显示您未与任何 AP 关联。
你需要/sbin/iwlist wlan0 scan
在设置之前搜索附近的 AP,根据我的经验,有时在设置之后/sbin/iwconfig wlan0 essid "essid"
再次,该应用程序wicd
非常适合管理您的无线,而不需要很多额外的功能。