164
Chapter 12. Network Scripts
The two interface control scripts are
ifdown
and
ifup
and are symbolic links to scripts in the
/sbin/
directory. When either of these scripts are called, they require a value of the interface to be specified,
such as:
ifup eth0
Determining IP information for eth0... done.
At
that
point,
the
/etc/rc.d/init.d/functions
and
/etc/sysconfig/network
scripts/network functions
files are used to perform a variety of tasks. See Section 12.4 for
more information.
After verifying that an interface has been specified and that the user executing the request is allowed
to control the interface, the correct script for the type of interface device brings the interface up or
down. The following interface control scripts are the most common:
ifup aliases
Configures IP aliases from interface configuration files when more than one IP
address is associated with an interface.
ifdown cipcb
and
ifup cipcb
Used to bring Crypto IP Encapsulation (CIPE) connections
up and down.
ifdown ipv6
and
ifup ipv6
Contains IPv6 related function calls using environment vari
ables in various interface configuration files and
/etc/sysconfig/network
.
ifup ipx
Used to bring up an IPX interface.
ifup plip
Used to bring up a PLIP interface.
ifup plusb
Used to bring up a USB interface for network connections.
ifdown post
and
ifup post
Contains commands to be executed after an interface is brought
up or down.
ifdown ppp
and
ifup ppp
Used to bring a PPP interface up or down.
ifup routes
Adds static routes for a device as its interface is brought up.
ifdown sit
and
ifup sit
Contains function calls related to bringing up and down an IPv6
tunnel within an IPv4 connection.
ifdown sl
and
ifup sl
Used to bring an SLIP interface up or down.
Be aware that removing or modifying any scripts in the
/etc/sysconfig/network scripts/
directory can cause interface connections to act strangely or fail, as these scripts. Only advanced users
should modify scripts related to a network interface.
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
,
stop
, or
restart
. You can also use the command
/sbin/service/network status
to view a list of configured devices and currently active
devices.
12.4. Network Functions
Red Hat Linux makes use of several files that contain important functions that are used in various
ways to bring interfaces up and down. Rather than forcing each interface control file to contain the
same functions as another, these functions are grouped together in a few files that can be sourced when
needed.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved