Here I have two routes from /ip/route/print detail
D b dst-address=0.0.0.0/0 routing-table=main gateway=22.33.44.55 immediate-gw=22.33.44.55%eth2 distance=20 scope=40 target-scope=10
suppress-hw-offload=no
DAb dst-address=0.0.0.0/0 routing-table=main gateway=33.44.55.66 immediate-gw=33.44.55.66%eth3 distance=200 scope=40 target-scope=30
suppress-hw-offload=no
The distance is lower for the first one (advertised via eBGP), but it’s not the best candidate.
The second route (Advertised by an iBGP router from an upstream ISP) is being preferred.
Both routes are received by two different ISPs.
Why is the router choosing the second option when the distance is higher?
default-originate and next-hop self is enabled on each side of the iBGP peering.
“The best path algorithm also compares routes received only by a single BGP instance. Routes installed by different BGP instances are compared by the general algorithm, i.e. route distances are compared and the route with a lower distance is preferred.”
It indicates the distance is used in separate BGP instances, but didn’t specifically state what the aforementioned link says. In that case, I’ll apply a filter to one of the BGP routes to change LOCAL_PREF. Thank you!
I’ll apply a filter to one of the BGP routes to change LOCAL_PREF. Thank you!
first, yes. you need filters to adjust the med.
afaik, modifying local _pref only dictates traffic from inside your network going outside.
but, it won’t work to dictate traffic from outside going inside your network.
and, the most important part is when you deal with ebgp network, you and your network should be ready to become an internet transit area. otherwise you will still see your first problem: can get out but can’t get in.