Command:

set local-preference


Mode:

Router(config-route-map)#


Syntax:

set local-preference number-value
no set local-preference number-value

 

Syntax Description:

number-value Preference value. An integer from 0 to 4294967295.

 

Command Description:

To specify a preference value for the autonomous system path, use the set local-preference command in route-map configuration mode. To delete an entry, use the no form of this command.

The default preference value is 100.

The preference is sent only to all routers in the local autonomous system.

You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.

Use the route-map (IP) global configuration command with the match and set route-map configuration commands to define the conditions for redistributing routes from one routing protocol into another, or for policy routing. Each route-map command has an associated list of match and set commands. The match commands specify the match criteria--the conditions under which redistribution or policy routing is allowed for the current route-map command. The set commands specify the set actions--the particular redistribution or policy routing actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.

The set route-map configuration commands specify the redistribution set actions to be performed when all of the match criteria of a route map are met.

You can change the default preference value with the bgp default local-preference command.


Example:

The following example sets the local preference to 100 for all routes that are included in access list 1:

Router(config)# route-map map-preference
Router(config-route-map)# match as-path 1
Router(config-route-map)# set local-preference 100


Misconceptions:

None


Related Commands:

bgp default local-preference
match as-path
match community
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set community
set metric
set metric-type
set tag
set weight

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)