vRealize Network Insight knows all and see all that’s happening within a network. Due to the search engine and the ability to pull out any data on the infrastructure, new use cases pop up now and then. Lately, I’ve been approached by a few organizations that are using Network Insight as an IP Address Management (IPAM) system, or to complete their existing IPAM system and compare and contrast it to the live infrastructure.

Here are a few examples: checking whether which IP addresses are free in a particular IP range. Comparing the IPAM registrations to the IP addresses that are actively in use. Or detecting rogue IP addresses that are in use but not registered. 

You’ll see more of these use cases being described in the future, but I’ll start by showing how you can quickly check for free IP addresses in a range.

Finding Used IP Addresses

Using a relatively simple search query, we can find out the IP addresses that are in use within the network that vRNI is monitoring.

Here is the search: IP Endpoint where IP Address = 10.196.164.0/24

Notice how some IPs have Numbered Network Interfaces. These are tied to an endpoint that vRNI knows. For example, an IP on a router interface, an IP that a VM is using. If it does not have an NNI, it is most likely an IP address that is in use by a physical server.

Finding Free IP Addresses

Typically, you want to find free IP addresses to deploy a new workload. Getting free IPs as quickly as possible is preferred, and there are scenarios where you even want it automated and a part of a pipeline. vRNI Engineer extraordinaire, Amol Vaikar, started a set of IP Address Management tools recently. Amol has begun with a script to quickly extract the free IP addresses on a specified IP range. Here’s how it works:

Commands used

  • git clone https://github.com/amolvaikar/vrni_ip_tools.git
  • python free_ip_finder_tool.py -d 10.196.164.134 -u admin@local -p admin -s 10.196.164.0/28

Before you run these, Git and Python are required. The command to run the free_ip_finder_tool.py script has a few parameters:

  •  -d is the vRNI instance you want to retrieve the IPs from
  • -u is the username to log into vRNI
  • -p is the password to log into vRNI
  • -s is the subnet in which it will search for free IPs. It needs to be in CIDR format and can be anything from /32 to /1. 

Conclusion

Using the combination of vRealize Network Insight to monitor used IP addresses and the free_ip_finder_tool.py script gives you quick access to any free IP addresses in the network. Use this to double-check which IPs are free before doing deployments.



Share the wealth!