Add site to VRF model #6586

Closed
opened 2025-12-29 19:42:40 +01:00 by adam · 6 comments
Owner

Originally created by @abhi1693 on GitHub (Jun 22, 2022).

NetBox version

v3.2.5

Feature type

Change to existing functionality

Proposed functionality

Add site assignment to VRF models as multiple sites can use the same VRF and then tie it to a tenant. In my use case, I have VRF VRF1300 which should be assigned to tenant1 in site Fremont and to tenant2 in site Dublin.

Use case

Although it is possible to create multiple VRFs with the same name, filtering them by site would provide a more granular control on where the VRF instance belongs to even in cases a tenant is not assigned to it.

Database changes

Add site as FK on VRF

External dependencies

No response

Originally created by @abhi1693 on GitHub (Jun 22, 2022). ### NetBox version v3.2.5 ### Feature type Change to existing functionality ### Proposed functionality Add `site` assignment to VRF models as multiple sites can use the same VRF and then tie it to a tenant. In my use case, I have VRF `VRF1300` which should be assigned to tenant1 in site Fremont and to tenant2 in site Dublin. ### Use case Although it is possible to create multiple VRFs with the same name, filtering them by site would provide a more granular control on where the VRF instance belongs to even in cases a tenant is not assigned to it. ### Database changes Add `site` as FK on VRF ### External dependencies _No response_
adam added the type: featurestatus: revisions needed labels 2025-12-29 19:42:40 +01:00
adam closed this issue 2025-12-29 19:42:40 +01:00
Author
Owner

@DanSheps commented on GitHub (Jul 2, 2022):

This likely isn't going to happen. The VRF model already replicates real world implementation pretty well.

Consider this, if you have VRF1300 in Fremont and Dublin, are they using the same RD or RT's? If no (which I suspect is the case), you should create a new VRF.

@DanSheps commented on GitHub (Jul 2, 2022): This likely isn't going to happen. The VRF model already replicates real world implementation pretty well. Consider this, if you have VRF1300 in Fremont and Dublin, are they using the same RD or RT's? If no (which I suspect is the case), you should create a new VRF.
Author
Owner

@abhi1693 commented on GitHub (Jul 2, 2022):

@DanSheps In our organization, we do not use RD or RT and our VRF modelling is identical between all our sites because we don't let routes leak between them.

This is a real life example atleast within our organization. We have a customer in new Jersey who is in vrf VRF1302 and is allocated 2 VMs. I have another customer in Fremont in VRF1302 which is used to provide 1 day trials to our customers. So, the tenant assignment within Fremont changes frequently. In Dublin, we use the same vrf for internal development purposes. Keep in mind, there is no RD or RT assigned here.

Now, using automation how would I distinguish between the already created VRFs that I need to update only the one being used in Fremont. Because when the automation runs it doesn't have the information for the old customer just the new one. So, this keeps creating multiple VRFs in the system now. And, we have to manually check and clean these almost everyday.

I asked for the changes only based on my experience with my organization's way of setup which to me is a real world application.

@abhi1693 commented on GitHub (Jul 2, 2022): @DanSheps In our organization, we do not use RD or RT and our VRF modelling is identical between all our sites because we don't let routes leak between them. This is a real life example atleast within our organization. We have a customer in new Jersey who is in vrf VRF1302 and is allocated 2 VMs. I have another customer in Fremont in VRF1302 which is used to provide 1 day trials to our customers. So, the tenant assignment within Fremont changes frequently. In Dublin, we use the same vrf for internal development purposes. Keep in mind, there is no RD or RT assigned here. Now, using automation how would I distinguish between the already created VRFs that I need to update only the one being used in Fremont. Because when the automation runs it doesn't have the information for the old customer just the new one. So, this keeps creating multiple VRFs in the system now. And, we have to manually check and clean these almost everyday. I asked for the changes only based on my experience with my organization's way of setup which to me is a real world application.
Author
Owner

@DanSheps commented on GitHub (Jul 2, 2022):

Have you thought of using a object custom field. I think it would be more then sufficient for your use case.

@DanSheps commented on GitHub (Jul 2, 2022): Have you thought of using a object custom field. I think it would be more then sufficient for your use case.
Author
Owner

@abhi1693 commented on GitHub (Jul 2, 2022):

I have been using just that already. But I thought of getting it added to the core code as well.

@abhi1693 commented on GitHub (Jul 2, 2022): I have been using just that already. But I thought of getting it added to the core code as well.
Author
Owner

@jeremystretch commented on GitHub (Jul 7, 2022):

Add site assignment to VRF models as multiple sites can use the same VRF

There is no relationship between a site an VRF, because sites cannot "use" VRFs. One or more VRFs may be present on one or more devices within a site, but may also be present at other sites. It wouldn't make sense to tie a VRF to a particular site.

You haven't actually explained your use case. I suspect there's a better solution to what you're trying to accomplish.

@jeremystretch commented on GitHub (Jul 7, 2022): > Add site assignment to VRF models as multiple sites can use the same VRF There is no relationship between a site an VRF, because sites cannot "use" VRFs. One or more VRFs may be present on one or more devices within a site, but may also be present at other sites. It wouldn't make sense to tie a VRF to a particular site. You haven't actually explained your use case. I suspect there's a better solution to what you're trying to accomplish.
Author
Owner

@jeremystretch commented on GitHub (Jul 27, 2022):

Closing this out as there's been no further elaboration on the use case.

@jeremystretch commented on GitHub (Jul 27, 2022): Closing this out as there's been no further elaboration on the use case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6586