local count (number here at the vlan you want to start at)
foreach i in=[interface bridge vlan find] do={ local vn [interface bridge vlan find vlan-ids=$count] ; interface bridge vlan set numbers=$vn tagged=ether1,ether2,ether3,ether4,ether5; if ($count<=10) do=[set count ($count + 1)] }
Take a look over that, check the bolds as that is what you need to edit, the count variable will be the starting vlan number and at the end where it adds 1 to count to increment it each time it runs the loop, you can control the higher vlan number to stop at.
script could be better but it works so that’s a bonus
edited to take the code out of the code block as it removes the word formatting
Could you break that down.. im trying to do the similar thing where I have vlans on numbers
35 X bridge 400
36 X bridge 401
37 X bridge 600
38 X bridge 601
and id like to tagged them all to lets say “combo2” for instance.
I didnt get how the find where vlan-ids~“(2[5-9]|[3-4][0-9]|50)” translates to 25-50
/interface bridge vlan: This is the command that tells the router you’re working with VLAN settings in the context of a bridge interface.
set: This is a command used to modify or set parameters. In this case, you’re about to modify some parameters related to VLANs.
[find where vlan-ids~“(2[5-9]|[3-4][0-9]|50)”]: This part is a filter. It selects the VLANs based on their IDs. The IDs selected are in the range 25 to 50. The syntax 2[5-9] means any number starting with 2 followed by a digit from 5 to 9, [3-4][0-9] means any number starting with 3 or 4 followed by any digit, and 50 is just 50.
tagged=ether1,ether2,ether3,ether4,ether5: This part sets the tagged interfaces for the selected VLANs. It means that traffic belonging to these VLANs will be tagged when transmitted on the specified Ethernet interfaces (ether1, ether2, ether3, ether4, and ether5).