Mikrotik WAN failover setup

Posted by:

The setup continued from basic setup. it will shows 2 WAN 1 LAN failover senario.

Port 1: (ISP 1)

Port 5: (ISP 2)

Port 2: NAT (for Inside users with DHCP)

The IP address is only for testing purpose, you can change your own IP address. I am going to change the WAN IP to a static address.

Please make sure the address. You don’t need to focus the gateway, and DNS servers now.  However, you can check the IP address on the menu IP -> addresses.

Bridge Set

I will use the port 5 for ISP 2, delete the ether5. for WAN side, the bridge is not required.

DNS Status

My DNS status, I will use Cisco’s OpenDNS service. You can use your favorite DNS service.

Add IP Address for PORT 5

I assign the port 5 (ether 5) address as static IP not DHCP. You may carefully input address must have subnet indicator (/24 /subnet number). You can get the subnet number on google search with your IP address or contact ISP.

NAT Rules

Now, I add IP-> Firewall-> NAT, new NAT Rule on ether5.

NAT Rules Advanced Tab

I fully don’t know about IPsec, however, I copied from original one.

Route List (Gateway, etc)

Now, go to the IP-> Route List. You can check the gateway. I will use recursive DNS check method for failover. the picture shows already made it. follow screen shows what is inside.

Gateway 1 Setup

DAC line cannot delete. I recommend deleting the other lines and remake them. This rule purpose adds a gateway for ISP 1.

Recursive DNS with Ping

I will use google’s public DNS service. Distance and scope value need to check.

ISP 2 Gateway with distance 2

Add port 5 gateway with distance 2.

Final Results

You can see final results. The blue line means not activated.

When you unplug the network, it will switch the gateway to the network. It took around 10 sec. also, when you put it back network, it recovers to the main within 10 sec.


About the Author:

  Related Posts