I'm trying to add automatically 8 address to 32 different address list.
This is what i got so far, I'm trying to make a division reminder with p, q and j variables to count to 8 until I add the next address-list, but i'm stucked in here, I would use some help here
Code: Select all
:global p 0;
:global q 0;
:global 0;
/ip firewall address-list add list=Plan300k_01 address=192.168.1.2
:for e from=1 to=32 do={\
:if ([$e] < 10) do={\
:for n from=3 to=74 do={\
:set p (/ip firewall address-list print count-only);
:set q ($p/8);
:set j ($q*8);
:if ([$p - $j]!= 0) do={\
/ip firewall address-list add list="Plan300k_0$e"\
address="192.168.1.$n"}
}
}
:if ([$e] > 9) do={\
:for n from=75 to=254 do={\
:set p (/ip firewall address-list print count-only);
:set q ($p/8);
:set j ($q*8);
:if ([$p - $j]!= 0) do={\
/ip firewall address-list add list="Plan300k_0$e"\
address="192.168.1.$n"}
}
}
Any other ideas?
Thanks for your help