I have a CRS317 to configure and would like to do that without spending a day.
Out of the 16 10g ports on it, 14 are trunks. 2 are not, they are to go to one specific VLAN. The use case is basically that all the ports are either an uplink to a router (so trunk because the same VLAN’s are used there) or to go virtualization servers, where the virtual machiens are isolated by VLAN.
Pretty much ALL the VLAN are also in the switch, because this should allow me (please correct) to offload the (simple) routing to the hardware - quite a nice feature that there is.
Now the problem:
I face to have to add a number of VLAN to 14 pots. UI? ah, no, thanks.
Command line? Not easily (and no script experience here with Mikrotik), the add VLAN command takes a list of ports. The best I can think of is basically using a command line prepared statement per VLAN and prepare it for all the ports, so I just replace the VLAN ID.
Any better solution? There is no “*, -sfp-sfpplus1,ether1” (all MINUS sfp-stpplus1 and ether1)?
If it0s an o e-off job, then construct CLI commands using standard tools on your desktop (in linux it’s almost trivial, I honestly don’t know about windows or mac) and copy-paste the redult into CLI window.
One thing that might help: if port list is the same for multiple VLANs, you can use single command
/interface/bridge/vlan
add bridge=bridge tagged=<list of ports> vlan-ids=VID1,VID2,VID3,VID4
# or when VLANs are a contigous range of IDs
add bridge=bridge tagged=<list of ports> vlan-ids=VID1-VID4
Another helping fact: you don’t have to explicitly add access ports as untagged ports to VLAN, that’s done automaticslly by ROS due to port’s pvid setting.
Well, Windows is the origin of the bsest shell ever - PowerShell, now also available on Linux Not sure about Mac.
Think the same - it is not a ONE OFF - I may add or remove VLAN’s quite a lot - but it is good enough that a prepared command line in a text file may suffice.
I know about the PVID automatism - that is the trivial part (there are only so many physical ones). My problem really is the tagged side. This is a core switch for an infrastructure that is essentially virtualized - so 95% of the traffic flows in or out of machines where the VM may be or not (they move automatically depending on load or administrative settings on the host. Which means all ports and the one port trunking up must have all VM’s tagged.