Thursday, October 3, 2024

Managing Configuration Files in a Cisco ASR920

This Cisco link covers the management of configuration files in a Cisco ASR920. You wouldn't find the startup-config in the Cisco ASR920 bootflash memory.

ASR920# dir

Directory of bootflash:/

 

   11  drwx            16384  Oct 16 2015 21:37:46 +00:00  lost+found

15105  drwx             4096  Oct 31 2016 22:31:05 +00:00  .prst_sync

30209  drwx             4096   Apr 8 2021 21:34:51 +00:00  .installer

   13  -rw-             1182  Oct 16 2015 21:51:23 +00:00  CAT1941V21234_1445051234.lic

   14  -rw-             1176  Oct 16 2015 21:51:56 +00:00  CAT1941V25678_1445055678.lic

135937  drwx             4096   Apr 8 2021 21:25:23 +00:00  core

45313  drwx             4096  Oct 16 2015 21:56:47 +00:00  .rollback_timer

   15  -rw-                0  Oct 16 2015 21:57:06 +00:00  tracelogs.809

120833  drwx           270336  May 29 2024 04:49:54 +00:00  tracelogs

60417  drwx             4096  Jul 15 2014 01:09:40 +00:00  usb_modem

   32  -rw-        311284732   Mar 9 2018 10:36:53 +00:00  asr920-universalk9_npe.03.x.x.S.x-3.S7-ext.bin

   30  -rw-              822  Mar 22 2016 16:11:14 +00:00  usb_modem_stats.txt

   31  -rw-        467318537  Dec 16 2020 02:27:50 +00:00  asr920-universalk9_npe.16.x.x.SPA.bin

151044  drwx             4096   Apr 8 2021 21:39:04 +00:00  onep

   33  -rw-           317446  Oct 31 2016 22:24:58 +00:00  crashinfo_RP_00_00_20161031-222450-UTC

   34  -rw-          1586124  Dec 16 2020 01:53:56 +00:00  asr920_x_x_xr_s_rommon.pkg

151042  drwx             4096   Aug 4 2021 09:33:14 +00:00  .dbpersist

151043  drwx             4096   Apr 8 2021 21:39:09 +00:00  license_evlog

 

1339412480 bytes total (366039040 bytes free)

 

The startup-config is found in the nvram directory.

 

ASR920#dir nvram:

Directory of nvram:/

 

32769  -rw-            25314                    <no date>  startup-config

32770  ----             3689                    <no date>  private-config

32771  -rw-            25314                    <no date>  underlying-config

    1  ----              462                    <no date>  persistent-data

    2  -rw-               17                    <no date>  ecfm_ieee_mib

    3  -rw-             3257                    <no date>  ifIndex-table

 

33554432 bytes total (33519233 bytes free)

 

To view the startup-config, use the more nvram:startup-config command:

ASR920#more nvram:startup-config
!
! Last configuration change at 10:25:49 UTC Thu May 16 2024 by nx
! NVRAM config last updated at 10:25:51 UTC Thu May 16 2024 by nx
!
version 16.12
no service pad
service timestamps debug datetime msec show-timezone
service timestamps log datetime msec show-timezone
service password-encryption
no platform punt-keepalive disable-kernel-core
platform bfd-debug-trace 1
platform xconnect load-balance-hash-algo mac-ip-instanceid
platform tcam-parity-error enable
platform tcam-threshold alarm-frequency 1
!
hostname ASR920
!
boot-start-marker
boot system bootflash:asr920-universalk9_npe.16.x.x.SPA.bin
boot system bootflash:asr920-universalk9_npe.03.xx.0x.S.1xx-3.S7-ext.bin
boot-end-marker
!
!
vrf definition Mgmt-intf
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family

<OUTPUT TRUNCATED>

 

To perform a file transfer in a Cisco ASR920, use the copy nvram:startup-config <ftp/tftp://<REMOTE IP> command. Make sure the source interface can reach the remote file server.

ASR920#ping 172.27.5.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.27.5.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 196/196/196 ms

ASR920(config)#ip tftp source-interface Loopback0
ASR920(config)#end

ASR920#copy nvram:startup-config tftp://172.27.5.3
Address or name of remote host [172.27.5.3]?
Destination filename [startup-confg]?
!!
25314 bytes copied in 10.516 secs (2407 bytes/sec)

 

I renamed the file to startup-config2 (to avoid any file conflict), transferred it to the new Cisco ASR920, boot the new config using copy nvram:startup-config2 running-config and issued write memory to save config. Booting the new startup-config to running-config only took a few seconds.

This greatly speeds up staging a new router (in this case RMA replacement). It also lessens the human error if you have a big configuration file.

RMA_ASR920#copy nvram:startup-config2 running-config

Destination filename [running-config]?

 

%Log packet overrun, PC 0x111F6508, format:

User:%s  logged command:%s

% Previously established LDP sessions will not be affected by this change.

% OSPF: Reference bandwidth is changed.

        Please ensure reference bandwidth is consistent across all routers.

25080 bytes copied in 4.564 secs (5495 bytes/sec)

ASR920#     // NOTICE THE HOSTNAME IMMEDIATELY CHANGED

ASR920#show ip interface brief

% Authorization failed.     // I'M UNABLE TO ISSUE COMMANDS SINCE IT HAS AAA CONFIGURED