Troubleshooting Guide Advanced

Dual-WAN Failover & Load Balancing Setup Guide for MikroTik & FortiGate

Configure automated Dual-WAN failover, PCC load balancing, and VoIP QoS across Pakistani ISPs (StormFiber + PTCL / Nayatel / Transworld) to guarantee zero office downtime.

Time Required30 min
Success Rate92%
Total Steps6 Steps

⚡ Direct Answer & Quick Diagnostic Summary (AEO)

To configure zero-downtime automated Dual-WAN failover and load balancing in Pakistan (e.g. Primary StormFiber + Secondary PTCL Flash Fiber or Nayatel), configure recursive gateway routing or Per-Connection Classifier (PCC) on MikroTik RouterOS or SD-WAN Rules on FortiGate. On MikroTik, create two default static routes with `check-gateway=ping`: Route 1 to 8.8.8.8 via ISP1 gateway (Distance 1, Target Scope 30) and Route 2 to 1.1.1.1 via ISP2 gateway (Distance 2, Target Scope 30). This ensures failover triggers only when external internet DNS stops responding, rather than relying on local ISP modem link lights. On FortiGate, aggregate both WAN interfaces into an SD-WAN Zone with Performance SLA health checks pinging 8.8.8.8 and 1.1.1.1; set SLA targets to latency < 80ms and packet loss < 5%. Route SIP/VoIP and Zoom traffic over the lowest-jitter link and mark HTTPS traffic with sticky session persistence.

Primary Root Causes

• Single ISP optical fiber cuts during city construction• Local ISP modem link stays up while upstream internet routing drops• Lack of recursive ping checks in gateway routing tables• Session breaking on banking & HTTPS apps during un-stickied round-robin balancing
⚡ Emergency On-Site Dispatch Available Across Karachi • 30–45 Mins Arrival SLA

Can't resolve this issue or hardware failure halted your shift?

Our certified field hardware & network engineers are on standby for emergency on-site repair across Korangi, SITE, Clifton, DHA, Shahrah-e-Faisal, and all Karachi commercial areas.

Step-by-Step Diagnostic Checklist

Step 1: Assign Dedicated Physical WAN Interfaces & IP Subnets

Connect ISP 1 (e.g. StormFiber ONT) to ether1-WAN1 and ISP 2 (e.g. PTCL Flash Fiber) to ether2-WAN2. Configure distinct IP subnets (e.g. 192.168.10.2/24 on WAN1 and 192.168.100.2/24 on WAN2) to avoid subnet overlap.

Step 2: Configure Recursive Gateway Routing with Check-Gateway Ping

In MikroTik `/ip route`, add recursive routes pointing to public DNS IPs (8.8.8.8 via ISP1 Gateway, 1.1.1.1 via ISP2 Gateway with Target-Scope=30), then create default routes `0.0.0.0/0` via 8.8.8.8 (Distance 1) and via 1.1.1.1 (Distance 2). If ISP1 loses internet, the ping to 8.8.8.8 fails and MikroTik flips all traffic to WAN2 in under 1 second.

Step 3: Implement Per-Connection Classifier (PCC) for Bandwidth Aggregation

In `/ip firewall mangle`, mark connections using `per-connection-classifier=both-addresses-and-ports:2/0` for WAN1 and `2/1` for WAN2. This ensures outgoing TCP/UDP sessions distribute equally across both ISP connections while maintaining session stickiness.

Step 4: Configure Dual Outbound Source NAT (Masquerade) Rules

Add two NAT rules in `/ip firewall nat` specifying `chain=srcnat out-interface=ether1-WAN1 action=masquerade` and `chain=srcnat out-interface=ether2-WAN2 action=masquerade`.

Step 5: Prioritize SIP / PABX & Financial Trading Traffic

Create firewall mangle rules matching UDP port 5060 (SIP), RTP voice ports 10000–20000, and PSX trading IP addresses, binding them strictly to the lowest latency connection (WAN1) with automatic fallback.

Step 6: Deploy Netwatch Discord/Telegram Alert Scripts

Configure MikroTik Netwatch script triggers to send instant automated Telegram or Discord alerts to your IT administrator whenever WAN1 goes down or recovers.

Frequently Asked Questions

Why does basic distance-based dual WAN failover fail when an ISP has upstream routing issues in Karachi?

If your router only checks the physical ethernet cable or modem IP, it thinks the line is active even if the ISP optical core is down. Recursive routing pings public DNS (8.8.8.8) through that specific gateway, detecting real internet loss.

Will combining two 50 Mbps connections give 100 Mbps on a single file download?

No single TCP download stream can exceed the bandwidth of one physical link. PCC load balancing splits connections so multiple users or multi-threaded downloaders utilize both connections simultaneously for full 100 Mbps aggregate throughput.

Professional Karachi Engineering

Need Enterprise Deployment or Support for IT Support & IT Services?

If your team needs full hands-on setup, SLA monitoring, or emergency on-site assistance in Karachi, our certified engineers are ready.