Device eth0 has different MAC address than expected, ignoring.

I recently updated my kernel and when i rebooted the server was only accessible through eth2 access on a back ip we have. I looked at ifcfg-eth0 and ifcfg-eth1 and saw that the entry for the MAC address had changed:


In /var/log/messages here is whats there:

servername sysctl: net.ipv4.conf.default.accept_source_route = 0
servername kernel: Intel machine check architecture supported.
servername sysctl: kernel.sysrq = 0
servername kernel: Intel machine check reporting enabled on CPU#1.
servername xinetd: xinetd startup succeeded
servername sysctl: kernel.core_uses_pid = 1
servername kernel: CPU1: Intel P4/Xeon Extended MCE MSRs (24) available
servername kernel: CPU1: Thermal monitoring enabled
servername network: Setting network parameters:  succeeded
servername kernel: CPU1: Intel(R) Xeon(TM) CPU 4.00GHz stepping 0a
servername network: Bringing up loopback interface:  succeeded
servername kernel: Booting processor 2/6 eip 3000
servername ntpdate[2222]: sendto( Network is unreachable
servername ifup: Device eth0 has different MAC address than expected, ignoring.
servername kernel: CPU 2 irqstacks, hard=c0405000 soft=c03e5000
servername ntpdate[2222]: sendto( Network is unreachable
servername network: Bringing up interface eth0:  failed
servername kernel: Initializing CPU#2
servername ifup: Device eth1 has different MAC address than expected, ignoring.
servername ntpdate[2222]: sendto( Network is unreachable
servername kernel: Calibrating delay using timer specific routine.. 5999.54 BogoMIPS (lpj=20098)
servername network: Bringing up interface eth1:  failed
servername network: Bringing up interface eth2:  succeeded

So i tried to find the MAC address for eth0 and eth1 but couldnt, so im wondering:

1. How to find your MAC address for eth0 and eth1 when this happens.
2. What caused this to happen in the first place.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I hope this can help you solving problem #1.

Kind regards,

Matthias Vance
linuxpigAuthor Commented:
No it doesnt. Understand that basic commands like ifconfig didnt work because it only showed what was already there, just a MAC for eth2. I needed to find the original MAC for eth0 and eth1, which isnt easy. Also, why did the kernel change the MAC address for eth0 and eth1, see the notes from /var/log.
Im looking for someone who went through something like this when they did a kernel update, not just basic commands.
Hugh FraserConsultantCommented:
Check in the file:


and update the MAC address (you may be able to just delete it).

I don't have a machine handy in the same situation, but with the entry missing on my systems, I can then bring up the interface and find the MAC address to re-enter it.

There are a couple of useful tools for mucking with low-level interface details, like setting full/half, enabling or disabling negotiation, etc..


Be careful with them, though. They can really mess things up.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

linuxpigAuthor Commented:
mii-tool just shows if everything is ok, ethtool doesnt show what the original MAC should be. Please re-read my original post, i think the answers are drifting off topic.
Hugh FraserConsultantCommented:
I forgot to answer the question of how this happens. I have a couple of systems with 3 nics. When Linux boots, the pci cards identify themselves, but I've found in the past that the order isn't necessarily consistent. if Linux assigned the first card to eth0, second to eth1, etc. you might (and I have) find that eth0 and eth1 get switched.

So Linux uses the /etc/sysconfig/network-scripts/ifcfg-eth(n) file to tie a MAC address to a nic. If you leave the MAc address line out, it will still work, but the eth(n) mapping can get switched. On a single nic machine, it obviously makes no difference.

I don't have a solution if you use multiple NICs except to say it happens rarely. Having a tool that checks the log file after boot for the problem helps.

I have, though, addressed the problem by switching to a multi-port NIC to replace multiple nics.
Hugh FraserConsultantCommented:
I didn't mean to drift. Delete the line in


It's that line that's causing Linux to not start the card, since the two nics are being found in a different order. Restart the nics (ifconfig UP ethn) and you will be able to see the MAC. Re-enter it in the ifcfg file to restore the order checking done at boot.
2. Your kernel upgrade may have updated the modules.conf file and modified the order of the aliases for you nic cards.

for example.
eth0 e1000
eth1 3c59x
eth0 3c59x
eth1 e1000

This is just a guess, I don't know your system setup and all that.

1 has already been answered, you can just remove HWADDR or use the updated information from ifconfig ethx, if you remove the HWADDR you may have problems if it happens again because your different IP's will be assigned to the wrong interface, this may not be a good idea if you have configured firewall rules based on interface number!


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
linuxpigAuthor Commented:
What i had to do to get the server up was edit modprobe.conf to use the tg3 drivers. In the modprobe.conf file i commented out the broadcom drivers. Here is my modprobe.conf file below

#alias eth0 bcm5700
alias eth0 tg3
#alias eth1 bcm5700
alias eth1 tg3
alias eth2 e1000
alias eth3 e1000
alias scsi_hostadapter cciss
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd

Here is one from a working server that the kernel update worked on:
alias eth0 bnx2
alias eth1 bnx2
alias eth2 bnx2
alias scsi_hostadapter cciss
alias usb-controller uhci-hcd
alias usb-controller1 ehci-hcd
alias scsi_hostadapter1 ata_piix
On the working server they are all bmx2 drivers, it is a possibility that the modules were renamed when you kernel was updated but it's difficult to tell without knowing what was there before.

Is there a renamed modules file on your system, the old one may have been renamed.
linuxpigAuthor Commented:
Im wondering if the kernel installed new ones and erased old ones
linuxpigAuthor Commented:
How can this be prevented from happening again?
Hugh FraserConsultantCommented:
Prevented... not that I know of. Detected? Of course. As I mentioned, this is an infrequent problem that's handled by the ifcfg-ethn file by tying a specific eth to a MAC address. When, for whatever reason, the OS shuffles the mapping of nic to eth device, it's detected when the network starts up and is alarmed.

Look at adding a rule to a tool like ossec, or script something to look for the alarm, or check the interfaces. Then page yourself if there's a problem.
linuxpigAuthor Commented:
Now that i have selected new drivers in modprobe.conf and the server is up. Can i expect the server to become unresponsive again if i reboot the server or update other packages?
There is no reason for it not to work on next reboot, as long as service network restart runs thru clean then you should be OK.

As far as updates are concerned it's difficult to say, if you hard code the HWADDR at least you will know you have an issue and you now know what may be (at least one of) the causes and can rectify it.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.