Im trying to just basically remove a bulk of vlans from a single interface and ive been fighting with this command for hours already..
set [find where vlan-ids~"(201|2[0-9][2-9]|290)"] tagged=sfp1,sfp2,sfp3,sfp4,sfp5,sfp6,sfp7,sfp8,sfp9,sfp10,sfp11,sfp12,sfp13,sfp14,s
fp15,sfp16,sfp17,sfp18,sfp19,sfp20
basically what is there now.. are several vlans from 201-290.. and they are also tagged on sfp-sfpplus2. Im trying to just remove the tags on that interface.. and I dont know what im missing.
Tell me what you think of this.. I think it was pretty clever this approach to removing vlans from a specific interface.. guy from Reddit helped me with it .
{
/interface bridge vlan
:local iface "sfp-sfpplus2"; # put here the interface you want to remove
# on next row, set your conditions
:foreach i in=[find where (vlan-ids>="201" and vlan-ids<="290")] do={
# here goes magic
set $i tagged=([:pick [get $i tagged] 0 [:find [get $i tagged] $iface -1]],[:pick [get $i tagged] ([:find [get $i tagged] $iface -1] + 1) [:len [get $i tagged]]])
}
}
beyond my scope, you lost me at set $i rextended is one of the few that was born sucking on a CLI soother… Either that or its the vino where he hails from.