All of lore.kernel.org
 help / color / mirror / Atom feed
* Network script handling changes
@ 2005-10-31 16:52 Ewan Mellor
  2005-10-31 17:05 ` Ewan Mellor
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ewan Mellor @ 2005-10-31 16:52 UTC (permalink / raw)
  To: Xen Developers

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-03  4:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31 16:52 Network script handling changes Ewan Mellor
2005-10-31 17:05 ` 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

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.