How do I get bonded NICs to use their real MAC addresses?

I have a bonded interface:

bond0     Link encap:Ethernet  HWaddr d4:ae:52:ce:32:4e  
          inet addr:172.26.1.210  Bcast:172.26.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d6ae:52ff:fece:324e/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:6924245 errors:0 dropped:4048402 overruns:0 frame:0
          TX packets:1991774 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:683666250 (683.6 MB)  TX bytes:263658678 (263.6 MB)

eth0      Link encap:Ethernet  HWaddr d4:ae:52:ce:32:4e  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:2880650 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1991772 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:379085548 (379.0 MB)  TX bytes:263658502 (263.6 MB)
          Interrupt:16 Memory:c0000000-c0012800 

eth1      Link encap:Ethernet  HWaddr d4:ae:52:ce:32:4e  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:4043595 errors:0 dropped:4043597 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:304580702 (304.5 MB)  TX bytes:176 (176.0 B)
          Interrupt:17 Memory:c2000000-c2012800 

The network admin has told me that the Juniper layer 2 switches (into which the server is plugged) need each of the bonded NICs to have their own unique MAC address, in order to prevent problems with multicast.

Their "real" MAC addresses are (from cat /proc/net/bonding/bond0):

eth1: d4:ae:52:ce:32:4e

eth0: d4:ae:52:ce:32:4d

Is using different MAC address in a single bonded interface a common requirement?

How can I achieve this, in Ubuntu 12.04LTS?


Solution 1:

It depends on the bonding mode. You're probably using mode 4 (802.3ad), which requires a switch that supports IEEE 802.3ad Dynamic link aggregation. Change to bonding mode 6 (balance-alb) or 5 (balance-tlb) and see what happens, those modes don't rely on switch support.

I could expand this answer if you post how you setup the bond and what you're trying to achieve (load balancing? fault tolerance? both?).