aboutsummaryrefslogtreecommitdiffstats
path: root/tools/examples
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-15 11:36:27 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-15 11:36:27 +0100
commitedf9a6a284be5e215d9f45462a4adab92493dd0c (patch)
treebeb125c10aab4a764c61b6eb326bbb4f0dce3486 /tools/examples
parent9ce732580d29c02f79f2451e25dbe2bc72736c74 (diff)
downloadxen-edf9a6a284be5e215d9f45462a4adab92493dd0c.tar.gz
xen-edf9a6a284be5e215d9f45462a4adab92493dd0c.tar.bz2
xen-edf9a6a284be5e215d9f45462a4adab92493dd0c.zip
xend: Do not mess with bridge if admin has set one up already
Previously, the default "network-script", /etc/xen/scripts/network-bridge, would attempt to do its horrid work even if you had already set everything up in /etc/network/interfaces. Setting up your bridge in /etc/network/interfaces is: * easy * required for libxl since libxl never does it for you * not a fragile piece of lunacy * properly documented * the way everyone would expect it to work In this small patch we make it so that the default config for xend doesn't mess about on startup if you already have a bridge, and doesn't mess about on shutdown unless your first-named bridge (eth0 or xenbr0, normally) doesn't also have a physical interface named p<whatever> (peth0 or pxenbr0) enslaved to it. The latter test is not ideal but will hopefully do from now until the time xend finally dies. We also fix the "documentation" - ie, the comments in the default xend-config.sxp - to correspond to reality. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/examples')
-rw-r--r--tools/examples/xend-config.sxp19
1 files changed, 17 insertions, 2 deletions
diff --git a/tools/examples/xend-config.sxp b/tools/examples/xend-config.sxp
index 7ab7eb8f38..b7e98f464d 100644
--- a/tools/examples/xend-config.sxp
+++ b/tools/examples/xend-config.sxp
@@ -147,8 +147,22 @@
#
# (network-script 'network-bridge netdev=eth1')
#
-# The bridge is named xenbr0, by default. To rename the bridge, use
+# The bridge is named eth0, by default (yes, really!)
#
+
+# It is normally much better to create the bridge yourself in
+# /etc/network/interfaces. network-bridge start does nothing if you
+# already have a bridge, and network-bridge stop does nothing if the
+# default bridge name (normally eth0) is not a bridge. See
+# bridge-utils-interfaces(5) for full information on the syntax in
+# /etc/network/interfaces, but you probably want something like this:
+# iface xenbr0 inet static
+# address [etc]
+# netmask [etc]
+# [etc]
+# bridge_ports eth0
+#
+# To have network-bridge create a differently-named bridge, use:
# (network-script 'network-bridge bridge=<name>')
#
# It is possible to use the network-bridge script in more complicated
@@ -169,7 +183,8 @@
# configuring a new vif, but a value specified here would act as a default.
#
# If you are using only one bridge, the vif-bridge script will discover that,
-# so there is no need to specify it explicitly.
+# so there is no need to specify it explicitly. The default is to use
+# the bridge which is listed first in the output from brctl.
#
(vif-script vif-bridge)