Configure Bridging on the cluster interfaces
This page describes the different ways to setup bridging on the cluster interfaces that are setup within the initrd.
Background
In some situations it might be a good idea to setup a bridge on the network used for cluster intercommunication or any other network setup in the initrd. A good example is when using virtualization and need to setup bridging even on the cluster intercommunication network.
Be aware that normally specially the cluster intercommunication network should not be used for anything except cluster intercommunication. Because any traffic going over that network influences latency and therefore performance on the cluster involved subsystems.
When talking about XEN keep in mind that there are two ways to do bridging. The one way over ifcfg files which is indenpendent from the virtualization software and the other by using the XEN provided bridging skripts normally found in /etc/xen/scripts/network-scripts.
By the time writing the recommended way by the linux distributors seems to be using bridging via ifcfg files as it is the more general approach. Additionnally the default XEN bridging script seems to have its weeknesses with VLANs.
Bridging via ifcfg files
The recommended way doing bridging seems to be using ifcfg specified bridges. This is the more general way as all distributions support it and it is independent from the virtualization technology used.
XEN specialities
Before starting you need to disable bridging in the XEN startup process or know extremely well what you are doing.
To disable bridging within XEN change the line specifying the network-script in /etc/xen/xend-config.sxp to /bin/true like below:
(network-script /bin/true)
Bridging via ifcfg files the normal way (outside the initrd)
If you have bridged networks that are not relevant to cluster intercommunication and can therefore be established in the normal bootprocess do as follows. BTW. this is the normal way to do bridging supported by all distributions compatible to ifcfg skripts.
First your bridge needs to have a name as it will get its own network interface. Then you have to create a ifcfg file for this bridge residing in /etc/sysconfig/network-scripts/ifcfg-<bridgename>. Next it normally should get an ipconfiguration (Best the one from the network interface connected to it). And last but not least there may be a physical network interface connected to it. If you don't have a physical network interface we are talking about a host only bridge that is only shared between the virtualisation host and all guests connected to it. If so skip the physical network interface part.
Bridge configuration RedHat based:
The ifcfg file for the bridge looks as follows:
DEVICE=<bridgename> ONBOOT=yes TYPE=Bridge BOOTPROTO=<bootproto> <ip options> <other options> <other bridge options>
The ifcfg file for the physical network interface <devicename> looks as follows:
DEVICE=<devicename> BOOTPROTO=Static TYPE=Ethernet ONBOOT=yes BRIDGE=<bridgename> <other options>
Bridge configuration Novell based:
The ifcfg file for the bridge looks as follows:
STARTMODE='auto' BOOTPROTO='<bootproto>' BRIDGE='yes' BRIDGE_PORTS='<devicename>' <ip options> <other options> <other bridging options>
The ifcfg file for the physical network interface <devicename> is standard.
For further information take a look at http://man-wiki.net/index.php/5:ifcfg-bridge
Bridging via ifcfg files in the initrd
First read the above sections to understand the configuration. Because everything is exactly like above except the configuration.
Requirements
For this to be working you need the comoonics-bootimage rpm with version 1.3-37 or above.
Bridge configuration:
The network configuration section in /etc/cluster/cluster.conf within the com_info tag looks as follows:
<com_info> <othertags and options> <eth name="<devicename>" bridge="<bridgename>" <other_attributes>/> <eth name="<bridgename>" type="bridge" <ip_attributes> <other_attributes> <othertags and options> </com_info>
Bridging via network-bridge skripts within the initrd
The network configuration section in /etc/cluster/cluster.conf within the com_info tag looks as follows:
<com_info> <othertags and options> <eth name="<devicename>" <ip_attributes> <other_attributes>/> <bridge name="<bridgename>" script="/etc/xen/scripts/network-brigde" vifnum="<num>" netdev="<netdev>" antispoof="<yes|no>"/> <othertags and options> </com_info>
This configuration will implicitly call the script as follows:
/etc/xen/scripts/network-bridge name=<bridgename> vifnum=<vifnum> netdev=<netdev> antispoof=<yes|no>
You can leave out all parameters the no parameter will be given to the script.