Inherit VRF for child prefix from parent prefix #4678

Closed
opened 2025-12-29 19:19:25 +01:00 by adam · 3 comments
Owner

Originally created by @Ordauq on GitHub (Mar 18, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.10.6

Feature type

Change to existing functionality

Proposed functionality

When adding new child prefixes inherit VRF from parent prefix (/ipam/prefixes/add/?prefix=192.168.0.0/30)

Use case

In my environment we have many parent prefixes (container type) each of which is in different VRF.
When I or my colleagues creating new child prefix (for example /30 child in /24 parent prefix) VRF field is not inherited from parent which leads to inconsistency.
We need manually to choose right VRF for every child, otherwise it land to Global default VRF.

Database changes

I believe it not needed

External dependencies

No response

Originally created by @Ordauq on GitHub (Mar 18, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.10.6 ### Feature type Change to existing functionality ### Proposed functionality When adding new child prefixes inherit VRF from parent prefix (/ipam/prefixes/add/?prefix=192.168.0.0/30) ### Use case In my environment we have many parent prefixes (container type) each of which is in different VRF. When I or my colleagues creating new child prefix (for example /30 child in /24 parent prefix) VRF field is not inherited from parent which leads to inconsistency. We need manually to choose right VRF for every child, otherwise it land to Global default VRF. ### Database changes I believe it not needed ### External dependencies _No response_
adam added the type: bugstatus: accepted labels 2025-12-29 19:19:25 +01:00
adam closed this issue 2025-12-29 19:19:25 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 25, 2021):

When adding new child prefixes inherit VRF from parent prefix (/ipam/prefixes/add/?prefix=192.168.0.0/30)

This is already the case when clicking the "add prefix" button when viewing a prefix within the NetBox UI: The link automatically sets the parent's VRF.

@jeremystretch commented on GitHub (Mar 25, 2021): > When adding new child prefixes inherit VRF from parent prefix (/ipam/prefixes/add/?prefix=192.168.0.0/30) This is already the case when clicking the "add prefix" button when viewing a prefix within the NetBox UI: The link automatically sets the parent's VRF.
Author
Owner

@Ordauq commented on GitHub (Mar 25, 2021):

You are right, if I'm clicking on this button everything working as expected. (first available prefix is chose)
Thanks for pointing this out.

But if I'm choosing specific prefix from list it don't work.
For example, first available network is /29 (add prefix button action) but I'm want to create subnet with size /28 or more, so I'm need to find this network manually (url - /ipam/prefixes/add/?prefix=availiable_prefix/28)

@Ordauq commented on GitHub (Mar 25, 2021): You are right, if I'm clicking on this button everything working as expected. (first available prefix is chose) Thanks for pointing this out. But if I'm choosing specific prefix from list it don't work. For example, first available network is /29 (add prefix button action) but I'm want to create subnet with size /28 or more, so I'm need to find this network manually (url - /ipam/prefixes/add/?prefix=availiable_prefix/28)
Author
Owner

@jeremystretch commented on GitHub (Mar 25, 2021):

This sounds similar to #5703 then.

@jeremystretch commented on GitHub (Mar 25, 2021): This sounds similar to #5703 then.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4678