I always find it difficult to find a good reference for RANCID debugging strategies and, after spending the afternoon on doing same on one installation, put together my own list.
Note that in the following, I use
rancid which assumes a Cisco device. Change to the appropriate variations if you’re not trying to work with a Cisco.
- Test logging into a device:
> clogin rtr1.example.com
- Test logging into a device and a single command:
> clogin -t 90 -c"show version" rtr1.example.com
- Test logging into a device and run a sequence of commands:
> clogin -t 90 -c"show version;show calendar" rtr1.example.com
- Show what RANCID does with debugging output:
> rancid -d rtr1.example.com
If the above throws some errors (especially a list of missed commands, and if you’re using TACACS, ensure you have authorisation to run all the commands RANCID tries but logging into the router as the RANCID user and executing them one at a time.
- Same as (4) but record all router / switch output for analysis:
> setenv NOPIPE YES > rancid -d rtr1.example.com
and then complete output can be found in the file: rtr1.example.com.raw (in this example).
- Run RANCID on a single switch / router tree rather than all:
> /usr/local/bin/rancid-run [tree]
- Run RANCID normally:
- Don’t forget that logs are available in RANCID’s logs/ directory.