Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent/Child Prefixes not belonging to the same VRF #4747

Closed
xjs678qr opened this issue Jun 11, 2020 · 3 comments
Closed

Parent/Child Prefixes not belonging to the same VRF #4747

xjs678qr opened this issue Jun 11, 2020 · 3 comments
Labels
status: duplicate This issue has already been raised

Comments

@xjs678qr
Copy link

Environment

Python version: 3.6.9
NetBox version: 2.8.5

Steps to Reproduce

Create a container prefix in IPAM in the Global VRF (10.8.0.0/13) for Tenant A.
Create a container prefix in IPAM in the VRF 'Branches' (10.8.128.0/19) for Tenant A.

Expected Behavior

The child prefix 10.8.128.0/19 is considered as a child prefix of 10.8.0.0/13 and de-counted from the available IP space in 10.8.0.0/13.

Observed Behavior

When opening 10.8.0.0/13, 10.8.128.0/19 is listed amongst the child prefixes. However, the utilization for 10.8.0.0/13 is listed as 0% and in the collapsed prefix view, 10.8.128.0/19 is listed at top level.
If I alter 10.8.0.0/13 to the same VRF ('Branches') as 10.8.128.0/19, the utilization is calculated as exptected.

@jsenecal
Copy link
Contributor

Hi @xjs678qr, could this be related to what is discussed there? #1073 or there? #2562

@DanSheps
Copy link
Member

It is a duplicate of #2562

The reason for it is the way we count IP prefixes and VRF membership. In an effort to be as efficient as possible, we maintain a list of VRF's and pop the VRF once we "exit" that VRF, so if you have:

  • 10.8.0.0/13, VRF: Global
  • 10.8.0.0/19 VRF: Branches
  • 10.8.1.0/24 VRF: Global
  • 10.8.128.0/19 VRF: Branches

By the time we hit "branches" we have already exited the VRF. There will be some new logic eventually, but not quite yet as it is quite involved.

@DanSheps
Copy link
Member

Duplicate of #2562

@DanSheps DanSheps marked this as a duplicate of #2562 Jun 15, 2020
@DanSheps DanSheps added the status: duplicate This issue has already been raised label Jun 15, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: duplicate This issue has already been raised
Projects
None yet
Development

No branches or pull requests

3 participants