CentOS无线网络连接
时间:2015-05-22 00:56 来源:linux.it.net.cn 作者:IT
[root@baby-centOS ~]
# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr AC:72:89:04:EA:84
UP BROADCAST MULTICAST MTU:1500 Metric:1
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
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[root@baby-centOS ~]
# iwlist wlan0 scanning
wlan0 Scan completed :
Cell 01 - Address: 64:09:80:03:75:6A
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=34
/70
Signal level=-76 dBm
Encryption key:on
ESSID:
"censun-2"
Bit Rates:1 Mb
/s
; 2 Mb
/s
; 5.5 Mb
/s
; 11 Mb
/s
; 9 Mb
/s
18 Mb
/s
; 36 Mb
/s
; 54 Mb
/s
......
......
......
ctrl_interface=
/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid=
"pa_name"
#pa_name
psk=
"passwd"
#密码
}
[root@baby-centOS ~]
# wpa_supplicant -i wlan0 -c /root/wpa_supplicant.conf -D wext -B
[root@baby-centOS ~]
# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:
"cyyun_develop"
Mode:Managed Frequency:2.437 GHz Access Point: 10:0D:7F:61:AD:E2
Bit Rate=1 Mb
/s
Tx-Power=15 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=57
/70
Signal level=-53 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:3 Missed beacon:0
[root@baby-centOS ~]
# vim /etc/sysconfig/network-scripts/ifcfg-wlan0
DEVICE=wlan0
HWADDR=AC:72:89:04:EA:84
TYPE=Ethernet
UUID=39166a56-c6ac-452a-8234-efca68c86d04
ONBOOT=no
NM_CONTROLLED=no
BOOTPROTO=dhcp
[root@baby-centOS ~]
# ifup wlan0
Determining IP information
for
wlan0...
done
.
[root@baby-centOS ~]
# ip addr show wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link
/ether
ac:72:89:04:ea:84 brd ff:ff:ff:ff:ff:ff
inet 192.168.5.65
/24
brd 192.168.5.255 scope global wlan0
#已有ip地址
inet6 fe80::ae72:89ff:fe04:ea84
/64
scope link
valid_lft forever preferred_lft forever
/usr/sbin/wpa_supplicant
-i wlan0 -D wext -c
/etc/wpa_supplicant/wpa_supplicant
.conf -B
/sbin/ifup
wlan0
(责任编辑:IT)
|