Community discussions

MikroTik App
 
DaneelOlivaw200
just joined
Topic Author
Posts: 9
Joined: Wed Sep 21, 2022 3:07 am

iBGP route being prefered over eBGP route

Wed Mar 22, 2023 5:19 am

Hi,

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.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7042
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: iBGP route being prefered over eBGP route

Wed Mar 22, 2023 10:31 am

 
DaneelOlivaw200
just joined
Topic Author
Posts: 9
Joined: Wed Sep 21, 2022 3:07 am

Re: iBGP route being prefered over eBGP route

Wed Mar 22, 2023 2:52 pm

Thank you. I read through this exact page a few times yesterday and didn't find my answer.

I then found this on the Cisco forums.

https://community.cisco.com/t5/routing/ ... d-p/497657

Then I saw this line in the link your provided:

"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!
 
wiseroute
Member
Member
Posts: 352
Joined: Sun Feb 05, 2023 11:06 am

Re: iBGP route being prefered over eBGP route

Wed Mar 22, 2023 6:25 pm

hello.
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.

good luck 👍🏻

Who is online

Users browsing this forum: No registered users and 17 guests