Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document.
Note: Even the most advanced machine translation cannot match the quality of professional translators.
Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Setting the MED Attribute for MBGP Routes
Setting the MED Attribute for MBGP Routes
The MED attribute indicates the metric used in IGP. After
the MED attribute is set for routes, an EBGP peer can select a route
with the smallest MED value for the traffic that enters an AS.
Context
The MED serves as the metric used by an IGP. MED determines
the optimal route when traffic enters an AS. When a MBGP router obtains
multiple routes to the same destination address but with different
next hops through EBGP peers, the route with the smallest MED value
is selected as the optimal route.
Procedure
Set the default MED value on the local device.
Run system-view
The system view is displayed.
Run bgpas-number
The BGP view is displayed.
Run ipv4-family multicast
The BGP-IPv4 multicast address family view is
displayed.
Run default medmed
The default MED value is set.
Run commit
The configuration is
committed.
Enable MBGP to compare the MED values of the routes from
different ASs.
Run system-view
The system view is displayed.
Run bgpas-number
The BGP view is displayed.
Run ipv4-family multicast
The BGP-IPv4 multicast address family view is
displayed.
Run compare-different-as-med
The function to compare the MED values of routes
from different ASs is enabled.
Run commit
The configuration is
committed.
Configure MBGP to use the maximum MED value for a route
that has no MED value.
Run system-view
The system view is displayed.
Run bgpas-number
The BGP view is displayed.
Run ipv4-family multicast
The BGP-IPv4 multicast address family view is
displayed.
Run bestroute med-none-as-maximum
The maximum MED value is used for a route if the
route has no MED value.
If this command is not configured, MBGP
uses 0 as the MED value for a route if the route has no MED value.
Run commit
The configuration is
committed.
Compare the sums of MED multiplied by a MED
multiplier and IGP cost multiplied by an IGP cost multiplier.
Run system-view
The system view is displayed.
Run bgpas-number
The BGP view is displayed.
Run ipv4-family multicast
The BGP-IPv4 multicast address family view is
displayed.
Run bestroute med-plus-igp [ igp-multiplierigp-multiplier | med-multipliermed-multiplier ]
The sums of MED multiplied by a MED multiplier and
IGP cost multiplied by an IGP cost multiplier are compared.