One: the command used
DMESG | grep firmware (see if there is a firmware request from the wireless card)
Iw
IW Dev (Find the wireless card port)
IW wls1 Link (view WLS1 network Port wireless network connection)
IW WLS1 Scan | grep SSID (View WLS1 network ports can be connected to WiFi)
Ip:
IP link set wls1 up (opens the wireless port WLS1)
IP link Show wls1 (shows wireless port WLS1 connection)
IP addr Show WLS1 (displays the assigned IP address, which is especially useful for viewing whether the IP address was successfully obtained automatically via DHCP)
Wpa_supplican:
Wpa_supplicant-b-I wlp3s0-c < (wpa_passphrase "SSID" "PSK") (Connection wireless network SSID, password PSK)
Dhclient
Dhclient wls1 (assigning IP addresses to WLS1)
To use the above command, simply replace the WLS1 directly with your own network port.
Second: The specific process:
See if you need to install firmware
Most wireless cards also require firmware. The kernel typically automatically detects and loads both, and if you get output like siocsifflags:no such file or directory, it means you have to manually load the firmware. If unsure, query the kernel log with DMESG to see if there is a firmware request from the wireless card. For example, if you have an Intel chipset, the output might be:
# DMESG | grep firmware
Firmware:requesting Iwlwifi-5000-1.ucode
If there is no output, the system's wireless chip does not require firmware.
To view a wireless network port:
#iw Dev (The wireless network number is behind interface)
To activate a wireless network interface:
# IP Link Set wls1 up
To verify that the interface is activated successfully, you can view the output of the following command:
# IP Link Show wls1
3:WLS1: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc MQ State down mode dormant group default Qlen + Link/et Her 00:11:22:33:44:55 BRD ff:ff:ff:ff:ff:ff
The up in <BROADCAST,MULTICAST,UP,LOWER_UP> indicates that the interface has been successfully activated, and the subsequent state is not insignificant.
To view wireless network connections:
#iw WLS1 Link
It should show no connection at first.
Scan for Connected WiFi
#iw WLS1 Scan | grep SSID
Scan for available networks
Connect the specified SSID
# wpa_supplicant-b-I wlp3s0-c < (wpa_passphrase "SSID" "PSK")
Replace the SSID with the actual network name, and the PSK with the wireless password, keep the quotation marks.
To obtain IP allocations with DHCP:
# dhclient Wlp3s0
Test whether the IP was successfully acquired from the router (important)
#ip Addr Show Wls1
If you have IP assigned, you can surf the Internet or have a ping direct test
Centos7 using a wireless WiFi connection