Está en la página 1de 5

Resetear password y actualizar Catalyst 2950

Published 04/19/2013 CCNA , CISCO , Networking 7 Comments


Etiquetas: catalyst, CCNA, CISCO, recovery

Esto se prob con switch Catalyst 2950. veremos, cmo eliminar la contrasea del switch,
cmo realizar un backup tanto del IOS del switch como del fichero de configuracin y
por ltimo cmo actualizar el switch al IOS que ms nos convenga.

Este manual est dividido en tres partes:

Parte 1: Resetear contrasea... (Pg. 1)

Parte 2: Hacer Backup de IOS y config.. (Pg. 4)

Parte 3: Actualizar IOS.(Pg. 4)

Veamos

Parte 1: Resetear contrasea


Lo primero que tenemos que hacer es acceder al modo recovery, para ello al encender el
switch mantendremos pulsado unos 5 segundos el botn mode situado en la parte inferior
izquierda del frontal del dispositivo. Como una imagen vale mas que mil
palabras podis verlo en la ilustracin:

1
Una vez que hemos accedido al modo de recuperacin veremos en la consola algo similar a
esto:

C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)


Compiled Mon 22-Jul-02 17:18 by antonino
WS-C2950-24 starting
Base ethernet MAC Address: 00:17:0e:b7:34:c0
Xmodem file system is available.
The system has been interrupted prior to initializing the
flash filesystem. The following commands will initialize
the flash filesystem, and finish loading the operating
system software:
flash_init
load_helper
boot

switch:

Ingresamos el comando flash_init:

switch: flash_init
Initializing Flash
flashfs[0]: 374 files, 4 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 4757504
flashfs[0]: Bytes available: 2983936
flashfs[0]: flashfs fsck took 6 seconds.
done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4

Ahora ingresamos el comando load_helper:

switch: load_helper

Con el siguiente comando visualizamos el contenido de la memoria flash:

switch: dir flash:


Directory of flash:/
2 -rwx 109 <date> info
3 -rwx 269 <date> env_vars
4 -rwx 25 <date> private-config.text
5 -rwx 616 <date> vlan.dat
7 -rwx 5742 <date> config.text
8 -rwx 3110758 <date> c2950-i6q4l2-mz.121-22.EA6.bin
9 drwx 4160 <date> html
378 -rwx 109 <date> info.ver
379 -rwx 1048 <date> multiple-fs
2983936 bytes available (4757504 bytes used)

Como hemos podido comprobar en el listado anterior, el nombre del fichero de


configuracin es config.text, lo que vamos a hacer es renombrar el fichero para que al
arrancar el router no lo encuentre y de esta manera nos permitir acceder al modo enable:

switch: rename flash:config.text flash:config.old

2
Mediante el comando boot iniciamos la carga del sistema :

switch: boot

Contestamos que no a la pregunta:

Would you like to enter the initial configuration dialog? [yes/no]no

Y accedemos al modo enable:

Switch>enable

En este punto podemos hacer dos cosas dependiendo de nuestras intenciones:

Si lo que queremos es recuperar la configuracin que teniamos, hariamos lo


siguiente:

Volvemos a renombrar el fichero de configuracin a su nombre original:

Switch# rename flash:config.old flash:config.text

Y la copiamos a la configuracion en ejecucin:

Switch# copy startup-config running-config

Ahora accederiamos al modo de configuracin y modificariamos la contrasea:

Switch# conf t
Switch(config)#enable secret contrasea

Si lo que queremos es comenzar a configurar desde cero, como es mi caso, en


lugar de copiar la configuracin de inicio a la configuracin en ejecucin , lo que
haremos es crear un nuevo fichero de configuracin a partir de la configuracin en
ejecucin que estar limpia:

Switch# copy running-config startup-config

Y comenzamos a configurar. En principio solo necesitamos configurar una ip para poder


conectar con el servidor tftp:

Switch#conf t
Switch(config)#hostname c2950-2
c2950-2(config)#interface vlan 1
c2950-2(config-if)#ip address 192.168.10.2 255.255.255.0
c2950-2(config-if)#no shutdown
c2950-2(config-if)#exit

3
Parte 2: Hacer Backup de IOS y config
Antes de actualizar el switch es recomendable realizar una copia de seguridad del IOS
actual, para ello ejecutamos el siguiente comando en el cual indicamos el nombre de la IOS
que tenemos instalada y la direccin ip del servidor tftp:

c2950-2#copy flash:c2950-i6q4l2-mz.121-22.EA6.bin tftp


Address or name of remote host []? 192.168.10.5
Destination filename [c2950-i6q4l2-mz.121-22.EA6.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3110758 bytes copied in 21.196 secs (146762 bytes/sec)

De la misma manera que hemos realizado el backup del IOS, podemos hacer lo mismo con
el fichero de configuracin:

c2950-2#copy flash:config.text tftp:start-config-c2950-2


Address or name of remote host []? 192.168.10.5
Destination filename [start-config-c2950-2]?
!!
1270 bytes copied in 0.024 secs (52917 bytes/sec)

Parte 3: Actualizar IOS


Llegados a este punto, ya estamos listos para actualizar el switch con la ios que queramos.
Lo primero que hacemos es eliminar la carpeta html:

c2950-2#delete /r /f flash:html
Delete filename [html]?

Podemos comprobar que se ha eliminado y el espacio disponible en la flash:

c2950-2#show flash:
Directory of flash:/
2 -rwx 109 Mar 01 1993 00:01:42 +00:00 info
3 -rwx 269 Jan 01 1970 00:01:47 +00:00 env_vars
4 -rwx 1270 Mar 01 1993 00:16:56 +00:00 config.text
5 -rwx 616 Mar 05 1993 22:13:14 +00:00 vlan.dat
6 -rwx 5 Mar 01 1993 00:16:56 +00:00 private-config.text
8 -rwx 3110758 Mar 01 1993 00:03:15 +00:00 c2950-i6q4l2-mz.121-22.EA6.bin
378 -rwx 109 Mar 01 1993 00:04:21 +00:00 info.ver
7741440 bytes total (4624896 bytes free)

Como no vamos a tener espacio suficiente para la actualizacin, eliminamos la imagen del
IOS actual. No pasa nada puesto que la tenemos cargada en la RAM:

c2950-2#delete flash:c2950-i6q4l2-mz.121-22.EA6.bin

4
Y con el siguiente comando desempaquetamos y copiamos los ficheros necesarios en la
memoria flash:

c2950-2#archive tar /xtract tftp://192.168.10.5/c2950-i6k2l2q4-mz.121-22.EA14.bin


flash:

Verificamos la integridad de la IOS que acabamos de copiar:

c2950-2#verify flash:c2950-i6k2l2q4-mz.121-22.EA14.bin
Verified flash:c2950-i6k2l2q4-mz.121-22.EA14.bin

Y ahora establecemos el arranque con la nueva IOS:

c2950-2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
c2950-2(config)#boot system flash:c2950-i6k2l2q4-mz.121-22.EA14.bin
c2950-2(config)#exit

Comprobamos los cambios y guardamos:

c2950-2#show boot
BOOT path-list: flash:c2950-i6k2l2q4-mz.121-22.EA14.bin
Config file: flash:/config.text
Private Config file: flash:/private-config.text
Enable Break: no
Manual Boot: no
HELPER path-list:
NVRAM/Config file
buffer size: 32768
c2950-2#write
Building configuration
[OK]

Ahora reiniciamos el switch:

c2950-2#reload

Y comprobamos que efectivamente se esta ejecutando el nuevo IOS:

c2950-2#show version
Cisco Internetwork Operating System Software
IOS C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA14, RELEASE SOFTWARE
(fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2010 by cisco Systems, Inc.
Compiled Tue 26-Oct-10 10:35 by nburra
Image text-base: 0x80010000, data-base: 0x80680000
ROM: Bootstrap program is C2950 boot loader
c2950-2 uptime is 2 minutes
System returned to ROM by power-on
System image file is flash:c2950-i6k2l2q4-mz.121-22.EA14.bin

También podría gustarte