Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

[Xen-devel] Network script handling changes

To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Network script handling changes
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Mon, 31 Oct 2005 16:52:54 +0000
Delivery-date: Mon, 31 Oct 2005 16:49:59 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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 -+

then

(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:

#!/bin/sh
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
ifconfig
route
iptables -L
cat /var/log/{debug,messages,syslog}

and from domU:

ifconfig
route
iptables -L


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

Happy networking,

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>