Community discussions

MikroTik App
 
Maestrosoft
just joined
Topic Author
Posts: 4
Joined: Sun May 29, 2011 12:32 pm

Help pls!

Mon Oct 20, 2014 3:21 pm

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!
 
Maestrosoft
just joined
Topic Author
Posts: 4
Joined: Sun May 29, 2011 12:32 pm

Re: Help pls!

Wed Oct 22, 2014 1:42 pm

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]
}