BGP how MED attribute is compared
bgp deterministic-med command ensures the comparison of the MED variable when choosing routes advertised by different peers in the same autonomous system.
bgp always-compare-med command ensures the comparison of the MED for paths from neighbors in different autonomous systems. This is useful when multiple service providers or enterprises agree on a uniform policy for setting MED. Thus, for network X, if Internet Service Provider (ISP) A sets the MED to 10, and ISP B sets the MED to 20, both ISPs agree that ISP A has the better performing path to X.
Note: The two commands are separate and independent. Enabling one does not affect the other. Both can be enabled at the same time.