Tercera prueba de compatibilidad
spanning-tree entre switches Huawei y Cisco
Fecha: 9 de noviembre del 2022
Escenario
Se realiza la tercera prueba de la trilogía de compatibilidad STP entre switches Huawei 5720 y Catalyst 2960.
Esta vez probamos un problema de “error humano” muy común al crear un trunk, que consiste en que en
ambos extremos existe una VLAN nativa diferente y esto le suele llamar la atención de spanning-tree.
Al menos en los equipos Cisco.
1.- Prueba inicial entre dos Cisco:
Ambos equipos tienen un trunk con la vlan 1U (untagged o nativa) y la vlan 2T (tagged)
1.1.- Se cambia “por error humano” la vlan nativa:
¿ Puede pasar ? totalmente ¿ cómo ? en una red mediana con varios trunks o con telefonia IP esto es muy común,
lo dejo a la imaginación de cada uno (o la memoria si ya le pasó).
Cisco2960-1#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
Cisco2960-1(config)#interface GigabitEthernet1/0/2
Cisco2960-1(config-if)#sw trunk nat vlan 2
Cisco2960-1(config-if)#end
Cisco2960-1#
1.2.-
Verificamos:
Nov 8 20:43:29: %SPANTREE-2-BLOCK_PVID_LOCAL:
Blocking GigabitEthernet1/0/2 on VLAN0001. Inconsistent local
vlan.
Nov 8 20:43:29: %CDP-4-NATIVE_VLAN_MISMATCH:
Native VLAN mismatch discovered on
GigabitEthernet1/0/2 (2), with Cisco2960-2 GigabitEthernet1/0/2 (1).
Cisco2960-1#sh spann int gi1/0/2
Vlan Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
--------------------------------
VLAN0001 Desg BKN*4 128.2 P2p Peer(STP)
*PVID_Inc
VLAN0002 Desg BKN*4 128.2 P2p Peer(STP)
*PVID_Inc
Cisco2960-1#
Cisco2960-2#sh spann int gi1/0/2
Vlan Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
--------------------------------
VLAN0001 Desg BKN*4 128.2 P2p Peer(STP)
*PVID_Inc
VLAN0002 Desg BKN*4 128.2 P2p Peer(STP)
*PVID_Inc
Cisco2960-2#
En este caso puntual que hay sólo dos VLANs ambas quedan “cruzadas” y por lo tanto en bloqueo, de existir una tercer VLAN
esta quedaría tagged en ambas puntas y traficando sin novedad.
1.3.-
Realizamos rollback:
Cisco2960-1(config)#interface GigabitEthernet1/0/2
Cisco2960-1(config-if)#sw trunk nat vlan 1
Cisco2960-1(config-if)#end
Cisco2960-1#
Nov 8 20:44:49:
%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet1/0/2 on VLAN0001.
Port consistency restored.
Nov 8 20:44:50:
%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet1/0/2 on VLAN0002.
Port consistency restored.
Cisco2960-1#
Cisco2960-2#
Nov 8 20:44:51:
%SPANTREE-2-UNBLOCK_CONSIST_PORT: Unblocking GigabitEthernet1/0/2 on VLAN0001.
Port consistency restored.
Nov 8 20:44:51: %SPANTREE-2-UNBLOCK_CONSIST_PORT:
Unblocking GigabitEthernet1/0/2 on VLAN0002. Port consistency restored.
Cisco2960-2#
1.4.-
Verificamos en switch Cisco2960-1:
Cisco2960-1#sh spann int gi1/0/2
Vlan Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
----------------------
VLAN0001 Desg FWD 4 128.2 P2p Peer(STP)
VLAN0002 Desg FWD 4 128.2 P2p Peer(STP)
Cisco2960-1#
1.5.-
Verificacomos en switch Cisco2960-2:
Cisco2960-2#sh spann int gi1/0/2
Vlan Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
----------------------
VLAN0001 Desg FWD 4 128.2 P2p Peer(STP)
VLAN0002 Desg FWD 4 128.2 P2p Peer(STP)
Cisco2960-2#
2.- Pruebas con equipos Huawei-Cisco:
2.1.- Se cambia (nuevamente por error humano) el native vlan en el
port:
[HUAWEI-GigabitEthernet0/0/1]interface GigabitEthernet0/0/2
[HUAWEI-GigabitEthernet0/0/2]port trunk pvid vlan 2
[HUAWEI-GigabitEthernet0/0/2]quit
[HUAWEI]
2.2- Verificamos en el switch Huawei:
No saltaron logs, por lo tanto verificamos mediante comandos spanning-tree.
[HUAWEI]disp stp brief
VLAN-ID
Port
Role STP
State Protection
1 GigabitEthernet0/0/2 ROOT FORWARDING NONE
2 GigabitEthernet0/0/2 ROOT FORWARDING NONE
[HUAWEI]
2.3- Verificamos en el switch Cisco:
Tampoco saltaron logs, por lo tanto verificamos mediante comandos spanning-tree.
Cisco2960#sh
spann interface gi1/0/2
Vlan Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
--------------------------------
VLAN0001 Root FWD 4 128.2
P2p
VLAN0002 Root FWD 4 128.2 P2p
Cisco2960#
2.4.-
Resumen spanning-tree (I):
Al estar ambos switches con ambos puertos en spanning-tree forwarding deducimos que la topología queda así:
Obviamente no hay tráfico entre ambos switches, por mas que los spanning-tree no estén en bloqueo, al no coincidir
los tagged y untagged. Aunque, podría darse en determinadas situaciones y con tráfico UDP (de un solo sentido) que
el switch Cisco envía tramas de la VLAN 2 tagged, el otro switch (un HP seguro) recibe tagged pero al estar la VLAN2 en
untagged descarta la cabecera 802.1q y la trama sigue su recorrido. Esto podría considerarse un caso de VLAN hopping
que podemos investigar aquí https://www.vilarrasa.com.ar/trunk_native.htm , suerte con eso.
2.5.- Verificamos con LLDP:
Cisco2960#sh lldp nei detail
------------------------------------------------
Chassis id: 3ce8.247d.1410
Port id: GigabitEthernet0/0/2
Port Description: GigabitEthernet0/0/2
System Name: HUAWEI
System Description:
S5720-52X-PWR-SI-ACF
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.170 (S5720
V200R010C00SPC600)
Copyright (C) 2000-2016 HUAWEI TECH CO., LTD
Time remaining: 95 seconds
System Capabilities: B,R
Enabled Capabilities: B,R
Management Addresses:
IP:
192.168.1.2
OID:
0.6.15.43.6.1.4.1.2011.5.25.41.1.2.1.1.1.
Auto Negotiation - supported, enabled
Physical media capabilities:
1000baseT(FD)
1000baseX(FD)
100base-TX(FD)
100base-TX(HD)
100base-T4
10base-T(FD)
10base-T(HD)
Media Attachment Unit type: 30
Vlan ID: 2 (o sea, anuncia LLDP por la VLAN2 pero no existe bloqueo)
Total entries displayed: 1
Cisco2960#
2.6.- Para generar “ruido spanning-tree” se baja y levanta la
interface:
Cisco2960(config)#int Gi1/0/1
Cisco2960(config-if)#shut
Cisco2960(config-if)#no shut
Cisco2960(config-if)#
2.7.- Verificamos en el switch Huawei:
[HUAWEI]
Nov
8 2022
21:27:52 HUAWEI %%01VBST/4/PVIDERR(l)[0]:In VBST VLAN 1, the port GE0/0/2's
PVID is inconsistent with remote port.
Nov
8 2022
21:27:52 HUAWEI %%01VBST/4/PVIDERR(l)[1]:In VBST VLAN 2, the port GE0/0/2's
PVID is inconsistent with remote port.
Nov
8 2022
21:27:49 HUAWEI %%01IFPDT/4/IF_STATE(l)[2]:Interface GigabitEthernet0/0/2 has
turned into UP state.
Nov
8 2022
21:27:39 HUAWEI %%01IFPDT/4/IF_STATE(l)[3]:Interface GigabitEthernet0/0/2 has
turned into DOWN state.
[HUAWEI]
2.8.-
Resumen spanning-tree (II):
El switch Huawei detecta la inconsistencia sólo en el momento del UP de la interface y entran ambos switchs en bloqueo.
Si el cambio se realiza en estado UP ambos switches no lo detectan.
3.- Verificación de posibilidad de modificar la config por default en
el switch Huawei:
[HUAWEI]stp ?
bpdu-filter STP BPDU filter
bpdu-protection Specify BPDU protection function
bridge-diameter Specify bridge diameter
converge Specify STP converge
mode
disable Disable Spanning
Tree Protocol (STP)
edged-port Specify edge port
enable Enable Spanning
Tree Protocol (STP)
instance Spanning tree instance
max-hops Specify max hops
mcheck Specify mcheck
mode Specify state
machine mode
pathcost-standard Specify STP port path cost standard
priority Specify bridge priority
process The MSTP process
pvid-consistency PVID consistency (esto es lo que necesitamos y por default
esta desactivado)
region-configuration Enter MSTP region view
root Specify
root switch
snooping STP snooping
tc-protection Specify TC-BPDU Protection
function
timer Specify timer
configuration
timer-factor Specify aged out time
factor
transmit-limit Specify transmission limit
count
vlan Virtual LAN
[HUAWEI]
[HUAWEI]stp pvid-consistency
?
protection PVID consistency protection
[HUAWEI]stp pvid-consistency protection ?
mode Protection mode
[HUAWEI]stp pvid-consistency protection
mode ?
block Block mode
[HUAWEI]stp pvid-consistency
protection mode block
[HUAWEI]
4.- Nuevas pruebas con la protección activada:
4.1.- Generamos nuevamente la “falla humana”:
[HUAWEI]int gi0/0/2
[HUAWEI-GigabitEthernet0/0/2]port trunk pvid vlan 2
[HUAWEI-GigabitEthernet0/0/2]quit
[HUAWEI]
4.2.-
Verificamos:
Nov
8 2022
21:36:58 HUAWEI %%01VBST/4/PVIDERR(l)[2]:In VBST VLAN 1, the port GE0/0/2's
PVID is inconsistent with remote port.
Nov
8 2022
21:36:58 HUAWEI %%01VBST/4/PVIDERR(l)[3]:In VBST VLAN 2, the port GE0/0/2's
PVID is inconsistent with remote port.
[HUAWEI]disp stp brief
VLAN-ID
Port
Role STP State Protection
1 GigabitEthernet0/0/2 DESI
DISCARDING PVIDCONSISTENCY
2 GigabitEthernet0/0/2 DESI
DISCARDING PVIDCONSISTENCY
[HUAWEI]
Cisco2960#sh
spann int gi1/0/1
Vlan Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- --------
-----------------------
VLAN0001 Desg BKN*4 128.1 P2p *PVID_Inc
VLAN0002 Desg BKN*4 128.1 P2p *PVID_Inc
Cisco2960#
Nov 8 21:36:59: %SPANTREE-2-RECV_PVID_ERR:
Received BPDU with inconsistent peer vlan id 2 on GigabitEthernet1/0/1 VLAN1.
Nov 8 21:37:00: %SPANTREE-2-BLOCK_PVID_PEER:
Blocking GigabitEthernet1/0/1 on VLAN0002. Inconsistent peer
vlan.
Nov 8 21:37:00: %SPANTREE-2-BLOCK_PVID_LOCAL:
Blocking GigabitEthernet1/0/1 on VLAN0001. Inconsistent local
vlan.
4.3- Realizamos rollback:
[HUAWEI]int gi0/0/2
[HUAWEI-GigabitEthernet0/0/2]port trunk pvid vlan 1
[HUAWEI-GigabitEthernet0/0/2]quit
[HUAWEI]
Nov
8 2022
21:37:42 HUAWEI %%01VBST/4/PVIDRECOVERY(l)[0]:In VBST VLAN 2, the
PVID-inconsistency state on port GE0/0/2 is cleared.
Nov
8 2022
21:37:42 HUAWEI %%01VBST/4/PVIDRECOVERY(l)[1]:In VBST VLAN 1, the
PVID-inconsistency state on port GE0/0/2 is cleared.
5.- Explicación del comando pvid-consistency protection en la web de Huawei:
Se buscó como se dispara en aviso hacia el switch vecino y no se encontró la explicación, pero se encontró
un error en la explicación del desactivado, se omitió en undo (detalle no menor).
Fuente: Huawei.com
6.- Resumen de comandos spanning-tree aplicados en el switch Huawei:
[HUAWEI]disp curr | inc stp
stp mode vbst (para que se “entienda” con el Cisco)
stp pathcost-standard dot1d-1998 (para que los costos se lean iguales al Cisco, ejemplo cost=4 para un enlace de 1Gbps)
stp pvid-consistency protection mode block (lo que terminamos de estudiar, no lo vuelvo a explicar)
[HUAWEI]
(2022) Spanning-tree hides the forest
Rosario, Argentina