Difference between config.text and startup-config in Cisco Switch

Probably every one thinking  the config.text file contains the password definitions and Startup-config file contains the startup configuration, and config.text file saved in flash but the startup-config is saved in NVRAM.

Above saved locations correct but the config.text file and startup-config are the same files with exactly same size.  I uploaded both config.text and startup-config to my TFTP server and tried to find differences between them. Both exactly the same and there no difference.

Find the Config.text on Cisco Switch 

Cisco-Switch#sh flash

Directory of flash:/

2 -rwx 3722814 Mar 07 1993 19:27:13 +00:00 c2950-i6k2l2q4-mz.121-22.EA14.bin
4 -rwx 1048 Mar 01 1993 01:41:49 +00:00 multiple-fs
5 -rwx 314 Mar 07 1993 19:34:02 +00:00 env_vars
6 -rwx 4635 Mar 01 1993 01:41:49 +00:00 config.text
7 drwx 832 Mar 01 1993 00:04:15 +00:00 html
21 -rwx 109 Mar 01 1993 00:04:17 +00:00 info
22 -rwx 109 Mar 01 1993 00:04:17 +00:00 info.ver
23 -rwx 45 Mar 01 1993 01:41:49 +00:00 private-config.text

7741440 bytes total (2029568 bytes free)

or

Cisco-Switch#dir flash:
Directory of flash:/

2 -rwx 3722814 Mar 07 1993 19:27:13 +00:00 c2950-i6k2l2q4-mz.121-22.EA14.bin
4 -rwx 1048 Mar 01 1993 01:41:49 +00:00 multiple-fs
5 -rwx 314 Mar 07 1993 19:34:02 +00:00 env_vars
6 -rwx 4635 Mar 01 1993 01:41:49 +00:00 config.text
7 drwx 832 Mar 01 1993 00:04:15 +00:00 html
21 -rwx 109 Mar 01 1993 00:04:17 +00:00 info
22 -rwx 109 Mar 01 1993 00:04:17 +00:00 info.ver
23 -rwx 45 Mar 01 1993 01:41:49 +00:00 private-config.text

7741440 bytes total (2029568 bytes free)

Find the starup-config on Cisco Switch 

Cisco-Switch#dir nvram:
Directory of nvram:/

26 -rw- 4635 <no date> startup-config
27 —- 45 <no date> private-config
1 -rw- 0 <no date> ifIndex-table

32768 bytes total (27012 bytes free)

The switch boots startup configuration from NVRAM only. In the password recovery process you are informed to either rename config.text file to config.old or delete it. The startup-config is saved to NVRAM, but it is mapped to the config.text file. That is why when you delete it or rename it, the NVRAM is now bypassed. It is simple file mapping.

and I think, there is no option to change configuration register value in Cisco catalyst switches and configuration register is fixed as default 0xF in most of the Cisco switches that is why there are two files in it to break/recover a passwords.

 

Filed Under: Switch General

Tags:

About the Author:

RSSComments (1)

Leave a Reply | Trackback URL

  1. Harish says:

    Thanks , I have recently been searching for info approximately this subject for a while and yours is the greatest I’ve found out so far.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.