You are on page 1of 40

Training objective

HUAWEI

Understand the background of the creation of the STP protocol UnderstandSTPworkingprinciple
Understand RSTP working principle

Use Huawei STP protocol commands skillfully

w w w .h u a w e i.com

Training content
HUAWEI

Applications of transparent network bridges; Whyintroduce spanning tree protocols? Spanning tree protocol working principle; Performance of spanning tree protocol; Whyintroduce fast spanning tree protocol Fast spanning tree protocol working principle; What are the differences between spanning trees and fast spanning trees? Configuration and common commands of spanning trees;

w w w .h u a w e i.com

Applications of Transparent Network Bridges
HUAWEI

Expand LAN ability Address information of free dynamic studying web site

A

B

C

D

Question:Ordinary transparent network bridges will not make any sign for forwarded messages. As a
result, if there is a loop in the network, messages might be forwarded circularly and continuously, leading to network congestion

w w w .h u a w e i.com

Occurrence of Path Loops
HUAWEI
A

LAN 1

B1

B2

B3

LAN 2
A'

w w w .h u a w e i.com

h u a w e i.Whyintroduce spanning tree protocol? HUAWEI Remove path loops that might exist in the bridging network by disconnecting redundant links Activate redundant backup links to restore network connection when the current active path fails LAN D ROOT LAN A LAN B LAN E LAN C w w w .com .

For eachLan, first select a bridge nearest to that network bridge as a designated bridge. For the network bridge.com . Select ports (designated ports) contained on the spanning tree except the root port. Calculate the shortest path fromthe local bridge to the root bridge.Basic principle of spanning tree protocol HUAWEI Basic idea: transmit special information among network bridges (configuration information) and contain the following information to do the following: Select one from all network bridges in the network to be used as the root bridge. to handle the data forward on its Lan. and the path given from this port wil be the optimal path from this bridge to the root bridge. w w w . select a root port.h u a w e i.

. (RootID.com .Contents of short messages HUAWEI Configuration message is also called bridge protocol data unit (BPDU) M a incontentincludes: Identifier of root bridge (Root ID) The smallest path cost from a designated network bridge to a root bridge (RootPathCost) Identifier of a designated network bridge Identifier of a designated port of a designated network bridge I. DesignatedPortID) w w w . RootPathCost.h u a w e i. DesignatedBridgeID.e.

com .HUAWEI Configuration message format Domain Seizure byte 2 1 1 1 8 4 8 2 2 2 2 2 Destination MAC address The destination address of a DMA configuration 0x0180c2000000 message is a fixed group broadcasting address Source MAC address Fixed link head Protocol ID of configuration Protocol version message BPDU type LLC Header Flag bit payload Root bridge ID 0x01000010 Root path cost BPDU data Designated bridge ID Designated port ID Message Age MaxAge HelloTime ForwardDelay The Frame source MAC SMA L/T length address is the MAC address of the bridge sending this configuration message w w w .h u a w e i.

This mainly includes: Select Root Port: if it is the root bridge itself. then the root port is 0. otherwise. otherwise. that overhead is the sum between the RootPathCost of optimal configuration message it receives and the overhead of the port that receives this configuration message Compare the configuration messages received from every port with its own configuration message to obtain the configuration message of the highest priority so as to replace its own configuration message.HUAWEI Processing configuration messages Select RootID of the root bridge : the RootID of the configuration messagewiththe highest priority Calculate the overhead of the shortest path to the root bridge RootPathCost: if it is the root bridge itself. the root port is the one that receives the optimal configuration message Select designated port: including other ports in the Forwarding status on the spanning tree Send new configuration message from a designated port w w w .com .h u a w e i. then the shortest path overhead is 0.

thenC1ispriortoC2 w w w .RootPathCost.butiftheTransm itIDo fC 1isless th a nC 2 .com .andTransim itId of C1andC2arethesame.thenC1is priortoC2 If RootIDandRootPathCostofC1andC2arethesame.butif thePortIDofC1 islessthanC2.HUAWEI Configuration message priority comparison rules: How to determine the optimal configuration message? Assume there are two configuration messages C1 and C2. then: If RootIDofC1islessthanRootIDofC2. th e nC 1ispriortoC2 If RootID.h u a w e i.butiftheRootPathCostofC1islessthanC2.thenC1ispriortoC2 If RootIDofC1andC2isthesam e .

90 Select Port4 as the root port according to the priority of the configuration message received.12. select Port1 and Port2 as designated ports.13.125 41.19.315 Port4 Port5 Blocking 41.com . Send new configuration messages from Port1 and Port2: (41.81 41.h u a w e i. and meanwhile block Port3 and Port5.HUAWEI An instance of receiving and processing configuration messages Port1 B92 Port2 Port3 Blocking 81.12. among of them: RootId = 41 RootPathCost = 12+1 = 13 RootPort = Port4 w w w . 92). 13.111 41.0.

h u a w e i.What to do if links fail? HUAWEI Hello Time Thenetworkbridgecyclicallysendsconfigurationm e s s a g e sfromad e s ignatedportatthe period ofHello Time Message Age and Max Age Configuration messages stored at a port have aMessage Age field.andwil start fa ilureprocessing w w w .W h e nth em e s s a g ea g er e a c h e st h e Max Age andwhennoconfigurationmessagewhateverisreceivedinaperiodof tim e . thenetworkbridgewil regarditasfailureonthelinksconnectedtothisport.itsow nc o n figurationm e s s a g eisupdated.w h ichgrows proportionallyw ithtim e .Eachtim eo n ec o n figurationm e s s a g ew ithashorterm e s s a g ea g eis received.com .

12.12.315 41.90 w w w .13.h u a w e i.13.Processing I of link fault HUAWEI When the message age of the configuration message of Port4 is timeout. and a new spanning tree are calculated. while the Port1 Port5 configuration message of network bridge 92 B92 Blocking Port2 remains unchanged Port3 41.13. this configuration message is abandoned.92 41.92 41.111 41.92 Port4 41.com . so as to select Port3 as the new root port.13.

this configuration message is abandoned.12.h u a w e i.14.12.14.92 41.Processing II of link fault HUAWEI When the message age of the configuration message of Port3 is timeout.90 w w w .92 41.13.com .92 41.315 41. so as to select Port5 Port1 as the new root port. while the Port5 configuration message B92 of network bridge 92 Port2 ,14 , ) changes to (41 92 Port4 Port3 41.92 41. and a new spanning tree are calculated.111 41.14.14.

13.315 92.111 92.Processing III of link fault HUAWEI When the message age of the configuration message of Port5 is timeout.0.com . and it is taken itself as the root bridge to send the configuration message (92,0,92) till a Port1message of Port5 configuration a higher priority is B92 received from any port Port2 Port3 92.92 92.12.92 41.0.h u a w e i.12.92 w w w .0.0.90 92.92 Port4 41.92 41. this configuration message is abandoned.0.

Before all bridges get the message of this change. new configuration messages are broadcast to the whole network only after a certain delay. temporary loops might exist. if ports at the Forwarding status in the original topology structure have not realized that they should stop forward.h u a w e i.com .Problems of temporary loops HUAWEI When the topology structure changes.ing in the new topology. if ports blocked in the original topology structure have not realized that they should w w w .

HUAWEI How to avoid temporary loops? Ports will go through a certain delay to change from the blocked status to the Forwarding status. This time should at least be twice the maximum time for configuration messages to be broadcast to the whole network Forward Delay: Maximum delay for configuration message to be broadcast to the whole network Design interim status: ports at the interim status merely learns address info of sites.h u a w e i.com . but does not forward any data Ports enter the interim status from the blocked stat after the Forward Delay. Then enter the Forwarding status after the Forward Delay w w w .

receivebutnot transferBPDUs.h u a w e i.receiveand transferBPDUs.receiveand transferBPDUs.andlearnaddresses Forwarding w w w .butnotlearnaddresses Not receive/forwarddata.receiveand transferBPDUs.Statuses of ports HUAWEI Portstatus D isabled Blocking Listening Learning Port ability Notreceive/sendanymessage Not receive/forwarddata.andstarttolearnaddresses Receiveandforwarddata.com .andnotlearnaddresses Not receive/forwarddata.

h u a w e i.2) Listening (3) (4) (1) Blocking (2) (4) Forwarding (1.Port status shift HUAWEI Disabled (1) (2) (1.2) (5) 1) port enabled 2) port disabled 3) port is selected as root port or designated port 4) port is selected as backup port ( blocked) 5) Forward Delay w w w .2) (5) (4) Learning (1.com .

com . There are two ages in the spanning tree protocol: A longer survival age is used when the topology is stable A shorter age is used when the topology changes When the topology changes. So the topology change info should be broadcast to the whole network w w w . so tha the MAC address info the network bridge originally learnt might be incorrect.h u a w e i. not all network bridges will discover this change. the address info is then discarded. So. and if the address is not proven to be correct within this age.HUAWEI Age of MAC address information Topology structure change can enable shifts of the relative position of sites in the spanning tree. the learnt MAC address info should also have an age.

com .h u a w e i.HUAWEI The relative position of sites change LAN D B4 3 B1 1 ROOT 2 LAN B LAN E LAN A B2 LAN C B3 w w w .

h u a w e i.com .HUAWEI Broadcast of topology change message ROOT B B B B Topology change notic message Topology change respo message Topology change mess B w w w .

so after change of network topology structure. it takes at least twice the Forward Delay to restore connectivity Using a single spanning tree instance in the whole switching network might lead to a N o te:networkdiametermeansthatthe longer convergence m a x im u mv a lueof quantityofswitchpass time and more frequent com m u n ication between randomtwoterminal topology changes.com .h u a w e i.HUAWEI Inadequacy of spanning tree protocol It takes a port twice the Forward Delay to change from the blocked status to the Forwarding status. it is w w w . In switching networks that devices use a single spanning tree.

and shares the same basic concepts.h u a w e i. A fast spanning tree has all functions of a spanning tree.com .Fast spanning tree protocol HUAWEI The fast spanning tree protocol evolved from the spanning tree protocol. The purpose of improving a fast spanning tree is to try to restore network connectivity as soon as possible when the network topology structure changes w w w .

anewrootportcan im m e d iatelyentertheForwardingstatus.iftheoriginalroot porthasenteredtheTbl ockedstatus.HUAWEI Improvement I of fast spanning trees Inth en e wtopologystructure.com .h u a w e i.andthedesignatedport O ROOT oftheoppositesidesw itchconnectedtothenewrootportis intheForwardingstatus LAN A F Designated port LAN A F Designated port LAN A F Designated port LAN A TO ROOT LAN A F Designated port LAN A Rootport F Root port F w w w .

HUAWEI Improvement II of fast spanning trees The designated port can make a handshake with the connected bridge so as to enter the Forwarding status quickly LAN TO ROOT A F Designated port Handshake request Handshake response LAN B Rootroot w w w .h u a w e i.com .

F Designated port LAN A LAN A Designated D port LAN B D Designated port LAN C Non-point to point link Handshake diffusion w w w .Attention! HUAWEI Two points for attention: Handshakes must occur on point to point links.com . and w il continue to initiate handshakes to adjacent bridges.h u a w e i. the non-edge designated port of the responding bridge wil change into the discarding status. After the first handshake.

those directly connected to terminals but not to other bridges can directly enter the forwarding status. withoutLAN any delay.HUAWEI Improvement III of fast spanning trees Ports at the edge of a network.h u a w e i. i.com .. A TO ROOT LAN A LAN A Rootport F Edge port LAN A w w w .e.

For instance. i.h u a w e i. and without transfer of any configuration message. and spreads to bridges at the other edge of the network.HUAWEI Performance of fast spanning tree Effect of the first improvement: it takes only several microsends from finding topology change to restoring connectivity.e. w w w . 6 handshakes are required. Effect of the second improvement: network connectivity can be restored within the time when two configuration messages are exchanged. the handshake delay.. in the worst case. network connectivity is restored only after handshake starts from one side of the network. when the network diameter is 7.com Effect of the third improvement: edge port status .

Itisrecommendedtokeepthe networkdiameterlessthan7 w w w .HUAWEI What are the differences between spanning trees and fast spanning trees? Different in protocol versions Different in port status change mode Different in configuration message format Different in broadcasting modes of topology change messages N o te: afastspanningtreealsousesasinglespanningtreeinstanceinwhole s w itchingnetwork.com .andcannotsolvetheperformancedeteriorationproblem causedbyenlargementofnetworkscope.h u a w e i.

thencommandscanbeusedtoclosethe s p a n n ingtreefunctionofthisport: Q u idway(config-if-ethernet0/1)#spanning-treedisable W ecanalsoclosethespanningtreefunctionofaswitchaccordingtorequirem e n ts.ifpathloopspossiblyexistinnetwork.Configure spanning tree HUAWEI S p a n n ingtreefunctionisclosedindefaultinaswitch.orstartthe s p a n n ingtreefunctionofaport w w w . : com m a n d ss h o u ldbeusedtostartthespanningtreefunction Q u idway(config)#spanning-treeenable Ifitiscertainthatnoloopsexistinconnectionsataport.h u a w e i.com .

HUAWEI Configurable parameters of a spanning tree Configurable parameters of a spanning tree include: Bridge priority Port priority Path cost of a link corresponding to the port Three important timer parameters:HelloTime/Max Age/ForwardDelay BridgeDiameter of whole switched network w w w .h u a w e i.com .

HUAWEI Default values of configurable parameters Parameter name Default value 32768 Domain 0-61440 (step length:4096) Configuration mode Whole office configuration mode Interface configuration mode Interface configuration mode Whole office configuration mode Whole office configuration mode Whole office configuration mode Whole office configuration mode BridgePriority PortPriority PortPathCost Max Age Hello Time Forward Delay Bridge Diameter 128 0-1024 (step length:16) 200.com . or at a group of ports w w w .h u a w e i.000.000 20s 2s 15s 7 1-200.000 6-40 1-10 4-30 ----- Note: parameters in the interface configuration mode can be configured either at a specific port.

However.h u a w e i. the switch with the smallest MAC address is selected as the root bridge. then according to the configuration message contrast rule.HUAWEI Select a suitable root bridge through configuration Network bridge ID consists of two parts: BridgePriority+BridgeMacAddress If all switches in the network are in default configuration.com Quidway(config)#spanning-tree priority [value] . commands can be used to configure the Bridge Priority so as to elect a suitable switch to be the root bridge w w w . So. this switch is maybe not an ideal root bridge.

000-20.000 1-200.000 1-200.000 200.000 2.000.000 2. 0 0 0 20.000 1-200.000 w w w .000 1-200.000. 0 0 0 .000-200.000 1-200.000 1-200.000. 0 0 0 2.000-200.000 2 0 .000.000.000 1-200.000.000.000 200-20.0002.000.000.000 1-200.000-2.h u a w e i.000.000.000.000 2 0 0 .Configuration port overhead HUAWEI Theportoverheadsumofallportsthatpassthroughthepathfromthelocalnetworkbridgetothe rootbridgeisthe"rootpathoverhead".000.000-200.000 200 20-2000 2 0 2-200 2 1-20 1-200. 0 0 020.000.000.000 1Mb/s 10Mb/s 100Mb/s 1Gb/s 10Gb/s 100Gb/s 1Tb/s 10Tb/s 20.000.com .000.andcommandscanbeusedtochangethevalueofport overhead Q u idway(config -if-ethernet0/1)#spanning-tree pathcost [value] V a l u e d o m a i n Link rate Recommended Recommended domain value <=100Kb/s 2 0 0 .

h u a w e i.Configuration port priority HUAWEI According to the configuration message contrast rule. port ID sometimes will be compared Port ID consists of two parts: PortPriority+PortID.com . the port priority part is configrable: Quidway(config-if-ethernet0/1)#spanning-tree LAN priority [value] Parallel link Multiple ports connected to one network segment w w w .

h u a w e i. w w w . thus increasing CPU and network load. shorter hello time will cause sending configuration messages frequently .com . shorter hello time can increase the robustness of spanning trees when the message loss rate is high. But longer hello time will cause wrong judgment of link failure.HUAWEI Configure the Hello Time of the port Configuration of hello time requires attention to the following: Longer hello time can reduce the overhead of spanning tree calculations.

Too short a Max Age will let the switch wrongly take it as link failure during network congestion. Command format Quidway(config)#spanning-tree maxage [value] w w w .HUAWEI Max Age of configuration port Configuration of max age requires attention to the following: Too long a Max Age will cause link failure to fail to be detected in time.h u a w e i. leading to frequent spanning tree recalculations.com .

Too short a Forward Delay will introduce temporary path loops when the topology changes.and theunitoftimeparameterissecond.h u a w e i. Note:configurationofparam e tersaboveareallinwholeglobal Command format: confi guration m ode. Quidway(config)#spanning-tree forwarddelay [value] w w w .com .HUAWEI Forward Delay of configuration port Configuration of forward delay requires attention to the following: Too long a Forward Delay will cause too slow a spanning tree convergence.

adding switches to the network can adapt to network status by changing the network w w w . . And such impact is more objective than direct manual configuration of the two parameters So.h u a w e i.com diameter parameter.HUAWEI Configuring network diameter Bridge Diameter Network diameter is defined as: Maximum switches passed between any two terminal devices Change of network diameter can indirectly affect the values of two parameters: Max Age and Forward Delay.