I'm running a fairly small ISP with a dual WAN connection, one main and one failover. I occasionally need to run maintenance on the main ISP (thankfully less and less frequent) and I would like to switch over to failover WAN.
However, the ways I'm doing it (1. Bonded connection as active failover; 2. manually switching 0.0.0.0/0 route) abruptly disconnects ongoing connections resulting in e.g. partially loaded or missing images in websites. My research/Google skills are failing me and I'm unsure of the solution. I'm using a Mikrotik Cloud Core Router. How do I gracefully switch WAN connections over time? I'm not in a hurry. In my mind, I was thinking of transferring new connections/flows to the new WAN and waiting for the old ones to expire, but I'm not sure how to execute that, perhaps a mangle rule but I'm not sure how that would affect existing connections. (Solutions for Linux will also work; I'll be able to adapt them)
┌─────────┐ │ WAN1 │ ┌─────────────────────┐ ┌──►Static IP│ │ │ │ └─────────┘ │ Client Households │ ┌────────┐ │ │ │ 172.16.0.0/16 │Mikrotik│ │ └─────────────────────┘ ───────────────► Wireless AP ───►│ CCR ├─┤ │ │ │ │ NAT │ │ ┌─────────┐ └────────┘ │ ┌────────┐ │ Clients │ └───► WAN2 │ └─────────┘ │Dynamic │ └────────┘