Thank you for your quick response but let me explain my question with more detail.
Imagine this scenario with 2 routers (R1 & R2) in AS65001 and another 2 (R3 & R4) in AS65002:
R1[AS65001] ------- R3[AS65002]------R4[AS65002]---------R2[AS65001]
R1 announces a route to 10.10.12.0/24 to R3 with MED=101
R2 announces same route to R4 with MED=102
1) If R4 is a Mikrotik router it receives the route correctly form R2 with MED=102
but when propagating it to it's IBGP peer R3 it sends it with MED=0
[admin@R4] > /routing bgp advertisements print R3 detail
peer="R3" prefix=10.10.12.0/24 nexthop=10.10.34.4 as-path="65001"
origin=incomplete local-pref=100
2) And if R3 is a router that propagates MED to IBGP peers (as Cisco or Juniper do) at R4 we have 2 routes to 10.10.12.0/24
both with the same:
- Weight
- Local Pref
- AS Path
- Origin
[admin@R4] > /ip route print detail
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=10.10.12.0/24 gateway=10.10.24.2
gateway-status=10.10.24.2 reachable via ether2 distance=20 scope=40
target-scope=10 bgp-as-path="65001" bgp-med=102 bgp-origin=incomplete
received-from=R2
1 Db dst-address=10.10.12.0/24 gateway=10.10.34.3
gateway-status=10.10.34.3 reachable via ether3 distance=200 scope=40
target-scope=30 bgp-as-path="65001" bgp-local-pref=100 bgp-med=101
bgp-origin=incomplete received-from=R3
Then, according to
http://wiki.mikrotik.com/wiki/Manual:BG ... _Algorithm, MED should be compared and route 1 with MED=101 selected as best. But our LAB shows thar route 0 with MED=102 is the active route.
From 1) and 2) it looks like MED in Mikrotik is used only in EBGP: It is not propagated to IBGP peers and it's value is ignored when a route from an IBGP peer is one of the candidates.
I'd like to know if this is a design decision in RouterOS or a bug.