Run two internet connections on UniFi: load balancing, routing and QoS
A second internet connection can do more than sit idle until the first one fails. A UniFi gateway can share traffic across both, send chosen devices down a chosen link, and protect video calls on the busy one. This guide takes you past basic failover, through weighted load balancing, custom health checks, routing rules and QoS, and how inbound services behave with two links.
If you only want a backup that takes over during an outage, Configure UniFi backup internet and failover is simpler, and Backup internet for Australia compares the options. To link two sites rather than two connections, see Connect two sites with UniFi SD WAN.
Outcome and equipment
By the end, both connections carry traffic in the proportions you choose, a health check moves traffic off a struggling link, selected devices use the link you picked, and you've tested what happens when either link drops.
- A gateway with more than one WAN port. Most models support four or more, but the Express and Express 7 have one WAN and don't do multi-WAN. [1] [2] [3]
- Two internet connections, each with its own modem, NTD or router.
- Admin access to the gateway, and a recent backup.
- A wired computer and a phone on mobile data for testing.
| Gateway | Maximum WAN ports |
|---|---|
| Express, Express 7 [2] [3] | 1 |
| Cloud Gateway Ultra, Cloud Gateway Max, Dream Router 7, Dream Router 5G Max [4] [5] [6] [7] | 4 |
| Cloud Gateway Industrial, Enterprise Firewall [8] [9] | 5 |
| Cloud Gateway Fiber [10] | 6 |
| Dream Machine Pro, SE, Pro Max and Beast, Enterprise Firewall Core [11] [12] [13] [14] [15] | 8 |
At least one port must stay a LAN port. [1]
Choose a second connection in Australia
| Option | Why use it | Watch for |
|---|---|---|
| A second nbn service | Possible on FTTP with a 4-port connection box, from the same or a different provider [16] | Both services come through the same connection box, so a cut to the fibre feeding it takes out both. [17] Each port carries its own service, so a 1-port box takes only one. [16] [18] |
| 5G home internet | A different network from the nbn, with no install | Speeds vary with your distance from the tower and the number of users online. [19] Mobile links often have no public IP, though Telstra says it doesn't use CGNAT on its home internet services, so check with your provider. [20] [21] See 5G home internet. |
| Starlink | Works where other options don't | Often no public IP. Use its router's bridge or bypass mode, if it has one, to avoid double NAT. [20] |
CGNAT means your connection shares a public address with other customers, so direct access needs a public IP from your provider. [20] Port forwards and most VPN servers, WireGuard included, need that public IP, but Teleport doesn't, so it still works on that link. [22] [23] [24] Keep inbound services on the link with a public IP address.
What load balancing does and doesn't do
Load balancing shares new connections across your links by weight. The gateway maps each session to a link based on its source and destination addresses, and that session stays on the same link until it ends. [1] This has two results:
- A single download doesn't get faster. One session uses one link, so a 500 Mbps link and a 100 Mbps link don't give you a 600 Mbps download. Many devices doing different things together can use both.
- Logins usually stay stable. A session won't jump between links, so it isn't cut off by a rebalance. A link failure is different: traffic moves to the remaining link. [1]
Connect the second link
- Prepare the second modem. Put the Starlink or 5G router in bridge or bypass mode if it has one, so the UniFi gateway gets the WAN address directly. [20]
- Plug it in. Connect it to the port you'll use for WAN2. The port must already be connected and active before you assign it. [1]
- Create the connection. Go to Settings › Internet and assign the WAN role to that port. [1] [25]
- Enter the provider's settings. Most second links use DHCP. If the WAN stays offline, check for a VLAN tag, a static IP or PPPoE details. [1] Connect UniFi to nbn in Australia covers nbn settings.
- Check its address. If the WAN IP doesn't match what a "what is my IP" website shows, that link is behind NAT. [20] Ubiquiti lists WAN addresses from 100.64 to 100.127 among the signs of double NAT or CGNAT. [26]
- Test each link. Confirm both show as online and note each one's real speed. You'll use those numbers for the weights.
Set failover or load balancing
Each WAN can work in one of two ways. [1] In Failover, one link carries everything and the others wait. In Load Balancing, new connections are shared across the links by weight. [1]
- Open the WAN settings. In Settings › Internet, open the mode and priority options for your WANs.
- Choose Load Balancing. Skip it if your second link has a small data allowance: use failover so everyday traffic doesn't use up the allowance.
- Set the weights. Match them roughly to each link's real speed. For a 500 Mbps nbn plan and a 5G link that averages 125 Mbps, start at 80% and 20%. [1] Don't use the advertised speed, because 5G and Starlink vary through the day.
- Apply and watch. Use the dashboard to confirm both links are carrying traffic. Network 11 also has Live Traffic Flows.
Set a custom health check
By default, UniFi tests each link with a ping to ping.ui.com and DNS lookups through Cloudflare and Google, and marks it down if two of the three fail. [1] That catches a dead link, but a link that's badly congested can still pass. A custom SLA fails over on performance as well. [27]
- Create the SLA. Go to Settings › Internet › Create New SLA. [1]
- Add verification servers. Choose ping or DNS, and enter an address that's always up. Add more than one, so a single server outage doesn't look like a link failure. [1]
- Set the thresholds. Set packet loss, latency and jitter limits, along with the test interval and averaging period. [1] For a link carrying video calls, try 2% loss and 150 ms of latency, then adjust. Set a satellite or 5G link's limits to what it normally achieves, or it'll fail its check all day.
- Choose how many servers must fail. Requiring more than one avoids false alarms. [1]
- Assign the SLA to each WAN. Use it in place of the default Auto SLA, so each link is judged against its own thresholds. [1] [27]
Send chosen traffic down a chosen link
Policy-based routing pins devices, networks or destinations to a link. From Network 9.4, create these from the Policy Table, at Settings › Policy Table › Create New Policy › Route. [28] Network 10.4 added the option to set them up from the Routing section. Menu names vary by version. [29]
- Make the link available. A WAN that's dedicated to specific traffic mustn't be in active load balancing. Set its role to Failover in Failover Only mode, or Backup in Load Balancing mode. [1]
- Name the route. Use the purpose, such as "Cameras to 5G" or "Guest WiFi to Starlink".
- Choose the source. Pick a network or a device. [28]
- Choose the destination. Use All Traffic, or specific IP addresses, ports, domains or regions. Domain matching needs the client to use the UniFi gateway as its DNS server. [28]
- Choose the interface. Select the WAN, or a VPN client. [28]
- Decide on the Kill Switch. With it on, this traffic stops if that link goes down. Turn it off if you want the traffic to fail over instead. [1]
- Save and test. On that device, open a "what is my IP" website. It should show that link's public address.
Good uses
- Guest WiFi on the cheaper link, so guests don't crowd your main plan.
- A work laptop on the steadier link, for calls and VPNs.
- A VoIP phone system on the link with the lowest latency.
- Listed services: on Network 11 with UniFi OS 6.0.10 or newer, External Network Lists can feed a routing policy with a list of domains or IP addresses that updates itself. [30] [31]
Test the failure case. A 2025 community report found that routes ignored a WAN's SLA status, and a Network 9.3 report saw traffic fall back to the WAN when its VPN client was paused, despite the Kill Switch. [32] [33] Don't assume that a rule behaves as its label suggests: unplug the link and see.
Keep calls smooth with QoS
QoS decides who waits when a link is full. This matters most on upload, where nbn plans are much slower than on download.
Prioritise or limit traffic
- Create the policy. From Network 9.4, go to Settings › Policy Table › Create New Policy › QoS. [34]
- Pick the action. Choose Prioritize to move traffic such as VoIP or video calls into a higher-priority queue, or Limit to cap a heavy user such as a backup job or a guest network at a set speed. [34]
- Keep it short. Prioritise one or two things. If everything has priority, nothing does.
Smart Queues
Smart Queues manages congestion on slower links. Ubiquiti's guidance varies a little: one page says not to use it on connections of 300 Mbps or more, and another suggests 250 Mbps or less. [35] [36] It suits nbn 25, nbn 50 and plans around nbn 100, and is less useful on faster plans.
- Measure the link. Run several speed tests at a quiet time.
- Turn it on. Go to Settings › Internet, open the WAN, set Advanced to Manual and enable Smart Queues. Ubiquiti's Smart Queues article doesn't give this path, so the labels may differ on your version.
- Enter the speeds. Base the upload and download values on your measured speeds. The gateway limits internet traffic to the amounts you enter, so values set too low will cap your speed. [35]
- Check your top speed. Smart Queues and threat management can cut routed throughput by up to 30%, so compare your speed before and after. [36]
Plan for inbound services
- Port forwards: each forward has a WAN Interface setting, where you can choose one WAN or all of them. [26] Keep forwards on the link with a public address.
- Failover changes your public IP, because traffic moves to the other link. [1] VPN clients and anything else pointing at the old address can't reach you until they use the new one. [37]
- WireGuard: the server, in the VPN section, can run on a WAN other than the primary one, so set it to the link with a public IP. [23] [38] Ubiquiti has fixed a bug with WireGuard servers on non-primary WANs before, so keep the gateway updated and test yours from mobile data. [38]
- Teleport: it works when both the gateway and the remote device are behind NAT and doesn't need a public IP, so it's the safest choice when one link uses CGNAT. [22] [24]
- Dynamic DNS: it's set up on the primary WAN, in Settings › Internet. [20] Check that its name updates when the link changes.
Verification
Test outside business hours, and tell anyone on a call first.
- With both links up, confirm that traffic appears on both in roughly the proportions you set.
- On a device with a routing policy, a "what is my IP" website shows the expected link. A device without a policy may show either.
- Unplug WAN1. Note how long it takes to recover, and confirm that a video call reconnects.
- Plug WAN1 back in and confirm traffic returns.
- Repeat with WAN2 unplugged, watching any device you pinned to it. With the Kill Switch on it should lose internet, and with it off it should move across.
- To test the SLA, start a large upload on the link and see whether it trips the thresholds. Change them if it fails too easily.
- Run a bufferbloat test during an upload, before and after QoS, and compare the latency.
- From mobile data, test each inbound service, then test again during a failover.
Troubleshooting and recovery
| Problem | Likely cause | What to do |
|---|---|---|
| WAN2 stays offline | Wrong connection settings, or the modem isn't in bridge mode [1] | Check DHCP, PPPoE and VLAN settings, then restart the modem. |
| You can't assign the port | It isn't connected and active, or it's in use [1] | Plug the modem in first. To swap WAN1 and WAN2, assign a third port for a moment. [1] |
| Everything uses one link | The mode is Failover, or there are few active sessions | Check the mode. Test with several devices, not one download. |
| One link keeps failing over | SLA thresholds are too tight for that link | Relax them to suit what the link normally achieves. |
| Port forward works only some of the time | The forward's WAN Interface doesn't match the link the traffic arrives on, or that link has no public IP (double NAT or CGNAT) [26] | Forward on the link with a public IP, and set that WAN in the forward. |
| A website keeps signing you out | The site ties sessions to one IP address | Add a route that sends that destination down one link. [28] |
| VPN won't reconnect after failover | The public address changed [37] | Use Teleport, or a dynamic DNS name, and retest. |
| Internet is slower with Smart Queues on | The plan is too fast for it [35] [36] | Turn it off, and use QoS policies instead. |
If a routing or QoS change stops something working, disable that policy first, before you touch the WAN settings. That's why each rule should have a clear name.
Sources:
- [1] Ubiquiti Help Center, WAN Failover, Load Balancing and Port Remapping on UniFi Gateways.
- [2] Ubiquiti Tech Specs, UniFi Express.
- [3] Ubiquiti Tech Specs, Express 7.
- [4] Ubiquiti Tech Specs, Cloud Gateway Ultra.
- [5] Ubiquiti Tech Specs, Cloud Gateway Max.
- [6] Ubiquiti Tech Specs, Dream Router 7.
- [7] Ubiquiti Tech Specs, Dream Router 5G Max.
- [8] Ubiquiti Tech Specs, Cloud Gateway Industrial.
- [9] Ubiquiti Tech Specs, Enterprise Firewall.
- [10] Ubiquiti Tech Specs, Cloud Gateway Fiber.
- [11] Ubiquiti Tech Specs, Dream Machine Pro.
- [12] Ubiquiti Tech Specs, Dream Machine Special Edition.
- [13] Ubiquiti Tech Specs, Dream Machine Pro Max.
- [14] Ubiquiti Tech Specs, Dream Machine Beast.
- [15] Ubiquiti Tech Specs, Enterprise Firewall Core.
- [16] nbn co, Fibre to the Premises four port connection box.
- [17] nbn co, Your FTTP user guide.
- [18] nbn co, Fibre to the Premises one port connection box.
- [19] Telstra, 5G Home Internet Plan Critical Information Summary.
- [20] Ubiquiti Help Center, Setting Up Public Access to Local Resources in UniFi.
- [21] Telstra, What Is an IP Address (Dynamic and Static)?.
- [22] Ubiquiti Help Center, UniFi Remote Access: VPN and Port Forwarding.
- [23] Ubiquiti Help Center, UniFi Gateway - WireGuard VPN Server.
- [24] Ubiquiti Help Center, UniFi Gateway - Teleport VPN.
- [25] Ubiquiti Help Center, UniFi Gateway Port Remapping.
- [26] Ubiquiti Help Center, UniFi Gateway - Port Forwarding.
- [27] Ubiquiti Academy, Gateway high availability and failover: Shadow Mode (VRRP).
- [28] Ubiquiti Help Center, UniFi Gateway Policy-Based Routing.
- [29] Ubiquiti Community, UniFi Network Application 10.4.57.
- [30] Ubiquiti Blog, Introducing UniFi Network 11.
- [31] Ubiquiti Community, UniFi Network Application 11.0.83 release notes.
- [32] Ubiquiti Community, WAN SLA aware PBR (policy-based routing).
- [33] Ubiquiti Community, Kill switch not working in policy-based routing.
- [34] Ubiquiti Help Center, UniFi QoS and Traffic Shaping.
- [35] Ubiquiti Help Center, UniFi Gateway Smart Queues.
- [36] Ubiquiti Help Center, Optimizing Wired Network Speeds.
- [37] Ubiquiti Help Center, UniFi Gateway - Dynamic DNS.
- [38] Ubiquiti Community, UniFi OS - Dream Machines 4.4.6.