Skip to content

Archive

Category: Weird Cisco Commands

Configure Replace

————————–

If you want to replace your running configuration with the configuration saved in your

router flash: memory , you can simply follow the procedure:-

First of all check with the available files in the Router flash: memory,issue the command:-

R1#dir flash:
Directory of flash:/

1  -rw-        1241  Feb 14 2011 17:19:34 +00:00  _DO_NOT_DELETE_baseconfig
2  -rw-    59478200   Sep 7 2010 22:50:24 +00:00  c2800nm-adventerprisek9-mz.124-24.T3.bin
3  -rw-    64652888   Sep 7 2010 23:00:30 +00:00  c2800nm-adventerprisek9-mz.151-2.T1.bin
4  drw-           0  Mar 31 2009 17:35:40 +00:00  ips
11  -rw-    59491364   Oct 6 2010 18:32:50 +00:00  c2800nm-adventerprisek9-mz.124-24.T4.bin
12  -rw-        2290  Jan 30 2011 17:50:32 +00:00  r1
13  -rw-    61731904  Jan 13 2010 17:40:32 +00:00  c2800nm-adventerprisek9-mz.150-1.M1.bin
14  -rw-        4326  Jan 26 2011 22:39:10 +00:00  r2
15  -rw-    59455672  Feb 17 2010 16:39:38 +00:00  c2800nm-adventerprisek9-mz.124-24.T2.bin
16  -rw-        1652   Apr 7 2011 19:27:20 +00:00  Nedumpillil
17  -rw-        1785  Mar 13 2011 02:51:50 +00:00  scsosna
18  -rw-        2540  Jun 12 2011 05:55:06 +00:00  Rack1R1
19  -rw-        1970  May 22 2011 13:09:20 +00:00  ice.txt
20  -rw-        2271  Jun 11 2011 19:06:52 +00:00  13.txt
21  -rw-         600   Jun 2 2011 15:45:14 +00:00  vlan.dat

1054457856 bytes total (749060096 bytes free)

And suppose you want to replace your running configuration with Rack1R1 file stored in flash:

Just follow the below method:-

R1#configure replace flash:Rack1R1
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: Yes

Total number of passes: 0
Rollback Done

Rack1R1#

Note:The prompt before was R1# and after rollback the prompt is Rack1R1#

It is sometimes very useful suppose you have done a wrong QoS configuration and now you want it rollback to your old configuration just type

Rack1R1#configure replace nvram:
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: Yes

 
Total number of passes: 0
Rollback Done

R1#

Note:If you have saved your configuration to the nvram: then it will not rollback,then you have

to manually clean your mess.

Weird Cisco Command
================

I found it weird however some of you already know this.

Well if you want to check what is the configuration behind any
file stored in the cisco software,you can check with the
below command.

R1#more flash:[the name of the file]

Or even
R1#more ?
Explore for more options.

We can check the available files with the command:-
R1#dir

Suppose you have stored your configuration in flash:R1
You can check with the command:-
R1#more flash:R1
And the result will display the configuration of R1.This is useful
in some scenarios where you have to upload a config file stored in flash,
but you are not sure which config file has the configuration of your use.

I found it weird because i was checking the Vlan.dat file also in the switch,
although it was in some hexadecimal format,not able to decode,however it is really
amazing command.

You can even check the router ios with the same command:-
R1#more flash:c2800nm-adventerprisek9-mz.151-2.T1.bin
But again there are some hexa stuffs.

You cannot check the Switch IOS because Level 3 switches use ASICs/hardware
instead of the CPU/software that a router would.If anybody plzz share.

Further you can explore to get weird results,happy labbing :)