27.13. Network bridge errors
Red Hat Virtualization can configure multiple Virtualization network bridges to use with multiple Ethernet cards. To successfully configure multiple network bridges for ethernet cards, you must configure the second network interface using the system-config-network application or by creating a new configuration file in /etc/sysconfig/network-scripts. You should use a process to setup multiple Xen bridges. This is an example config file for a second NIC called 'eth1' :
# Example configuration file: /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=10.1.1.1
GATEWAY=10.1.1.254
ARP=yes
Copy the /etc/xen/scripts/network-bridge file to /etc/xen/scripts/network-bridge.xen.
# sudo cp /etc/xen/scripts/network-bridge /etc/xen/scripts/network-bridge.xen
Edit /etc/xen/xend-config.sxp and add a line to your new network bridge script (this example uses "network-virtualization-multi-bridge").
In the xend-config.sxp file, add a new line:
network-script network-xen-multi-bridge
Remove the commenting on the line that states:
network-script network-bridge
To create multiple virtualized network bridges, you must write a custom script. This example below creates two network bridges (called xenbr0 and xenbr1) and attaches them to eth1 and eth0, respectively:
# !/bin/sh
# network-xen-multi-bridge
# Exit if anything goes wrong
set -e
# First arg is operation.
OP=$1
shift
script=/etc/xen/scripts/network-bridge.xen
case ${OP} in
start)
$script start vifnum=1 bridge=xenbr1 netdev=eth1
$script start vifnum=0 bridge=xenbr0 netdev=eth0
;;
stop)
$script stop vifnum=1 bridge=xenbr1 netdev=eth1
$script stop vifnum=0 bridge=xenbr0 netdev=eth0
;;
status)
$script status vifnum=1 bridge=xenbr1 netdev=eth1
$script status vifnum=0 bridge=xenbr0 netdev=eth0
;;
*)
echo 'Unknown command: ' ${OP}
echo 'Valid commands are: start, stop, status'
exit 1
esac
If you want to create additional bridges, just use the example script and copy/paste the file accordingly.