Version [root@www.linuxidc.com ~] # Uname-aLinuxtp3.3.4-5.fc17.x86_64 #1SMPMonMay717: 29: 34UTC2012x86_64x86_64x86_64GNU/Linux [root@www.linuxidc.com ~] # List all connected NICs [root@www.linuxidc.com ~] # Lsp
Version
Root@www.linuxidc.com ~ # Uname-
Linux tp 3.3.4-5. fc17.x86 _ 64 #1 SMP Mon May 7 17:29:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Root@www.linuxidc.com ~ #
List all connected NICs
Root@www.linuxidc.com ~ # Lspci-v | grep Net
. 0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
. 0 Network controller: Realtek semiconduco., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
Root@www.linuxidc.com ~ #
Device ID)
Root@www.linuxidc.com ~ # Lspci-n | grep. 0
. 0 0280: 10ec: 8176 (rev 01)
Root@www.linuxidc.com ~ #
Find the driver of the wireless network card
Root@www.linuxidc.com ~ # Lspci-vd 10ec: 8176.
. 0 Network controller: Realtek semiconduco., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
Subsystem: Realtek semiconduco., Ltd. Device 8195
Flags: bus master, fast devsel, latency 0, IRQ 17
I/O ports at 5000 [size = 256]
Memory at f2500000 (64-bit, non-prefetchable) [size = 16 K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable-Count = 1/1 Maskable-64bit +
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [1, 100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [2, 160] Device Serial Number 01-91-81-fe-ff-4c-e0-00
Kernel driver in use: rtl8192ce
Root@www.linuxidc.com ~ #
Check whether the wireless Nic kernel driver has been loaded
Root@www.linuxidc.com ~ # Lsmod | grep rtl8192ce
Rtl8192ce 79523 0
Rtlwifi 104879 1 rtl8192ce
Rtl8192c_common 72193 1 rtl8192ce
Mac80211 492420 3 rtl8192c_common, rtlwifi, rtl8192ce
Root@www.linuxidc.com ~ #
View the name of the wireless network card displayed in the system
Root@www.linuxidc.com ~ # Dmesg | grep rtl8192ce
Root@www.linuxidc.com ~ # Cat/var/log/messages | grep rtl8192ce
Nov 25 21:48:49 tp NetworkManager [664]: (Wlan0): new 802.11 WiFi device (driver: 'rtl8192ce 'ifindex: 3)
Root@www.linuxidc.com ~ #
View and start the wireless network card
Root@www.linuxidc.com ~ # Ip link show wlan0
3: wlan0: Mtu 1500 qdisc mq state DOWN mode DORMANT qlen 1000
Link/ether 60: d8: 19: cc: 74: 84 brd ff: ff
Root@www.linuxidc.com ~ # Ip link set wlan0 up
Root@www.linuxidc.com ~ # Ip link show wlan0
3: wlan0: Mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
Link/ether 60: d8: 19: cc: 74: 84 brd ff: ff
Root@www.linuxidc.com ~ #
List all nearby wireless SSID
Root@www.linuxidc.com ~ # Iw dev wlan0 scan | grep-I ssid
SSID: n13u
SSID: Tenda_3F97F8
SSID: 127f3f380f0f
SSID: FAST_Diablo
Root@www.linuxidc.com ~ #
Generate a wpa encrypted password for the wireless route/SSID to be connected and write it to the configuration file.
Root@www.linuxidc.com ~ # Cat/etc/wpa_supplicant/wpa_supplicant.conf
Ctrl_interface =/var/run/wpa_supplicant
Ctrl_interface_group = wheel
Root@www.linuxidc.com ~ # Wpa_passphrase n13u '! #12345678901 '>/etc/wpa_supplicant/wpa_supplicant.conf
Root@www.linuxidc.com ~ # Cat/etc/wpa_supplicant/wpa_supplicant.conf
Ctrl_interface =/var/run/wpa_supplicant
Ctrl_interface_group = wheel
Network = {
Ssid = "n13u"
# Psk = "! #12345678901"
Psk = b8322c53a992108fdf862b3b31dc8235ab4d89795efa233b7c3f946711fdfcd9
}
Root@www.linuxidc.com ~ #
Verify the password in debug mode
Root@www.linuxidc.com ~ # Wpa_supplicant-h | tail-n 1
Wpa_supplicant-Dwext-iwlan0-c/etc/wpa_supplicant.conf
Root@www.linuxidc.com ~ # Wpa_supplicant-Dwext-iwlan0-c/etc/wpa_supplicant/wpa_supplicant.conf-d
Wpa_supplicant v1.0-rc3
Random: Trying to read entropy from/dev/random
Initializing interface 'wlan0' conf'/etc/wpa_supplicant/wpa_supplicant.conf 'driver 'wext 'ctrl_interface 'N/A' bridge' N/'
...
Wpa_driver_wext_set_key: alg = 3 key_idx = 1 set_tx = 0 seq_len = 6 key_len = 16
Wlan0: WPA: Key negotiation completed with bc: AE: c5: 7e: ba: fc [PTK = CCMP GTK = CCMP]
Wlan0: Cancelling authentication timeout
Wlan0: State: GROUP_HANDSHAKE-> COMPLETED
Wlan0: CTRL-EVENT-CONNECTED-Connection to bc: AE: c5: 7e: ba: fc completed (auth) [id = 0 id_str =]
Wpa_driver_wext_set_operstate: operstate 0-> 1 (UP)
Netlink: Operstate: linkmode =-1, operstate = 6
EAPOL: External notification-portValid = 1
EAPOL: External notification-EAP success = 1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
RTM_NEWLINK: operstate = 1 ifi_flags = 0x11043 ([UP] [RUNNING] [LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared-ignore event
EAPOL: startWhen --> 0
EAPOL: disable timer tick
The following statement indicates that the password verification is successful.
Wlan0: WPA: Key negotiation completed with bc: AE: c5: 7e: ba: fc [PTK = CCMP GTK = CCMP]
After the debugging mode is verified, run the following command to enable a background process for the verification.
Root@www.linuxidc.com ~ # Wpa_supplicant-Dwext-iwlan0-c/etc/wpa_supplicant/wpa_supplicant.conf-B
Root@www.linuxidc.com ~ #
Apply for a dhcp IP Address
Root@www.linuxidc.com ~ # Dhclient wlan0
Root@www.linuxidc.com ~ #
Root@www.linuxidc.com ~ # Ip addr show wlan0
3: wlan0: Mtu 1500 qdisc mq state UP qlen 1000
Link/ether 60: d8: 19: cc: 74: 84 brd ff: ff
Inet 192.168.168.118/24 brd 192.168.168.255 scope global wlan0
Inet6 fe80: 62d8: 19ff: fecc: 7484/64 scope link
Valid_lft forever preferred_lft forever
Root@www.linuxidc.com ~ #
Root@www.linuxidc.com ~ # Ifconfig wlan0
Wlan0: flags = 4163. Mtu 1500
Inet 192.168.168.118 netmask 255.255.255.0 broadcast 192.168.168.255
Inet6 fe80: 62d8: 19ff: fecc: 7484 prefixlen 64 scopeid 0x20
Ether 60: d8: 19: cc: 74: 84 txqueuelen 1000 (Ethernet)
RX packets 98 bytes 10981 (10.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 114 bytes 19307 (18.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Root@www.linuxidc.com ~ #
You can already access the internet.
Root@www.linuxidc.com ~ # Ping-c 1 g.cn
PING g.cn (74.125.128.160) 56 (84) bytes of data.
64 bytes from hg-in-f160.1e100.net (74.125.128.160): icmp_req = 1 ttl = 39 time = 532 MS
--- G.cn ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0 ms
Rtt min/avg/max/mdev = 532.026/532.026/532.026/0.000 MS
Root@www.linuxidc.com ~ #