LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   device eth0 has different mac address (https://www.linuxquestions.org/questions/linux-networking-3/device-eth0-has-different-mac-address-4175437720/)

x201s 11-18-2012 04:49 PM

device eth0 has different mac address
 
This is a problem of a RHEL server in a virtual machine (Hypervisor)
It was working perfectly ok before I did something stupid.
My intentions were not bad :)
I wanted to remove unwanted services, rpms, etc.
So I stopped services and removed them. I removed many rpms as well.
But I overdid it. Obviously.

First sign was that my kde would not start after restarting the server, even though I had not deleted, afaik, X11-related rpms. It said kdeinit or something like that failed to start. Through Linux rescue, I was able to access inittab and start linux with level 3.

But now it says "device eth0 has different mac address". The ifcfg-eth0 file has the same HWADDR as that shown in MAC Address of network adapter property of the admin console of the VM.

What I have tried so far:
(1) delete ifcfg-eth0 file or comment out the line that says HWADDR=xxx
(2) checked hwconf, but no entry for HWDAAR
(3) deleted hwconf, re-created with /sbin/kudzu, but still no HWADDR entry
(4) I don't have /etc/udev/rules.d/70-persistent-net.rules file.
The closest I have is 60-network-rules. No sign of HWADDR there as well.

Where else does the OS check for MAC address consistency?

I can reinstall OS but I have installed other stuff, upto a week's work, so if possible, I just want to fix this (and later X11) networking issue.

How do I build the network functions ground up? In Windows, there is an option like "repair the OS", so just like that, isn't there an option in Linux?

Gurus, please give me some direction!

Thank you.
PS: I do not access to the Hypervisor side files. Also, I haven't tried manual HWADDR. How do I create a valid manual HWADDR?

unSpawn 11-18-2012 07:33 PM

Quote:

Originally Posted by x201s (Post 4832218)
My intentions were not bad

Those are the worst.


Quote:

Originally Posted by x201s (Post 4832218)
I wanted to remove unwanted services, rpms, etc. () But I overdid it.

How about re-installing non-Xorg / DE / WM / GUI / Eye candy packages? The Yum log should show any install / remove file ops.


Quote:

Originally Posted by x201s (Post 4832218)
Where else does the OS check for MAC address consistency?

While you haven't told us what tool exactly shows the message (ifconfig? 'ip link show'?) IIRC the two default locations in /etc where a ethernet device MAC address should be listed are /etc/sysconfig/network-scripts/ifcfg-%{device} (Kudzu?) and in /etc/sysconfig/networking/ (system-config-network?). Any other locations in /etc are the domain of specific network managers or own creativity (like creating your own /etc/dhclient.conf). If the client uses DHCP then the clients lease file, somewhere in /var/lib/%{dhcp_clientname}, should hold MAC addresses as well. Grepping /etc/ and /var for the MAC address recursively should show.


Quote:

Originally Posted by x201s (Post 4832218)
How do I build the network functions ground up?

Ensuring the devices drivers are not gone (lsmod), checking the current devices specs (ifconfig) and having the initscripts and dhclient (and optionally the system-config-network-tui) packages should be a start.

x201s 11-18-2012 09:07 PM

(1)
The message (Device eth0 has different MAC address than expected, ignoring) is shown when I restart the server.
Or, when do /etc/init.d/network start, it says,
//-----
Bringing up loopback interface: OK
Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring, FAILED
//-----
When I do ifconfig -a, I only see the loopback interface.

(2)
/etc/sysconfig/network-scripts/ifcfg-eth0 does have HWADDR listed, but /etc/sysconfig/networking/ does not have any files. It has two directories: "devices" and "profiles". Devices is empty and
profiles has another directory (default) which is empty.

>If the client uses DHCP
The server in question has static IP.

>Ensuring the devices drivers are not gone (lsmod), checking the current devices specs (ifconfig) and having the initscripts and dhclient (and optionally the system-config-network-tui) packages should be a start.

>lsmod
What would I be looking for to find if the device drivers are intact?

#lspci | grep Ethernet gives me:
0b:00.0 Ethernet Controller VMWare VMXNET3 Ethernet Controller (rev 01)

But
#dmesg | grep eth gives me blank.

Also, no "alias eth0" entry in /etc/modprob.conf

>having the initscripts and dhclient
I am not proficient enough to understand to follow through what you are suggesting, but the your keywords helped.
I googled and found a page.
http://www.studentcpu.com/2010/11/et...inux-eth0.html

and following it though. Will post back how I fare.

Thank you for taking time to read and advise.

x201s 11-19-2012 02:19 AM

>#dmesg | grep eth gives me blank.
dmesg | grep -i eth gives me blank.

# ifconfig eth0 up says:
eth0: unknown interface: No such device

/sys/class/net only has "lo".. I can guess it should have "eth0" as well

Stuck. Big time.

How do I install necessary modules/drivers from within rescue mode?

unSpawn 11-19-2012 02:45 AM

Quote:

Originally Posted by x201s (Post 4832304)
>lsmod
What would I be looking for to find if the device drivers are intact?

Code:

grep -q vmxnet3 /proc/modules||modprobe vmxnet3||echo "install VMware Tools"

x201s 11-19-2012 03:20 AM

"FATAL: Module vmxnet3 not found.
install VMware Tools"
is the answer.

unSpawn 11-19-2012 04:25 AM

You better go do that then.

x201s 11-19-2012 08:27 AM

unSpawn:
It took me a while (meaning, until I actually installed VMWare Tools and saw that eth0 was up!) to appreciate the humor, but I am relieved.
Thank you very much.

Wondering why none of the sites I looked at didn't mention anything about the VMWare Tools and at what point you knew that I was lacking precisely that. Guess you are moderator not for nothing!

Indebted,
x201s

unSpawn 11-19-2012 08:49 AM

Quote:

Originally Posted by x201s (Post 4832595)
(..) none of the sites (..) didn't mention anything about the VMWare Tools

Watch out with those double negatives ;-p


Quote:

Originally Posted by x201s (Post 4832595)
and at what point you knew that I was lacking precisely that.

The
Code:

0b:00.0 Ethernet Controller VMWare VMXNET3 Ethernet Controller (rev 01)
was a pretty good clue.

icarusthecow 11-20-2012 11:28 AM

udev registers the mac address to eth0 and other devices in the file /etc/udev/rules.d/70-persistent-net.rules. if you modify the mac address in that file for eth0 to match the virtualized devices and put it in the ifcfg-eth0 file it should fix the "wrong mac address" problem.

since you dont have a 70-persistent-net files, you could try creating one. also, make sure the mac address in ifcg-eth0 is correct, if youve cloned the VM and changed the mac address different configs could be off


All times are GMT -5. The time now is 11:23 AM.