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:
Code: Select all
add action=accept chain=ospf-in prefix=w.x.y.z/24 prefix-length=24 set-distance=10
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.