TL;DR: Is there a way to have two different (unreliable) ISPs connected to a single network switch, so that when one drops out, the home network is automatically switched to the other ISP?

-–

Hi all!

I am a networking hobbyist, and I built out a home network for a family friend of mine living in Mexico. They have an ISP reliability problem I have not encountered before. Their service frequently cuts in and out, and thus they have two separate ISPs to ensure connectivity at all times.

I currently have both ISP’s gateways plugged into the same unmanaged network switch. The hope is that if one ISP goes out, the switch will be smart enough to use the other one. In practice, when both ISPs are up and running, the network switch seems to flip randomly between the two of them which causes interruptions on the home network.

I would like to have both ISPs plugged in at the same time so my customer does not have to walk down to the switch swap inputs. Is this functionality I would need a mananaged switch to accomplish?

Let me know what you think, and thanks for your help!

AF

  • 1sh0t1b33r@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Not by a switch. You’d need a multi-WAN port router. Something like the ER605 will do failover.

  • rubixd@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I can’t think of a way to do it with an unmanaged switch because, if I’m understanding correctly, it’s going to be a routing issue.

    I think you need a router in the middle so that your entire home subnet has the same gateway. Then, when one of the uplinks goes down you don’t have to change gateways on anything but the primary router.

  • sniff122@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    This is something a router would do, not a switch. You would need to have a router with multiple WAN ports so not most consumer routers

  • Clear_ReserveMK@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You can achieve this easily with a managed L3 switch, or 2 managed routers. Look up first hop redundancy protocols, specifically vrrp if you want to go with a non cisco managed switch. The switch must support vrf if implementing this solution - basically you need both isp routers to provide the network in the same subnet, on different ports on the switch. The 2 ports on the same switch will be segmented by vrf, and loop across from one vrf to the other. Set up vrrp between the 2 vrf and set up tracking reachability on the primary vrf. You can tweak timers if you want too, but I’d leave them at a few seconds at least for the track to go down and implement a vrrp decrement. Point the default gateway on lan to the vrrp vip address for automatic failover and back for the minimal interruptions. Just bear in mind that these are enterprise grade switches and solutions so cost might be prohibitive, especially in a lower income country. Also you will need to support these technologies so would be good to know what you’re doing as it’s a complex setup. There are other solutions possible, but then again they would rely on other enterprise grade equipment and technologies that you may or may not have access to, and are also going to be cost prohibitive. For a simpler solution, you could look into a consumer grade dual wan router, but I’m not sure if they exist or are any good. Best of luck

  • ElevenNotes@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Use a multi WAN firewall and plug all three ISP into it. You can build one yourself using opnsense or similar.

  • Supergrunged@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Look for a router with multiple wan ports. I used a Luxul XBR-2300 for this style setup for years. My current Araknis AN-310 will do up to 3 Wan ports for fail over. It really depends on how much you’re willing to spend.

  • JoeCensored@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Corporate network routers do this.

    Technically you could do this with an old Cisco switch and a shell script though. The script would ping a known address on the internet from your computer. When it becomes unpingable, the script telnets into the switch and shuts the interface for the current isp and no shuts the interface for the other isp. Very hacky, but it’s what I would do if I were in your situation and I’d use the old Cisco 3750 I’ve got laying around.