netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.68k stars 2.53k forks source link

Allow non-unique VLAN names within a VLAN group #11581

Closed kochargs closed 1 year ago

kochargs commented 1 year ago

NetBox version

v3.4.2

Feature type

Change to existing functionality

Proposed functionality

Vlans with same names should be allowed under same vlangroup. I could get around this by not assigning vlans to a vlangroup or by using tags instead

but any other workaround makes me lose the amazing view I get with vlangroups that shows

  1. vlan ranges for the specific group
  2. utilization report of vlans that belong to each group.

I understand certain vendors do not allow same vlan name but understand that we could be

  1. multi vendor
  2. vlans with different vlan IDs but same name might exist on different switches within the same site.
  3. People have been used of documenting information in excel sheets and I want to be able to make it super easy for them to transition to netbox without asking them to go and make the vlan names unique in their excel sheets and then in the network ( which is almost impossible to accomplish in a short span and hence makes selling netbox equally difficult )

Use case

The intention is to get my NOC team to stop using offline excel vlan databases and promote the usage of netbox which allows me to interface better with tools like ansible tower etc. Bring all the network information into netbox making it the source of truth for my network as a code goal.

Database changes

models.uniqueconstraints

remove the constraint over name to be unique.

External dependencies

None

kochargs commented 1 year ago

9968

abhi1693 commented 1 year ago

This is a good ask because I too have to do this in our infra. I'm currently forced to append the VLAN name in the DB with a number which in reality does not get applied to the network devices. Just to make NetBox happy, we have to add the ugly hack which sort of breaks the reason we use NetBox. This was done because we already had the network in place and other automation tools before NetBox in into the picture. To change this is a significant effort at the moment and hence the ugly change.

If this can be accepted, I can submit the PR to remove the constraint from the code.

PieterL75 commented 1 year ago

For me that is totally not a go. My layer2 domain has to have unique names (Juniper vlans are based on names, with the ID as a parameter). Either you have to define separate vlan groups per site, so that you can use the same vlan name again. If that is not possible, and this is a requirement for you, then it has to be a non-default checkbox that has to be set on the vlan-group. (similar to the IP uniqueness on the vrf)

patrickpreuss commented 1 year ago

Also do not see the requirement. Most NOCs i am aware construct unique set of VLAN IDs and NAMES per Site/Domain/VRFs/Tennant.
Maybe you can give some example/reasoning why this useful?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

github-actions[bot] commented 1 year ago

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.