problem
In centos7 system, set ifcfg-eth * file, always tangled NAME
and DEVICE
in the end what to write or what real effect. Under this example to demonstrate
this is the network card ifcfg-eth4
configuration file. I did not write DEVICE
that with the NAME+MAC
way
NAME=eth4
BOOTPROTO=static
HWADDR=90:E2:BA:D9:C9:F8
IPADDR=10.24.16.153
NETMASK=255.255.255.128
ONBOOT=yes
ip add
View'll find the name of the card actually eth2
. Discrepancies and ifcfg-eth4 not match the name of the configuration file. But the network is good.
When only
NAME
, the configuration in theHWADDR
comment out the card will actually get upWhen it
NAME
is replacedDEVICE
, the card can be up, indicating that the name is not important, important to haveHWADDR
this parameter- When
HWADDR
the comment out, reservationsDEVICE
, network card this time to get up.
DEIVCE=eth2 #已经修正为eth2,但ifcfg-eth这依然用的eth4
BOOTPROTO=static
#HWADDR=90:E2:BA:D9:C9:F8
IPADDR=10.24.16.153
NETMASK=255.255.255.128
ONBOOT=yes
The final test down:
- If there is
HWADDR
a field, it must bind correctly; - No
HWADDR
time field,DEVICE
the field must write. And write properly. - Write-only
NAME
field to get up card