160
Chapter 12. Network Scripts
configure them. These files are usually named
ifcfg  name
, where
name
refers to the name
X
Y
X
Y
of the device that the configuration file controls.
12.2.1. Ethernet Interfaces
One of the most common interface files is
ifcfg eth0
, which controls the first network interface
card or NIC in the system. In a system with multiple NICs, you will also have multiple
ifcfg eth
files, each one with a unique number at the end of the file name. Because each device has its own
configuration file, you can control how each interface functions individually.
Below is a sample
ifcfg eth0
file for a system using a fixed IP address:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.0.1.0
NETMASK=255.255.255.0
IPADDR=10.0.1.27
USERCTL=no
The values required in an interface configuration file can change based on other values. For example,
the
ifcfg eth0
file for an interface using DHCP looks quite a bit different, because IP information
is provided by the DHCP server:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
Most of the time you will probably want to use a GUI utility, such as Network Administration Tool
(
redhat config network
) to make changes to the various interface configuration files. See the
Official Red Hat Linux Customization Guide for instructions on using this tool.
You can also edit the configuration file for a given network interface by hand. Below is a listing of the
parameters one can expect to configure in an interface configuration file.
Within each of the interface configuration files, the following values are common:
  BOOTPROTO= protocol
, where
protocol
is one of the following:
X
Y
X
Y
none
  No boot time protocol should be used.
bootp
  The BOOTP protocol should be used.
dhcp
  The DHCP protocol should be used.
  BROADCAST= address
, where
address
is the broadcast address. This directive is depre 
X
Y
X
Y
cated.
  DEVICE= name
, where
name
is
the
name
of
the
physical
device
(except
X
Y
X
Y
dynamically allocated PPP devices where it is the logical name).
  DNS{1,2}= address
, where
address
is a name server address to be placed in
X
Y
X
Y
/etc/resolv.conf
if the
PEERDNS
directive is set to
yes
.
  IPADDR= address
, where
address
is the IP address.
X
Y
X
Y
  NETMASK= mask
, where
mask
is the netmask value.
X
Y
X
Y
  NETWORK= address
, where
address
is the network address. This directive is deprecated.
X
Y
X
Y
  ONBOOT= answer
, where
answer
is one of the following:
X
Y
X
Y






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

tomcat hosting

 

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