2. Spanning tree protocol
¿Qué es?
Es un protocolo de Capa 2 que se ejecuta en bridges y switches.
¿Objetivo?
Asegura que solo exista un solo camino lógico entre todos los destinos de la red
en capa 2, bloqueando intencionalmente los caminos redundantes que
podrían causar un loop.
Si un enlace falla, STP automáticamente calcula un nuevo camino, habilitando
el enlace redundante temporalmente bloqueado.
Spanning tree utiliza mensajes llamados BPDU para intercambiar información
entre los switches de la red.
Aplica ción
Presentac ión
Sesión
Tra nsporte
Red
Enla ce d e d atos
Física
Spanning tree protocol
3. Spanning tree protocol
Lista de protocolos de Spanning tree:
STP or IEEE 802.1D-1998
PVST+
IEEE 802.1D-2004
Rapid Spanning Tree Protocol (RSTP) or IEEE 802.1w
Rapid PVST+
Multiple Spanning Tree Protocol (MSTP) or IEEE 802.1s
4. Spanning tree protocol
En las terminologías de spanning tree se encuentran los “Roles de puertos” y “Estados de puertos”.
Para comprender el funcionando del algoritmo de Spanning tree, primero se deben identificar las diferencias
entre estos.
ROLES DE PUERTOS
Root port
Designate port
Non-designated port
Alternate port
Backup port
ESTADOS DE PUERTOS
Blocking
Listening
Learning
Forwarding
Spanning tree
Estados por los que pasan los puertos
mientras el protocolo converge.
Rol que se le asigna al puerto del switch
dependiendo de donde se encuentre
localizado el Switch Raiz (Root Bridge)
Converged
5. Spanning tree protocol
Comparación entre Spanning tree y Rapid STP
Spanning-tree:
4 Estados de puertos
Blocking, listening, learning, forwarding
50 segundos aproximadamente en
converger. (20/15/15)
3 Roles de puerto:
Root port, designated port, block port.
Rapid Spanning-tree:
3 Estados de puertos
Discarding, learning, forwarding
Convergencia instantánea
Utiliza nuevos features para converger
rápidamente (P2P link/UPLINK
FAST/BACKBONE FAST, etc)
Agrega dos nuevos estados:
Alternate port y Backup port
Compatible con STP 802.1D
6. Spanning tree protocol
ROLES DE PUERTOS
Root port
Designate port
Non-designated port
Alternate port
Backup port
Spanning tree
Rol que se le asigna al puerto del switch
dependiendo de donde se encuentre
localizado el Switch Raiz (Root Bridge)
RSTP bridge port roles:
* Root port – A forwarding port that is the closest
to the root bridge in terms of path cost
* Designated port – A forwarding port for every
LAN segment
* Alternate port – A best alternate path to the
root bridge. This path is different than using the
root port. The alternative port moves to the
forwarding state if there is a failure on the
designated port for the segment.
* Backup port – A backup/redundant path to a
segment where another bridge port already
connects. The backup port applies only when a
single switch has two links to the same segment
(collision domain). To have two links to the same
collision domain, the switch must be attached to a
hub.
* Disabled port – Not strictly part of STP, a
network administrator can manually disable a port
8. Spanning tree protocol
How Spanning Tree Protocol (STP) works
SPT must performs three steps to provide a
loop-free network topology:
1. Elects one root bridge
2. Select one root port per nonroot bridge
3. Select one designated port on each
network segment
9. Spanning tree protocol
1. Elects one root bridge
Bridge ID = Bridge Priority + MAC Address
SWITCH1:
4096:0001.6394.7825
SWITCH2:
8192:0090.2B97.E97A
SWITCH3:
32768:0010.1199.06E5
SWITCH4:
32768:0001.C907.B2E6
10. Spanning tree protocol
2. Select one root port
per nonroot bridge
“El root port es el puerto que
esta mas cerca del root
Bridge, es decir el con menor
costo”.
RP
RP
RP
FA0/1
FA0/4
11. Spanning tree protocol
2. Select one root port per nonroot bridge
“El root port es el puerto que esta mas cerca del root Bridge, es decir el con menor costo”.
Roles de puerto
RP: Root Port
DP: Designate Port
BP: Block Port
NOTA: Siempre todos los puertos
del Root Bridge son Designate Port
3. Select one designated port
on each network segment
BP
RP
DP
DP
DP DP
RP
RP
DP
BP
BP
BP
DP
12. Spanning tree protocol
Ejercicio1:
Según la topología, identifique lo siguiente:
Root Bridge
Non Root Bridge
Designate Port
Block Port
Root Port
MAC: 0005.5ED3.1DC4
Priority: 32768
MAC: 0060.5CC0.A304
Priority: 32768
MAC: 0004.9A44.155ª
Priority: 32768
13. Spanning tree protocol
Ejercicio2:
Según la topología, identifique lo siguiente:
Root Bridge
Non Root Bridge
Designate Port
Block Port
Root Port
MAC: 0005.5ED3.1DC4
Priority: 4096
MAC: 0060.5CC0.A304
Priority: 32768
MAC: 00D0.BC0E.8A40
Priority: 4096
MAC: 0004.9A44.155ª
Priority: 32768
10Mbps
100Mbps
100Mbps
100Mbps
14. Spanning tree protocol
Ejercicio3:
Según la topología, identifique lo siguiente:
Root Bridge
Non Root Bridge
Designate Port
Block Port
Root Port
MAC: 0005.5ED3.1DC4
Priority: 4096
MAC: 0060.5CC0.A304
Priority: 32768
MAC: 00D0.BC0E.8A40
Priority: 4096
MAC: 0004.9A44.155ª
Priority: 32768
10Mbps
100Mbps
100Mbps
100Mbps
15. Spanning tree protocol
Ejercicio4:
Según la topología, identifique lo siguiente:
Root Bridge
Non Root Bridge
Designate Port
Block Port
Root Port
MAC: 0005.5ED3.1DC4
Priority: 4096
MAC: 0060.5CC0.A304
Priority: 32768
MAC: 00D0.BC0E.8A40
Priority: 4096
MAC: 0004.9A44.155A
Priority: 32768
100Mbps
100Mbps
100Mbps
16. Spanning tree protocol
Ejercicio5:
Según la topología, identifique lo siguiente:
Root Bridge
Non Root Bridge
Designate Port
Block Port
Root Port
MAC: 0005.5ED3.1DC4
Priority: 4096
MAC: 0060.5CC0.A304
Priority: 32768
MAC: 00D0.BC0E.8A40
Priority: 4096
MAC: 0004.9A44.155A
Priority: 32768
100Mbps
100Mbps
100Mbps
17. Spanning tree protocol
Comandos de configuración:
Configuring the Bridge Priority of a VLAN
Switch# configure terminal
Switch(config)# spanning-tree vlan 1 priority 4096
Switch(config)# spanning-tree vlan 1 priority 4096
Switch(config)# end
Configuring the interface Cost
Switch# configure terminal
Switch(config)# interface fastethernet 5/8
Switch(config-if)# spanning-tree cost 18
Switch(config-if)# end
Configuring the interface Priority
Switch# configure terminal
Switch(config)# interface fastethernet 5/8
Switch(config-if)# spanning-tree vlan 1 port-priority 16
Switch(config-if)# end
20. LAB1: LAB STP
Instrucciones:
1. Utilizando como base el diagrama de la imagen, cree un
escenario nuevo en Packet Tracer.
2. Realice las siguientes configuraciones en los Switch:
a. Configure todos los switches para trabajar con el modo
STP
b. Configure Switch2 con la prioridad 8192 para la VLAN1
c. Configure Switch0 modificando la prioridad para que se
convierte en root bridge
d. Modifique el costo entre Switch1 y Switch0
permitiendo que la interface Fa0/1 pase al estado
Blocking al converger el protocolo.
e. Modifique la prioridad del puerto de Switch3 y Swith2
generando el estado Blocking en la F0/1.
3. Verifique con el comando show spanning-tree en Switch0 si
el equipo fue designado como Root Bridge.
4. Verifique con el comando show spanning-tree en Switch1 si
el enlace fa 0/1 se encuentra en el estado Blocking.
5. Verifique con el comando show spanning-tree en Switch3 si
el enlace fa 0/2 se encuentra en estado Blocking.