Ethernet mac address changing randomly
I'm using Debian wheezy with kernel 3.2.0-4-686-pae but sometimes my mac address is changing randomly. Really I didn't find anything that could be chinging mac addr within my /etc/init.d/ scripts.
Now I tried to settle mac address within /etc/network/interfaces, but I'm not sure if it will fix it. I need mac addr to remain always the same as long as I use wake on lan feature. Code:
auto eth0 Thanks! |
the MAC address on a NIC can not change. do you have more then one NIC in your system? it could be that eth0 is swapping between the different NICs.
|
Yes, this is what is happening. Debian, by default, uses dynamic assignments for network interfaces.
|
Quote:
|
Yes, I found this behaviour weird, as long ethernet mac address should not change, but it's changing. I only have one NIC in this box.
Is there any way to disable this "dynamic" assignment of mac address? I couldn't find anything within /etc/init.d/ sysv scripts. Thanks for your answers, regards- |
Quote:
|
Are you using a Virtual machine?? KVM, vmware, virtual box?
Yes how do we know the MAC ADDRESS is actually changing? Do an ifconfig and get your MAC ADDRESS, reboot the system and get the MAC ADDRESS again. Did it change on reboot? Or have you got something strange going on with UDEV? Look in here for any extra rules especially under network. You can set your MAC ADDRESS statically with ifconfig: Code:
ifconfig <interface> hw ether 00:11:22:33:44:55 |
I think you are getting confused here, why are you doing the folowing?
Code:
pre-up ifconfig $IFACE hw ether ba:87:7e:e6:02:05 |
Thanks for your feedback folks.
I noticed my mac addr was changing cos' I'm using wakeonlan feature, using wakeonlan program that pacakage the "magic packet" (ethernet frames for wol) within an udp datagram. Everything works fine for a while, but then I found a change with mac address and it stops working. As long as hardware mac address could not change (it can only be "faked" by software). For the udp to reach my machine I had to do a "mac-binding" in my router (tp-link). This is adding a fixed entry within router's ARP table as far as I'm concerned. That way udp datagram can reach the final destination. I added those entries within my /etc/network/interfaces just to try if that way mac addr remains settled. |
do an :
Code:
ifconfig -a cat Code:
/etc/udev/rules.d/70-persistent-net.rules Is the MAC address usually one of 2 addresses or is it RANDOM everytime? Do some restarts collect some stats. |
Hi gdizzle,
There's only one nic in this box. And nothing appears strange with udev rules. I'll do some tests and try to check if there's something tricky with the router and the WOL stuff. Thanks! |
All times are GMT -5. The time now is 08:20 PM. |