Tuesday, August 12, 2014

Redundancy on Mikrotik Router

Unknown | 2:53 PM

How to configure Redundancy on Mikrotik router

Scenario:
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.

1. Go to New Terminal and then add IP Primary WAN to Ether1

/ip address add address=1.1.1.1/30 interface=ether1 comment="primary wan" disabled=no

2. Add IP Secondary WAN to Ether2

/ip address add address=2.2.2.2/30 interface=ether2 comment="failover wan" disabled=no

3. Add DNS

/ip dns set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

4. Add IP Internal 192.168.1.1/24 on Ether3

/ip address add address=192.168.1.1/24 interface=ether3 comment="internal network" disabled=no

5. Configure DHCP for client

/ip dhcp-server setup 
Select interface to run DHCP server on 

dhcp server interface: ether3

Select network for DHCP addresses 

dhcp address space: 192.168.1.0/24

Select gateway for given network 

gateway for dhcp network: 192.168.1.1

Select pool of ip addresses given out by DHCP server 

addresses to give out: 192.168.1.2-192.168.1.254

Select DNS servers 

dns servers: 192.168.1.1

Select lease time 

lease time: 3d


6. Configuring NAT for Internet Access

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

7. 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=0.0.0.0/0 gateway=1.1.1.1 check-gateway=ping distance=1 disabled=no
/ip route add dst-address=0.0.0.0/0 gateway=2.2.2.2 distance=2 disabled=no

Source

http://blog.gowifi.co.nz/2012/10/mikrotik-dual-gateway-failover.html
Share it →

No comments:

Post a Comment

Back to top

networkingandsystem © 2014

Published By Nget Phanny | Designed By IT4444