SAT07 STP
SAT07 STP
HUAWEI
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
Expand LAN ability Address information of free dynamic studying web site
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
LAN 1
B1
B2
B3
LAN 2
A'
w w w .h u a w e i.com
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
LAN E
LAN C
w w w .h u a w e i.com
w w w .h u a w e i.com
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.e., (RootID, RootPathCost, DesignatedBridgeID, DesignatedPortID)
w w w .h u a w e i.com
HUAWEI
Destination MAC address The destination address of a DMA configuration 0x0180c2000000 message is a fixed group broadcasting address
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.com
HUAWEI
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. This mainly includes:
Select Root Port: if it is the root bridge itself, then the root port is 0; otherwise, 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 .h u a w e i.com
HUAWEI
w w w .h u a w e i.com
HUAWEI
41,12,111
41,13,90
Select Port4 as the root port according to the priority of the configuration message received, select Port1 and Port2 as designated ports, and meanwhile block Port3 and Port5. Send new configuration messages from Port1 and Port2: (41, 13, 92), among of them: RootId = 41 RootPathCost = 12+1 = 13 RootPort = Port4
w w w .h u a w e i.com
Hello Time
Thenetworkbridgecyclicallysendsconfigurationm e s s a g e sfromad e s ignatedportatthe period ofHello Time
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,itsow nc o n figurationm e s s a g eisupdated.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,andwil start fa ilureprocessing
w w w .h u a w e i.com
When the message age of the configuration message of Port4 is timeout, this configuration message is abandoned, and a new spanning tree are calculated, so as to select Port3 as the new root port, while the Port1 Port5 configuration message of network bridge 92 B92 Blocking Port2 remains unchanged
Port3 41,13,92 41,13,92 Port4 41,12,315 41,12,111 41,13,92 41,13,90
w w w .h u a w e i.com
When the message age of the configuration message of Port3 is timeout, this configuration message is abandoned, and a new spanning tree are calculated, 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,14,92 41,14,92 41,12,315 41,14,92 41,12,111 41,14,92 41,13,90
w w w .h u a w e i.com
When the message age of the configuration message of Port5 is timeout, this configuration message is abandoned, and it is taken itself as the root bridge to send the configuration message (92092) till a Port1message of Port5 configuration a higher priority is B92 received from any port Port2
Port3 92,0,92 92,0,92 Port4 41,12,315 92,0,92 41,12,111 92,0,92 41,13,90 92,0,92
w w w .h u a w e i.com
When the topology structure changes, new configuration messages are broadcast to the whole network only after a certain delay. Before all bridges get the message of this change,
if ports at the Forwarding status in the original topology structure have not realized that they should stop forward- ing in the new topology, temporary loops might exist; if ports blocked in the original topology structure have not realized that they should
w w w .h u a w e i.com
HUAWEI
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, 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 .h u a w e i.com
Statuses of ports
HUAWEI
Port ability Notreceive/sendanymessage Not receive/forwarddata,receivebutnot transferBPDUs,andnotlearnaddresses Not receive/forwarddata,receiveand transferBPDUs,butnotlearnaddresses Not receive/forwarddata,receiveand transferBPDUs,andstarttolearnaddresses Receiveandforwarddata,receiveand transferBPDUs,andlearnaddresses
Forwarding
w w w .h u a w e i.com
1) port enabled 2) port disabled 3) port is selected as root port or designated port
w w w .h u a w e i.com
HUAWEI
When the topology changes, not all network bridges will discover this change. So the topology change info should be broadcast to the whole network
w w w .h u a w e i.com
HUAWEI
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
Topology change notic message Topology change respo message Topology change mess
w w w .h u a w e i.com
HUAWEI
It takes a port twice the Forward Delay to change from the blocked status to the Forwarding status, 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. In switching networks that devices use a single spanning tree, it is w w w .h u a w e i.com
The fast spanning tree protocol evolved from the spanning tree protocol, and shares the same basic concepts; A fast spanning tree has all functions of a spanning tree; 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 .h u a w e i.com
HUAWEI
Inth en e wtopologystructure,anewrootportcan im m e d iatelyentertheForwardingstatus,iftheoriginalroot porthasenteredtheTbl ockedstatus,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
Rootport F
Root port F
w w w .h u a w e i.com
HUAWEI
The designated port can make a handshake with the connected bridge so as to enter the Forwarding status quickly LAN
TO ROOT
F Designated port
LAN B
Rootroot
w w w .h u a w e i.com
Attention!
HUAWEI
Designated D port
LAN B
D Designated port
LAN C
w w w .h u a w e i.com
HUAWEI
Ports at the edge of a network, i.e., those directly connected to terminals but not to other bridges can directly enter the forwarding status, withoutLAN any delay. A
TO ROOT
LAN A
LAN A
Rootport
F
Edge port
LAN A
w w w .h u a w e i.com
HUAWEI
Effect of the first improvement: it takes only several microsends from finding topology change to restoring connectivity, and without transfer of any configuration message. Effect of the second improvement: network connectivity can be restored within the time when two configuration messages are exchanged, i.e., the handshake delay; in the worst case, network connectivity is restored only after handshake starts from one side of the network, and spreads to bridges at the other edge of the network. For instance, when the network diameter is 7, 6 handshakes are required. w w w .h u a w e i.com Effect of the third improvement: edge port status
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,andcannotsolvetheperformancedeteriorationproblem causedbyenlargementofnetworkscope.Itisrecommendedtokeepthe networkdiameterlessthan7
w w w .h u a w e i.com
S p a n n ingtreefunctionisclosedindefaultinaswitch;ifpathloopspossiblyexistinnetwork, com m a n d ss h o u ldbeusedtostartthespanningtreefunction Q u idway(config)#spanning-treeenable Ifitiscertainthatnoloopsexistinconnectionsataport,thencommandscanbeusedtoclosethe s p a n n ingtreefunctionofthisport: Q u idway(config-if-ethernet0/1)#spanning-treedisable W ecanalsoclosethespanningtreefunctionofaswitchaccordingtorequirem e n ts,orstartthe s p a n n ingtreefunctionofaport
w w w .h u a w e i.com
HUAWEI
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
BridgePriority PortPriority PortPathCost Max Age Hello Time Forward Delay Bridge Diameter
128 0-1024 (step length:16) 200,000 20s 2s 15s 7 1-200,000,000 6-40 1-10 4-30 -----
Note: parameters in the interface configuration mode can be configured either at a specific port, or at a group of ports
w w w .h u a w e i.com
HUAWEI
If all switches in the network are in default configuration, then according to the configuration message contrast rule, the switch with the smallest MAC address is selected as the root bridge. However, this switch is maybe not an ideal root bridge. So, commands can be used to configure the Bridge Priority so as to elect a suitable switch to be the root bridge
w w w .h u a w e i.com Quidway(config)#spanning-tree priority [value]
Theportoverheadsumofallportsthatpassthroughthepathfromthelocalnetworkbridgetothe rootbridgeisthe"rootpathoverhead",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 , 0 0 0 , 0 0 020,000,000-200,000,000 1-200,000,000
20,000,0002,000,000-200,000,000 2,000,000 200,000-20,000,000 2 0 0 , 0 0 0 20,000-2,000,000 2 0 , 0 0 0 2,000-200,000 2,000 200-20,000 200 20-2000 2 0 2-200 2 1-20
w w w .h u a w e i.com
According to the configuration message contrast rule, port ID sometimes will be compared Port ID consists of two parts: PortPriority+PortID, 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.com
HUAWEI
HUAWEI
Command format
Quidway(config)#spanning-tree maxage [value]
w w w .h u a w e i.com
HUAWEI
HUAWEI
Change of network diameter can indirectly affect the values of two parameters: Max Age and Forward Delay. And such impact is more objective than direct manual configuration of the two parameters So, adding switches to the network can adapt to network status by changing the network w w w .h u a w e i.com diameter parameter.