Friday, January 3, 2014

How to Turn off Network Manager completely for a specific network adapter through Ifcfg-ethX file

Recently, Microsoft released new version of Linux Integration Services i.e. 3.5. This new integration pack will help virtualize linux operating system stack with much better support on Microsoft virtualization platform Hyper-V. This integration pack features a very useful feature, which i like a lot and miss it in vmware (Set-VMGuestNetworkInterface cmdlet) i.e. Static IP Injection <- this link details the functionality. Although for achieving this you must install integration tools in guest OS and specially for Linux OS the "Network Manager" must be completely off for the network adaptor, which you are using for enabling the  functionality.

the procedure is very simple and completely document in Redhat documentation, which is almost similar for all rpm based distros. steps are very simple-

1)open /etc/sysconfig/network-scripts/ifcfg-ethX(where X is a unique number corresponding to a specific interface), the file will look similar to
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=10.1.1.1
USERCTL=no

2)add NM_CONTROLLED=answer

where answer is one of the following:
yes(default) — NetworkManager is permitted to configure this device.
no — NetworkManager is not permitted to configure this device.

3) save the configuration file and restart network services

service network restart

or

/etc/init.d/network restart

That's it, you're ready to get your hands on "Static IP injection" feature provided by Hyper-V.



No comments:

Post a Comment