Answer the question
In order to leave comments, you need to log in
How to reconnect the pppoe interface to MikroTik if the provider issued a "gray" IP address?
When connecting a pppoe connection, the provider issues free IP addresses from the "white" and "gray" pools mixed. When reconnecting a pppoe connection at night, 99% of the time a white IP address is issued, but still I would like to make sure that if I get a gray IP address, reconnect until a white one is received.
A static white IP address is not of interest, a dynamic one is needed, but white.
It seems to be a common situation, however, a ready-made solution could not be found. There is not enough information on the syntax of commands for writing a script, the maximum that has been possible at the moment is to assign the value of the IP address to the variable, then you need to either pull out the first octet from the IP address and check for compliance with 10, or check the address for belonging to the pool. Does anyone have a solution to this problem?
Answer the question
In order to leave comments, you need to log in
Here is a script that partially meets the requirements of forummikrotik.ru/viewtopic.php?f=14&t=7123 The
first octet of the IP address is taken and compared. It remains to replace the condition from "!=" to "==" (or just =, I don't remember how it is in Mikrotik) and compare. Loop it until the desired result is obtained and run the script itself in schedule according to the schedule, only at the right time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question