BGP Best Path - Something strange.

Hello,

I just finish my first configuration with my second peer and monitoring the best path algorithm in CCR 6.3 I cant understand this:

 @MikroTik] > ip route print detail where dst-address in 173.252.96.0/19
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 
41 ADb  dst-address=173.252.96.0/19 gateway=201.163.MM.YY
        gateway-status=201.163.xx.xx recursive via 201.163.yy.xx ether3 distance=20 scope=40 
        target-scope=30 bgp-as-path="YYZZ,3491,3549,32934,32934" bgp-weight=0 bgp-origin=igp 
        received-from=ISP2 

14  Db  dst-address=173.252.96.0/19 gateway=201.174.MM.MM
        gateway-status=201.174.xx.yy recursive via 201.158.xx.yy ether2 distance=20 scope=40 
        target-scope=30 bgp-as-path="NNYY,32934" bgp-weight=5 bgp-origin=igp received-from=ISP1

You can see the bgp-as-path is smaller, also de bgp-weight its higher on the #14.

 /routing bgp peer> print detail 
Flags: X - disabled, E - established 
 0 E name="ISP1" instance=ISP1 remote-address=201.174.YY.XX remote-as=320YY
     tcp-md5-key="" nexthop-choice=default multihop=yes route-reflect=no hold-time=3m ttl=255 
     in-filter=in-isp1 out-filter=out-isp1 address-families=ip default-originate=never 
     remove-private-as=no as-override=no passive=no use-bfd=no 

 1 E name="ISP2" instance=ISP2 remote-address=201.163.YY.XX remote-as=111XX tcp-md5-key="" 
     nexthop-choice=default multihop=yes route-reflect=no hold-time=3m ttl=225 in-filter=in-isp2 
     out-filter=out-isp2 address-families=ip default-originate=never remove-private-as=no 
     as-override=no passive=no use-bfd=no

Please, someone knows whats its happening? Why the best path algorithm its taking the route with more jumps on the AS_PATH?.

Thanks!!!.

This is because both routes are received from different BGP instances. Best path algorithm is used only when routes are received from the same instance.

:open_mouth:

Thanks MRZ.

Cheers from MUM Mexico!.

hello, I have 2 suppliers and would like to configure the bgp so work with fail over, I have my ASN and my IP blocks. Where I can find documentation or some guidance to help me implement it.

Regards

http://wiki.mikrotik.com/wiki/Manual:Simple_BGP_Multihoming

Hello, thank you very much for your reply.

I implemented that way, but only upload traffic goes through one of the ISPs.

Input filters should always discard all?

/routing filter
add chain=isp1-in action=discard
add chain=isp2-in action=discard

Regards

for upload you use regular load balancing methods like PCC

Thank you very much!

It can make a more advanced implementation of BGP? is there any documentation on how to use the filters for routes?