Community discussions

MikroTik App
 
wwj
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Mon May 05, 2014 6:37 am

How to change the cost when redistribute-static to ospf

Tue Apr 25, 2023 12:14 pm

in ospf network , Two ASBRs (ROS1 ROS2) each add the same static route (6.6.6.6/32) to their own internet outlet;
I want ros1 to be the master and ros2 to be the slave;
I don't know how to do it, so I guess and try:
all the test , i set the ospf redistribute-static to astype1 and astype2 respectively
------Experiment 1 failed---------
ros1:
/ip rou add dst-address=6.6.6.6 gateway=pppoe1 distance=100 
ros2:
/ip rou add dst-address=6.6.6.6 gateway=pppoe1 distance=200 
------Experiment 2 failed---------
ros1:
/routing filter add chain=ospf-out action=accept prefix=6.6.6.6/32 set-distance=100 
ros2:
/routing filter add chain=ospf-out action=accept prefix=6.6.6.6/32 set-distance=200 
------Experiment 3 success half -_-!!!---------
ros2:
/routing ospf instance  set 0 metric-static=50
-------------------------------
i found ospf redistribute-static just reference the parameter "metric-static=20" of its instance;
so i set ros2 ospf-instance-metric-static=50 , then I achieved the desired effect;
but!!
if i have another route 7.7.7.7/32 ,and ros2 is the master and ros1 is the slave , I won't be able to achieve it anymore
Other brands of routers that I have used can set cost separately when importing a static route, so I would like to ask for help on how to implement it in ROS

Thanks
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: How to change the cost when redistribute-static to ospf

Tue Apr 25, 2023 12:31 pm

in v6 you can't. ROSv7 allows to set ext metric in routing filters.
 
wwj
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Mon May 05, 2014 6:37 am

Re: How to change the cost when redistribute-static to ospf

Tue Apr 25, 2023 1:00 pm

in v6 you can't. ROSv7 allows to set ext metric in routing filters.
I'll try ROSV7 , Thank you very much.

Who is online

Users browsing this forum: No registered users and 17 guests