Actions

RANCID - Mikrotik Routers

From falz.net

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


RANCID is a system that lets you fetch router configs into CVS. It supports many devices by default but not MikroTik which is sort of a new kid on the block. Someone was nice enough to create a patch for MikroTik. This patch doesn't cleanly apply so here's all you need to get it going in a non-patch method. These docs were made on a FreeBSD system, paths may be different in your case.

  • Edit /usr/local/libexec/rancid/rancid-fe and add this line to the %vendortable hash:
    'mikrotik'		=> 'mtrancid',

Then just add a device as type mikrotik to your router.db file. like so and things should work as expected:

router.foo.net:mikrotik:up

Issues

  • Mikrotik generates a random mac-address for openvpn server when the config is displayed. To fix this bug, force its mac-address:
/interface ovpn-server server set mac-address=00:00:00:00:00:01

Changelog

  • 2012-08-15 - updated "mtrancid" line 226 to fix up line splitting code. - Kristian Hoffmann
  • 2011-03-09 - updated mtrancid adding without-paging per timoid's suggestion