[rancid] Re: Adding a new device type

Mike Ashcraft mashcraft at omniture.com
Tue Mar 31 15:36:57 UTC 2009


Chris,

The quick basics:

1 -- Create an expect script similar to clogin that can connect to the device and run commands.  You may be able to start with one of the existing *login scripts found in the bin directory, if they partially work on your device, to speed up the process.  If you can find one that already works, use it.  This would need to telnet in and the MikroTik interface is fairly simple.  clogin might work for you with only minimal changes to address the format of the prompt.

2 -- create a perl script similar to rancid that uses the login expect script from the previous step to obtain the configuration and parse/sort it as needed to clean up the output.  For example on the MikroTik this may just run the 'export' command and discard the login output and CLI prompt.

3 -- Add your new device type to rancid-fe

4 -- Setup the new devices in router.db using your new device type

Good luck,

Mike

-----Original Message-----
From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Chris Boot
Sent: Tuesday, March 31, 2009 4:08 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] Adding a new device type

All,

I've just discovered RANCID after an entry on the SANS ISC blog 
(http://isc.sans.org/diary.html?storyid=6100) - very nice tool. I've set 
it up for our HP ProCurve switches (a mixture of 2810s and 2610s) and 
after a small struggle it's working really nicely, so thanks.

We also use several MikroTik routers around the company, so I wanted to 
be able to add these to rancid. These aren't supported yet, so I wanted 
to add support for them, but I haven't a clue where to start. Can anyone 
give me a bit of an introduction please? Suffice to say they're nothing 
like Ciscos or HPs with their own CLI accessible by SSH or Telnet so 
they would need a whole new set of scripts to poll.

Any hints would be really appreciated.

Cheers,
Chris
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss at shrubbery.net
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


More information about the Rancid-discuss mailing list