WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Problems with bridged networking

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Problems with bridged networking
From: Thomas Robers <robers@xxxxxxxxx>
Date: Mon, 15 Sep 2008 17:00:04 +0200
Delivery-date: Mon, 15 Sep 2008 08:00:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48C6888A.3090500@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <48C6888A.3090500@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.16) Gecko/20080720 SUSE/2.0.0.16-1.1 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666
Hi,

I've now tested Xen 3.2 from backports.org on a Debian 4.0 test
machine with 7 Interfaces and the problem is in the script
'network-bridge'.
There's a function 'do_ifup' in it which I have modified and after
modification Xen 3.2 works on my Debian machine. I found that
with Xen 3.2 the bridges were there but not up and everything
works as expected when I did a 'ifconfig xenbrX up'.

Before modification:

        do_ifup() {
        if ! 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
                [ -n "$gateway" ] && ip route add default via ${gateway}
            fi
        fi
}


After modification:

        do_ifup() {
        ifconfig $1 up
        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
            [ -n "$gateway" ] && ip route add default via ${gateway}
        fi
}

So that way it works for me for now. But could there be any other
drawback except for further updates? I also haven't really found out
what this test with 'ifup' is really for. Can anybody explain what's
happening there? I saw this message from 'ifup' when it got executed
(e.g. for xenbr6):

        'Ignoring unkown interfacexenbr6=xenbr6'

Perhaps there is there anybody else with Debian Xen machine and uses more
than one physical network interface in bridged mode where it works out of
the box? Maybe I've overlooked something essentail?

Here's my xend-config.sxp

        (network-script network-bridge-wrapper)
        (vif-script vif-bridge)
        (dom0-min-mem 196)
        (dom0-cpus 0)
        (vncpasswd '')

and a config file for a domU machine:

        kernel  = '/boot/vmlinuz-2.6.18-6-xen-amd64'
        ramdisk = '/boot/initrd.img-2.6.18-6-xen-amd64'
        memory  = '256'
        root    = '/dev/hda1 ro'
        disk    = [ 'file:/xen/domains/dom1/disk.img,hda1,w', 
'file:/xen/domains/dom1/swap.img,hda2,w' ]
        name    = 'dom1'
        dhcp = 'dhcp'
        vif  = [ 'bridge=xenbr6' ]
        on_poweroff = 'destroy'
        on_reboot   = 'restart'
        on_crash    = 'restart'

'brctl show':

        xen-test:/etc/xen# brctl show
        bridge name     bridge id               STP enabled     interfaces
        xenbr0          8000.001d602f1a39       no              peth0
        xenbr1          8000.000a5e610e18       no              peth1
        xenbr2          8000.000a5e4efe58       no              peth2
        xenbr3          8000.000d88684080       no              peth3
        xenbr4          8000.000d88684081       no              peth4
        xenbr5          8000.000d88684082       no              peth5
        xenbr6          8000.000d88684083       no              peth6
                                                                vif2.0
Any suggestions are welcome.

Thanks!
Thomas

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users