======centos Network Interface configuration file Ifcfg-eth detailed ======
File/etc/sysconfig/network-scripts/ifcfg-eth0 in/etc/sysconfig/network-script under this directory, the network interface (NIC) script file (control file) is stored, Ifcfg-eth0 is the default first network interface, and if there is more than one network interface in the machine, then the name will be ifcfg-eth1,ifcfg-eth2,ifcfg-eth3 ... (The file inside is quite important, which involves the ability of the network to work properly).
= = = = Value = = = = = = = = = = =
Set project items as follows:
*device Interface Name (device, NIC)
*userctl [Yes|no] (whether the device can be controlled by a non-root user)
*bootproto IP Configuration method [None|static|bootp|dhcp] (No protocol at boot | Static allocation ip| BOOTP protocol | DHCP protocol)
*hwaddr MAC Address
*onboot the network interface is active when the system is started (yes/no)
*type network type (usually Ethemet)
*netmask Network Mask
*IPADDR IP Address
*ipv6init IPV6 is valid (yes/no)
*gateway Default gateway IP address
*broadcast Broadcast Address
*network Network Address
You can refer to the following example = = = = =
*device=eth0
*bootproto=static
*broadcast=192.168.1.255
*hwaddr=00:0c:2x:6x:0x:xx
*ipaddr=192.168.1.23
*netmask=255.255.255.0
*network=192.168.1.0
*onboot=yes
*type=ethernet
CentOS Network Interface configuration file Ifcfg-eth detailed