From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <434f7cd7050902102561a0cc84@mail.gmail.com> Date: Fri, 2 Sep 2005 20:25:35 +0300 From: Daniel Gheorghica Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20119_24048333.1125681935881" Subject: [Bridge] STP problem List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bridge@lists.osdl.org This is a multi-part message in MIME format... ------=_Part_20119_24048333.1125681935881 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all,=20 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 |=20 \---------------/ \ -----TINC vpn tunnel ------/ \---------------------/ When one of link failed the ping from one to other site stop to works.=20 I use bridge-utils-1.0.6 and tinc-1.0.4=20 I wait any suggestion about this Daniel=20 The bridege setup script is:=20 =20=20 #! /bin/bash PATH=3D$PATH:/usr/local/sbin:/sbin BR=3Dbr0 IP=3D"172.16.3.223 " MASK=3D"255.255.252.0 " BROADCAST=3D"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 || return=3D$rc_failed ifconfig eth1 0.0.0.0 || return=3D$rc_failed ifconfig vpn 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 ------=_Part_20119_24048333.1125681935881 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi all,
 
I have to use STP function between too bridges. The network topology a= re:
 
/--------------\         =             &nb= sp;     / ------ Wireless Link ----\   &= nbsp;           &nbs= p;          /-----------------= ---\
|=3D=3DLAN1=3D=3D| ---- | BRIDGE 1|      = ;            &n= bsp;            = ;       | BRIDGE 2| -----| =3D=3D=3DLAN 2=3D= =3D=3D | 
\---------------/         = ;            &n= bsp;    \ -----TINC vpn tunnel ------/   &nbs= p;            &= nbsp;        \---------------------/
 
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"
MASK=3D&= quot;255.255.252.0"
BROADCAST= =3D" 172.16.3.255"

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

    start)
        = echo "Starting service bridge $BR"
    &nb= sp;   tincd -n vpn
        = brctl addbr $BR
        brctl setbrid= geprio $BR 0 || return=3D$rc_failed
      =   brctl addif $BR eth0 ||  return=3D$rc_failed
        brctl addif $BR eth1 || = ; return=3D$rc_failed
        brctl a= ddif $BR vpn  ||  return=3D$rc_failed
    =     ifconfig eth0 0.0.0.0&nbs= p; ||  return=3D$rc_failed
      &nbs= p; ifconfig eth1 0.0.0.0  ||  return=3D$rc_failed
    &= nbsp;   ifconfig vpn 0.0.0.0 = ||  return=3D$rc_failed
       = brctl sethello $BR 1  ||  return=3D$rc_failed
  &nb= sp;     brctl setmaxage $BR 4  ||  return=3D$= rc_failed
        brctl setpathcost $BR eth1 1= 00  ||  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&nbs= p; ||  return=3D$rc_failed
#      &nb= sp;  brctl setageing $BR 20  ||  return=3D$rc_failed
        brctl setfd $BR 4  ||&n= bsp; return=3D$rc_failed
        brct= l stp $BR on
        /sbin/ifconfig $= BR inet $IP netmask $MASK broadcast $BROADCAST up
   &nbs= p;    echo -e "$return"
    = ;    ;;

    stop)
        t= incd -k -n vpn
        /sbin/ifconfig= $BR down
        echo "Shutting= down service bridge $BR"
       = ; brctl delif $BR vpn  ||  return=3D$rc_failed
  &nb= sp;     brctl delif $BR eth0  ||  return=3D$r= c_failed
        brctl delif $BR eth1  |= |  return=3D$rc_failed
        b= rctl delbr $BR  ||  return=3D$rc_failed
   &nbs= p;    rmmod bridge || return=3D$rc_failed
  &nb= sp;     echo -e "$return"
  &nbs= p;     ;;

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

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

    *)

        echo "Usage: $0 {start|s= top|status|restart}"
        exi= t 1
esac

test "$return" =3D "$rc_done" || exit 1
exit 0

------=_Part_20119_24048333.1125681935881--