Você está na página 1de 26

HANDS-ON-WORKSHOP

Section 2: Introduction to network resilience

Spanning Tree Protocol concepts and configuration


STP / RSTP : Table of Contents

» Spanning Tree Concepts


» Spanning Tree- Algorithm
» Spanning Tree Parameters
» Rapid Spanning Tree
» Spanning Tree Configuration
» Introduction to Multiple Spanning Tree

slide 2
Spanning Tree - Concepts

► Ethernet does not inherently cope with looped network paths. There must be only one
active path between two devices. (Except when setting up aggregation links)

slide 3
What are the consequences of a loop?
Send a
2 identicalto
response
Bravo Segment packets???A
computer

A B
MAC
MAC Address
Address Table
Table
Source
Source Destination
Destination
Both
Computer
computersA
Port 2 Port 2
68-C9-CF-E0-AB-13
68-C9-CF-E0-AB-13 Port
Port 11 has moved!
have moved
68-C9-CF-E0-AB-13
68-C9-CF-E0-AB-13 Port
Port 22 1A-2B-3C-4D-5E-6F

Port 2
1A-2B-3C-4D-5E-6F
L2 Switch A
A
A
A A
A
A
68-C9-CF-E0-AB-13
A MAC Address Table
Send data Port 1 L2 Switch
to computerPort
B 1 Port 1 Port 1 Source Destination
1A-2B-3C-4D-5E-6F
68-C9-CF-E0-AB-13 Port 1

Duplicate 68-C9-CF-E0-AB-13 Port 2


packets from A 1A-2B-3C-4D-5E-6F Port 2
computer B A A
68-C9-CF-E0-AB-13 Port 1

Alpha Segment 1A-2B-3C-4D-5E-6F Port 1

Duplicate packets
returned to 68-C9-CF-E0-AB-13
sender

slide 4
Spanning Tree - Concepts

» The Spanning Tree protocol


allows a topology with
redundant links.
» This means that there can be
link redundancy for dealing
with a link
or hardware failure.
» Only one path is active at a
given moment. Inactive link that can become
active if another one fails.

slide 5
Spanning Tree - Algorithm
Root Bridge Root Bridge
Switch C Switch C
P2 P1 P2 P1
Switch A Switch A
P1 P1
P3 P2 P3 P2

P1 P1
P2 P2
P3 P3
P2 P1 P2 P1
Switch B Switch B
P4 P4 P4 P4
P3 Switch D P3 Switch D

P1 P1 P1
P1
P2 P2
P2 P2
Switch F P3 Switch F P3
Switch E Switch E

Complete network topology Loop-free “tree” topology of active links calculated by spanning tree

slide 6
Spanning Tree Structure

Root Bridge

Designated Port
Designated Port

Root Port

Root Port Designated


Port
Designated Designated Port
Port
Root Port Root Port

Root Port Root Port

slide 7
Port states for STP

► Blocking
» Rejects all data frames
» Does not learn MAC addresses.
» Receives BPDUs but ignores them.
» Does not transmit BPDUs.
» Receives and processes topology change notifications (TCN).
► Listening
» Rejects all data frames
» Does not learn MAC addresses.
» Receives BPDUs and processes them.
» Does not transmit BPDUs.
» Receives and processes topology change notifications (TCN).

slide 8
Port states for STP

► Learning
» Rejects all data frames
» Learns MAC addresses and includes them in the FDB.
» Receives, processes and transmits BPDUs.
» Receives and processes topology change notifications (TCN).

► Forwarding
» Switches data frames.
» Learns MAC addresses and includes them in the FDB.
» Receives, processes and transmits BPDUs.
» Receives and processes topology change notifications (TCN).

slide 9
Spanning Tree - Operation
MAC Address Table
Source Destination Bravo Segment
Port 2
68-C9-CF-E0-AB-13
1A-2B-3C-4D-5E-6F 1 A
A B Personal Computer
1A-2B-3C-4D-5E-6F Port 2 1A-2B-3C-4D-5E-6F

Listening
Port 2 Learning
Learning
Priority MAC
MAC Address
Address Priority Cost Designated Port 2 Priority MAC
MAC Address
Address Priority
Priority Cost
32768 Forwarding
Forwarding
20000 A7-8E-5F-51-0B-7C
A7-8E-5F-51-0B-7C 2/128 2/0 Port 32768 5F-00-03-DE-B1-9A
5F-00-03-DE-B1-9A 2/128
2/128 2/20
A
Root Bridge
Switch A Switch B
Root Port
Priority MAC Address Priority Cost Port 1 Priority MAC Address Priority Cost
32768 Port 1
20000 A7-8E-5F-51-0B-7C 1/128 1/0 Designated Port 32768 5F-00-03-DE-B1-9A 1/128 1/10

A
A
A
A MAC
MAC Address
Address Table
Table
Source
Source
Source
Source Destination
Destination
Destination
Destination
Personal Computer Alpha Segment
68-C9-CF-E0-AB-13 68-C9-CF-E0-AB-13
68-C9-CF-E0-AB-13 Port
Port
Port 111
Port 2

1A-2B-3C-4D-5E-6F Port 22
Port

slide 10
Spanning Tree - Concepts

► Switch Spanning Tree parameters


» Bridge priority: value between 0 and 65535. 0 is the highest priority. The switch with the highest
priority is selected as root bridge. If several switches have the same priority, the one with the lowest
MAC address is selected as root bridge. Default value is 32768.
» Bridge Hello Time: Frequency of sending BPDUs ( Bridge Protocol Data Unit), Spanning Tree
configuration messages. The value can be between 1 and 10 sec. Default value is 2 sec.
» Bridge Maximum Age : Lifespan of STP information exchanged via BPDU. After the specified deadline,
the switch recalculates the data. The value can be set from 6 and 40 sec. Default value is 20 sec.
» Bridge Forward Delay : Waiting time before a change in topology becomes effective (for instance,
activation of a previously inactive path). Default value is 15 sec. This parameter avoids temporary
loops appearing when paths are activated.
► Today it is recommended not to change any of those values (to improve recovery times, one
should consider using RSTP nowadays)

slide 11
Spanning Tree - Concepts
Forwarding
► The link with the lowest cost to the root Root Bridge Blocking
bridge is activated for each switch.
► If several paths have an equal cost to the
root bridge, a priority value, on each
port, is used to decide between them. If
port priorities are identical, then port
numbers, or MAC addresses assigned to Bridge priority = 4096
them, are the key factor (lowest port
numbers or MAC addresses).
Bridge priority
► Rapid Spanning Tree (802.1w) offers all = 32768
the benefits of Spanning Tree (802.1d)
Cost = 19
with a much shorter convergence time Priority = 128 Cost = 19
(path calculation). It is therefore Priority = 128
preferable. Cost = 19 Cost = 19
Priority = 128 Priority = 128 Bridge priority
= 32768

slide 12
Rapid Spanning Tree - Differences

► The Rapid Spanning Tree (802.1w) offers a number of improvements, particularly:


» Significant improvement in convergence time
» A change of state on a port used to connect a terminal device does not involve
convergence, unlike standard STP (Edge Port or Portfast concept)
» Backwardly compatible with STP

slide 13
Role of ports for RSTP

» In standard Spanning Tree, switch ports have three possible


roles:
» Root port – closest port (metrically) to the Root Bridge
» Designated port – active port of a given segment
» Disabled port – for a deactivated port

» The RSTP adds two further roles:


» Alternate ports – alternate path to Root Bridge
» Backup ports – alternate path to a segment currently served by
a Designated port
slide 14
Role of ports for RSTP

Root Bridge

RP RP

DP
DP DP Backup Port

RP
Root Port RP
Alternate Port

slide 15
Port state for RSTP

State Meaning
DISABLED RSTP is disabled on this port
DISCARDING Rejects all data frames
Does not learn MAC addresses.
Receives BPDUs and processes them.
Does not transmit BPDUs.
Receives and processes topology change notifications (TCN).
LEARNING Rejects all data frames
Learns MAC addresses and includes them in the FDB.
Receives, processes and transmits BPDUs.
Receives and processes topology change notifications (TCN).
FORWARDING Switches data frames.
Learns MAC addresses and includes them in the FDB.
Receives, processes and transmits BPDUs.
Receives and processes topology change notifications (TCN).

slide 16
Rapid Spanning Tree - Edge Port/PortFast

» In Rapid Spanning Tree, it is possible to treat ports used to interconnect switches (contributing
to Spanning Tree operation) differently from the ports intended to connect terminal
equipment (Edge ports, or PortFast).
» The ports configured in Edge/PortFast mode will still be monitored by the Spanning Tree
algorithm, but a status change does not involve convergence. For these ports this gives
immediate access to the network on connection.
» Only ports used to connect end devices must be configured in Edge mode. If the BPDUs are
detected on these ports, the switch automatically deactivates Edge/PortFast mode and makes
them operate as normal RSTP ports.
» It is strongly recommended to set ports used to connect end devices in Edge/PortFast mode.
Failure to do so will cause disruptive topology change events in the network every time an
edge device is turned on or off.

slide 17
RSTP Topology Change Mechanism

Root

slide 18
Port cost values
Port bandwidth Default path cost Recommended values

Below 100 kb/s 200,000,000 20,000,000-200,000,000

1Mbps 20,000,000 2,000,000-20,000,000

10Mbps 2,000,000 200,000-2,000,000

100 Mbps 200,000 20,000-200,000

1 Gbps 20,000 2,000-20,000

10 Gbps 2,000 200-2,000

100 Gbps 200 20-200

1Tbps 20 2-200

10 Tbps 2 2-20

slide 19
Spanning Tree configuration
Spanning Tree

► Rapid Spanning Tree is activated


Forwarding
by default on all ports of the Bridge priority = 32768
Blocking
00-00-cd-24-03-31
switch. Therefore, nothing
needs to be done to have the
following behavior. Root Bridge
Bridge priority = 32768 Bridge priority = 32768
00-00-cd-24-02-26 00-00-cd-12-78-08
► As all switches have the same
configuration, it is the switch
with the lowest MAC address
that becomes the root bridge.

slide 21
Spanning Tree
» To explicitly force a switch to be
Root Bridge, you simply need to Root Bridge Passing
Blocking
change the priority. Bridge priority = 8192
00-00-cd-24-03-31

» This operation takes place in Config


Bridge priority = 32768
mode: 00-00-cd-24-02-26
Bridge priority = 32768
00-00-cd-12-78-08

awplus(config)# spanning-tree priority 8192

slide 22
Spanning Tree

» To change the default cost of a port (refer to the RSTP port cost table):
awplus(config-if)# spanning-tree path-cost <cost>
» To improve convergence time, it is essential to configure all ports intended to connect
end devices as "Portfast" ports:
awplus(config)# interface port1.0.1-1.0.23
awplus(config-if)# spanning-tree portfast

» Spanning-Tree can be disabled on a per-port basis, if needed (careful, loops behind those
ports would be unaccounted for) :
awplus(config)# interface port1.0.24
awplus(config-if)# spanning-tree portfast bpdu-filter
enable

slide 23
Spanning Tree

► Changing the Spanning Tree operational mode:


» Spanning Tree mode
awplus(config)# spanning-tree mode stp
» Rapid Spanning Tree mode (default mode)
awplus(config)# spanning-tree mode rstp

► Disable Spanning Tree:


» Rapid Spanning Tree mode (Default mode)
awplus(config)# no spanning-tree rstp enable
» Spanning Tree mode
awplus(config)# no spanning-tree stp enable
slide 24
Display of Spanning-Tree operation
awplus# show spanning-tree
awplus# show spanning-tree brief

slide 25
Thank You!

Americas Headquarters | 19800 North Creek Parkway | Suite 100 | Bothell | WA 98011 | USA | T: +1 800 424 4284 | F: +1 425 481 3895
Asia-Pacific Headquarters | 11 Tai Seng Link | Singapore | 534182 | T: +65 6383 3832 | F: +65 6383 3830
EMEA & CSA Operations | Incheonweg 7 | 1437 EK Rozenburg | The Netherlands | T: +31 20 7950020 | F: +31 20 7950021

© 2016 Allied Telesis Inc. All rights reserved. Information in this document is subject to change without notice. All company names, logos, and product designs that are trademarks or registered trademarks are the property of their respective owners.

Você também pode gostar