Here are the configuration files that I am using. My dom0 cluster is in
vlanx, the domU machines (including domU clusters) are in vlan391 or
vlan391. You can for as many vlans you have tagged you create an
additional bridge in dom0 by editing/adding lines to the end of the
network-bridge-multi-vlan script. These create a very stable production
environment. I can't take all the credit for these, they are result of
gathering little pieces of information from many individuals.
--
Leo J Pleiman
Senior Consultant, GPS Federal
410-688-3873
Bill Germer wrote:
Does anyone have xen, channel bonding and vlans all working at the same time? I am running RedHat EL 5.2 on two HP DL 360 G5s with conga. The two servers are clustered together and were working fine when I had bonding ONLY configured on the network interfaces.
After configuring VLANS clustering seems to be broken. Here is a snipet of the log.
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] Members Joined:
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] CLM CONFIGURATION CHANGE
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] New Configuration:
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] r(0) ip(172.16.255.132)
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] r(0) ip(172.16.255.133)
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] Members Left:
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] Members Joined:
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] r(0) ip(172.16.255.133)
Jun 17 14:07:17 xen2 openais[11130]: [SYNC ] This node is within the primary component and will provide service.
Jun 17 14:07:17 xen2 openais[11130]: [TOTEM] entering OPERATIONAL state.
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] got nodejoin message 172.16.255.132
Jun 17 14:07:17 xen2 openais[11130]: [CLM ] got nodejoin message 172.16.255.133
Jun 17 14:07:17 xen2 openais[11130]: [CPG ] got joinlist message from node 1
Jun 17 14:07:17 xen2 openais[11130]: [CMAN ] cman killed by node 2 because we were killed by cman_tool or other application
Jun 17 14:07:17 xen2 gfs_controld[11164]: cman_start_notification error -1 104
Jun 17 14:07:44 xen2 ccsd[11124]: Unable to connect to cluster infrastructure after 30 seconds.
Jun 17 14:08:14 xen2 ccsd[11124]: Unable to connect to cluster infrastructure after 60 seconds.
Jun 17 14:08:44 xen2 ccsd[11124]: Unable to connect to cluster infrastructure after 90 seconds.
Jun 17 14:09:14 xen2 ccsd[11124]: Unable to connect to cluster infrastructure after 120 seconds.
Jun 17 14:09:44 xen2 ccsd[11124]: Unable to connect to cluster infrastructure after 150 seconds.
Jun 17 14:10:14 xen2 ccsd[11124]: Unable to connect to cluster infrastructure after 180 seconds.
Here is my config. The two servers communicate over the bond0:0 interface
which is vlan 1, the native vlan for the bonded/trunk interface. Vlans 2 and
301 are for domUs. I modified the network-bridge script to the following to
provide xenbr0(vlan2) and
xenbr301(vlan301) for the domUs. The vlan communication works fine for the
domUs. The servers can communicated via vlan 1, ssh is working between them,
but clustering is broken. Any help would be appreciated!
Thanks,
Bill
cat /etc/xen/scripts/network-bridge-custom
op_start () {
/sbin/ifconfig bond0.2 down
/usr/sbin/brctl addbr xenbr0
/usr/sbin/brctl addif xenbr0 bond0.2
/sbin/ip link set bond0.2 up
/sbin/ip link set xenbr0 up
/sbin/route add default gw 172.16.255.254
/sbin/ifconfig bond0.301 down
/usr/sbin/brctl addbr xenbr301
/usr/sbin/brctl addif xenbr301 bond0.301
/sbin/ifconfig xenbr301 up
}
[EMAIL PROTECTED] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
MASTER=bond0
SLAVE=yes
[EMAIL PROTECTED] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
# Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
MASTER=bond0
SLAVE=yes
[EMAIL PROTECTED] ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
BONDING_OPTS="miimon=100 mode=2"
[EMAIL PROTECTED] ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0:0
DEVICE=bond0:0
ONBOOT=yes
TYPE=ethernet
BOOTPROTO=static
#VLAN=yes
NETMASK=255.255.255.0
NETWORK=172.16.255.0
IPADDR=172.16.255.132
[EMAIL PROTECTED] ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0.2
DEVICE=bond0.2
ONBOOT=yes
TYPE=ethernet
BOOTPROTO=static
VLAN=yes
[EMAIL PROTECTED] ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0.301
DEVICE=bond0.301
ONBOOT=yes
TYPE=ethernet
BOOTPROTO=static
VLAN=yes
[EMAIL PROTECTED] ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet6 addr: fe80::21e:bff:fe5f:11a/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1624 errors:0 dropped:0 overruns:0 frame:0
TX packets:331 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:144294 (140.9 KiB) TX bytes:64714 (63.1 KiB)
bond0.2 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet6 addr: fe80::21e:bff:fe5f:11a/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:431 errors:0 dropped:0 overruns:0 frame:0
TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37266 (36.3 KiB) TX bytes:9628 (9.4 KiB)
bond0:0 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet addr:172.16.255.132 Bcast:172.16.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet6 addr: fe80::21e:bff:fe5f:11a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:227 errors:0 dropped:0 overruns:0 frame:0
TX packets:233 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27607 (26.9 KiB) TX bytes:37414 (36.5 KiB)
Interrupt:18 Memory:f8000000-f8012100
eth1 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet6 addr: fe80::21e:bff:fe5f:11a/64 Scope:Link
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1397 errors:0 dropped:0 overruns:0 frame:0
TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:116687 (113.9 KiB) TX bytes:27300 (26.6 KiB)
Interrupt:19 Memory:fa000000-fa012100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1720 errors:0 dropped:0 overruns:0 frame:0
TX packets:1720 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2752660 (2.6 MiB) TX bytes:2752660 (2.6 MiB)
virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:9560 (9.3 KiB)
xenbr0 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet6 addr: fe80::21e:bff:fe5f:11a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:406 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:35118 (34.2 KiB) TX bytes:5135 (5.0 KiB)
xenbr301 Link encap:Ethernet HWaddr 00:1E:0B:5F:01:1A
inet6 addr: fe80::21e:bff:fe5f:11a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:195 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10268 (10.0 KiB) TX bytes:5135 (5.0 KiB)
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list
#!/bin/sh
#============================================================================
# Setup the bridge
# If the line below is commented out you cluster is officially broke (mcder304)
netdev=bond0
# Default Xen network start/stop script.
# Xend calls a network script when it starts.
# The script name to use is defined in /etc/xen/xend-config.sxp
# in the network-script field.
#
# This script creates a bridge (default xenbr${vifnum}), adds a device
# (default eth${vifnum}) to it, copies the IP addresses from the device
# to the bridge and adjusts the routes accordingly.
#
# If all goes well, this should ensure that networking stays up.
# However, some configurations are upset by this, especially
# NFS roots. If the bridged setup does not meet your needs,
# configure a different script, for example using routing instead.
#
# Usage:
#
# network-bridge (start|stop|status) {VAR=VAL}*
#
# Vars:
#
# vifnum Virtual device number to use (default 0). Numbers >=8
# require the netback driver to have nloopbacks set to a
# higher value than its default of 8.
# bridge The bridge to use (default xenbr${vifnum}).
# netdev The interface to add to the bridge (default eth${vifnum}).
# antispoof Whether to use iptables to prevent spoofing (default no).
#
# Internal Vars:
# pdev="p${netdev}"
# vdev="veth${vifnum}"
# vif0="vif0.${vifnum}"
#
# start:
# Creates the bridge
# Copies the IP and MAC addresses from netdev to vdev
# Renames netdev to be pdev
# Renames vdev to be netdev
# Enslaves pdev, vdev to bridge
#
# stop:
# Removes netdev from the bridge
# Transfers addresses, routes from netdev to pdev
# Renames netdev to vdev
# Renames pdev to netdev
# Deletes bridge
#
# status:
# Print addresses, interfaces, routes
#
#============================================================================
dir=$(dirname "$0")
. "$dir/xen-script-common.sh"
. "$dir/xen-network-common.sh"
findCommand "$@"
evalVariables "$@"
vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed
's/^[^0-9]*//')}
vifnum=${vifnum:-0}
bridge=${bridge:-xenbr${vifnum}}
netdev=${netdev:-eth${vifnum}}
antispoof=${antispoof:-no}
pdev="p${netdev}"
vdev="veth${vifnum}"
vif0="vif0.${vifnum}"
addr_pfx=
get_ip_info() {
addr_pfx=`ip addr show dev $1 | sed -n 's/^ *inet \(.*\) [^ ]*$/\1/p'`
gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
}
is_bonding() {
[ -f "/sys/class/net/$1/bonding/slaves" ]
}
is_ifup() {
ip link show dev $1 | awk '{ exit $3 !~ /[<,]UP[,>]/ }'
}
do_ifup() {
if ! ifup $1 || ! is_ifup $1 ; then
if [ -n "${addr_pfx}" ] ; then
# use the info from get_ip_info()
ip addr flush $1
ip addr add ${addr_pfx} dev $1
ip link set dev $1 up
[ ${gateway} ] && ip route add default via ${gateway}
fi
fi
}
# Usage: transfer_addrs src dst
# Copy all IP addresses (including aliases) from device $src to device $dst.
transfer_addrs () {
local src=$1
local dst=$2
# Don't bother if $dst already has IP addresses.
if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
return
fi
# Address lines start with 'inet' and have the device in them.
# Replace 'inet' with 'ip addr add' and change the device name $src
# to 'dev $src'.
ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
s/inet/ip addr add/
[EMAIL PROTECTED]([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
s/${src}/dev ${dst} label ${dst}/
s/secondary//
" | sh -e
# Remove automatic routes on destination device
ip route list | sed -ne "
/dev ${dst}\( \|$\)/ {
s/^/ip route del /
p
}" | sh -e
}
# Usage: transfer_routes src dst
# Get all IP routes to device $src, delete them, and
# add the same routes to device $dst.
# The original routes have to be deleted, otherwise adding them
# for $dst fails (duplicate routes).
transfer_routes () {
local src=$1
local dst=$2
# List all routes and grep the ones with $src in.
# Stick 'ip route del' on the front to delete.
# Change $src to $dst and use 'ip route add' to add.
ip route list | sed -ne "
/dev ${src}\( \|$\)/ {
h
s/^/ip route del /
P
g
s/${src}/${dst}/
s/^/ip route add /
P
d
}" | sh -e
}
##
# link_exists interface
#
# Returns 0 if the interface named exists (whether up or down), 1 otherwise.
#
link_exists()
{
if ip link show "$1" >/dev/null 2>/dev/null
then
return 0
else
return 1
fi
}
# Set the default forwarding policy for $dev to drop.
# Allow forwarding to the bridge.
antispoofing () {
iptables -P FORWARD DROP
iptables -F FORWARD
iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
iptables -A FORWARD -m physdev --physdev-in ${vif0} -j ACCEPT
}
# Usage: show_status dev bridge
# Print ifconfig and routes.
show_status () {
local dev=$1
local bridge=$2
echo '============================================================'
ip addr show ${dev}
ip addr show ${bridge}
echo ' '
brctl show ${bridge}
echo ' '
ip route list
echo ' '
route -n
echo '============================================================'
}
is_network_root () {
local rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}'
/etc/mtab)
local rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}'
/etc/mtab)
[[ "$rootfs" =~ "^nfs" ]] || [[ "$rootopts" =~ "_netdev" ]] && return 0 ||
return 1
}
op_start () {
if [ "${bridge}" = "null" ] ; then
return
fi
if is_network_root ; then
[ -x /usr/bin/logger ] && /usr/bin/logger "network-bridge: bridging not
supported on network root; not starting"
return
fi
if ! link_exists "$vdev"; then
if link_exists "$pdev"; then
# The device is already up.
return
else
echo "
Link $vdev is missing.
This may be because you have reached the limit of the number of interfaces
that the loopback driver supports. If the loopback driver is a module, you
may raise this limit by passing it as a parameter (nloopbacks=<N>); if the
driver is compiled statically into the kernel, then you may set the parameter
using loopback.nloopbacks=<N> on the domain 0 kernel command line.
" >&2
exit 1
fi
fi
create_bridge ${bridge}
if link_exists "$vdev"; then
mac=`ip link show ${netdev} | grep 'link\/ether' | sed -e 's/.*ether
\(..:..:..:..:..:..\).*/\1/'`
preiftransfer ${netdev}
transfer_addrs ${netdev} ${vdev}
if is_bonding ${netdev} || ! ifdown ${netdev}; then
# Remember the IP details if necessary.
get_ip_info ${netdev}
ip link set ${netdev} down
ip addr flush ${netdev}
fi
ip link set ${netdev} name ${pdev}
ip link set ${vdev} name ${netdev}
setup_bridge_port ${pdev}
setup_bridge_port ${vif0}
ip link set ${netdev} addr ${mac} arp on
ip link set ${bridge} up
add_to_bridge ${bridge} ${vif0}
add_to_bridge2 ${bridge} ${pdev}
do_ifup ${netdev}
else
# old style without ${vdev}
transfer_addrs ${netdev} ${bridge}
transfer_routes ${netdev} ${bridge}
fi
if [ ${antispoof} = 'yes' ] ; then
antispoofing
fi
}
op_stop () {
if [ "${bridge}" = "null" ]; then
return
fi
if ! link_exists "$bridge"; then
return
fi
if link_exists "$pdev"; then
ip link set dev ${vif0} down
mac=`ip link show ${netdev} | grep 'link\/ether' | sed -e 's/.*ether
\(..:..:..:..:..:..\).*/\1/'`
transfer_addrs ${netdev} ${pdev}
if ! ifdown ${netdev}; then
get_ip_info ${netdev}
fi
ip link set ${netdev} down arp off
ip link set ${netdev} addr fe:ff:ff:ff:ff:ff
ip link set ${pdev} down
ip addr flush ${netdev}
ip link set ${pdev} addr ${mac} arp on
brctl delif ${bridge} ${pdev}
brctl delif ${bridge} ${vif0}
ip link set ${bridge} down
ip link set ${netdev} name ${vdev}
ip link set ${pdev} name ${netdev}
do_ifup ${netdev}
else
transfer_routes ${bridge} ${netdev}
ip link set ${bridge} down
fi
brctl delbr ${bridge}
}
# adds $dev to $bridge but waits for $dev to be in running state first
add_to_bridge2() {
local bridge=$1
local dev=$2
local maxtries=10
echo -n "Waiting for ${dev} to negotiate link."
ip link set ${dev} up
for i in `seq ${maxtries}` ; do
if ifconfig ${dev} | grep -q RUNNING ; then
break
else
echo -n '.'
sleep 1
fi
done
if [ ${i} -eq ${maxtries} ] ; then echo '(link isnt in running state)' ; fi
add_to_bridge ${bridge} ${dev}
}
case "$command" in
start)
op_start
;;
stop)
op_stop
;;
status)
show_status ${netdev} ${bridge}
;;
*)
echo "Unknown command: $command" >&2
echo 'Valid commands are: start, stop, status' >&2
exit 1
esac
#!/bin/sh
#============================================================================
# Xen vlan bridge start/stop script.
# Xend calls a network script when it starts.
# The script name to use is defined in /etc/xen/xend-config.sxp
# in the network-script field.
#
# This script creates multiple bridges to segregate individual domUs to
# separate VLANs. Customize to fit your needs.
#
# Usage:
#
# network-multi-vlan (start|stop|status)
#
#============================================================================
dir=$(dirname "$0")
##
# To make the tagged interface available to some DomUs, create the default
# bridge. Comment this out to only make vlan-based bridges available.
# "$dir/network-bridge" "$@" vifnum=0
# Above line commented out by (mcder304)
##
# Once all normal bridges are active, create any vlan-based briges.
"/etc/xen/scripts/network-bridge-vlan" "$@" vlan=371
"/etc/xen/scripts/network-bridge-vlan" "$@" vlan=372
#!/bin/sh
# Setup the bridge
# If the line below is commented out you cluster is officially broke (mcder304)
netdev=bond0
#============================================================================
# Xen vlan bridge start/stop script.
# Xend calls a network script when it starts.
# The script name to use is defined in /etc/xen/xend-config.sxp
# in the network-script field.
#
# This script creates a bridge (default vlanbr${vlan}), creates a device
# (default eth0.${vlan}), and adds it to the bridge. This scrip assumes
# the Dom0 does not have an active interface on the selected vlan; if
# it does the network-bridge script should be used instead.
#
# To use this script, vconfig must be installed.
#
# Usage:
#
# network-bridge-vlan (start|stop|status) {VAR=VAL}*
#
# Vars:
#
# vlan The vlan to bridge (default 2)
# bridge The bridge to use (default vlanbr${vlan}).
# netdev The interface to add to the bridge (default eth0}).
#
#
#
# Internal Vars:
# vlandev="${netdev}.${vlan}"
#
# start:
# Creates the bridge
# Adds vlandev to netdev
# Enslaves vlandev to bridge
#
# stop:
# Removes vlandev from the bridge
# Removes vlandev from netdev
# Deletes bridge
#
# status:
# Print vlan, bridge
#
#============================================================================
dir=$(dirname "$0")
. "$dir/xen-script-common.sh"
findCommand "$@"
evalVariables "$@"
vlan=${vlan:-2}
bridge=${bridge:-vlanbr${vlan}}
netdev=${netdev:-eth0}
vlandev="${netdev}.${vlan}"
##
# link_exists interface
#
# Returns 0 if the interface named exists (whether up or down), 1 otherwise.
#
link_exists()
{
if ip link show "$1" >/dev/null 2>/dev/null
then
return 0
else
return 1
fi
}
# Usage: create_bridge bridge
create_bridge () {
local bridge=$1
# Don't create the bridge if it already exists.
if ! brctl show | grep -q ${bridge} ; then
brctl addbr ${bridge}
brctl stp ${bridge} off
brctl setfd ${bridge} 0
fi
ip link set ${bridge} up
}
# Usage: add_to_bridge bridge dev
add_to_bridge () {
local bridge=$1
local dev=$2
# Don't add $dev to $bridge if it's already on a bridge.
if ! brctl show | grep -q ${dev} ; then
brctl addif ${bridge} ${dev}
fi
}
# Usage: show_status vlandev bridge
# Print vlan and bridge
show_status () {
local vlandev=$1
local bridge=$2
echo '============================================================'
cat /proc/net/vlan/${vlandev}
echo ' '
brctl show ${bridge}
echo '============================================================'
}
op_start () {
if [ "${bridge}" = "null" ] ; then
return
fi
if ! link_exists "$netdev"; then
return
fi
if link_exists "$vlandev"; then
# The device is already up.
return
fi
create_bridge ${bridge}
ip link set ${netdev} up
vconfig set_name_type DEV_PLUS_VID_NO_PAD
vconfig add ${netdev} ${vlan}
ip link set ${vlandev} address fe:ff:ff:ff:ff:ff
ip link set ${vlandev} up
ip link set ${bridge} up
add_to_bridge2 ${bridge} ${vlandev}
}
op_stop () {
if [ "${bridge}" = "null" ]; then
return
fi
if ! link_exists "$bridge"; then
return
fi
if link_exists "$vlandev"; then
ip link set ${vlandev} down
brctl delif ${bridge} ${vlandev}
ip link set ${bridge} down
vconfig rem ${vlandev}
fi
brctl delbr ${bridge}
}
# adds $dev to $bridge but waits for $dev to be in running state first
add_to_bridge2() {
local bridge=$1
local dev=$2
local maxtries=10
echo -n "Waiting for ${dev} to negotiate link."
for i in `seq ${maxtries}` ; do
if ifconfig ${dev} | grep -q RUNNING ; then
break
else
echo -n '.'
sleep 1
fi
done
if [ ${i} -eq ${maxtries} ] ; then echo '(link isnt in running state)' ; fi
add_to_bridge ${bridge} ${dev}
}
case "$command" in
start)
op_start
;;
stop)
op_stop
;;
status)
show_status ${vlandev} ${bridge}
;;
*)
echo "Unknown command: $command" >&2
echo 'Valid commands are: start, stop, status' >&2
exit 1
esac
# -*- sh -*-
#
# Xend configuration file.
#
# This example configuration is appropriate for an installation that
# utilizes a bridged network configuration. Access to xend via http
# is disabled.
# Commented out entries show the default for that entry, unless otherwise
# specified.
#(logfile /var/log/xen/xend.log)
#(loglevel DEBUG)
(xend-http-server yes)
(xend-unix-server yes)
(xend-tcp-xmlrpc-server yes)
(xend-unix-xmlrpc-server yes)
(xend-relocation-server yes)
# The relocation server should be kept desactivated unless using a trusted
# network, the domain virtual memory will be exchanged in raw form without
# encryption of the communication. See also xend-relocation-hosts-allow option
(xend-unix-path /var/lib/xend/xend-socket)
# Port xend should use for the HTTP interface, if xend-http-server is set.
(xend-port 8000)
# Port xend should use for the relocation interface, if xend-relocation-server
# is set.
(xend-relocation-port 8002)
# Address xend should listen on for HTTP connections, if xend-http-server is
# set.
# Specifying 'localhost' prevents remote connections.
# Specifying the empty string '' (the default) allows all connections.
(xend-address '')
#(xend-address localhost)
# Address xend should listen on for relocation-socket connections, if
# xend-relocation-server is set.
# Meaning and default as for xend-address above.
(xend-relocation-address '')
# The hosts allowed to talk to the relocation port. If this is empty (the
# default), then all connections are allowed (assuming that the connection
# arrives on a port and interface on which we are listening; see
# xend-relocation-port and xend-relocation-address above). Otherwise, this
# should be a space-separated sequence of regular expressions. Any host with
# a fully-qualified domain name or an IP address that matches one of these
# regular expressions will be accepted.
#
# For example:
# (xend-relocation-hosts-allow '^localhost$ ^.*\.example\.org$')
#
(xend-relocation-hosts-allow '')
#(xend-relocation-hosts-allow '^localhost$ ^localhost\\.localdomain$')
# The limit (in kilobytes) on the size of the console buffer
#(console-limit 1024)
##
# To bridge network traffic, like this:
#
# dom0: fake eth0 -> vif0.0 -+
# |
# bridge -> real eth0 -> the network
# |
# domU: fake eth0 -> vifN.0 -+
#
# use
#
# (network-script network-bridge)
#
# Your default ethernet device is used as the outgoing interface, by default.
# To use a different one (e.g. eth1) use
#
# (network-script 'network-bridge netdev=eth1')
# (network-script 'network-bridge netdev=bond0')
(network-script network-multi-vlan)
#
# The bridge is named xenbr0, by default. To rename the bridge, use
#
#(network-script 'network-bridge bridge=xenbr0')
#
# It is possible to use the network-bridge script in more complicated
# scenarios, such as having two outgoing interfaces, with two bridges, and
# two fake interfaces per guest domain. To do things like this, write
# yourself a wrapper script, and call network-bridge from it, as appropriate.
#
#(network-script network-bridge)
# The script used to control virtual interfaces. This can be overridden on a
# per-vif basis when creating a domain or a configuring a new vif. The
# vif-bridge script is designed for use with the network-bridge script, or
# similar configurations.
#
# If you have overridden the bridge name using
# (network-script 'network-bridge bridge=<name>') then you may wish to do the
# same here. The bridge name can also be set when creating a domain or
# 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.
#
(vif-script vif-bridge)
## Use the following if network traffic is routed, as an alternative to the
# settings for bridged networking given above.
#(network-script network-route)
#(vif-script vif-route)
## Use the following if network traffic is routed with NAT, as an alternative
# to the settings for bridged networking given above.
#(network-script network-nat)
#(vif-script vif-nat)
# Dom0 will balloon out when needed to free memory for domU.
# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
# If dom0-min-mem=0, dom0 will never balloon out.
(dom0-min-mem 256)
# In SMP system, dom0 will use dom0-cpus # of CPUS
# If dom0-cpus = 0, dom0 will take all cpus available
(dom0-cpus 0)
# Whether to enable core-dumps when domains crash.
(enable-dump yes)
# The tool used for initiating virtual TPM migration
#(external-migration-tool '')
# The interface for VNC servers to listen on. Defaults
# to 127.0.0.1 To restore old 'listen everywhere' behaviour
# set this to 0.0.0.0
#(vnc-listen '127.0.0.1')
(vnc-listen '0.0.0.0')
# The default password for VNC console on HVM domain.
# Empty string is no authentication.
(vncpasswd '')
begin:vcard
fn:Leo J Pleiman, RHCE
n:Pleiman;Leo J
org:;GPS Federal
email;internet:[EMAIL PROTECTED]
title:Senior Consultant
tel;work:301.763.3527
tel;cell:410.688.3873
version:2.1
end:vcard
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list