Skip to contentSkip to conversation

how to mix bridges and bonding inc. vlans correctly on Kernel > 3.10

DISCUSSION Stefan Priebe - Profihost AG 4 participants 28 messages Nov 13, 2013 – Nov 18, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

Greets,
Stefan

#1 lore raw
Quoted 24 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never thought about how it is right. So maybe i was always wrong.

I've this:

eth2

    \
     -- bond1 -- vmbr1
    /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

    \
     -- bond1 -- vmbr1
    /              \
eth3                 \ vmbr1.3000
                          \ ---- tap114i1
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.

Also, the bonding configuration would be welcome.

Quoted 17 lines

I also tried this one without success:
eth2

    \
     -- bond1 -- vmbr1
    /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                    \ ---- tap114i1

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 26 lines
Quoted 24 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never thought about how it is right. So maybe i was always wrong.

I've this:

eth2

    \
     -- bond1 -- vmbr1
    /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

    \
     -- bond1 -- vmbr1
    /              \
eth3                 \ vmbr1.3000
                          \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

        slaves eth2 eth3
        bond-mode 802.3ad
        bond_miimon 100
        bond_updelay 200
        bond_downdelay 0

This should be miimon using lacp and not arp isn't it? Anything more needed?

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 16 lines
Quoted 16 lines

I also tried this one without success:
eth2

    \
     -- bond1 -- vmbr1
    /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                    \ ---- tap114i1

Greets,
Stefan

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
Quoted 40 lines · Stefan Priebe - Profihost AG

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 26 lines
Quoted 24 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never thought about how it is right. So maybe i was always wrong.

I've this:

eth2

    \
     -- bond1 -- vmbr1
    /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

    \
     -- bond1 -- vmbr1
    /              \
eth3                 \ vmbr1.3000
                          \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

Quoted 8 lines
       slaves eth2 eth3
       bond-mode 802.3ad
       bond_miimon 100
       bond_updelay 200
       bond_downdelay 0

This should be miimon using lacp and not arp isn't it? Anything more needed?

Yeah, it's miimon, so nothing here...

I'll try to set up a reproducer in the nearest future, a bit burdened now.

Are you using 3.10.X stable? Which version exactly? And at what version did it work - 3.9.?

Thank you!

Quoted 23 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 16 lines
Quoted 16 lines

I also tried this one without success:
eth2

    \
     -- bond1 -- vmbr1
    /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                    \ ---- tap114i1

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Am 13.11.2013 15:34, schrieb Veaceslav Falico:

Quoted 52 lines
Quoted 41 lines · Stefan Priebe - Profihost AG

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

    \
     -- bond1 -- vmbr1
    /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

    \
     -- bond1 -- vmbr1
    /              \
eth3                 \ vmbr1.3000
                          \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

Quoted 8 lines
       slaves eth2 eth3
       bond-mode 802.3ad
       bond_miimon 100
       bond_updelay 200
       bond_downdelay 0

This should be miimon using lacp and not arp isn't it? Anything more needed?

Quoted 6 lines

Yeah, it's miimon, so nothing here...

I'll try to set up a reproducer in the nearest future, a bit burdened now.

Are you using 3.10.X stable? Which version exactly? And at what version did it work - 3.9.?

I'm using 3.10.19 + this patchset from v3.12 (commit b8bde1c4f94908ce8e3c0434fb369a00e9217497
Merge: 4b6c787 dfb5fa3
Author: David S. Miller <[email protected]>
Date: Fri Oct 18 16:03:03 2013 -0400

Merge branch 'bridge_pvid'
)

The problem is simply that the network cards and also the bonds do not seem to know about the bridge on top so they just drop the vlan tagged packages.

Quoted 25 lines

Thank you!

Quoted 23 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 16 lines
Quoted 16 lines

I also tried this one without success:
eth2

    \
     -- bond1 -- vmbr1
    /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                    \ ---- tap114i1

Greets,
Stefan

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
In reply to Stefan Priebe - Profihost AG
Quoted 40 lines · Stefan Priebe - Profihost AG

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 26 lines
Quoted 24 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

Quoted 9 lines
         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

-vlad

Quoted 27 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines · Stefan Priebe - Profihost AG
Quoted 47 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 7 lines
Quoted 3 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Greets,
Stefan

Main question is - is this one correct:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 30 lines

-vlad

Quoted 27 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 16 lines
Quoted 16 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

Greets,
Stefan

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
Quoted 80 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines · Stefan Priebe - Profihost AG
Quoted 47 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 7 lines
Quoted 3 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
Quoted 6 lines

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

eth* should get into forwarding mode cause bond0 is a port of the bridge and should propagate its state towards its slaves. Something is wrong here.

Maybe we're looking at the wrong direction - and the promisc for the ethernet drivers got broken?

What ethernet cards/driver do you use for eth*?

Quoted 6 lines

Greets,
Stefan

Main question is - is this one correct:

Both are correct. Here's my setup (sorry for stretching):

+---------------+           +------------+              +-------------+           +---------+           +------+
|     bond1     |           |            |              |   bridge0   |           |         |           |      |
|  192.168.2.1  |  master   | bridge0.15 |  neighbour   | 192.168.3.1 |  master   |  bond0  |  master   | eth2 |
|               | --------> |            | ------------ | 192.168.4.1 | --------> |         | --------> |      |
+---------------+           +------------+              +-------------+           +---------+           +------+
                                                                                    |
                                                                                    | master
                                                                                    v
+---------------+                                                                 +---------+
|    dummy0     |                                                                 |  eth0   |
+---------------+                                                                 +---------+

(disregard that dummy0).

All 192.168.X.1 ips are pingable (via the correct vlans) on both net-next and stable 3.10.19.

Quoted 49 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 30 lines

-vlad

Quoted 27 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
Quoted 90 lines

Am 13.11.2013 um 17:21 schrieb Veaceslav Falico <[email protected]>:

Quoted 80 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines · Stefan Priebe - Profihost AG
Quoted 47 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

    \
     -- bond1 -- vmbr1
    /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

    \
     -- bond1 -- vmbr1
    /              \
eth3                 \ vmbr1.3000
                          \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

        slaves eth2 eth3
        bond-mode 802.3ad
        bond_miimon 100
        bond_updelay 200
        bond_downdelay 0
Quoted 6 lines
Quoted 2 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
Quoted 6 lines

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500
Quoted 7 lines

eth* should get into forwarding mode cause bond0 is a port of the bridge and should propagate its state towards its slaves. Something is wrong here.

Maybe we're looking at the wrong direction - and the promisc for the ethernet drivers got broken?

What ethernet cards/driver do you use for eth*?

intel igb

Quoted 74 lines
Quoted 7 lines

Greets,
Stefan

Main question is - is this one correct:

Both are correct. Here's my setup (sorry for stretching):

+---------------+           +------------+              +-------------+           +---------+           +------+
|     bond1     |           |            |              |   bridge0   |           |         |           |      |
|  192.168.2.1  |  master   | bridge0.15 |  neighbour   | 192.168.3.1 |  master   |  bond0  |  master   | eth2 |
|               | --------> |            | ------------ | 192.168.4.1 | --------> |         | --------> |      |
+---------------+           +------------+              +-------------+           +---------+           +------+
                                                                                   |
                                                                                   | master
                                                                                   v
+---------------+                                                                 +---------+
|    dummy0     |                                                                 |  eth0   |
+---------------+                                                                 +---------+

(disregard that dummy0).

All 192.168.X.1 ips are pingable (via the correct vlans) on both net-next and stable 3.10.19.

Quoted 48 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

    \
     -- bond1 -- vmbr1
    /              \
eth3                 \ vmbr1.3000
                          \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

    \
     -- bond1 -- vmbr1
    /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                    \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 29 lines

-vlad

Quoted 26 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

    \
     -- bond1 -- vmbr1
    /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                    \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw
In reply to Veaceslav Falico
Quoted 90 lines · Veaceslav Falico
Quoted 81 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 49 lines · Stefan Priebe - Profihost AG
Quoted 48 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 32 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 4 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this
is bad!

Quoted 4 lines

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 7 lines
Quoted 3 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
Quoted 6 lines

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500
Quoted 5 lines

eth* should get into forwarding mode cause bond0 is a port of the bridge and should propagate its state towards its slaves. Something is wrong here.

Maybe we're looking at the wrong direction - and the promisc for the ethernet drivers got broken?

I was able to duplicate Stefans results only when I turn off the link to the underlying devices when building the bridge. When the link is off, the rx_flags do not propagate down to the lower level devices.

What about something like this (completely untested)

drivers/net/bonding/bond_main.c +11 -0
index 4dd5ee2..3051744 100644
@@ -2863,6 +2863,17 @@ static int bond_slave_netdev_event(unsigned long event,
                        bond_release(bond_dev, slave_dev);
                break;
        case NETDEV_UP:
+               /* If the bond was set to primisc, but slave has not due to
+                * slave being down when the command was issued, sync the
+                * state when the slave comes up.
+                */
+               if (bond_dev->flags & IFF_PROMISC && !slave_dev->promiscuity) {
+                       if (!USES_PRIMARY(bond))
+                               dev_set_promiscuity(slave_dev, 1);
+                       else if (slave == bond->curr_active_slave)
+                               dev_set_promiscuity(slave_dev, 1);
+               }
+
        case NETDEV_CHANGE:
                old_speed = slave->speed;
                old_duplex = slave->duplex;

-vlad

Quoted 88 lines

What ethernet cards/driver do you use for eth*?

Quoted 6 lines

Greets,
Stefan

Main question is - is this one correct:

Both are correct. Here's my setup (sorry for stretching):

+---------------+           +------------+
+-------------+           +---------+           +------+
|     bond1     |           |            |              |   bridge0
|           |         |           |      |
|  192.168.2.1  |  master   | bridge0.15 |  neighbour   | 192.168.3.1 |
master   |  bond0  |  master   | eth2 |
|               | --------> |            | ------------ | 192.168.4.1 |
--------> |         | --------> |      |
+---------------+           +------------+
+-------------+           +---------+           +------+
                                                                                     |
                                                                                     | master
                                                                                     v
+---------------+
+---------+
|    dummy0
|                                                                 |
eth0   |
+---------------+
+---------+

(disregard that dummy0).

All 192.168.X.1 ips are pingable (via the correct vlans) on both net-next and stable 3.10.19.

Quoted 50 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 31 lines

-vlad

Quoted 28 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not
with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Am 13.11.2013 18:21, schrieb Vlad Yasevich:

Quoted 132 lines · Veaceslav Falico
Quoted 92 lines
Quoted 83 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 51 lines · Stefan Priebe - Profihost AG
Quoted 50 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 33 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 4 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this
is bad!

Quoted 5 lines

As a guess - do you use arp monitoring for bonding? Try using miimon -
there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 7 lines
Quoted 3 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
Quoted 6 lines

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500
Quoted 6 lines

eth* should get into forwarding mode cause bond0 is a port of the bridge and should propagate its state towards its slaves. Something is wrong here.

Maybe we're looking at the wrong direction - and the promisc for the ethernet drivers got broken?

I was able to duplicate Stefans results only when I turn off the link to the underlying devices when building the bridge. When the link is off, the rx_flags do not propagate down to the lower level devices.

What about something like this (completely untested)

drivers/net/bonding/bond_main.c +11 -0
index 4dd5ee2..3051744 100644
@@ -2863,6 +2863,17 @@ static int bond_slave_netdev_event(unsigned long
 event,
                         bond_release(bond_dev, slave_dev);
                 break;
         case NETDEV_UP:
+               /* If the bond was set to primisc, but slave has not due to
+                * slave being down when the command was issued, sync the
+                * state when the slave comes up.
+                */
+               if (bond_dev->flags & IFF_PROMISC &&
 !slave_dev->promiscuity) {
+                       if (!USES_PRIMARY(bond))
+                               dev_set_promiscuity(slave_dev, 1);
+                       else if (slave == bond->curr_active_slave)
+                               dev_set_promiscuity(slave_dev, 1);
+               }
+
         case NETDEV_CHANGE:
                 old_speed = slave->speed;
                 old_duplex = slave->duplex;
Quoted 2 lines

-vlad

Quoted 1 line

I tried that one but it still looks like this:

[  173.266915] device tap113i1 entered promiscuous mode
[  173.305617] 8021q: adding VLAN 3000 to HW filter on device bond1.3000
[  173.315881] device bond1.3000 entered promiscuous mode
[  173.315926] vmbr1v3000: port 1(bond1.3000) entered forwarding state
[  173.315929] vmbr1v3000: port 1(bond1.3000) entered forwarding state
[  173.319844] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  173.319847] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  188.344076] vmbr1v3000: port 1(bond1.3000) entered forwarding state
# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc htb master vmbr1v3000 state UNKNOWN qlen 500
Quoted 92 lines
Quoted 91 lines

What ethernet cards/driver do you use for eth*?

Quoted 6 lines

Greets,
Stefan

Main question is - is this one correct:

Both are correct. Here's my setup (sorry for stretching):

+---------------+           +------------+
+-------------+           +---------+           +------+
|     bond1     |           |            |              |   bridge0
|           |         |           |      |
|  192.168.2.1  |  master   | bridge0.15 |  neighbour   | 192.168.3.1 |
master   |  bond0  |  master   | eth2 |
|               | --------> |            | ------------ | 192.168.4.1 |
--------> |         | --------> |      |
+---------------+           +------------+
+-------------+           +---------+           +------+

|

| master

v

+---------------+
+---------+
|    dummy0
|                                                                 |
eth0   |
+---------------+
+---------+

(disregard that dummy0).

All 192.168.X.1 ips are pingable (via the correct vlans) on both net-next and stable 3.10.19.

Quoted 51 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 32 lines

-vlad

Quoted 29 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not
with promisc mode. The one below works fine if i set eth2 and eth3 into
promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#11 lore raw
Quoted 109 lines · Stefan Priebe

Am 13.11.2013 18:21, schrieb Vlad Yasevich:

Quoted 108 lines · Veaceslav Falico
Quoted 94 lines
Quoted 85 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 53 lines · Stefan Priebe - Profihost AG
Quoted 52 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 34 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 5 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i
need to put eth2 and eth3 into promisc mode to get it working ;-( this
is bad!

Quoted 6 lines

As a guess - do you use arp monitoring for bonding? Try using miimon -
there were some issues with it in 3.10, which were fixed by some huge
patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 7 lines
Quoted 3 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
Quoted 6 lines

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500
Quoted 6 lines

eth* should get into forwarding mode cause bond0 is a port of the bridge and should propagate its state towards its slaves. Something is wrong here.

Maybe we're looking at the wrong direction - and the promisc for the ethernet drivers got broken?

I was able to duplicate Stefans results only when I turn off the link to the underlying devices when building the bridge. When the link is off, the rx_flags do not propagate down to the lower level devices.

What about something like this (completely untested)

[snip old patch]

Quoted 15 lines
Quoted 3 lines

-vlad

Quoted 1 line

I tried that one but it still looks like this:

[  173.266915] device tap113i1 entered promiscuous mode
[  173.305617] 8021q: adding VLAN 3000 to HW filter on device bond1.3000
[  173.315881] device bond1.3000 entered promiscuous mode
[  173.315926] vmbr1v3000: port 1(bond1.3000) entered forwarding state
[  173.315929] vmbr1v3000: port 1(bond1.3000) entered forwarding state
[  173.319844] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  173.319847] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  188.344076] vmbr1v3000: port 1(bond1.3000) entered forwarding state
Quoted 6 lines
# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Stefan

Can you try out attached patch please. I ran it in my environment and always get promisc link when attaching devices to the bridge.

Thanks
-vlad

Quoted 93 lines
Quoted 86 lines
Quoted 86 lines

What ethernet cards/driver do you use for eth*?

Quoted 6 lines

Greets,
Stefan

Main question is - is this one correct:

Both are correct. Here's my setup (sorry for stretching):

+---------------+           +------------+
+-------------+           +---------+           +------+
|     bond1     |           |            |              |   bridge0
|           |         |           |      |
|  192.168.2.1  |  master   | bridge0.15 |  neighbour   | 192.168.3.1 |
master   |  bond0  |  master   | eth2 |
|               | --------> |            | ------------ | 192.168.4.1 |
--------> |         | --------> |      |
+---------------+           +------------+
+-------------+           +---------+           +------+

|

| master

v

+---------------+
+---------+
|    dummy0
|                                                                 |
eth0   |
+---------------+
+---------+

(disregard that dummy0).

All 192.168.X.1 ips are pingable (via the correct vlans) on both net-next and stable 3.10.19.

Quoted 46 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 27 lines

-vlad

Quoted 25 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not
with promisc mode. The one below works fine if i set eth2 and eth3 into
promisc mode.

Stefan

Quoted 17 lines
Quoted 17 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

From 964cbe4596d002871fa0dea7526536769bef4b69 Mon Sep 17 00:00:00 2001

From: Vlad Yasevich <[email protected]>
Date: Wed, 13 Nov 2013 13:18:59 -0500
Subject: [PATCH] core: Propagate rx_flags changes to slave|master devices even
if down.

If the device is a master or slave device, propagate rx_flag changes to them even if they are down. This makes sure that when complex stacked configuration are set up, the flags are properly set on all devices.

---
 net/core/dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/core/dev.c +3 -1
index fc913f4..016857b 100644
@@ -4525,7 +4525,9 @@ static void dev_change_rx_flags(struct net_device *dev, int flags)
 {
 	const struct net_device_ops *ops = dev->netdev_ops;
 
-	if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
+	if (((dev->flags & IFF_UP) ||
+	     (dev->flags & (IFF_MASTER | IFF_SLAVE)))
+	    && ops->ndo_change_rx_flags)
 		ops->ndo_change_rx_flags(dev, flags);
 }
 
Signature · 1 line
1.8.4.2
#12 lore raw

Hi,

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

thos one works fine now.

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

this one does not. Another note to this one. It also never worked on RHEL6 - it started working with about 2.6.39 and stopped with 3.9 or 3.10. But it was the only one where gvrp on vlans had worked.

Greets,
Stefan

#13 lore raw
Quoted 19 lines · Stefan Priebe - Profihost AG

Hi,

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

thos one works fine now.

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 3 lines

this one does not. Another note to this one. It also never worked on RHEL6 - it started working with about 2.6.39 and stopped with 3.9 or 3.10. But it was the only one where gvrp on vlans had worked.

bridge device in this config is neither master nor slave, if I read it correctly.

You might want to try my patch to see if it works (my previous email).

Quoted 7 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw
Quoted 21 lines · Veaceslav Falico
Quoted 19 lines · Stefan Priebe - Profihost AG

Hi,

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

thos one works fine now.

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 6 lines
Quoted 3 lines

this one does not. Another note to this one. It also never worked on RHEL6 - it started working with about 2.6.39 and stopped with 3.9 or 3.10. But it was the only one where gvrp on vlans had worked.

bridge device in this config is neither master nor slave, if I read it correctly.

Bridge doesn't propagate rx_flags to lower-level devices. It automatically set all lower devices to promisc mode.

So, in the second case above, eth2 and eth3 have to be in promisc, but nothing else does. I am not sure I understand Stefans notation though wrt to how vmbr1.3000 and tap114i1 are configured. Stefan, can you elaborate?

Thanks
-vlad

Quoted 10 lines

You might want to try my patch to see if it works (my previous email).

Quoted 7 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#15 lore raw

Am 14.11.2013 22:13, schrieb Vlad Yasevich:

Quoted 29 lines · Veaceslav Falico
Quoted 21 lines
Quoted 19 lines · Stefan Priebe - Profihost AG

Hi,

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

thos one works fine now.

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 6 lines
Quoted 3 lines

this one does not. Another note to this one. It also never worked on RHEL6 - it started working with about 2.6.39 and stopped with 3.9 or 3.10. But it was the only one where gvrp on vlans had worked.

bridge device in this config is neither master nor slave, if I read it correctly.

Quoted 7 lines

Bridge doesn't propagate rx_flags to lower-level devices. It automatically set all lower devices to promisc mode.

So, in the second case above, eth2 and eth3 have to be in promisc, but nothing else does. I am not sure I understand Stefans notation though wrt to how vmbr1.3000 and tap114i1 are configured. Stefan, can you elaborate?

Sorry . means vlan - so vmbr1.3000 is just a vlan on top of vmbr1. *brX is a bridge. Bond is a lacp bond ;-)

Stefan

Quoted 14 lines

Thanks
-vlad

Quoted 10 lines

You might want to try my patch to see if it works (my previous email).

Quoted 7 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw
Quoted 40 lines · Stefan Priebe

Am 14.11.2013 22:13, schrieb Vlad Yasevich:

Quoted 38 lines · Veaceslav Falico
Quoted 25 lines
Quoted 22 lines · Stefan Priebe - Profihost AG

Hi,

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

thos one works fine now.

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 7 lines
Quoted 3 lines

this one does not. Another note to this one. It also never worked on RHEL6 - it started working with about 2.6.39 and stopped with 3.9 or 3.10. But it was the only one where gvrp on vlans had worked.

bridge device in this config is neither master nor slave, if I read it correctly.

Bridge doesn't propagate rx_flags to lower-level devices. It automatically set all lower devices to promisc mode.

Quoted 9 lines
Quoted 4 lines

So, in the second case above, eth2 and eth3 have to be in promisc, but nothing else does. I am not sure I understand Stefans notation though wrt to how vmbr1.3000 and tap114i1 are configured. Stefan, can you elaborate?

Sorry . means vlan - so vmbr1.3000 is just a vlan on top of vmbr1. *brX is a bridge. Bond is a lacp bond ;-)

Ok. I got that. But where is tap attached? You are showing it attached to the vlan,
but you can't do that unless its a macvtap. macvtaps on top of bridges is just
asking for trouble.

Thanks
-vlad

Quoted 20 lines

Stefan

Quoted 16 lines

Thanks
-vlad

Quoted 11 lines

You might want to try my patch to see if it works (my previous email).

Quoted 7 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#17 lore raw

Am 17.11.2013 04:41, schrieb Vladislav Yasevich:

Quoted 47 lines · Stefan Priebe
Quoted 46 lines

Am 14.11.2013 22:13, schrieb Vlad Yasevich:

Quoted 42 lines · Veaceslav Falico
Quoted 25 lines
Quoted 22 lines · Stefan Priebe - Profihost AG

Hi,

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

thos one works fine now.

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 7 lines
Quoted 3 lines

this one does not. Another note to this one. It also never worked on RHEL6 - it started working with about 2.6.39 and stopped with 3.9 or 3.10. But it was the only one where gvrp on vlans had worked.

bridge device in this config is neither master nor slave, if I read it correctly.

Bridge doesn't propagate rx_flags to lower-level devices. It automatically set all lower devices to promisc mode.

So, in the second case above, eth2 and eth3 have to be in promisc, but nothing else does. I am not sure I understand Stefans notation though wrt to how vmbr1.3000 and tap114i1 are configured. Stefan, can you elaborate?

Quoted 7 lines
Quoted 3 lines

Sorry . means vlan - so vmbr1.3000 is just a vlan on top of vmbr1. *brX is a bridge. Bond is a lacp bond ;-)

Ok. I got that. But where is tap attached? You are showing it attached to the vlan,
but you can't do that unless its a macvtap.

Why not? It was working until 3.9 - but with the patch in this thread the first method adding a bridge on top of the bond works fine - so this is OK for me too.

Greets,
Stefan

#18 lore raw
In reply to Vlad Yasevich
Quoted 2 lines · Vlad Yasevich

Can you try out attached patch please. I ran it in my environment and always get promisc link when attaching devices to the bridge.

It's interesting, actually, why do we need to check for IFF_UP at all when changing flags.

The addition of IFF_UP goes up to:

commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7

Author: Patrick McHardy <[email protected]>
Date:   Tue Oct 7 15:26:48 2008 -0700

net: only invoke dev->change_rx_flags when device is UP

Jesper Dangaard Brouer <[email protected]> reported a bug when setting a VLAN device down that is in promiscous mode:

When the VLAN device is set down, the promiscous count on the real device is decremented by one by vlan_dev_stop(). When removing the promiscous flag from the VLAN device afterwards, the promiscous count on the real device is decremented a second time by the vlan_change_rx_flags() callback.

... snip ...

However, I'm not sure that this is still needed, cause:

commit deede2fabe24e00bd7e246eb81cd5767dc6fcfc7

Author: Matthijs Kooijman <[email protected]>
Date:   Mon Oct 31 04:53:13 2011 +0000

vlan: Don't propagate flag changes on down interfaces.

When (de)configuring a vlan interface, the IFF_ALLMULTI ans IFF_PROMISC flags are cleared or set on the underlying interface. So, if these flags are changed on a vlan interface that is not up, the flags underlying interface might be set or cleared twice.

Only propagating flag changes when a device is up makes sure this does not happen. It also makes sure that an underlying device is not set to promiscuous or allmulti mode for a vlan device that is down.

... snip ...

which fixed completely the initial issue with vlans.

Maybe we should just remove the IFF_UP check in dev_change_rx_flags(), and let the drivers using it handle its own logic, as vlan does?

Something like this:

net/core/dev.c +1 -1
index 8ffc52e..9615cd7 100644
@@ -4995,7 +4995,7 @@ static void dev_change_rx_flags(struct net_device *dev, int flags)
 {
 	const struct net_device_ops *ops = dev->netdev_ops;
 
-	if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
+	if (ops->ndo_change_rx_flags)
 		ops->ndo_change_rx_flags(dev, flags);
 }
 
Quoted 3 lines

Thanks
-vlad

#19 lore raw
Quoted 19 lines · Veaceslav Falico
Quoted 2 lines · Vlad Yasevich

Can you try out attached patch please. I ran it in my environment and always get promisc link when attaching devices to the bridge.

It's interesting, actually, why do we need to check for IFF_UP at all when changing flags.

The addition of IFF_UP goes up to:

commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7

Author: Patrick McHardy <[email protected]>
Date:   Tue Oct 7 15:26:48 2008 -0700

net: only invoke dev->change_rx_flags when device is UP

Jesper Dangaard Brouer <[email protected]> reported a bug when setting a
VLAN
device down that is in promiscous mode:

Quoted 8 lines

When the VLAN device is set down, the promiscous count on the real device is decremented by one by vlan_dev_stop(). When removing the promiscous flag from the VLAN device afterwards, the promiscous count on the real device is decremented a second time by the vlan_change_rx_flags() callback.

... snip ...

This was applied in 2.6.27 timeframe.

Quoted 15 lines

However, I'm not sure that this is still needed, cause:

commit deede2fabe24e00bd7e246eb81cd5767dc6fcfc7

Author: Matthijs Kooijman <[email protected]>
Date:   Mon Oct 31 04:53:13 2011 +0000

vlan: Don't propagate flag changes on down interfaces.

When (de)configuring a vlan interface, the IFF_ALLMULTI ans
IFF_PROMISC
flags are cleared or set on the underlying interface. So, if these
flags
are changed on a vlan interface that is not up, the flags underlying interface might be set or cleared twice.

Quoted 6 lines

Only propagating flag changes when a device is up makes sure this does not happen. It also makes sure that an underlying device is not set to promiscuous or allmulti mode for a vlan device that is down.

... snip ...

And this in 3.2. So how did this work for Stefan in 3.9? Unless there is something in Ubuntu that changed how the stacked interfaces are configured and is keeping interfaces down longer then it used to.

Quoted 5 lines

which fixed completely the initial issue with vlans.

Maybe we should just remove the IFF_UP check in dev_change_rx_flags(), and let the drivers using it handle its own logic, as vlan does?

This should work, but this might regress a few drivers. Looking through the callers of dev_set_promiscuity at least DSA driver suffers the same fate as VLAN.

-vlad

Quoted 20 lines

Something like this:

net/core/dev.c +1 -1
index 8ffc52e..9615cd7 100644
@@ -4995,7 +4995,7 @@ static void dev_change_rx_flags(struct net_device
 *dev, int flags)
  {
      const struct net_device_ops *ops = dev->netdev_ops;
 
-    if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
+    if (ops->ndo_change_rx_flags)
          ops->ndo_change_rx_flags(dev, flags);
  }
Quoted 5 lines

Thanks
-vlad

#20 lore raw

Am 14.11.2013 15:27, schrieb Vlad Yasevich:

Quoted 53 lines · Veaceslav Falico
Quoted 20 lines · Vlad Yasevich
Quoted 2 lines

Can you try out attached patch please. I ran it in my environment and always get promisc link when attaching devices to the bridge.

It's interesting, actually, why do we need to check for IFF_UP at all when
changing flags.

The addition of IFF_UP goes up to:

commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7

Author: Patrick McHardy <[email protected]>
Date:   Tue Oct 7 15:26:48 2008 -0700

net: only invoke dev->change_rx_flags when device is UP

Jesper Dangaard Brouer <[email protected]> reported a bug when setting a
VLAN
device down that is in promiscous mode:

Quoted 8 lines

When the VLAN device is set down, the promiscous count on the real device is decremented by one by vlan_dev_stop(). When removing the promiscous flag from the VLAN device afterwards, the promiscous count on the real device is decremented a second time by the vlan_change_rx_flags() callback.

... snip ...

This was applied in 2.6.27 timeframe.

Quoted 21 lines

However, I'm not sure that this is still needed, cause:

commit deede2fabe24e00bd7e246eb81cd5767dc6fcfc7

Author: Matthijs Kooijman <[email protected]>
Date:   Mon Oct 31 04:53:13 2011 +0000

vlan: Don't propagate flag changes on down interfaces.

When (de)configuring a vlan interface, the IFF_ALLMULTI ans
IFF_PROMISC
flags are cleared or set on the underlying interface. So, if these
flags
are changed on a vlan interface that is not up, the flags underlying interface might be set or cleared twice.

Only propagating flag changes when a device is up makes sure this
does
not happen. It also makes sure that an underlying device is not
set to
promiscuous or allmulti mode for a vlan device that is down.

Quoted 6 lines
Quoted 2 lines

... snip ...

And this in 3.2. So how did this work for Stefan in 3.9? Unless there is something in Ubuntu that changed how the stacked interfaces are configured and is keeping interfaces down longer then it used to.

Stop here ;-) in 3.9 it was the other way round.

This one worked:

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

this one did not:

Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

Now with the patch - the 2nd one works the first one does not.

Stefan

Quoted 34 lines
Quoted 6 lines

which fixed completely the initial issue with vlans.

Maybe we should just remove the IFF_UP check in dev_change_rx_flags(), and
let the drivers using it handle its own logic, as vlan does?

This should work, but this might regress a few drivers. Looking through the callers of dev_set_promiscuity at least DSA driver suffers the same fate as VLAN.

-vlad

Quoted 20 lines

Something like this:

net/core/dev.c +1 -1
index 8ffc52e..9615cd7 100644
@@ -4995,7 +4995,7 @@ static void dev_change_rx_flags(struct net_device
 *dev, int flags)
  {
      const struct net_device_ops *ops = dev->netdev_ops;
 
-    if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
+    if (ops->ndo_change_rx_flags)
          ops->ndo_change_rx_flags(dev, flags);
  }
Quoted 5 lines

Thanks
-vlad

#21 lore raw
Quoted 57 lines · Stefan Priebe - Profihost AG

Am 14.11.2013 15:27, schrieb Vlad Yasevich:

Quoted 56 lines · Veaceslav Falico
Quoted 20 lines · Vlad Yasevich
Quoted 2 lines

Can you try out attached patch please. I ran it in my environment and always get promisc link when attaching devices to the bridge.

It's interesting, actually, why do we need to check for IFF_UP at all when
changing flags.

The addition of IFF_UP goes up to:

commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7

Author: Patrick McHardy <[email protected]>
Date:   Tue Oct 7 15:26:48 2008 -0700

net: only invoke dev->change_rx_flags when device is UP

Jesper Dangaard Brouer <[email protected]> reported a bug when setting a
VLAN
device down that is in promiscous mode:

Quoted 8 lines

When the VLAN device is set down, the promiscous count on the real device is decremented by one by vlan_dev_stop(). When removing the promiscous flag from the VLAN device afterwards, the promiscous count on the real device is decremented a second time by the vlan_change_rx_flags() callback.

... snip ...

This was applied in 2.6.27 timeframe.

Quoted 23 lines

However, I'm not sure that this is still needed, cause:

commit deede2fabe24e00bd7e246eb81cd5767dc6fcfc7

Author: Matthijs Kooijman <[email protected]>
Date:   Mon Oct 31 04:53:13 2011 +0000

vlan: Don't propagate flag changes on down interfaces.

When (de)configuring a vlan interface, the IFF_ALLMULTI ans
IFF_PROMISC
flags are cleared or set on the underlying interface. So, if these
flags
are changed on a vlan interface that is not up, the flags underlying interface might be set or cleared twice.

Only propagating flag changes when a device is up makes sure this
does
not happen. It also makes sure that an underlying device is not
set to
promiscuous or allmulti mode for a vlan device that is down.

... snip ...

Quoted 14 lines
Quoted 3 lines

And this in 3.2. So how did this work for Stefan in 3.9? Unless there is something in Ubuntu that changed how the stacked interfaces are configured and is keeping interfaces down longer then it used to.

Stop here ;-) in 3.9 it was the other way round.

This one worked:

Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1

How are you attaching tap to the vlan device? Or is it attached to vmbr1?

Quoted 9 lines

this one did not:

Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1

Now with the patch - the 2nd one works the first one does not.

Ok, in this case, you have a VLAN (bond1.3000) configured on top of bond interface. That vlan is then attached to the bridge (vmbr1v3000). The tap interface for your VM (tap114i1) is also attached to the same bridge. In this case, VM will receive only traffic for VLAN 3000 and it we receive it untagged.

I guess I'd like to understand what you are trying to achieve.

Thanks working with us on this.
-vlad

Quoted 37 lines

Stefan

Quoted 34 lines
Quoted 6 lines

which fixed completely the initial issue with vlans.

Maybe we should just remove the IFF_UP check in dev_change_rx_flags(), and
let the drivers using it handle its own logic, as vlan does?

This should work, but this might regress a few drivers. Looking through the callers of dev_set_promiscuity at least DSA driver suffers the same fate as VLAN.

-vlad

Quoted 20 lines

Something like this:

net/core/dev.c +1 -1
index 8ffc52e..9615cd7 100644
@@ -4995,7 +4995,7 @@ static void dev_change_rx_flags(struct net_device
 *dev, int flags)
   {
       const struct net_device_ops *ops = dev->netdev_ops;
 
-    if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
+    if (ops->ndo_change_rx_flags)
           ops->ndo_change_rx_flags(dev, flags);
   }
Quoted 5 lines

Thanks
-vlad

#22 lore raw

Hi,

sorry for the long delay.

Am 14.11.2013 15:41, schrieb Vlad Yasevich:

Quoted 78 lines · Stefan Priebe - Profihost AG
Quoted 62 lines

Am 14.11.2013 15:27, schrieb Vlad Yasevich:

Quoted 61 lines · Veaceslav Falico
Quoted 29 lines · Vlad Yasevich
Quoted 2 lines

Can you try out attached patch please. I ran it in my environment and always get promisc link when attaching devices to the bridge.

It's interesting, actually, why do we need to check for IFF_UP at all when
changing flags.

The addition of IFF_UP goes up to:

commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7

Author: Patrick McHardy <[email protected]>
Date:   Tue Oct 7 15:26:48 2008 -0700

net: only invoke dev->change_rx_flags when device is UP

Jesper Dangaard Brouer <[email protected]> reported a bug when
setting a
VLAN
device down that is in promiscous mode:

When the VLAN device is set down, the promiscous count on the
real
device is decremented by one by vlan_dev_stop(). When removing
the
promiscous flag from the VLAN device afterwards, the promiscous count on the real device is decremented a second time by the vlan_change_rx_flags() callback.

Quoted 2 lines

... snip ...

This was applied in 2.6.27 timeframe.

Quoted 25 lines

However, I'm not sure that this is still needed, cause:

commit deede2fabe24e00bd7e246eb81cd5767dc6fcfc7

Author: Matthijs Kooijman <[email protected]>
Date:   Mon Oct 31 04:53:13 2011 +0000

vlan: Don't propagate flag changes on down interfaces.

When (de)configuring a vlan interface, the IFF_ALLMULTI ans
IFF_PROMISC
flags are cleared or set on the underlying interface. So, if
these
flags
are changed on a vlan interface that is not up, the flags
underlying
interface might be set or cleared twice.

Only propagating flag changes when a device is up makes sure this
does
not happen. It also makes sure that an underlying device is not
set to
promiscuous or allmulti mode for a vlan device that is down.

... snip ...

Quoted 14 lines
Quoted 3 lines

And this in 3.2. So how did this work for Stefan in 3.9? Unless there is something in Ubuntu that changed how the stacked interfaces are configured and is keeping interfaces down longer then it used to.

Stop here ;-) in 3.9 it was the other way round.

This one worked:

Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1
Quoted 2 lines

How are you attaching tap to the vlan device? Or is it attached to vmbr1?

No, to vmbr1.3000.

Quoted 8 lines
Quoted 8 lines

this one did not:

Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1
Quoted 7 lines
Quoted 1 line

Now with the patch - the 2nd one works the first one does not.

Ok, in this case, you have a VLAN (bond1.3000) configured on top of bond interface. That vlan is then attached to the bridge (vmbr1v3000). The tap interface for your VM (tap114i1) is also attached to the same bridge. In this case, VM will receive only traffic for VLAN 3000 and it we receive it untagged.

Yes and this is also what i want to archieve.

Quoted 43 lines

I guess I'd like to understand what you are trying to achieve.

Thanks working with us on this.
-vlad

Quoted 37 lines

Stefan

Quoted 34 lines
Quoted 6 lines

which fixed completely the initial issue with vlans.

Maybe we should just remove the IFF_UP check in dev_change_rx_flags(), and
let the drivers using it handle its own logic, as vlan does?

This should work, but this might regress a few drivers. Looking through the callers of dev_set_promiscuity at least DSA driver suffers the same fate as VLAN.

-vlad

Quoted 20 lines

Something like this:

net/core/dev.c +1 -1
index 8ffc52e..9615cd7 100644
@@ -4995,7 +4995,7 @@ static void dev_change_rx_flags(struct net_device
 *dev, int flags)
   {
       const struct net_device_ops *ops = dev->netdev_ops;
 
-    if ((dev->flags & IFF_UP) && ops->ndo_change_rx_flags)
+    if (ops->ndo_change_rx_flags)
           ops->ndo_change_rx_flags(dev, flags);
   }
Quoted 5 lines

Thanks
-vlad

#23 lore raw
In reply to Stefan Priebe - Profihost AG
Quoted 57 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines · Stefan Priebe - Profihost AG
Quoted 47 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

      \
       -- bond1 -- vmbr1
      /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

          slaves eth2 eth3
          bond-mode 802.3ad
          bond_miimon 100
          bond_updelay 200
          bond_downdelay 0
Quoted 7 lines
Quoted 3 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

Quoted 9 lines

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state

So this can happen if bond interfaces are down at the time of joining
the bridge. The promisc flag propagation to lower interfaces only happens when those interfaces are up. So if for whatever reason, the lower interfaces happen to be down during the crating of this
hierarchy, the promiscuity flag may not get set on the lower level port
device an we may end up in this situation.

-vlad

Quoted 75 lines

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Greets,
Stefan

Main question is - is this one correct:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 30 lines

-vlad

Quoted 27 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#24 lore raw
Quoted 69 lines

Am 13.11.2013 um 17:44 schrieb Vlad Yasevich <[email protected]>:

Quoted 57 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines · Stefan Priebe - Profihost AG
Quoted 47 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 6 lines
Quoted 2 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

Quoted 8 lines

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state
Quoted 2 lines

So this can happen if bond interfaces are down at the time of joining the bridge.

About which of my tried configuration do you speak? The bond itself is always up it's the internet connection. Or do you mean the vlan bond?

Quoted 81 lines

The promisc flag propagation to lower interfaces only happens when those interfaces are up. So if for whatever reason, the lower interfaces happen to be down during the crating of this
hierarchy, the promiscuity flag may not get set on the lower level port
device an we may end up in this situation.

-vlad

Quoted 73 lines

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Greets,
Stefan

Main question is - is this one correct:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 28 lines

-vlad

Quoted 26 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#25 lore raw
Quoted 69 lines · Stefan Priebe - Profihost AG
Quoted 69 lines

Am 13.11.2013 um 17:44 schrieb Vlad Yasevich <[email protected]>:

Quoted 65 lines · Stefan Priebe - Profihost AG

Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines · Stefan Priebe - Profihost AG
Quoted 47 lines

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

      \
       -- bond1 -- vmbr1
      /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

          slaves eth2 eth3
          bond-mode 802.3ad
          bond_miimon 100
          bond_updelay 200
          bond_downdelay 0
Quoted 6 lines
Quoted 2 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state
Quoted 5 lines
Quoted 2 lines

So this can happen if bond interfaces are down at the time of joining the bridge.

About which of my tried configuration do you speak? The bond itself is always up it's the internet connection. Or do you mean the vlan bond?

The issue is in the formation for vmbr0 and vmbr1. When bond0 and bond1 enter promisc mode as part of becoming a bridge port, they should put some subset of their ports into promisc mode as well (in 802.3ad mode it should happen on all bond slaves).

What I see in my config is something like:

[ 2640.725700] device bond0 entered promiscuous mode
[ 2640.726623] device eth0 entered promiscuous mode
[ 2640.727655] br0: port 1(bond0) entered forwarding state
[ 2640.728718] br0: port 1(bond0) entered forwarding state

This is my quick configuration:

br0 ----> bond0 -------> eth0

I wanted to make sure in this case eth0 is properly configured in promisc mode.

If eth0 is somehow DOWN, when bond0 is added to the bridge, then it will never get promisc mode set (at least in my quick test). I am not sure if this what's happening in your case, but that's the only explanation I can come up with for the above log you provided.

-vlad

Quoted 82 lines
Quoted 82 lines

The promisc flag propagation to lower interfaces only happens when those interfaces are up. So if for whatever reason, the lower interfaces happen to be down during the crating of this
hierarchy, the promiscuity flag may not get set on the lower level port
device an we may end up in this situation.

-vlad

Quoted 73 lines

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Greets,
Stefan

Main question is - is this one correct:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 28 lines

-vlad

Quoted 26 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#26 lore raw
Quoted 94 lines

Am 13.11.2013 um 18:37 schrieb Vlad Yasevich <[email protected]>:

Quoted 70 lines · Stefan Priebe - Profihost AG
Quoted 69 lines
Quoted 68 lines

Am 13.11.2013 um 17:44 schrieb Vlad Yasevich <[email protected]>:

On 11/13/2013 10:17 AM, Stefan Priebe - Profihost AG wrote:
Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines
Quoted 48 lines · Stefan Priebe - Profihost AG

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

     \
      -- bond1 -- vmbr1
     /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

         slaves eth2 eth3
         bond-mode 802.3ad
         bond_miimon 100
         bond_updelay 200
         bond_downdelay 0
Quoted 6 lines
Quoted 2 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state
Quoted 4 lines
Quoted 2 lines

So this can happen if bond interfaces are down at the time of joining the bridge.

About which of my tried configuration do you speak? The bond itself is always up it's the internet connection. Or do you mean the vlan bond?

The issue is in the formation for vmbr0 and vmbr1. When bond0 and bond1 enter promisc mode as part of becoming a bridge port, they should put some subset of their ports into promisc mode as well (in 802.3ad mode it should happen on all bond slaves).

What I see in my config is something like:

[ 2640.725700] device bond0 entered promiscuous mode
[ 2640.726623] device eth0 entered promiscuous mode
[ 2640.727655] br0: port 1(bond0) entered forwarding state
[ 2640.728718] br0: port 1(bond0) entered forwarding state

This is my quick configuration:

br0 ----> bond0 -------> eth0

Quoted 7 lines

I wanted to make sure in this case eth0 is properly configured in promisc mode.

If eth0 is somehow DOWN, when bond0 is added to the bridge, then it will never get promisc mode set (at least in my quick test). I am not sure if this what's happening in your case, but that's the only explanation I can come up with for the above log you provided.

But this one works fine it only does not work with vlans.

Is there an easy way to check where those packages get dropped.

Stefan

Quoted 86 lines

-vlad

Quoted 81 lines
Quoted 81 lines

The promisc flag propagation to lower interfaces only happens when those interfaces are up. So if for whatever reason, the lower interfaces happen to be down during the crating of this
hierarchy, the promiscuity flag may not get set on the lower level port
device an we may end up in this situation.

-vlad

Quoted 73 lines

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Greets,
Stefan

Main question is - is this one correct:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /              \
eth3                 \ vmbr1.3000
                           \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 28 lines

-vlad

Quoted 26 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

     \
      -- bond1 -- vmbr1
     /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                     \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#27 lore raw
Quoted 97 lines · Stefan Priebe - Profihost AG
Quoted 97 lines

Am 13.11.2013 um 18:37 schrieb Vlad Yasevich <[email protected]>:

Quoted 70 lines · Stefan Priebe - Profihost AG
Quoted 69 lines
Quoted 68 lines

Am 13.11.2013 um 17:44 schrieb Vlad Yasevich <[email protected]>:

On 11/13/2013 10:17 AM, Stefan Priebe - Profihost AG wrote:
Am 13.11.2013 16:05, schrieb Vlad Yasevich:

Quoted 48 lines
Quoted 48 lines · Stefan Priebe - Profihost AG

Hi Falico,
Am 13.11.2013 15:12, schrieb Veaceslav Falico:

Quoted 27 lines
Quoted 25 lines · Stefan Priebe - Profihost AG

Hello,

while my vlans, bridging and bonding stuff was working until 3.9 i never
thought about how it is right. So maybe i was always wrong.

I've this:

eth2

      \
       -- bond1 -- vmbr1
      /

eth3

This works fine and as expected now i want to have a vlan using the bonding and using a bridge.

I the past i had this:
eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1
Quoted 8 lines
Quoted 3 lines

This was working fine until 3.9.X since 3.10. Right now using 3.10 i need to put eth2 and eth3 into promisc mode to get it working ;-( this is bad!

As a guess - do you use arp monitoring for bonding? Try using miimon - there were some issues with it in 3.10, which were fixed by some huge patchsets that will never hit 3.10 stable.
Also, the bonding configuration would be welcome.

Debian Bonding konfiguration looks like this:
auto bond1
iface bond1 inet manual

          slaves eth2 eth3
          bond-mode 802.3ad
          bond_miimon 100
          bond_updelay 200
          bond_downdelay 0
Quoted 6 lines
Quoted 2 lines

This should be miimon using lacp and not arp isn't it? Anything more needed?

Hmm.. With 802.3ad mode, when the bond is a port on the bridge, the bond should place all of its ports into promiscuous mode. Do you see the the kernel messages that say that?

No it does not - i only see:

# dmesg -c|egrep "promiscuous|forward"
[    5.445161] device bond0 entered promiscuous mode
[    7.670701] device bond1 entered promiscuous mode
[    7.845472] vmbr0: port 1(bond0) entered forwarding state
[    7.845474] vmbr0: port 1(bond0) entered forwarding state
[    8.269769] vmbr1: port 1(bond1) entered forwarding state
[    8.269771] vmbr1: port 1(bond1) entered forwarding state
Quoted 4 lines
Quoted 2 lines

So this can happen if bond interfaces are down at the time of joining the bridge.

About which of my tried configuration do you speak? The bond itself is always up it's the internet connection. Or do you mean the vlan bond?

The issue is in the formation for vmbr0 and vmbr1. When bond0 and bond1 enter promisc mode as part of becoming a bridge port, they should put some subset of their ports into promisc mode as well (in 802.3ad mode it should happen on all bond slaves).

What I see in my config is something like:

[ 2640.725700] device bond0 entered promiscuous mode
[ 2640.726623] device eth0 entered promiscuous mode
[ 2640.727655] br0: port 1(bond0) entered forwarding state
[ 2640.728718] br0: port 1(bond0) entered forwarding state

This is my quick configuration:

br0 ----> bond0 -------> eth0

I wanted to make sure in this case eth0 is properly configured in promisc mode.

Quoted 7 lines
Quoted 4 lines

If eth0 is somehow DOWN, when bond0 is added to the bridge, then it will never get promisc mode set (at least in my quick test). I am not sure if this what's happening in your case, but that's the only explanation I can come up with for the above log you provided.

But this one works fine it only does not work with vlans.

The fact that it does not make lower level devices enter promisc mode indicates that it may not be working correctly.

Quoted 2 lines

Is there an easy way to check where those packages get dropped.

dropwatch should be able to help.

-vlad

Quoted 88 lines

Stefan

Quoted 86 lines

-vlad

Quoted 81 lines
Quoted 81 lines

The promisc flag propagation to lower interfaces only happens when those interfaces are up. So if for whatever reason, the lower interfaces happen to be down during the crating of this
hierarchy, the promiscuity flag may not get set on the lower level port
device an we may end up in this situation.

-vlad

Quoted 73 lines

Now adding variant 1:

# dmesg -c|egrep "promiscuous|forward"
[   85.919382] device tap113i0 entered promiscuous mode
[   85.965018] vmbr0: port 2(tap113i0) entered forwarding state
[   85.965023] vmbr0: port 2(tap113i0) entered forwarding state
[   86.263292] device tap113i1 entered promiscuous mode
[   86.314151] device vmbr1.3000 entered promiscuous mode
[   86.314153] device vmbr1 entered promiscuous mode
[   86.314192] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.314196] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state
[   86.318116] vmbr1v3000: port 2(tap113i1) entered forwarding state
[   86.318120] vmbr1v3000: port 2(tap113i1) entered forwarding state
[  101.382129] vmbr1v3000: port 1(vmbr1.3000) entered forwarding state

Now it looks like this:

# ip a l|grep PROMISC
13: tap113i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr0 state UNKNOWN qlen 500
14: tap113i1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
htb master vmbr1v3000 state UNKNOWN qlen 500

Greets,
Stefan

Main question is - is this one correct:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /              \
eth3                 \ vmbr1.3000
                            \ ---- tap114i1

<= does not work at all

or this one?:

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1

<= works if i manually put eth2 and eth3 into promiscous mode.

Quoted 28 lines

-vlad

Quoted 26 lines

One thing i forgot the one with vmbr1.3000 does not work at all eben not with promisc mode. The one below works fine if i set eth2 and eth3 into promisc mode.

Stefan

Quoted 10 lines
Quoted 10 lines

I also tried this one without success:
eth2

      \
       -- bond1 -- vmbr1
      /     \
eth3        ----- bond1.3000 --- vmbr1v3000
                                      \ ---- tap114i1
Quoted 6 lines
Quoted 6 lines

Greets,
Stefan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html