Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Really Awesome New Cisco confIg Differ with git extensions and support for colorized emails!
Shell C

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
util
CHANGES
README
Todo
cloginrc.sample

README

Rancid is a "Really Awesome New Cisco confIg Differ" developed to
maintain CVS controlled copies of router configs.

The following is the packing list for Rancid:

README -    This file.
CHANGES -   List of changes to Rancid.
Todo -      partial Todo list of what needs to be done.
env -       Enviromental settings needed.
do-diffs -  Script designed to be run from cron calling control_rancid.
control_rancid -    Builds router list, calls rancid on each router and
		    handles cvs routines.
rancid-fe - chooses between rancid/francid/jrancid/rrancid/cat5rancid.
rancid -    Runs commands on cisco routers and processes the output - the meat.
erancid -   Runs commands on ADC EZ-T3 muxes and processes the output.
francid -   Runs commands on foundry switches and processes the output.
jrancid -   Runs commands on juniper routers and processes the output.
rrancid -   Runs commands on redback routers and processes the output.
cat5rancid -Runs commands on cisco cat5 switches and processes the output.
clogin -    Expect script that logs into routers either interactively,
	    runs a set of commands or runs another expect script.
elogin -    Expect script that logs into ADC EZ-T3 muxes either interactively,
	    runs a set of commands or runs another expect script.
flogin -    Expect script that logs into foundry switches.  once foundry
	    cleans up their bloody UI, clogin should do the job.
jlogin -    Expect script that logs into juniper routers similarly to
	    clogin.  it is not terribly robust, but mainly used for it's
	    -c and -s options.
.cloginrc - TCL commands to set passwords, usernames etc. used by clogin and
	    jlogin.
par -       Parallel processing of commands - any commands.
rename -    Perl script to rename files.
create_cvs -Creates all of the CVS and config directories.
util -      utilities / contribs

rancid will also need to have the following packages:
cvs	- code revision system available from prep.ai.mit.edu:/pub/gnu
gnudiff - gnudiff provides the -u option.  if you do not have gnudiff,
	  you will have to modify control_rancid to use 'diff -c' or some
	  such.  see examples.
perl5	- perl version 5 or greater available from www.cpan.org
expect	- http://expect.nist.gov/
tcl	- required by expect.

Bill Fenner has a cgi script for interacting with CVS repositories via
a web interface.  This provides a great way to view rancid diffs and
full configs, especially for those unfamiliar with cvs.  The package is
not included, but can be found here:

	http://www.freebsd.org/~fenner/cvsweb/cvsweb-1.0.tar.gz

Quick Installation Guide (an example):

1) mkdir <basedir>
   All rancid crud will be under this directory.  we chose /home/rancid.

2) mkdir <basedir>/bin

3) Put the contents of rancid/bin in <basedir>/bin.

   Modify the location of perl and expect in each of cat5rancid,
   clogin, elogin, erancid, flogin, francid, jlogin, jrancid, par,
   rancid, rancid-fe, rename, and rrancid if necessary.  There are
   also 3 calls to perl in control_rancid and one in do-diffs.

   Make sure that you are using perl version 5 and not perl version 4.

4) Modify <basedir>/bin/env.

5) Put .cloginrc in your home directory.

6) Modify .cloginrc.

   Test to make sure that you can log into every router.

   Note: the juniper user you use *must* log into a cli shell (which
   is the default on a juniper).

7) Modify /etc/aliases
   Rancid sends the diffs and other controlling emails to rancid-<GROUP>
   and problems to rancid-admin-<GROUP>, where <GROUP> is the "GROUP" of
   routers.  This way you can seperate your backbone routers from your
   access routers or seperate based upon network etc...  Different router
   uses forced different people being interested in router "groups" -
   thus this setup.  Make sure email to rancid-<GROUP> works.  /etc/aliases
   can be maintainable by Majordomo stuff.
				- OR -
   Modify your home directory's .mailrc.  Control_rancid uses sendmail
   to send diffs.  To use a private .mailrc, control_rancid will have to
   be modified to use ucbmail or, better yet, something else which allow
   the Precedence header to be set.  Pick your poison.

   The Precedence header set to bulk or junk *hopefully* avoids replies from
   auto-responders and vacation type mail filters.

8) Run create_cvs.
   This creates all of the CVS necessary directories and all of the
   config directories.

9) For each "group", modify the router.db file in the group directory.
   The file is of the form "router:mfg:state" where "router" is
   the name (we use FQDN) of the router, mfg is the manufacturer
   from the set of (cisco|ezt3|foundry|juniper|redback|cat5), and "state"
   is either up or down.  Each router listed as "up" will have the
   configuration grabbed.  Note: manufacturer cat5 is intended only for
   catalyst switches running catalyst (not IOS) code.

   eg <basedir>/<group>/router.db:
	cisco-router.domain.com:cisco:up
	adc-mux.domain.com:ezt3:up
	foundry-switch-router.domain.com:foundry:up
	juniper-router.domain.com:juniper:up
	redback-dsl-router.domain.com:redback:down

10) Put do-diffs in cron to be called however often you want it to run
    for each group (do-diffs [<GROUP>]).  eg:

	# run config differ hourly
	1 * * * * <BASEDIR>/bin/do-diffs
	# clean out hourly differ logs
	50 23 * * * /usr/bin/find <BASEDIR>/logs -mtime +2 -exec rm {} \;

11) Send any bugs, suggestions or updates to rancid@shrubbery.net.

-Hank
Something went wrong with that request. Please try again.