Interface Control Scripts

The interface control scripts control bringing up (activating) and down (deactivating) interface connections. There are two primary interface control scripts, /sbin/ifdown and /sbin/ifup, that use assorted other control scripts located in the /etc/sysconfig/network-scripts directory to actually bring the network interfaces up and down.

The two primary interface control scripts in the /etc/sysconfig/network-scripts directory, ifdown and ifup, are symbolic links to the scripts in the /sbin directory. When either of these scripts are called, they accept a value of the interface to be used, such as:

[root@bleach network-scripts]# ifup eth0
Determining IP information for eth0... done.
[root@bleach network-scripts]# 

At that point, the /etc/sysconfig/network-scripts/network-functions and /etc/rc.d/init.d/functions files are sourced and functions from those files are used to perform a variety of tasks. See the section called Network Functions for more information about these tasks.

After verifying that an interface has been specified and that the user executing the request is allowed to bring the interface up or down, the correct script for the type of interface device is called into action. This is the script that actually brings the interface up and down. The following interface control scripts are the most common of this type:

In order to bring a particular interface up or down properly, these scripts may call one another to provide a certain type of functionality. In addition, other scripts will find their way into the /etc/sysconfig/network-scripts directory as software is installed that requires a new type of interface. Be aware that removing or modifying these scripts can cause various interface connections to act strangely or fail, as these scripts tend to rely on each other. However, advanced users can modify scripts linked with a specific interface to make additional steps occur when that interface is brought up or down.

You can also use the init script /etc/rc.d/init.d/network to activate and deactive all network interfaces configured to start at boot time with the command:

/sbin/service network action

where action is either start to start the network interfaces, stop to stop the network interfaces, or restart to restart the network interfaces. You can also use the command /sbin/service/network status to view a list of configured devices and currently active devices.

Instructions for making interfaces active and inactive, through the use of the command line or GUI-based administration tools, can be found in the Official Red Hat Linux Customization Guide.