|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Henrik Johansen (henrik
myunix.dk)
Date: Thu Aug 02 2007 - 03:14:43 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I am currently playing around with bridge failover using OpenBSD 4.1 and I
have discovered a problem - the STP ID portion of every bridge always seems
to be equal to the MAC adress of the first phsycial network interface
present on machineX.
That works fine as long as you are trying to failover a complete machine but
I am trying to individually failover bridges between machine1 and machine2
and that seems not to be possible since every bridge on machineX shares the
same STP bridge ID.
##########
MACHINE1:
##########
# uname -a
OpenBSD machine1.xxxxxx.xxx 4.1 GENERIC.MP#1225 i386
# ifconfig em0 | grep lladdr
lladdr 00:15:17:15:8e:52
# brconfig bridge0
bridge0: flags=41<UP,RUNNING>
priority 24576 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
designated: id 00:15:17:15:8e:52 priority 24576
em3 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 4 ifpriority 128 ifcost 20000 forwarding role designated
em2 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 3 ifpriority 128 ifcost 20000 forwarding role designated
Addresses (max cache: 100, timeout: 240):
00:19:b9:aa:83:68 em2 1 flags=0<>
00:19:b9:aa:99:72 em3 1 flags=0<>
# brconfig bridge1
bridge1: flags=41<UP,RUNNING>
priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
designated: id 00:15:17:15:8e:46 priority 32768
em5 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 6 ifpriority 128 ifcost 20000 discarding role backup
em4 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 5 ifpriority 128 ifcost 20000 forwarding role root
Addresses (max cache: 100, timeout: 240):
00:19:b9:aa:a3:e5 em4 1 flags=0<>
# tcpdump -lenxs6600 -ni em2
tcpdump: WARNING: em2: no IPv4 address assigned
tcpdump: listening on em2, link-type EN10MB
09:37:27.710007 0:15:17:15:b6:e0 1:80:c2:0:0:0 0027 53: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52
rootcost=0 bridge=6000.0:15:17:15:8e:52 port=3 ifcost=128 age=0/0 max=20/0
hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8003 0000
1400 0200 0f00 00
09:37:29.710003 0:15:17:15:b6:e0 1:80:c2:0:0:0 0027 53: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52
rootcost=0 bridge=6000.0:15:17:15:8e:52 port=3 ifcost=128 age=0/0 max=20/0
hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8003 0000
1400 0200 0f00 00
^C
2 packets received by filter
0 packets dropped by kernel
# tcpdump -lenxs6600 -ni em4
tcpdump: WARNING: em4: no IPv4 address assigned
tcpdump: listening on em4, link-type EN10MB
09:37:45.710005 0:15:17:15:b6:e2 1:80:c2:0:0:0 0027 53: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52 rootcost=0
bridge=6000.0:15:17:15:8e:52 port=5 ifcost=128 age=0/0 max=20/0 hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8005 0000
1400 0200 0f00 00
09:37:47.710004 0:15:17:15:b6:e2 1:80:c2:0:0:0 0027 53: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52 rootcost=0
bridge=6000.0:15:17:15:8e:52 port=5 ifcost=128 age=0/0 max=20/0 hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8005 0000
1400 0200 0f00 00
^C
2 packets received by filter
0 packets dropped by kernel
#
###########
MACHINE2 :
###########
# uname -a
OpenBSD machine2.xxxxxx.xxx 4.1 GENERIC.MP#1225 i386
# ifconfig em0 | grep lladdr
lladdr 00:15:17:15:8e:46
# brconfig bridge2
bridge2: flags=41<UP,RUNNING>
priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
designated: id 00:15:17:15:8e:52 priority 24576
em7 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 8 ifpriority 240 ifcost 800000 discarding role backup
em6 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 7 ifpriority 240 ifcost 800000 forwarding role root
Addresses (max cache: 100, timeout: 240):
00:19:b9:aa:83:66 em6 1 flags=0<>
# brconfig bridge3
bridge3: flags=41<UP,RUNNING>
priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp
designated: id 00:15:17:15:8e:46 priority 32768
em9 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 10 ifpriority 240 ifcost 800000 discarding role backup
em8 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
port 9 ifpriority 240 ifcost 800000 forwarding role designated
Addresses (max cache: 100, timeout: 240):
00:19:b9:aa:a3:e7 em8 1 flags=0<>
# tcpdump -lenxs6600 -ni em6
tcpdump: WARNING: em6: no IPv4 address assigned
tcpdump: listening on em6, link-type EN10MB
09:38:33.805124 0:15:17:15:b6:e0 1:80:c2:0:0:0 002e 60: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52 rootcost=0
bridge=6000.0:15:17:15:8e:52 port=3 ifcost=128 age=0/0 max=20/0 hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8003 0000
1400 0200 0f00 0000 0000 0000 0000
09:38:35.805065 0:15:17:15:b6:e0 1:80:c2:0:0:0 002e 60: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52 rootcost=0
bridge=6000.0:15:17:15:8e:52 port=3 ifcost=128 age=0/0 max=20/0 hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8003 0000
1400 0200 0f00 0000 0000 0000 0000
^C
2 packets received by filter
0 packets dropped by kernel
# tcpdump -lenxs6600 -ni em8
tcpdump: WARNING: em8: no IPv4 address assigned
tcpdump: listening on em8, link-type EN10MB
09:38:39.805118 0:15:17:15:b6:e2 1:80:c2:0:0:0 002e 60: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52 rootcost=0
bridge=6000.0:15:17:15:8e:52 port=5 ifcost=128 age=0/0 max=20/0 hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8005 0000
1400 0200 0f00 0000 0000 0000 0000
09:38:41.805076 0:15:17:15:b6:e2 1:80:c2:0:0:0 002e 60: 802.1d RSTP config
flags=3c<LEARNING,FORWARDING> role=DESIGNATED root=6000.0:15:17:15:8e:52 rootcost=0
bridge=6000.0:15:17:15:8e:52 port=5 ifcost=128 age=0/0 max=20/0 hello=2/0 fwdelay=15/0
4242 0300 0002 023c 6000 0015 1715 8e52
0000 0000 6000 0015 1715 8e52 8005 0000
1400 0200 0f00 0000 0000 0000 0000
^C
2 packets received by filter
0 packets dropped by kernel
#
Net connections:
Machine1.em2 --> Machine2.em6 (Direct cable) Segment A
Machine1.em4 --> Machine2.em8 (Direct cable) Segment B
As you can see in the tcpdumps above both segments have the same STP bridge id
(6000.0:15:17:15:8e:52), even though that they are physically separated. The source mac
though, is different on both segments:
Segment A: 0:15:17:15:b6:e0 - Segment B: 0:15:17:15:b6:e2
Every bridge should have it's own STP ID. According to Google, FreeBSD seems
to randomly choose the STP ID whereas Linux seems to use the MAC from the
first interface that is added to the bridge ...
--
Med venlig hilsen / Best Regards
Henrik Johansen
henrik
myunix.dk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]