I just added dyndns.org script to the router and it works, so since I am on fire now tackling the subject topic.
My current Ip route schema is as follows (using two internet dns resolving IPs to check that ISP Primary is actually up).
/ip route
(L1) add check-gateway=ping distance=3 gateway=1.0.0.1 (cloudfare)
(L2) add check-gateway=ping distance=4 gateway=208.67.220.220 (opendns)
(L3) add distance=3 dst-address=1.0.0.1/32 gateway=ISP_Primary scope=10
(L4) add distance=4 dst-address=208.67.220.220/32 gateway=ISP_Primary scope=10
(L5) add distance=10 gateway=ISP_Secondary
Two questions:
Is the āadd distanceā in L3,L4 redundant since they are used in L1,L2 ??
Should I use actual IP addresses of sites vice the DNS resolver IP addresses, and if so which ones?
Now onto the dynamic partā¦
This will be done in two parts,
A. Put in the following script into the DHCP Client for the ISP-PRIMARY.
:if ($bound=1) do={ /ip route set [find comment=" isp1route "] gateway=($āgateway-addressā)disabled=no; :log warning ("New ISP1 gateway: ".($āgateway-addressā)) }
The other item to put in is a Default Route Distance of 255. This apparently will pull the route information from the provider but not become an active route.
It should pull the all important new ISP gateway information to add to the route rules.
B. The second part is to transform my current IP Routes to something that will work with the script.
Based upon the advice/example found:
/ip route
add dst-address=8.8.4.4 gateway=127.0.0.1 scope=30 target-scope=30 comment=" isp1route " disabled=yes
add dst-address=0.0.0.0/0 gateway=8.8.4.4 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=ISP_Secondary distance=2
I have modifed my current IP Routes as follows⦠and am asking did I screw it up or am I Close ???
(L10) add check-gateway=ping distance=3 dst-address=0.0.0.0/0 gateway=1.0.0.1 (cloudfare)
(L20) add check-gateway=ping distance=4 dst address=0.0.0.0/0 gateway=208.67.220.220 (opendns)
(L30) add distance=3 dst-address=1.0.0.1/32 gateway=127.0.0.1 scope=10 disabled=yes
(L40) add distance=4 dst-address=208.67.220.220/32 gateway=127.0.0.1 scope=10 disabled=yes
(L50) add distance=10 gateway=ISP_Secondary
or is this not possible when checking two different internet addresses and thus should simply stick to one externalā¦
(L10) add check-gateway=ping distance=3 dst-address=0.0.0.0/0 gateway=1.0.0.1 (cloudfare)
(L30) add distance=3 dst-address=1.0.0.1/32 gateway=127.0.0.1 scope=10 disabled=yes
(L50) add distance=10 gateway=ISP_Secondary
When I first saw your original post, my mind entered the mid-management mode ⦠and that is; read first 3 lines of text. If the point of whole text is clear, then do something (e.g. read the rest of it ), else ignore it.
It did the same to me second, third and fourth time. This time I managed to get through ⦠the last post of yours I donāt dare to try again with the first post though.
Yeah, itās not that we wouldnāt like you, but some of your questions tend to be quite complex and it takes a long time to understand all details. And Iāll admit that recursive routes are not my thing, I understand the idea, I will get it working in the end, but I usually have to ācheatā with manual.
Ok, when I look again, I donāt see that you really changed much. Maybe you should highlight changed parts next time, but I see only gateway changed from interface to IP address. So if you add comment=āisp1routeā to those routes, so that script can find it, it will probably do what you want, assuming that original config did.
Thanks I am willing to take any reply at this point LOL.
The difference is that I am going to change from my current recursive setup to one that makes some changes to the DHCP client settings, and IP route settings and then will rely on a script to ensure that the IP route rules work.
Besides that I was asking is putting the distance parts in twice is actually needed or just once.
If thereās more than one route with same dst-address, distance is what tells the router which one should have priority. In your case, only L1 and L2 have same dst-address, so it doesnāt do anything useful for L3 and L4. Iād just keep default 1, but in this case it shouldnāt matter. Iām not sure about routing protocols like BGP and others, if it would do anything to them, but luckily thatās not what you use.
And I remembered another thing about your questions, sometimes youāre too curious. Letās put it this way, I know that sun rises in the east, but youād be able to ask about it in such way that Iād have to stop and think if it really does.
hahaha, dying of laughter I presume.
okay, I get the hint experiment and then see what happens
when the daggers come out from family members due to phucking up the network I will let you know how it goes⦠maybe
Iām not saying that your questions are bad, in fact Iām sure I learned something new while thinking about some of them and trying to write flawless answer (to finally satisfy you, but itās not easy). But sometimes it feels like work⦠and Iām coming here to procrastinate.
Thanks for the humour it helps make my day much more tolerable. Although I think you might have the āINATEā prefix wrong. Perhaps āurā vice āprocrastā
I come here when I feel overly adequate and need humbling.
Slow down there, remember that Iām not native speaker, no advanced word play for me. I need it simple to keep up. Sob see router. Sob configure router. Router now safe. Hacker sad. Too bad. Well, not necessarily as simple as this.