Spanning Tree V1.2. Objectives Understand the origin of loop and the solution Understand the working...
-
Upload
camron-spencer -
Category
Documents
-
view
222 -
download
3
Transcript of Spanning Tree V1.2. Objectives Understand the origin of loop and the solution Understand the working...
Spanning Tree
V1.2
Objectives
Understand the origin of loop and the solution Understand the working principle of STP
Course Outline
Origin of loop and solution Working principle of STP STP configuration
Redundant Topology
Segment 1
Segment 2
Server/host X Router Y
Segment 1
Segment 2
Server/host X Router Y
Broadcast
Switch A Switch B
Host X sends a Broadcast frame
Broadcast Storms
Segment 1
Segment 2
Server/host X Router Y
Broadcast
Switch A Switch B
Switch B forward Broadcast frame back to Switch A
Broadcast Storms
Segment 1
Segment 2
Server/host X Router Y
BroadcastSwitch A Switch B
Broadcast Storms
Switches continue to propagate broadcast traffic over and over
Multiple Frame Copies
Host X sends an unicast frame to router Y Router Y MAC address has not been learned by either switch yet
Segment 1
Segment 2
Server/host X Router Y Unicast
Switch A Switch B
Segment 1
Segment 2
Server/host XRouter Y
Unicast
Switch A Switch B
Unicast
Unicast
Multiple Frame Copies
Router Y will receive two copies of the same frame
Segment 1
Segment 2
Server/host X Router Y
Unicast Unicast
Switch A Switch B
Port 0
Port 1
Port 0
Port 1
MAC Database Instability
Host X sends an unicast frame to Router Y Router Y MAC Address has not been learned by either Switch y
et Switch A and B learn Host X MAC address on port 0
Segment 1
Segment 2
Server/host XRouter Y
Unicast Unicast
Switch A Switch B
Port 0
Port 1
Port 0
Port 1
MAC Database Instability
Frame to Router Y is flooded Switch A and B incorrectly learn Host X MAC address on port 1
Multiple Loop Problems
Complex topology can cause multiple loops to occur Layer 2 has no mechanism to stop the loop
Server/host
Workstations
Loop
Loop
Loop Broadcast
Solution: Spanning-Tree Protocol
Provides a loop free redundant network topology by placing certain ports in the blocking state
Blockx
Course Outline
Origin of loop and solution Working principle of STP STP configuration
x
Designated port (F) Root port (F)
Designated port (F) Non-designated port (B)
Root bridge Non-root bridgeSW Y
100baseT
10baseT
SW X
F: forwarding B: blocking
Spanning-Tree Operations
One root bridge per network One root port per non-root bridge One designated port per segment
Switch YDefault priority 32768 (8000 hex)MAC 0c0022222222
Switch XDefault priority 32768 (8000 hex) MAC 0c0011111111
BPDU
Spanning-Tree Protocol Root Bridge Selection
BPDU = Bridge protocol data unit (default = sent every 2 seconds)
Root bridge = Bridge with the lowest bridge ID Bridge ID = Bridge priority + bridge MAC address In the example, which switch has the lowest bridge ID?
BPDU
DMADMA LLC HeaderLLC HeaderSMASMA L/TL/T PayloadPayload
Link Speed Cost (reratify IEEE spec) Cost (previous IEEE spec)----------------------------------------------------------------------------------------------------10 Gbps 2 11 Gbps 4 1100 Mbps 19 1010 Mbps 100 100
Spanning-Tree Protocol Path Cost
Switch YMAC 0c0022222222Default priority 32768
Switch XMAC 0c0011111111Default priority 32768
Port 0
Port 1
Port 0
Port 1
Switch ZMac 0c0011110000Default priority 32768
Port 0
100baseT
100baseT
Spanning-Tree:
Can you figure out: Which is the root bridge? Which are the designated, non-designated, and root ports? Which are forwarding or blocking ports?
Switch YMAC 0c0022222222Default priority 32768
Switch XMAC 0c0011111111Default priority 32768
Port 0
Port 1
Port 0
Port 1
Switch ZMac 0c0011110000Default priority 32768
Port 0
100baseT
100baseT
Designated port (F)
Root port (F)
Non-designated port (BLK)Designated port (F)
Root port (F)
Spanning-Tree:
Port state
Port state capabilityDisabled N/A D or B
Blocking N/A D, receive B
no learning address
Listening N/A D , receive and send Bno learning address
Learning N/A D , receive and send Blearning address
Forwarding receive and send D and Blearning address
D: data B: BPDU
Port States TransferDisabledDisabled
ListeningListening
BlockingBlocking
ForwardingForwarding
LearningLearning
11 )) port enabledport enabled
22 )) port disabledport disabled
33 )) elected as RP or DPelected as RP or DP
44 ) ) elected as RP or DPelected as RP or DP 55 )) Forward DelayForward Delay
(( 11 )) (( 22 ))
(( 11 ,, 22 ))
(( 11 ,, 22 ))
(( 11 ,, 22 ))(( 11 ))
(( 22 ))(( 44 ))
(( 44 )) (( 55 ))
(( 44 ))(( 55 ))(( 33 ))
Blocking (20 sec)Listening (15 sec) Learning (15 sec)Forwarding
Spanning-Tree Port States
Spanning-tree transitions each port through several different state:
Switch YMAC 0c0022222222Default priority 32768
Switch XMAC 0c0011111111Default priority 32768
Port 0
Port 1
Port 0
Port 1
10baseT
xx
100baseT
Root Bridge
Designated port Root port (F)
Non-designated port (BLK)Designated portBPDUxx
MAXAGE
xxRoot bridgex
Spanning-Tree Recalculation
Spanning Tree Practice
Default priority=32768
MAC=0000.8c00.2101
Switch D
MAC=0000.8c00.9870
Switch E
MAC=0000.8c00.8955
Switch B
MAC=0000.8c00.1202
Switch C
MAC=0000.8c00.1201
Switch A
Course Outline
Origin of loop and solution Working principle of STP STP configuration
SSTP Configuration
zte# configurezte(config)# spanning-tree enable zte(config)# spanning-tree mode sstp
The default mode of ZXR10 T160G/T64G is MSTP. Whichever mode configured can be compatible and interconnected with other two modes .
RSTP
RSTP (Rapid Spanning Tree Protocol) provides higher convergence speed than STP (i.e. SSTP mode).
When the network topology is changing, the status of old redundant switch port can be transferred (From Discard to Forward) quickly in the case of point-to-point connection.
RSTP Port Type
STP port type RSTP port type
Designated Port Designated Port
Root Port Root Port
Disabled Port Disabled Port
Alternate Port
Backup Port
RSTP Port State
STP port state RSTP port state
Disabled Discarding
Blocking Discarding
Listening Discarding
Learning Learning
Forwarding Forwarding
Alternate And Backup Ports
D BA
D D
R R
Speed Up
Edge Port Handshake
MSTP
10,20,30 10,20
20,30
10
30 2010,30 10,30
MSTP The concept of instance and VLAN mirroring are added
in MSTP (Multiple Spanning Tree Protocol); SSTP mode and RSTP mode can both be considered to be instances of MSTP mode, namely, the case that only one instance 0 exists. MSTP mode also provides fast convergence and load balance in VLAN environment.
In SSTP and RSTP modes, there is no such kind of concept as VLAN, there is only one status for each port, namely, the forwarding statuses of ports in different VLANs are consistent. While in MSTP mode, there exist multiple spanning tree instances, the forwarding statuses of ports are different in different VLANs. Multiple independent subtree instances can be formed inside MST region to achieve load balance.
By default, MSTP is enabled
Per-VLAN STP And Instance
VLAN 10 topology
VLAN 20 topology
VLAN 30 topology
VLAN Instance
Default Instance 0
Switch A
Switch B
Fei_1/1
ZXR10(config)#interface fei_1/1ZXR10(config-if)#switchport mode trunkZXR10(config-if)#switchport trunk vlan 1-2ZXR10(config-if)#exitZXR10(config)#loop-detect interface fei_1/1 enable
ZXR10(config)#loop-detect interface fei_1/1 vlan 1-2 enable
ZXR10(config)#show loop-detect interface-detail fei_1/1isUp isMonitor isLoop isProtectedenable enable no disablenpNum portNum reopenTime counter1 24 600 158loopVlan vlanRange0 1 2
Interface Loop Protection
ZTE Ethernet Switch Ring
A
B
C
D
E
FMaster
TransitTransit
Transit
Transit
Transit
primary secondary
To F
LINK DOWN
LINK DOWN
Theory speed: 50ms
zesr add vlan 4094 xgei_4/1 xgei_4/2 MASTER standard zesr set healthtime 100 failtime 300
zesr add vlan 4094 xgei_4/1 xgei_4/2 TRANSIT standard
Summarization
Loop is easily formed whenever there is a redundant design
LAN switch runs STP to resolve loop problem STP uses BPDU to exchange information and
make decision Ports that enable STP will transfer to different
states according to current topology changing
Questions
How are unicast and broadcast packets processed by LAN switch?
How many STP port states there are? When and how will they transfer?
How is root bridge elected? And how about root port?
How to speed up the convergence? What is the role of BPDU?