sabato , Aprile 27 2024
Ultime Notizie
Home / Wireless & Networking / Cisco Router – Configurazione di default al reboot

Cisco Router – Configurazione di default al reboot

Il problema accade quando in configurazione di un router Cisco (magari refurbished) al reload del sistema, non parte la configurazione inserita, ma riparte sempre “pulito” ovvero con la configurazione di default.

Questa cosa accade perchè il router non sta leggendo la configurazione dal registro di memoria corretto, ma magari dopo un’operazione di ROMMon è rimasto configurato il registro sbagliato (ovvero quello che bypassa la configurazione di startup presente nella NVRAM.

Come ci si accorge di questo?

Beh per prima cosa, cambiando qualunque cosa, al reload lo troviamo azzerato!

A parte questo ovvio particolare, ci si può accorgere della cosa facendo uno “show version” dal router Cisco, dove si vedrà una cosa del genere:

Router#show version
Cisco IOS XE Software, Version 16.10.01a
Cisco IOS Software [Gibraltar], ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.10.1a, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2018 by Cisco Systems, Inc.
Compiled Thu 29-Nov-18 03:47 by mcpre

Cisco IOS-XE software, Copyright (c) 2005-2018 by cisco Systems, Inc.
All rights reserved. Certain components of Cisco IOS-XE software are
licensed under the GNU General Public License ("GPL") Version 2.0. The
software code licensed under GPL Version 2.0 is free software that comes
with ABSOLUTELY NO WARRANTY. You can redistribute and/or modify such
GPL code under the terms of GPL Version 2.0. For more details, see the
documentation or "License Notice" file accompanying the IOS-XE software,
or the applicable URL provided on the flyer accompanying the IOS-XE
software.

ROM: IOS-XE ROMMON

Router uptime is 2 minutes
Uptime for this control processor is 5 minutes
System returned to ROM by Reload Command
System image file is "bootflash:asr1002x-universalk9.16.10.01a.SPA.bin"
Last reload reason: Reload Command

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
[email protected].

License Type: Smart License is permanent
License Suite: AdvUCSuiteK9 
Next reload License Suite: AdvUCSuiteK9 
The current throughput level is 10000000 kbps 

Smart Licensing Status: UNREGISTERED/EVAL MODE

cisco ASR1002-X (2RU-X) processor (revision 2KP) with 1189381K/6147K bytes of memory.
Processor board ID FOX1719GE28
14 Gigabit Ethernet interfaces
1 Ten Gigabit Ethernet interface
32768K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
6684671K bytes of eUSB flash at bootflash:.
0K bytes of WebUI ODM Files at webui:.

Configuration register is 0x2142 

Il registro di configurazione è settato su 0x2142 (oppure in altre versioni è indicato con 0x142) questo significa che sta bypassando la normale procedura di funzionamento come si vede anche dalla tabella sotto indicata (fonte Cisco.com)

Configuration Register Set At Router Behavior
0x102
  • Ignores break
  • 9600 console baud rates
0x1202
  • 1200 baud rates
0x2101
  • Boots into bootstrap
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rates
0x2102
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rate default value for most platforms
0x2120
  • Boots into ROMmon
  • 19200 console speed
0x2122
  • Ignores break
  • Boots into ROM if initial boot fails
  • 19200 console baud rates
0x2124
  • NetBoot
  • Ignores break
  • Boots into ROM if initial boot fails
  • 19200 console speed
0x2142
  • Ignores break
  • Boots into ROM if initial boot fails
  • 9600 console baud rates
  • Ignores the contents of Non-Volatile RAM (NVRAM) (ignores configuration)
0x2902
  • Ignores break
  • Boots into ROM if initial boot fails
  • 4800 console baud rates
0x2922
  • Ignores break
  • Boots into ROM if initial boot fails
  • 38400 console baud rates
0x3122
  • Ignores break
  • Boots into ROM if initial boot fails
  • 57600 console baud rates
0x3902
  • Ignores break
  • Boots into ROM if initial boot fails
  • 2400 console baud rates
0x3922
  • Ignores break
  • Boots into ROM if initial boot fails
  • 115200 console baud rates

 

Per rimettere le cose apposto si procede quindi a configurare l’apparato per caricare i dati dal registro corretto.

Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.    
Router(config)#config-register 0x2102 
Router(config)#end

Ecco che facendo uno “show version” si vedrà quanto segue:

Configuration register is 0x2142 (will be 0x2102 at next reload)

Al prossimo riavvio del router il sistema partirà con le impostazioni corrette!

Enjoy!

Info Paolo Daniele

Ingegnere delle Telecomunicazioni, appassionato di informatica fin da piccolo ho trasformato la passione in lavoro. Con il PHP faccio tutto (o quasi...) ma non disprezzo altri linguaggi all'occorrenza. Se vi piace il mio sito, o vi è utile, o vi sto simpatico, offritemi una birra!

Ti potrebbe interessare

Mikrotik Site to Site Wireguard VPN

Ciao Ragazzi, a volte ritornano! Dopo diverso tempo che non posto nulla (per motivi lavorativi!) …

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *