Saving Cisco Router Configuration

Author
Terry Slattery
Principal Architect

As I write this, we’re going through another “snow event”, with a forecast of high winds and 10-20 inches of snow to top the 24-36 inches that fell a few days ago – over 67 inches so far this year, which has broken all snowfall records for Maryland.

One of the network operations team sent out an email this morning asking if there was a way to save the configs on all the devices in the network as a safety step to avoid losing an unsaved config if or when power goes out at a site.  I took a quick look at NetMRI, which has an analysis issue specifically for this case.  It captures the SNMP timestamp for the time that the configuration was last changed and the time that the configuration was last saved.  It creates an issue when a device’s configuration timestamp is later than the timestamp of the last save.

Sure enough, there were five devices with configurations that had not been saved, so it was easy to take care of the problem without hitting all network devices with a ‘write mem’ command.  Even easier, NetMRI has a way to run a command on the set of devices in the issue.  All it took was to select all the devices in the issue, then click on the button to execute a command on them, and specify ‘write mem’ as the command to be executed.  I didn’t use ‘copy run start’ because it requests a confirmation of the operation, requiring another command line input to fully execute.  Executing the save operation on all five devices only took a minute to setup and run.

While executing the save operation on five devices wouldn’t take very long using a manual process, it wouldn’t take many more devices before the time savings would become significant, especially as you track which devices you’ve done and which ones remain to be done.  For more complex sets of commands, variables may be needed to be used in the commands to be executed.  My point is that the simple command execution approach doesn’t always work.  Sometimes you need a scripting language that allows you to determine the value of variables to include, such as an interface name or an IP address.  A script may need to collect and process data from the current config in order to create the new set of commands to run on the device.  This is what can be done with NetMRI that I’ve not seen in many other configuration products.

-Terry

_____________________________________________________________________________________________

Re-posted with Permission 

NetCraftsmen would like to acknowledge Infoblox for their permission to re-post this article which originally appeared in the Applied Infrastructure blog under http://www.infoblox.com/en/communities/blogs.html

infoblox-logo

Leave a Reply

 

Nick Kelly

Cybersecurity Engineer, Cisco

Nick has over 20 years of experience in Security Operations and Security Sales. He is an avid student of cybersecurity and regularly engages with the Infosec community at events like BSides, RVASec, Derbycon and more. The son of an FBI forensics director, Nick holds a B.S. in Criminal Justice and is one of Cisco’s Fire Jumper Elite members. When he’s not working, he writes cyberpunk and punches aliens on his Playstation.

 

Virgilio “BONG” dela Cruz Jr.

CCDP, CCNA V, CCNP, Cisco IPS Express Security for AM/EE
Field Solutions Architect, Tech Data

Virgilio “Bong” has sixteen years of professional experience in IT industry from academe, technical and customer support, pre-sales, post sales, project management, training and enablement. He has worked in Cisco Technical Assistance Center (TAC) as a member of the WAN and LAN Switching team. Bong now works for Tech Data as the Field Solutions Architect with a focus on Cisco Security and holds a few Cisco certifications including Fire Jumper Elite.

 

John Cavanaugh

CCIE #1066, CCDE #20070002, CCAr
Chief Technology Officer, Practice Lead Security Services, NetCraftsmen

John is our CTO and the practice lead for a talented team of consultants focused on designing and delivering scalable and secure infrastructure solutions to customers across multiple industry verticals and technologies. Previously he has held several positions including Executive Director/Chief Architect for Global Network Services at JPMorgan Chase. In that capacity, he led a team managing network architecture and services.  Prior to his role at JPMorgan Chase, John was a Distinguished Engineer at Cisco working across a number of verticals including Higher Education, Finance, Retail, Government, and Health Care.

He is an expert in working with groups to identify business needs, and align technology strategies to enable business strategies, building in agility and scalability to allow for future changes. John is experienced in the architecture and design of highly available, secure, network infrastructure and data centers, and has worked on projects worldwide. He has worked in both the business and regulatory environments for the design and deployment of complex IT infrastructures.