R3166-R3206-HP High-End Firewalls Network Management Configuration Guide-6PW101
338
To do… Use the command…
Remarks
Enter BGP view bgp as-number
—
Specify a preferred value for
routes received from a peer
or peer group
peer { group-name | ip-address }
preferred-value value
Optional
The preferred value is 0 by default.
Configuring preferences for BGP routes
A router may run multiple routing protocols, each of which has a preference specified. If they find the
same route, the route found by the routing protocol with the highest preference is selected.
This task allows you configure preferences for external, internal, local BGP routes and reference a route
policy to set preferences for matching routes as needed.
Follow these steps to configure preferences for BGP routes:
To do… Use the command…
Remarks
Enter system view system-view
—
Enter BGP view bgp as-number
—
Configure preferences
for external, internal,
local BGP routes
preference { external-preference
internal-preference local-preference |
route-policy route-policy-name }
Optional
The default preferences of external,
internal, and local BGP routes are 255,
255, and 130 respectively.
Configure the default local preference
The local preference 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 preference as the best route.
This task allows you to specify the default local preference for routes sent to iBGP peers.
Follow these steps to specify the default local preference:
To do… Use the command…
Remarks
Enter system view system-view
—
Enter BGP view bgp as-number
—
Configure the default local preference default local-preference value
Optional
100 by default
Configuring the MED attribute
MED is used to determine the best route for traffic going into an AS. When a BGP router obtains from
eBGP peers multiple routes to the same destination but with different next hops, it considers the route with
the smallest MED value as the best route if other conditions are the same.
1. Configure the default MED value
Follow these steps to configure the default MED value:
To do… Use the command…
Remarks
Enter system view system-view
—
Enter BGP view bgp as-number
—