Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I was trying to uninstall the default drivers and install the new driver. When the default driver was installed during OS installation, there were some ifcfg scripts created in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6

    Where does NetworkManager store NIC settings?


    Hi,

    I was trying to uninstall the default drivers and install the new driver. When the default driver was installed during OS installation, there were some ifcfg scripts created in /etc/sysconfig/network-scripts. But after deleting the ifcfg-scripts (I was hoping it would be created automatically and besides in the general case there is no default driver installed by OS) and uninstalling and reinstalling the new driver, I don't see the network scripts created in the aforementioned directory. But NetworkManager is able to detect them all. Besides ifconfig is able to display all the nics. Then I was trying to locate any possible file stored in the file system to contain the configuration. But I was unable to locate any file. I was also browsing the Internet to find any clue but I didn't find any clue so far.

    Now why I need this thing is because I need to assign some static address and create some bonding etc. Hence I need some persistent way of preserving all configurations; and I want to do this automatically using scripts. Then there are two possible issues. As ifconfig is obsolete are ifcfg scripts obsolete too? In this case I need to know what other alternatives are there (as I said I can't find the way NetworkManager is doing so); Secondly, is there any way to automatically generate the ifcfg-scripts. I can do this manually but having an exiting tool to do that would be cool. I believe yast2 can do this. Is there any equivalent in RHEL? I can't use system-config-network because I need a scripted way of doing such things.

    Thanks for reading and thanks in advance for replying.

  2. #2
    Just Joined! shamino's Avatar
    Join Date
    Mar 2012
    Location
    Vienna, VA, USA
    Posts
    21
    ifcfg is not obsolete. NetworkManager is not a direct replacement. It is a convenient interface for environments where network settings may frequently change (e.g. on a laptop) but it is really unnecessary for systems that don't roam. You can disable or uninstall it and the system will use the ifcfg-based settings (which you can graphically edit using the system-config-network tool.)

    As for where NetworkManager stores its settings, the answer is that it doesn't. According to the README file (in /usr/share/doc/Networkmanager-0.7.0), it accesses settings via dbus, and there may be many different sources for the configurations.

    I think directly accessing NM's configuration files may be a bad idea. It appears that Fedora has introduced an "nmcli" command that will let scripts access Network Manager, but I don't think that version is in RHEL yet. (It's not in my 5.7 system.)

    Unfortunately, I can't help beyond this because my system is not running NM. (It's a desktop system attached to a wired Ethernet port, using simple DHCP for configuration, so there's no need for NM.)

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    6
    Thanks for the reply. Though it would be helpful to have the ifcfg scripts generated automatically by some existing tools. While experimenting with RHEL 5/system-config-network-tui, I observed that it doesn't create the ifcfg scripts automatically. Then it remains a big mystery as to how the scripts are generated first time the OS is installed. Obviously there is some script/program there to create such. I am dying of curiosity how this is accomplished.

    Quote Originally Posted by shamino View Post
    ifcfg is not obsolete. NetworkManager is not a direct replacement. It is a convenient interface for environments where network settings may frequently change (e.g. on a laptop) but it is really unnecessary for systems that don't roam. You can disable or uninstall it and the system will use the ifcfg-based settings (which you can graphically edit using the system-config-network tool.)

    As for where NetworkManager stores its settings, the answer is that it doesn't. According to the README file (in /usr/share/doc/Networkmanager-0.7.0), it accesses settings via dbus, and there may be many different sources for the configurations.

    I think directly accessing NM's configuration files may be a bad idea. It appears that Fedora has introduced an "nmcli" command that will let scripts access Network Manager, but I don't think that version is in RHEL yet. (It's not in my 5.7 system.)

    Unfortunately, I can't help beyond this because my system is not running NM. (It's a desktop system attached to a wired Ethernet port, using simple DHCP for configuration, so there's no need for NM.)

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •