Xen's virtual networking is configured by two shell scripts (by
default network-bridge and vif-bridge). These are called
automatically by xend when certain events occur, with arguments to
the scripts providing further contextual information. These scripts
are found by default in /etc/xen/scripts. The names and
locations of the scripts can be configured in
/etc/xen/xend-config.sxp.
- network-bridge:
- This script is called whenever xend is started or
stopped to respectively initialize or tear down the Xen virtual
network. In the default configuration initialization creates the
bridge `xen-br0' and moves eth0 onto that bridge, modifying the
routing accordingly. When xend exits, it deletes the Xen bridge
and removes eth0, restoring the normal IP and routing configuration.
- vif-bridge:
- This script is called for every domain virtual
interface and can configure firewalling rules and add the vif to the
appropriate bridge. By default, this adds and removes VIFs on the
default Xen bridge.
Other example scripts are available (network-route and
vif-route, network-nat and vif-nat).
For more complex network setups (e.g. where routing is required or
integrate with existing bridges) these scripts may be replaced with
customized variants for your site's preferred configuration.