Community discussions

MikroTik App
 
xabban
just joined
Topic Author
Posts: 6
Joined: Mon Oct 22, 2012 2:03 pm

VRRP + OSPF for router and wan redundancy Question

Mon Oct 22, 2012 2:19 pm

Hi all! I am newbie with Mikrotik but i think that´s going to change soon :)

I am trying to give a solution to the problem in title. I have two routers with a WAN connection each (principal and backup) in the same network segment. I used to configure HSRP and interface tracking to decrease priority in case of WAN interface goes down with Cisco Equipment. I don´t find similar configuration for VRRP in Mikrotik, but I've read some interesting ideas that seems to be accepted as solution: VRRP (for router redundancy) and OSPF (for WAN redundancy) but I have problems with it. I will try to explain.

In normal operation, if VRRP master router becomes unreachable, the other one become master and backup WAN will be used. Perfect.
Now imagine main WAN connection goes down (PPPoE in my case), as we have configured OSPF interface with lower priority on the other router, backup connection will be used and the problem is solved. Here is my problem: clients will still working against Master VRRP router and this one will redirect traffic to se secondary one thanks to OSPF routes, so we can think it´s Ok, but traffic from WAN is not going to follow the same path because it will go trough backup ruter to client causing assymetric routing and this could be a problem, don´t you think???

Any idea?

Thank you in advnace.
 
User avatar
wulfgard
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Wed Oct 17, 2012 1:06 pm
Location: France
Contact:

Re: VRRP + OSPF for router and wan redundancy Question

Mon Oct 22, 2012 10:50 pm

Hello

if i understand correctly

2 internet routers with 1 x WAN + 1 x LAN ( master + backup )
1 Mikrotik router connected to each internet router through dedicated cable
local network connected to Mikrotik

if you are using OSPF just advertise default route from internet router in OSPF
and avertise local network through mikrotik with connected
you can use different metrics to select active passive

a+
Thierry
 
xabban
just joined
Topic Author
Posts: 6
Joined: Mon Oct 22, 2012 2:03 pm

Re: VRRP + OSPF for router and wan redundancy Question

Tue Oct 23, 2012 9:58 am

Hi, thanks for your reply.

You understand well my topology. Both WAN routers are configured with pppoe, so i don´t know how to redistribute default route (pppoe gw) into OSPF (wich is runnning only in the LAN). I can´t run OSPF on WAN side.
 
xabban
just joined
Topic Author
Posts: 6
Joined: Mon Oct 22, 2012 2:03 pm

Re: VRRP + OSPF for router and wan redundancy Question

Tue Oct 23, 2012 5:02 pm

Ok, I will post the result of test.

Thnx
 
xabban
just joined
Topic Author
Posts: 6
Joined: Mon Oct 22, 2012 2:03 pm

Re: VRRP + OSPF for router and wan redundancy Question

Wed Oct 24, 2012 10:40 am

Well, I think i have the same problem as i described in ther first post.

I have:

----Router A -----PPPoE-------WAN (principal)
|
|
VRRP & OSPF (and public network routed to this LAN)
|
|
----Router B------PPPoE------WAN (backup)

My goal is to haver Router redundancy (VRRP) and WAN redundancy (OSPF?)
With Cisco i used HSRP, wich can tracks the state of one interface and decrement his priority if neccessary. In this example, if router A is master, and i track pppoe interface, if it goes down, HSRP decremets its priority giving master role to router B and using router's B WAN connection.

Well,
ROuter A and B have:
default route pointing to PPPoE tunnel extreme
VRRP in the LAN
OSPF running (propagating default route if installed and with PPPoE interfece as passive)

1.- In normal operation all works fine
2.- If I shut down master Router, VRRP rises up and all works fine.
3.- If disconnect LAN on ROUTER A, VRRP gives master role to ROUTER B, so LAN clients can work, but my public network is still routed through ROUTER a WAN connection, so this case is unresolved.
4.- If I disconnect WAN on Router A, VRRP still gives master role to ROUTER A, but OSPF put a new default route pointing to backup ROUTER B. As WAN connection is down, my public network is router through WAN connection on router B, so:
Clients go to internet through ROUTER A (vrrp master) --> Router B (default route in ROUTER A, thanks to OSPF) --> WAN
My public network is accesed through WAN --->Router B -->LAN
This is the assymetric routing i mentioned before.

Point 3 will also occur with HSRP, but not 4.

any idea?

thanks in advance for your time.
 
User avatar
wulfgard
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Wed Oct 17, 2012 1:06 pm
Location: France
Contact:

Re: VRRP + OSPF for router and wan redundancy Question

Thu Oct 25, 2012 11:13 pm

Please do not use VRRP

on cisco router 1 and 2 just configure ospf with ciso command

"default-information originate always"

this will inject a default route in ospf usable by all routers especially in the mikrotik one
( of course in each cisco router you have a default route to internet )
in mikrotik router just add "redistribute connected" to instance and it will make the job

if you want to give first choice to router cisco 1 just use "ip ospf cost 10" on interface to mkt
and "ip ospf cost 20é on interface to mkt

reliability ill reside on ospf so you must ensure that in any case you will disrupt ospf with internet traffic
on last resort you can use static routing with metric above ospf metrics but take of distance (administrative metric in cisco world)

regards
Thierry
 
xabban
just joined
Topic Author
Posts: 6
Joined: Mon Oct 22, 2012 2:03 pm

Re: VRRP + OSPF for router and wan redundancy Question

Fri Oct 26, 2012 10:01 am

Hi Therry.

I don´t have any Cisco router in this deployment. I just say that with Cisco i could make this solution in an easy way, tracking wan with HSRP. But mikrotik and VRRP does not have a similra solution.

I have 2 mikrotik as pppoe servers, which provides service to another two mikrotiks.

The pppoe servers are in the ISP side, and they don´t run OSPF through ppp connections.

I need to give router redundancy and automatic WAN redundancy from the other two mikrotik on the client side. These ones are runnning VRRP and OSPF in the LAN.

Hope this helps
 
User avatar
wulfgard
Frequent Visitor
Frequent Visitor
Posts: 86
Joined: Wed Oct 17, 2012 1:06 pm
Location: France
Contact:

Re: VRRP + OSPF for router and wan redundancy Question

Fri Oct 26, 2012 10:34 am

Hello

exactlty the same on MKT with your PPPOE

acdtive default OSPF instance and use "redistribute default route"

so for example

PPPOE1 MKT : OSPF REDISTRIBUTE DEFAULT - MKT1 REDISTRIBUTE CONNECTED

PPPOE2 MKT : OSPF REDISTRIBUTE DEFAULT - MKT2 REDISTRIBITE CONNECTED

a+
Thierry
 
xabban
just joined
Topic Author
Posts: 6
Joined: Mon Oct 22, 2012 2:03 pm

Re: VRRP + OSPF for router and wan redundancy Question

Thu Nov 15, 2012 4:44 pm

Hi all,

no option mentioned here solves the problem of assymetric routing, at least I could not be able to see how.

So, for other people who wants to configure something like Cisco's HSRP + interface tracking for HSRP priority decrement in case of interface fail, I've done the following:

On Mikrotik with principal line (VRRP master if all goes OK), use netwach to ping its default gateway (only reachable if line is OK, because of PPP use in pppoe)

Make this 2 simple scripts on the ppal router, in a console:

system script add name=vrrp_up source {/interface vrrp set vrrp1 priority=100}

system script add name=vrrp_down source {/interface vrrp set vrrp1 priority=80}

Just put in netwatch "on up" tab : vrrp_up and in "on down" tab: vrrp_down.

First script will configure a priority of 100 if pppoe's default gateway is reachable (wich is higher than backup´s router priority), so ppal router will be master.
Second script will configure a priority of 80 if pppoe´s default gateway in not reachable (which is lower than backup´s router priority), so backup router will be vrrp master in case of ppal line goes down.

It was very simple, but I have noticed that it does not run always OK, sometimes priority change does not occur, but is better than nothing. I think this is the good configuration, theorically.

Thanks.

Who is online

Users browsing this forum: Bing [Bot], maldridge and 59 guests