Community discussions

MikroTik App
 
sander123
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed Oct 28, 2020 11:58 pm

BGP local pref not working?

Fri May 20, 2022 11:15 am

Hello,

Maybe i have something wrong, but why are both routes active while the first one has a local pref of 120 and the second of 100
I get more routes from other BGP peers for this subnet but they are not active as correct.

Running ROS 7.1.5

Ab + afi=ip4 contribution=active dst-address=185.xxx.xx.0/22 routing-table=main gateway=185.1.xxx.xxx
immediate-gw=185.1.xxx.xxx%Speed-IX-vlan1001 distance=20 scope=40 target-scope=10
belongs-to="BGP IP routes from 185.1.xxx.xxx"
bgp.peer-cache-id=*B00001A .as-path="420xx,573xx" .local-pref=120 .atomic-aggregate=yes .origin=igp
debug.fwp-ptr=0x202C912

Ab + afi=ip4 contribution=active dst-address=185.xxx.xx.0/22 routing-table=main gateway=178.xxx.xx.xx
immediate-gw=178.xxx.xx.xx%vlan50-Uplink distance=20 scope=40 target-scope=10
belongs-to="BGP IP routes from 178.xxx.xx.xx"
bgp.peer-cache-id=*B000002 .as-path="420xx,573xx" .local-pref=100 .atomic-aggregate=yes .origin=igp
debug.fwp-ptr=0x202C2C60
 
sander123
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed Oct 28, 2020 11:58 pm

Re: BGP local pref not working?

Fri May 20, 2022 11:56 am

I see it is using ECMP, but why dus it ignore the local-pref difference?
Is there another (better) option to prio specific paths through routing filters?


update:
Also it uses ECMP for some subnets while the AS path is longer, so way isn't it routing through the shortest path?
 
sander123
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Wed Oct 28, 2020 11:58 pm

Re: BGP local pref not working?  [SOLVED]

Mon May 23, 2022 11:57 pm

Found the problem.
I had exported/imported BGP templates from another router and forgot to change the local router-id

After changing al is working like expected.

Who is online

Users browsing this forum: No registered users and 12 guests