Xen - Adding Multiple Network Interface

You can add multiple Network Interfaces for each guest machines

Example : XEN with 3 Network interfaces :

Create a script   :     /etc/xen/scripts/multi-network-script

add following lines to it

dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1
"$dir/network-bridge" "$@" vifnum=2 netdev=eth2 bridge=xenbr2

It will create 3 vif and bridges and connect it with physical 3 interfaces

give permission to it

chmod +x /etc/xen/scripts/multi-network-script

add your new script in


edit your  xend-config.sxp

replace (network-script network-bridge)  with   (network-script multi-network-bridge)

save it ...

Now Restart Xen Deamon

[root@vps scripts]# service xend restart
restart xend:                                                           [  OK  ]

Now you can see your 3 bridges by ifconfig command

You can configure network interfaces on each domu guests by adding this lines to their config files

vif = ['ip=ipaddress,mac=macaddress,bridge=bridgeinterfaceno']
In this example we are assigning ip address, mac address and binding it with bridge0 interface

# use eth0 for this DomU
vif = ['ip=,mac=00:16:de:ad:fa:ce,bridge=xenbr0']