Auditing Cisco configuration - startup-config vs running-config

There are two types of config files in Cisco switches and routers. They are "startup" and "running" configs. 

Startup config - is a configuration file stored in NVRAM that a device will use to configure itself upon reload. It can be viewed by running "show startup-config" command. 

Running config - is a currently used configuration stored in volatile memory. It can be viewed by running "show running-config" command.

When an admin logs in to a switch and makes configuration changes they are applied to running config. In order for them to be retained after switch reload, those changes must be committed to startup config by running "copy running-config startup-config" or simply "wr". If changes are not committed they will be lost upon reboot. 

Output of "show running-config" at the very beginning includes information regarding when last changes were made and when they were last committed.

In this example we can see that user "net-admin" made changes and committed them 1 second later:

! Last configuration change at 10:24:49 GMT Thu Mar 15 2012 by net-admin
! NVRAM config last updated at 10:24:50 GMT Thu Mar 15 2012 by net-admin

In this example we see that last configuration change was made in March but  last saved to startup config in February. This could cause unexpected issues upon switch reboot. 

! Last configuration change at 11:50:49 GMT Thu Mar 15 2012 by net-admin
! NVRAM config last updated at 10:24:50 GMT Thu Feb 15 2012 by net-admin

When I audit Cisco configuration I normally get both startup and running config. If I see discrepancy in timestamps I compare both configs. 

We can compare configs using CSDIFF. It is a free source code auditing tool which works great with config files. That way you can asses how important the changes were and what would the potential impact be had the switch been rebooted. 

CSDIF can be downloaded here:

By looking at last changed and last saved times, we can asses change management practices used by our Network Admins. If changes are consistently not committed, it would suggest that there is an issue in change management procedures and they should be reviewed.   

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.