Enabling comparison of MED for paths from neighbors in different autonomous systems

Syntax:


[no] bgp always-compare-med

Enables the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems. To disallow the comparison, use the no form of this command.

The MED is one of the parameters that is considered when selecting the best path among many alternative paths. The path with a lower MED is preferred over a path with a higher MED. During the best-path selection process, MED comparison is done only among paths from the same autonomous system. The bgp always-compare-med command is used to change this behavior by enforcing MED comparison between all paths, regardless of the autonomous system from which the paths are received.