Vous êtes sur la page 1sur 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

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

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 .h u a w e i.com

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; Calculate the shortest path fromthe local bridge to the root bridge; For eachLan first select a bridge nearest to that network bridge as a designated bridge, to handle the data forward on its Lan; For the network bridge, select a root port, and the path given from this port wil be the optimal path from this bridge to the root bridge; Select ports (designated ports) contained on the spanning tree except the root port.

w w w .h u a w e i.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.e., (RootID, RootPathCost, DesignatedBridgeID, DesignatedPortID)
w w w .h u a w e i.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.com

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, then the shortest path overhead is 0; 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. 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

Configuration message priority comparison rules:

How to determine the optimal configuration message?

Assume there are two configuration messages C1 and C2, then:


If RootIDofC1islessthanRootIDofC2,thenC1ispriortoC2 If RootIDofC1andC2isthesam e ,butiftheRootPathCostofC1islessthanC2,thenC1is priortoC2 If RootIDandRootPathCostofC1andC2arethesame,butiftheTransm itIDo fC 1isless th a nC 2 , th e nC 1ispriortoC2 If RootID,RootPathCost,andTransim itId of C1andC2arethesame,butif thePortIDofC1 islessthanC2,thenC1ispriortoC2

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

HUAWEI

An instance of receiving and processing configuration messages


Port1 B92 Port2 Port3 Blocking 81,0,81 41,19,125 41,12,315 Port4 Port5 Blocking

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

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

Processing I of link fault


HUAWEI

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

Processing II of link fault


HUAWEI

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

Processing III of link fault


HUAWEI

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

Problems of temporary loops


HUAWEI

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

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

Portstatus D isabled Blocking Listening Learning

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

Port status shift


HUAWEI
Disabled (1) (2) (1,2) Listening (3) (4) (1) Blocking (2) (4) Forwarding (1,2) (5) (4) Learning (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 .h u a w e i.com

HUAWEI

Age of MAC address information


Topology structure change can enable shifts of the relative position of sites in the spanning tree, so tha the MAC address info the network bridge originally learnt might be incorrect. So, the learnt MAC address info should also have an age, and if the address is not proven to be correct within this age, the address info is then discarded. 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, 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

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

Topology change notic message Topology change respo message Topology change mess

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

HUAWEI

Inadequacy of spanning tree protocol

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

Fast spanning tree protocol


HUAWEI

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

Improvement I of fast spanning trees

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

F Designated port LAN A

Rootport F

Root port F

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

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

F Designated port

Handshake request Handshake response

LAN B

Rootroot

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

Attention!
HUAWEI

Two points for attention:


Handshakes must occur on point to point links. After the first handshake, the non-edge designated port of the responding bridge wil change into the discarding status, and w il continue to initiate handshakes to adjacent bridges.
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 .h u a w e i.com

HUAWEI

Improvement III of fast spanning trees

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

Performance of fast spanning tree

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

Configure spanning tree


HUAWEI

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

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

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, 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]

Configuration port overhead


HUAWEI

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

1Mb/s 10Mb/s 100Mb/s 1Gb/s 10Gb/s 100Gb/s 1Tb/s 10Tb/s

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

1-200,000,000 1-200,000,000 1-200,000,000 1-200,000,000 1-200,000,000 1-200,000,000 1-200,000,000 1-200,000,000

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

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

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; 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; shorter hello time will cause sending configuration messages frequently , thus increasing CPU and network load.
w w w .h u a w e i.com

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; Too short a Max Age will let the switch wrongly take it as link failure during network congestion, leading to frequent spanning tree recalculations.

Command format
Quidway(config)#spanning-tree maxage [value]
w w w .h u a w e i.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; Too short a Forward Delay will introduce temporary path loops when the topology changes.
Note:configurationofparam e tersaboveareallinwholeglobal Command format: confi guration m ode,and theunitoftimeparameterissecond.

Quidway(config)#spanning-tree forwarddelay [value]


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

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. 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.

Vous aimerez peut-être aussi