• Photos Photos
  • Linked In Linked In
  • Google + Google +
  • Facebook Facebook
  • Flickr Flickr
  • Vimeo Vimeo

www.gavinwill.me.uk

Photography, IT, Bikes and more.

  • Pages

    • About
    • Blog
    • Contact
    • Home
  • Archives

    • January 2013
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
  • Search:

Posts

  • View Archive

Automatic Network Configuration Version Control with Rancid and Procurve Switches

Rancid is a really handy bit of software that can automatically check for configuration changes of routers and switches, email notification of these changes whilst maintaining the history in SVN or CVS.

When I set this up it just worked for our Cisco switches however I intially had a problem with the Procurve Switches. After adding the switches to the router.db with the following syntax

switchhostname:hp:ip

switchhostname:hp:ip

And then manually kicking off rancid with the command

./bin/rancid-run

./bin/rancid-run

I noticed it took the command ages to run and not much happened. Examing the logs in /var/log/rancid/GroupName.Date I saw lots of errors with timeouts. Investigating further this was an issue with hpuifilter

Error: ssh failed: couldn't execute "hpuifilter": no such file or directory

Error: ssh failed: couldn't execute "hpuifilter": no such file or directory

hpuifuilter is in the /rancid/bin/ folder however the path was not specified. With running Rancid on an Ubuntu 12.04 server I simply modified the global path in /etc/environment/ and after this it appeared to work a little better but still not pull in the config from the procurve switches.

I then tried a manual run of hlogin to see if it could simply pull the time from the switch with the command

./hlogin -c 'show time' switchhostname

./hlogin -c 'show time' switchhostname

However this would not get past the Procurve welcome screen

A resolution to this is to specify autoenable in the .cloginrc file.

add password switchhostname {password} {enpassword}
add autoenable switchhostname 1

add password switchhostname {password} {enpassword} add autoenable switchhostname 1

After that simply set a cron job to run rancid-run at your preffered interval, configure postfix and your email groups and thats it. You will now have all the configuration history and automatically be emailed when there is any configuration change.

  • August 21, 2012
  • IT & Computing, Random
  • 0
Cancel Reply

Copyright © 2021 www.gavinwill.me.uk.

  • LinkedIn
  • Google +
  • Facebook
  • Flickr
  • Vimeo
Back to Top