Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Guida di Installazione Pagina 161

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 160
Chapter 13.
Network Scripts
Using Red Hat Linux, all network communications occur between interfaces and physical networking
devices connected to the system, configured in a particular way, and utilizing at least one protocol to
exchange data with other systems. The different types of interfaces that exist are as varied as the
physical devices they support.
The configuration files for the various network interfaces and the scripts to make activate and deacti-
vate them are located in the /etc/sysconfig/network-scripts/ directory. While the existence
of particular interface files can differ from system to system, the three different types of files that ex-
ist in this directory, interface configuration files, interface control scripts, and network function files,
work together to enable Red Hat Linux to use various network devices.
This chapter will explore the relationship between these files and how they are used.
13.1. Interface Configuration Files
Interface configuration files control the operation of individual network interface device. As your Red
Hat Linux system boots, it uses these files to know what interfaces to bring up and how to configure
them. These files are usually named ifcfg-
device , where device refers to the name of the
device that the configuration file controls.
13.1.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 number at the end of the file name. Because each device has its own configuration
file, you can control how each interface functions.
Below is a sample ifcfg-eth0 for a system using a fixed IP address:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
BROADCAST=10.0.1.255
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 Configurator
(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.
Vedere la pagina 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 281 282

Commenti su questo manuale

Nessun commento