Use udev to manage NICs
The udev configuration file path of the NIC is: etc/udev/rules. d/* net *. rules.
Etc/udev/rules. d/* net *. rules Delete the corresponding Nic configuration information
Command Line input: start_udev
Add Nic
Etc/udev/rules. d/* net *. rules add the corresponding Nic configuration information (mainly named)
Command Line input: start_udev
Configure the NIC ifcfg (see the next step)
Service network restart
If not, start_udev
Failed reboot
Configure the NIC
Nic configuration file location:/etc/sysconfig/network-scrips/ifcfg-eth)
Items in the configuration file:
DEVICE = eth0 (NIC nameKey! Used to identify NICs. There must be at least one item with MAC)
BOOTPROTO = none
IPADDR = XXX. XXX
PREFIX (MASK number of digits) = 24/here also available MASK = MASK limit 255.0
GATEWAT = XXX. XXX
NM_CONTROLLED = no (this explanation can be found at the following link, thanks to the original author =)
ONBOOT = yes
TYPE = Ethernet
IPV6INIT = no
USERCTL = no
You can also enter setup in the command line to perform graphical configuration.
To make this configuration take effect, you need to disable graphical software taking over:
Service NetworkManager stop
Chkconfig NetworkManager -- level 35 off (cancel startup)