You are on page 1of 102

STP Spanning Tree Protocol

CIS 187 Multilayer Switched Networks CCNP SWITCH Rick Grazia i S!ri " #$1$

Follow along with Packet Tracer

Download the following Packet Tracer file from my web site: PT-Topology-STP.pkt

Spanning Tree Protocol (STP


%
&STP o'te accou ts 'or (ore tha )$ * o' the co 'i"uratio + trou,leshooti "+ a d (ai te a ce headaches i realworld ca(!us etworks .es!ecially i' they are !oorly desi" ed/01 &Co(!le2 !rotocol that is "e erally !oorly u derstood01 Radia Perl(a 3 4e5elo!er o' STP

% %

!onfig"ring STP
Switch(config)# spanning-tree vlan vlan-id Switch(config)# no spanning-tree vlan vlan-id

% %

6y de'ault+ STP is e a,led 'or e5ery !ort o the switch0 I' 'or so(e reaso STP has ,ee disa,led+ you ca ree a,le it0

Spanning Tree Protocol (STP


% % %
I777 8$#014 8 loo!-!re5e tio !rotocol 8llows 9# de5ices to co((u icate with each other to disco5er !hysical loo!s i the etwork0 8l"orith( that creates a loop-free logical to!olo"y0 STP creates a tree structure o' loo!-'ree lea5es a d ,ra ches that s!a s the e tire 9ayer # etwork0

% %

#ed"ndancy !reates $oops

$% $oops
% % %
6roadcasts a d 9ayer # loo!s ca ,e a da "erous co(,i atio 0 7ther et 'ra(es ha5e o TT9 'ield 8'ter a 7ther et 'ra(e starts to loo!+ it will !ro,a,ly co ti ue u til so(eo e shuts o'' o e o' the switches or ,reaks a li k0 IP has a (echa is( to !re5e t loo!s0

IP Packet

$% $oops
%
6rid"e loo!s ca occur a y ti(e there is a redu da t !ath or loo! i the ,rid"e etwork0 The switches will 'li! 'lo! the M8C address ta,le e tries .creati " e2tre(ely hi"h CP: utilizatio /0 : icasts+ u k ow u icasts a d ,roadcasts are all !ro,le(s0

STP Pre&ents $oops


% % %
The !ur!ose o' STP is to a5oid a d eli(i ate loo!s i the etwork ,y e"otiati " a loo!-'ree !ath throu"h a root ,rid"e0 STP deter(i es where the are loo!s a d ,locks li ks that are redu da t0 7 sures that there will ,e o ly o e acti5e !ath to e5ery desti atio 0

'

Spanning Tree (lgorithm


%
STP e2ecutes a al"orith( called S!a i " Tree 8l"orith( .ST8/0 3 ST8 chooses a re'ere ce !oi t+ called a root bridge. 3 The deter(i es the a5aila,le !aths to that re'ere ce !oi t0 3 I' (ore tha two !aths e2ists+ ST8 !icks the ,est !ath a d ,locks the rest

'

Two-key STP !oncepts


%
STP calculatio s (ake e2te si5e use o' two key co ce!ts i creati " a loo!-'ree to!olo"y; 3 6rid"e I4 3 Path Cost

9i k S!eed 1$ G,!s 1 G,!s 1$$ M,!s 1$ M,!s

Cost .Re5ised I777 S!ec/ # < 1= 1$$

Cost .Pre5ious I777 S!ec/ 1 1 1$ 1$$

)ridge *D ()*D
% %
6rid"e I4 .6I4/ is used to ide ti'y each ,rid"e>switch0 The 6I4 is used i deter(i i " the ce ter o' the etwork+ i res!ect to STP+ k ow as the root ,rid"e0

)ridge *D +itho"t the ,-tended System *D

)ridge *D with the ,-tended System *D

)ridge *D ()*D

Co sists o' two co(!o e ts; 3 ( %-byte )ridge Priority; Cisco switch de'aults to ?#+7@8 or $28$$$0 % :sually e2!ressed i decimal format 3 ( .-byte /(! address % :sually e2!ressed i he-adecimal format0

)ridge *D ()*D

% % %

7ach switch has a "ni0"e )*D0 1riginal 23%.4D sta dard+ the 6I4 A Priority Bield C/(! address o' the switch0 3 8ll D98Ns were re!rese ted ,y a CST 3 o e s!a i " tree 'or all 5la s .later/0 P5ST reEuires that a se!arate i sta ce o' s!a i " tree ru 'or each D98N 3 )*D field is re0"ired to carry 5$(6 *D (5*D 0 3 ,-tended system *D to carry a DI40

+hat is the Priority of (ccess47


Access1#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ! "riorit# $%&'( Address 0001)('*+)&+,, -ost 1( "ort .(/ast+thernet00.) 1ello 2i3e % sec 4a5 Age %0 sec /orward !ela# 1. sec ,ridge ! "riorit# $%&'( (priorit# $%&'6 s#s-id-e5t 1) Address 000$)+*'1)*'+1ello 2i3e % sec 4a5 Age %0 sec /orward !ela# 1. sec Aging 2i3e %0

Priority 8 Priority (Default 32,768) 9 5$(6

VLAN0010 PVST coming Spanning tree enabled protocol ieee later Root ! "riorit# $%&&6 Address 0001)('*+)&+,, -ost 1( "ort .(/ast+thernet00.) 1ello 2i3e % sec 4a5 Age %0 sec /orward !ela# 1. sec ,ridge ! "riorit# $%&&6 (priorit# $%&'6 s#s-id-e5t 10) Address 000$)+*'1)*'+1ello 2i3e % sec 4a5 Age %0 sec /orward !ela# 1. sec Aging 2i3e %0

+hat is the )*D of this switch7


Core# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t $ Port 2'()igabit%t*ernet0+1, -ello .i/e 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e 327 ! (priority 327 4 "y"5id5e1t 1, 0001#C!$'#A'73 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20

)ridge *D ()*D

% % % %

:sed to elect a root ,rid"e .co(i "/ $owest 6rid"e I4 is the root0 I' all de5ices ha5e the sa(e !riority+ the ,rid"e with the lowest M8C address ,eco(es the root ,rid"e0 .Fikes/ 6ote; Bor si(!licity+ i our to!olo"ies we will use 6rid"e Priorities without the 72te ded Syste( I40 .Sa(e !rocess+ Gust do e !er D98N0/

Path !ost 1riginal Spec ($inear


9i k S!eed 1$ G,!s 1 G,!s 1$$ M,!s 1$ M,!s Cost .Re5ised I777 S!ec/ # < 1= 1$$ Cost .Pre5ious I777 S!ec/ 1 1 1$ 1$$

% % %

6rid"es use the co ce!t o' cost to e5aluate how close they are to other ,rid"es0 :sed to create the loo!-'ree to!olo"y 0 Hri"i ally+ 8$#014 de'i ed cost as 4 billion:bandwidth o' the li k i M,!s0 3 Cost o' 1$ M,!s li k A 1$$ 3 Cost o' 1$$ M,!s li k A 1$ 3 Cost o' 1 G,!s li k A 1 Ru i " out o' roo( 'or 'aster switches i cludi " 1$ G,!s 7ther et

Path !ost #e&ised Spec (6on-$inear


9i k S!eed 1$ G,!s 1 G,!s 1$$ M,!s 1$ M,!s Cost .Re5ised I777 S!ec/ # < 1= 1$$ Cost .Pre5ious I777 S!ec/ 1 1 1$ 1$$

I777 (odi'ied the (ost to use a non-linear scale with the ew 5alues o'; 3 < M,!s #)$ .cost/ 3 1$ M,!s 1$$ .cost/ % Fou ca cha "e the !ath cost ,y (odi'yi " the cost o' a !ort0 3 1@ M,!s @# .cost/ % 72ercise cautio whe you do thisI 3 <) M,!s ?= .cost/ % 6I4 a d Path Cost are used to de5elo! 3 1$$ M,!s 1= .cost/ a loo!-'ree to!olo"y 0 3 1)) M,!s 1< .cost/ % Co(i " 5ery soo I 3 @## M,!s @ .cost/ 3 1 G,!s < .cost/ 3 1$ G,!s # .cost/

Fi&e-Step STP Decision Se0"ence


%
Whe creati " a loo!-'ree to!olo"y+ STP always uses the sa(e 'i5e-ste! decisio seEue ce; Fi&e-Step decision Se0"ence Step 4 - $owest )*D Step % - $owest Path !ost to #oot )ridge Step ; - $owest Sender )*D Step < $owest Port Priority Step = - $owest Port *D

% %

6rid"es use Co 'i"uratio 6P4:s duri " this 'i5e-ste! !rocess0 We will assu(e all 6P4:s are co 'i"uratio 6P4:s u til otherwise oted0

F>*: )PD? key concepts


6P4: key co ce!ts; % 6rid"es sa5e a co!y o' o ly the ,est 6P4: see o e5ery !ort0 % Whe (aki " this e5aluatio + it co siders all o' the 6P4:s recei5ed o the !ort+ as well as the 6P4: that would ,e se t o that !ort0 % 8s e5ery 6P4: arri5es+ it is checked a"ai st this 'i5e-ste! seEue ce to see i' it is (ore attracti5e .lower i 5alue/ tha the e2isti " 6P4: sa5ed 'or that !ort0 % H ly the lowest 5alue 6P4: is sa5ed0 % 6rid"es se d co 'i"uratio 6P4:s u til a (ore attracti5e 6P4: is recei5ed0 % Hkay+ lets see how this is used000

7lect o e Root 6rid"e


The STP al"orith( uses three si(!le ste!s to converge o a loo!'ree to!olo"y; STP !on&ergence Step 4 ,lect one #oot )ridge Ste! # 7lect Root Ports Ste! ? 7lect 4esi" ated Ports

% % % % % %

Whe the etwork 'irst starts+ all ,rid"es are a ou ci " a chaotic (i2 o' 6P4:s0 8ll ,rid"es i((ediately ,e"i a!!lyi " the 'i5e-ste! seEue ce decisio !rocess0 Switches eed to elect a si "le Root 6rid"e0 Switch with the lowest )*D wi sI Note; Ma y te2ts re'er to the ter( &hi"hest !riority1 which is the &lowest1 6I4 5alue0 This is k ow as the @#oot +ar.A

,lect one #oot )ridge $owest )*D winsB

+ho wins7

+hat is the )*D of this switch7 +ho is the #oot7


Core# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t $ Port 2'()igabit%t*ernet0+1, -ello .i/e 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e 327 ! (priority 327 4 "y"5id5e1t 1, 0001#C!$'#A'73 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20

:se this co((a d to 5iew the i 'or(atio o the other 'our switche0

+hat is the )*D of this switch7 +ho is the #oot7


Di"trib6tion1# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t 1! Port 3(2a"t%t*ernet0+3, -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 000'#'%0D#!31' 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20

+hat is the )*D of this switch7 +ho is the #oot7


Di"trib6tion2# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t 1! Port 3(2a"t%t*ernet0+3, -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 00 0#$7&0#'4'0 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20

+hat is the )*D of this switch7 +ho is the #oot7


Acce""1# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t 1! Port '(2a"t%t*ernet0+', -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 0003#%$ 1#$ %C 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20

+hat is the )*D of this switch7 +ho is the #oot7


Acce""2# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& .*i" bridge i" t*e root -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 0001#! $%#7%&& 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20

,lect one #oot )ridge $owest )*D winsB


My 6I4 is ?#7@80$$$10C=<)08)7? My 6I4 is ?#7@80$$$)0)7$40=?1)

+ho wins7
My 6I4 is ?#7@80$$@$0<76$0)8)$

My 6I4 is ?#7@80$$$?07<@10<@7C

My 6I4 is ?#7@80$$$10=@<707766 I wi I

)ridge *Ds
?#7@80$$$10C=<)08)7?

?#7@80$$$)0)7$40=?1)

?#7@80$$@$0<76$0)8)$

?#7@80$$$?07<@10<@7C

?#7@80$$$10=@<707766

,lect one #oot )ridge $owest )*D winsB


*ts all done with )PD?sB
,"!7 60%)$ 1eader !estination8 017407C2700700700 Mcast 802.1d Bridge group So9rce8 007D07C072'7147D1 LL- Length8 34 60%)% Logical Lin: -ontrol (LL-) 1eader !est) SA"8 01$2 802.1 Bridge Spanning Tree So9rce SA"8 01$2 802.1 Bridge Spanning Tree -o33and8 0103 Unnumbered Information 60%)1 - ,ridge Spanning 2ree "rotocol dentifier8 0 "rotocol Version !8 0 4essage 2#pe8 0 onfiguration Message /lags8 800000000 Root "riorit#0 !8 014000+ 007D07C072'7147C0 -ost ;f "ath 2o Root8 0100000000 !0" ,ridge "riorit#0 !8 014000+ 007D07C072'7147C0 "ort "riorit#0 !8 0140+ 011D 4essage Age8 0+2' "econd" !e#actl$ 0 seconds" 4a5i393 Age8 '120+2' "econd" !e#actl$ 20 seconds" 1ello 2i3e8 '12+2' "econd" !e#actl$ 2 seconds" /orward !ela#8 34$0+2' "econd" !e#actl$ 1% seconds"

)PD?s
)PD?s sent:relayed e&ery two seconds.
)PD?

)PD?

)PD?

)PD?

)PD?

#oot )ridge Selection !riteria


My 6I4 is ?#7@80$$$10C=<)08)7? IJ( the rootI My 6I4 is ?#7@80$$$)0)7$40=?1) IJ( the rootI

+ho wins7
My 6I4 is ?#7@80$$@$0<76$0)8)$ IJ( the rootI

My 6I4 is ?#7@80$$$?07<@10<@7C IJ( the rootI

My 6I4 is ?#7@80$$$10=@<707766 IJ( the rootI I wi I

% 8t the ,e"i i "+ all ,rid"es assu(e a d declare the(sel5es as the Root
6rid"e+ ,y !laci " its ow 6I4 i the Root 6I4 'ield o' the 6P4:0

,lect one #oot )ridge $owest )*D winsB

H ce all o' the switches see that 8ccess# has the lowest 6I4+ they are all i a"ree(e t that 8ccess# is the Root 6rid"e0

#oot )ridge

,lect #oot Ports


I will select STP !on&ergence o e Root Ste! 1 7lect o e Root 6rid"e Port that is Step % ,lect #oot Ports closest+ Ste! ? 7lect 4esi" ated Ports ,est !ath to the root ,rid"e0

% % % % %

Now that the Root War has ,ee wo + switches (o5e o to selecti " #oot Ports0 8 ,rid"eJs #oot Port is the !ort closest to the Root 6rid"e0 6rid"es use the cost to deter(i e close ess0 ,&ery non-#oot )ridge will select one #oot PortB S!eci'ically+ ,rid"es track the #oot Path !ost+ the cu(ulati5e cost o' all li ks to the Root 6rid"e0

Determining (,lecting the #oot Port

% % %

Root 6rid"e+ 8ccess# se ds out 6P4:s+ co tai i " a Root Path Cost o' $0 8ccess1+ 4istri,utio 1+ a d 4istri,utio # recei5es these 6P4:s a d adds the Path Cost o' the Bast7ther et i ter'ace to the Root Path Cost co tai ed i the 6P4:0 8ccess1+ 4istri,utio 1+ a d 4istri,utio # add Root Path Cost $ P9:S its Path .!ort/ cost o' 1= A 1=0 3 This 5alue is used i ter ally a d used i 6P4:s to other switches0 Path !ost

)PD? !ost8394C84C

)PD? !ost8394C84C

4C

4C

#oot )ridge
3
)PD? !ost8394C84C

3
)PD? !ost83

4C

4i''ere ce ,>t Path Cost a d Root Path Cost Path !ost: % The 5alue assi" ed to each !ort0 % 8dded to 6P4:s recei5ed o that !ort to calculate Root Path Cost0

#oot Path !ost % Cu(ulati5e cost to the Root 6rid"e0 % This is the 5alue tra s(itted i the 6P4:0 % Calculated ,y addi " the recei5i " !ortJs Path Cost to the 5alued co tai ed i the 6P4:0

Path !ost

)PD? !ost8394C84C

)PD? !ost8394C84C

4C

4C

#oot )ridge
3
)PD? !ost8394C84C

3
)PD? !ost83

4C

+hat are the Path !osts for #oot )ridge (ccess%7


Acce""2# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& .*i" bridge i" t*e root -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 De"g De"g De"g St" 555 2:D 2:D 2:D Path !ost

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 0001#! $%#7%&& 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20 Co"t 555555555 1! 1! 1! Prio#Nbr 55555555 124#1 124#3 124#' .ype 55555555555555555555555 P2p P2p P2p

Inter9ace 5555555555555555 2a0+1 2a0+3 2a0+'

+hat are the Path !osts for Distrib"tion47


Path !ost Di"trib6tion1# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t 1! Port 3(2a"t%t*ernet0+3, -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 De"g Altn Root De"g St" 555 2:D &L; 2:D 2:D

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 000'#'%0D#!31' 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20 Co"t 555555555 $ $ 1! 1! Prio#Nbr 55555555 124#2' 124#2 124#3 124#' .ype 5555555555555555555555 P2p P2p P2p P2p

Inter9ace 5555555555555555 )i0+1 )i0+2 2a0+3 2a0+'

+hat are the Path !osts for (ccess47


Acce""1# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t 1! Port '(2a"t%t*ernet0+', -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 Root De"g De"g St" 555 2:D 2:D 2:D Path !ost

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 0003#%$ 1#$ %C 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20 Co"t 555555555 1! $ $ Prio#Nbr 55555555 124#' 124#2' 124#2 .ype 5555555555555555555555 P2p P2p P2p

Inter9ace 5555555555555555 2a0+' )i1+1 )i1+2

+hat are the Path !osts for Distrib"tion%7


Di"trib6tion2# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t 1! Port 3(2a"t%t*ernet0+3, -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 Root Altn Altn De"g St" 555 2:D &L; &L; 2:D Path !ost

2or3ard Delay 1' "ec

327 ! (priority 327 4 "y"5id5e1t 1, 00 0#$7&0#'4'0 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20 Co"t 555555555 1! 1! $ $ Prio#Nbr 55555555 124#3 124#' 124#2' 124#2 .ype 5555555555555555555555 P2p P2p P2p P2p

Inter9ace 5555555555555555 2a0+3 2a0+' )i0+1 )i0+2

show spanning-tree detail


:se this co((a d to 5iew the Path Cost o' a i ter'ace0
Di"trib6tion1# show spanning-tree detail

Path !ost

VLAN0001 i" e1ec6ting t*e ieee co/patible Spanning .ree Protocol &ridge Identi9ier *a" priority o9 327 4< "y"id 1< 000'#'%0D#!31' Con9ig6red *ello ti/e 2< /a1 age 20< 9or3ard delay 1' C6rrent root *a" priority 327 ! Root port i" 3 (2a"t%t*ernet0+3,< co"t o9 root pat* i" 1! .opology c*ange 9lag not "et< detected 9lag not "et N6/ber o9 topology c*ange" 0 la"t c*ange occ6rred 00700700 ago 9ro/ 2a"t%t*ernet0+1 .i/e"7 *old 1< topology c*ange 3'< noti9ication 2 *ello 2< /a1 age 20< 9or3ard delay 1' .i/er"7 *ello 0< topology c*ange 0< noti9ication 0< aging 300

show spanning-tree detail


:se this co((a d to 5iew the Path Cost o' a i ter'ace0
Acce""1# show spanning-tree detail

Path !ost

VLAN0001 i" e1ec6ting t*e ieee co/patible Spanning .ree Protocol &ridge Identi9ier *a" priority o9 327 4< "y"id 1< 0003#%$ 1#$ %C Con9ig6red *ello ti/e 2< /a1 age 20< 9or3ard delay 1' C6rrent root *a" priority 327 ! Root port i" ' (2a"t%t*ernet0+',< co"t o9 root pat* i" 1! .opology c*ange 9lag not "et< detected 9lag not "et N6/ber o9 topology c*ange" 0 la"t c*ange occ6rred 00700700 ago 9ro/ 2a"t%t*ernet0+1 .i/e"7 *old 1< topology c*ange 3'< noti9ication 2 *ello 2< /a1 age 20< 9or3ard delay 1' .i/er"7 *ello 0< topology c*ange 0< noti9ication 0< aging 300

show spanning-tree detail


:se this co((a d to 5iew the Path Cost o' a i ter'ace0
Di"trib6tion2# show spanning-tree detail

Path !ost

VLAN0001 i" e1ec6ting t*e ieee co/patible Spanning .ree Protocol &ridge Identi9ier *a" priority o9 327 4< "y"id 1< 00 0#$7&0#'4'0 Con9ig6red *ello ti/e 2< /a1 age 20< 9or3ard delay 1' C6rrent root *a" priority 327 ! Root port i" 3 (2a"t%t*ernet0+3,< co"t o9 root pat* i" 1! .opology c*ange 9lag not "et< detected 9lag not "et N6/ber o9 topology c*ange" 0 la"t c*ange occ6rred 00700700 ago 9ro/ 2a"t%t*ernet0+1 .i/e"7 *old 1< topology c*ange 3'< noti9ication 2 *ello 2< /a1 age 20< 9or3ard delay 1' .i/er"7 *ello 0< topology c*ange 0< noti9ication 0< aging 300

show spanning-tree detail


:se this co((a d to 5iew the Path Cost o' a i ter'ace0
Acce""2# show spanning-tree detail

Path !ost

VLAN0001 i" e1ec6ting t*e ieee co/patible Spanning .ree Protocol &ridge Identi9ier *a" priority o9 327 4< "y"id 1< 0001#! $%#7%&& Con9ig6red *ello ti/e 2< /a1 age 20< 9or3ard delay 1' C6rrent root *a" priority 327 ! .opology c*ange 9lag not "et< detected 9lag not "et N6/ber o9 topology c*ange" 0 la"t c*ange occ6rred 00700700 ago 9ro/ 2a"t%t*ernet0+1 .i/e"7 *old 1< topology c*ange 3'< noti9ication 2 *ello 2< /a1 age 20< 9or3ard delay 1' .i/er"7 *ello 0< topology c*ange 0< noti9ication 0< aging 300

6o #oot port This switch is the #oot )ridgeB

% % % %

Switches ow se d 6P4:s with their Root Path Cost out other i ter'aces0 8ccess 1 uses this 5alue o' 1= i ter ally a d se ds 6P4:s with a Root Path Cost o' 1= out all other !orts0 .Bor si(!licity we will ot i clude 6P4: to root0/ Switches recei5e 6P4: a d add their path cost. 6ote; STP costs are i cre(e ted as 6P4:s are recei5ed o a !ort+ ot as they are se t out a !ort0 Path !ost

)PD? !ost8<94C8%;

)PD? !ost8<94C8%;

4C 4C

)PD? !ost84C

)PD? !ost84C

3 4C 3

#oot )ridge

% % %

4istri,utio 1 a d 4istri,utio # recei5e the 6P4:s 'ro( 8ccess 1+ a d adds the Path Cost o' < to those i ter'aces+ "i5i " a Root Path Cost o' #?0 Howe5er+ ,oth o' these switches already ha5e a &i ter al1 Root Path Cost o' 1= that was recei5ed o a other i ter'ace0 .Ba$>? 'or each with a Root Path Cost o' 1=0/ 4istri,utio 1 a d 4istri,utio # use the ,etter 6P4: o' 1= whe se di " out their 6P4:s to other switches0

)PD? !ost8<94C8%;

)PD? !ost8<94C8%;

4C 4C

)PD? !ost84C

)PD? !ost84C

3 4C 3

#oot )ridge

% %

4istri,utio 1 ow se ds 6P4:s with its Root Path Cost out other i ter'aces0 8"ai + STP costs are i cre(e ted as 6P4:s are recei5ed o a !ort+ ot as they are se t out a !ort0 Path !ost
)PD? !ost8<94C8%;

)PD? !ost84C

)PD? !ost84C94C8;2

4C %; %; 4C

3 4C
)PD? !ost8<94C8%;

#oot )ridge

4C

3 3

Bi al Results % Ports show 6P4: Recei5ed Root Path Cost C Path Cost A Root Path Cost o' I ter'ace+ a'ter the &,est1 6P4: is recei5ed o that !ort 'ro( the ei"h,ori " switch0 % This is the cost o' reachi " the Root 6rid"e 'ro( this i ter'ace towards the ei"h,ori " switch0 % Now lets see how this is used! Path !ost

4C9<8%;

4C9<8%;

%;9<8%D

%;9<8%D 4C94C8;2 4C9<8%; 4C

4C94C8;2 4C 4C9<8%;

4C9<8%;

4C9<8%; 4C 3 3

#oot )ridge

show spanning-tree
+hich port is the #oot Port7

Path !ost

Core# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 0001#! $%#7%&& Co"t $ Port 2'()igabit%t*ernet0+1, -ello .i/e 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 Root Altn St" 555 2:D &L; 327 ! (priority 327 4 "y"5id5e1t 1, 0001#C!$'#A'73 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20 Co"t 555555555 $ $ Prio#Nbr 55555555 124#2' 124#2 .ype 55555555555555555555555555555555 P2p P2p

Inter9ace 5555555555555555 )i0+1 )i0+2

show spanning-tree detail


+hich port is the #oot Port7
Core# show spanning-tree detail

Path !ost

VLAN0001 i" e1ec6ting t*e ieee co/patible Spanning .ree Protocol &ridge Identi9ier *a" priority o9 327 4< "y"id 1< 0001#C!$'#A'73 Con9ig6red *ello ti/e 2< /a1 age 20< 9or3ard delay 1' C6rrent root *a" priority 327 ! Root port i" 2' ()igabit%t*ernet0+1,< co"t o9 root pat* i" $ .opology c*ange 9lag not "et< detected 9lag not "et N6/ber o9 topology c*ange" 0 la"t c*ange occ6rred 00700700 ago 9ro/ 2a"t%t*ernet0+1 .i/e"7 *old 1< topology c*ange 3'< noti9ication 2 *ello 2< /a1 age 20< 9or3ard delay 1' .i/er"7 *ello 0< topology c*ange 0< noti9ication 0< aging 300

,lect #oot Ports 6e-t; % 75ery o -Root ,rid"e (ust select o e #oot Port0 % 7lect Root Ports % 8 ,rid"eJs #oot Port is the !ort closest to the Root % 7lect 4esi" ated Ports 6rid"e0 % No -4esi" ated Ports; 8ll other !orts % 6rid"es use the cost to deter(i e close ess0

These 5alues would ,e the Root Path Cost i' this i ter'ace was used to reach the Root 6rid"e0
4C %;

Path !ost
%; %;

%D ;2

%D ;2 %; 4C

%;

%; 4C 3 3

#oot )ridge

,lect #oot Ports; .Re5iew/ % Ports show Root Path Cost o' I ter'ace+ a'ter the &,est1 6P4: is recei5ed o that !ort 'ro( the ei"h,ori " switch0 % This is the cost o' reachi " the Root 6rid"e 'ro( this i ter'ace towards the ei"h,ori " switch0 Distrib"tion 4 @tho"ght processA
I' I "o throu"h Core it costs #70 I' I "o throu"h 4# it costs ?80

Path !ost

I' I "o throu"h 81 it costs #?0

I' I "o throu"h 8# it costs 1=0 This is the best path to the #ootB

,lect #oot Ports; % This is 'ro( the switchs perspective0 % Switch+ &What is (y cost to the Root 6rid"eK1 % 9ater we will look at 4esi" ated Ports+ which is 'ro( the Segments perspective0

Distrib"tion 4 @tho"ght processA


I' I "o throu"h Core it costs #70 I' I "o throu"h 4# it costs ?80

Path !ost

I' I "o throu"h 81 it costs #?0

I' I "o throu"h 8# it costs 1=0 This is the best path to the #ootB

,lect #oot Ports % 75ery o -Root ,rid"e (ust select o e #oot Port0 % 8 ,rid"eJs #oot Port is the !ort closest to the Root 6rid"e0 % 6rid"es use the #oot Path !ost to deter(i e close ess0

7
%;

7
%;

%D ;2 4C %; #P

%D ;2 %; 4C #P

%;

%; 4C #P 3 3

#oot )ridge

,lect #oot Ports % Core switch has two eEual Root Path Costs to the Root 6rid"e0 % I this case we eed to look at the 'i5e-ste! decisio !rocess0

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Step ; - $owest Sender )*D Ste! < - 9owest Port Priority Ste! ) - 9owest Port I4

7
%;

7
%;

%D ;2 4C %; #P

%D ;2 %; 4C #P

%;

%; 4C #P 3 3

#oot )ridge

,lect #oot Ports % 4istri,utio 1 switch has a lower Se der 6I4 tha 4istri,utio #0 % Core chooses the Root Port o' G $>10

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Step ; - $owest Sender )*D Ste! < - 9owest Port Priority Ste! ) - 9owest Port I4

7
My 6I4 is ?#7@80$$$)0)7$40=?1)
#P %;

7
%;

My 6I4 is ?#7@80$$@$0<76$0)8)$
%D ;2 %; 4C #P

$ower )*D

%D ;2 4C %; #P

%;

%; 4C #P 3 3

#oot )ridge

,lect Designated Ports


STP !on&ergence Ste! 1 7lect o e Root 6rid"e Ste! # 7lect Root Ports Step ; ,lect Designated Ports

% % % % % %

The loo! !re5e tio !art o' STP ,eco(es e5ide t duri " this ste!+ electi " desi" ated !orts0 8 4esi" ated Port 'u ctio s as the si "le ,rid"e !ort that ,oth se ds a d recei5es tra''ic to a d 'ro( that se"(e t a d the Root 6rid"e0 ,ach segment in a bridged network has one Designated PortE chosen based on c"m"lati&e #oot Path !ost to the #oot )ridge. The switch co tai i " the Designated Port is re'erred to as the Designated )ridge 'or that se"(e t0 To locate 4esi" ated Ports+ lets take a look at each se"(e t0 SegmentFs perspecti&e; Bro( a de5ice o this se"(e t+ Which switch should I go through to reach the Root ridge!" 3 #oot Path !ost+ the cu(ulati5e cost o' all li ks to the Root 6rid"e0 3 H,5iously+ the se"(e t has ot a,ility to (ake this decisio + so the !ers!ecti5e a d the decisio is that o' the switches o that se"(e t0

% ! ! !

8 Designated Port is elected 'or e5ery se"(e t0 The Designated Port is the o ly !ort that se ds a d recei5es tra''ic to>'ro( that se"(e t to the Root 6rid"e+ the ,est !ort towards the root ,rid"e0 6ote; The Root Path Cost shows the Sent Root Path Cost0 This is the ad5ertised cost i the 6P4:+ ,y this switch out that i ter'ace+ i0e0 this is the cost o' reachi " the Root 6rid"e throu"h (eI

#P

%;

%;

4C 4C 4C 4C #P

4C 4C 4C 4C #P

4C

4C 4C #P 3 3

#oot )ridge

% ! !

8 Designated Port is elected 'or e5ery se"(e t0 SegmentFs perspecti&e; Bro( a de5ice o this se"(e t+ Which switch should I go through to reach the Root ridge!" I#ll decide usi$g the ad%ertised Root &ath 'ost fro( each switch)"

#P

%;

%;

7
4C 4C 4C 4C

7 7 7 7
#P 4C 4C 4C 4C #P

7
4C

#P

7
3 3 3

4C 4C

#oot )ridge

SegmentFs perspecti&e: % 8ccess # has a Root Path Cost A $ .a'ter all it is the Root 6rid"e/ a d 8ccess 1 has a Root Path Cost A 1=0 % 6ecause 8ccess # has the lower Root Path Cost it ,eco(es the Designated Port 'or that se"(e t0

#P %;

%;

4C

4C

4C

My What ated is (y !ort ,est will!ath ,e 4C $ 4C desi" 5ia 8ccess to the# Root .Ba$>)/0 6rid"e+ ItJs 1= the 4C 4C ,est !ath+ 5ia 8ccess lowest Root 1 or $ Path+ 5ia to the Root 8ccess 6rid"e0 #K #P

4C #P

4C

4C 4C #P

3 DP 3 3

#oot )ridge

SegmentFs perspecti&e: ! The sa(e occurs ,etwee 8ccess # a d 4istri,utio +1 a d 8ccess # a d 4istri,utio # switches0 ! 6ecause 8ccess # has the lower Root Path Cost it ,eco(es the Designated Port 'or those se"(e ts0

#P %;

%;

4C 4C 4C 4C #P

4C 4C 4C 4C #P

7
DP DP 3 3 3 DP

4C

4C 4C #P

#oot )ridge

SegmentFs perspecti&e: ! Se"(e t ,etwee 4istri,utio 1 a d 8ccess 1 has two eEual Root Path Costs o' 1=0 ! :si " the 9owest Se der I4 .'irst two ste!s are eEual/+ (ccess 4 ,eco(es the ,est !ath a d the Designated Port0

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Step ; - $owest Sender )*D Ste! < - 9owest Port Priority Ste! ) - 9owest Port I4

#P %;

%;

;%D.2.333=.=,3D.C;4=
4C 4C 4C 4C #P 4C

7
DP 4C 4C 4C #P

What is (y ,est !ath to the Root 4C 6rid"e+ 1= 4C 5ia 4istri,utio 1 or 1= 5ia 8ccess 1K 4C #P They are the sa(eI Who has the lowest 6I4K
DP DP 3 3 3 DP

;%D.2.333;.,<.4.<.,!

#oot )ridge

$ower )*D

(ccess 4 has $ower Sender )*D


Di"trib6tion1# show spanning-tree detail Port 2 ()igabit%t*ernet0+2, o9 VLAN0030 i" de"ignated bloc=ing Port pat* co"t $< Port priority 124< Port Identi9ier 124#2 De"ignated root *a" priority 124< addre"" 000C#C20&#1'03 De"ignated bridge *a" priority 327!4< addre"" 000$)+*'1)*'+De"ignated port id i" 124#2 < de"ignated pat* co"t $ .i/er"7 /e""age age 1 < 9or3ard delay 0< *old 0 N6/ber o9 tran"ition" to 9or3arding "tate7 1 Lin= type i" point5to5point by de9a6lt Acce""1# show spanning-tree detail Port 2 ()igabit%t*ernet1+2, o9 VLAN0001 i" de"ignated 9or3arding Port pat* co"t $< Port priority 124< Port Identi9ier 124#2 De"ignated root *a" priority 124< addre"" 0001#C7$ #& 0' De"ignated bridge *a" priority 327 !< addre"" 000$)+*'1)*'+De"ignated port id i" 124#2 < de"ignated pat* co"t $ .i/er"7 /e""age age 1 < 9or3ard delay 0< *old 0 N6/ber o9 tran"ition" to 9or3arding "tate7 1 Lin= type i" point5to5point by de9a6lt ;%D.2.333;.,<.4.<.,!

Note; PT does ot show !ro!er 6I4

SegmentFs perspecti&e: ! Se"(e t ,etwee 4istri,0 1 a d 4istri,0 # has two eEual Root Path Costs o' 1=0 ! :si " the 9owest Se der I4 .'irst two ste!s are eEual/+ Distrib"tion 4 ,eco(es the ,est !ath a d the Designated Port0

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Step ; - $owest Sender )*D Ste! < - 9owest Port Priority Ste! ) - 9owest Port I4

#P %;

%;

;%D.2.333=.=,3D.C;4=

;%D.2.33.3.<D)3.=2=3
4C DP 4C 4C #P

$ower )*D

4C 4C 4C 4C #P

4C

4C

4C 4C #P

DP DP 3 3

3 DP

#oot )ridge

Distrib"tion 4 has $ower Sender )*D


Di"trib6tion1# show spanning-tree detail Port ' (2a"t%t*ernet0+', o9 VLAN0030 i" de"ignated 9or3arding Port pat* co"t 1!< Port priority 124< Port Identi9ier 124#' De"ignated root *a" priority 124< addre"" 000C#C20&#1'03 De"ignated bridge *a" priority 327!4< addre"" 000.).+0!)($1. De"ignated port id i" 124#'< de"ignated pat* co"t 1! .i/er"7 /e""age age 1 < 9or3ard delay 0< *old 0 N6/ber o9 tran"ition" to 9or3arding "tate7 1 Lin= type i" point5to5point by de9a6lt

Di"trib6tion2# show spanning-tree detail Port ' (2a"t%t*ernet0+', o9 VLAN0001 i" de"ignated bloc=ing Port pat* co"t 1!< Port priority 124< Port Identi9ier 124#' De"ignated root *a" priority 124< addre"" 000C#C20&#1'03 De"ignated bridge *a" priority 327 !< addre"" 000.).+0!)($1. De"ignated port id i" 124#'< de"ignated pat* co"t 1! .i/er"7 /e""age age 1 < 9or3ard delay 0< *old 0 N6/ber o9 tran"ition" to 9or3arding "tate7 1 Lin= type i" point5to5point by de9a6lt Note; PT does ot show !ro!er 6I4

SegmentFs perspecti&e: ! Se"(e t ,etwee 8ccess 1 a d 4istri,0 # has two eEual Root Path Costs o' 1=0 ! :si " the 9owest Se der I4 .'irst two ste!s are eEual/+ (ccess 4 ,eco(es the ,est !ath a d the Designated Port0

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Step ; - $owest Sender )*D Ste! < - 9owest Port Priority Ste! ) - 9owest Port I4

#P %;

%;

;%D.2.33.3.<D)3.=2=3
4C DP 4C 4C 4C #P 4C 4C 4C 4C #P

;%D.2.333;.,<.4.<.,!

4C

DP 4C 4C #P

DP DP 3 3

3 DP

$ower )*D

#oot )ridge

(ccess 4 has $ower Sender )*D


Di"trib6tion2# show spanning-tree detail Port 2' ()igabit%t*ernet0+1, o9 VLAN0001 i" de"ignated bloc=ing Port pat* co"t $< Port priority 124< Port Identi9ier 124#2' De"ignated root *a" priority 124< addre"" 00D0#&CC1#2 03 De"ignated bridge *a" priority 327 !< addre"" 000$)+*'1)*'+De"ignated port id i" 124#2'< de"ignated pat* co"t $ .i/er"7 /e""age age 1 < 9or3ard delay 0< *old 0 N6/ber o9 tran"ition" to 9or3arding "tate7 1 Lin= type i" point5to5point by de9a6lt

Acce""1# show spanning-tree detail Port 2' ()igabit%t*ernet1+1, o9 VLAN0001 i" de"ignated 9or3arding Port pat* co"t $< Port priority 124< Port Identi9ier 124#2' De"ignated root *a" priority 124< addre"" 0001#C7$ #& 0' De"ignated bridge *a" priority 327 !< addre"" 000$)+*'1)*'+De"ignated port id i" 124#2'< de"ignated pat* co"t $ .i/er"7 /e""age age 1 < 9or3ard delay 0< *old 0 N6/ber o9 tran"ition" to 9or3arding "tate7 1 Lin= type i" point5to5point by de9a6lt Note; PT does ot show !ro!er 6I4

SegmentFs perspecti&e: ! 6ecause Distrib"tion 4 has the lower Root Path Cost it ,eco(es the Designated Port 'or that se"(e t0 ! 6ecause Distrib"tion % has the lower Root Path Cost it ,eco(es the Designated Port 'or that se"(e t0
Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Step % - $owest Path !ost to #oot )ridge Ste! ? - 9owest Se der 6I4 Ste! < - 9owest Port Priority Ste! ) - 9owest Port I4

7
DP 4C DP 4C 4C 4C #P

#P %;

%;

7
DP 4C 4C 4C

4C #P

4C DP

4C 4C #P

DP DP 3 3

3 DP

#oot )ridge

SegmentFs perspecti&e: ! 8ll other !orts+ those !orts that are ot Root Ports or 4esi" ated Ports+ ,eco(e 6onDesignated Ports. ! 6on-Designated Ports are !ut i ,locki " (ode0

This is the loo! !re5e tio !art o' STP0

#P %;

6DP DP 4C DP 6DP 4C

'

%;

4C 6DP 4C 4C

DP

'
DP

4C 4C #P

' '

6DP

4C #P

4C

4C 4C #P

DP DP 3 3

3 DP

#oot )ridge

Core# show spanning-tree Inter9ace Role St" 5555555555555555 5555 555 )i0+1 Root 2:D )i0+2 Altn &L;

Co"t 555555555 $ $

Prio#Nbr 55555555 124#2' 124#2

.ype 55555555555555555555555555555555 P2p P2p

Di"trib6tion1# show spanning-tree Inter9ace Role St" Co"t 5555555555555555 5555 555 555555555 2a0+3 Root 2:D 1! 2a0+' De"g 2:D 1! )i0+1 De"g 2:D $ )i0+2 Altn &L; $ Di"trib6tion2# show spanning-tree Inter9ace Role St" Co"t 5555555555555555 5555 555 555555555 2a0+3 Root 2:D 1! 2a0+' Altn &L; 1! )i0+1 Altn &L; $ )i0+2 De"g 2:D $

Prio#Nbr 55555555 124#3 124#' 124#2' 124#2 Prio#Nbr 55555555 124#3 124#' 124#2' 124#2

.ype 55555555555555555555555555555555 P2p P2p P2p P2p .ype 55555555555555555555555555555555 P2p P2p P2p P2p

Acce""1# show spanning-tree Inter9ace Role St" Co"t 5555555555555555 5555 555 555555555 2a0+' Root 2:D 1! )i1+1 De"g 2:D $ )i1+2 De"g 2:D $ Acce""2# show spanning-tree Inter9ace Role St" Co"t 5555555555555555 5555 555 555555555 2a0+1 De"g 2:D 1! 2a0+3 De"g 2:D 1! 2a0+' De"g 2:D 1!

Prio#Nbr 55555555 124#' 124#2' 124#2 Prio#Nbr 55555555 124#1 124#3 124#'

.ype 55555555555555555555555555555555 P2p P2p P2p .ype 55555555555555555555555555555555 P2p P2p P2p

Port !ost:Port *D
$># $>1

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Ste! ? - 9owest Se der 6I4 Step < - $owest Port Priority Step = - $owest Port *D

8ssu(e !ath cost a d !ort !riorities are de'ault .?#/0 Port I4 used i this case0 Port $>1 would 'orward ,ecause itJs the lowest0

% % % %

I' the !ath cost a d ,rid"e I4s are eEual .as i the case o' !arallel li ks/+ the switch "oes to the !ort !riority as a tie,reaker0 9owest !ort !riority wi s .all !orts set to ?#/0 Fou ca set the !riority 'ro( $ 3 @?0 I' all !orts ha5e the sa(e !riority+ the !ort with the lowest !ort u(,er 'orwards 'ra(es0

Port Cost>Port I4 % Ba $>? has a lower Port I4 tha Ba $<0 % More later .Bast 7therCha el/

Fi&e-Step decision Se0"ence Ste! 1 - 9owest 6I4 Ste! # - 9owest Path Cost to Root 6rid"e Ste! ? - 9owest Se der 6I4 Step < - $owest Port Priority Step = - $owest Port *D

#P 1= 6DP 1= DP DP

Port !ost:Port *D
Di"trib6tion1# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 327 ! Addre"" 000!#7c0b#e7c0 Co"t 1! Port 3 (2a"t%t*ernet0+3, -ello .i/e 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec &ridge ID Priority 327 ! (priority 327 4 "y"5id5e1t 1, Addre"" 000b#9d13#!040 -ello .i/e 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec Aging .i/e 300 Inter9ace Port ID De"ignated Na/e Prio#Nbr Co"t St" Co"t &ridge ID 5555555555555555 55555555 555555555 555 555555555 55555555555555555555 2a0+1 124#1 1! &L; 1! 327 ! 000b#be9a#eec0 2a0+2 124#2 1! &L; 1! 327 ! 000b#be9a#eec0 2a0+3 124#3 1! 2:D 0 327 ! 000!#7c0b#e7c0 2a0+$ 124#$ 1! &L; 0 327 ! 000!#7c0b#e7c0 2a0+' 124#' 1! 2:D 1! 327 ! 000b#9d13#!040 )i0+1 124#2' $ 2:D 1! 327 ! 000b#9d13#!040

Port ID Prio#Nbr 55555555 124#1 124#2 124#1 124#2 124#' 124#2'

P5ST9 (/ore later


%
Per D98N S!a i " Tree Plus .PDSTC/ (ai tai s a se!arate s!a i "-tree i sta ce 'or each D98N0 3 PDST H ly o5er IS9 3 PDSTC I cludes IS9 a d 8$#01L Pro5ides 'or load ,ala ci " o a !erD98N ,asis0 Switches (ai tai o e i sta ce o' s!a i " tree 'or each D98N allowed o the tru ks0 No -Cisco 8$#01L switches (ai tai o ly o e i sta ce o' s!a i " tree 'or all D98Ns allowed o the tru ks0

% % %

Di"trib6tion1(con9ig,# spanning-tree vlan 1< 10 root pri3ar#

Di"trib6tion2(con9ig,# spanning-tree vlan %0 root pri3ar#

Distrib"tion4 is the #oot for 5$(64 and 43

#oot 5$(6s 4E43

Distrib"tion% is the #oot for 5$(6 %3

#oot 5$(6 %3

$oad )alancing with % #oot Switches


Notice that more links are being used!

#oot 5$(6s 4E43

#oot 5$(6 %3

STP !on&ergence: S"mmary


Recall that switches "o throu"h three ste!s 'or their i itial co 5er"e ce; STP !on&ergence Step 4 ,lect one #oot )ridge Step % ,lect #oot Ports Step ; ,lect Designated Ports 8lso+ all STP decisio s are ,ased o a the 'ollowi " !redeter(i ed seEue ce; Fi&e-Step decision Se0"ence Step 4 - $owest )*D Step % - $owest Path !ost to #oot )ridge Step ; - $owest Sender )*D Step < $owest Port Priority Step = - $owest Port *D

STP !on&ergence: S"mmary


72a(!le; % 8 etwork that co tai s 1) switches a d 1<@ se"(e ts .e5ery switch!ort is a u iEue se"(e t/ would result i ; 3 1 Root 6rid"e 3 1< Root Ports 3 1<@ 4esi" ated Ports

STP Port States

STP Port States


M8C 8ddress Ta,le Disabled )locking $istening $earning Forwarding 6P4:s 4ata
/(!-(dd Table No u!date No u!date Data frames No e se t>recei5ed No e se t>recei5ed D"ration : til no sh"tdown
Co ti uous i' loo! detected

:!dati "
Port State Disabled )locking )PD? No e se t>recei5ed Recei5e o ly

8d(i istrati5ely shutdow M Not a STP !ort state

Port i itializesM recei5es 6P4:s o ly $istening Recei5e a d se d No u!date No e se t>recei5ed


Borward delay 1) sec

6uildi " acti5e to!olo"y0 Thi ks !ort ca ,e selected root or desi" ated !ort0 Retur s to ,locki " .N4P/ i' ca ot ,eco(e root or desi" ated !ort0 $earning Recei5e a d se d :!dati " Ta,le No e se t>recei5ed
Borward delay 1) sec

6uildi " ,rid"i " ta,le0 Switch ca ow lear source M8C 8ddresses ,ut is ot 'or(ally recei5i " 'ra(es i order to 'orward the(0 Forwarding Recei5e a d se d :!dati " Ta,le Se t a d recei5ed
Co ti uous i' u! a d o loo! detected

Se di ">Recei5i " data+ o loo!s detected0 Port is either a root or desi" ated !ort0

9 is t e i "

<

4 is a , le d o r 4 ow

6 lo c k i "
% D < .

<

9ear i "

B o rw a rd i "

S ta n d a rd S ta te s . 1 / P o r t e a , le d o r i it ia liz e d . # / P o r t d is a , le d o r ' a ile d . ? / P o r t s e le c t e d a s R o o t o r 4 e s i" a t e d P o r t . < / P o r t c e a s e s t o , e a R o o t o r 4 e s i" a t e d P o r t . ) / B o r w a r d i " t i( e r e 2 ! ir e s

! is c o S p e c ific S ta te s .@ / P o rtB a s t . 7 / : ! li k B a s t

STP Timers

STP Timers
Gello Time % I777 s!eci'ies de'ault o' # seco ds0 % The i ter5al ,etwee Co 'i"uratio 6P4:s0 % The Hello Ti(e 5alue co 'i"ured at the root ,rid"e deter(i es the Hello Ti(e 'or all o root switches0 % 9ocally co 'i"ured Hello Ti(e is used 'or the TCN 6P4:0

STP Timers
Forward Delay Timer % The de'ault 5alue o' the 'orward delay .1) seco ds/ % *rigi$all+ deri%ed assu(i$g a (a,i(u( $etwor- si.e of se%e$ /ridge hops 3 0 (a,i(u( of three lost &D1s, a$d a hello-ti(e i$ter%al of 2 seco$ds2 3 See 98N Switchi "+ ,y Clark+ or other resources 'or this calculatio % Borward delay is used to deter(i e the le "th o'; 3 9iste i " state 3 9ear i " state

STP Timers
/a- (ge Timer % Ma2 8"e is the ti(e that a ,rid"e stores a 6P4: ,e'ore discardi " it0 % 7ach !ort sa5es a co!y o' the ,est 6P4: it has recei5ed0 % I' the de5ice se di " this ,est 6P4: 'ails+ it (ay take %3 seconds ,e'ore a switch tra sitio s the co ected !ort to 9iste i "0

STP Timers

/odifying Timers % 4o ot cha "e the de'ault ti(er 5alues without care'ul co sideratio 0 % Cisco reco((e ds to (odi'y the STP ti(ers o ly o the root ,rid"e % The 6P4:s !ass these 5alues 'ro( the root ,rid"e to all other ,rid"es i the etwork0 % It ca take ?$-)$ seco ds 'or a switch to adGust to a cha "e i to!olo"y0

S3itc*(con9ig,# "panning5tree >lan vlan-id ?forward-ti3e seconds @ hello-ti3e &ello-time @ 3a5-age seconds @ priorit# priorit$ @ protocol protocol @ Aroot Apri3ar# @ secondar#B ?dia3eter net-diameter ?hello-ti3e &ellotimeCCBC

!onfig"ring the #oot )ridge

S3itc*(con9ig,# spanning-tree vlan 1 priorit# priority

% % % %

This co((a d statically co 'i"ures the !riority .i (ulti!les o' <$=@/0 Dalid 5alues are 'ro( $ to @1+<<$0 4e'ault is ?#7@80 9owest 5alues ,eco(es Root 6rid"e0

!onfig"ring the #oot )ridge

S3itc*(con9ig,# spanning-tree vlan 1 root pri3ar# % This co((a d 'orces this switch to ,e the root0 % The spanning-tree root primary co((a d alters this switchNs ,rid"e !riority to %<E=D.0 % I' the curre t root has ,rid"e !riority which is (ore tha #<+)7@+ the the curre t is cha "ed to <E3C. less tha o' the curre t root ,rid"e0

!onfig"ring the #oot )ridge

S3itc*(con9ig,# spanning-tree vlan 1 root secondar#

% This co((a d co 'i"ures this switch to ,e the seco dary root i case the root ,rid"e 'ails0 % The spanning-tree root secondary co((a d alters this switchNs ,rid"e !riority to %2E.D%0 % I' the root switch should 'ail+ this switch ,eco(es the e2t root switch0

!hange the root bridge

Curre t Root 6rid"e

Modi'y the to!olo"y so that the Core switch is the root ,rid"e a d 4istri,utio 1 is the seco dary root ,rid"e 'or D98N 10

!hange the root bridge


Core(con9ig,# spanning-tree vlan 1-$0 root pri3ar# Di"trib6tion1(con9ig,# spanning-tree vlan 1-$0 root secondar#

Notice the cha "eO0 )efore (fter

5erify changes
Core# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 2$'77 Addre"" 0001#C!$'#A'73 .*i" bridge i" t*e root -ello .i/e 2 "ec 0a1 Age 20 "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 De"g De"g St" 555 2:D 2:D 2$'77 (priority 2$'7 0001#C!$'#A'73 2 "ec 0a1 Age 20 "ec 20 Co"t 555555555 $ $ Prio#Nbr 55555555 124#2' 124#2

2or3ard Delay 1' "ec "y"5id5e1t 1, 2or3ard Delay 1' "ec

Inter9ace 5555555555555555 )i0+1 )i0+2

.ype 5555555555555555555555 P2p P2p

5erify changes
Di"trib6tion2# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 2$'77 Addre"" 0001#C!$'#A'73 Co"t $ Port 2 ()igabit%t*ernet0+2, -ello .i/e 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec &ridge ID Priority Addre"" -ello .i/e Aging .i/e Role 5555 De"g Altn De"g Root St" 555 2:D &L; 2:D 2:D 327 ! (priority 327 4 "y"5id5e1t 1, 00 0#$7&0#'4'0 2 "ec 0a1 Age 20 "ec 2or3ard Delay 1' "ec 20 Co"t 555555555 1! 1! $ $ Prio#Nbr 55555555 124#3 124#' 124#2' 124#2 .ype 55555555555555555555555555555555 P2p P2p P2p P2p

Inter9ace 5555555555555555 2a0+3 2a0+' )i0+1 )i0+2

Topology !hange 6otification )PD?s


% %
4irect To!olo"y Cha "es 3 Is a cha "e that ca ,e detected o a switch i ter'ace0 I si" i'ica t To!olo"y Cha "es 3 8 users PC causes the li k to "o u! or dow . or(al ,ooti " or shutdow !rocess/0

T!6s: Direct Topology !hange


% %
Whe a ,rid"e eeds to si" al a to!olo"y cha "e+ it starts to se d TCNs o its root !ort0 Switch 8 detects li k dow 0 3 Re(o5es &,est 6P4:1 'ro( Root Port .this !ort is the ,est !ath to the Root 6rid"e/ 3 Ca Jt se d TCN out root !ort to Root ,rid"e0 3 Without :!li k'ast .co(i "/ Switch 8 ot aware o' a other !ath to root0 Switch C is aware o' dow li k a d se ds T!6 message out RP to Root 6rid"e0 Root 6rid"e se ds !onfig"ration )PD? with T!6 ,it set to let switches k ow o' co 'i"uratio cha "e0 8ll switches; 3 Shorte M8C address ta,les a"i " ti(e to Borward 4elay .1) seco ds/0 3 This 'lushes idle e tries0 Switch 8 waits to hear 'ro( Root 6rid"e0 Recei5es Co 'i" 6P4: o !re5iously ,locked !ort+ ew &,est 6P4:1+ this ,eco(es ew RP0 3 This ew RP will "o throu"h liste i "+ lear i " a d 'orwardi " states0 T!6 does not start a STP recalc"lation.

!onfig )PD? #oot Idle M8C e tries are 'lushed

T!6

D ,

% % %

' #P

6DP ()locking 6ew #P ()lockingE $isteningE $earningE Forwarding

% %

T!6s
%
Direct Topology !hange; Is a cha "e that ca ,e detected o a switch i ter'ace0 3 Ca ca take a,out ?$ seco ds o the a''ected switch .two ti(es 'orward delay/0 3 8ll switches 'lush idle e tries i M8C ta,le0 3 Solutio s; ?plinkfast *nsignificant Topology !hange; 8 users PC causes the li k to "o u! or dow . or(al ,ooti " or shutdow !rocess/0 3 No si" i'ica t i(!act ,ut "i5e e ou"h hosts switches could ,e i a co sta t state o' 'lushi " M8C address ta,les0 3 Causes u k ow u icast 'loods0 3 Solutio PortFast
Idle M8C e tries are 'lushed !onfig )PD? #oot Idle M8C e tries are 'lushed Idle M8C e tries are 'lushed Idle M8C e tries are 'lushed

T!6 #P

D ,
Idle M8C e tries are 'lushed

Idle M8C e tries are 'lushed

T!6 )PD?s
% % % %
?nderstanding Spanning-Tree Protocol Topology !hanges htt!;>>www0cisco0co(>war!>!u,lic><7?>170ht(l Re(e(,er that a TCN does ot start a STP recalculatio 0 This 'ear co(es 'ro( the 'act that TCNs are o'te associated with u sta,le STP e 5iro (e tsM TCNs are a co seEue ce o' this+ ot a cause0 The TCN o ly has a i(!act o the a"i " ti(eM it will ot cha "e the to!olo"y or create a loo!0

STP Spanning Tree Protocol


CIS 187 Multilayer Switched Networks CCNP SWITCH Rick Grazia i

You might also like