After the preferred value is configured for routing information, the route with the largest preferred value is selected when multiple routes to the same destination exist in the BGP4+ routing table.
The Local_Pref attribute is used to determine the optimal route for the traffic that leaves an AS. When a BGP4+ router obtains multiple routes to the same destination address but with different next hops from different IBGP peers, the route with the largest Local_Pref value is selected.
The Multi_Exit Discriminator (MED) attribute serves as the metric used by an IGP. After MED attributes are set, EBGP peers select the route with the smallest MED value for the traffic that enters an AS.
The community attribute is used to simplify the management of routing policies. The management scope of the community attribute is far larger than that of the peer group. The community attribute can control the routing policies of multiple BGP4+ routers.