Mac address changing automatically: why?

Hello !
I have a default wan interface and wanb on Fritzbox 4020 with OpenWRT, and currently wanb is connected to another Openwrt router (raspi). wan is not yet in use.
I was trying to do something perhaps stupid (I wanted to create separate firewall zones for wan and wanb, with almost the same policies, but slight differences in allowed access), somehow it didn't work, so I decided that I didn't need it, tried to bring everything back as before. Meanwhile I realized that Mac Address of the switch port for wanb had changed. I found an entry on "devices", put the old mac address, then it did work. But I wonder if it's going to change again ? Why does it change? What for?

Aside from that, now the "wan" firewall is named "wanb", I wanted to change it back to "wan", but I can't ! I type "wan", and click save, it won't change!

I would appreciate if someone could please explain to me why these things are happening.

If no MAC addresses are extracted and set (properly) from the hardware, a new -random- one is generated on boot. If you re-defined one of your LAN switch ports as second wan, OpenWrt doesn't know how to extract a MAC address for this non-default (nor provided by the OEM firmware) interface, meaning you might want to set a custom (locally administered) MAC yourself.

3 Likes

Thank you for your reply! Now I see that all the devices that I created on my own have a random MAC address: actually just one for all of them. The devices that came with the installaiton of OpenWRT have similar MACs: just the last digit different.
What is the common practice about the self-made devices regarding MAC? Do people usually assign some suitable MAC address to an eth0.xy etc? So far all my eth0.xy's have the same MAC. I can imagine that switches can get confused if all my 192.168.n.1 have the same MAC address, but so far it hasn't caused any problem. I don't understand why it's been OK, and as it's been OK, I am afraid to change;;

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.