OpenWrt Forum Archive

Topic: weird MAC address on routerstatio ethernet

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I'm testing OpenWRT (r15349, r15572) on RouterStation boards and I noticed that ethernet devices have weird (incorrect) MAC adresses:

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 12:9c:e1:21:c9:8e brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 42:9b:26:8a:21:33 brd ff:ff:ff:ff:ff:ff

With original firmware (downloaded from http://www.ubnt.com/downloads/RS/RSx.ar7100.OpenWRT.bin ), MACs seems to be OK.

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:15:6d:c1:bb:e0 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:15:6d:c1:bb:e1 brd ff:ff:ff:ff:ff:ff

I tested four RouterStation boards with the same results (always the same incorrect MACs).

OpenWRT (r15349 and r15572) has been built standard way, on Debian Etch without extra configuring or kernel tweaking.

Any ideas?

--

Richard Svec

Hello,

Strange MACs may explain this:

root@OpenWrt:~# dmesg|grep MAC
ar71xx: using random MAC address for eth0
ar71xx: using random MAC address for eth1

This message appear in "./arch/mips/ar71xx/devices.c" function ar71xx_add_device_eth() at line 478:

----

if (is_valid_ether_addr(ar71xx_mac_base)) {
memcpy(pdata->mac_addr, ar71xx_mac_base, ETH_ALEN);
pdata->mac_addr[5] += ar71xx_eth_instance;
} else {
random_ether_addr(pdata->mac_addr);
printk(KERN_DEBUG
"ar71xx: using random MAC address for eth%d\n",
ar71xx_eth_instance);
}

----

I added simple debug printout before calling function is_valid_ether_addr() and seem that variable "ar71xx_mac_base" is filled with zeros. Maybe problem is with reading MAC address from flash. I'm not hardcore kernel developer. Can anybody help?

The discussion might have continued from here.