Is it possible to allow a range of VLANs through a switchport on the TSW202/212 without defining each VLAN in the config? For example, VLANs 200-300 should be allowed to pass through port 1. I don’t want to configure 100 VLANs, which at the moment appears to be the only way to do it, at least on the GUI.
On a related note, is there any documentation for changing the config via SSH? I can’t seem to find anything?
Our managed switches TSW202 and TSW212 don‘t have such a functionality, but I spent a little time developing a script that could do it.
Before that, please note that scripting is beyond the scope of the technical assistance we normally provide and this is only a testing example, which I tested myself.
Follow these steps:
Unzip and copy vlan.sh script file to the switch device using WinSCP. vlan.zip (1.4 KB)
Thanks very much for your reply and the detailed script. I’ve passed it on to a colleague for testing. I believe he may have scripted something himself and whilst it seemed to work, he had concerns when the WebGUI took about 5 minutes to load the list of configured VLANs.
I understand the function isn’t officially supported and it may be difficult to answer these questions but:
Aside from the GUI loading slowly (which is completely acceptable from our point of view), do you expect there to be any issues with layer 2 switching performance?
Is an official implementation of this feature on the roadmap or will it not be possible due to contraints of the underlying OS?
I did some testing regarding the Web UI loading time after a fresh factory reset to see if the script had any impact on my switch. From what I can see on my end, everything works smoothly even after running the script, so the issue might be caused by something else.
Now, regarding your points:
This shouldn’t directly affect Layer 2 performance unless the switch is overwhelmed due to hardware limitations. Testing is needed to determine the actual impact, as it depends on the type of traffic and other factors. The script mainly retrieves VLAN IDs using the “uci show” command and then uses another uci command to update the configuration file. Additionally, the number of supported VLANs is defined by the VLAN ID range, which is a characteristic of the VLAN system.
Currently, there are no plans to introduce this functionality. Although it’s not restricted by the OS, developing new features requires resources. Customers needing custom functionality can request a “Custom Development Project” (CDP) by contacting us: Teltonika Networks - LTE Routers, Gateways & Modems for IoT.
I just tested the above script. The script skips the VLAN instances that are not existing on the switch.
Our Use case is:
We need to create ~500 VLANs on Teltonika TSW202.
The Switch is new out of the box so all of the VLANs need to be configured as instances.
I managed to edit the /etc/config/network file in the Backup Tarball. I added all of the VLANs in the backup and used that to restore the switch.
All of the 500 VLANs carry traffic as expected and show up on the GUI. But since the GUI has to load a very long list, it gets sluggish and only responds after 3-4 minutes.
I also tried this:
config bridge-vlan ‘VLAN_Range’
option device ‘br0’
option vlan ‘3005-3300’
list ports ‘port1:t’
list ports ‘port2:t’
This shows up on GUI with no issues but does not carry the VLAN traffic. Perhaps we could ask for a new firmware that can allow us to use a range as above.
I believe the Switch is capable enough (as tested) to carry those VLANs but just need some syntax changes so the GUI doesn’t list every VLAN as a single instance.
If you have any other recommendations, I’m keen to test that out too.
If you want a range of VLANs to be created and listed within a single instance instead of separate instances in the WebUI, it would likely require changes to the WebUI source code.
Although our SDKs (Software Development Kits) for configuring the OS are available online, the required frontend source code modifications involve proprietary elements of our product. As a result, this source code is not publicly accessible, CDP is necessary and can be requested by contacting us: https://teltonika-networks.com/about-us/contacts
Could you please edit the script so that it creates the range of VLANs that user is prompted to input?
The scenario would be a fresh config of a switch with no existing VLANs.
I also tried adding 100 VLANs to see how switch performs. I noticed that this significantly slowed down the device and increased the WebUI load time, but it still functions correctly.
I look forward to your feedback and hope this script proves useful for your needs.