Prefixes overview shows incorrect "Children" count if the prefix has status "Container" #7522

Closed
opened 2025-12-29 20:24:42 +01:00 by adam · 4 comments
Owner

Originally created by @sealie on GitHub (Jan 16, 2023).

NetBox version

v3.3.5

Python version

3.8

Steps to Reproduce

  1. Create prefix 10.255.1.0/24, 10.255.2.0/24 and 10.255.3.0/24 in VRF-A
  2. Create prefix 10.255.4.0/24, 10.255.5.0/24 and 10.255.6.0/24 in VRF-B
  3. Create prefix 10.255.7.0/24, 10.255.8.0/24 and 10.255.9.0/24 in VRF Global
  4. Create prefix 10.255.0.0/16 with status "Container" in VRF Global
  5. Browse to https:///ipam/prefixes/?status=container
  6. Observe the "Children" count is 3

Expected Behavior

I would expect the "Children" count to be 9 instead of 3, if the 10.255.0.0/16 container prefix is created in the Global VRF as type "Container".

If the 10.255.0.0/16 prefix was set to "Active", I would expect it to only show the child prefixes matching the same VRF as the /16 prefix.

Observed Behavior

The prefixes overview only shows 3 children prefixes, although its status is set to "Container".

Originally created by @sealie on GitHub (Jan 16, 2023). ### NetBox version v3.3.5 ### Python version 3.8 ### Steps to Reproduce 1. Create prefix 10.255.1.0/24, 10.255.2.0/24 and 10.255.3.0/24 in VRF-A 2. Create prefix 10.255.4.0/24, 10.255.5.0/24 and 10.255.6.0/24 in VRF-B 3. Create prefix 10.255.7.0/24, 10.255.8.0/24 and 10.255.9.0/24 in VRF Global 4. Create prefix 10.255.0.0/16 with status "Container" in VRF Global 5. Browse to https://<IPAM URL>/ipam/prefixes/?status=container 6. Observe the "Children" count is 3 ### Expected Behavior I would expect the "Children" count to be 9 instead of 3, if the 10.255.0.0/16 container prefix is created in the Global VRF as type "Container". If the 10.255.0.0/16 prefix was set to "Active", I would expect it to only show the child prefixes matching the same VRF as the /16 prefix. ### Observed Behavior The prefixes overview only shows 3 children prefixes, although its status is set to "Container".
adam added the type: bug label 2025-12-29 20:24:42 +01:00
adam closed this issue 2025-12-29 20:24:42 +01:00
Author
Owner

@enribla commented on GitHub (Jan 16, 2023):

Hi Sealie,
From my point of view it's working properly.
Each VRF is independent from the others, that also affects to the global vrf and it reflects the reality on the routers routing tables

@enribla commented on GitHub (Jan 16, 2023): Hi Sealie, From my point of view it's working properly. Each VRF is independent from the others, that also affects to the global vrf and it reflects the reality on the routers routing tables
Author
Owner

@sealie commented on GitHub (Jan 16, 2023):

Hi Sealie, From my point of view it's working properly. Each VRF is independent from the others, that also affects to the global vrf and it reflects the reality on the routers routing tables

Hello, enribla.

I am well aware of how VRFs work outside and inside Netbox. But choosing "Container" as status instead of "Active" negates showing child prefixes only from the same VRF in "Child prefixes", but shows child prefixes regardless of what VRFs they are in (suitable for linknet prefixes where all child prefixes are in different VRFs) I was just hoping the prefixes overview was going to show the total amount of prefixes regardless of VRF - just like the "Container" status works with the "Child prefixes" tab.

@sealie commented on GitHub (Jan 16, 2023): > Hi Sealie, From my point of view it's working properly. Each VRF is independent from the others, that also affects to the global vrf and it reflects the reality on the routers routing tables Hello, enribla. I am well aware of how VRFs work outside and inside Netbox. But choosing "Container" as status instead of "Active" negates showing child prefixes only from the same VRF in "Child prefixes", but shows child prefixes regardless of what VRFs they are in (suitable for linknet prefixes where all child prefixes are in different VRFs) I was just hoping the prefixes overview was going to show the total amount of prefixes regardless of VRF - just like the "Container" status works with the "Child prefixes" tab.
Author
Owner

@enribla commented on GitHub (Jan 17, 2023):

Hi Sealie,

Understood. It shows all the child prefixes regardless of the vrf but in the overview it only counts the prefixes of the same vrf
Yes, it is not consistent.
Thanks for the clarification

@enribla commented on GitHub (Jan 17, 2023): Hi Sealie, Understood. It shows all the child prefixes regardless of the vrf but in the overview it only counts the prefixes of the same vrf Yes, it is not consistent. Thanks for the clarification
Author
Owner

@DanSheps commented on GitHub (Jan 20, 2023):

While this is a valid bug currently, I think we should wait until the changes to the prefix and IP address model go through in 3.5.

Currently, the associations between IP Address and Prefixes or Prefix and Prefix are a "soft" relationship.

The FR for 3.5 will change that to a more hard relationship.

As such, I am going to close this out for now.

@DanSheps commented on GitHub (Jan 20, 2023): While this is a valid bug currently, I think we should wait until the changes to the prefix and IP address model go through in 3.5. Currently, the associations between IP Address and Prefixes or Prefix and Prefix are a "soft" relationship. The FR for 3.5 will change that to a more hard relationship. As such, I am going to close this out for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7522