The bestroute med-confederation command configures MBGP to compare the Multi Exit Discriminator (MED) values of routes in a confederation when MBGP selects the optimal route.
The undo bestroute med-confederation command restores the default settings.
By default, MBGP compares the MED values of the routes that are from the same AS.
Usage Scenario
MBGP AS_Path records the number of each AS from the local Router to the destination according to a certain order. After the bestroute med-confederation command is configured, MBGP compares MED values only when AS_Path does not contain the external AS (AS that is not in the confederation) number. Otherwise, MBGP does not compare MED values.
For example, ASs 65000, 65001, 65002, and 65004 belong to the same confederation. The rules for selecting the optimal route from the four routes are as follows: