What is Mikrotik Load Balancing?

Mikrotik Load Balancing – In a dense computer network, of course, the name of sending data and receiving data will always be there and will always work simultaneously. Of course this will make network traffic will be complicated. Therefore, there is such a thing as hardware called load balancing.

Just liken it if the internet network traffic in your office or your agency is interrupted just because of colliding data packets, of course it is very troublesome. Therefore, it is necessary to have load balancing from Mikrotik.

Understanding Mikrotik Load Balancing

Load balancing is the process of distributing network traffic across multiple servers. This ensures that no single server endures too many requests. By spreading work evenly, load balancing improves application responsiveness. It also increases the availability of apps and websites for users.

The load balancer manages the flow of information between the server and the endpoint device (PC, laptop, tablet, or smartphone). Servers can be on-premises, in data centers or public clouds. Servers can also be physical or virtual. Load balancers help servers move data efficiently, optimize use of application delivery resources, and prevent server overload.

Mikrotik load balancing performs continuous health checks on servers to ensure they can handle requests. If necessary, Mikrotik load balancing removes the unhealthy server from the pool until it is restored. Some load balancers even trigger the creation of new virtual application servers to cope with the increased demand.

The Best Mikrotik Load Balancing

Talking about Mikrotik load balancing, there are some of the best Mikrotik load balancing that can be applied according to needs.

Load Balancing Mikrotik 2 ISP

On mikrotik, there are many methods that can be used if you have more than 2 internet lines such as BGP, Failover, Load Balance, etc. Mikrotik 2 ISP load balancing is one of the most reliable.

Mikrotik PCC Load Balancing

The method called Mikrotik PCC Load Balancing is if you use load balancing two connection lines.

PCC (Per Connection Classifier). With PCC we can group the connection traffic via or in and out of the router into several groups. This grouping can be distinguished by src-address, dst-address, src-port and or dst-port. The router will remember the gateway path that was passed at the beginning of the connection traffic, so that subsequent packets that are still associated with the initial connection will be passed on the same gateway path as well.

Load Balancing Mikrotik 3 ISP

This is one of the most profitable Mikrotik load balancing. So, Mikrotik 3 ISP load balancing is a thing called failover.

If you run load balancing to all 3 ISPs, our network performance will not be optimal because there is 1 ISP that has shared bandwidth. Although the number is greater than the dedicated one, shared means that 100Mbps is still being divided again, usually the average bandwidth we find is only around 15-20Mbps.

Therefore, we will only run load balancing using 2 ISPs that have dedicated bandwidth. Meanwhile ISPs that have shared bandwidth will be generated as backups when all dedicated bandwidth ISPs experience problems (down).

Load Balancing Mikrotik NTH

In Mikrotik load balancing there is a feature called NTH. NTH itself is a feature on the Mikrotik firewall that is used as a counter for data packets or connections (new packets). There are two main parameters of this NTH, namely “Every” and “Packet”.

“Every” is a counter parameter, although “Packet” is a packet indication of how many NTH rules will be executed. Thus the application of NTH is carried out by activating a counter on the mangle, then marked with a ‘Route-Mark’. So this route mark is used as the basis for making policy routes.

Mikrotik Load Balancing and Failover Settings

It was mentioned above if there is a way to set load balancing and Mikrotik Failover, this is very useful if you want to use 3 ISPs directly.

Before starting the configuration, in order to make it easier to create a mangle rule, make an address list containing the LAN and network addresses that are immediately connected to the router. The way for the above topology, there is ether1-ISP1, ether2-ISP2, ether3-ISP3, and LAN network (only 1), then:

/ip firewall address-list

add address=11.11.11.0/24 list=LAN

add address=22.22.22.0/24 list=LAN

add address=33.33.33.0/24 list=LAN

add address=192.168.100.0/24 list=LAN

Packages can be classified according to src-address, src-port, dst-address, and dst-port.

Firewall Mangle

/ip firewall mangle

add action=mark-routing chain=prerouting src-address-list=LAN dst-address-list=!LAN \

    dst-address-type=!local new-routing-mark=route_to_ISP1 passthrough=no \

    per-connection-classifier=both-addresses:2/0

add action=mark-routing chain=prerouting src-address-list=LAN dst-address-list=!LAN \

    dst-address-type=!local new-routing-mark=route_to_ISP2 passthrough=no \

    per-connection-classifier=both-addresses:2/1

Since we only use src-address and dst-address (both-address), each mark is named route_to_ISP1 and route_to_ISP2.

Next, we create a recursive route using a static route protocol to route traffic to the online world. We first note the gateway of each ISP.

ISP1: 11.11.11.1

ISP2: 22.22.22.1

ISP3: 33.33.33.1

Because there are 3 ISPs that we will use for recursive routes to the online world, therefore we need 3 public IPs in the online world to realize a recursive default gateway. Make sure this IP can be pinged and rarely down.

ISP1: 11.11.11.1 ==> 1.0.0.1

ISP2: 22.22.22.1 ==> 1.1.1.1

ISP3: 33.33.33.1 ==> 8.8.4.4

/ip route

 

## Static host route to public ip on the internet.

## Set a new scope value (different from default scope=30), eg=25.

add distance=1 dst-address=1.0.0.1/32 gateway=11.11.11.1 scope=25

add distance=1 dst-address=1.1.1.1/32 gateway=22.22.22.1 scope=25

add distance=1 dst-address=8.8.4.4/32 gateway=33.33.33.1 scope=25

 

## Default gateway to route traffic coming from the router itself.

## The target-scope value is the same as the scope value on the static host route.

## Parameter check-gateway=ping makes the router ping the gateway every 10 seconds interval,

## If ping 2x timeout in a row,

## then the link to the ISP that recursive to the gateway is considered down.

add check-gateway=ping distance=1 gateway=1.0.0.1 target-scope=25

add check-gateway=ping distance=2 gateway=1.1.1.1 target-scope=25

add check-gateway=ping distance=3 gateway=8.8.4.4 target-scope=25

 

## Default gateway for routing traffic marked route_to_ISP1.

## The target-scope value is the same as the scope value on the static host route.

## Set priority using distance: ISP1, ISP2, ISP3

add distance=1 gateway=1.0.0.1 routing-mark=route_to_ISP1 target-scope=25

add distance=2 gateway=1.1.1.1 routing-mark=route_to_ISP1 target-scope=25

add distance=3 gateway=8.8.4.4 routing-mark=route_to_ISP1 target-scope=25

 

## Default gateway for routing traffic marked route_to_ISP2.

## Default gateway for routing traffic marked route_to_ISP2.

## Set priority using distance: ISP2, ISP1, ISP3

add distance=1 gateway=1.1.1.1 routing-mark=route_to_ISP2 target-scope=25

add distance=2 gateway=1.0.0.1 routing-mark=route_to_ISP2 target-scope=25

add distance=3 gateway=8.8.4.4 routing-mark=route_to_ISP2 target-scope=25

Load Balancing Setting Service

Maybe there are still many people who do not understand how to use load balancing. Although this is indeed one of the things that is needed, of course, after all, load balancing must exist on every dense computer network such as office agencies, government, schools, universities, and must use load balancing.

If you are still unable to do load balancing settings, then you can hire a load balancing setting service. Services like this are very common if you want to install load balancing.

You can really rely on NetData for load balancing setting services, you will get a guarantee of stable load balancing and also with affordable service costs with the best quality.

Conclusion

The main purpose of load balancing is to prevent a single server from being overloaded and possibly crashing. In other words, load balancing can improve service availability and help prevent downtime.

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *

Semua operasional PT. Network Data Sistem akan menggunakan domain nds.id per tanggal 8 Mei 2019. Semua informasi/promosi dalam bentuk apapun selain menggunakan domain nds.id bukan tanggung jawab PT. Network Data Sistem Dismiss