this is obsolete doc -- see http://doc.nethence.com/ instead
XEN -- Bridge network configuration
Dom0
To use different bridges on each network interface, create a custom wrapper,
cd /etc/xen/scripts/
vi network-custombr
like,
#!/bin/ksh
set -e
[[ $1 != start && $1 != stop ]] && print "start|stop" && exit 1
/etc/xen/scripts/network-bridge $1 bridge=bridge0 netdev=eth0 vifnum=0
fix perms,
chmod +x network-custombr
Note. this might also help if you enabled Netfilter,
#iptables -A FORWARD -m physdev --physdev-in eth0 ! --physdev-out eth0 -j ACCEPT
#iptables -A FORWARD -m physdev --physdev-out eth0 ! --physdev-in eth0 -j ACCEPT
And point the xend config to it,
cd /etc/xen/
vi xend-config.sxp
change,
(network-script custombr)
(vif-script vif-bridge)
Note. disable ip forwarding,
cd /etc/
mv sysctl.conf sysctl.conf.dist
sed '/^$/d; /^#/d' sysctl.conf.dist > sysctl.conf
vi /etc/sysctl.conf
change,
net.ipv4.ip_forward=0
net.ipv4.conf.all.proxy_arp=0
net.ipv4.conf.default.proxy_arp=0
and apply,
sysctl -p
DomU
Either use the first available bridge,
vif = [ 'vifname=vifname' ]
or choose a specific bridge,
vif = [ 'vifname=vifname,bridge=bridgename' ]
References
http://docwhat.org/2008/08/xen-networking/