EDIT: Disabled arp-ping parameter (arp table is not updated) and increased ARP timeout
You're absolutely right :) I have already done that. Dura minus 1 sec.
However, IP-scan seems inherently unstable. It doesn't find all hosts in the first run.
I'm doing something else now - that isn't an interactive tool: Pinging and reading ARP lookups!
It seems VERY reliable this way; It will also find hosts that cannot be pinged.
DISCLAIMER: This will only work on a 24-bit network, and will only scan the interface for the first IP address on the router. I'm using it for LAN devices only, not internet routers.
#Cannot ping 254 hosts before ARP expire, so set temporary non-default timeout
/ ip设置设置arp-timeout=5:00:00
/ ip设置设置icmp-rate-limit=0
#We need router-name for textfile name
local name [/sys id get name]
/file remove [find where name="$name.txt"]
#先找到接口的IP地址
local br [/ip addr get 0 value-name=interface]
local ipnetwork [/ip address get 0 value-name=network]
local ipaddress [/ip address get 0 value-name=address]
local ipnetmask [:pick $ipaddress ([:find $ipaddress "/"]) [:len $ipaddress] ]
local iph [:pick $ipnetwork 0 ([:len $ipnetwork]-1) ]
#Ping from 1 to 254 on current network. ASSUMING 24 BIT NETWORK.
:for ip from= 1 to= 254 do={ /ping ("$iph"."$ip") count=1 interface=$br interval=0.1s size=32 }
:delay 2
#Print ARP entires that 1) are non-empty, and 2) are from the same interface as the 1st IP address on the router
/ip arp print file=$name where (interface=$br && !(mac-address=[]))
#Upload the damn thing somewhere
/tool fetch upload=yes url="
ftp://blabla.bla/$name.txt" address="blabla.bla" keep-result=no dst-path="$name.txt" src-path="$name.txt" user=bla password=bla check-certificate=no
#reset ARP timeout to normal
/ ip设置设置arp-timeout=0:30:00
/ ip设置设置icmp-rate-limit=10