Pages

Wednesday, January 16, 2013

Do We Really Need To Turn Off NetworkManager?

As a Linux user, I bet most of us had suffered from NetworkManager at least once in a lifetime. As legend goes, we disabled NetworkManager to solve the problem. We never thought, "That very NetworkManager will be useful for us one day".

Now we are using various kind of devices for network communication. Wifi adapters, 3G/4G modem adapters. Configuring your Linux box to get connected without NetworkManager become a daunting task. Have you tried using 3G modem on your Linux box? It is almost impossible to set it up without NetworkManager.

Well. We have to run NetworkManager now for those special purposes but we still want to keep some devices not to be managed by it. How??

For RHEL/CentOS, add a parameter in desired network config file.(e.g /etc/sysconfig/network-scripts/ifcfg-eth0) -
NM_CONTROLLED=no
service network restart
For Ubuntu, add a section in network manager config file.(i.e  /etc/NetworkManager/NetworkManager.conf)
[keyfile]
unmanaged-devices=mac:<MAC address>, mac:<MAC address>
/etc/init.d/network-manager restart
Now NetworkManager won't manage those devices anymore.

Remarks: I experience some bugs from RHEL/Fedora - Even though you add "NM_CONTROLLED=no", NetworkManager is still messing up with interfaces. Put in "service NetworkManager stop" in your troubleshooting checklist. :)

Happy Linuxing!



Using Serial-To-USB adapter on Linux


As and when, I need to manage some network devices(Switch, router, firewall and etc...) with serial console. I bought serial-to-usb adapter since my notebook doesn't come with serial port.


I am using Linux as on my notebook. I use "screen" utility to connect serial device.
sudo screen /dev/ttyUSB0
After I finish my job, I will kill screen session.
Ctrl+a+k
Press "k" to kill the session
Hope someone find it useful.