Community discussions

MikroTik App
 
Farenheit
just joined
Topic Author
Posts: 1
Joined: Mon Apr 29, 2024 9:19 am

OSPF Default Route ECMP Problem

Mon Apr 29, 2024 10:41 am

I have a problem with OSPF on a part of my network.

The simplified design is as per the diagram attached. OSPF configuration is listed below. RouterOS is on the latest version.

R1 is connected to R2, R3 and R4 via VLANs over different physical fibre links.
R2, R3 and R4 are connected to each other via a common VLAN to a switch.

R1 distributes the default route to R2, R3 and R4.
R2 distributes connected and static routes to R1.
R3 distributes connected and static routes to R1.
R4 distributes connected and static routes to R1.
R2, R3 and R4 distributes connected and static routes between each other.

I want to use the "switched" connection as backup default route (via R2, R3 or R4) for R2, R3 or R4 only if their main fibre link goes down.

If I enable "redistribute-default" on the R2 router, the R3 and R4 routers get a ECMP default route via the main fibre as well as via the switched connection, this then load balances the default route traffic, which is not what I am looking for. When checking the OSPF metric in columns, the metrics are different, but the default route is still in ECMP. I have tried changing link costs and priority and the problem persists.
Capture.PNG
R1
/routing ospf instance
add disabled=no name=ospf-instance-backbone originate-default=always router-id=10.254.0.1 routing-table=main
/routing ospf area
add disabled=no instance=ospf-instance-backbone name=ospf-backbone
/routing ospf interface-template
add area=ospf-backbone auth=sha512 auth-key=************** cost=110 disabled=no interfaces=vlan4054 networks=10.33.0.76/30 type=ptp
add area=ospf-backbone auth=sha512 auth-key=************** cost=110 disabled=no interfaces=vlan3339 networks=10.33.0.24/30 type=ptp
add area=ospf-backbone auth=sha512 auth-key=************** cost=110 disabled=no interfaces=vlan2666 networks=10.33.0.92/30 type=ptp


R2
/routing ospf instance
add disabled=no name=ospf-instance-backbone originate-default=never redistribute=connected,static router-id=10.254.0.6 routing-table=main
add disabled=no name=ospf-instance-junction originate-default=never redistribute=connected,static router-id=10.254.0.6 routing-table=main
/routing ospf area
add disabled=no instance=ospf-instance-teraco name=ospf-area-backbone
add area-id=9.0.0.1 disabled=no instance=ospf-instance-junction name=ospf-area-junction
/routing ospf interface-template
add area=ospf-area-backbone auth=sha512 auth-key=************** cost=110 disabled=no interfaces=vlan3339 networks=10.33.0.24/30 type=ptp
add area=ospf-area-junction auth=sha512 auth-key=************** cost=200 disabled=no interfaces=vlan1138 networks=10.33.0.48/29 priority=64


R3
/routing ospf instance
add disabled=no name=ospf-instance-backbone originate-default=never redistribute=connected,static router-id=10.254.0.9 routing-table=main
add disabled=no name=ospf-instance-junction originate-default=never redistribute=connected,static router-id=10.254.0.9 routing-table=main
/routing ospf area
add disabled=no instance=ospf-instance-teraco name=ospf-area-backbone
add area-id=9.0.0.1 disabled=no instance=ospf-instance-junction name=ospf-area-junction
/routing ospf interface-template
add area=ospf-area-backbone auth=sha512 auth-key=************** cost=110 disabled=no interfaces=vlan4054 networks=10.33.0.76/30 type=ptp
add area=ospf-area-junction auth=sha512 auth-key=************** cost=200 disabled=no interfaces=vlan1138 networks=10.33.0.48/29 priority=64


R4
/routing ospf instance
add disabled=no name=ospf-instance-backbone originate-default=never redistribute=connected,static router-id=10.254.0.29 routing-table=main
add disabled=no name=ospf-instance-junction originate-default=never redistribute=connected,static router-id=10.254.0.29 routing-table=main
/routing ospf area
add disabled=no instance=ospf-instance-backbone name=ospf-area-backbone
add area-id=9.0.0.1 disabled=no instance=ospf-instance-junction name=ospf-area-junction
/routing ospf interface-template
add area=ospf-area-backbone auth=sha512 auth-key=************** cost=110 disabled=no interfaces=vlan2666 networks=10.33.0.92/30 type=ptp
add area=ospf-area-junction auth=sha512 auth-key=************** cost=200 disabled=no interfaces=vlan1138 networks=10.33.0.48/29 priority=64
You do not have the required permissions to view the files attached to this post.
 
petrbacina
just joined
Posts: 3
Joined: Thu May 02, 2024 8:57 pm

Re: OSPF Default Route ECMP Problem

Fri May 03, 2024 10:15 am

Same problem. We have Failover set up over two links, but thanks to ECMP the COST set on the interface is ignored and data flows randomly between the two routers, where both default-routes have a distance of 110, but the OSPF metric is 10 vs 20000. So instead of "failover" we have "load balancing". A broken ECMP is to blame, which cannot be turned off.

Who is online

Users browsing this forum: No registered users and 4 guests