Add trunk port to multiple existing VLANs

Hello,

I have a really stupid/newbie question, so I apologize in advance: is there a command to add a tagged member to an existing set of multiple vlans?

Example, i have a ton of existing vlans defined as such:

/interface bridge vlan
add bridge=bridge1 comment=VLAN100 tagged=sfp-sfpplus16,sfp-sfpplus15 vlan-ids=100
add bridge=bridge1 comment=VLAN101 tagged=sfp-sfpplus16,sfp-sfpplusN vlan-ids=101
and so forth.

I understand i can modify the element with ‘edit ’, and i can use the command “set numbers=N tagged=sfp-sfpplus15” by example, however this seems remove the existing members, meaning it would be necessary to identify and define the existing members first, making this approach a tad cumbersome .. or do it one by one via web-gui, which is a PITA over a large number of VLANs.

Quite simply, I am probably missing something glaringly obvious; what I would like to do is something pretty much similar to cisco ‘switchport trunk allowed vlan 101,102,103,N,N,N’

So in short, what is the “best”/“easiest” method to provision a new tagged interface to a bunch of specified VLAN’s?

Adding a tagged vlan to an existing trunk consists of a number of steps…

  1. Does the new vlan exist, if not create it and add to the correct interface, usually a bridge
  2. Create the necessary dhcp type settings for the new VLAN network.
  • ip pool
    -ip address (interface is vlan)
    -dhcp server (interface is vlan)
    -dhcp server-network
  1. Add vlan to the lan interface list member and any other appropriate interface list
  2. Adjust bridge port settings, if the port is already listed that the VLAN is travelling through (as in already is an existing trunk port) then nothing more is required here
  3. Adjust bridge vlan settings. This can be tricky, as bridge vlan settings are by ID, thus if this vlan doesnt already exist then you either create a new bridge vlan config line and that is not wrong and is clear, BUT also could add the vlan-id to an existing line if appropriate. There is no shortcut here because of the relationship between bridge port, bridge vlan and tagged and untagged ports.

The VLAN already exists.

As the hosts attached to the port(s) is a hypervisor host, I need to add a few dozen existing VLANs to the respective port(s) when a new hypervisor host is provisioned. And I have not found any efficient way to do this after the VLAN is created.. If it was only a couple VLANs it would be OK to do it via the WebUI or the command line using the “set” command and just copy the existing members, but over a few dozen of these VLAN’s I was hoping for something more convenient than modifying one VLAN at a time.

I am aware i can do

set <VLAN "id number" (not tag)> tagged=sfp-sfpplusN

which almost does what I want to, except it only sets the interfaces listed in the command, it does not add it to the existing list of tagged interfaces, which is what i want to do. Thus to use “set” i would have to manually investigate each vlan and find out what other ports are currently trunked on that vlan before i run the “set” command for that VLAN (and repeat this process over X amount of vlans). I suppose it could be scripted.

If the “set” command had more of an “add” functionality option to it, it would have been perfect, and I would be perfectly happy with that.

On cisco, aruba etc. this would be quite easy to just do something similar to

switchport trunk allowed vlan <vlan range or comma separated list here>

Basically I will have to script this logic?