[Bridge] STP problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all, 
 I have to use STP function between too bridges. The network topology are:
 /--------------\ / ------ Wireless Link ----\ /--------------------\
|==LAN1==| ---- | BRIDGE 1| | BRIDGE 2| -----| ===LAN 2=== | 
\---------------/ \ -----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=$PATH:/usr/local/sbin:/sbin
BR=br0
IP="172.16.3.223 <http://172.16.3.223>"
MASK="255.255.252.0 <http://255.255.252.0>"
BROADCAST="172.16.3.255 <http://172.16.3.255>"

return=$rc_done
case "$1" in

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

brctl setpathcost $BR vpn 100 || return=$rc_failed
brctl setportprio $BR eth1 20 || return=$rc_failed
brctl setportprio $BR vpn 20 || return=$rc_failed
# brctl setageing $BR 20 || return=$rc_failed
brctl setfd $BR 4 || return=$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=$rc_failed
brctl delif $BR eth0 || return=$rc_failed
brctl delif $BR eth1 || return=$rc_failed
brctl delbr $BR || return=$rc_failed
rmmod bridge || return=$rc_failed
echo -e "$return"
;;

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

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

*)

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

test "$return" = "$rc_done" || exit 1
exit 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osdl.org/pipermail/bridge/attachments/20050902/fe5e6b8d/attachment.htm

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux