RSS Subscription

Sottoscrivi i nostri RSS
per essere sempre
aggiornato sugli ultimi
articoli pubblicati nel sito!
Sottoscrivi i nostri RSS
Home Page | Articoli | Articoli Networking
 

Cisco ROMmon recovery - controlliamo il valore del "Configuration Register"

News inserita il 11/07/2009

Il "Configuration Register" è un registro software di 16 bit espresso in valore esadecimale. Gli ultimi quattro bit (boot field) indicano al router come effettuare la "Sequenza di Boot":
  • con valore 00 l'avvio avverrà in modalità ROM monitor. Il valore del registro sarà 0x2100;
  • con valore 01 l'avvio avverrà utilizzando l'immagine IOS residente nella ROM (the boot helper image). Il valore del registro sarà 0x2101;
  • con valori da 02 a F l'avvio avverrà secondo quanto specificato nella configurazione in NVRAM (boot system). Il valore del registro potrà variare da 0x2102 a 0x210F.

Pertanto se il valore del boot field è 00, all'avvio il sistema entrerà in modalità ROM monitor (rommon>), attendendo che qualcuno avvi il sistema manualmente.

Per verificare il valore del registro di configurazione in modalità ROMmon utilizziamo il comando confreg. Otterremo un output simile a questo:

rommon 1 > confreg
Configuration Summary
(Virtual Configuration Register: 0x2100)
enabled are:
load rom after netboot fails
console baud: 9600
boot: the ROM Monitor

do you wish to change the configuration? y/n [n]:

Come si può vedere in questo caso il registro di configurazione è settato in maniera tale che ogni volta che il router viene riavviato entrerà automaticamente in modalità ROMmon (boot: the ROM Monitor). Per far sì che il router si avvi automaticamente da una valida copia del sistema operativo IOS la procedura più semplice da seguire consiste nel rispondere no alla sopracitata domanda, modificare direttamente il valore del registro e riavviare il sistema usando il comando reset:

do you wish to change the configuration? y/n [n]: n
rommon 2 > confreg 0x2102

You must reset or power cycle for new config to take effect
rommon 3 > reset

Oppure potete procedere passo passo nella modifica della configurazione ponendo molta attenzione ai parametri che andrete a modificare (nel nostro caso sarà sufficiente modificare esclusivamente i parametri di boot):

do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]:
enable "use net in IP bcast address"? y/n [n]:
disable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
enable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]:
change the boot characteristics? y/n [n]: y
enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system [0]: 2

Configuration Summary
(Virtual Configuration Register: 0x2102)

enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands or default to: cisco2-C2600

do you wish to change the configuration? y/n [n]: n

You must reset or power cycle for new config to take effect

rommon 2 > reset

In entrambi i casi dopo aver dato il comando reset il router si avvierà caricando l'immagine del software IOS.

System Bootstrap, Version 12.2(8r) [cmong 8r], RELEASE SOFTWARE (fc1) Copyright (c) 2003 by cisco Systems, Inc.
C2600 platform with 131072 Kbytes of main memory
program load complete, entry point: 0x80008000, size: 0x1be703c
Self decompressing the image: ##############################...

Altri articoli correlati

Segui cnaponline.com nei social: