Installing RANCID on Debian Latest

RANCID (Really Awesome New Cisco confIg Differ) is a free and open-source tool that helps network administrators to manage network configurations, track changes and detect configuration discrepancies. It supports a variety of network devices and operating systems including Cisco, Juniper, and Brocade devices, and it is available on Debian Linux.

In this tutorial, we will show you how to install RANCID on Debian Latest.

Prerequisites

Before we proceed, make sure that your Debian system is up-to-date using the following commands:

sudo apt update
sudo apt upgrade

You also need to have administrative privileges or access to the sudo command.

Step 1: Install Git and Perl

RANCID uses Git and Perl, so we need to install them first. Run the following command to install Git:

sudo apt install git

Then, install Perl by running:

sudo apt install perl

Step 2: Install RANCID

Now, we can install RANCID. But before that, we need to install some additional packages for RANCID dependencies. Run the following command to install them:

sudo apt-get install rancid cvs graphviz

During the installation, you will be prompted to configure the RANCID CVS repository. You can leave the default settings as is, or modify them according to your needs.

Step 3: Configure RANCID

Once the installation is complete, we need to configure RANCID. Firstly, create a RANCID user and group with the following command:

sudo adduser rancid

Then, create a RANCID configuration file /usr/local/etc/rancid.conf using your favorite text editor, and add the following lines:

# name of the device group
LIST_OF_GROUPS="router"

# list of devices in the device group
LIST_OF_DEVICES="172.16.0.1"

# type of device
ROUTER_TYPE=cisco

# credentials for accessing the device
ROUTER_USER=myusername
ROUTER_PASSWORD=mypassword

# protocols to retrieve configurations
ROUTER_METHODS="telnet ssh"

Replace router, 172.16.0.1, cisco, myusername, and mypassword with your own device group name, IP address, device type, username, and password.

Make sure to set the correct file permission on the configuration file:

sudo chmod 640 /usr/local/etc/rancid.conf
sudo chgrp rancid /usr/local/etc/rancid.conf

Step 4: Testing RANCID

Finally, we can test RANCID by running:

sudo /usr/lib/rancid/bin/rancid-run

This command will run RANCID and retrieve the configuration files from the devices listed in the configuration file.

If everything is configured correctly, the configuration files should be stored in the directory /var/lib/rancid/router/configs.

Conclusion

In this tutorial, we have shown you how to install and configure RANCID on Debian Latest. You can now use RANCID to manage your network configurations, track changes, and detect configuration discrepancies.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!