Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 22380

Beginner Basics • Re: Primary gateway with static ip address not activating

$
0
0
Lets set the rules straight here!!!
TWO RULES OF THUMB (scope & target scope):
First Rule. The resolving route (DIRECT - connected route) with dst-address TO the "real WWW IP (dns site)" and with local ISP gateway IP, has Target-Scope=X and the recursive route (INDIRECT - external route) with gateway IP VIA the "real work WWW gateway IP (dns site)" has Target-Scope=X+1. In other words, the farther one gets from the router, the TS increases by one.

Second Rule. Between the same two routes being compared, the Direct , connected route, with local ISP gateway IP (resolving route) has to have a SCOPE that is equal to or less than the TARGET SCOPE of the recursive route. In other words, the scope of the route must be equal or less than the target scope of the next farthest route.

To keep it simple, an easy approach is to provide the same scope for all routes, and it has to be equal to or less than the closest recursive route.
Thus if we know we are starting TS with 12 and there is one recursive route, we can set all scopes to 11.
Since in the past I used to use two recursive routes, is kinda where I ended up with 10 as my defacto scope setting 12,11,10 for TS and thus 10 for all scopes.


As far as heads up...........
My primary IP is dynamic and when the IP changes I get an email............ and a telegram............
:if ($bound=1) do={
:local gw $"gateway-address"
/ip route set [ find comment="PrimaryRecursive" gateway!=$gw ] gateway=$gw
/tool e-mail send to="emailaddress@gmail.ca" subject=([/system identity
get name]) body=" This is your new gateway IP: $gw";
:local sub3 ([/system clock get time])
/tool fetch "https://api.telegram.org/text=At+$sub3+ ... nged+WANIP"
:log info "Telegram notification sent PrimaryWAN IP Changed"
}

Statistics: Posted by anav — Tue Apr 29, 2025 11:31 pm



Viewing all articles
Browse latest Browse all 22380

Trending Articles