The compare-different-as-med command enables BGP to compare the MEDs in the routes of peers in different ASs.
The undo compare-different-as-med command restores the default configuration.
By default, BGP does not compare the MEDs in the routes of peers in different ASs.
BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view
Usage Scenario
The command is used to control the MEDs to change the policy of BGP route selection. If the compare-different-as-med command is run, BGP will compare the MEDs of the routes from different ASs. If there are multiple reachable paths to the same destination, BGP prefers the route with the smallest MED.
Precautions
Do not use this command unless different ASs use the same IGP and route selection mode.