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:
1> clogin rtr1.example.com
- Test logging into a device and a single command:
1> clogin -t 90 -c"show version" rtr1.example.com
- Test logging into a device and run a sequence of commands:
1> clogin -t 90 -c"show version;show calendar" rtr1.example.com
- Show what RANCID does with debugging output:
1> 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:
12> 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:
1> /usr/local/bin/rancid-run [tree]
- Run RANCID normally:
- Don’t forget that logs are available in RANCID’s logs/ directory.