Community discussions

MikroTik App
 
elico
Member Candidate
Member Candidate
Topic Author
Posts: 147
Joined: Mon Nov 07, 2016 3:23 am

Adding vlan interfaces by range to a master interface by rest or script

Sun Mar 17, 2024 11:05 pm

first the rest API script at:
https://github.com/elico/routeros-create-vlans-range

and a simple script:
:local masterInerface "test";
:local defaultDisabled "yes";

:for LoopCount from=1000 to=1099 step=1 do={
	/interface/vlan/add interface=$masterInerface name="$masterInerface_vlan$LoopCount" vlan-id=$LoopCount disabled="$defaultDisabled";
}

Who is online

Users browsing this forum: No registered users and 12 guests