All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ewan Mellor <ewan@xensource.com>
To: Xen Developers <xen-devel@lists.xensource.com>
Subject: Network script handling changes
Date: Mon, 31 Oct 2005 16:52:54 +0000	[thread overview]
Message-ID: <20051031165254.GD7630@leeni.uk.xensource.com> (raw)

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.

             reply	other threads:[~2005-10-31 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 16:52 Ewan Mellor [this message]
2005-10-31 17:05 ` Network script handling changes Ewan Mellor
2005-11-02  2:53 ` Greg Brackley
2005-11-03  4:39   ` Greg Brackley
2005-11-02 16:50 ` Li Ge
2005-11-02 17:19   ` Ewan Mellor
2005-11-02 17:33     ` Nivedita Singhvi
2005-11-02 19:28     ` Li Ge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051031165254.GD7630@leeni.uk.xensource.com \
    --to=ewan@xensource.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.