When I plugged the adapter to my server, it was shown as wlp0s21f0u4,
ip a command output,
wlp0s21f0u4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
Therefore I chose wlp0s21f0u4 as my connection name.
Here are the steps I followed,
1. Create a network configuration file in /etc/sysconfig/network-scripts directory. File name: ifcfg-wlp0s21f0u4 (i.e. ifcfg-<connection name>)
Content of the file is,
[root@localhost network-scripts]# cat ifcfg-wlp0s21f0u4
TYPE=Wireless
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=no
NAME=wlp0s21f0u4
ONBOOT=yes
DEVICE=wlp0s21f0u4
ESSID=bla
KEY_MGMT=WPA-PSK
MODE=Managed
The highlighted configuration parameters are important to establish a wireless connection. As you can see the SSID of my wifi network is bla and it uses WPA-PSK security.
2. Create another file to store the wireless key in the same directory. File name: keys-wlp0s21f0u4 (i.e. keys-<connection name>)
Content of the key file is,
[root@localhost network-scripts]# cat keys-wlp0s21f0u4
WPA_PSK=abc123
As you can see the password is abc123 and it's stored as plain text.
3. Restart NetworkManager,
systemctl restart NetworkManager
4. After a couple of seconds, the network interface should be up,
ip a command output,
wlp0s21f0u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
If you encounter issues, you can use journatctl for troubleshooting,
journalctl -xe -u NetworkManager
No comments:
Post a Comment