Language and Page Formatting Options
2.7. Using NetworkManager with sysconfig files
/etc/sysconfig/directory is a location for configuration files and scripts. Most network configuration information is stored there, with the exception of VPN, mobile broadband and PPPoE configuration, which are stored in the
/etc/NetworkManager/subdirectories. For example, interface-specific information is stored in the
ifcfgfiles in the
For global settings, use the
/etc/sysconfig/networkfile. Information for VPNs, mobile broadband and PPPoE connections is stored in
In Red Hat Enterprise Linux 7 if you edit an
ifcfgfile, NetworkManager is not automatically aware of the change and has to be prompted to notice the change. If you use one of the tools to update NetworkManager profile settings, NetworkManager does not implement those changes until you reconnect using that profile. For example, if configuration files have been changed using an editor, NetworkManager must read the configuration files again.
To ensure this, enter as
rootto reload all connection profiles:
nmcli connection reload
Alternatively, to reload only one changed file,
nmcli con load /etc/sysconfig/network-scripts/ifcfg-ifname
Note that you can specify multiple file names using the above command.
Changes made using tools such as nmcli do not require a reload but do require the associated interface to be put down and then up again:
nmcli dev disconnectinterface-name
nmcli con upinterface-name
For more details about nmcli, see Section 3.3, “Configuring IP Networking with nmcli”.
NetworkManager does not trigger any of the network scripts, though the network scripts attempt to trigger NetworkManager if it is running when the
ifupcommands are used. See Section 2.6, “Using NetworkManager with Network Scripts” for the explanation of the network scripts.
ifupscript is a generic script which does a few things and then calls interface-specific scripts such as
ifup-ppp, and so on. When a user runs
ifuplooks for a file called
- if the
ifuplooks for the
TYPEkey in that file to determine which type-specific script to call;
- the type-specific scripts do type-specific setup;
- the type-specific scripts let common functions perform
IP-related tasks like
DHCPor static setup.
/etc/init.d/networkreads through all the
ifcfgfiles and for each one that has
ONBOOT=yes, it checks whether NetworkManager is already starting the DEVICE from that
ifcfgfile. If NetworkManager is starting that device or has already started it, nothing more is done for that file, and the next
ONBOOT=yesfile is checked. If NetworkManager is not yet starting that device, the initscripts continue with their traditional behavior and call
The result is that any
ifcfgfile that has
ONBOOT=yesis expected to be started on system bootup, either by NetworkManager or by the initscripts. This ensures that some legacy network types which NetworkManager does not handle (such as ISDN or analog dial-up modems) as well as any new application not yet supported by NetworkManager are still correctly started by the initscripts even though NetworkManager is unable to handle them.
It is recommended to not store the backup files anywhere within the
/etcdirectory, or in the same location as the live files, because the script literally does
ifcfg-*. Only these extensions are excluded:
For more information on using sysconfig files, see Section 3.5, “Configuring IP Networking with ifcfg Files” and the ifcfg(8) man page.