Hi there,
I am trying go generate IP-adresses in console. what is wrong in this line?
[admin@mikrotik] > :for i from=2 to=254 do={/ip address add address=192.168.0.$i/24 interface=Lan}
Hi there,
I am trying go generate IP-adresses in console. what is wrong in this line?
[admin@mikrotik] > :for i from=2 to=254 do={/ip address add address=192.168.0.$i/24 interface=Lan}
Try with :
:for i from=2 to=254 do={/ip address add address((“192.168.0.”) . $i . (“/24”)) interface=Lan}
-RoddyZ
Thanks RoddyZ:
But i get “invalid expression” ![]()
This code work, you must put a blank space where i use
:for i from=2 to=254 do={/ip address add address((“192.168.0.”).$i.(“/24”)) interface=Lan}
-RoddyZ
I solved it ![]()
the code is:
:for i from=2 to=254 do={/ip address add address=(192.168.0. . $i . "/24" ) interface=Lan}
It was the space that did it
) “address=(192.168.0.[space].[space]$i[space].[space]”/24"
Thanks RoddyZ..
Im figured that out
)
But you posted like while i was writing the solution.. ![]()