failver over internet, I am lost..

Hi people,

I’ve got a problem, I have done a couple of searches on this forum, but it makes me just confused..

How can I use my RB750 to do failver internet function

this is my setup right now on the thing:

Port 1 – Obtain an IP address automatically (DHCP)
WAN1

Port 4 – 192.168.1.2/24
MAN

Port 5 – 192.168.0.1/24
LAN

firewall rules:
LAN is blocked from MAN

I’m running a hotspot with 2 AP’s plugged into my RB750


So I want to add a Port2 - WAN2 for failover then my WAN1 dies, which happen every couple of hours


This is the only info I’ve got:
http://wiki.mikrotik.com/wiki/Two_gateways_failover

but it looks to easy to work…I expect more stuff to be configured

I have have two config files (normal.backup and fail.backup) loaded on my RB500. I Use Netwatch to monitor the gateway on ETH1. When it goes down, I have Netwatch run a command to load the fail.backup file, which now routes everything out ETH3. Netwatch in the fail file is programmed to load the normal.backup when the gateway returns to normal. This hasn’t been fully tested, yet.
However, the method you point to looks easier to do. I’ll give that a try. I think what they’re saying is to go ahead and connect your second WAN. Apparently the system will find that WAN when the first goes down.

Hi, Yes if WAN1 fails, it must jump over to WAN2

What this example means (and you would have to change the IP addresses to match the remote ends on your wan1/wan2 ports) is that you set up a default gateway for both possibilities.

One of the gateways has higher priority than the other one (distance defaults to 1, which will make that gateway seem “closer” than the one with distance 2).

Then, your priority gateway will check the remote end by sending pings periodically. If it stops pinging, that gateway route will be dynamically disabled, allowing the other one to take over. When it starts responding to pings again, it will be dynamically re-enabled.

This example assumes your wan1 and wan2 have a static ip configuration and are in different networks, and have already been setup and configured. If they are using pppoe or dhcp (either of which could still allow for a static ip) (or bgp or ospf or rip) then it becomes more complex.

It all depends on what you want to do. If you just want simple failover, the link you posted is enough to get it working. It is limited in how it checks for a failed link, but you can get more sophisticated with a script to adjust that. If you want to do more, like load balancing or policy based routing, it takes a few more steps, but is easy enough to configure.

You just need to answer what exactly you want and people in the forum can get you pointed in the right direction.

I just want to have a simple cleaver fail-over WAN (internet)
I don’t know to what the thing must ping to?

both WAN’s gets a IP from thier own DHCP server’s gateways, its like a client


and then thats it…

ADD: I would like to know how Load balancing works?

Since both gateways are getting their IP addresses via DHCP, there are a couple of ways you can approach this.

The easiest way for you is to edit the DHCP client on one of the two Ethernet interfaces. Set the default route weight to some number higher than 1, and then you will have your simple failover working for the most part like in the example you posted. The problem with using the built in gateway check for MikroTik is that it will only ping the default gateways IP address, this won’t tell you if there is a problem on the providers side of things where you can reach their IP addresses, but not other IP addresses on the internet.

To get a more reliable failover test, it takes several more steps. You basically need a couple of static routes and a script to ping IP addresses and take an action on a ping failure or success. You can also use the built in netwatch function for most of this, but I find it to be a little limited in the options it gives you. DHCP addresses will rarely change, and with any luck, your default gateway will be an even rarer change so it’s not difficult to copy the DHCP route given to you and make a couple of static ones to accomplish this.

Load Balancy basically will take a given clients connection and decide what ISP connection to send the traffic out of. With this method you basically increase the available pool of bandwidth that is available for the location. If nothing else is using the backup DSL line, and you are already paying for it, why not use it? If one link should fail, then with the proper setup, it will stop trying to use that connection and everything will go out of the other line until both lines come back up, and then it will continue doing what it was before.

hectic stuff man… my WAN2 will be a 3G connection.. fast expensive stuff

It’s actually fairly easy once you get your head wrapped around the concepts and how networking and MikroTik works. It is however very daunting to people just starting out since there is a lot of information and a lot of different options. You take a basic configuration that is working and build out from there for these functions.

If you haven’t, check out taking one of the basic training courses. It will give you a firm foundation to stand on with MikroTik, especially if you plan on using the hardware with any frequency.

yo I’m only using routerboards for a basic firewall to block certain network, but the load balancing / fail over gets hard, I only had to config 1 or 2 no more needed for setup, its all the same settings for all, btw… how can I export my config settings from my RB750 to a backup file so that I can load the exact same config over to another RB750?

use “export” from the top menu in the CLI. Edit out specific information, basically the MAC addresses of the interfaces.

You can even do “export file=backup” to have it save it to a file you can download and open with a word editor.