Agosto 2008

Cisco Catalyst 2980

   Il Cisco Catalyst 2980G e' uscito di produzione nell'Ottobre del 2001. Sostituito dal 2980G-A, entrato fuori produzione anch'esso nel 3 Maggio del 2004. Sostituito a sua volta dal 2960, ma a 48porte. Si tratta di uno switch con ben 80porte 10/100 e di due porte in fibra/rame a 10/100/1000. Il backplane e 24Gbps non blocking. Il 2980 utilizza il CatOS come sistema operativo e non l'IOS.


 

Password recovery

Innanzitutto bisogna collegarsi in console e accertarsi che appaia il prompt. Quindi riavviare il dispositivo e interrompere la sequenza di boot inviando il break (in alcune tastiere tasto Pausa/Interr). Questo va fatto quando richiesto dallo switch (vedi sotto)

Power-on-self-test for Module 1: WS-X2980
Status: (. = Pass, F = Fail)
processor: . cpu sdram: . eprom: .
nvram: . flash: . enet console port: .
switch registers: . switch sram: .
Module 1 Passed
0:00.574505: Please set IPAddr variable
0:00.575148: Please set Netmask variable
0:00.575523: Please set Broadcast variable
0:00.575909: No gateway has been specified
0:00.576442: Network is not configured
WS-C2980G-A bootrom version 6.1(5), built on 2003.03.19 16:59:08
H/W Revisions: Fin: 2 Dorsal: 7 Board: 1
Supervisor MAC addresses: 00:0e:39:7c:a8:00 through 00:0e:39:7c:ab:ff (1024 addresses)
Installed memory: 64 MB
Testing LEDs.... done!
The system will autoboot in 5 seconds.
Type control-C to prevent autobooting.            <--- INVIARE break ora

Autoboot cancelled.
rommon 1 >
rommon 1 >

Abbiamo bloccato la sequenza di boot e siamo entrati in ROM monitor. Con "?" potete vedere i comandi disponibili.

rommon 1 > ?
alias set and display aliases command
dev list the device table
dir list files in file system
copy copy file between file systems
del delete a file
undelete undelete a file
squeeze remove deleted files
history monitor command history
repeat repeat a monitor command
sync write monitor environment to Nvram
unalias unset an alias
unset unset a monitor variable
boot boot an image from flash/network
clear clear configurations, use 'clear help' for more info
help print list of available commands
ping ping an ip addr
promrestore restore a corrupted boot ROM
reset restart the system
set show/set environment vars, use 'set help' for more info
show show config parameters, use 'show help' for more info
sprom display sprom contents
version display version info
rommon 2 >

Con "show boot" vediamo che il sistema parte dalla bootflash caricando la versione di CatOS 6.3.9:

rommon 7 > show boot
BOOT variable = bootflash:cat4000.6-3-9.bin,1;
Configuration reg is 0xf
ignore-config: disabled
console baud: 9600
boot: image specified by the boot system commands
autoboot state = 0
autoboot count = 0
autoboot sptr = 0
rommon 8 >

Modifichiamo il valore del registro di configurazione per fare ignorare il file di configurazione al prossimo riavvio:

rommon 20 > set boot config-register ignore-config enable
 

Notate che e' cambiato il valore del registro di configurazione da 0xf a 0x4f:

rommon 22 > show boot
BOOT variable = bootflash:cat4000.6-3-9.bin,1;
Configuration reg is 0x4f
ignore-config: enabled
console baud: 9600
boot: image specified by the boot system commands
autoboot state = 0
autoboot count = 0
autoboot sptr = 0

Riavviamo il sistema con il comando "boot". Lo switch riparte senza password e senza configurazione:


rommon 23 > boot

Console> (enable) show ver
WS-C2980G-A Software, Version NmpSW: 6.3(9)
Copyright (c) 1995-2002 by Cisco Systems, Inc.
NMP S/W compiled on Sep 23 2002, 18:48:29
GSP S/W compiled on Sep 23 2002, 16:23:28

System Bootstrap Version: 6.1(5)

Hardware Version: 1.6 Model: WS-C2980G-A Serial #: JAE07470GHF

Mod Port Model Serial # Versions
--- ---- ---------- -------------------- ---------------------------------
1 0 WS-X2980 JAE07470GHF Hw : 1.6
Gsp: 6.3(9.0)
Nmp: 6.3(9)
2 48 WS-X2980RJ JAE07470GHF Hw : 1.6
3 34 WS-X2980GBRJ JAE07470GHF Hw : 1.6

DRAM FLASH NVRAM
Module Total Used Free Total Used Free Total Used Free
------ ------- ------- ------- ------- ------- ------- ----- ----- -----
1 65536K 30715K 34821K 16384K 5057K 11327K 480K 167K 313K

Uptime is 0 day, 0 hour, 0 minute

Console> (enable) show flash
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .. ffffffff da2a5bea 42fb08 17 4127368 Mar 24 2000 23:21:32 cat4000.6-3-9.bin
2 .. ffffffff 84cece2c 4301b4 27 1577 Jun 19 2007 13:57:42 sw02.office.miaconfig.it.cfg

11599436 bytes available (4129204 bytes used)
Console> (enable)

Come vedete il vecchio file di configurazione e' ancora presente sul sistema nella flash. E' il file con estensione ".cfg". Potete trasferirlo nel vostro pc con un tftp e visualizzarlo per recuperare la vecchia configurazione.

Software upgrade

2980G ha CATOS e non IOS.

L'ultima versione del firmware prodotta e' la "cat4000-k8.8-4-11-GLX.bin" che richiede ROMMON version 5.4(1) o successiva.
Questo documento non spiega come aggiornare la ROMMON. Per verificarne la versione leggendo la riga con scritto "System bootstrap version" con il comando "show ver":

Console> (enable) show ver
WS-C2980G-A Software, Version NmpSW: 6.3(9)
Copyright (c) 1995-2002 by Cisco Systems, Inc.
NMP S/W compiled on Sep 23 2002, 18:48:29
GSP S/W compiled on Sep 23 2002, 16:23:28

System Bootstrap Version: 6.1(5)

Aggiornamento firmware

Copiamo via tftp la nuova versione del CatOS, facendo prima il backup di quella esistente nel sistema:
 

Console> (enable) show flash
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .. ffffffff da2a5bea 42fb08 17 4127368 Mar 24 2000 23:21:32 cat4000.6-3-9.bin
2 .. ffffffff 84cece2c 4301b4 27 1577 Jun 19 2007 13:57:42 sw02.office.intratec.it.cfg

11599436 bytes available (4129204 bytes used)

Console> (enable) copy flash tftp
Flash device [bootflash]?
Name of file to copy from []? cat4000.6-3-9.bin
IP address or name of remote host []? 192.168.30.9
Name of file to copy to []? cat4000.6-3-9.bin
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCC-
File has been copied successfully.


Console> (enable) copy tftp flash
IP address or name of remote host [192.168.30.9]?
Name of file to copy from [cat4000.6-3-9.bin]? cat4000-k8.8-4-11-GLX.bin
Flash device [bootflash]?
Name of file to copy to [cat4000-k8.8-4-11-GLX.bin]?

11599308 bytes available on device bootflash, proceed (y/n) [n]? y
/

Al riavvio avrete la giusta versione di CatOS. In caso di problemi verificate il valore della "BOOT variable" da ROMMON (vedi sopra) e verificate che non provi a caricare una versione di CatOS non piu' presente sul sistema. (vedi sotto nota 1)

Il CatOS in 5 minuti

Nota: le modifiche alla configurazione diventano subito effettive e non esiste "conf t"

L'indirizzo IP del 2980 e' nella VLAN di default, ovvero la 1, dove tutte le porte sono di default. Per fissarlo:

set interface sc0 192.168.30.110

Cambiamo l'ip del gateway:

set ip route default 192.168.30.1

Password di telnet:

set password (invio)

Password di enable:

set enablepassw (invio)

Hostname:

set system name

Creiamo una vlan con id 10 e di nome inside:

2980g> (enable) set vlan 10 name inside
VTP advertisements transmitting temporarily stopped,
and will resume after the command finishes.
Vlan 10 configuration successful

Inseriamo nella vlan 10 le porte del modulo 2 dalla 1 alla 48 (il 2980g ha le porte divise logicamente in modulo 2 e in modulo 3):

2980g> (enable) set vlan 10 2/1-48
VLAN 20 modified.
VLAN 1 modified.
VLAN Mod/Ports
---- -----------------------
20 2/1-48

 

Cancelliamo la vlan 10:

2980g> (enable) clear vlan 10
This command will deactivate all ports on vlan(s) 10
All ports on normal range vlan(s) 10
will be deactivated in the entire management domain.
Do you want to continue(y/n) [n]?y
VTP advertisements transmitting temporarily stopped,
and will resume after the command finishes.
Vlan 10 deleted

Cancelliamo tutta la configurazione dello switch (attenzione!):

Console> (enable) clear config all
This command will clear all configuration in NVRAM.
This command will cause ifIndex to be reassigned on the next system startup.
Do you want to continue (y/n) [n]? y
......2008 Aug 21 15:08:22 %SECURITY-1-DOT1X_BACKEND_SERVER:No Radius servers configured
...
......2008 Aug 21 15:08:23 %PAGP-5-PORTFROMSTP:Port 2/3 left bridge port 2/3

 

Visualizziamo lo stato delle porte:

prompt> show port
Port Name Status Vlan Level Duplex Speed Type
----- ------------------ ---------- ---------- ------ ------ ----- ------------
2/1  notconnect 1 normal auto   auto     10/100BaseTX
2/2  notconnect 1 normal auto   auto     10/100BaseTX
2/3  connected  1 normal a-full a-100    10/100BaseTX
2/4  notconnect 1 normal auto   auto     10/100BaseTX
2/5  notconnect 1 normal auto   auto     10/100BaseTX
2/6  notconnect 1 normal auto   auto     10/100BaseTX
2/7  notconnect 1 normal auto   auto     10/100BaseTX
2/8  notconnect 1 normal auto   auto     10/100BaseTX
2/9  notconnect 1 normal auto   auto     10/100BaseTX
2/10 notconnect 1 normal auto   auto     10/100BaseTX
2/11 notconnect 1 normal auto   auto     10/100BaseTX
2/12 notconnect 1 normal auto   auto     10/100BaseTX
2/13 notconnec

prova> (enable) show vlan
VLAN Name               Status IfIndex Mod/Ports, Vlans
---- -------------------------------- --------- ------- ------------------------
1    default            active   4      2/1-48 3/1-34
1002 fddi-default       active   5
1003 token-ring-default active   8
1004 fddinet-default    active   6
1005 trnet-default      active   7


VLAN Type    SAID MTU Parent RingNo BrdgNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ ------ ---- -------- ------ ------
1    enet  100001 1500 - - - - - 0 0
1002 fddi  101002 1500 - - - - - 0 0
1003 trcrf 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - - - 0 0
1005 trbrf 101005 1500 - - - ibm - 0 0


VLAN Inst DynCreated RSPAN
---- ---- ---------- --------
1 - static disabled
1002 - static disabled
1003 - static disabled
1004 - static disabled
1005 - static disabled


VLAN AREHops STEHops Backup CRF 1q VLAN
---- ------- ------- ---------- -------
1003 7 7 off

 

Cancelliamo un file dalla flash

prova> (enable) show flash
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .. ffffffff da2a5bea 42fb08 17 4127368 Mar 24 2000 23:21:32 cat4000.6-3-9.bin
2 .. ffffffff 84cece2c 4301b4 27 1577 Jun 19 2007 13:57:42 sw02.office.intratec.it.cfg
3 .. ffffffff 16195599 8c5ff4 25 4808128 Aug 21 2008 14:54:32 cat4000-k8.8-4-11-GLX.bin

6791180 bytes available (8937460 bytes used)
prova> (enable) del bootflash:cat4000.6-3-9.bin
prova> (enable) show flash
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .D ffffffff da2a5bea 42fb08 17 4127368 Mar 24 2000 23:21:32 cat4000.6-3-9.bin
2 .. ffffffff 84cece2c 4301b4 27 1577 Jun 19 2007 13:57:42 sw02.office.intratec.it.cfg
3 .. ffffffff 16195599 8c5ff4 25 4808128 Aug 21 2008 14:54:32 cat4000-k8.8-4-11-GLX.bin

6791180 bytes available (8937460 bytes used)

prova> (enable) squeeze bootflash:

All deleted files will be removed, proceed (y/n) [n]? y

Squeeze operation may take a while, proceed (y/n) [n]? y
Writing sector: 38

--------------------------------------------------------------

 

Nota 1:

Modifica della variabile di boot da ROMMON:

rommon 4 > show boot
BOOT variable = bootflash:,1;
Configuration reg is 0x10f
ignore-config: disabled
console baud: 9600
boot: image specified by the boot system commands
autoboot state = 2
autoboot count = 1
autoboot sptr = 0

rommon 5 >
rommon 7 > set boot system flash bootflash:cat4000-k8.8-4-11-GLX.bin
BOOT variable = bootflash:,1;bootflash:cat4000-k8.8-4-11-GLX.bin,1;

rommon 8 > reset

 

Fine