blog posts

High Availability implementation methods on MikroTik

High Availability implementation methods on MikroTik

High Availability is the ability of the system to shape the physical and logical changes of the system to maximize the maintenance time of the network. Through several protocols and techniques, we can implement High Availability on MikroTik RouterOS and have good system resources on MikroTik RouterBOARDS.

In the first place, we will refer to the methods that allow the use of High Availability. These methods are:

  • • Bonding
  • • STP protocol
  • Static Routing
  • Dynamic Routing
  • Virtual Routing (VRRP)
  • • ByPass on routers
  • • Redundant Power on routers

You can use all of these or some of them, depending on how you solve the problem, but sometimes it is necessary to use more than one to achieve satisfactory results, so you need to first network topology Understand well.

متد های High Availability در میکروتیک

As you can see in the picture, in the Bridged network, there will be only one ISP and one LAN gateway without the need for routing.

Bonding

Bonding works by putting two or more interfaces together to merge links or enable failover, but in special cases, failover systems can run for more than 20 seconds.

High Availability در میکروتیک

Advantages and Disadvantages of Bonding

Among the advantages of this method is that the default configuration will be done easily and there will be different modes for integration and it can be used through the EoIP Tunnel.

In addition, Disadvantages include slow detection of changes in network topology and problems with over-transfer in some cases.

STP or RSTP

The Spanning Tree Protocol, also known as STP for short, is used to create and present loopless bridge networks. In the first step, the STP protocol selects the starting point of the path as the Root Bridge and then begins to calculate paths without loops. If a loop is detected through any port, the STP protocol disables that port or puts it in Stand By.

High Availability در میکروتیک چیست

Advantages and disadvantages of STP

One of the advantages of the STP protocol is that there is no need to worry about L2 filters or using Split Horizon to prevent loops. So The STP protocol will thoroughly analyze the network topology.

But if you have a large network and need to make changes to increase its performance and security, STP may not be a good choice.

Routed Networks

As you can see in the picture, for routed networks (Routed Networks) we need to use at least two ISPs, several LAN gateways, and a split network.

Static Routing method

It will be possible to provide High Availability through Static Routing, but you need to anticipate all the problems in advance.

Advantages and disadvantages of the Static Routing method

One of the advantages of Static Routing is that it has the ability to solve specific problems that may become more complicated by changing the dynamic protocol or problems that can not be solved due to the failure of the Dynamic Routing protocol.

But the disadvantage is that human error will occur in large networks, and some failover solutions can be very difficult in some cases.
Dynamic Routing method

Static routing problems can be solved through dynamic routing protocols such as RIP, OSPF, MME, BGP, etc.

Dynamic Routing protocols are able to announce logical and physical changes in the network through their own algorithm. and Also apply changes to the Routing Table to maintain traffic flow.

Advantages and disadvantages of the Dynamic Routing method

The advantages of this type of protocol of MikroTik include hard work, ease of creating a one-way flow for Upload, and another flow for download without losing Redundancy.

The only drawback of this method is the use of CPU algorithms and in many cases changes to the Routing Table.

 

VRRP scenario

Virtual Router Redundancy Protocol, abbreviated as VRRP, is a network protocol that allows us to automatically assign available routers to hosts. So This protocol automatically increases the availability and reliability of routing paths by selecting default gateways. Also, VRRP does this by creating virtual router groups, which is an abstract representation of multiple routers. Default gateway Systems are assigned to a virtual router instead of a physical router.

If the physical router that handles packets on behalf of the virtual router has a problem, another physical router will automatically replace it. A router that routers packets at a specified time is known as a Master Router.

پیاده سازی High Availability بر روی روتر میکروتیک

Routers have a priority between 255-1 and the router with the highest priority is selected as the Master Router. You may change your priority when planning to remove the Master Router. Because of this, the Backup Router will replace the master router without having to wait for this transfer. This process will reduce the effect of the Black Hole.

VRRP Scenario Features

• VRRP implementation is very simple by default.

• Advanced parameters must be set in order to get the desired results, such as the following example:

Suppose you want to select the R1 router as the Master Router forever. Therefore, you need to set a higher priority than the R2 router for it and set the Preampetable mode to Mode = Yes.

 

متد های پیاده سازی High Availability میکروتیک

Soft Configuration

The software settings for the R1 router will be as follows:

/ interface vrrp add interface = ether1 vrid = 49 priority = 150

/ ip address add address = 192.168.1.1 / 24 interface = ether1

/ ip address add address = 192.168.1.254 / 32 interface = vrrp1

 

متد های پیاده سازی High Availability در میکروتیک

The R2 router rating is as follows:

/ interface vrrp add interface = ether1 vrid = 49 priority = 100

/ interface vrrp add interface = ether1 vrid = 49 priority = 100

/ ip address add address = 192.168.1.2 / 24 interface = ether1

/ ip address add address = 192.168.1.254 / 32 interface = vrrp1

VRRP can also be used as a Load Balancer, so you need to create two virtual routing groups with different IDs.

متد های پیاده سازی High Availability در روتر میکروتیک

Software settings:

For R1 routers as:

/ip address add address=192.168.1.1/24 interface=ether1

/interface vrrp add interface=ether1 vrid=49 priority=150

/interface vrrp add interface=ether1 vrid=77 priority=100

/ip address add address=192.168.1.253/32 interface=vrrp1

/ip address add address=192.168.1.254/32 interface=vrrp2

Will be as follows for R2 routers:

/ ip address add address = 192.168.1.2 / 24 interface = ether1

/ interface vrrp add interface = ether1 vrid = 49 priority = 100

/ interface vrrp add interface = ether1 vrid = 77 priority = 150

/ ip address add address = 192.168.1.253 / 32 interface = vrrp1

/ ip address add address = 192.168.1.254 / 32 interface = vrrp2

Advantages and disadvantages of VRRP

In the event of a physical problem of MikroTik , it responds quickly and the devices can be easily replaced without losing much time or the Routing Table needs to be modified.

So The only drawback of this scenario is that you will reset some connections in the named networks.

متد های پیاده سازی High Availability در روتر های میکروتیک

ByPass

Resources on routers via ByPass will be as follows.

Power Redundancy

The routers can be powered simultaneously with the DC and POE injector jacks, so you won’t waste time in the event of a power outage. In this case, a higher voltage is selected.

Conclusion

So From what has been said, it can be concluded that having a Redundancy feature will not be enough to increase High Availability performance. And we can only implement High Availability on our microcontroller by integrating these methods. All of these features and techniques will be available for RouterOS and MikroTik routers.

source