How To Setup Charge Balancing On Mikrotik Router Using The Pcc Features.



Load balancing is the mightiness to residuum traffic across 2 or to a greater extent than WAN links past times using basic routing. When connections are initiated for session similar Web, email, video streaming etc, the traffic is distributed over all WAN links.
 For example, if you lot receive got meshwork service from 2 ISPs 10Mbps as well as 5Mbps respectively, you lot volition right away receive got a full bandwidth of 15Mbps. When browsing the meshwork your browser volition opened upward multiple connections to the website, each connexion volition download a unlike business office of the page, around for images as well as others for text which makes websites charge faster.

Also, network charge balancing is generally used to furnish network redundancy thus that inwards the termination of an outage on 1 of the WAN link, access to network resources is notwithstanding available via the secondary link(s). Link redundancy is a fundamental requirement for delineate of piece of occupation concern continuity plans as well as is largely used inwards combination amongst critical applications similar VPNs as well as VoIP.


While dealing amongst charge balancing, Mikrotik has benefits over other routers, because of its features. One of the features nosotros volition live on looking at piece configuring our charge balancing is the Mikrotik PCC features.

PCC is a characteristic inwards Mikrotik routerOS that allows traffics to live on divided into equal streams of packets, giving administrators the mightiness to position as well as choke along specific traffics restricted to a predefined connection. It tin live on used to accomplish load-balancing amongst the selection of automatic fail-over inwards a dual Internet access provider connection. In this post, I volition part amongst us on how to configure charge balancing on a Mikrotik router, using the Mikrotik PCC features.






We tin as well as then create a connections that volition become out via ISP1 as well as come upward inwards via same as well as vise versa. The configuration below ensures it is achieved. First, address the interfaces.

Mikrotik basic configuration here. If your new  to mikrotik i advice you lot read my post on getting started amongst mikrotik router.

Next, nosotros use policy routing to permit traffics from the LAN to WAN subnets.


/ ip firewall mangle


add together chain=prerouting dst-address=192.168.1.0/30 action=accept in-interface=LAN


add together chain=prerouting dst-address=192.168.2.0/30 action=accept in-interface=LAN


Next, nosotros identify, grade as well as choke along connections through both WAN links separate. This makes certain that requests that come upward inwards through a item Internet access provider connection, leave of absence via same. See below.


add together chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection \

new-connection-mark=ISP1_conn

add together chain=prerouting in-interface=ISP2 connection-mark=no-mark action=mark-connection \

new-connection-mark=ISP2_conn

Next, nosotros must too position as well as separate traffics originating from the LAN as well as going out through a item Internet access provider connection. This volition ensure the render through same. See below:

add together chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \

per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn


add together chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \


per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP2_conn

Next, nosotros receive got to create routes using the connexion marks created above. The route marks are created for connections via the LAN as well as WAN interfaces. These routes volition live on used to create default routes to our ISPs. See below.

add together chain=prerouting connection-mark=ISP1_conn in-interface=LAN action=mark-routing \


new-routing-mark=to_ISP1


add together chain=prerouting connection-mark=ISP2_conn in-interface=LAN action=mark-routing \


new-routing-mark=to_ISP2


add together chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1


add together chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2

Now, nosotros create default routes using the route marks.This makes certain that ISP1's connections remain on ISP1's link piece those of ISP2, remain on ISP2's link. See below.

/ ip route


add together dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ISP1 check-gateway=ping


add together dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_ISP2 check-gateway=ping
add together dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping


add together dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping


Finally, the NAT dominion making certain that mortal IPs are masqueraded to the populace IPs on the WAN ports equally they travel out to the internet.

/ ip firewall nat


add together chain=srcnat out-interface=ISP1 action=masquerade


add together chain=srcnat out-interface=ISP2 action=masquerade

See consummate destination configuration ascendance below:

/ ip address


add together address=172.16.10.1/24 network=172.16.10.0 broadcast=172.16.10.255 interface=LAN


add together address=192.168.1.2/30 network=192.168.1.0 broadcast=192.168.1.3 interface=ISP1


add together address=192.168.2.2/30 network=192.168.2.0 broadcast=192.168.2.3 interface=ISP2


/ ip firewall mangle

add together chain=prerouting dst-address=192.168.1.0/30 action=accept in-interface=LAN

add together chain=prerouting dst-address=192.168.2.0/30 action=accept in-interface=LAN


add together chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection \


new-connection-mark=ISP1_conn


add together chain=prerouting in-interface=ISP2 connection-mark=no-mark action=mark-connection \


new-connection-mark=ISP2_conn


add together chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \


per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ISP1_conn


add together chain=prerouting in-interface=LAN connection-mark=no-mark dst-address-type=!local \


per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ISP2_conn


add together chain=prerouting connection-mark=ISP1_conn in-interface=LAN action=mark-routing \


new-routing-mark=to_ISP1


add together chain=prerouting connection-mark=ISP2_conn in-interface=LAN action=mark-routing \


new-routing-mark=to_ISP2


add together chain=output connection-mark=ISP1_conn action=mark-routing new-routing-mark=to_ISP1


add together chain=output connection-mark=ISP2_conn action=mark-routing new-routing-mark=to_ISP2

/ ip route


add together dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_ISP1 check-gateway=ping


add together dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_ISP2 check-gateway=ping


add together dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping


add together dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping

/ ip firewall nat


add together chain=srcnat out-interface=ISP1 action=masquerade

add together chain=srcnat out-interface=ISP2 action=masquerade.





thus this is all novel to configure load Balancing On Mikrotik Router Using The PCC Features.
If you lot receive got whatever challenge doing the to a higher house configuration delight leave of absence us a message inwards the comment box below as well as nosotros volition instruct dorsum to you lot equally shortly equally possible. thank you lot for staying amongst us.

Berlangganan update artikel terbaru via email:

0 Response to "How To Setup Charge Balancing On Mikrotik Router Using The Pcc Features."

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel