Rapid VLAN Creation Script

Hello,

in trying to make a script which can generate new VLAN names and ID’s

so far, my terminal command is:

interface vlan add name=Laner vlan-id=2 copy-from=vlan1 interface=ether1

im trying to make a cycle to incrementally make new vlans by adding a number after the name and changing the vlan id

my pseudo code is

interface vlan add name=Laner$i vlan-id=$i copy-from=vlan1 interface=ether1 :set i 0; :while ($i
< 50) do={:put $i; :set i ($i + 1)};

any pointers?

Thank You

JFer

:for i from 1 to 50 do={
     /int vlan add name=("Laner" . $i) vlan-id=$i interface=ether1
     }

:local startvlan 100
:for i from=0 to=50 do={

:log info ("adding vlan " . ($startvlan + $i))

/interface vlan add name=("Laner" . ($startvlan + $i)) interface=0-inside vlan-id=($startvlan + $i) disabled=no
}

haha, saw you posted on too. cool, i like yours better, its shorter.

Excellent, just what i needed

Thank You Both

JFer