DEV Community

MikroTik PCC Load Balancing: How to Set Up 2 ISPs + Failover (RouterOS v7)

Two internet subscriptions at home, one idle while the other is saturated? MikroTik's PCC (Per Connection Classifier) is the standard fix: the router splits user connections across both ISPs, so their combined capacity gets used and one ISP going down doesn't kill the whole network.

Here's the practical setup on RouterOS v7, including failover.

How PCC Works

PCC splits connections, not bandwidth. Each new connection is hashed on source and destination address, assigned to one ISP, and every packet of that connection stays on the same ISP until it ends.

One download stays capped at one ISP's speed - but with many users online, total usable capacity is the sum of both links. Two 50 Mbps ISPs give 100 Mbps aggregate, not 100 Mbps for a single user.

Setup Order

The setup order matters.

First, make a WAN interface list and use in-interface-list=!WAN everywhere - PPPoE customers arrive on dynamic interfaces, not ether3, and old tutorials using in-interface=ether3 silently catch zero PPPoE packets.

Second, create the routing tables (RouterOS v7 requires them to exist first):

/routing table add name=ke-isp1 fib
/routing table add name=ke-isp2 fib

Third, the mangle rules: accept traffic to the modem networks, mark inbound connections per WAN in prerouting (not input, so port forwarding works), split new connections with both-addresses:2/0 and both-addresses:2/1, then mark routing to each table.

Fourth, recursive default routes with check-gateway=ping pointed at 8.8.8.8 and 1.1.1.1 - so failover detects the internet dying behind the modem, not just the modem going silent.

Hash Distribution Simulation

I ran a small simulation of the PCC hash distribution (CRC32 over source+destination pairs, 400 connections): ISP1 got 202 (50.5%) and ISP2 198 (49.5%).

With only 20 connections it split 9 vs 11 - PCC hashes, it doesn't round-robin, so expect imbalance when few users are online.

A weighted 2:1 split (denominator 3, faster ISP taking remainders 0 and 1) landed at 65.5% vs 34.5%, close to the 66.7/33.3 target.

A single 10 GB file over one 50 Mbps connection still takes 26.7 minutes - two ISPs don't make one download twice as fast.

Common Mistakes

  • check-gateway pointed only at the modem (route stays up while the internet behind it is dead)
  • both-addresses-and-ports splitting one server's connections across two public IPs (sites that bind sessions to an IP log users out)
  • PCC on Hotspot (the docs say it doesn't fit, since Hotspot's web proxy only uses the default table)

FastTrack doesn't break PCC on RouterOS 7.25.1 in CHR testing.

The full Indonesian guide with complete CLI blocks is on my blog: https://www.miftahulrizki.eu.org/2026/11/load-balancing-pcc-di-mikrotik-cara.html - it walks through the mangle rules, weighted PCC for unequal ISP speeds, and how to verify with /ip firewall mangle print stats.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.