R21xx-HP FlexFabric 11900 Layer 3 IP Routing Configuration Guide
167
Generally BGP only compares MEDs of routes received from the same AS. You can also use the
compare-different-as-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 is not advertised to any
other AS. It indicates the priority of a BGP router.
BGP uses LOCAL_PREF 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
in Figure 47, traffic from AS 20 to AS 10 travels through R
outer C that is selected according to
LOCAL_PREF.
Figure 47 LOCAL_PREF attribute
• COMMUNITY
The COMMUNITY attribute identifies the community of BGP routes. A BGP community is a group
of routes with the same characteristics. It has no geographical boundaries. Routes of different ASs
can belong to the same community.
A route can carry one or more COMMUNITY attribute values (each of which is represented by a
4-byte integer). A router uses the COMMUNITY attribute to determine whether to advertise the
route and the advertising scope without using complex filters such as ACLs. This mechanism
simplifies routing policy configuration, management, and maintenance.
Well-known COMMUNITY attributes involve the following:
{ INTERNET—By default, all routes belong to the Internet community. Routes with this attribute
can be advertised to all BGP peers.










