How to Install RANCID on OpenBSD
RANCID (Really Awesome New Cisco confIg Differ) is an open-source tool that monitors changes to network device configurations. In this tutorial, we will install RANCID on OpenBSD.
Prerequisites
Before we begin, make sure that you have the following:
- OpenBSD installed and configured
- Internet connection
- SSH access to the server
Steps
Open the terminal and log in as the root user.
Run the
pkg_addcommand to install the necessary packages:
pkg_add -i rancid
- Create the RANCID configuration file:
cp /usr/local/etc/rancid/rancid.conf.sample /usr/local/etc/rancid/rancid.conf
- Open the configuration file with your favorite text editor:
vi /usr/local/etc/rancid/rancid.conf
- Modify the following lines in the configuration file:
LIST_OF_GROUPS="router-switch"
LIST_OF_DEVICES="/usr/local/etc/rancid/router.db"
- Create the device configuration file:
cp /usr/local/etc/rancid/router.db.sample /usr/local/etc/rancid/router.db
- Open the device configuration file and add your devices:
vi /usr/local/etc/rancid/router.db
The configuration file should look like this:
# GroupName:DeviceType:IP:DeviceName
router-switch:cisco:192.168.0.1:MySwitch
router-switch:cisco:192.168.0.2:AnotherSwitch
- Create the RANCID data directory:
mkdir /var/rancid
- Modify the RANCID ownership and permissions:
chown -R rancid:rancid /var/rancid && chmod 2755 /var/rancid
- Initialize RANCID:
sudo -u rancid /usr/local/bin/rancid-run
- Verify that RANCID is running:
tail -f /var/log/rancid/rancid.log
You should see output similar to this:
starting: Mon Feb 1 15:39:47 EST 2021
RANCID: Found clogin (/usr/local/bin/clogin)
RANCID: Found /usr/local/bin/cloginrc file
router-switch:skipping aldoh04 (user defined excluded)
router-switch:skipping aldoh31 (user defined excluded)
router-switch:skipping nrtisw04 (user defined excluded)
router-switch:skipping nrtisw05 (user defined excluded)
router-switch:skipping nrtisw17 (user defined excluded)
router-switch: End Time: Mon Feb 1 15:40:06 EST 2021
Router Run completed at Mon Feb 1 15:40:06 EST 2021
Congratulations! You have successfully installed RANCID on OpenBSD. Now you can monitor and track changes to your network devices.