Page 1 of 1

Help pls!

Posted: Mon Oct 20, 2014 3:21 pm
by Maestrosoft
Task: to define the IP address of the interface PPPoE-Client, and if the IP address is obtained from the range 100.71.0.0/16 - to reset connecting - otherwise - no change!

Many Thanks!

Re: Help pls!

Posted: Wed Oct 22, 2014 1:42 pm
by Maestrosoft
Done!!! :)

:local WANInterface "Your PPPoE-Client interface"
:local IPCurrent [/ip address get [find interface=$WANInterface] address];
:local IPString [pick $IPCurrent 0 7]
:if ($IPString ="100.71.") do={
:log error $IPCurrent;
:log warning "Reconnecting...";
/interface pppoe-client disable [find name=$WANInterface]
:delay 5
/interface pppoe-client enable [find name=$WANInterface]
}