Operation Manual – Routing Protocol
Quidway S5600 Series Ethernet Switches-Release 1510 Chapter 5 BGP Configuration
Huawei Technologies Proprietary
5-8
The MED attribute is used to determine the optimal route for traffic flows to enter an AS.
It acts the same as the metrics used in IGP. For multiple routes a BGP router receives
from different EBGP peers, if they have the same destination address but different next
hops, the route with the smallest MED value is chosen as the optimal route provided
other conditions are the same. As shown in
Figure 5-7, Router B is chose as the ingress
for traffic from AS10 to AS20.
RouterC
RouterD
D=9.0.0.0
Next_Hop=3.1.1.1
MED=100
AS20
RouterB
RouterA
AS10
9.0.0.0
> D=9.0.0.0
Next_Hop=2.1.1.1
MED=0
EBGP
EBGP
IBGP
IBGP
IBGP
MED=0
MED=100
2.1.1.1
3.1.1.1
Figure 5-7 MED attribute
Normally, BGP only compares the MED attribute values of the routes received from the
same AS.
 Note:
In VRP implementations, you can force BGP to compare MED values of routes coming
from different ASs.
5) Local_Pref
The Local_Pref attribute is only valid among IBGP peers. It is not advertised to other
ASs. It indicates the priority of a BGP router.
Local_Pref attribute is used to determine the optimal route for traffic leaving an AS. For
multiple routes a BGP receives from different IBGP peers, if they have the same
destination address but different next hops, the route with the smallest Local_Pref
value is chosen as the optimal route provided other conditions are the same. As shown
in
Figure 5-8, RouterC is chose as the egress for traffic from AS20 to AS10.