Configuration Management
with RANCID
Network Startup Resource Center
[Link]
These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International license
([Link]
What is RANCID?
The “Really Awesome New Cisco config Differ”!
A configuration management tool:
• Keeps track of changes in the configs of your network
equipment (Cisco, HP, Juniper, Foundry, etc.)
• Works on routers and switches
What is RANCID?
Automates retrieval of configs & archives them
Functions as:
• Backup tool - ”woops, my router burned”
• Audit tool - ”how did this error get in?”
• Blame allocation :) - ”who did it?”
The data is stored in a VCS, either of:
• CVS (Concurrent Versions Systems)
• SVN (SubVersioN)
What is Version Control?
Three basic principles:
1. Keep a record and history of changes
2. Give public access to the information
3. Maintain different versions from the same data set
What types of data?
• Source code
• Documentation
• Configuration files
• Generally, any type of data…
How does RANCID work?
Run (manually or automated)
Lookup list of groups
For each device in each list of groups
• Connect to the equipment (telnet, ssh, …)
• Run ”show” commands – config, inventory, ...
• Collect, filter/format data
• Retrieve the resulting config files
• CVS/SVN check-in the changes
• Generate a diff from the previous version
• E-mail the diff to a mail address (individual or group)
Why Use RANCID?
• Track changes in the equipment configuration
• Track changes in the hardware (S/N, modules)
• Track version changes in the OS (IOS, CatOS
versions)
• Find out what your colleagues have done
without telling you!
• Recover from accidental configuration errors
(anyone have stories?)
Post Processing
• Run traditional filtering commands on your
configs (grep, sed, for information)
• Re-use the automated login tools to build your
own batch tools or do interactive login
• On large configurations, you can parallelize
operations
Other Operations
• Automated checks (verify configs for
strange/inconsistent setup)
• Generate DNS file from equipment list
• Use IP address adjacency to produce a graph of
your network
References
• RANCID Project: [Link]
• Subversion (SVN): [Link]
• Good, Short RANCID Presentation
[Link]
• RANCID HowTos
1. [Link]
HOWTO_:_Ch1_:_Network_Backups_With_Rancid
2. [Link]
3. [Link]
[Link]