20
SPANNING TREE PROTOCOL Juan Zambrano CCNA/NSE4/F5 CA Juan Zambrano Burgos Network Engineer [email protected]

Spanning tree protocol

Embed Size (px)

Citation preview

Page 1: Spanning tree protocol

SPANNING TREE PROTOCOLJuan ZambranoCCNA/NSE4/F5 CA

Juan Zambrano BurgosNetwork [email protected]

Page 2: Spanning tree protocol

Spanning tree protocol¿Que 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 switch de la red.

Aplicación

Presentación

Sesión

Transporte

Red

Enlace de datos

Física

Spanning tree protocol

Page 3: Spanning tree protocol

Spanning tree protocolLista 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

Page 4: Spanning tree protocol

Spanning tree protocolEn 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

Page 5: Spanning tree protocol

Spanning tree protocolComparación entre Spanning tree y Rapid STPSpanning-tree:

4 Estados de puertosBlocking, 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 puertosDiscarding, learning, forwarding

Convergencia instantáneaUtiliza 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

Page 6: Spanning tree protocol

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

Page 7: Spanning tree protocol

Spanning tree protocolComparación entre Spanning tree y Rapid STP

Page 8: Spanning tree protocol

Spanning tree protocolHow Spanning Tree Protocol (STP) worksSPT must performs three steps to provide a loop-free network topology:1. Elects one root bridge2. Select one root port per nonroot bridge3. Select one designated port on each network segment

Page 9: Spanning tree protocol

Spanning tree protocol1.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

Page 10: Spanning tree protocol

Spanning tree protocol2. 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

Page 11: Spanning tree protocol

Spanning tree protocol2. 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 PortDP: Designate PortBP: Block Port

NOTA: Siempre todos los puertosdel Root Bridge son Designate Port

3. Select one designated port on each network segment

BP

RP

DP D

PDP

DP

RP

RP

DP

BP

BP B

PDP

Page 12: Spanning tree protocol

Spanning tree protocolEjercicio1:Según la topologia, identifique lo siguiente: Root Bridge Non Root Bridge Designate Port Block Port Root Port

Archivo:STP Q1.pka

MAC: 0005.5ED3.1DC4Priority: 32768

MAC: 0060.5CC0.A304Priority: 32768

MAC: 0004.9A44.155ªPriority: 32768

Page 13: Spanning tree protocol

Spanning tree protocolEjercicio2:Según la topologia, identifique lo siguiente: Root Bridge Non Root Bridge Designate Port Block Port Root Port

Archivo:STP Q2.pka

MAC: 0005.5ED3.1DC4Priority: 4096

MAC: 0060.5CC0.A304Priority: 32768

MAC: 00D0.BC0E.8A40Priority: 4096

MAC: 0004.9A44.155ªPriority: 32768

10Mbps

100Mbps

100Mbps

100Mbps

Page 14: Spanning tree protocol

Spanning tree protocolEjercicio3:Según la topologia, identifique lo siguiente: Root Bridge Non Root Bridge Designate Port Block Port Root Port

Archivo:STP Q3.pka

MAC: 0005.5ED3.1DC4Priority: 4096

MAC: 0060.5CC0.A304Priority: 32768

MAC: 00D0.BC0E.8A40Priority: 4096

MAC: 0004.9A44.155ªPriority: 32768

10Mbps

100Mbps

100Mbps

100Mbps

Page 15: Spanning tree protocol

Spanning tree protocolEjercicio4:Según la topologia, identifique lo siguiente: Root Bridge Non Root Bridge Designate Port Block Port Root Port

Archivo:STP Q4.pka

MAC: 0005.5ED3.1DC4Priority: 4096

MAC: 0060.5CC0.A304Priority: 32768

MAC: 00D0.BC0E.8A40Priority: 4096

MAC: 0004.9A44.155APriority: 32768

100Mbps

100Mbps

100Mbps

Page 16: Spanning tree protocol

Spanning tree protocolEjercicio5:Según la topologia, identifique lo siguiente: Root Bridge Non Root Bridge Designate Port Block Port Root Port

Archivo:STP Q5.pka

MAC: 0005.5ED3.1DC4Priority: 4096

MAC: 0060.5CC0.A304Priority: 32768

MAC: 00D0.BC0E.8A40Priority: 4096

MAC: 0004.9A44.155APriority: 32768

100Mbps

100Mbps

100Mbps

Page 17: Spanning tree protocol

Spanning tree protocolComandos de configuración:Configuring the Bridge Priority of a VLANSwitch# configure terminal Switch(config)# spanning-tree vlan 200 priority 4096 Switch(config)# spanning-tree vlan 200 priority 4096Switch(config)# end

Configuring the interface CostSwitch# configure terminal Switch(config)# interface fastethernet 5/8 Switch(config-if)# spanning-tree cost 18 Switch(config-if)# end

Configuring the interface PrioritySwitch# configure terminal Switch(config)# interface fastethernet 5/8 Switch(config-if)# spanning-tree vlan 1 port-priority 16Switch(config-if)# end

Page 18: Spanning tree protocol

Spanning tree protocol

ESTADO DE PUERTO

ROL DEL PUERTO

Page 19: Spanning tree protocol

Spanning tree protocolINFORMACION DEL ROOT BRIDGE

INFORMACION DEL BRIDGE

Page 20: Spanning tree protocol

LAB1: LAB RSTPInstrucciones:1. Descargue el archivo LAB RSTP.pkt desde el sitio

indicado por el instructor.2. Realice las siguientes configuraciones en los Switch:

a. Configure todos los switch para trabajar con el modo Rapid Pvst

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