Mikrotik Load balancing helps you combine two or more internet sources and provides you with combined bandwidth from all sources.
That means You can Combine the Internet of two or more ISPs and get high-speed Internet. For eg. 150Mbps + 150Mbps = 300Mbps Internet
Also Read: Mikrotik Port Forwarding
Related: Mikrotik RB5009

Table of Contents
- Mikrotik Load Balancing
- Mikrotik Loadbalancing Tutorial
- Mikrotik Load Balancing Script
- Load Balancing Script Download
Mikrotik Load Balancing
By the method of Network Load Balancing, You can Combine two or more WAN Gateway in one and can utilize combined bandwidth from both WAN Links.
In Mikrotik Routers you can configure Load Balancing and merge two or more UP Links together to Reduce your Network Load.
Mikrotik Loadbalancing Tutorial
Make sure to watch the complete tutorial video, which explains how you can use the provided scrips and Correctly configure Load Balancing in your Mikrotik Router.
Mikrotik Load Balancing Script
Here you can download scripts for Mikrotik 2 Wan Load Balancing, Mikrotik 3 Wan LoadBalancing, and Mikrotik 4 Wan LoadBalancing.
Using the scrips in Mikrotik makes it easier to Configure Mikrotik Routers.
Load Balancing Script Download
You can download Mikrotik Load Balancing Scripts and use the scripts to configure your Mikrotik Router to Load Balance and achieve High-Speed Internet by combining multiple internet sources.
Load Balancing 2 Wan Script
You can configure Load Balancing for 2 Wan using the following script.
/interface ethernet
set [ find default-name=ether5 ] name=LAN
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] disabled=yes
set [ find default-name=ether4 ] disabled=yes
/ip hotspot profile
add dns-name=abhsek.com hotspot-address=192.168.0.1 name=hsprof1
/ip pool
add name=hs-pool-5 ranges=192.168.0.2-192.168.0.254
/ip dhcp-server
add address-pool=hs-pool-5 disabled=no interface=LAN lease-time=23h59m59s \
name=dhcp1
/ip hotspot
add address-pool=hs-pool-5 interface=LAN name=hotspot1 profile=hsprof1
/ip address
add address=192.168.0.1/24 interface=LAN network=192.168.0.0
add address=192.168.1.4/24 interface=WAN1 network=192.168.1.0
add address=192.168.2.4/24 interface=WAN2 network=192.168.2.0
/ip dhcp-server network
add address=192.168.0.0/24 comment="hotspot network" gateway=192.168.0.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=\
WAN1_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\
WAN2_conn passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=to_WAN2 passthrough=yes
add action=accept chain=prerouting dst-address=192.168.1.0/24 in-interface=\
LAN
add action=accept chain=prerouting dst-address=192.168.2.0/24 in-interface=\
LAN
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN1_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN2_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=LAN new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=LAN new-routing-mark=to_WAN2 passthrough=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=192.168.0.0/24
/ip hotspot user
add name=admin password=admin
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.1.1 scope=255
add check-gateway=ping distance=2 gateway=192.168.2.1 scope=255
Load Balancing 3 Wan Script
To configure Load Balancing for 3 Wan, Please use the following Script.
/interface ethernet
set [ find default-name=ether5 ] name=LAN
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
set [ find default-name=ether4 ] disabled=yes
/ip hotspot profile
add dns-name=abhsek.com hotspot-address=192.168.0.1 name=hsprof1
/ip pool
add name=hs-pool-5 ranges=192.168.0.2-192.168.0.254
/ip dhcp-server
add address-pool=hs-pool-5 disabled=no interface=LAN lease-time=23h59m59s \
name=dhcp1
/ip hotspot
add address-pool=hs-pool-5 interface=LAN name=hotspot1 profile=hsprof1
/ip address
add address=192.168.0.1/24 interface=LAN network=192.168.0.0
add address=192.168.1.4/24 interface=WAN1 network=192.168.1.0
add address=192.168.2.4/24 interface=WAN2 network=192.168.2.0
add address=192.168.3.4/24 interface=WAN3 network=192.168.3.0
/ip dhcp-server network
add address=192.168.0.0/24 comment="hotspot network" gateway=192.168.0.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=\
WAN1_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\
WAN2_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN3 new-connection-mark=\
WAN3_conn passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN3_conn \
new-routing-mark=to_WAN3 passthrough=yes
add action=accept chain=prerouting dst-address=192.168.1.0/24 in-interface=\
LAN
add action=accept chain=prerouting dst-address=192.168.2.0/24 in-interface=\
LAN
add action=accept chain=prerouting dst-address=192.168.3.0/24 in-interface=\
LAN
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN1_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN2_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN3_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:3/2
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=LAN new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=LAN new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN3_conn \
in-interface=LAN new-routing-mark=to_WAN3 passthrough=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
add action=masquerade chain=srcnat out-interface=WAN3
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=192.168.0.0/24
/ip hotspot user
add name=admin password=admin
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=to_WAN3 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.1.1 scope=255
add check-gateway=ping distance=2 gateway=192.168.2.1 scope=255
add check-gateway=ping distance=3 gateway=192.168.3.1 scope=255
Load Balancing 4 Wan Script
Please use the following link to configure Load Balancing for 4 WAN Links.
/interface ethernet
set [ find default-name=ether5 ] name=LAN
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
set [ find default-name=ether4 ] name=WAN4
/ip hotspot profile
add dns-name=abhsek.com hotspot-address=192.168.0.1 name=hsprof1
/ip pool
add name=hs-pool-5 ranges=192.168.0.2-192.168.0.254
/ip dhcp-server
add address-pool=hs-pool-5 disabled=no interface=LAN lease-time=23h59m59s \
name=dhcp1
/ip hotspot
add address-pool=hs-pool-5 interface=LAN name=hotspot1 profile=hsprof1
/ip address
add address=192.168.0.1/24 interface=LAN network=192.168.0.0
add address=192.168.1.4/24 interface=WAN1 network=192.168.1.0
add address=192.168.2.4/24 interface=WAN2 network=192.168.2.0
add address=192.168.3.4/24 interface=WAN3 network=192.168.3.0
add address=192.168.4.4/24 interface=WAN3 network=192.168.4.0
/ip dhcp-server network
add address=192.168.0.0/24 comment="hotspot network" gateway=192.168.0.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip firewall filter
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=\
WAN1_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\
WAN2_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN3 new-connection-mark=\
WAN3_conn passthrough=yes
add action=mark-connection chain=input in-interface=WAN4 new-connection-mark=\
WAN4_conn passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN3_conn \
new-routing-mark=to_WAN3 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN4_conn \
new-routing-mark=to_WAN4 passthrough=yes
add action=accept chain=prerouting dst-address=192.168.1.0/24 in-interface=\
LAN
add action=accept chain=prerouting dst-address=192.168.2.0/24 in-interface=\
LAN
add action=accept chain=prerouting dst-address=192.168.3.0/24 in-interface=\
LAN
add action=accept chain=prerouting dst-address=192.168.4.0/24 in-interface=\
LAN
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN1_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:4/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN2_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:4/1
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN3_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:4/2
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN new-connection-mark=WAN4_conn passthrough=yes \
per-connection-classifier=both-addresses-and-ports:4/3
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=LAN new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=LAN new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN3_conn \
in-interface=LAN new-routing-mark=to_WAN3 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN4_conn \
in-interface=LAN new-routing-mark=to_WAN4 passthrough=yes
/ip firewall nat
add action=passthrough chain=unused-hs-chain comment=\
"place hotspot rules here" disabled=yes
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
add action=masquerade chain=srcnat out-interface=WAN3
add action=masquerade chain=srcnat out-interface=WAN4
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
src-address=192.168.0.0/24
/ip hotspot user
add name=admin password=admin
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=to_WAN3 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.4.1 routing-mark=to_WAN4 \
scope=255
add check-gateway=ping distance=1 gateway=192.168.1.1 scope=255
add check-gateway=ping distance=2 gateway=192.168.2.1 scope=255
add check-gateway=ping distance=3 gateway=192.168.3.1 scope=255
add check-gateway=ping distance=4 gateway=192.168.4.1 scope=255
If you have any Queries regarding Mikrotik Load Balancing, Then Please Comment below!
FAQ
Can MikroTik do load balancing?
Yes, MikroTik routers can be configured to perform load balancing by combining multiple WAN Links to achieve higher speed, failover, and Load Balancing.
What is dual WAN load balancing?
Dual WAN Loadbalancing is the method of combining two WAN Links to increase the overall Bandwidth.
5 Comments
Hi! I have hex MT which has a hotspot and bandwidth management configurations. I want to add a dual wan config, will this affect any of my current configs?
No, It won’t affect your current configure, just configure the script according to your network needs.
hi sir,
is cellular bonding of 4 wan is possible in Mikrotik.?
is it ok to connect dongle to TP LINK Portable 3G/4G router and convert to WAN 1 ,2 ,3 ,4?
HI,
I’ve added LB with 2 connections but when both are enabled the internet speed drops to Kbps that makes almost impossible to browser or even to resolve DNS.
I have the main link with 500Mbps/250Mbps and the backup link with 500Mbps/35Mbps.
What could be the problem?
How can get my total speed 800mbps + 80 mbps backup
it s only 84mbps, i get on speedtest