RANCID
Created: 06/25/2007
General Information
RANCID monitors a router's (or more generally a device's) configuration, including software and hardware (cards, serial numbers, etc) and uses CVS (Concurrent Version System) or Subversion to maintain history of changes.Requirements
Installation
Let's install RANCID from ports:|
# # |
cd /usr/ports/net-mgmt/rancid/ make install clean |
Configuration
Copy the rancid.conf.sample to rancid.conf; Conf file is pretty well commented.| # | cp /usr/local/etc/rancid.conf.sample /usr/local/etc/rancid.conf |
|
LIST_OF_GROUPS="networks" MAILDOMAIN="@yourdomain.tld"; export MAILDOMAIN |
| # | pw user add rancid |
| # | chown -R rancid:rancid /usr/local/etc/rancid |
cloginrc.sample to your ~rancid (rancid user) and then copy it to .cloginrc file. Then make sure again it's for rancid only:|
# # |
chown rancid:rancid .cloginrc vi .cloginrc |
add user * rancid will log in as the rancid user if the device uses a username prompt i.e. tacacs+|
add password *-pix-fw add method *-pix-fw ssh |
|
add password specific-hosting-fw add method specific-hosting-fw ssh |
|
# all our routers, i.e.: everything else add password * # set ssh encryption type, dflt: 3des add cyphertype * |
|
clogin [router IP] |
|
[rancid@lab ~]$ /usr/local/libexec/rancid/clogin 10.0.0.1 10.0.0.1 spawn telnet 10.0.0.1 Trying 10.0.0.1... Connected to CISCO-1. Escape character is '^]'. CISCO-1 line 162 User Access Verification Username: rancid Password: CISCO-1>enable Password: CISCO-1# |
|
# # # # |
cd /usr/local/ rm -fr var/rancid mkdir /usr/local/var/rancid chown -R rancid:rancid /usr/local/var/rancid |
| $ | /usr/local/bin/rancid-cvs |
|
CVS ---- CVS log logs ---- logs networks ---- created based on your group on rancid.conf |
|
# vi /usr/local/var/rancid/networks/router.db 10.0.0.1:cisco:up /usr/local/bin/rancid-run |
Author: coolest
shonga_kerz at hotmail dot com