You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on automation of creating prefixes using the "next available prefix API" and it is working great - except I have been asked to ensure that the third octet of each prefix is matching for a given application workload across these whenever possible.
We have our parent prefixes organized by lifecycle environment (dev, tst, stg, prd). The ask is to keep the third octet the same across parent prefixes, so the result is something like this rather than using the next available:
dev - 10.1.10.0/24
tst - 10.5.10.0/24
stg - 10.10.10.0/24
prd - 10.20.10.0/24
I am not sure how feasible this is long term -- sometimes:
Production may be bigger to accommodate scale out requirements.
Proof of concepts might be done in dev only.
There may only be a test and a production.
I am not a netbox administrator or network engineer and I am not sure a good approach for this using netbox.
The best I can think of would be to group these child prefixes into the same netbox IPAM site, and then see if there is some type of optimizer within the netbox APIs to first search for child prefixes which were also available in other parent prefixes in the same site and if none are available across all child prefixes, try another one. If none can be found, then just assign the next available in each child prefix.
Alternatively I could try forking the Terraform provider to do similar logic in Go Lang on the client side as Terraform is used to find the next available space and reserve in netbox.
For those experienced in netbox; how would you best approach this ask?
Is there a built-in optimizer feature, or is this pattern outside of what would be considered a good practice in prefix allocation and goes against netbox philosophy?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on automation of creating prefixes using the "next available prefix API" and it is working great - except I have been asked to ensure that the third octet of each prefix is matching for a given application workload across these whenever possible.
We have our parent prefixes organized by lifecycle environment (dev, tst, stg, prd). The ask is to keep the third octet the same across parent prefixes, so the result is something like this rather than using the next available:
dev - 10.1.10.0/24
tst - 10.5.10.0/24
stg - 10.10.10.0/24
prd - 10.20.10.0/24
I am not sure how feasible this is long term -- sometimes:
I am not a netbox administrator or network engineer and I am not sure a good approach for this using netbox.
The best I can think of would be to group these child prefixes into the same netbox IPAM site, and then see if there is some type of optimizer within the netbox APIs to first search for child prefixes which were also available in other parent prefixes in the same site and if none are available across all child prefixes, try another one. If none can be found, then just assign the next available in each child prefix.
Alternatively I could try forking the Terraform provider to do similar logic in Go Lang on the client side as Terraform is used to find the next available space and reserve in netbox.
For those experienced in netbox; how would you best approach this ask?
Is there a built-in optimizer feature, or is this pattern outside of what would be considered a good practice in prefix allocation and goes against netbox philosophy?
Beta Was this translation helpful? Give feedback.
All reactions