Community discussions

 
DotTest37
newbie
Topic Author
Posts: 49
Joined: Sun Oct 06, 2013 10:01 pm

OSPF Force path for specific subnet

Wed Jul 03, 2019 10:30 pm

I have OSPF running between two Mikrotik Routers, each of them with 2 WANs configured on failover.
I have few private subnets behind each router.

Right now my OSPF Interfaces are configured like this:
ISP-A Cost : 10
ISP-B Cost: 30
Thats how I got OSPF to use ISP-A by default for all the intra-office traffic using the private subnets, and is working great.
If any of the two routers loose the ISP-A , then OSPF converge to ISP-B, and back when is again available.

Now, I just added two new private subnets on each side, for VoIP, but Id like to use by default ISP-B only for those subnets, since is the stand-by and not in use.
(I would add QoS later, etc, but I still want to use the unused link)

How can I force OSPF to add routes for the new subnets that use ISP-B without affecting all other routes that are going over ISP-A ?
 
savage
Forum Guru
Forum Guru
Posts: 1191
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Re: OSPF Force path for specific subnet

Thu Jul 04, 2019 9:02 am

Static routes. Pretty much all that comes to mind.

OSPF can't manipulate cost per route, only per interface.
Regards,
Chris
 
DotTest37
newbie
Topic Author
Posts: 49
Joined: Sun Oct 06, 2013 10:01 pm

Re: OSPF Force path for specific subnet

Sat Jul 06, 2019 4:51 pm

Static routes. Pretty much all that comes to mind.

OSPF can't manipulate cost per route, only per interface.
Static Routes wont failover when the main ISP goes down.
I would have to create a script for that.
That would defeat the purpose of the OSPF.
Any other option? Another routing protocol? multiple OSPF instances perhaps?
 
mducharme
Trainer
Trainer
Posts: 788
Joined: Tue Jul 19, 2016 6:45 pm

Re: OSPF Force path for specific subnet

Sun Jul 07, 2019 3:27 am

Any other option? Another routing protocol? multiple OSPF instances perhaps?
You might be able to do this with BGP, depending on your topology.
 
DotTest37
newbie
Topic Author
Posts: 49
Joined: Sun Oct 06, 2013 10:01 pm

Re: OSPF Force path for specific subnet

Sun Jul 07, 2019 6:26 pm

Any other option? Another routing protocol? multiple OSPF instances perhaps?
You might be able to do this with BGP, depending on your topology.
:-) I wouldn't even know how to start with that.

Can you run two instances of OSPF between the same two routers (with multiple loopback addresses, etc) and make this work?
 
mducharme
Trainer
Trainer
Posts: 788
Joined: Tue Jul 19, 2016 6:45 pm

Re: OSPF Force path for specific subnet

Mon Jul 08, 2019 12:41 am

Can you run two instances of OSPF between the same two routers (with multiple loopback addresses, etc) and make this work?
Possibly, but that would be a really strange setup. It is very unusual to establish OSPF neighbor with another ISP. You would typically use BGP in this role.
 
joegoldman
Member
Member
Posts: 478
Joined: Mon May 27, 2013 2:05 am

Re: OSPF Force path for specific subnet

Mon Jul 08, 2019 12:53 am

Static routes, with check-gateway = ping.

So if Link A is your defailt and you want a specific subnet to go via Link B, then static route with check gateway on Link B (or a netwatch script, which is just as simple), so if Link B dies that traffic goes back via Link A

Who is online

Users browsing this forum: No registered users and 5 guests