Menu

#4528 Multiple nic use the same bridge

1.720
open
None
5
2015-01-26
2014-12-22
No

I have a guest with 6 interfaces.
Each interface has to bind to a different bridge (br6, br4, br0, br10, br50, br51).
When I created the interfaces, I selected the corresponding bridge.
Cloudmin created the files

-rwxr-xr-x 1 root root 244 dic 22 11:09 /kvm/pfsenseb.cloudmin.extensys.lan-eth0.sh
-rwxr-xr-x 1 root root 244 dic 22 11:09 /kvm/pfsenseb.cloudmin.extensys.lan-eth1.sh
-rwxr-xr-x 1 root root 244 dic 22 11:09 /kvm/pfsenseb.cloudmin.extensys.lan-eth2.sh
-rwxr-xr-x 1 root root 244 dic 22 11:09 /kvm/pfsenseb.cloudmin.extensys.lan-eth3.sh
-rwxr-xr-x 1 root root 244 dic 22 11:09 /kvm/pfsenseb.cloudmin.extensys.lan-eth4.sh
-rwxr-xr-x 1 root root 244 dic 22 11:09 /kvm/pfsenseb.cloudmin.extensys.lan-eth5.sh

All of them are bridging the tap on br6

grep '/sbin/brctl addif'  /kvm/pfsenseb*eth?.sh
/kvm/pfsenseb.cloudmin.extensys.lan-eth0.sh:/sbin/brctl addif br6 $1
/kvm/pfsenseb.cloudmin.extensys.lan-eth1.sh:/sbin/brctl addif br6 $1
/kvm/pfsenseb.cloudmin.extensys.lan-eth2.sh:/sbin/brctl addif br6 $1
/kvm/pfsenseb.cloudmin.extensys.lan-eth3.sh:/sbin/brctl addif br6 $1
/kvm/pfsenseb.cloudmin.extensys.lan-eth4.sh:/sbin/brctl addif br6 $1
/kvm/pfsenseb.cloudmin.extensys.lan-eth5.sh:/sbin/brctl addif br6 $1

E.g.: this interface should bind to br10

cat /kvm/pfsenseb.cloudmin.extensys.lan-eth3.sh

1
2
3
4
5
6
7
8
#!/bin/sh
echo $1 >/kvm/pfsenseb.cloudmin.extensys.lan-eth3.tap
/sbin/brctl addif br6 $1
/bin/ip link set dev $1 up
mtu=`/bin/ip link | grep br6: | sed -e 's/.*mtu //; s/ .*//'`
if [ "$mtu" != "" ]; then
    /bin/ip link set dev $1 mtu $mtu
fi

Cloudmin 1.720 on debian wheezy.

Discussion

  • Valerio Pachera

    Valerio Pachera - 2014-12-22

    Note: br6 is the bridge assinged at first interface.

     
  • Jamie Cameron

    Jamie Cameron - 2014-12-22

    Can you post the output from the following command, run as root via SSH on your Cloudmin master system :

    cloudmin list-interfaces --host pfsenseb.cloudmin.extensys.lan --multiline

     
  • Valerio Pachera

    Valerio Pachera - 2014-12-23

    I created a test guest for this purpose.
    The first interface (eth0) uses br6.
    The second interface (eth1) uses br4.

    This is the requested output:

    cloudmin list-interfaces --host test.cloudmin.extensys.lan --multiline
    eth0
        Physical interface: eth0
        Address method: Set by VM
        Ethernet address: 02:54:00:B9:81:9A
        Nameserver error: No Linux partitions found in disk image /dev/ssd00/test_cloudmin_extensys_lan_img
        Bridge: br6
        Device model: rtl8139
        Active: No
    eth1
        Physical interface: eth1
        Address method: Set by VM
        Ethernet address: 02:54:00:B9:81:BE
        Bridge: br4
        Device model: rtl8139
        Active: No
    

    And this is what i see

    grep br /kvm/test.cloudmin.extensys.lan-eth?.sh 
    /kvm/test.cloudmin.extensys.lan-eth0.sh:/sbin/brctl addif br6 $1
    /kvm/test.cloudmin.extensys.lan-eth0.sh:mtu=`/bin/ip link | grep br6: | sed -e 's/.*mtu //; s/ .*//'`
    /kvm/test.cloudmin.extensys.lan-eth1.sh:/sbin/brctl addif br6 $1
    /kvm/test.cloudmin.extensys.lan-eth1.sh:mtu=`/bin/ip link | grep br6: | sed -e 's/.*mtu //; s/ .*//'`
    
     
  • Jamie Cameron

    Jamie Cameron - 2014-12-24

    Ok, that's clearly broken - the bridges shown by list-interfaces should match those in the .sh files.

    Can you also post the output from "brctl show" on your system?

     

Log in to post a comment.