Multicast and Routing Guide K/KA/KB.15.15
Figure 57 NEXT_HOP attribute
MED (MULTI_EXIT_DISC)
The MED attribute is exchanged between two neighboring ASs, each of which does not advertise
the attribute to any other AS. Similar to metrics used by IGP, MED is used to determine the best
route for traffic going into an AS.
When a BGP router obtains multiple routes to the same destination but with different next hops, it
considers the route with the smallest MED value the best route if other conditions are the same. As
shown below, traffic from AS10 to AS20 travels through Router B that is selected according to
MED.
Figure 58 MED attribute
In general, BGP compares MEDs of routes received from the same AS only.
NOTE: The current implementation supports using the always-compare-med command to force
BGP to compare MED values of routes received from different ASs.
LOCAL_PREF
The LOCAL_PREF attribute is exchanged between iBGP peers only, and therefore is not advertised
to any other AS. It indicates the priority of a BGP router. LOCAL_PREF is used to determine the
best route for traffic leaving the local AS. When a BGP router obtains from several iBGP peers
multiple routes to the same destination but with different next hops, it considers the route with the
highest LOCAL_PREF value as the best route. As shown below, traffic from AS20 to AS10 travels
through Router C that is selected according to LOCAL_PREF.
BGP path attributes 305










