[Bridge] FW: Selecting a Root port on a bridge

Dharani Koppisetti dkoppisetti at hotmail.com
Tue Mar 10 19:51:30 PDT 2009


 


From: dkoppisetti at hotmail.com
To: shemminger at osdl.org
Subject: Selecting a Root port on a bridge
Date: Tue, 10 Mar 2009 22:29:38 -0400



Hi,
i have setup a bridge which has 5 ethernet ports. 2 of the ethernet ports are on board and 3 are on add boards.
The 2 ports on the ethernet PMC are eth0 and eth1. The onboard ethernet ports are eth2 and eth3. There is a FPGA on the board that has the other ethernet port. 
I would like the root port of the bridge to be eth2 instead of eth0. Is there a way to set it up. I am using the following script from 
http://www.faqs.org/docs/Linux-HOWTO/BRIDGE-STP-HOWTO.html
 
 
When I enter ifconfig the bridge shows an ip address of 192.168.100.5 the mac address listed is the address of eth0. 
What I need is to have the ip address listed on the mac address that is on eth2.
 
Please let me know if there is a way. 
 
 
#! /bin/bash
# Copyright (c) 2000 Uwe Böhme.  All rights reserved.
#
# Author: Uwe Böhme <uwe at bnhof.de>, 2000
#
#
# /sbin/init.d/bridge
#

. /etc/rc.config

return=$rc_done
case "$1" in

    start)
        echo "Starting service bridge mueb"
        brctl addbr mueb  ||  return=$rc_failed                             
        brctl setbridgeprio mueb 0 || return=$rc_failed                     
        brctl addif mueb eth0  ||  return=$rc_failed                        
        brctl addif mueb eth1  ||  return=$rc_failed                        
        brctl addif mueb eth2  ||  return=$rc_failed                        
        brctl addif mueb eth3  ||  return=$rc_failed                        
        brctl addif mueb eth4  ||  return=$rc_failed                        
        brctl addif mueb eth5  ||  return=$rc_failed                        
        ifconfig eth0 0.0.0.0  ||  return=$rc_failed                        
        ifconfig eth1 0.0.0.0  ||  return=$rc_failed                        
        ifconfig eth2 0.0.0.0  ||  return=$rc_failed                        
        ifconfig eth3 0.0.0.0  ||  return=$rc_failed  

ifconfig eth4 0.0.0.0  ||  return=$rc_failed
ifconfig eth5 0.0.0.0  ||  return=$rc_failed                      
ifconfig meub 192.168.100.5 netmask 255.255.255.0
brctl sethello mueb 1  ||  return=$rc_failed                        
        brctl setmaxage mueb 4  ||  return=$rc_failed                       
        brctl setfd mueb 4  ||  return=$rc_failed                           
        echo -e "$return"
        ;;

    stop)
        echo "Shutting down service bridge mueb"
        brctl delif mueb eth3  ||  return=$rc_failed                        
        brctl delif mueb eth2  ||  return=$rc_failed                        
        brctl delif mueb eth1  ||  return=$rc_failed                        
        brctl delif mueb eth0  ||  return=$rc_failed                        
        brctl delbr mueb  ||  return=$rc_failed                             
        rmmod bridge || return=$rc_failed                                   

        echo -e "$return"
        ;;

    status)
        ifconfig mueb
        brctl showbr mueb
;;

    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
 
 
Thanks,
DK

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux-foundation.org/pipermail/bridge/attachments/20090310/1e75c0ed/attachment.htm 


More information about the Bridge mailing list