routerosqospcqload-balancing

MikroTik Dual-WAN PCQ Simple Queue Script Example (works for load-balancing)

Overview

PCQ (Per Connection Queue) simple queue configuration for multi-WAN and multi-LAN network setups with load-balancing across multiple internet connections.

Network Setup

  • WAN 1: Viettel (60 Mbps)
  • WAN 2: FPT (100 Mbps)
  • LAN — Office: 192.168.188.0/24
  • LAN — Guest: 10.0.0.0/24

Queue Hierarchy

Viettel Master Queue (60M max)

Child Queuelimit-atmax-limitTarget
Office50M60M192.168.188.0/24
Guest10M60M10.0.0.0/24

FPT Master Queue (100M max)

Child Queuelimit-atmax-limitTarget
Office80M100M192.168.188.0/24
Guest20M100M10.0.0.0/24

Technical Notes

PCQ queues create per-connection limitations, preventing individual users from monopolizing available bandwidth. Parent-child queue structure ensures total allocation stays within WAN link constraints while maintaining minimum guaranteed throughput via limit-at parameters.