Community discussions

MikroTik App
 
aboshhab
just joined
Topic Author
Posts: 17
Joined: Tue Nov 20, 2018 9:00 am

How to make local IPs prefered over BGP routes

Tue Jul 18, 2023 9:50 am

Hello everyone,

I am using BGP internally to distribute routes.

when i have my local ip
dst-address 10.0.0.0/16 reachable on ether1

and i got bgp route
dst-address 10.0.0.0/24

why mikrotik prefere bgp route with 10.0.0.0/24 over my local address ?
how can i resolve it, and make mikrotik always prefere local address even with small bgp subnet mask

THANKS
 
wiseroute
Member
Member
Posts: 352
Joined: Sun Feb 05, 2023 11:06 am

Re: How to make local IPs prefered over BGP routes

Tue Jul 18, 2023 12:19 pm

hello,

so, your local lan routes goes out of local router - before reaching its local destination?

you might want to read this guide :

https://wiki.mikrotik.com/wiki/Manual:B ... _Algorithm
 
MaxwellSilver
just joined
Posts: 15
Joined: Thu Oct 07, 2021 10:11 pm

Re: How to make local IPs prefered over BGP routes

Thu Jul 20, 2023 8:47 pm

The guide linked in the previous post is very useful and I recommend reading it.

In a nutshell this seems to be the issue:

10.0.0.0/24 is more specific than 10.0.0.0/16 so traffic needing to to go to 10.0.0.0/24 will take the route advertised via BGP rather than the connected route.

To resolve the issue, you might want to take a look at your address scheme.

Who is online

Users browsing this forum: Amazon [Bot] and 7 guests