[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Network script handling changes

  • To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
  • Date: Mon, 31 Oct 2005 16:52:54 +0000
  • Delivery-date: Mon, 31 Oct 2005 16:49:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

I have made some changes to the way the network scripts are handled, in order
to make it easier for those of you with non-standard configurations.

  o All scripts now cope with parameters being passed on the command line, and
    this command line may be specified in the xend-config.sxp.

  o The vif-bridge script can autodetect the correct bridge name, if you are
    using only one.

  o The vif-bridge option in xend-config.sxp has gone.  If you need this
    functionality, specify it on the script command line, instead.

  o If the default config worked for you before, then it should still work.

For example, if you are using this topology, the default bridged one:

dom0: fake eth0 -> vif0.0 -+
                         bridge (xenbr0) -> real eth0 -> the network
domU: fake eth0 -> vifN.0 -+


(network-script network-bridge)
(vif-script     vif-bridge)

should suffice.

If, like Sean Dague, you are renaming the bridge, like this:

dom0: fake eth0 -> vif0.0 -+
                         bridge (br0) -> real eth0 -> the network
domU: fake eth0 -> vifN.0 -+

then you want

(network-script 'network-bridge bridge=br0')
(vif-script     vif-bridge)

or if you have other bridges on your machine, but all the domUs use the same
bridge, then you want

(network-script 'network-bridge bridge=br0')
(vif-script     'vif-bridge bridge=br0')

If you need to use a different NIC than eth0, say eth1, like the "IBM blades":

dom0: fake eth0 -> vif0.0 -+
                         bridge -> real eth1 -> the network
domU: fake eth0 -> vifN.0 -+

then you want

(network-script 'network-bridge netdev=eth1')
(vif-script     vif-bridge)

If, like Charles Duffy, you want two bridges:

dom0: fake eth0 -> vif0.0 ----------------------------+
dom0: fake eth1 -> vif0.1 ---+                        |
                             |                        |
                             |                       bridge 0 -> real eth0
                             |                        |
                            bridge 1 -> real eth1     |
                             |                        |
                             |                        |
domU: fake eth0 -> vifN.0 ----------------------------+
domU: fake eth1 -> vifN.1 ---+

then you need to create a wrapper script:

(network-script my-network-script)

and in /etc/xen/scripts/my-network-script:

dir=$(dirname "$0")
"$dir/network-bridge" vifnum=0
"$dir/network-bridge" vifnum=1

If you want non-bridged topologies, then you have to use different scripts.
Michael Lessard, I believe, wants this:

dom0: ---------------------> real eth0 -> the network
dom1: fake eth0 -> vif1.0 -> real eth1 -> the network

In which case I think you want 

(network-script network-route)
(vif-script     vif-route)

though you might need some extra hacking to make this work, and I would be
interested in your success.

If you want to handle initial networking through the init.d scripts, as Greg
Brackley wanted, IIRC, then simply don't specify a network-script (this has
worked for a week or so now) and specify an appropriate vif-script instead.
Greg, if you've got anywhere with your VLAN/domU setup, I'd be interested.

If I claim your topology should work and it doesn't, then I would appreciate a
full set of info:

from dom0:

brctl show
iptables -L
cat /var/log/{debug,messages,syslog}

and from domU:

iptables -L

And if you want a topology that's not here, feel free to shout!

Happy networking,


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.