Advanced Registry Operations Curriculum Using Rancid - Part II 0. Become the RANCID user - Make sure you are the root user first. If not, then do: $ su - - To become the RANCID user do: # su -s /bin/bash rancid 1. Note the IP addresses for the routers 10.10.10.21 for group 1 or 10.10.10.22 for group 2 2. Update /var/lib/rancid/.cloginrc Change the file to look like this: $ vi /var/lib/rancid/.cloginrc add user 10.10.10.* tldadmin add password 10.10.10.* tldadmin tldadmin (This tells RANCID that all hosts called "tldadmin.*" use the same password and user -- no need to add every router by hand!) 3. Update the router.db $ vi /var/lib/rancid/all/router.db Add our other classroom router to the file. You should end up with: 10.10.10.21:cisco:up 10.10.10.22:cisco:up (Note that "cisco" means this is Cisco equipment -- it tells Rancid that we are expecting to talk to a Cisco device here. You can also talk to Juniper, HP, ...) 4. Run rancid again: $ /usr/lib/rancid/bin/rancid-run (Should take a few seconds) 5. Check out the logs: $ cd /var/lib/rancid/logs $ ls -l ... View the contents of the file: $ more all.* 6. Look at the configs $ cd /var/lib/rancid/all/configs $ more 10.10.10.* - If all went well, you can see the configs of ALL routers 7. Change the configuration on the router (change the description on an interface, for example) 8. Run rancid again $ /usr/lib/rancid/bin/rancid-run 9. Play with clogin: $ /usr/lib/rancid/bin/clogin -c "show clock" 10.10.10.21 10.10.10.22 - What do you notice ? 10. Add the RANCID CVS repository in to CVSweb - Exit from the RANCID user: $ exit - Edit the file /etc/cvsweb/cvsweb.conf: # vi /etc/cvsweb/cvsweb.conf - Either above or below the line: 'nagios3' => ['AROC Nagios', '/home/tldadmin/cvs'], add a new line that reads: 'rancid' => ['Rancid Repository', '/var/lib/rancid/CVS'], - Save and exit - Open a web browser to the link: http://localhost/cgi-bin/cvsweb/ and select between the RANCID and the AROC Nagios3 configuration files CVS repositories in the CVS Root drop-down list.