I'm experimenting with detecting my primary internet connection being down. And it's not working. I've seen lots of good HOW TO posts...but this is simply for me to learn and experiment. (So please don't point me to the recursive routes solution).
I have defined a static route to 1.1.1.1/32 with gateway interface IP of my primary WAN interface (public IP). I have setup a netwatch to ping 1.1.1.1 and based on results it adds a route to my backup WAN....works great. (Except for one problem)
When I pull the plug on my primary WAN connection, the netwatch at first fails (i.e. DOWN), and traffic fails over to my backup wan connection. Great. EXCEPT...the netwatch ping to 1.1.1.1 suddenly goes back to UP. Even though the gateway for 1.1.1.1 is set to the primary IP that is not even on my routerboard anymore! How can this ping succeed?
What is going on? Shouldn't the netwatch ping try to go through the gateway which doesn't exist? Why is this ping succeeding?