Cisco Small Business SG300 backup with RANCID

I like using RANCID to manage a backup of all the network devices of a network: switches, routers, firewalls,... However, RANCID lacks of "official" support for Cisco SG300 series switches. These switches form part of Cisco's Small Business serie and although they are not based on Cisco IOS, they are provided with a CLI with some similar commands to Cisco IOS's ones.

By Googling, I found how to backup with RANCID a Cisco SRW2008P switch. I have modified those files to support not only a SRW switch but also a SG300 switch.

So, how to backup a SG300 series switch with RANCID?

  1. Download csblogin and csbrancid files and put them in the RANCID's PATH (in my case, /opt/rancid/bin). Don't forget to give them execution permissions.
  2. Edit rancid-fe file located in the RANCID's PATH (in my case, /opt/rancid/bin/rancid-fe) and insert a new item in the %vendortable dictionary:

    'cisco-sb'        => 'csbrancid',

  3. Insert the device to backup in the router.db file:

    test.example.com:cisco-sb:up:

  4. Modify your .cloginrc file:

    add user test.example.com        {user}
    add password test.example.com     {password}
    add autoenable test.example.com    1
    add method test.example.com        ssh
    add userprompt test.example.com  {"User Name:"}

  5. Enjoy it!

Comments