aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
272 stars 197 forks source link

how to configure vlan range in one line #2552

Open seungtaek opened 1 year ago

seungtaek commented 1 year ago

Enhancement summary

Hello sir, I don't know there are a way to configure multiple vlan in one line like cli 'vlan 1000-1200'. but I couldn't find it out

Which component of AVD is impacted

eos_cli_config_gen

Use case example

  HEBERGEMENT:
    mac_vrf_vni_base: 10000
    vlan_aware_bundle_number_base: 5000
    l2vlans:
      1200:
        name: HDS
        tags: ['VEN']
      1201:
        name: HDS
        tags: ['VEN']

Describe the solution you would like

As you can see, I had to configure one by one for multiple vlan for a same switch, is there any advice for doing it simple? I need to configure tons of vlan in production.

Describe alternatives you have considered

No response

Additional context

No response

Contributing Guide

ClausHolbechArista commented 1 year ago

Hi @seungtaek, there is no current option for adding a vlan range. Depending on how your project is structured, you might be able to template or generate the data for AVD first.

It is possible to add the capability of accepting a range instead of a single number, but it will take some work, and I cannot give any ETA. We can keep this issue as the feature request.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. The issue will be reviewed by a maintainer and may be closed

c-po commented 11 months ago

Hi @ClausHolbechArista,

we have a similar requirement. There is currently C_A (Customer A) that requested a range of 255 contiguous VLAN ids that can be spun accross multiple sites (VXLAN) but also delivered to some ESX port_groups.

The above mentioned YAML could be autogenerated, but that's non ideal for day 2 operation. I would request a YAML definition something like:

  Tenant_A:
    mac_vrf_vni_base: 10000
    vlan_aware_bundle_number_base: 5000
    l2vlans:
      600:
        name: PROJECT_A_600
        tags: ['ESX']
      601:
        name: PROJECT_B_601
        tags: ['ESX2']
    l2vlan_range:
      700-955:
        name: PROJECT_C
        tags: ['ESX']
        append_vlan_id_description: True # will append the VLAN number to the description

The generated EOS CLI configuration should then be:

vlan 700
  name: PROJECT_C_700
!
vlan 701
  name: PROJECT_C_701
!
...
vlan 955
  name: PROJECT_C_955
!
github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. The issue will be reviewed by a maintainer and may be closed