Site icon System Zone

MikroTik Load Balancing with 2 PPPoE and 1 Static WAN using ECMP

ECMP provides almost 100% reliable load balancing and link redundancy solution. ECMP is a per connection load balancing where connection is marked with source and destination IP pair. In my previous article I discussed how to configure DUAL WAN load balancing with failover using ECMP method where WAN connections were static IP Addresses. But some ISP companies use PPPoE service for their client connection. So, some network administrators become confused to configure load balancing with PPPoE WAN connection because PPPoE WAN connection is a little bit complex than static WAN connection. Some of my loyal readers also ask me to make a tutorial on Load Balancing with PPPoE Client. So, in this article I will discuss how to configure Load Balancing with Failover over two PPPoE WAN connections and one static WAN connection in MikroTik Router.

Network Diagram

We will configure Multi WAN load balancing using ECMP method according to the following network diagram.

MikroTik Multi WAN Load Balancing

In this network, MikroTik Router’s ether1 port is connected to ISP1 with PPPoE WAN connection (username: wan1 and Password: wan1) and ether2 port is connected to ISP2 with PPPoE WAN connection (username: wan2 and Password: wan2) and ether3 port is connected ISP3 with IP block 172.25.25.0/30 and ether4 port is connected to LAN network and its IP block is 10.10.10.0/24. PC-1 and PC-2 are two LAN workstations which are connected to LAN interface through a LAN switch.

We will configure ECMP Load Balancing in this MikroTik Router so that LAN traffics can pass though these three WAN connections equally (because we assumed that all WAN links have same bandwidth).

This ECMP configuration will also ensure Link Redundancy. So, if any WAN connection gets disconnected, LAN traffic will pass through the available WAN connections until the lost WAN connection gets available.

Load Balancing Configuration over 2 PPPoE Clients and 1 Static WAN Connection

We will now start Load Balancing and Link Redundancy configuration in MikroTik Router according to the above network diagram. Complete configuration can be divided into the following six steps.

Step 1: Renaming MikroTik Interface Name

We will first rename interface name so that we can easily understand and remember configuration. The following steps will show how to rename MikroTik interface name.

Renaming Interface Name

Step 2: Configuring PPPoE WAN connection

As we have two PPPoE WAN connections, we must configure MikroTik PPPoE Client on two WAN interfaces. The following steps will show how to configure PPPoE Client on MikroTik WAN interfaces.

PPPoE WAN Configuration

Step 3: Assigning Static WAN and LAN IP

We will now assign static WAN and LAN IP addresses on our respected interface. The following steps will show how to assign IP address on MikroTik interfaces.

MikroTik Address List

Step 4: Assigning DNS IP

DNS is required to resolve domain name to IP address. Without DNS server MikroTik Router cannot resolve domain name to IP address and fail to communicate with the public domain server. The following steps will show how to assign DNS IP in MikroTik Router.

Step 5: NATing Configuration

We will now create three masquerade NAT rules so that LAN users can access internet through these three WAN connections. That means, if any packet leaves via pppoe_wan1 interface, it will be NATed with pppoe_wan1 gateway IP address and similarly if any packet leaves via pppoe_wan2 interface and WAN3 interface, it will be NATed with pppoe_wan2 gateway IP address and WAN3 gateway IP address respectively. The following steps will show how to create masquerade NAT rule in MikroTik Router.

NATing Configuration

Step 6: ECMP Routing Configuration

We will now configure ECMP (Equal Cost Multi-Path) gateway over three WAN links. The following steps will show how to assign ECMP gateway in MikroTik Router.

ECMP Routing Configuration

So, user’s connection will now be passed through these three WAN links successively. WAN connections will be checked by ping and if any connection gets disconnected, traffic will pass through the available WAN connections until the lost WAN connection gets connected. So, load balancing with failover will be established with ECMP load balancing method.

Connections to the Router Itself

With all multi-gateway situations there is a usual problem to reach router from public network via one, other or both gateways. Because outgoing packets use same routing decision as packets those are going through the router. So reply to a packet that was received via WAN1 might be sending out via WAN2 or WAN3. To avoid this we need to do policy based routing.

The following steps will show how to mark router’s incoming connection to pass it over proper gateway.

Creating Policy with Mangle Rule

We have created policy to pass router’s incoming packets to the respected WAN interface. Now we will create routing based on this policy.

Policy Based Routing List

Policy based routing to get router properly from public network has been completed. Now ECMP load balancing will affect no more on getting router from public network.

If you face any confusion to follow the above steps properly, watch the following video on ECMP Load Balancing with 2 PPPoE and 1 Static WAN connection. Hope it will reduce your any confusion.

How to configure Multi WAN Load Balancing with Failover using ECMP Method has been discussed in this article. I hope you will now be able to configure multi wan load balancing with ECMP method properly. However, if you face any confusion to configure Multi WAN Load Balancing using ECMP method, feel free to discuss in comment or contact with me from Contact page. I will try my best to stay with you.

Exit mobile version