Last modified: Mar. 19, 2014
Contents
1 - Summary
2 - Add a device
3 - Remove a device
1 - Summary
This guide will show how to add and remove devices in RANCID. This has been
tested in RANCID 2.3.6.
2 - Add a device
Log as the user running rancid. In this example, we will add a Cisco Catalyst
3850 series switch that is using SSH version 2. Add the following to the
existing clogin configuration file.
# switch.test.com
add user switch.test.com testuser
add password switch.test.com user_password enable_password
add method switch.test.com ssh
# cd ~
# vi .cloginrc
Since this device's access method is SSH, we will need to add the following to
the ssh_config file for the rancid user.
Host switch.test.com
Protocol 2
# vi .ssh/config
Log into the device using clogin. You should be at a prompt in enable mode.
Afterwards, exit out of the device.
# clogin switch.test.com
Add the device to the RANCID device database.
switch.test.com:cisco:up
# vi /data/monitoring/rancid/devices/router.db
This command will do a check of all the devices and add this device.
# rancid-run
Look at the log file to make sure there weren't any problems.
# find /data/logs/rancid -name "devices.*" | tail -n 1 | xargs cat
starting: Wed Mar 19 16:35:15 CDT 2014
A switch.test.com
Adding switch.test.com
Transmitting file data .
Committed revision 261.
Added switch.test.com
Trying to get all of the configs.
All routers sucessfully completed.
Sending configs/router.test.com
Sending configs/firewall.test.com
Sending configs/switch.test.com
Sending router.db
Transmitting file data ........
Committed revision 262.
ending: Wed Mar 19 16:35:52 CDT 2014
3 - Remove a device
Log in as the user running rancid. In this example, we will remove a Cisco
Catalyst 3850 series switch. Remove the device entry from the clogin
configuration file.
# switch.test.com
add user switch.test.com testuser
add password switch.test.com user_password enable_password
add method switch.test.com ssh
# cd ~
# vi .cloginrc
Remove the device from the RANCID device database.
switch.test.com:cisco:up
# vi /data/monitoring/rancid/devices/router.db
This command will do a check of all the devices and remove the device.
# rancid-run
Look at the log file to make sure there weren't any problems.
# find /data/logs/rancid -name "devices.*" | tail -n 1 | xargs cat
starting: Wed Mar 19 16:48:39 CDT 2014
D switch.test.com
Deleting switch.test.com
Committed revision 263.
Deleted switch.test.com
Trying to get all of the configs.
All routers sucessfully completed.
Sending router.db
Transmitting file data .
Committed revision 264.
ending: Wed Mar 19 16:49:13 CDT 2014
|