PPOE Ip Script

Hello,

i’m writing for an help or tips,
i’ve an wimax connection through ppoe connection, my isp sometimes give internal nat ip address and i’ve to disable and enable ppoe connection to have external ip, the internal ip starts with 100.x.x.x . The external usualy are 78.x.x.x or 5.x.x.x
I’ve found this scripts but it does the opposite that i need.
Can someone help me? Thank you

you should create a ppp profile unique for this service, and use its “on-up” attribute to trigger your script.

and the script should be something like this:

:local pppoe “”
:local currip [/ip address get address where interface=$pppoe]
delay 1s;
if ( $currip~"/^100./) do={ /interface pppoe-client { disable [find name=$pppoe]; delay 1s; enable find name=$pppoe] } }

Thanks to reply,
i changed the ppoe client name but there’s some error and i can’t solve it :slight_smile:
first, it give me an error on second line column 32 but i tried something but i can’t pass it,
second $currip~“/^100./ with atom e mikrotik plugin highlights an error, i read the guide and try $currip~”^100*[0-9 \.$]" Is it right?

Thank you!