Reply
Highlighted
Accepted Solution

Find subnet given device IP

AKirkby
Techie
Posts: 1
4466     0

Hi,

 

I'm doing a piece of work to locate a bunch of devices across our network. I have a list of IP addresses but don't have the masks associated with each device.

With the mask I can soon determine which subnet the device is on and where it is in our network.

 

Is anyone able to suggest a method of using the API to return the subnet or mask for a given IP as per the data held in InfoBlox?

 

Andy.

Re: Find subnet given device IP

Adviser
Posts: 213
4467     0
You can use the “contains_address” query to find the network (and mask) that any given IP belongs to in the database. Look at the network object in the WAPI or PAPI documentation to see information on its usage. I think that’s what you’re looking for.

Re: Find subnet given device IP

Adviser
Posts: 424
4467     0

via - REST api

https://infoblox_IP/wapi/v2.3.1/network?network~=3.1.1.1&_return_fields%2B=network

 

Returns

network: "3.1.1.128/25"


Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: Find subnet given device IP

cmacnevin
Techie
Posts: 3
4467     0

Isn't that just a string search? The host address 3.1.1.1 is not actually in the network 3.1.1.128/25.

That network contains host addresses in the range 3.1.1.128 - 3.1.1.255.

Showing results for 
Search instead for 
Do you mean 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin