[Bridge] STP problem

Daniel Gheorghica gheodan at gmail.com
Fri Sep 2 10:25:35 PDT 2005


Hi all, =

 I have to use STP function between too bridges. The network topology are:
 /--------------\ / ------ Wireless Link ----\ /--------------------\
|=3D=3DLAN1=3D=3D| ---- | BRIDGE 1| | BRIDGE 2| -----| =3D=3D=3DLAN 2=3D=3D=
=3D | =

\---------------/ \ -----TINC vpn tunnel ------/ \---------------------/
 When one of link failed the ping from one to other site stop to works. =

I use bridge-utils-1.0.6 and tinc-1.0.4 =

 I wait any suggestion about this
 Daniel =

  The bridege setup script is: =

  =

#! /bin/bash

PATH=3D$PATH:/usr/local/sbin:/sbin
BR=3Dbr0
IP=3D"172.16.3.223 <http://172.16.3.223>"
MASK=3D"255.255.252.0 <http://255.255.252.0>"
BROADCAST=3D"172.16.3.255 <http://172.16.3.255>"

return=3D$rc_done
case "$1" in

start)
echo "Starting service bridge $BR"
tincd -n vpn
brctl addbr $BR
brctl setbridgeprio $BR 0 || return=3D$rc_failed
brctl addif $BR eth0 || return=3D$rc_failed
brctl addif $BR eth1 || return=3D$rc_failed
brctl addif $BR vpn || return=3D$rc_failed
ifconfig eth0 0.0.0.0 <http://0.0.0.0> || return=3D$rc_failed
ifconfig eth1 0.0.0.0 <http://0.0.0.0> || return=3D$rc_failed
ifconfig vpn 0.0.0.0 <http://0.0.0.0> || return=3D$rc_failed
brctl sethello $BR 1 || return=3D$rc_failed
brctl setmaxage $BR 4 || return=3D$rc_failed
brctl setpathcost $BR eth1 100 || return=3D$rc_failed

brctl setpathcost $BR vpn 100 || return=3D$rc_failed
brctl setportprio $BR eth1 20 || return=3D$rc_failed
brctl setportprio $BR vpn 20 || return=3D$rc_failed
# brctl setageing $BR 20 || return=3D$rc_failed
brctl setfd $BR 4 || return=3D$rc_failed
brctl stp $BR on
/sbin/ifconfig $BR inet $IP netmask $MASK broadcast $BROADCAST up
echo -e "$return"
;;

stop)
tincd -k -n vpn
/sbin/ifconfig $BR down
echo "Shutting down service bridge $BR"
brctl delif $BR vpn || return=3D$rc_failed
brctl delif $BR eth0 || return=3D$rc_failed
brctl delif $BR eth1 || return=3D$rc_failed
brctl delbr $BR || return=3D$rc_failed
rmmod bridge || return=3D$rc_failed
echo -e "$return"
;;

status)
ifconfig $BR
brctl showstp $BR
brctl show
;;

restart)
$0 stop && $0 start || return=3D$rc_failed
;;

*)

echo "Usage: $0 {start|stop|status|restart}"
exit 1
esac

test "$return" =3D "$rc_done" || exit 1
exit 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/2005090=
2/fe5e6b8d/attachment-0002.htm


More information about the Bridge mailing list