Pruebas de bucles y storm-control en un
switch Huawei
Fecha: 14 de noviembre del 2022
Escenario
Se realiza la cuarta de las pruebas en un Huawei 5720, esta vez probando algunos tipos de bucles y la reacción del storm-control.
1.- Se genera una tormenta de broadcast:
1.1.- Medimos CPU en el switch Cisco 2960:
Esta prueba se realiza para tener una referencia, ya que si bien el Huawei es un modelo mas robusto, ambos son switches de acceso
y de otros labs ya tenemos una predicción del comportamiento del 2960.
Cisco2960-1#sh proc | inc CPU
CPU utilization for five seconds: 72%/16%; one minute: 55%; five minutes: 38%
---omitido---
Cisco2960-1#
1.2.- Medimos CPU en el switch Huawei:
[HUAWEI]disp cpu
CPU Usage Stat. Cycle: 60 (Second)
CPU Usage : 21% Max: 85%
CPU Usage Stat. Time :
2022-11-04 22:28:44
CPU utilization for five seconds: 21%: one minute: 21%: five minutes: 18%
Max CPU Usage Stat. Time :
2022-11-10 22:28:22.
-omitido-
[HUAWEI]
[HUAWEI]
Nov
14 2022
22:28:07 HUAWEI IFPDT/4/PORT_INBRDCAST:OID 1.3.6.1.4.1.2011.5.25.157.2.157.20
The rapid-change of input broadcast exceeded the threshold.(IfIndex=6,
InterfaceName=GigabitEthernet0/0/1,
InputBroadcastChangeThreshold=20000pps, CurrentInputBroadcastRate=175076pps,
BaseInputBroadcastRate=216247pps).
Nov
14 2022
22:28:07 HUAWEI IFPDT/4/PORT_INBRDCAST:OID 1.3.6.1.4.1.2011.5.25.157.2.157.20
The rapid-change of input broadcast exceeded the threshold.(IfIndex=7,
InterfaceName=GigabitEthernet0/0/2,
InputBroadcastChangeThreshold=20000pps, CurrentInputBroadcastRate=175070pps,
BaseInputBroadcastRate=216382pps).
[HUAWEI]
Notar en los logs el detalle que si bien el port Gi0/0/2 esta en bloqueo, sigue recibiendo broadcasts desde el Cisco2960-2.
1.3.- Se aplica el storm-control en el switch Huawei:
[HUAWEI]interface
GigabitEthernet0/0/5
[HUAWEI-GigabitEthernet0/0/5]storm-control broadcast min-rate 300 max-rate 1000
[HUAWEI-GigabitEthernet0/0/5]storm-control action ?
block Block the
packets of this port
error-down Error-down
[HUAWEI-GigabitEthernet0/0/5]storm-control action block
Info: This configuration may cause packet loss.
[HUAWEI-GigabitEthernet0/0/5]quit
[HUAWEI]
1.4.- Se vuelve a generar tráfico broadcast excesivo:
[HUAWEI]
Nov
14 2022 22:39:33
HUAWEI %%01SECE/4/STORMCTRL_BC_BLOCKED(l)[7]:Broadcast packets are blocked at
interface GigabitEthernet0/0/5.
[HUAWEI]
Nov
14 2022
22:39:37 HUAWEI IFPDT/4/PORT_INBRDCAST:OID 1.3.6.1.4.1.2011.5.25.157.2.157.20
The rapid-change of input broadcast exceeded the threshold.(IfIndex=7,
InterfaceName=GigabitEthernet0/0/2, InputBroadcastChangeThreshold=20000pps,
CurrentInputBroadcastRate=0pps,
BaseInputBroadcastRate=26612pps).
[HUAWEI]
1.5.-
Verificamos:
[HUAWEI]disp storm-control
-------------------------------------------------------------------------------------------------
PortName
Type Rate Mode Action Punish-Trap Log Int Last-
(Min/Max) Status Punish-Time
-------------------------------------------------------------------------------------------------
GE0/0/5
Broadcast 300 Pps Block Blocked Off
On 5 2022-11-10
/1000 22:39:54
-------------------------------------------------------------------------------------------------
[HUAWEI]
2.- Pruebas con un bucle en un único puerto del switch Huawei:
Este es un ejemplo del bucle más común que puede ocurrir y que suele ser fatal cuando tenemos algún switch genérico sin administración
(y por lo tanto sin spanning-tree ni alguna otra protección).
2.1.- Se genera un loop con un switch genérico en el port 48 del switch
Huawei:
[HUAWEI]
Nov 14 2022 21:58:55 HUAWEI %%01VBST/4/LOOPDETECT(l)[3]:In
VBST VLAN 1, the port was blocked
because it received the VBST packets sent
by itself.
[HUAWEI]
Aquí podemos ver que el switch recibe sus propias tramas LLDP pero a una velocidad cada vez mayor, causada
en el switch genérico tipo efecto “bola de nieve” o un acople de audio, donde el ruido es cada vez mas fuerte.
[HUAWEI]disp lldp nei brief
Local Intf
Neighbor Dev Neighbor
Intf Exptime(s)
GE0/0/47 HUAWEI GE0/0/47 120 (el propio switch switch se ve como vecino)
[HUAWEI]
Nov 14 2022 21:59:17 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs
exceeded the threshold. (IfName=GigabitEthernet0/0/48)
[HUAWEI]
Nov 14 2022 21:59:22 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs
exceeded the threshold. (IfName=GigabitEthernet0/0/48)
[HUAWEI]
2.2.- Verificamos el estado en el puerto:
[HUAWEI]disp stp brief
VLAN-ID
Port Role STP State Protection
1 GigabitEthernet0/0/1 ROOT FORWARDING NONE (el switch Cisco 2960 de pruebas anteriores)
1 GigabitEthernet0/0/48 DESI DISCARDING LOOPBACK (bloquea el tráfico de usuario pero no de LLDP)
2 GigabitEthernet0/0/1 ROOT FORWARDING NONE
[HUAWEI]
Vemos que bloquea el tráfico broadcast y de usuario pero no el tráfico LLDP que es múlticast (y con tormenta), por lo
que aplicamos un filtro de multicast al storm-control.
2.3.- Aplicamos filtro multicast:
[HUAWEI]interface
GigabitEthernet0/0/48
[HUAWEI-GigabitEthernet0/0/48]storm-control broadcast min-rate 300 max-rate 1000
[HUAWEI-GigabitEthernet0/0/48]storm-control multicast min-rate 300 max-rate 1000
[HUAWEI-GigabitEthernet0/0/48]storm-control action block
Info: This configuration may cause packet loss.
[HUAWEI-GigabitEthernet0/0/48]quit
[HUAWEI]
2.4.-
Verificamos:
Nov 14 2022 22:27:49 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold.
(IfName=GigabitEthernet0/0/48)
Nov 14 2022 22:27:54 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold.
(IfName=GigabitEthernet0/0/48)
Nov 14 2022 22:27:59 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold.
(IfName=GigabitEthernet0/0/48)
[HUAWEI]disp storm-control
--------------------------------------------------------------------------------
PortName
Type Rate Mode Action Punish- Trap Log Int Last-
(Min/Max) Status Punish-Time
--------------------------------------------------------------------------------
GE0/0/48
Broadcast 300 Pps Block Blocked Off
On 5 2022-11-18
/1000
19:28:03
GE0/0/48
Multicast 300 Pps Block Blocked Off
On 5 2022-11-18
/1000
19:28:03
--------------------------------------------------------------------------------
[HUAWEI]
Nov 14 2022 22:28:04 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold.
(IfName=GigabitEthernet0/0/48)
Nov 14 2022 22:28:09 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold.
(IfName=GigabitEthernet0/0/48)
Nov 14 2022 22:28:14 HUAWEI LLDP/4/RATEEXCESSIVE:OID
1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold.
(IfName=GigabitEthernet0/0/48)
Nov 14 2022 22:28:19 HUAWEI LLDP/4/RATEEXCESSIVE:OID 1.3.6.1.4.1.2011.5.25.134.2.7 The rate of received PDUs exceeded the threshold. (IfName=GigabitEthernet0/0/48)
Por lo que sigue permitiendo tráfico multicast a la MAC 01:80:c2:00:00:0e , aún en bloqueo. Mas detalles de la MAC en wireshark.org
3.- Resumen:
Hasta aquí el equipo es 100% compatible con el spanning-tree de Cisco, su comportamiento es predecible ante eventos,
y a diferencia del Catalyst algunas cosas vienen desactivadas por default, es cuestión de ajustar el checklist pre puesta
en producción.
Aunque es una gama algo mas alta, el equipo es mucho mas robusto en CPU ante catástrofes de tormentas de tráfico,
aclaremos, catastrofes evitables con la configuración adecuada.
(2022) Comiendo dumplings en el barrio chino de
Pekin
Rosario, Argentina