Start connecting MPLS.
I have branch which has 3 links, two of those are in stub area connected to 2 routers (ABR1 &ABR2).
When the third BGP link is added (connected new ABR3 router) and redistributes the branch network learned from BGP
to other ABRs, the ospf don't take it unless I take off the other 2 links from ospf.
Is there a way to let them all work and keep the BGP link as the preferred one!
The routes received via OSPF are seen as intra or inter area routes, where as the routes redistributed from BGP are seen as external routes. Intra area routes are preferred over Inter area routes and Inter area routes are preferred over external routes, which probably explains what you are seeing.
I understand this very well and I knew that was the cause. However, I was looking for a way to get all z 3 works with the BGP link preferred.
So if I understand correctly, you need to use te BGP route as the primary, right?
What are the ospf route learned as on the router where you need to decide which route is the best? Intra or Inter area? If they are learned as Intra area, you could try to summarize them so that the more specific external route (redistributed from BGP) would win.
Other wise you could try to inject more specific routes from BGP.
You could have more specific static routes pointing to these interfaces that you would then inject into BGP.
These are user subnets, right? Isn't it the case with ospf connected route as well. As long as the interface is up, the update will show in ospf for these subnets.
Unfortunately, there is not many tricks you can use in your scenario as you are facing a comparison between an ospf external route vs. an intra area route. As far as I am concerned, only the prefix length can make a difference.