Finding real MAC addresses for bonding NICs on RedHat

I spent some time trying to find out the real MAC addresses for all NICs on RedHat AS3 and RedHat 5.3 since the HWADRR entry was deleted on all the ifcfg-ethX original files.

The ifconfig tool displays the real mac for the ACTIVE nic on the bond:

# ifconfig -a|grep HW
bond0     Link encap:Ethernet  HWaddr 00:50:8B:FB:5E:DA
bond1     Link encap:Ethernet  HWaddr 00:02:A5:4E:1F:E2
eth0      Link encap:Ethernet  HWaddr 00:50:8B:FB:5E:DA
eth1      Link encap:Ethernet  HWaddr 00:50:8B:FB:5E:DA
eth2      Link encap:Ethernet  HWaddr 00:02:A5:4E:1F:E2
eth3      Link encap:Ethernet  HWaddr 00:02:A5:4E:1F:E2

ethtool, dmidecode, etc, doesn’t report real MACs.

So the solutions is on these files:

/proc/net/bonding/bond0
/proc/net/bonding/bond1

Indeed:

$ cat /proc/net/bonding/bond0

bonding.c:v2.4.1 (September 15, 2003)
Bonding Mode: fault-tolerance (active-backup)

Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Multicast Mode: active slave only

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:50:8b:fb:5e:db

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:50:8b:fb:5e:da