Hello I am doing a lab about load balancing PCC in mikrotik. I have 2 WAN Netlife and Claro.
So I understand that a recursive route is a route that gateway is a network that is not connected to router and route must lookup routing table again in order to get the oubund interface of that route.
So I attached image below about my scenario
For example, default route 0.0.0.0/0 gateway 8.8.8.8 .Router need to find outbound interface in order to route packet so it finds that outbound interfaces is eth3 becasue I put a route that 8.8.8.8 gateway 192.168.100.1 eth3 and the same with default route 0.0.0.0/0 gateway 8.8.8.8. Both default route have scope 30 target-scope 30
So when I enable routes that have comment like “Rutas failover para ISP” . I put that 2 route becasue I saw that in a video to have a redundancy.
So when I disable eth4, routing table is updated and all default route and failover route change to have a eth3 like a outbound interfaces and the same if I disable eth3. For me that is excelent but I want to understand what is the logic with that update
Anybody can explain me that? If you need more information, I can give you more
Thank in advance
My setup is with preference to one link, and it fails over to the other link if the check-host on the first link is not reachable. Distance parameter defines which link is preferred (2nd line is either distance 1 or 3)
I took it one step further: if both links have no reachable check-host, I will use the interface state as second level of failover trials (I may not lose the link to that site just because Google is down.)
The routes given by DHCP from the upstream load balancers is also there but even lower priority. (3th level failover) (Just in case IP addresses are changed or other uplinks are used.)
ok I understand but what happen if you have 2 ISP and you are using routing mark and PCC load balancing, if you loose one wan, so what happen with packet that are marked with mange that need to go to wan that is down?
TCP is session oriented. (You first do a sync handshake to open a session). When the communication dies and another route is opened, a new session must be set up.
No real problem for browsing the internet. Any page loads over multiple connections anyway. The one connection that died must be tried again. The browser will take care of that.
For applications that have permanent connections this is a problem. The connection will fail and must be rebuilt.
Unless a VPN (tunnel) is used. In that case the session remains the same, only the communication/connectivity is temporarly lost.
In my case, the hEX with the load balancing makes an SSTP tunnel to my hAP at home. E.G. When the connection fails over from 4G to SkyDSL, my working sessions (Telnet, Winbox, Dude, SSH…) remain intact, but there is no traffic for lets say 30 seconds. I have tried several tunnels , and the SSTP tunnel was the fastest to recover the connection. Within that tunnel the change of route from one ISP to another is not seen. You cannot even tell from within the tunnel which ISP is used.
[failover was triggered by changing the routing distance to 1 , in the second routing line “add check-gateway=ping distance=3 gateway=8.8.8.8”]
That’s why SSL/VPN for remote working is so handy. If the VPN server allows it (security option) , you can even continue working from another location.
UDP is connectionless , every packet is on its own. The packet will have to be resent..
I did not use mangle rules to mark packets, just 2 default routes with different distance. My need was just failover here, no load balancing.
If you use mangle rules and packet marking, you still have to define both routes with different distance per packet mark.
If ISP1 is down, packets with mark ISP1 will go to ISP2: See this wiki text ! https://wiki.mikrotik.com/wiki/Advanced_Routing_Failover_without_Scripting
If ISP2 is down, packets with mark ISP2 will go to ISP1.