Community discussions

MikroTik App
 
amix
just joined
Topic Author
Posts: 8
Joined: Wed May 19, 2021 11:16 pm

BGP problem with best route

Sat May 29, 2021 12:48 pm

i have set bgp local pref in one prefix , but mikrotik still use other route as best:
[amix@router001] > /ip route print detail where dst-address=185.121.84.0/24
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit 
 0 ADb  dst-address=185.121.84.0/24 gateway=XXX gateway-status=XXX reachable via  retn-m9 distance=20 scope=40 target-scope=10 bgp-as-path="9002,31261,199975" bgp-weight=110 bgp-local-pref=110 bgp-origin=igp 
        bgp-communities=9002:0,9002:64667 received-from=retn-m9 

 1  Db  dst-address=185.121.84.0/24 gateway=YYY gateway-status=YYY reachable via  juniper distance=20 scope=40 target-scope=10 bgp-as-path="65001,48467,31261,199975" bgp-weight=120 bgp-local-pref=120 bgp-origin=igp 
        bgp-communities=48467:20000 received-from=juniper
        
[amix@router001] > /system routerboard print 
       routerboard: yes
             model: CCR1036-8G-2S+
          revision: r3
     serial-number: D83A0D0C3C9D
     firmware-type: tilegx
  factory-firmware: 6.45.9
  current-firmware: 6.48.2
  upgrade-firmware: 6.48.2

why its chosing active route such way?
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1275
Joined: Tue Jun 23, 2015 2:35 pm

Re: BGP problem with best route

Sat May 29, 2021 2:23 pm

with eBGP you want to use local pref ?

follow this:

○ Local-Pref
• Mostly used in iBGP networks, higher Local-Pref is better
○ AS-Path
• Mostly used in eBGP networks, shorter as-path is better
 
amix
just joined
Topic Author
Posts: 8
Joined: Wed May 19, 2021 11:16 pm

Re: BGP problem with best route

Sat May 29, 2021 2:32 pm

I want to set up best path for route manualy, how can i do this? i cannot modify as-path with route filters
 
User avatar
nichky
Forum Guru
Forum Guru
Posts: 1275
Joined: Tue Jun 23, 2015 2:35 pm

Re: BGP problem with best route

Sat May 29, 2021 2:34 pm

that is for eBGP, or other option would be prepend
 
amix
just joined
Topic Author
Posts: 8
Joined: Wed May 19, 2021 11:16 pm

Re: BGP problem with best route

Sat May 29, 2021 2:36 pm

this is incoming route, i cannot add prepend to incoming routes
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: BGP problem with best route

Mon May 31, 2021 4:46 pm

The very first step in the BGP best path algorithm before getting into attributes is checking next hop reachability....typically when weight and local pref are higher than another route but that route isn't selected, there is a problem with reachability of the next hop for that route.
 
amix
just joined
Topic Author
Posts: 8
Joined: Wed May 19, 2021 11:16 pm

Re: BGP problem with best route

Tue Jun 01, 2021 4:18 pm

But both gateways are reacheble and all distances are the same
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7038
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP problem with best route

Tue Jun 01, 2021 4:24 pm

Both peers run on the same instance?

Who is online

Users browsing this forum: saktie, wirelesslywired and 12 guests