Home

The sysutils/rancid port

rancid-3.13p0v0 – Really Awesome New Cisco confIg Differ (cvsweb github mirror)

Description

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) to maintain history of
changes.

RANCID does this by the very simple process summarized here:
	* login to each device in the router table (router.db)
	* run various commands to get the information that will be saved
	* cook the output; re-format, remove oscillating or incrementing data
	* email any differences (sample) from the previous collection to a
	  mail list
	* and finally commit those changes to the revision control system
WWW: https://www.shrubbery.net/rancid/

Readme

+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-----------------------------------------------------------------------

On OpenBSD, RANCID lives and works in ${LOCALSTATEDIR}, with user id _rancid.

Quick Installation Guide (an example):

1) Modify ${SYSCONFDIR}/rancid/rancid.conf.  The variable LIST_OF_GROUPS is
   a space delimited list of router "groups".
   e.g.:
	LIST_OF_GROUPS="backbone aggregation switches"

2) Create ${LOCALSTATEDIR}/.cloginrc, with read/write permissions only for
   the _rancid user, e.g. 0600 or 0640.

   Review ${TRUEPREFIX}/share/examples/rancid/cloginrc.sample for examples
   and a good starting point.  See also cloginrc(5).

   Test to make sure that you can login to every router.

3) Set up mail aliases, by modifing /etc/mail/aliases.  Rancid
   sends the diffs and other administrative emails to rancid- and
   problems to rancid-admin-, where  is the "GROUP" of
   routers.  This way you can separate your backbone routers from your
   access routers or separate based upon network.

4) Initialize RANCID CVS repository with `rancid-cvs' as the _rancid
   user.  This creates all of the necessary directories and config files
   for each of the groups in LIST_OF_GROUPS and imports them into CVS.
   This will also need to be run each time a new group is added.  Do not
   create the directories or CVS repository manually, allow rancid-cvs
   do it.  See also rancid-cvs(1).

5) 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 (cat5|cisco|juniper), and "state" is either up or down.
   Each router listed as "up" will have the configuration grabbed.
   Note: manufacturer cat5 is intended only for cisco catalyst switches
   running catalyst (not IOS) code.  See also router.db(5).

6) For first-time users or new installations, run `rancid-run' (with no
   arguments) as the user _rancid and check the resulting log file(s)
   (in ${LOCALSTATEDIR}/logs/*) for errors.  Repeat until there are no
   errors.

7) Put `rancid-run' in _rancid's crontab to be called however often you
   want it to run for each group (rancid-run []).  If you run it
   less often than once/hour, check the setting of OLDTIME in
   ${SYSCONFDIR}/rancid/rancid.conf.

   Example:
	# run config differ hourly
	1 * * * * ${TRUEPREFIX}/bin/rancid-run
	# clean out config differ logs
	50 23 * * * /usr/bin/find ${LOCALSTATEDIR}/logs -type f -mtime +2 -exec rm {} \;

Maintainer

Pavel Korovin

Categories

sysutils

Build dependencies

Run dependencies

Files

Search