linux | Troubleshooting a NIC

problem

In centos7 system, set ifcfg-eth * file, always tangled NAMEand DEVICEin the end what to write or what real effect. Under this example to demonstrate
this is the network card ifcfg-eth4configuration file. I did not write DEVICEthat with the NAME+MACway

NAME=eth4
BOOTPROTO=static
HWADDR=90:E2:BA:D9:C9:F8
IPADDR=10.24.16.153
NETMASK=255.255.255.128
ONBOOT=yes


ip addView'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.

  1. When only NAME, the configuration in the HWADDRcomment out the card will actually get up

  2. When it NAMEis replaced DEVICE, the card can be up, indicating that the name is not important, important to have HWADDRthis parameter

  3. When HWADDRthe comment out, reservations DEVICE, 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:

  1. If there is HWADDRa field, it must bind correctly;
  2. No HWADDRtime field, DEVICEthe field must write. And write properly.
  3. Write-only NAMEfield to get up card

Guess you like

Origin www.cnblogs.com/hbgzy/p/11583847.html