Configuring BGP 377The local preference is transmitted only when the IBGP peers exchange the updatepackets and it will not be transmitted beyond the local AS.By default, the local preference is 100.Configuring MED for AS Multi-Exit Discriminators (MED) attribute is the external metric for a route. AS usesthe local preference to select the route to the outside, and uses the MED todetermine the optimum route for entering the AS. When a router running BGPgets routes with the same destination address but different next hops throughdifferent external peers, it will select the route of the smallest MED as theoptimum route, provided that all the other conditions are the same.Perform the following configuration in BGP view.By default, MED metric is 0.The router configured above only compares the route MED metrics of differentEBGP peers in the same AS. Using the compare-different-as-med command,you can compare the route MED metrics of the peers in different ASs.Comparing the MEDRouting Metrics fromthe Peers in DifferentASsIt is used to select the best route. The route with smaller MED value will beselected.Perform the following configuration in BGP view.By default, MED comparison is not allowed among the routes from the neighborsin different ASs.It is not recommended to use this configuration unless you can make sure that theASs adopt the same IGP and routing method.Table 379 Configure the local preferenceOperation CommandConfigure the local preference default local-preference valueRestore the default local preference undo default local-preferenceTable 380 Configure an MED metric for the systemOperation CommandConfigure an MED metric for the system default med med-valueRestore the default MED metric of the system undo default medTable 381 Compare the MED routing metrics from the peers in different ASsOperation CommandCompare the MED routing metrics from peers indifferent ASs compare-different-as-medDisable comparison of the MED routing metrics frompeers in different ASs undo compare-different-as-med