February 08, 2009    



Red Hat introduced the Network Manager in 2004 as a way to simplify and automate network configuration and connections.

Although it would seem to make network management better and easier for non-technical users, it requires some adjustment by the Linux administrator because many of the configuration functions we have been familiar with are now handled by a new layer of configuration files and scripts. This means that the standard configuration files that we modify in order to manually manage networking are subject to being overwritten by the Network Manager every time the network is restarted, including every reboot.

Fedora 10, and perhaps Fedora 9 as I did not use it, have some interesting changes to how networking is configured and its relationship with D-Bus, HAL and udev. The udev daemon is a relatively new kernel device manager which allegedly provides consistent and persistent device naming for all devices including removable mass storage devices. It is also used to match network device names, i.e., eth0, to the MAC address on the NIC.

How it Works – Sort of

The udev device manager determines when a new device has been added to the system and creates a rules entry for it in the /etc/udev/rules.d directory. It thus creates a relationship between the physical NIC based on the hardware MAC address and the logical name “eth0.” That relationship used to be defined solely by the /etc/sysconfig/network-scripts/ifcfg-eth0 file.

The udev daemon creates and entry for each NIC installed in the system in  the /etc/udev/rules.d/70-persistent-net.rules file. The Network Manager uses these entries, along with information in the ifcfg-ethX files in  the /etc/sysconfig/network-scripts/ directory to initialize each NIC.

Name Resolution

The Network Manager also rewrites /etc/resolv.conf each time the network is restarted, whether by a reboot or by using the service network restart command. This can facilitate obtaining new DNS server IP addresses if the computer is moved between networks frequently, so it is very useful for laptops. It can cause issues for desktop computers that are more or less tethered to the same network at all times.

Apparently, the network manager expects the name server information to be provided by a DHCP server and for static IP addresses and networks it rewrites the /etc/resolv.conf file with the following contents:

# Generated by NetworkManager
search both.org
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

At least that message tells you what you need to do to resolve the problem. To ensure that the correct entries are always added to the now dynamic resolv.conf file, be sure to add them to the ifcfg-ethX files as shown below.

# Intel Corporation 82566DC-2 Gigabit Network Connection


This could be very handy if you have multiple NICs used for failover in a computer connected to multiple networks with different name servers. All you would need to do to recover from an outage on one network would be to take that NIC down and bring up the NIC in the backup network.

The Network Manager can be turned off. Refer to the page Disable Network Manager for details.



You must be logged in to leave a reply.