search
gettin' around
TechStock
How to find the permanent MAC addresses for a bonded interface
If you have machines that you have bonded 2 or more interfaces together you will see if you do an 'ifconfig' that both eth0 and eth1 have the same MAC as the bond.
bond0 Link encap:Ethernet HWaddr 00:0F:1F:03:F8:E5
inet addr:10.x.x.x Bcast:10.x.x.x Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:4703 errors:0 dropped:0 overruns:0 frame:0
TX packets:4344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:410776 (401.1 KiB) TX bytes:664401 (648.8 KiB)
eth0 Link encap:Ethernet HWaddr 00:0F:1F:03:F8:E5
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:4237 errors:0 dropped:0 overruns:0 frame:0
TX packets:4344 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:380928 (372.0 KiB) TX bytes:664401 (648.8 KiB)
Interrupt:185
eth1 Link encap:Ethernet HWaddr 00:0F:1F:03:F8:E5
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:466 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29848 (29.1 KiB) TX bytes:0 (0.0 b)
Interrupt:193
In actuality both show the MAC address of the currently active slave.
So lets say that you are troubleshooting something and need to figure out the ACTUAL MAC addresses of the interfaces, well you have one via the method above, but how do you get the other one.
Well first I tried 'dmidecode' and there was no help there, then I tried 'ethtool' and no help there either.
So where to look, well I started thinking, everything is listed in /proc for the system, so I went poking around and found this.
If you look into /proc/net/bonding you should see a file that is the same name as your bond, in my case bond0, which contains the hidden gem you are looking for.
So simply cat out the file (in my case bond0) and you will get the following results.
Ethernet Channel Bonding Driver: v2.6.3-rh (June 8, 2005)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0f:1f:03:f8:e5
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0f:1f:03:f8:e6
Now obviously your version of the bonding driver may vary, but you should see basically the same thing as above,and if you will notice the Permanent HW addr lines in the sample above those will be the actual interface MAC addresses that you are looking for.
Awesome Uptime
Well ok so I always said that Linux was stable and that you really "never" need to reboot, so here is my awesome uptime for one of my machines.
~]$ uptime 12:50:56 up 628 days, 21:10, 0.01, 0.02, 0.00
I have posted this here, because the CMOS battery will have to be replaced on this machine and I wanted to have record of this uptime.
This is not my longest uptime, but I didn't have a way to record the other online so we will start here.
