UniFi networking

UniFi · Networking

UniFi dual-WAN failover and load balancing — set up the second line so it actually takes over

First published 27 October 2026 · Updated on 27 October 2026 · Verified against Ubiquiti Help Center documentation (links at each step)

Merroway Editorial · Verified against governing standards and vendor documentation.

The fast answer

Do not plug the second line in and assume you are protected. Add it as a secondary internet connection under Settings > Internet, then make one deliberate choice: Failover Only if the second line is metered or slower (it stays idle until the primary fails), or Load Balancing if both lines are unmetered and you want traffic shared across them. Then test the failure — unplug the primary and confirm the office stays online — before you rely on it.

Advertisements

What you are looking at, in plain words

A UniFi gateway can hold more than one internet connection. Failover means one line is primary and the second waits: traffic moves to the second line only when the gateway decides the primary has failed, and moves back when it recovers. Load balancing means both lines are live at once and new connections are shared between them. Those are different promises, and picking the wrong one is the expensive mistake: a metered cellular backup set to load balancing will quietly carry everyday traffic and burn through its allowance.

Two facts shape the whole setup. First, a secondary WAN has to be created in the console — a cable in a port is not a configuration. On gateways with a spare port, that can mean remapping a port to act as a WAN port; Ubiquiti's port-remapping guidance is to do this under Settings > Internet, with the new WAN port already connected, and to use a temporary port value when swapping the two WANs. Second, failover is only as good as its health check: the gateway must be able to tell a dead line from a slow one, and you must have watched a real failure happen.

Step 0 — Prove which part is failing

Before changing anything, prove each line on its own. Connect a laptop directly to the primary modem or router and confirm it reaches the internet; repeat with the backup line. Note each line's connection type (usually DHCP for a cellular backup, or whatever your ISP gave you) and whether it is metered. If either line does not work on its own, no gateway setting will fix it — that is an ISP or modem problem, not a UniFi problem.

Then, in the console, open Settings > Internet and confirm the primary WAN shows connected with an IP address. If the primary shows offline or has no IP address, your WAN settings do not match what your ISP provided — fix that first.

The fixes, in order

  1. Add the secondary connection. In Settings > Internet, add a secondary internet connection and choose the port the backup line is plugged into. If your gateway needs a LAN port remapped to serve as the second WAN, the console offers the available ports when you add the connection — pick the one the backup line is actually plugged into, and do not unplug the primary line mid-change. Apply the change and wait for the gateway to provision; this takes a short while.
  2. Set the connection type for each line. Set each WAN's IPv4 connection type to match its ISP: DHCP where the ISP assigns addresses automatically, or the static details your ISP gave you. A backup line with the wrong connection type will show as connected hardware with no usable internet — and failover to it will fail silently.
  3. Choose Failover Only or Load Balancing — deliberately. If the backup line is metered, capped, or much slower, choose Failover Only: the backup carries nothing until the primary fails. If both lines are unmetered and you want both used, choose Load Balancing. This is the decision that costs money when it is wrong, so do not leave it on a default you have not read.
  4. Check what breaks when the public address changes. Failover changes your public IP address. Anything tied to one address — a VPN tunnel, a remote-access rule, a service that allows only one address — may need to reconnect or be re-pointed after a switch. Note those services now, so a failover event does not become a second outage you discover later.
  5. Test a real failure. With the office running normally, disconnect the primary line's cable (or power off its modem) and watch: browsing should continue on the backup, and the console should show the primary as down and the backup carrying traffic. Reconnect the primary and confirm traffic moves back. A failover setup that has never been tried in a real failure is a hope, not a backup.

Prove it worked

Run the test in step 5 during a quiet period and record the result: primary disconnected, office still online, primary reconnected, traffic back. Also confirm one service that matters to the business — a card terminal, a video call, or the booking system — works on the backup line, not just a web page. If a service works on the primary but not the backup, the backup line itself (its speed, its restrictions, or its address change) is the problem, and you now know before an outage tells you.

Still not working? Work this ladder in order

  1. Both WANs show connected but failover never happens: re-check the mode — a line set to load balancing is not waiting in reserve, and a line never added as a secondary connection is not a backup at all.
  2. Backup shows connected but nothing loads on it: test the backup line directly on a laptop. If it fails there too, the fault is the line or modem, not UniFi.
  3. Failover happens but some services break: those services are tied to the primary public address. Note them and plan their reconnection (VPN re-establish, address update) as part of the failover procedure.
  4. Failover flaps back and forth: the primary line is marginal rather than dead. Check its modem, cable, and ISP status before blaming the gateway's health check.
  5. Metered backup allowance disappearing: confirm the backup is set to Failover Only, not Load Balancing, and that no policy route is sending traffic to it.
  6. None of these steps fixes it. Take the results of Step 0 and the failing step above to Ubiquiti Support via the Ubiquiti Help Center (the official documentation linked in Sources above) — that is the next step, not a different vendor's forum thread.

Mistakes that make it worse

  • Adding the second cable but never adding the secondary connection in the console.
  • Leaving a metered cellular backup on Load Balancing and discovering the bill later.
  • Testing failover for the first time during a real outage.
  • Assuming every service survives an IP-address change — VPNs and address-locked services often do not.
Advertisements

FAQ — the issues behind this problem, answered

What is the difference between failover and load balancing?

Failover keeps the backup line idle until the primary fails, then switches over. Load balancing uses both lines at once and shares new connections between them. Use failover for a metered or slower backup; use load balancing only when both lines are unmetered.

I plugged the second ISP into a spare port. Why is nothing happening?

A cable is not a configuration. The second line must be added as a secondary internet connection under Settings > Internet, with the correct port and connection type, before the gateway will use it.

Will my VPN stay up when failover happens?

Not necessarily. Failover changes your public IP address, and tunnels and address-locked services may need to reconnect. Test the services that matter during your failover test, not during a real outage.

Do I need to open ports for failover to work?

No. Failover is about outbound traffic leaving through a different line. No inbound ports need opening for the gateway to switch lines; inbound services are a separate question and depend on which line they arrive on.

Sources

Ubiquiti Help Center — UniFi Gateway – Port Remapping · UniFi Gateway – Policy-Based Routing (for routing selected traffic to a chosen WAN) · WAN Failover, Load Balancing and Port Remapping on UniFi Gateways (Failover and Load Balancing modes; dedicated-WAN plus Policy-Based Routing pattern). Model-specific port layouts differ; the console shows the ports available on your gateway when you add a secondary connection.

Verification note: values, settings paths and limits on this page were checked against the official pages listed above on 27 October 2026. Anything that could not be verified in an official source was left out rather than stated as fact.