The network-scripts configuration file
In Linux, network-scripts
is used to configure network interfaces. These scripts are located in the /etc/sysconfig/network-scripts
directory and define the network settings for each interface, such as the IP address, netmask, gateway, and DNS servers (network file configuration path is specific to CentOS).
The network-scripts
is written in Bash and consists of several configuration files, each corresponding to a specific network interface. The most commonly used configuration files are ifcfg-ethX
for Ethernet interfaces and ifcfg-wlanX
for wireless interfaces, where X
is the interface number.
The ifcfg-ethX
configuration file contains the following parameters:
DEVICE
: This parameter specifies the name of the network interface – for example,DEVICE=eth0
.BOOTPROTO
: This parameter specifies whether the interface should use DHCP or a static IP address. If DHCP is used, the parameter’s value is set todhcp
. If a static...