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

Beginner Basics • Re: Attempting to evolve from caveman's failover

$
0
0
Ok, so it is more than two months that the setup described in post #37 is up and running.
It did work in all simulations/tests I made and it has worked just fine in one instance where the ISP1 was down for a few minutes, performing the failover to ISP2 nicely and then going back to ISP1 when service returned.

Today there was the need for some work to be done on the electrical line, there was a planned interruption of energy, 15-20 minutes planned, to change some cables/wires outside the building.

As a precaution we shut off all the PC's, just in case, but I left the "router stuff" connected (no UPS, I know), so when the electric company switched off the line routers/modems/switches went off.

When the energy was restored, I checked the internet connection and although all the devices were powered on and running, there was no internet.

Since the ISP1 modem is very slow at booting (while the ISP2 modem is much faster) I thought that the issue was with failover, ISP2 modem had already all the right lights on while the ISP1 one was still detecting the DSL/handshaking/whatever pinging 8.8.8.8 from a PC gave "host unreachable" (whilst pinging the Mikrotik hap ax lite lan address was fine).

So I connected to the hap ax lite with Winbox, and it had rebooted just fine (with the expected "router rebooted without proper shutdown, probably power outage" in log).
I then tried from terminal to ping 8.8.8.8 and for 6 or 7, maybe 8 pings it gave to me "no route ...", then it suddenly started responding normally and (obviously) internet was restored to the whole network.

I made a few attempts at manually power down/reboot the device and - checking the routes - all of them ( that should have normally been "AS" or "S") were "USHI" (as if there was no cable connected to the WAN interfaces).

So, in terminal, tried again one single ping at the time, while keeping an eye on Routes window open:
Code:
ping 8.8.8.8 count=1
and, lo and behold, at the 8th ping (after 7 "no route ..." replies) ping succeeded as normally and the routes became AS or S.

No idea why exactly this happens, maybe it is "normal", but it doesn't sound so (at least to me).

For the moment I added a Netwatch script on 8.8.8.8 that only logs if ping is successful ("up" script) and logs if ping is unsuccesful AND pings 8.8.8.8 10 times ("down" script).
The 10 pings change the status of the routes, so at next run of netwatch it succeeds.

I could only make a couple tests (as people without internet were starting to get mad at me), but it seems to work, even if it seems - besides primitive - also somewhat "ugly".

Statistics: Posted by jaclaz — Mon Mar 18, 2024 5:49 pm



Viewing all articles
Browse latest Browse all 15394

Trending Articles