[CentOS] Trying to override MAC addr

Robert Moskowitz rgm at htt-consult.com
Thu Aug 21 15:25:31 UTC 2014


On 08/21/2014 10:56 AM, Reindl Harald wrote:
>
> Am 21.08.2014 um 16:43 schrieb Robert Moskowitz:
>> On 08/21/2014 10:32 AM, m.roth at 5-cent.us wrote:
>>> Keith Keller wrote:
>>>> On 2014-08-21, John R Pierce <pierce at hogranch.com> wrote:
>>>>> On 8/21/2014 7:09 AM, Robert Moskowitz wrote:
>>>>>> I am trying to override the mac addr.
>>>>> pretty sure you need to use NIC model specific utilities to do this,
>>>>> ifcfg-ethN won't do it.   the hwaddr= in there is for finding the nic,
>>>>> not for reprogramming it.
>>>> ifconfig claims to support it:
>>>>
>>>>          hw class address
>>> <snip>
>>> Also, don't forget /etc/udev/rules.d/70-persistant-net.rules
>> I can't forget what I don't know.  please point me to description of
>> these rules?
> just look at the file
>
> in the past and on CentOS before RHEL7 it was to assign MAC/device-names
> at boot, on recent Redhat based systems just remove it and stick with
> place both in the ifcfg-files while disable biosdevname and systemd
> devicenames at boot
>
> both, that udev rules and what i explained you may collide or at least
> you need to change the MAC there too to not confuse the configs
>
I worked a bit on this.  I no longer have the MAC or HW addrs in 
ifcfg-eth0.  Only in /etc/udev/rules.d/70-persistent-net.rules, and only 
for name=eth0:

# net device ()
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="02:67:15:00:01:79", ATTR{type}=="1", KERNEL=="eth*", 
NAME="eth0"

but on reboot, I get the error:


Bringing up interface eth0:  Device eth0 does not seem to be present, 
delaying initialization.
[FAILED]

and the ethernet comes up as eth1 and the eth1 line is added to 
/etc/udev/rules.d/70-persistent-net.rules

Almost as if there is something else that needs changing.





More information about the CentOS mailing list