main goal is to get avg-rtt on a routing table
Problem 1: Ping can do the routing table but return value is always ping counts
Problem 2: Floodping can return avg-rtt ms but you cant select routing table
Code: Select all
{
:local addr 8.8.8.8;
:local ms 100;
:local avg;
/tool flood-ping $addr count=10 routing-table=m2 do={
:if ($sent = 10) do={
:set avg $"avg-rtt"
}}
:if ($avg >= $ms) do={
/ip route disable [find where routing-mark=m2 distance=1];
} else={
/ip route enable [find where routing-mark=m2 distance=1];
}
}
/tool flood-ping $addr count=10 routing-table=m2 this line would make it perfect but unfortunately flood-ping doesn't have routing table.
any ideas how to pull this off?