Necesidad de tener dos root switch en una misma LAN (única VLAN)
Fecha: 15 de diciembre del 2015 Clase: terapia de grupo para dejar el networking
Escenario
Este escenario surge a partir de la administración de una empresa que consta de dos sectores independientes entre si, con dos
sectores de IT diferentes compartiendo la misma LAN y en la VLAN por defecto, y que están en vías de segmentarse en un futuro,
pero mientras tanto comparten los mismos segmentos de layer 2 y 3.
La red es mucho mas compleja de lo que se simula en este escenario, pero la idea aplica igual.
Implementando switchs nuevos en el 2do piso (uno de los sectores de la empresa), la gente de IT me plantea de que el
spanning-tree tiene como raíz uno de los switchs del otro sector, en el 1er piso (adminsitrado por otro departamento de IT),
por lo que todos los switches del 2do piso miran hacia ese switch y eventualmente reaccionan ante cambios en el otro sector,
“culpa del spanning-tree”.
Sin colocar un router en el medio, ya que ambos sectores mantienen el mismo direccionamiento IP hasta que se reemplacen todos
los switchs genéricos por administrables y crear VLANs, debemos implementar una solución para que existan dos switch raíz dentro
de la misma LAN y todo dentro de la VLAN por defecto.
Se instaló y configuró un switch llamado Bridge, que hace de puente entre ambos sectores y que además tiene configurado un filtro
de layer 2 mediante una ACL para limitar el tráfico de broadcast entre ambos, sólo pasan los ARP necesarios entre uno y otro,
minimizando las posibilidades de una tormenta de broadcast.
Pero esa implementación es otra historia, en este lab nos concentramos en tener dos switchs raíz en la misma red.
Escenario del laboratorio
Verificamos las conexiones entre switchs:
Bridge#sh cdp
neighbors
Capability Codes: R - Router, T - Trans Bridge,
B - Source Route Bridge
S - Switch, H - Host, I -
IGMP, r - Repeater, P - Phone
Device ID
Local Intrfce Holdtme Capability Platform Port ID
1erPiso
Fas 0/23 158 S I WS-C2950-2 Fas 0/24
2doPiso
Fas 0/24 122 S I WS-C2950-2 Fas 0/24
Switch
Fas 0/24 62 S I WS-C2950-2 Fas 0/24
Bridge#
Verificamos el switch raíz:
2doPiso#sh
spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bb86.5280 (switch del 1erPiso)
Cost 38 (2 segmentos
de 100 Mbps: 19+19)
Port 24 (FastEthernet0/24)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769
(priority 32768 sys-id-ext 1)
Address 0011.bbd0.2a00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- --------
--------------------------------
Fa0/24
Root FWD 19 128.24 P2p
2doPiso#
Bridge#sh spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bb86.5280 (switch del 1erPiso)
Cost 19 (1 segmento de 100 Mbps: 19)
Port 23 (FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769
(priority 32768 sys-id-ext 1)
Address 0011.bbb2.6dc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- --------
--------------------------------
Fa0/23
Root FWD 19 128.23 P2p
Fa0/24 Desg FWD
19 128.24 P2p
Bridge#
1erPiso#sh
spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bb86.5280
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)(el resto tiene la default, que es 32768)
Address 0011.bb86.5280 (de todas maneras es la MAC mas baja de los tres switchs)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24 Desg FWD 19 128.24 P2p
1erPiso#
Intentamos convertir como root el swtch del 2do piso:
2doPiso(config)#spanning-tree vlan 1 priority 4096
2doPiso(config)#
Verificamos:
2doPiso#sh
spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bb86.5280 (switch del 1erPiso, misma priority pero MAC mas baja)
Cost 38
Port 24 (FastEthernet0/24)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097
(priority 4096 sys-id-ext 1)
Address 0011.bbd0.2a00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- --------
--------------------------------
Fa0/24
Root FWD 19 128.24 P2p
2doPiso#
Implementamos la segmentación de spanning-tree
entre sectores:
Creamos un filtro spanning-tree para tráfico de BPDUs entrantes y salientes, con esto no retransmitimos
información STP entre los sectores.
Bridge(config)#int range fa0/23 - 24
Bridge(config-if-range)#spanning-tree bpdufilter enable
Bridge(config-if-range)#
Verificamos:
Bridge#sh spanning-tree
VLAN0001
Spanning
tree enabled protocol rstp
Root
ID Priority 32769
Address 0011.bbb2.6dc0
This bridge is the root (no ve al resto de los switchs,
por lo tanto es el único en su segmento)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769
(priority 32768 sys-id-ext 1)
Address 0011.bbb2.6dc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- --------
--------------------------------
Fa0/23
Desg FWD 19 128.23
P2p
Fa0/24
Desg FWD 19 128.24
P2p
Bridge#
2doPiso#sh
spanning-tree
VLAN0001
Spanning
tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bbd0.2a00
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097
(priority 4096 sys-id-ext 1)
Address 0011.bbd0.2a00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24 Desg FWD 19 128.24 P2p
2doPiso#
1erPiso#sh
spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bb86.5280
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097
(priority 4096 sys-id-ext 1)
Address 0011.bb86.5280
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24 Desg FWD 19 128.24 P2p
1erPiso#
Layout final:
Agregamos un switch en 1er piso:
Verificamos:
Anexo#sh spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root
ID Priority 4097
Address 0011.bb86.5280 (SW 1erPiso)
Cost 19 (1 segmento de 100 Mbps: 19)
Port 24 (FastEthernet0/24)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769
(priority 32768 sys-id-ext 1)
Address 0011.bbd0.2a2b
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface
Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- --------
--------------------------------
Fa0/24
Root FWD 19 128.24 P2p
Anexo#
Fuente: CCNA Security V1.1 Capítulo 6
Bridge#sh spanning-tree detail
VLAN0001
is executing the rstp compatible Spanning Tree
protocol
Bridge
Identifier has priority 32768, sysid 1, address 0011.bbb2.6dc0
Configured
hello time 2, max age 20, forward delay 15
We are
the root of the spanning tree
Topology change flag not set, detected flag not set
Number
of topology changes 3 last change occurred 00:07:34 ago
from FastEthernet0/24
Times: hold 1, topology change
35, notification 2
hello 2, max age 20, forward delay 15
Timers:
hello 0, topology change 0, notification 0, aging 300
Port 23
(FastEthernet0/23) of VLAN0001 is designated forwarding
Port
path cost 19, Port priority 128, Port Identifier 128.23.
Designated root has priority 32769, address 0011.bbb2.6dc0
Designated bridge has priority 32769, address 0011.bbb2.6dc0
Designated port id is 128.23, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number
of transitions to forwarding state: 1
Link
type is point-to-point by default
Bpdu filter is
enabled
BPDU:
sent 13, received 548
Port 24
(FastEthernet0/24) of VLAN0001 is designated forwarding
Port path
cost 19, Port priority 128, Port Identifier 128.24.
Designated root has priority 32769, address 0011.bbb2.6dc0
Designated bridge has priority 32769, address 0011.bbb2.6dc0
Designated port id is 128.24, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number
of transitions to forwarding state: 1
Link
type is point-to-point by default
Bpdu filter is
enabled
BPDU:
sent 13, received 160
Bridge#
Con esta configuración debemos tener cuidado al implementarla ya que estamos apagando el spanning-tree en esos puertos, el
riesgo de loop no existe si los uplinks son sólo esos puertos, si creamos un vinculo nuevo entre ambos cerraremos un bucle fatal.
Solamente si configuramos interfaces etherchannels en cada switch, podremos desactivar el STP con bpdu-filter en cada una.
(2015) Loops
may cause nightmares and another Freud theories
Rosario, Argentina