I wrote simple working script ,
find ip from arp,
do ping test, and log or email .
but flood ping is very poor for testing because los in
ping xxx size 1500 interv 20ms coun 100 i i have 80% los
flood-ping test same ip and it report 10% loss
This is log version for testing, send email with results it’s no problem
{
:local se
:local re
:local relo 199
:foreach i in=[/ip arp find interface=bridge2wew disabled=no] do={
:local address [/ip arp get $i address]
/tool flood-ping address=$address count=200 size=1500 interval=20ms timeout=10ms do={
:set re ($received);
}
:if (($relo >= $re) and ( 0 < $re)) do={/log info "IP $address Received $re"}
:delay 3s
}
i try do this with ping command its more accuracy,
but I stop at this , it even doesnt test ip from ip arp
script should pickup received result or loss% after ping comands end
"sent=100 received=0 packet-loss=100% "
{
:local re
:local relo 99
:local test
:foreach i in=[/ip arp find interface=bridge2wew] do={
:local address [/ip arp get $i address]
:local test [/ping address="$address" size=1500 interval=20ms count=100]
:set re ($received)
}
#:if ($relo > $re) do={/log info "IP $address Received $re"}
:delay 2s
}
}
Please help write this script with using ping command