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. PCC splits connections, not bandwidth. Each new…
MikroTik's PCC (Per Connection Classifier) is a router feature that can balance connections across two internet service providers (ISPs). By using PCC, the router distributes user connections across both ISPs, allowing for the combined capacity of the ISPs to be utilized. Should one ISP go down, the entire network isn't disrupted. This setup is particularly useful when one ISP's connection is idle while the other is saturated.
On RouterOS v7, the practical implementation of PCC involves several steps. First, create a WAN interface list and use in-interface-list command with a condition excluding the WAN interface. This is necessary as PPPoE customers typically connect to dynamic interfaces, not static ones. Secondly, create routing tables for each ISP.
Third, create mangle rules to handle traffic to the modem networks, mark inbound connections per WAN in prerouting (not input to ensure port forwarding works), and split new connections using both-addresses:2/0 and both-addresses:2/1 commands. From there, mark routing to each table. Fourth, set up recursive default routes with check-gateway=ping tests to detect when the internet goes down behind the modem, not just when the modem goes silent.
A small simulation showed that PCC distributes connections based on a CRC32 hash of the source and destination address pairs. With 400 connections, ISP1 received 202 (50.5%) of the connections and ISP2 got 198 (49.5%). However, with fewer connections, the distribution was uneven, resulting in 9 connections to ISP1 and 11 to ISP2.
The imbalance in connection distribution is expected due to PCC's hashing mechanism, which doesn't perform round-robin. When the number of users is low, there can be significant discrepancies in the distribution of connections across ISPs.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.