set local-preference
Sets the preference value for the autonomous system path.
Syntax: set local-preference value
no set local-preference
value
Preference value. Valid values are integers from 0 to 4294967295.
Description: Use the set local-preference command to assign a local preference to a BGP route.
Use the no set local-preference command to delete the entry in the route map.
To assign a preference to a route learned by OSPF or BGP you configure an accept policy for the route. If an incoming route matches the policy, the preference value you specify is assigned to the route.
You can override route preferences defined by set local-preference using the set weight command. To assign a greater or lesser preference to a static route, supply a value when you define the router.
Route maps consist of sets of match and set commands. Match commands define the match criteria for route maps. Routes that match the match criteria are processed according to the actions defined by the set commands. Routes that do not match at least one of the match criteria in the route map are ignored.
Use the route-map command to create a route map. Use the various match and set commands to define the conditions for redistributing routes between protocols or instances of the same protocol.
Local preference is a value is used to indicate preference given to a particular route when there is more than one route to the same destination. A higher local preference indicates that a route is more preferred. Local preference is local to this autonomous system and is exchanged only with IBGP peers.
Factory Default: Preference value of 100.
Command Mode: Route map configuration.
Example: In the following example:
- The ip as-path access-list command creates an as-path access list named ISP2_Permit411 that allows access to routes originating or passing through autonomous system 411.
- The route-map command creates a route map named setpref.
- The match as-path command adds a match clause to match routes permitted by as-path list ISP2_Permit411.
- The set local-preference command specifies all routes that pass as-path list ISP2_Permit411 have the local preference set to 100:
router(config)#ip as-path access-list ISP2_Permit411 permit _411_
router(config)#ip as-path access-list ISP2_Permit411 deny any
router(config)#route-map setpref permit 10
router(config-route-map)#match as-path ISP2_Permit411
router(config-route-map)#set local preference 100
router(config-route-map)#end
router(config)#
Related Commands: ip as-path access-list
match as-path
match community
match ip address
match ip next-hop
match ip route-source
match metric
route-map
match route-type
match tag
set as-path
set community
set community
set ip next-hop
show route-map
set level
set metric
set metric-type
set origin
set tag
set weight
Copyright © 2004
Avici Systems Inc.
Avici® and TSR®
is a registered trademark of Avici Systems Inc.
IPriori, Composite Links, SSR, QSR, and NSR® are
trademarks of Avici Systems Inc.
Source
File Name: Routing_Pol.fm
HTML File Name: Routing_Pol36.html
Last Updated: 05/10/04 at 16:38:37