1

I have an issue with bridge networking in my CentOS 5.5 box:

server has two bridge interfaces : one to public net , second to private net all works good , but when I'm adding new interface to the bridge

/usr/sbin/brctl addif br1 veth237151.1

(openvz virtual interface for public network) network hangs for 30 seconds, then works again

in logs I have just this

Jul 28 09:04:08 sea kernel: device veth237151.1 entered promiscuous mode
Jul 28 09:04:08 sea kernel: br1: topology change detected, propagating
Jul 28 09:04:08 sea kernel: br1: port 3(veth237151.1) entering forwarding state
Jul 28 09:04:08 sea kernel: br1: topology change detected, propagating
Jul 28 09:04:08 sea kernel: br1: port 3(veth237151.1) entering forwarding state

some additional info

bridge name     bridge id               STP enabled     interfaces
br0             8000.001851083838       yes             eth0
br1             8000.0018511f824f       yes             veth237151.1
                                                        eth1
1
  • Out of the man page: "brctl setfd <bridge> <time> sets the bridge’s ’bridge forward delay’ to <time> seconds." by default it's 30 seconds, so I'm guessing that's what you're experiencing. Set it to 0 right after you bring up the bridge interface.
    – Marcin
    Nov 10, 2010 at 13:06

3 Answers 3

2

Whole network hangs or only the added interface? The latter case is a normal behaviour of an Ethernet switch. A port, when added to the switch, does not send any frames for the time defined by a 'forward delay' parameter. That is needed to properly protect from topology loops, especially when STP is in use.

Please note, that in Linux STP on/off and forward delay settings are controlled separately. The port will still wait in 'listening' state when 'forward delay' is defined, even if STP is off. And you can have STP enabled with no forward delay (I guess it is a bit against the STP specification).

To disable the forwarding delay try:

brctl setfd br1 0
3
  • > Whole network hangs or only the added interface? just br0 (or br1) interface which has private/public ip which I use for access to server so when I'm adding new interface to bridge my ssh connection hangs. Other interfaces in bridge works without any problems (for instance interfaces from another virtual machine)
    – user48990
    Aug 1, 2010 at 7:04
  • brctl setfd br1 0 didn't help
    – user48990
    Aug 1, 2010 at 7:07
  • How can this forward delay setting be made permanent over reboots? Nov 4, 2018 at 14:50
0

Did you try disabling STP ?

2
  • On linux that could not affect the delay – forward-delay is configured separately. Jul 31, 2010 at 14:08
  • yes, unfortunately disabling\enabling STP no role... anyway I don't need STP and disabled it.
    – user48990
    Aug 1, 2010 at 7:40
0

Permanently reducing forward delay

Here is how to permanently reduce forward delay, regardless of any reboots.

Edit /etc/network/interfaces:

$ sudo vim `/etc/network/interfaces`

Add a bridge_fd line:

auto br0
iface br0 inet dhcp
    bridge_ports all
    bridge_fd 2.5

You must log in to answer this question.