Does OpenSuSE allow one to force a MAC-address to a bridge-device?

The OpenSuSE stack currently does not give any obvious way to force the mac-address of a network bridge-adapter to a specific value.

We are trying to use OpenSuSE for KVM hosting with a network configuration using br0 for the primary bridge, eth0 for the physcial adapter, and a tap## device attached to br0 for each KVM guest. In the YaST we configured the eth0 to be the primary physical adapter for br0 and we would like to keep the mac-address of the br0 to always stay the same as eth0’s mac-address (but there’s no YaST menu to do that). If the MAC-address is not forced to stay the same, then the starting/stopping of KVM instances could cause the br0’s mac-address to randomly change to the lowest value mac-address of the actively attached tap## adapters. That change can cause network traffic to be temporarily lost to the host (which is using the IP of br0) for ~15 second windows while the external network gateway adjusts its IP-to-MAC tables, and that temporary outage is catastrophic for network/clustered storage used by the KVM instances.

A good description of how this plays in the kernel is at:
http://www.mail-archive.com/bridge@lists.linux-foundation.org/msg01095.html

Normally, the forced setting of a mac-address to a network interface is done by setting the HWADDR= field in the /etc/sysconfig/network/ifcfg-br0 file. However, it doesn’t seem like that field is honored by the “network” service on the SUSE stack (it is on RHEL). It looks like the only way I can make it keep that MAC is to edit /etc/rc.local to make it run “ifconfig br0 hw ether <eth0’s-mac-value>” at boot. However, that hack won’t be triggered if one does a “service network restart” either.

lindj wrote:

> Normally, the forced setting of a mac-address to a network interface
> is done by setting the HWADDR= field in the
> /etc/sysconfig/network/ifcfg-br0 file. However, it doesn’t seem like
> that field is honored by the “network” service on the SUSE stack (it
> is on RHEL).

If openSUSE does support a HWADDR field in the ifcfg file, and it
doesn’t work, open a bug report.


Per Jessen, Zürich (8.9°C)
http://en.opensuse.org/User:pjessen

After searching through the /etc/sysconfig/network/scripts more, I discovered the variable name for the MAC address used by SUSE distributions is LLADDR. That MAC-addr value in br0 seemed to stick even after doing a “service network restart” followed by several “brctl addif br0 <tap##>” additions.

Example:
host-04:/etc/sysconfig/network # cat ifcfg-br0
BOOTPROTO=‘static’
BRIDGE=‘yes’
BRIDGE_FORWARDDELAY=‘0’
BRIDGE_PORTS=‘eth0’
BRIDGE_STP=‘off’
BROADCAST=’’
ETHTOOL_OPTIONS=’’
LLADDR=‘E4:1F:13:7A:9D:B0’
IPADDR=‘9.59.240.14/25’
MTU=’’
NAME=’’
NETWORK=’’
REMOTE_IPADDR=’’
STARTMODE=‘auto’
USERCONTROL=‘no’

So for RHEL it’s HWADDR, and for Ubuntu it’s IF_HW_MAC_ADDRESS.