sábado, 24 de marzo de 2012

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!

2 comentarios:

  1. Thanks so much for these! I was particularly happy to discover that they also work for Linksys SFE2000 switches. I'm now backing up the configurations from our SG300, SRW2048, and SFE2000 switches.

    (And now Google will find this page when people google for those switch models too.)

    ResponderEliminar
  2. Thanks mendel! It's very exciting to see that something you have done (or I would say modify) is useful for other people. Futhermore, I didn't know these scripts were valid for SFE switches.

    I have created a github project to upload the files so it would be easier to watch the scripts and to do modifications.

    https://github.com/chrpinedo/rancid-cisco-sb

    Regards!

    ResponderEliminar