Community discussions

MikroTik App
 
alamshafiqual
just joined
Topic Author
Posts: 3
Joined: Fri Jan 28, 2011 3:09 pm

Advance OSPF route redistribution

Fri Jan 28, 2011 3:28 pm

Hi all,
I'm a moderate user of Mikrotik. Recently, I am facing a difficulty during redistribute some static route into OSPF. At this moment, I am redistributing my entire static routes into OSPF with Metric of 20. But my plan is to redistribute some certain static route into OSPF with a different predefined metric (like, 30) while default metric is 20 for default static route redistribution

I have tried in many ways but no success yet.. :(

Can anyone help me out regarding this....

Thanks,
Shafiqual
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Advance OSPF route redistribution

Mon Jan 31, 2011 2:32 pm

on router that has the static route, set up static route distribution and set up wight as required, and redistribute it as-type-2, so you can have what cost you had. other OSFP will redistribute OSPF route with correct weight.
 
alamshafiqual
just joined
Topic Author
Posts: 3
Joined: Fri Jan 28, 2011 3:09 pm

Re: Advance OSPF route redistribution

Tue Feb 01, 2011 9:15 pm

Thanks Janisk,
-------------- As u say..
"on router that has the static route, set up static route distribution and [flash=]set up wight as required, [/flash]and redistribute it as-type-2, so you can have what cost you had. other OSFP will redistribute OSPF route with correct weight.
on router that has the static route, set up static route distribution and set up wight as required, and redistribute it as-type-2, so you can have what cost you had. other OSFP will redistribute OSPF route with correct weight. "
----------------------------------------------------------------------
Thanks for the guideline. I have been trying to sort out the issue similar way as u suggest from the begining. But I'm still stucked to set weight for static route. Is it the distance value? An example can save ur time as well as be easier for me.

Waiting for your input...
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Advance OSPF route redistribution

Thu Feb 03, 2011 3:57 pm

when ospf is ordered to distribute some routes it is set in OSPF instance:
/routing ospf instance set 0 redistribute-static=as-type-2 metric-static=44
this will distribute static routes of the router to other OSPF neighbors using wight of 44
 
alamshafiqual
just joined
Topic Author
Posts: 3
Joined: Fri Jan 28, 2011 3:09 pm

Re: Advance OSPF route redistribution

Sun Feb 06, 2011 7:04 pm

thanks a lot. But this will cause another difficulty for me.

Now I am going to bring u little inside into my scenario. I have 3 core router at three separate location form backbone cloud and running OSPF. Say for example the routers are named as Core-rtr-A, Core-rtr-B & Core-rtr-c.

A client, Client-A, is connected from both Core-rtr-A & Core-rtr-B with different peer ip (10.10.10.0/30 & 20.20.20.0/30) to ensure 99.999% availability. A different LAN block, 192.168.0.0/28, is routed over both this link. So, i do static route to forward the LAN block at both location and change metric as u said at Core-rtr-A. Consider Core-rtr-A is primary and thus less metric is there. All is fine. But FOLLOWING PROBLEM for my scenario...

Another client, Client-B, is connected similar pattern. But I want to make Core-rtr-B as primary for Client-B. As i already manipulate metric for static route redistribute globally, nothing to do here.

This need to control for "n" number clients. My plan is something to set metric according to per specific router rather than define globally.
Hopefully, u can realize my scenario and issue..

thanks in advance for your effort...
 
dsovereen
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Fri Oct 22, 2004 7:54 pm
Location: Michigan, USA
Contact:

Re: Advance OSPF route redistribution

Mon Mar 07, 2011 12:59 am

Did you ever figure out a way to do this? I have a very similar situation... dual gateway routers with failover, and need to set the metric on certain outgoing routes to be higher than usual. I'm setting this up for the first time and have been head-scratching for an hour and a half trying to figure out how to manipulate the metric on the outgoing route announcement with no success. Hope you found a solution and can share...

??

Dave
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Advance OSPF route redistribution

Tue Mar 08, 2011 1:36 pm

if you have these clients on different subnets, then it is easier - you can adjust OSPF network metrics when you add them, that way you can adjust weight of the route and OSPF, as name implies it, will open shortest path first.
 
dsovereen
Frequent Visitor
Frequent Visitor
Posts: 57
Joined: Fri Oct 22, 2004 7:54 pm
Location: Michigan, USA
Contact:

Re: Advance OSPF route redistribution

Tue Mar 08, 2011 1:57 pm

How? Can you give an example?

Every OSPF route that Mikrotik advertises is seen by every other OSPF-speaking router on my network as distance 110, metric 20. Like this:

rtr-1.mntwwi-1.mercury.net#show ip route 172.16.0.2
Routing entry for 172.16.0.0/18
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 1
Last update from 74.203.172.4 on Port-channel1.3, 00:24:28 ago
Routing Descriptor Blocks:
* 74.203.172.4, from 74.203.172.4, 00:24:28 ago, via Port-channel1.3
Route metric is 20, traffic share count is 1

rtr-1.mntwwi-1.mercury.net#show ip route 172.16.64.2
Routing entry for 172.16.64.0/18
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 1
Last update from 74.203.172.11 on Port-channel1.3, 00:24:34 ago
Routing Descriptor Blocks:
* 74.203.172.11, from 74.203.172.11, 00:24:34 ago, via Port-channel1.3
Route metric is 20, traffic share count is 1

I have used the /routing filter to try and change these values and nothing I do seems to work. I can filter the route, so I know my matching settings are working, but I cannot change the distance or metric of particular routes that get announced via OSPF. Here's my discard filter on one of the routers:

/routing filter
add action=discard chain=ospf-out disabled=no invert-match=no prefix=172.16.0.0/18 prefix-length=0-128

The two netblocks above, 172.16.0.0/18 and 172.16.64.0/18 are both available through the two Mikrotik routers above, 74.203.172.4 and 74.203.172.11. I have /routing filters configured to filter the announcement of one netblock on each router, but to fail over, I must remove that filter. What I want is for both netblocks to be announced from both routers at all times and but one from each router with a higher distance or metric.

We are running ROS 5.0rc11.

Thank you in advance for your configuration assistance.

Dave

Who is online

Users browsing this forum: No registered users and 19 guests