Bug#389683: [Pkg-xen-devel] Bug#389683: xen-utils-common: bridging script breaks networking

Filip Van Raemdonck mechanix at debian.org
Wed Sep 27 10:40:42 CEST 2006


On Wed, Sep 27, 2006 at 09:48:34AM +0200, Bastian Blank wrote:
> On Wed, Sep 27, 2006 at 08:58:31AM +0200, Filip Van Raemdonck wrote:
> >
> > Justification: breaks unrelated services
> 
> No, it does not.

Then how would you label the system becoming unreachable?

> > When running /etc/xen/scripts/network-bridge start, the system becomes
> > completely unreachable from the network.
> 
> You requested it.

No, I requested that it stay connected, as per the documentation in the
xend-config.sxp:

# dom0: fake eth0 -> vif0.0 -+
#                            |
#                          bridge -> real eth0 -> the network
#                            |
# domU: fake eth0 -> vifN.0 -+

The network link is not gone in this picture.

> > Running ifconfig, I can see eth0 (which is the virtual interface now if
> > I am correct), having the mac and IP address of the real eth0, and a
> > peth0 and xenbr0 both having no IP address and a mac address of
> > FE+(5 times :FF).
> 
> /var/log/xen/xend-hotplug.log may show something. Otherwise you have to
> use bash -x /etc/xen/scripts/network-bridge start to see what happens.

sh -x output attached.

> > When I set the IP address of xenbr0 manually to the eth0 address,
> > networking works again. But I am not sure whether that's how it is
> > supposed to be.
> 
> Setup the bridge by hand (The Debian bridge-utils package contains some
> nice support).

What I meant was, I am not sure whether xenbr0 is supposed to have an
IP address set.

Also, after adding the address manually, both xenbr0 and eth0 (the
virtual one?) have the same IP address.
Running ifconfig eth0 down makes the connection going away again,
unsurprisingly. Ifconfig eth0 up at that point sets the old IP again,
but does not restore connectivity; xenbr0 still has the assinged IP
address.

And if the bridge should be setup by hand rather than using the network
script, this (and how to do it) should be documented in the xen
package(s).


Regards,

Filip
-------------- next part --------------
chiron:~# sh -x /etc/xen/scripts/network-bridge start
++ dirname /etc/xen/scripts/network-bridge
+ dir=/etc/xen/scripts
+ . /etc/xen/scripts/xen-script-common.sh
++ set -e
+ . /etc/xen/scripts/xen-network-common.sh
++ '[' -e /etc/SuSE-release ']'
++ which ifup
+ findCommand start
+ for arg in '"$@"'
+ expr index start =
+ command=start
+ return
+ evalVariables start
+ for arg in '"$@"'
+ expr index start = '>' 1
++ ip route list
++ awk '/^default / { print $NF }'
++ sed 's/^[^0-9]*//'
+ vifnum=0
+ vifnum=0
+ bridge=xenbr0
+ netdev=eth0
+ antispoof=no
+ pdev=peth0
+ vdev=veth0
+ vif0=vif0.0
+ case "$command" in
+ op_start
+ '[' xenbr0 = null ']'
+ link_exists veth0
+ ip link show veth0
+ return 0
+ create_bridge xenbr0
+ local bridge=xenbr0
+ '[' '!' -e /sys/class/net/xenbr0/bridge ']'
+ brctl addbr xenbr0
+ brctl stp xenbr0 off
+ brctl setfd xenbr0 0
+ ip link set xenbr0 arp off
+ ip link set xenbr0 multicast off
+ ip link set xenbr0 up
+ link_exists veth0
+ ip link show veth0
+ return 0
++ ip link show eth0
++ sed -e 's/.*ether \(..:..:..:..:..:..\).*/\1/'
++ grep 'link\/ether'
+ mac=00:18:8b:31:b0:42
+ preiftransfer eth0
+ true
+ transfer_addrs eth0 veth0
+ local src=eth0
+ local dst=veth0
+ ip addr show dev veth0
+ egrep -q '^ *inet '
+ ip addr show dev eth0
+ egrep '^ *inet '
+ sed -e '
s/inet/ip addr add/
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
s/eth0/dev veth0/
'
+ sh -e
+ ip route list
+ sed -ne '
/dev veth0\( \|$\)/ {
  s/^/ip route del /
  p
}'
+ sh -e
+ ifdown eth0
+ ip link set eth0 name peth0
+ ip link set veth0 name eth0
+ setup_bridge_port peth0
+ local dev=peth0
+ ip link set peth0 down
+ ip link set peth0 arp off
+ ip link set peth0 multicast off
+ ip link set peth0 addr fe:ff:ff:ff:ff:ff
+ ip addr flush peth0
+ setup_bridge_port vif0.0
+ local dev=vif0.0
+ ip link set vif0.0 down
+ ip link set vif0.0 arp off
+ ip link set vif0.0 multicast off
+ ip link set vif0.0 addr fe:ff:ff:ff:ff:ff
+ ip addr flush vif0.0
Nothing to flush.
+ ip link set eth0 addr 00:18:8b:31:b0:42 arp on
+ ip link set xenbr0 up
+ add_to_bridge xenbr0 vif0.0
+ local bridge=xenbr0
+ local dev=vif0.0
+ '[' -e /sys/class/net/xenbr0/brif/vif0.0 ']'
+ brctl addif xenbr0 vif0.0
+ ip link set vif0.0 up
+ add_to_bridge2 xenbr0 peth0
+ local bridge=xenbr0
+ local dev=peth0
+ local maxtries=10
+ echo -n 'Waiting for peth0 to negotiate link.'
Waiting for peth0 to negotiate link.+ ip link set peth0 up
++ seq 10
+ for i in '`seq ${maxtries}`'
+ ifconfig peth0
+ grep -q RUNNING
+ echo -n .
.+ sleep 1
+ for i in '`seq ${maxtries}`'
+ ifconfig peth0
+ grep -q RUNNING
+ echo -n .
.+ sleep 1
+ for i in '`seq ${maxtries}`'
+ ifconfig peth0
+ grep -q RUNNING
+ echo -n .
.+ sleep 1
+ for i in '`seq ${maxtries}`'
+ ifconfig peth0
+ grep -q RUNNING
+ break
+ '[' 4 -eq 10 ']'
+ add_to_bridge xenbr0 peth0
+ local bridge=xenbr0
+ local dev=peth0
+ '[' -e /sys/class/net/xenbr0/brif/peth0 ']'
+ brctl addif xenbr0 peth0
+ ip link set peth0 up
+ do_ifup eth0
+ ifup eth0
+ '[' no = yes ']'
chiron:~# 


More information about the Pkg-xen-devel mailing list