CentOS Wireless Problems and Dumping NetworkManager

Hello All, it’s been a while since I’ve posted. This post will discuss how you can dump NetworkManager and still get your wireless to work on Linux (CentOS 6.5, specifically). Read on for more!

What’s the Problem?

All of a sudden, I noticed that NetworkManager simply wasn’t working for me. I’m sure it was the result of some update or other (after all, I develop a lot and software comes/goes constantly on my systems). I really don’t care why it didn’t work. And I’m not alone: as these threads reveals, NetworkManager has a shoddy reputation. So instead of spending lots of time solving the problem, let’s see if we can just dump it.

Stop NetworkManager in its Tracks…

While deinstalling NetworkManager would work, let’s not be so hasty. Instead run these commands:

sudo service NetworkManager stop
sudo chkconfig NetworkManager off

Those commands stop the service, and prevent it from restarting.

Next, let’s change the NM_CONTROLLED flag in all of the /etc/sysconfig/network-scripts/ifcfg-XXX files:

for i in /etc/sysconfig/network-scripts/ifcfg-*; do
  sudo sed -i -e 's#NM_CONTROLLED=\(.*\)#NM_CONTROLLED=no#' $i
done

…and use wpa_supplicant

Let’s replace NetworkManager with wpa_supplicant. It cross-platform supplicant with support for most wireless encryption types (WEP, WPA and WPA2) and is suitable for desktops, laptops and embedded systems.

But before we jump into wpa_supplicant, let’s check out a few things first:

  • Get the Interface. Use the ip link command to show our interfaces:
    [root@co1 ~]# ip link
    1: lo:  mtu 16436 qdisc noqueue state UNKNOWN 
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: p5p1:  mtu 1500 qdisc mq state UP qlen 1000
        link/ether f0:4d:a2:83:87:fa brd ff:ff:ff:ff:ff:ff
    3: wlan0:  mtu 1500 qdisc mq state UP qlen 1000
        link/ether 00:23:15:62:0e:ac brd ff:ff:ff:ff:ff:ff
    5: pan0:  mtu 1500 qdisc noqueue state UNKNOWN 
        link/ether fe:4b:21:ed:29:27 brd ff:ff:ff:ff:ff:ff
    

    From the above, we see that wlan0 is a good start; the lo is the loopback interface, the p5p1 is the physical Ethernet wired port, and the pan0 is a Personal Area Networking interface created for Bluetooth support. So we will concentrate on wlan0.

  • Play with iwconfig. The iwconfig command is similar to ifconfig(8), but is dedicated to the wireless interfaces. Use it to set wireless-specific parameters of a network interface, and we can use it to experiment with some things:

Lots more to cover…

1030 sudo rfkill list all
1031 sudo rfkill unblock wifi
1032 sudo rfkill list all
1033 sudo dhclient wlan0
1034 sudo ifup wlan0
1035 ifconfig 0a
1036 ifconfig -a
1037 sudo vi /etc/sysconfig/network-scripts/ifcfg-wlan0
1038 sudo ifdown wlan0
1039 sudo ifup wlan0
1040 sudo ifconfig wlan0 up
1041 sudo iwconfig wlan0
1042 sudo iwconfig wlan0 essid “spark”
1043 sudo iwconfig wlan0
1044 sudo iwconfig
1045 sudo iwconfig –help
1046 lspci -v
1047 lspci -v | grep Wirele
1048 sudo wpa_supplicant
1049 sudo ip link
1050 sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
1051 wpa_cli
1052 sudo dhcpd wlan0
1053 ifconfig -a
1054 sudo ifup wlan0

Team-oriented systems mentor with deep knowledge of numerous software methodologies, technologies, languages, and operating systems. Excited about turning emerging technology into working production-ready systems. Focused on moving software teams to a higher level of world-class application development. Specialties:Software analysis and development...Product management through the entire lifecycle...Discrete product integration specialist!

Leave a Reply

Your email address will not be published. Required fields are marked *

*