Deployed CentOS image changes the MAC address?
-
Both machines only have one NIC, and I did some research and tried to remove the 70persistent file under udev and still nothing. I might rebuild the image for this hardware which would be a better idea anyway, I was just curious how it would turn out on a completely different system being built on another.
-
@salted_cashews If you would like help you might need to give us more information on where exactly you see the different MAC addresses. Take pictures of the old MAC on the host, then deploy and take a picture of the new MAC on that host.
… 70persistent file under udev …
This is only about naming the network interface within Linux and does not change your MAC address! If you have a persistent rule on host A for example, matching that host’s MAC for eth0. If you capture an image and deploy that to host B with a different MAC you will find that it ignores the original udev rule because it can’t match the MAC and will create a new one with interface name eth1 on that new host. But it does not change the MAC address itself.
-
I’m unable to take pictures on the moment due to the computers being in use but this is what I’ve got in my notes:
(Original build)
Machine 1>ifconfig
enp0s31f6 (only present physical interface)
60:45:cb:a2:86:bd(Deployed)
Machine 2>ifconfig
enp0s31f6 (only present physical interface)
ether 60:45:cb:a2:86:b4
Actual MAC (and what fog reports on this host): b8:ac:6f:99:3e:b8It’s only in the CentOS (after deployment) that it does this. On pxeboot it reports the real MAC.
-
@salted_cashews Possibly something new I have never seen before.
Maybe check
/etc/sysconfig/network-scripts/ifcfg-enp0s31f6
(e.g.HWADDR=...
or possiblyMACADDR=...
- see here) on the deployed machine to see if there is anything strange there.As well run
ifconfig -a
to see if there are any other adapters on the deployed machine. -
@salted_cashews said in Deployed CentOS image changes the MAC address?:
ether 60:45:cb:a2:86:b4
While I can’t really understand what is going on here, but I looked up the vendor code for 60:45:cd and that belongs to an ASUSTek COMPUTER network adapter if that gives any clues. If the deployed computer was in a virtual environment I might suspect it to be a vmware or virtualbox mac owner.
FWIW: b8:ac:6f belongs to Dell.
-
@Sebastian-Roth said in Deployed CentOS image changes the MAC address?:
Maybe check /etc/sysconfig/network-scripts/ifcfg-enp0s31f6
Along the same thought here, make sure your reference computer doesn’t list any system specific (HWADDR=… or possibly MACADDR=) in the network configuration files. That will cause issues with the cloned machine.
-
Yeah that’s the weird bit, this is what I get from /etc/sysconfig/network-scripts/ifcfg-enp0s31f6
It doesn’t list a HWADDR or MACADDR which I found baffling. The deployed computer is a Dell PC, and the NIC came with it. The captured image PC is in fact using ASUS hardware under a company called “Ciara”. So that part makes sense.
-
@salted_cashews Please run the following two commands on the deployed machine, take a picture and post here:
yum install ethtool ethtool -P enp0s31f6 ethtool -e enp0s31f6 | head -3
-
@salted_cashews The more I think about it, the more I’m inclined to remove /etc/sysconfig/network-scripts/ifcfg-<network_adapter> from the scripts directory before image capture. Most linux distributions will recreate this file if the mac address of the hardware doesn’t match the mac address (and/or UUID) listed in the config file. If I have custom settings in the network scripts config file I will typically just remove the hardware specific values in the config file then capture and deploy as long as its on the same hardware. I’ve found this method keeps the linux OS from just recreating a new ifcfg-xxxx file. Of course deploying to a different hardware with a different netowkr adapter should create a new file naming format since part of the network driver name is embedded in the device name.
-
@Sebastian-Roth said in Deployed CentOS image changes the MAC address?:
ethtool -e enp0s31f6 | head -3
-
@salted_cashews So even
ethtool
sees60:45:cb:a2:86:b4
as the physical MAC on this system. Not sure what to say. -
Haha I know that’s why I’m completely dazed. I appreciate the help though, we’ve gained some insight as to how to build our images moving forward because of this.