Section 12.2:Interface Control Scripts
12.1.3 Alias and Clone Files
Two lesser used types of interface configuration files found in /etc/sysconfig/net-
work-scripts are alias and clone files, which include an additional component in the name of
the file beyond the interface name.
Alias interface configuration files take names in the format of ifcfg- <if-name> : <alias-
value> , and they allow an alias to point to an interface. For example, a ifcfg-eth0:0 file could
be configured to specify DEVICE=eth0:0 and a static IP address of 10.0.0.2, serving as an alias of
an Ethernet interface already configured to receive its IP information via DHCP in ifcfg-eth0.
At that point, the eth0 device is bound to a dynamic IP address, but it can always be referred to
on that system via the fixed 10.0.0.2 IP address.
A clone interface configuration file has a name similar to ifcfg- <if-name> - <clone-name> .
While an alias file is another way to refer to an existing interface configuration file, a clone file is used
to specify additional options when specifying an interface. For example, if you have a standard DHCP
Ethernet interface called eth0, it may look similar to this:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
Since USERCTL is not set to yes, users cannot bring this interface up and down. To give users this
ability, create a clone called user from ifcfg-eth0 which allows a user to bring up and down
the eth0 interface. The resulting name of the clone would be ifcfg-eth0-user and would only
need one line:
USERCTL=yes
When a user moves to bring up the eth0 interface with the ifup eth0-user command, the con-
figuration options from ifcfg-eth0 and ifcfg-eth0-user are used together. While this is a
very basic example, this method can be used with a variety of options and interfaces.
The easiest way to create alias and clone interface configuration files is to use the GUI-based Network
Configurator (redhat-config-network) tool.
12.2 Interface Control Scripts
The interface control scripts control bringing up (activating) and down (deactivating) interface con-
nections. 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.
187
Need help?
Do you have a question about the LINUX 7.2 and is the answer not in the manual?