TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to load-balance two 1 Gbps connections with a failover?

5 pointsby Tenemoalmost 2 years ago
Hi! I used to have a single 1 Gbps connection running from ISP A. Unfortunately, it has been spotty, sometimes dropping out for as much as 30 minutes. 1 Gbps fiber is not expensive where I live (~$15&#x2F;month), so I&#x27;ve decided to just get a second 1 Gbps fiber from ISP B. Since I can&#x27;t cancel the service from ISP A just yet due to the agreement length (doesn&#x27;t make financial sense to pay the early cancellation fee), I ended up with two FTTH setups.<p>I&#x27;d like to combine those two connections to:<p>1. Have a quick failover in case either fiber link fails.<p>2. Load balance them for increased maximum throughput, assuming different connections. Not interested in an overly complicated remote setup for combining bandwidth, since neither of the ISPs supportss MLPPP and I have no need for higher speeds, anyway. In an ideal scenario, two different machines would be able to download at 800-900 Mbps each (which is what I usually get from each connection), saturating both ISP A and ISP B connections. Meaning that the router would ideally be able to process 2 Gbps of traffic in total.<p>3. Have the new setup be quiet and small, it&#x27;ll live in small-ish cabinet next to the ISP routers (more on that below) and I definitely don&#x27;t have the space there to stuck my old PC with PFSense in there.<p>4. I need a reliable, business-grade solution that will require minimal&#x2F;no maintenance and will sit there working for years and years. It&#x27;s unacceptable for my connection to keep cutting off on key meetings, where I&#x27;m often the person presenting.<p>Additional information: No need for it to have Wi-fi AC, I have a separate AC, no need for LTE capabilities, too. Upload isn&#x27;t as important, I don&#x27;t do a lot of hosting here nowadays, everything moved to the cloud. If it&#x27;s relevant, both links are 300 Mbps up, so not symmetrical. The configuration and device doesn&#x27;t have to be super end-user-friendly (would be nice, though, of course), I&#x27;m not a networking expert, but I&#x27;ve been working in IT for quite a bit and I&#x27;m sure I can handle some basic network configuration if required (I have some experience with configuring Cisco switches and routers). Hopefully it won&#x27;t cost that much, but I&#x27;m willing to spend upwards of $1000 on this if there is a good reason, as this will be used for my only source of income.<p>Now, I&#x27;ve done a plenty of research and there are a ton of multi-WAN routers, e.g. TP-Link TL-R605, Synology RT2600ac or business-grade Linksys LRT224 and the Peplink Balance line.<p>I would&#x27;ve ordered one of these by now, but my key question is, which I wasn&#x27;t able to easily research: Can the WAN connection be a cable to a LAN port on a router from the ISP? Because I don&#x27;t have ISP-provided WAN Ethernet cables coming out of the wall and that&#x27;s what has always been going into my routers&#x27; WAN port. I have two fiber cables coming out of the wall, connected to a router from the ISP each and those have regular LAN GE ports. I&#x27;ve asked the new ISP and they said I&#x27;m required to be using their fiber router, otherwise my 8h internet-back-up SLA and other maintenance services in case of issues don&#x27;t apply anymore.<p>What kind of a device will allow me to connect it via cat6 Ethernet to two different routers on different subnets? Is it what all those &quot;WAN&quot; ports on the multi-WAN routers expect already that I&#x27;ll do?<p>The Peplink Balance line looks it has all of the features I need, but it&#x27;s been quite difficult for me to understand what the total throughput is if I don&#x27;t need a firewall on it. If the Balance One supports up to 5 WAN connections, it means it can handle load-balancing 5 Gbps of traffic? Doesn&#x27;t seem so, it looks the actual throughput is the &quot;Stateful Firewall Throughput&quot;, which would then be barely 600 Mbps... Which router would support 2 Gbps total throughput to be able to saturate both ISPs? If 2 Gbps is not possible within a reasonable budget, I can settle on 1 Gbps, that&#x27;s plenty for me, too.<p>Thanks!

5 comments

toast0almost 2 years ago
&gt; What kind of a device will allow me to connect it via cat6 Ethernet to two different routers on different subnets? Is it what all those &quot;WAN&quot; ports on the multi-WAN routers expect already that I&#x27;ll do?<p>Yes. The multi-WAN routers can (or should) be able to manage any sort of WAN over Ethernet handoff; bridged PPPoE, DHCP on public address, DHCP on private address, static IPs. One of those fits what your ISP router provides to LAN clients.<p>Personally, I&#x27;d take the time and build an overly complicated custom system (and I have!), but off the shelf should work too. The tricky thing if you build it yourself is determining when the links are up; for my system, I have PPPoE as primary and low quota LTE as secondary, so it&#x27;s easier, if the PPP link is connected and has responded to ping within the last 30 seconds, I use that, if not I use LTE. In your case, you might need to build some other liveness check.<p>Don&#x27;t expect perfect balancing either --- sometimes multiple bulk downloads will end up using the same connection and you won&#x27;t have any using the other one, but statistically things should work out.
Dah00nalmost 2 years ago
Sorry I don&#x27;t have time to add much info, but I have a setup I&#x27;m quite happy with. I use OPNsense (PfSense is banned in my house, with all the bad things they&#x27;ve done) and it seems to cover your needs too if I didn&#x27;t miss something. The non-open source options are, in my opinion, awful and will at some point (if not already) be a security menace.<p>Edit:<p>&gt;If 2 Gbps is not possible within a reasonable budget, I can settle on 1 Gbps, that&#x27;s plenty for me, too.<p>Even the very old End-of-life PC Engines APU1D (AMD T40E Bobcat) can handle 1 gbps (I have 4). If something <i>new</i> cannot I would look elsewhere.
评论 #36084163 未加载
graybiesalmost 2 years ago
Off the shelf? Edgerouter lite can do 1Gbps dual wan with load balancing and failover. Not sure if it can do 2.<p>Otherwise building a pfsense&#x2F;opnsense box would probably be the route you want to take.
aynycalmost 2 years ago
I’m no network expert, but Synology router supports dual wan interface. Would that work?
johnklosalmost 2 years ago
Many years ago, Fry&#x27;s Electronics had a close-out on 2014 era mini-ITX AMD AM1 motherboards and CPUs (less than $50 for motherboard, CPU, heat sink and fan). I&#x27;ve been using them, with suitably small cases, as NAT &#x2F; router &#x2F; firewall &#x2F; DNS machines, and even though there are just four older 2 GHz cores, with NetBSD and npf I&#x27;m able to run at full gigabit speeds just fine. I&#x27;ve set up around ten of these AMD systems and have run them for many years.<p>One way I&#x27;ve shared Internet with two providers is by having two routing machines, each configured with its own Internet connection, with different local IPs on the same LAN. Clients can each be configured to use the preferred gateway, or they can be switched using DHCP. Likewise, when one of the lines is down, the default route can be removed from the machine that handles that line and can be switched to the other machine&#x27;s internal IP, which will DTRT and will cause clients to use the other. This has the advantage of not requiring waiting for an updated DHCP lease, so switching can be nearly instantaneous.<p>This is useful if one line is more robust than the other but isn&#x27;t as fast - the machines that need a reliable connection always use the robust connection, and everything else opportunistically uses whatever&#x27;s available.<p>Another is simple round-robin of NAT to both connections.<p>Neither helps if the line that you&#x27;re using drops mid-call, but there are ways to deal with that, if you have high speed available at a datacenter. For instance, I&#x27;ve set up routing of a small public subnet via tinc (<a href="https:&#x2F;&#x2F;www.tinc-vpn.org" rel="nofollow">https:&#x2F;&#x2F;www.tinc-vpn.org</a>) over two routing machines, each with their own Internet connection, with CARP so that packets can go through either machine. This makes handing off from one to the other transparent so that connections don&#x27;t need to be reestablished.<p>To get back to your original query, I haven&#x27;t seen any off-the-shelf NAT router that either does what a host-based router can do without some parts being proprietary or without a good number of drawbacks and limitations, nor have I seen hardware that can do anything fancy (that is, anything beyond the most simple routing &#x2F; NAT) at high speeds without spending lots of $.<p>Recent connections that are 2 Gbps and faster are served very well by Ryzen 5600X systems with 2.5 and 10 gigabit ethernet, and those systems cost around $500 each.<p>Most of my machines have been set up many years ago, and automatic scripts update things like BIND and other software, so they require almost no maintenance after initial setup. On the other hand, remote administration is dead easy because they all use ssh with keys (no passwords), and can be used to help facilitate remote administration of machines on the local network, too.<p>In other words, I can&#x27;t think of any reason any more to buy off-the-shelf NAT routers. Even if I wanted to go that route, there are too many shortcomings for me to imagine doing that - I&#x27;d give up significantly more flexibility than the amount of time I&#x27;d save would ever possibly balance.<p>To answer your questions about layering NAT routers, yes, you can do that, although it&#x27;s discouraged. If you&#x27;re forced to use the ISP&#x27;s routers, you should at least ask if they can be put in bridge mode so your device can do the NAT, since many of those ISP provided routers have tiny NAT state tables and&#x2F;or time out NAT states for no good reason.<p>Also, there&#x27;s no such thing as NAT that wouldn&#x27;t fit the definition of &quot;stateful firewall&quot;, so it&#x27;s hard to know what they&#x27;re advertising. For instance, the Peplink Balance 580 advertises 1.5 Gbps throughput, and that&#x27;s in aggregate - it definitely can&#x27;t handle all five WAN at 1 Gbps at the same time, else they&#x27;d advertise 5 Gbps. Considering the prices of the hardware, a brand new, physically tiny, host-based NAT router &#x2F; firewall would be both cheaper and significantly faster.<p>Just some thoughts :)
评论 #36087698 未加载