Crash de IOS al implementar privilege
level
Fecha: septiembre del 2019
Escenario
Durante la configuración de permisos de acceso en una red en producción, hubo una súbita pérdida de conectividad
en el primer switch que estaba configurando, se verifica que el equipo no responde aún después de esperar un tiempo
razonable, tal como el de un reboot, recálculo de spanning-tree, reconvergencia OSPF, etc...
Se descartó la célebre frase “me quedé afuera” ya que ningún comando lo implicaba, y además…eso no es una opción !
Se envió a personal de IT a reiniciarlo y se hizo el análisis de lo que pudo suceder en una maqueta.
1.- Comandos ingresados inicialmente:
Se ingresan comandos para que personal no calificado pueda monitorear y reiniciar puertos.
Cisco-3650#conf
t
Enter configuration commands, one per
line. End with CNTL/Z.
Cisco-3650(config)#username monitoreo privilege 5 secret xxxxxxxxxxx
Cisco-3650(config)#privilege exec level 5 config term
Cisco-3650(config)#privilege configure level 5 interface
Cisco-3650(config)#privilege interface level 5 shut
Cisco-3650(config)#privilege interface level 5 no shut
Cisco-3650(config)#privilege exec level 5 show int status
Cisco-3650(config)#end
Cisco-3650#
2.- Verificación:
Cisco-3650 con0 is now available
Press RETURN to get started.
User Access Verification
Username: monitoreo
Password: *********
Cisco-3650#conf
t
Cisco-3650(config)#int gi1/0/1
Cisco-3650(config-if)#no ? (sólo debería aparecer shutdown)
ospfv3 OSPFv3 interface commands
shutdown Shutdown the selected
interface
Cisco-3650(config-if)#?
Interface configuration commands:
default Set a command to its
defaults
exit Exit from interface
configuration mode
help Description of the
interactive help system
no Negate a command or set its defaults
ospfv3 OSPFv3 interface
commands
shutdown Shutdown the selected
interface
Cisco-3650(config-if)#ospfv3 ?
<1-65535> Process ID
Cisco-3650(config-if)#ospfv3 1 ? (correcto, esto debería verse sólo con privilege 15)
% Unrecognized command
Cisco-3650(config-if)#ospfv3 1 ? (así debería verse sólo con
privilege 15)
authentication Enable
authentication
cost
Route cost of this interface
database-filter Filter OSPF
LSA during synchronization and flooding
dead-interval Interval
after which a neighbor is declared dead
demand-circuit OSPF demand
circuit
flood-reduction OSPF Flood
Reduction
hello-interval Time between HELLO packets
ipv4
Specify parameters for IPv4
ipv6
Specify parameters for IPv6
mtu-ignore Ignores the
MTU in DBD packets
multi-area Set the
OSPF multi-area ID
neighbor OSPF
neighbor
network Network
type
priority Router
priority
retransmit-interval Time between retransmitting lost link state
advertisements
transmit-delay Link state transmit delay
Cisco-3650(config-if)#
3.- Se genera el comando con privilege 6 para que el nivel 5 no lo pueda ejecutar:
Cisco-3650#conf t
Cisco-3650(config)#privilege interface level 6 ospfv3 (esto es lo último que se ejecuta
antes de perder control del equipo)
---pérdida de conectividad---
4.- Por consola se puede ver el dump del error justo al ingresar ese
comando:
5.- Se repitieron las pruebas: en equipos Cisco 3650, 3850, 4500, 2960X y router 881 dando los mismos resultados.
6.- Se procedió a abrir un caso en Cisco:
Luego de varios (varios en negrita) mails se obtuvo la respuesta de ser un bug CSCut67137.
7.- Detalle del bug: https://quickview.cloudapps.cisco.com/quickview/bug/CSCut67137
8.- Pruebas de upgrade de IOS en un 2960XR:
8.1.- Verificación
inicial:
Switch#sh
version
Cisco IOS Software, C2960X Software
(C2960X-UNIVERSALK9-M), Version
15.2(2)E6, RELEASE SOFTWARE (fc1)
Technical Support:
http://www.cisco.com/techsupport
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Fri 16-Dec-16 21:27 by prod_rel_team
---resumido---
System image file is "flash:/c2960x-universalk9-mz.152-2.E6/c2960x-universalk9-mz.152-2.E6.bin"
Last reload reason: power-on
---resumido---
Switch Ports Model SW Version SW Image
------------------------------------------------------------------------------------------------------------
*
1 28 WS-C2960XR-24TS-I 15.2(2)E6 C2960X-UNIVERSALK9-M
Configuration register is 0xF
Switch#
8.2.- Verificación de la falla:
Switch(config)#privilege interface level 6 ospfv3
Sep 26 04:22:55.511: %SYS-2-MALLOCFAIL: Memory
allocation of 24696 bytes failed from 0x488C20, alignment 0
Pool: Processor
Free: 118832 Cause: Memory
fragmentation
Alternate Pool: None Free: 0
Cause: No Alternate pool
-Process=
"Exec", ipl= 0, pid= 204
-Traceback= 555EECz 21BB760z 21C4438z 2FF1930z
488C24z 488F84z 47EBB8z 4819B4z 24A9390z 487AD8z
48153Cz 4A6E80z 4A7214z 47F6D8z 486784z 4989C4z
--- resumido, el equipo queda en un loop ---
8.3.- Copia de una versión con la falla solucionada:
Switch#conf
t
Enter configuration commands, one per
line. End with CNTL/Z.
Switch(config)#int vlan 1
Switch(config-if)#ip add 192.168.0.10 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#^Z
Switch#ping 192.168.0.123 (verificación de conectivivdad al TFTP server)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
192.168.0.123, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip
min/avg/max = 1/2/4 ms
Switch#sh flash (verificación del destino)
Directory of flash:/
2 -rwx 2072
Nov 1 2018 10:19:51 +00:00
multiple-fs
3 drwx 512 Jul 14 2000 01:12:00 +00:00 c2960x-universalk9-mz.152-2.E6
668 drwx 512
Jul 14 2000 01:12:02 +00:00
dc_profile_dir
122185728 bytes total (95052800 bytes free)
Switch#
Switch#copy
tftp flash
Address or name of remote host []? 192.168.0.123
Source filename []? c2960x-universalk9-mz.152-7.E0a.bin
Destination filename
[c2960x-universalk9-mz.152-7.E0a.bin]? (enter)
Accessing tftp://192.168.0.123/c2960x-universalk9-mz.152-7.E0a.bin...
Loading c2960x-universalk9-mz.152-7.E0a.bin
from 192.168.0.123 (via Vlan1): !!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 26534912 bytes]
26534912 bytes copied in 490.601 secs (54087 bytes/sec)
Switch#
8.4.- Modificación de los parámetros de arranque:
Switch#conf
t
Enter configuration commands, one per
line. End with CNTL/Z.
Switch(config)#boot system flash:/c2960x-universalk9-mz.152-7.E0a.bin
Switch(config)#end
Switch#
8.5.- Verificación:
Switch#sh
boot
BOOT path-list : flash:/c2960x-universalk9-mz.152-7.E0a.bin
Config file : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break : yes
Manual Boot : no
Allow Dev Key : yes
HELPER path-list :
Auto upgrade : yes
Auto upgrade path :
NVRAM/Config file
buffer size: 524288
Timeout for Config
Download: 0 seconds
Config Download
via DHCP: disabled (next boot: disabled)
Switch#
8.6.- Se guardan los cambios de los parámetros de boot y reinicio:
Switch#write
memory
Building configuration...
[OK]
Switch#reload
Proceed with reload? [confirm] (enter)
--- resumido ---
8.7.- Verificación de la versión actualizada:
Switch#sh
version
Cisco IOS Software, C2960X Software
(C2960X-UNIVERSALK9-M), Version
15.2(7)E0a, RELEASE SOFTWARE (fc1)
Technical Support:
http://www.cisco.com/techsupport
Copyright (c) 1986-2019 by Cisco Systems, Inc.
Compiled Fri 12-Apr-19 04:09 by prod_rel_team
---resumido---
System image file is "flash:/c2960x-universalk9-mz.152-7.E0a.bin"
Last reload reason: power-on
---resumido---
Switch Ports Model SW
Version SW Image
---------------------------------------------------------------------------------------------------------
*
1 30 WS-C2960XR-24TS-I 15.2(7)E0a
C2960X-UNIVERSALK9-M
Configuration register is 0xF
Switch#
8.8.- Verificación de la falla post-upgrade:
(2019) My mind sometimes crashes
Rosario, Argentina