Archives For Cisco

My VRF Search Tool is proving to be quite useful on the job and I was looking for a way to automate some of the functionality of the tool so that it can be extended for use in other applications.  As it stands now, the index of VRF Names is only updated once a day by the first person to run the tool each day.  Since the tool is being used in a 24/7 environment, engineers working late may be working with old information.

Therefore, I’ve sought to automate the buildIndex() function of the VRF Search Tool and created BuildVRFIndex.py.  Just like the VRF Search Tool, BuildVRFIndex builds a CSV file of the VRF Name, Remote Peer IP and Local Peer IP of each VPN tunnel — but it lacks the functionality to search the index.

Unlike my other Python applications, this is the first time I’ve ventured into the use of a configuration file.  The configuration file will allow the user to pre-set the path and name of the files the application needs to run.  You can also set the username and password that will be used to log in to each of the routers.  NOTE: The password must be base64-encoded.  You can use a website like http://www.base64encode.org/ to translate your password into a base64-encoded string.

Continue Reading…

I’ve updated my VRFSearchTool to version 0.0.10-beta.

Version 0.0.9-alpha was created as a new branch to address issue #1 and issue #2.  A few individuals uses this version for nearly two weeks and did not report any problems with it.  Therefore, I merged the new branch into the master, updated the version and took the application out of pre-release.

I now consider this version to be in Beta and ready for observed use in production environments.

Should you encounter any problems with it, please create an Issue here.

Should no problems be reported, then I’ll make it official and we’ll call it good as version 1.0.0

I’ve published VRFSearchTool version 0.06 Alpha on GitHub.

Approximately two weeks after I published my preliminary plans for the VRFSearchTool and not quite a week after I completely rewrote the functionality of the tool, I’m releasing the Alpha version.

Although it’s as functional as I expect the final product to be, I’m still calling it an Alpha at this stage because it’s still a little rough around the edges.  It contains the minimum amount of code to be usable, lacks some error-checking on user input and is short on commentary in certain sections of the code.

I expect the Beta version of the application to be published sometime next week, put into production and turned loose so the team can start playing with it and provide feedback.  Standby for another update, examples and screenshots next week!

I’ve updated Run Router Command to version 1.10.

My changes to this application pretty much mirror those changes made to the application this one was built from: DownloadRouterConfig.py.

Anyway, here is a cut-n-paste of the highlights of changes made between version 1.08 and 1.10:

  • I changed the application to use ‘routers.txt’ instead of ‘routers.lst’ by request since not all users that may be using this application have the ability to make permanent file associations.  Upon further consideration, I decided to take this a step further and allow users to actually set the name of the file they want to use for this function.  I’ve created a variable to define this filename in the source code.
  • I have also improved the error-checking for the files.  I understand that this source code might actually be distributed as a binary and users may not have access to documentation or the source.  I built functionality into the application such that if a required file does not exist, the application will create an example file for the user with instructions on it’s use.  I’m still not certain this is the right approach, but I like the way that it works, in theory.

See my GitHub Repository for this project to learn more.

I’ve updated Download Router Config to version 2.17.

Here are a few of the highlights since version 2.15:

  • I changed the application to use ‘routers.txt’ instead of ‘routers.lst’ by request since not all users that may be using this application have the ability to make permanent file associations.  Upon further consideration, I decided to take this a step further and allow users to actually set the name of the file they want to use for this function.  I’ve created a variable to define this filename in the source code.
  • I have also improved the error-checking for the files.  I understand that this source code might actually be distributed as a binary and users may not have access to documentation or the source.  I built functionality into the application such that if a required file does not exist, the application will create an example file for the user with instructions on it’s use.  I’m still not certain this is the right approach, but I like the way that it works, in theory.

See my GitHub Repository for this project to learn more.

This week I made great progress with my VRFSearchTool.  I’m still not ready to push it to GitHub just yet, so I thought I’d blog a little bit about how it’s coming along.

While working through the functions I realized that I could better streamline the flow of the application by moving some of the functions around.  Originally, the application design did not check for the presence of the “routers.txt” file until later in the program.  The more I thought about this, the more backwards this seemed.  The “routers.txt” file is required by the program to know which routers to log into.  This is a requirement, if you plan on updating the index of VRF names in your environment.

Continue Reading…

I’ve begun working on a new project entitled VRFSearchTool.

Put simply, this is a Python application that allows a user to search for a VRF name and returns the hostname/router of the gateway on which it is configured.

I regularly have the need to locate a VPN tunnel configuration across multiple routers and lack a quick-and-easy way determine which router this tunnel is configured on without using other slow or inconvenient means. The idea is that this tool will provide a (very) basic means of maintaining an index of all configured VRFs throughout a Cisco environment and provide the user with the ability to search for those VRFs.

Continue Reading…

I’ve updated RunRouterCommand.py to version 1.08.

Changes in this version:

  • Updated error checking to include validating `commands.lst` file exists.

See my GitHub Repository for this project to learn more.

I’ve updated DownloadRouterConfig.py to version 2.15.

Changes in this version:

  • Updated the file open operation to specify opening the routers.lst file as read only.
  • Minor corrections to the IOError message.

See my GitHub Repository for this project to learn more.