cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
459
Views
15
Helpful
4
Replies
matty-boy
Beginner

Creating IP Pools

Hi all,

I see from the API docs for DNAC how you would create a global IP pool.

But how do you create/reserve a 'child' IP pool lower down in the hierarchy?

I need to create about 50-100 IP pools. Not a huge number but I would prefer to read a file and POST the new IP pool via API rather than create them manually.

Anybody know how to achieve this?

Thank you in advance,

Matt.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Meheretab Mengistu
Rising star

Hi Matt,

 

I do not write the whole code, so I could not provide you the whole python code. But here is what you will need to provide through API:-

 

POST   https://{DNAC-IP}/api/v2/ippool/group

 

Body should be as follows (I just copied mine for you as a sample):-

 

{
"groupName": "POOL_NAME",
"groupOwner": "DNAC",
"type": "generic",
"siteId": "d4e85192-8f75-4aa4-a2eb-a48c5d102349",
"ipPools": [
{
"parentUuid": "fbc94e31-3a4b-438f-823e-b73fa1df7cf",
"dhcpServerIps": [
"192.168.1.1"
],
"dnsServerIps": [
"8.8.8.8"
],
"ipPoolOwner": "DNAC",
"shared": true,
"gateways": [
"172.16.100.1"
],
"ipPoolCidr": "172.16.100.0/24"
}
]
}

 

HTH,
Meheretab

View solution in original post

@omz 

Unfortunately, I could not find it on the documentation. I captured it using Postman. I run Postman Interceptor chrome extension.

 

 

HTH,
Meheretab

View solution in original post

4 REPLIES 4
Meheretab Mengistu
Rising star

Hi Matt,

 

I do not write the whole code, so I could not provide you the whole python code. But here is what you will need to provide through API:-

 

POST   https://{DNAC-IP}/api/v2/ippool/group

 

Body should be as follows (I just copied mine for you as a sample):-

 

{
"groupName": "POOL_NAME",
"groupOwner": "DNAC",
"type": "generic",
"siteId": "d4e85192-8f75-4aa4-a2eb-a48c5d102349",
"ipPools": [
{
"parentUuid": "fbc94e31-3a4b-438f-823e-b73fa1df7cf",
"dhcpServerIps": [
"192.168.1.1"
],
"dnsServerIps": [
"8.8.8.8"
],
"ipPoolOwner": "DNAC",
"shared": true,
"gateways": [
"172.16.100.1"
],
"ipPoolCidr": "172.16.100.0/24"
}
]
}

 

HTH,
Meheretab

View solution in original post

@Meheretab Mengistu 

hey .. how did you get this endpoint - https://{DNAC-IP}/api/v2/ippool/group

its not documented for i cant find it .. can you please share a link to docs. 

Thanks 

@omz 

Unfortunately, I could not find it on the documentation. I captured it using Postman. I run Postman Interceptor chrome extension.

 

 

HTH,
Meheretab

View solution in original post

Hi @Meheretab Mengistu,

That is AWESOME! Thank you so much for your initial reply (sorry for not replying sooner - I was also trying to find the docs and how you knew to use that API endpoint).

And thank you for showing how you found it using Postman Interceptor. I've literally just added a new IP Pool in the DNAC UI with interceptor running and all the info is there in glorious detail!!

Thank you so much!!

Matt.

Content for Community-Ad