- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Export a list of all subnets in /24 from all IPAM Networks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-2018 09:04 AM
Hi All,
I' am trying to get a list of all subnets in /24 format from all networks within IPAM. I have a large number of networks which are /23, /22 and /21 and I need to extract a csv list as shown below (example network 10.0.0.0/22) .
Network
10.0.0.0/24
10.0.1.0/24
10.0.2.0/24
10.0.3.0/24
Thanks in advance.
Re: Export a list of all subnets in /24 from all IPAM Networks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-2018 09:10 AM
Hello,
You can search for networks based on their netmask.
Here is the WAPI call
https://grid-master/wapi/v2.7/network?network~=.0/24
Here is a sample curl command.
curl -k -u admin:Infoblox -X GET "https://grid-master/wapi/v2.7/network?network~=.0/24"
Hope this helps,
Krishna Vasudevan
Re: Export a list of all subnets in /24 from all IPAM Networks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-2018 09:58 AM
Hi Krishna,
Thanks for the reply.
The sample code will only return networks configured to /24 and doesn't return networks configured to /23, /22 and /21.
What I' am looking for is a list of all /24 networks and also some way of extracting all /24 ranges within /23, /22 and /21.So if I have a network 10.0.0.0/22 in IPAM, I want the script to output the below data.
10.0.0.0
10.0.1.0
10.0.2.0
10.0.3.0
Thanks.
Re: Export a list of all subnets in /24 from all IPAM Networks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-2018 11:52 AM
Hello,
For regular expression searches, only the IPv4 Address portion is supported. Searches for the CIDR portion is always an exact match.
To get the /24 within a network container, you can pass on the container information in the WAPI call as below.
curl -k -u admin:infoblox -X GET "https://grid-master/wi/v2.7/network?network~=.0/24&network_container=10.0.0.0/22"