[admin@iu] > ip hotspot ip-binding set to-address="" numbers=1
invalid value for argument to-address
i want remove the to-address in the ip-binding hotspot
thanx
[admin@iu] > ip hotspot ip-binding set to-address="" numbers=1
invalid value for argument to-address
i want remove the to-address in the ip-binding hotspot
thanx
empty string is invalid IP address. You have to use ‘unset’ command
What form the command write?
Please check an example.
something like
/ip hotspot ip-binding unset to-address numbers=1
[admin@u] > /ip hotspot ip-binding unset to-address numbers=1
bad command name unset (line 1 column 24)
MT version 4.5
oh, I see… this one works:
/ip hotspot ip-binding set to-address=0.0.0.0 numbers=1
thanx alot
:for f from 0 to 10 do={
/ip hotspot ip-binding set to-address=0.0.0.0 numbers=$f
}
[admin@u] > system script run ip-binding-to-address
interrupted
no such item
You don’t use item numbers like that in loops, it is possible in some situations but isn’t advisable. Generally you want to use ‘find’ to identify items to perform actions on and then perform the action on that reference.
For example, if you want to remove all IP bindings, use the below:
:foreach binding in=[/ip hotspot ip-binding find] do={
/ip hotspot ip-binding set $binding to-address=0.0.0.0
}
Generally, referring to item numbers in scripts is a bad idea.
Thank you very much.