3Com Router 3000 Ethernet FamilyConfiguration Guide Chapter 6 BGP Configuration3Com Corporation6-14Local preference is used to select the route for going out of an AS; while the MEDattribute is used to judge the optimal route for entering an AS. When a BGP routerreceives multiple routes with the same destination address but different next-hops fromdifferent external peers, it will opt for the one with the smallest MED value as its optimalroute under the premise that the other conditions are the same.Perform the following configuration in BGP view.Table 6-26 Configure an MED for the systemOperation CommandConfigure a MED for the system default med med-valueRestore the default MED of the system undo default medA router configured with the default med command compares only the MED values ofroutes from different EBGP peers in the same AS. If you hope to compare the MEDvalues of routes from different EBGP peers in different ASs, use thecompare-different-as-med command.By default, the value of the MED attribute is 0.6.2.9 Comparing the MED Values of Routes from Peers in Different ASsIt is used to select the optimal route. When the other conditions are the same, the routewith the smallest MED value will be selected as the outgoing route of the AS.Perform the following configuration in BGP view.Table 6-27 Compare the MED values of routes from peers in different ASsOperation CommandCompare the MED values of routes frompeers in different ASs compare-different-as-medDisable the comparison of the MEDvalues of routes from peers in differentASsUndo compare-different-as-medBy default, it is not allowed to compare the MED values of routes from peers in differentASs.You are not recommended to use this configuration unless you are sure that the ASsare using the same IGP protocol and the same routing method.