MED When same AS_PATH

Hello!

for the same route destination we have the same AS_PATH (2 hops).
So, we’re setting a lower MED value to prefer the left transit instead the right one.
But, seems is not taking affect as the router is prefering the right route that we set with higher MED.
There is not any differente setting a lower o highest MED value. Nothing change.

Any idea how we can prefer the left route?

Thanks!

Ok, I think the correct way is using the WEIGHT instead MED.

High weight to prefer a route.

mmm, the problem now is that setting a WEIGHT value, the AS_PATH has not priority.

There is possible to give the lower AS_PATH most priority that the WEIGHT value?

What I want is to use one transit only in case of the same AS_PATH (hops). but if one route as lower AS_PATH hops, then use it.

Any idea?

Thanks!!

Reeeeeally stupid question, but worth asking: is the nexthop reachable on both routes? (target scope within scope?)

Yes, note that the route destination of the image of the firt post in not the same as the second. Are different prefixes :wink:

Yes, I noticed that, but both prefixes don’t answer my question. Can I see the General tab of these?

If you’re trying to influence traffic out of an AS (which is what you appear to be doing) then I would start with marking localpref higher on the route you want to be preferred. localpref, unlike weight will be learned by every router in the AS (unlike weight)

MED only applies when left most AS is common. It’s primarily used to influence which link a neighbor uses when there are redundantly uplinks.

To influence a remote network you would need to agree on them building filters that change local preference using something that you can attach to a route which is inert everywhere else, precisely what BGP communities were designed for…