Assign ASN's to device(s) for use in a BGP/VXLAN/EVPN network. #7006

Closed
opened 2025-12-29 19:47:48 +01:00 by adam · 4 comments
Owner

Originally created by @ThomasADavis on GitHub (Sep 21, 2022).

NetBox version

v3.3.4

Feature type

Data model extension

Proposed functionality

Add ability to assign ASN's to device(s), not just sites for use in VXLAN/EVPN network.

Use case

In modeling VXLAN/EVPN tunnels/networks, a unique ASN is assigned to every device running BGP/VXLAN/EVPN tunnels. This assignment currently can't be done on a device basis, only to a site. Please note, for the spines you may have two or more devices with the same ASN assigned.

I have used a custom field to deal with this, but the ASN does not show up with the device.

When looking at a device, a possible location for the ASN to show up would in the Management field, just like a Primary IPv4/IPv6 address.

Database changes

Addition of device(s) object reference to the ASN object.

External dependencies

None that I know of.

Originally created by @ThomasADavis on GitHub (Sep 21, 2022). ### NetBox version v3.3.4 ### Feature type Data model extension ### Proposed functionality Add ability to assign ASN's to device(s), not just sites for use in VXLAN/EVPN network. ### Use case In modeling VXLAN/EVPN tunnels/networks, a unique ASN is assigned to every device running BGP/VXLAN/EVPN tunnels. This assignment currently can't be done on a device basis, only to a site. Please note, for the spines you may have two or more devices with the same ASN assigned. I have used a custom field to deal with this, but the ASN does not show up with the device. When looking at a device, a possible location for the ASN to show up would in the Management field, just like a Primary IPv4/IPv6 address. ### Database changes Addition of device(s) object reference to the ASN object. ### External dependencies None that I know of.
adam added the type: featurestatus: duplicate labels 2025-12-29 19:47:48 +01:00
adam closed this issue 2025-12-29 19:47:49 +01:00
Author
Owner

@jsenecal commented on GitHub (Sep 21, 2022):

This is a per-implementation detail and can be represented with a custom field like you did, and you can fix the tables to display the custom field.

For instance, MAC VRFs (Juniper and others) allows multiple ASNs per device for EVPN scenarios...

I don't think this brings anything else to the table to be honest.

@jsenecal commented on GitHub (Sep 21, 2022): This is a per-implementation detail and can be represented with a custom field like you did, and you can fix the tables to display the custom field. For instance, MAC VRFs (Juniper and others) allows multiple ASNs per device for EVPN scenarios... I don't think this brings anything else to the table to be honest.
Author
Owner

@ThomasADavis commented on GitHub (Sep 21, 2022):

Hmm.. so, what your saying is a common use case (VXLAN/EVPN), netbox can't be used to model it unless custom fields are used, that can't be cross linked between objects? ie, you can't tell the custom field value to show up in both the ASN and the device object; you can assign a the custom field to both objects, but if you fill it out in ASN's, it doesn't show up in the device fields.. so I'm stucking doing is adding two custom fields, one linking the ASN to the device, and one linking the device to ASN..

And when you say 'fix the tables', what tables are talking about?

@ThomasADavis commented on GitHub (Sep 21, 2022): Hmm.. so, what your saying is a common use case (VXLAN/EVPN), netbox can't be used to model it unless custom fields are used, that can't be cross linked between objects? ie, you can't tell the custom field value to show up in both the ASN and the device object; you can assign a the custom field to both objects, but if you fill it out in ASN's, it doesn't show up in the device fields.. so I'm stucking doing is adding two custom fields, one linking the ASN to the device, and one linking the device to ASN.. And when you say 'fix the tables', what tables are talking about?
Author
Owner

@jsenecal commented on GitHub (Sep 22, 2022):

@ThomasADavis Perhaps your use case was not properly demonstrated.

Let me explain. Your PER DEVICE requirement for an ASN is tied to your own way of doing things and doesn't apply to everyone. I cited an example with MAC VRFs scenarios.

What you are asking is to have a Many to Many relationship between ASNs and Devices/VirtualMachines. Where both have references to each other, correct ? This requires significant changes to the models, database schema and APIs.

When using Custom Fields, you say that the "ASN does not show up with the device". In which view ? Can you screenshot what you mean ?

By fixing the tables I meant clicking on the "Configure Table" button at the top right corner of the table which lists the Devices to add your custom field in the table columns.

Let us know,

@jsenecal commented on GitHub (Sep 22, 2022): @ThomasADavis Perhaps your use case was not properly demonstrated. Let me explain. Your PER DEVICE requirement for an ASN is tied to your own way of doing things and doesn't apply to everyone. I cited an example with MAC VRFs scenarios. What you are asking is to have a Many to Many relationship between ASNs and Devices/VirtualMachines. Where both have references to each other, correct ? This requires significant changes to the models, database schema and APIs. When using Custom Fields, you say that the "ASN does not show up with the device". In which view ? Can you screenshot what you mean ? By fixing the tables I meant clicking on the "Configure Table" button at the top right corner of the table which lists the Devices to add your custom field in the table columns. Let us know,
Author
Owner

@jeremystretch commented on GitHub (Oct 3, 2022):

There's already a good amount of discussion around this idea on #8782. Please add any further comments to that issue; I'm going to close this one out as a duplicate to avoid fracturing the conversation. Thanks!

@jeremystretch commented on GitHub (Oct 3, 2022): There's already a good amount of discussion around this idea on #8782. Please add any further comments to that issue; I'm going to close this one out as a duplicate to avoid fracturing the conversation. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7006