Community discussions

MikroTik App
 
MrRob
just joined
Topic Author
Posts: 1
Joined: Wed May 16, 2018 2:35 pm

Routing protocol prioritisation

Wed May 16, 2018 2:54 pm

I have a situation where I have a route with destination w.x.y.z/24 that is being advertised via eBGP but is also advertised via OSPF with a different next hop.

I would like eBGP routes to normally be picked in preference over OSFP (as is standard). However I would like w.x.y.z/24 to be installed from OSPF when it exists, overriding the BGP route.

The eBGP route for w.x.y.z/24 shows in the routing table with distance 20 (as is standard for eBGP routes).

The OSPF route shows in the OSPF database ready to be used but not picked.

I have tried adding a route filter entry to adjust the distance of this route as it comes in:
add action=accept chain=ospf-in prefix=w.x.y.z/24 prefix-length=24 set-distance=10
This does not change the routing table. It still picks the BGP entry.

Does anyone know what I am doing wrong here? How can I get the OSPF route picked instead of the eBGP one?

Further to this, during testing I blocked the eBGP route further back in my network so that the Mikrotik did not receive it. At this point the OSPF route was picked and showed with admin distance=10 proving that the route was available and the the filter was modifying admin distance.

The strange thing is that when I then re-instated the eBGP route, the Mikrotik stayed latched on to the OSPF route rather than taking the eBGP route. It remained on the eBGP route even after I removed the OSPF-IN filter rule to put its distance back at 110. Does anyone know why the routing table is latching in this way?

System used is: Router OS 6.41.4 on CCR1036-12G-4S

Thanks.

Who is online

Users browsing this forum: No registered users and 50 guests