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.
Initially, the tool will return the name or IP address of the router that containing the VPN tunnel configuration when provided with just the VRF name.
In the future, I intend on expanding the functionality of this tool to return the IP address of the remote VPN gateway when provided with the VRF name. Additionally, I envision the tool will be able to search for either the IP address of the remote VPN gateway OR the VRF name and return the unknown value along with the gateway on which it is configured.
For example, if you search for VRF name “CustomerA,” the tool will tell you their Peer IP address is “188.8.131.52” and it is configured on your gateway RouterA, 192.168.1.1. Or, if you search for their Peer IP address “184.108.40.206,” the tool will tell you their VRF name is “CustomerA” and it is configured on your gateway RouterA, 192.168.1.1.
Check out this flowchart I created to map out this application’s functionality:
See my GitHub Repository for this project to learn more.