logos (other)


Go Wireless NZ

Follow by Email

Tuesday, October 2, 2012

MikroTik Dual Gateway Failover

This example will show how to configure a MikroTik Router with a secondary WAN port for failover in the case of redundancy if the primary WAN port goes down.

Setting up the primary WAN port:
/ip address add address= interface=ether1 comment="primary wan" disabled=no

Setting up the Secondary failover WAN port:
/ip address add address= interface=ether2 comment="failover wan" disabled=no

Setup DNS: /ip dns set allow-remote-requests=yes servers=,

Assign an IP Address to ether3 for the internal network: /ip address add address= interface=ether3 comment="internal network" disabled=no

Configure a DHCP Server for your network:
/ip dhcp-server setup 
Select interface to run DHCP server on 

dhcp server interface:

Select network for DHCP addresses 

dhcp address space:

Select gateway for given network 

gateway for dhcp network:

Select pool of ip addresses given out by DHCP server 

addresses to give out:

Select DNS servers 

dns servers:

Select lease time 

lease time: 3d

Configuring NAT for Internet Access:

/ip firewall nat add chain=srcnat action=masquerade comment="nat internet access" disabled=no

Setup the default routes and have the router check the main WAN port. If the router does not receive a response then route traffic out the failover WAN port:
/ip route add dst-address= gateway= check-gateway=ping distance=1 disabled=no
/ip route add dst-address= gateway= distance=2 disabled=no

No comments:

Post a Comment