Home / Notes / Dual-WAN Failover Configuration
NOTES · DUAL-WAN / ROUTING CONFIG

Dual-WAN Failover on Enterprise Routers: Primary/Backup and Load Sharing

Two internet uplinks on one enterprise router, configured two different ways — equal-preference static routes with source-IP hashing for load sharing, or a preference gap between routes for primary/backup failover — with NAT outbound on each link and the commands that show which uplink is actually carrying traffic right now.

By the AtlasCommTech engineering team — 13 years of carrier & enterprise network deployments · Updated July 2026

Why Two Uplinks Need Two Different Configurations

Redundancy and bandwidth are two different problems, and they call for two different route setups on the same pair of links.

An enterprise router with a single internet uplink has exactly one failure mode: that link goes down, and the office goes offline with it. Adding a second uplink to a second ISP fixes that — but only if the router is told what to do with the second link. Left to route selection alone, two default routes of equal weight will simply load-share, which is great for bandwidth but means a single link failure still drops roughly half of all sessions instead of failing over cleanly.

Below are the two configurations this note is based on: static-route load sharing across two links using source-IP hashing, and a primary/backup setup using route priority — both with NAT outbound configured on each uplink, and the commands that confirm which link is actually carrying traffic. If your office is still on a single public IP address and hasn't configured basic outbound NAT yet, our Easy IP NAT configuration guide covers that first step.

Topology and Data Plan

One router, two independent static-IP uplinks to two ISPs, and one internal segment — the same physical layout serves both configurations below.

Internal LAN 192.168.1.0/24 GE0/0/3 · .1.1/24 GE0/0/1 · 172.16.1.1/24 GE0/0/2 · 10.1.1.1/24 Router 2 uplinks + NAT Link 1 · primary Link 2 · backup / shared ISP1 Peer 172.16.1.2/24 ISP2 Peer 10.1.1.2/24

Diagram labels are kept in English for engineering clarity.

Addressing

ItemValue (this example)
Link 1 interface — GigabitEthernet0/0/1172.16.1.1/24
ISP1 gateway (link 1 peer)172.16.1.2/24
Link 2 interface — GigabitEthernet0/0/210.1.1.1/24
ISP2 gateway (link 2 peer)10.1.1.2/24
Internal (LAN) interface — GigabitEthernet0/0/3192.168.1.1/24
Internal LAN segment192.168.1.0/24

Mode 1 — Load Sharing Across Both Links

Two equal-preference default routes plus source-IP hashing — both uplinks carry traffic at the same time.

  1. Configure both uplink interfaces with their static public IP addresses.
  2. Configure the internal-facing interface's IP address.
  3. Configure an ACL scoping which internal addresses get translated, and apply nat outbound with that ACL on each uplink interface separately — Easy IP on both links.
  4. Configure two default static routes, one via each ISP gateway, left at the default preference so neither outranks the other.
  5. Configure ip load-balance hash src-ip so traffic is actually hashed across both equal-preference routes by source address, instead of just picking one.
#
 sysname Router
#
ip load-balance hash src-ip
#
acl number 3002
 rule 5 permit ip source 192.168.1.0 0.0.0.255
#
interface GigabitEthernet0/0/1
 undo portswitch
 ip address 172.16.1.1 255.255.255.0
 nat outbound 3002
#
interface GigabitEthernet0/0/2
 undo portswitch
 ip address 10.1.1.1 255.255.255.0
 nat outbound 3002
#
interface GigabitEthernet0/0/3
 undo portswitch
 ip address 192.168.1.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 172.16.1.2
ip route-static 0.0.0.0 0.0.0.0 10.1.1.2
#
return

Mode 2 — Primary/Backup Failover Using Route Priority

Same physical topology, one different number — give the backup route a higher preference value, and it stays out of the routing table until the primary genuinely fails.

  1. Keep both uplink interfaces and NAT outbound configured exactly as in the load-sharing setup — each link still needs its own nat outbound so translated outbound sessions work regardless of which link is currently carrying traffic.
  2. Configure the primary route at the default preference (60).
  3. Configure the backup route with an explicit, higher preference value (100) — for static routes, a larger number means lower priority, the opposite of what the word “higher” suggests in everyday use.
  4. Do not configure ip load-balance hash src-ip for this mode — that command is what turns equal-preference routes into shared load; a preference gap on its own is what keeps one route dormant until needed.
#
 sysname Router
#
acl number 3002
 rule 5 permit ip source 192.168.1.0 0.0.0.255
#
interface GigabitEthernet0/0/1
 undo portswitch
 ip address 172.16.1.1 255.255.255.0
 nat outbound 3002
#
interface GigabitEthernet0/0/2
 undo portswitch
 ip address 10.1.1.1 255.255.255.0
 nat outbound 3002
#
interface GigabitEthernet0/0/3
 undo portswitch
 ip address 192.168.1.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 172.16.1.2
ip route-static 0.0.0.0 0.0.0.0 10.1.1.2 preference 100
#
return

4 Configuration Gotchas

The ones that make a dual-WAN setup silently do the opposite of what was intended.

1. Route Preference Numbers Run Backwards From Intuition

SYMPTOMThe backup link was configured with preference 100 expecting it to be prioritized, but the primary link keeps carrying all the traffic while both are up — which, it turns out, is correct.

CAUSEFor static routes, a larger preference number means a lower priority, not a higher one. The default is 60; setting the backup to 100 makes it numerically larger and therefore less preferred, exactly as intended for a backup route.

FIXLeave the primary route at the default preference (60) and only raise the number on the route meant to be the backup — never lower the primary's number thinking that makes it “more primary”.

2. Load Sharing Needs Two Things, Not One

SYMPTOMTwo equal-preference default routes are configured, one via each ISP, but all outbound traffic still leaves through a single link.

CAUSETwo static routes with the same preference sit in the routing table together, but the router still needs to be told explicitly how to spread traffic across them — the two-route configuration by itself doesn't select a hashing method.

FIXAdd ip load-balance hash src-ip. Without it, having two equal-preference routes is necessary for load sharing but isn't sufficient on its own.

ip load-balance hash src-ip

3. NAT Outbound Has to Be Applied on Both Links Separately

SYMPTOMTraffic sent out through link 2 reaches nowhere, even though its route and interface are both configured and up.

CAUSEnat outbound is configured per interface. Applying it only to GigabitEthernet0/0/1 and forgetting GigabitEthernet0/0/2 means any session routed out the second link never gets translated — it leaves with a private source address the ISP will simply drop.

FIXApply nat outbound with the same ACL on every uplink interface individually — in this example, both GigabitEthernet0/0/1 and GigabitEthernet0/0/2.

interface GigabitEthernet0/0/1
 nat outbound 3002
interface GigabitEthernet0/0/2
 nat outbound 3002

4. PPPoE Uplinks Put NAT Outbound on the Dialer, Not the Physical Port

SYMPTOMOn a PPPoE-based uplink, nat outbound applied to the physical Ethernet interface underneath the dial-up session doesn't translate anything.

CAUSEWhen an uplink dials out over PPPoE, the IP address actually belongs to the Dialer interface, not the physical port carrying the PPPoE session — the source material's own configuration comments flag this explicitly for exactly this reason.

FIXConfigure nat outbound on the Dialer interface itself, matching the pattern used for a static-IP uplink but pointed at the Dialer instead of the physical GigabitEthernet port.

interface Dialer1
 nat outbound 3002

Related solution designs

How to Confirm Which Link Is Actually Carrying Traffic

The routing table tells you which route is Active right now — that's different from which routes simply exist.

  1. Run display ip routing-table protocol static. In the load-sharing configuration, both default routes show the same preference (60); in the primary/backup configuration, the backup route shows preference 100.
  2. In the load-sharing setup, ping each ISP gateway address from an internal host — both should respond, confirming both links are carrying live traffic.
  3. In the primary/backup setup, ping the ISP gateway addresses while the primary link is healthy — only the primary gateway responds. If the primary link is deliberately taken down, only the backup gateway responds, confirming the switchover actually happened.
<Router> display ip routing-table protocol static
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Public routing table : Static
     Destinations : 1        Routes : 2       Configured Routes : 2

Static routing table status : <Active>
     Destinations : 0        Routes : 0

Static routing table status : <Inactive>
     Destinations : 1        Routes : 2

Destination/Mask    Proto  Pre  Cost      Flags NextHop         Interface
     0.0.0.0/0       Static  60   0              172.16.1.2      Unknown
     0.0.0.0/0       Static  60   0              10.1.1.2        Unknown

Load-sharing configuration: both default routes carry the same preference (60) — that equal weight is what makes source-IP hashing split traffic between them.

<Router> display ip routing-table protocol static
Route Flags: R - relay, D - download to fib, T - to vpn-instance
------------------------------------------------------------------------------
Public routing table : Static
     Destinations : 1        Routes : 2       Configured Routes : 2

Static routing table status : <Active>
     Destinations : 0        Routes : 0

Static routing table status : <Inactive>
     Destinations : 1        Routes : 2

Destination/Mask    Proto  Pre  Cost      Flags NextHop         Interface
     0.0.0.0/0       Static  60   0              172.16.1.2      Unknown
     0.0.0.0/0       Static  100  0              10.1.1.2        Unknown

Primary/backup configuration: the backup route's preference (100) is the numerically larger, lower-priority value. Both routes in the source documentation's own lab capture show under the Inactive section rather than Active — that reflects the next-hop reachability of that particular lab run; in a live deployment, the route matching a genuinely reachable gateway shows Active instead.

Honest Limits of This Note

Honest Limits of This Note

This note is based on two worked configurations from the same source material: static-IP uplinks in load-sharing mode and in primary/backup mode, both using route preference and, for load sharing, source-IP hashing. It doesn't cover NQA-linked static routes — which actively probe a remote address and pull a route out of the table the moment that probe fails, catching an ISP-side outage even while the local interface itself stays up, something plain preference-based failover here cannot detect. It also doesn't cover dynamic routing protocols for multi-uplink selection, or three or more uplinks at once. If either uplink is a single public IP address you're just now configuring for basic internet access, start with our Easy IP NAT configuration guide.

Questions Worth Having an Answer For

Pulled from the same configuration cases this note is built on.

What's the real difference between load sharing and primary/backup for two uplinks?

Load sharing keeps both links carrying traffic at the same time, split by a hash of the source address — good for aggregate bandwidth, but a single link failure still drops whatever traffic was hashed onto it. Primary/backup keeps one link idle in the routing table until the primary's route is no longer valid, so failover is clean but the backup link's bandwidth sits unused day to day.

Does source-IP hashing mean a given host always uses the same link?

Yes, for the life of that hash assignment — ip load-balance hash src-ip distributes different source addresses across the two equal-preference routes, but a single source address's sessions stay pinned to whichever link its hash lands on rather than being split packet by packet across both.

Can I mix a PPPoE uplink with a static-IP uplink in the same dual-WAN setup?

Yes — the source material this note is based on includes exactly that combination. The static-IP link is configured as shown here; the PPPoE link's route points at its Dialer interface instead of a gateway address, and its NAT outbound rule lives on that same Dialer interface rather than the physical port underneath it.

How do I know the backup link actually took over when I test a failure?

Run display ip routing-table protocol static again after taking the primary link down. The backup route (preference 100 in this example) should now be the one showing as Active, and pinging the ISP2 gateway address should succeed while the ISP1 gateway no longer responds.

My office currently has just one public IP and one uplink — do I need any of this yet?

Not until the second uplink is actually in place. A single-uplink office should start with basic Easy IP outbound NAT — see our Easy IP NAT configuration guide — and revisit this note once a second ISP connection is being added.

Adding a second ISP link?

Tell us whether you need load sharing, clean failover, or both, and whether either link is PPPoE — we'll help you get the route priorities and NAT outbound placement right the first time.

WhatsApp an engineer →

Related Reading