Table Of Contents
send-lifetime
set as-path
set automatic-tag
set comm-list delete
set community
set dampening
set default interface
set extcommunity
set extcommunity cost
set interface
set ip default next-hop
set ip next-hop
set ip next-hop (BGP)
set ip next-hop verify-availability
set ip precedence
set level (IP)
set local-preference
set metric (BGP, OSPF, RIP)
set metric (EIGRP)
set metric-type
set metric-type internal
set next-hop
set origin (BGP)
set tag (IP)
set traffic-index
set weight
set-attached-bit
set-overload-bit
send-lifetime
To set the time period during which an authentication key on a key chain is valid to be sent, use the send-lifetime command in key chain key configuration mode. To revert to the default value, use the no form of this command.
send-lifetime start-time {infinite | end-time | duration seconds}
no send-lifetime [start-time {infinite | end-time | duration seconds}]
Syntax Description
start-time
|
Beginning time that the key specified by the key command is valid to be sent. The syntax can be either of the following:
hh:mm:ss Month date year
hh:mm:ss date Month year
hh—hours
mm—minutes
ss—seconds
Month—first three letters of the month
date—date (1-31)
year—year (four digits)
The default start time and the earliest acceptable date is January 1, 1993.
|
infinite
|
Key is valid to be sent from the start-time value on.
|
end-time
|
Key is valid to be sent from the start-time value until the end-time value. The syntax is the same as that for the start-time value. The end-time value must be after the start-time value. The default end time is an infinite time period.
|
duration seconds
|
Length of time (in seconds) that the key is valid to be sent.
|
Defaults
Forever (the starting time is January 1, 1993, and the ending time is infinite)
Command Modes
Key chain key configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Specify a start-time value and one of the following values: infinite, end-time, or duration seconds.
We recommend running Network Time Protocol (NTP) or some other time synchronization method if you intend to set lifetimes on keys.
If the last key expires, authentication will continue and an error message will be generated. To disable authentication, you must manually delete the last valid key.
Examples
The following example configures a key chain called trees. The key named chestnut will be accepted from 1:30 p.m. to 3:30 p.m. and be sent from 2:00 p.m. to 3:00 p.m. The key named birch will be accepted from 2:30 p.m. to 4:30 p.m. and be sent from 3:00 p.m. to 4:00 p.m. The overlap allows for migration of keys or discrepancies in the set time of the router. There is a 30-minute leeway on each side to handle time differences.
ip rip authentication key-chain trees
ip rip authentication mode md5
accept-lifetime 13:30:00 Jan 25 1996 duration 7200
send-lifetime 14:00:00 Jan 25 1996 duration 3600
accept-lifetime 14:30:00 Jan 25 1996 duration 7200
send-lifetime 15:00:00 Jan 25 1996 duration 3600
Related Commands
Command
|
Description
|
accept-lifetime
|
Sets the time period during which the authentication key on a key chain is received as valid.
|
key
|
Identifies an authentication key on a key chain.
|
key chain
|
Enables authentication for routing protocols.
|
key-string (authentication)
|
Specifies the authentication string for a key.
|
show key chain
|
Displays authentication key information.
|
set as-path
To modify an autonomous system path for BGP routes, use the set as-path command in route-map configuration mode. To not modify the autonomous system path, use the no form of this command.
set as-path {tag | prepend as-path-string}
no set as-path {tag | prepend as-path-string}
Syntax Description
tag
|
Converts the tag of a route into an autonomous system path. Applies only when redistributing routes into BGP.
|
prepend as-path-string
|
Appends the string following the keyword prepend to the autonomous system path of the route that is matched by the route map. Applies to inbound and outbound BGP route maps.
|
Defaults
Autonomous system path is not modified.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
The only global BGP metric available to influence the best path selection is the autonomous system path length. By varying the length of the autonomous system path, a BGP speaker can influence the best path selection by a peer further away.
By allowing you to convert the tag into an autonomous system path, the set as-path tag variation of this command modifies the autonomous system length. The set as-path prepend variation allows you to "prepend" an arbitrary autonomous system path string to BGP routes. Usually the local autonomous system number is prepended multiple times, increasing the autonomous system path length.
Examples
The following example converts the tag of a redistributed route into an autonomous system path:
route-map set-as-path-from-tag
redistribute ospf 109 route-map set-as-path-from-tag
The following example prepends 100 100 100 to all the routes advertised to 10.108.1.1:
set as-path prepend 100 100 100
neighbor 10.108.1.1 route-map set-as-path out
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community
|
Matches a BGP community.
|
match interface (IP)
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric (IP)
|
Redistributes routes with the metric specified.
|
match route-type (IP)
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set automatic-tag
|
Automatically computes the tag value.
|
set community
|
Sets the BGP communities attribute.
|
set level (IP)
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric (BGP, OSPF, RIP)
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set origin (BGP)
|
Sets the BGP origin code.
|
set tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
set automatic-tag
To automatically compute the tag value, use the set automatic-tag command in route-map configuration mode. To disable this function, use the no form of this command.
set automatic-tag
no set automatic-tag
Syntax Description
This command has no arguments or keywords.
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
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 global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution 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 the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
Examples
The following example configures the Cisco IOS software to automatically compute the tag value for the Border Gateway Protocol (BGP) learned routes:
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community
|
Matches a BGP community.
|
match interface (IP)
|
Distributes any routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric (IP)
|
Redistributes routes with the metric specified.
|
match route-type (IP)
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set as-path
|
Modifies an autonomous system path for BGP routes.
|
set community
|
Sets the BGP communities attribute.
|
set level (IP)
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric (BGP, OSPF, RIP)
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set next-hop
|
Specifies the address of the next hop.
|
set tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
show route-map
|
Displays all route maps configured or only the one specified.
|
set comm-list delete
To remove communities from the community0 attribute of an inbound or outbound update, use the set comm-list delete command in route-map configuration mode. To negate a previous set comm-list delete command, use the no form of this command.
set comm-list community-list-number | community-list-name delete
no set comm-list community-list-number | community-list-name delete
Syntax Description
community-list-number
|
A standard or expanded community list number. The range of standard community list numbers is from 1 to 99. The range of expanded community list number is from 100 to 500.
|
community-list-name
|
A standard or expanded community list name.
|
Defaults
No communities are removed.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
12.0(16)ST
|
Named community list support was integrated into Cisco IOS Release 12.0(16)ST.
|
12.1(9)E
|
Named community list support was integrated into Cisco IOS Release 12.1(9)E.
|
12.2(8)T
|
Named community list support was integrated into Cisco IOS Release 12.2(8)T.
|
12.0(22)S
|
The maximum number of expanded community lists was increased from 199 to 500 in Cisco IOS Release 12.0(22)S.
|
12.2(15)T
|
The maximum number of expanded community lists was increased from 199 to 500 in Cisco IOS Release 12.2(15)T.
|
Usage Guidelines
This set route-map configuration command removes communities from the community attribute of an inbound or outbound update using a route map to filter and determine the communities to be deleted. Depending upon whether the route map is applied to the inbound or outbound update for a neighbor, each community that passes the route map permit clause and matches the given community list will be removed from the community attribute being received from or sent to the Border Gateway Protocol (BGP) neighbor.
Each entry of a standard community list should list only one community when used with the set comm-list delete command. For example, in order to be able to delete communities 10:10 and 10:20, you must use the following format to create the entries:
ip community-list 500 permit 10:10
ip community-list 500 permit 10:20
The following format for a community list entry, while acceptable otherwise, does not work with the set comm-list delete command:
config ip community-list 500 permit 10:10 10:20
When both the set community community-number and set comm-list delete commands are configured in the same sequence of a route map attribute, the deletion operation (set comm-list delete) is performed before the set operation (set community community-number).
Examples
In the following example, the communities 100:10 and 100:20 (if present) will be deleted from updates received from 172.16.233.33. Also, except for 100:50, all communities beginning with 100: will be deleted from updates sent to 172.16.233.33.
router bgp 100
neighbor 172.16.233.33 remote-as 120
neighbor 172.16.233.33 route-map ROUTEMAPIN in
neighbor 172.16.233.33 route-map ROUTEMAPOUT out
!
ip community-list 500 permit 100:10
ip community-list 500 permit 100:20
!
ip community-list 120 deny 100:50
ip community-list 120 permit 100:.*
!
route-map ROUTEMAPIN permit 10
set comm-list 500 delete
!
route-map ROUTEMAPOUT permit 10
set comm-list 120 delete
Related Commands
Command
|
Description
|
set community
|
Sets the BGP communities attribute.
|
set community
To set the BGP communities attribute, use the set community route map configuration command. To delete the entry, use the no form of this command.
set community {community-number [additive] [well-known-community] | none}
no set community {community-number [additive] [well-known-community]}
Syntax Description
community-number
|
Specifies that community number. Valid values are from 1 to 4294967200, no-export, or no-advertise.
|
additive
|
(Optional) Adds the community to the already existing communities.
|
well-known-community
|
(Optional) Well know communities can be specified by using the following keywords:
• internet
• local-as
• no-advertise
• no-export
|
none
|
(Optional) Removes the community attribute from the prefixes that pass the route map.
|
Defaults
No BGP communities attributes exist.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.3
|
This command was introduced.
|
Usage Guidelines
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 global configuration command, and the match and set route map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution 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. When all match criteria are met, all set actions are performed.
Examples
In the following example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to no-export (these routes will not be advertised to any external BGP [eBGP] peers).
route-map set_community 10 permit
route-map set_community 20 permit
In the following similar example, routes that pass the autonomous system path access list 1 have the community set to 109. Routes that pass the autonomous system path access list 2 have the community set to local-as (the router will not advertise this route to peers outside the local autonomous system.
route-map set_community 10 permit
route-map set_community 20 permit
Related Commands
Command
|
Description
|
ip community-list
|
Creates a community list for BGP and control access to it.
|
match community
|
Matches a BGP community.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set comm-list delete
|
Removes communities from the community attribute of an inbound or outbound update.
|
show ip bgp community
|
Displays routes that belong to specified BGP communities.
|
set dampening
To set the BGP route dampening factors, use the set dampening route map configuration command. To disable this function, use the no form of this command.
set dampening half-life reuse suppress max-suppress-time
no set dampening
Syntax Description
half-life
|
Time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. The range of the half life period is from 1 to 45 minutes. The default is 15 minutes.
|
reuse
|
Unsuppresses the route if the penalty for a flapping route decreases enough to fall below this value. The process of unsuppressing routes occurs at 10-second increments. The range of the reuse value is from 1 to 20000; the default is 750.
|
suppress
|
Suppresses a route when its penalty exceeds this limit. The range is from 1 to 20000; the default is 2000.
|
max-suppress-time
|
Maximum time (in minutes) a route can be suppressed. The range is from 1 to 20000; the default is four times the half-life value. If the half-life value is allowed to default, the maximum suppress time defaults to 60 minutes.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
When a BGP peer is reset, the route is withdrawn and the flap statistics cleared. In this instance, the withdrawal does not incur a penalty even though route flap dampening is enabled.
Examples
The following example sets the half life to 30 minutes, the reuse value to 1500, the suppress value to 10000; and the maximum suppress time to 120 minutes:
set dampening 30 1500 10000 120
neighbor 172.16.233.52 route-map tag in
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community
|
Matches a BGP community.
|
match interface (IP)
|
Distributes routes that have their next hop out one of the interfaces specified.
|
match ip address
|
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
|
match ip next-hop
|
Redistributes any routes that have a next hop router address passed by one of the access lists specified.
|
match ip route-source
|
Redistributes routes that have been advertised by routers and access servers at the address specified by the access lists.
|
match metric (IP)
|
Redistributes routes with the metric specified.
|
match route-type (IP)
|
Redistributes routes of the specified type.
|
match tag
|
Redistributes routes in the routing table that match the specified tags.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set automatic-tag
|
Automatically computes the tag value.
|
set community
|
Sets the BGP communities attribute.
|
set ip next-hop
|
Specifies the address of the next hop.
|
set level (IP)
|
Indicates where to import routes.
|
set local-preference
|
Specifies a preference value for the autonomous system path.
|
set metric (BGP, OSPF, RIP)
|
Sets the metric value for a routing protocol.
|
set metric-type
|
Sets the metric type for the destination routing protocol.
|
set origin (BGP)
|
Sets the BGP origin code.
|
set tag (IP)
|
Sets the value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
show route-map
|
Displays all route maps configured or only the one specified.
|
set default interface
To indicate where to output packets that pass a match clause of a route map for policy routing and have no explicit route to the destination, use the set default interface command in route-map configuration mode. To delete an entry, use the no form of this command.
set default interface type number [...type number]
no set default interface type number [...type number]
Syntax Description
type
|
Interface type, used with the interface number, to which packets are output.
|
number
|
Interface number, used with the interface type, to which packets are output.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
12.3(7)T
|
This command was updated for use in configuring IPv6 policy-based routing (PBR).
|
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the type and number arguments.
Use this command to provide certain users a different default route. If the Cisco IOS software has no explicit route for the destination, then it routes the packet to this interface. The first interface specified with the set default interface command that is up is used. The optionally specified interfaces are tried in turn.
Use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
In PBR for IPv6, use the ipv6 policy route-map or ipv6 local policy route-map command with match and set route map configuration commands to define conditions for policy routing packets.
The set clauses can be used in conjunction with one another. They are evaluated in the following order:
1.
set ip next-hop
2.
set interface
3.
set ip default next-hop
4.
set default interface
Examples
In the following example, packets that have a Level 3 length of 3 to 50 bytes and for which the software has no explicit route to the destination are output to Ethernet interface 0:
ip policy route-map brighton
set default interface ethernet 0
Related Commands
Command
|
Description
|
ip policy route-map
|
Identifies a route map to use for policy routing on an interface.
|
ipv6 local policy route-map
|
Identifies a route map to use for local IPv6 PBR.
|
ipv6 policy route-map
|
Configures IPv6 PBR on an interface.
|
match ip address
|
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
|
match ipv6 address
|
Specifies an IPv6 access list to use to match packets for PBR for IPv6.
|
match length
|
Bases policy routing on the Level 3 length of a packet.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set default interface
|
Indicates where to output packets that pass a match clause of a route map for policy routing and have no explicit route to the destination.
|
set interface
|
Indicates where to output packets that pass a match clause of route map for policy routing.
|
set ip default next-hop verify-availability
|
Indicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination.
|
set ipv6 default next-hop
|
Specifies an IPv6 default next hop to which matching packets will be forwarded.
|
set ip next-hop
|
Indicates where to output packets that pass a match clause of a route map for policy routing.
|
set ipv6 next-hop (PBR)
|
Indicates where to output IPv6 packets that pass a match clause of a route map for policy routing.
|
set ipv6 precedence
|
Sets the precedence value in the IPv6 packet header.
|
set extcommunity
To set Border Gateway Protocol (BGP) extended community attributes, use the set extcommunity command in route-map configuration mode. To delete the entry, use the no form of this command.
set extcommunity {rt extended-community-value [additive] | soo extended-community-value}
no set extcommunity {rt extended-community-value [additive] | soo extended-community-value}
Syntax Description
rt
|
Specifies the route target (RT) extended community attribute.
|
soo
|
Specifies the site of origin (SOO) extended community attribute.
|
extended-community-value
|
Specifies the value to be set. The value can be one of the following combinations:
• autonomous-system-number:network-number
• ip-address:network-number
The colon is used to separate the autonomous system number and network number or IP address and network number.
|
additive
|
(Optional) Adds a route target to the existing route target list without replacing any existing route targets.
|
Defaults
Specifying new route targets with the rt keyword replaces existing route targets by default, unless the additive keyword is used. The use of the additive keyword adds the new route target to the existing route target list but does not replace any existing route targets.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
12.1
|
This command was introduced.
|
Usage Guidelines
Extended community attributes are used to configure, filter, and identify routes for virtual routing and forwarding instances (VRFs) and Multiprotocol Label Switching (MPLS) Virtual Private Networks (VPNs).
The set extcommunity command is used to configure set clauses that use extended community attributes in route maps. All of the standard rules of match and set clauses apply to the configuration of extended community attributes.
The route target (RT) extended community attribute is configured with the rt keyword. This attribute is used to identify a set of sites and VRFs that may receive routes that are tagged with the configured route target. Configuring the route target extended attribute with a route allows that route to be placed in the per-site forwarding tables that are used for routing traffic that is received from corresponding sites.
The site of origin (SOO) extended community attribute is configured with the soo keyword. This attribute uniquely identifies the site from which the Provider Edge (PE) router learned the route. All routes learned from a particular site must be assigned the same SOO extended community attribute, whether a site is connected to a single PE router or multiple PE routers. Configuring this attribute prevents routing loops from occurring when a site is multihomed. The SOO extended community attribute is configured on the interface and is propagated into BGP through redistribution. The SOO can be applied to routes that are learned from VRFs. The SOO should not be configured for stub sites or sites that are not multihomed.
Examples
The following example sets the route target to extended community attribute 100:2 for routes that are permitted by the route map:
Router(config)# access-list 2 permit 192.168.78.0 255.255.255.0
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match ip-address 2
Router(config-route-map)# set extcommunity rt 100:2
The following example sets the route target to extended community attribute 100:3 for routes that are permitted by the route map. The use of the additive keyword adds route target 100:3 to the existing route target list but does not replace any existing route targets.
Router(config)# access-list 3 permit 192.168.79.0 255.255.255.0
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match ip-address 3
Router(config-route-map)# set extcommunity rt 100:3 additive
Note
Configuring route targets with the set extcommunity command will replace existing route targets, unless the additive keyword is used.
The following example sets the site of origin to extended community attribute 100:4 for routes that are permitted by the route map:
Router(config)# access-list 4 permit 192.168.80.0 255.255.255.0
Router(config)# route-map MAP_NAME permit 10
Router(config-route-map)# match ip-address 4
Router(config-route-map)# set extcommunity soo 100:4
Related Commands
Command
|
Description
|
ip extcommunity-list
|
Creates an extended community list and controls access to it.
|
match extcommunity
|
Matches a BGP VPN extended community list.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
route-target
|
Creates a route target extended community for a VRF.
|
show ip extcommunity-list
|
Displays routes that are permitted by the extended community list.
|
show route-map
|
Displays all route maps configured or only the one specified.
|
set extcommunity cost
To create a set clause to apply the cost community attribute to routes that pass through a route map, use the set extcommunity cost command in route-map configuration mode. To delete the cost community set clause, use the no form of this command.
set extcommunity cost [igp] community-id cost-value
no set extcommunity cost [igp] community-id cost-value
Syntax Description
igp
|
The IGP point of insertion (POI). The configuration of this keyword forces the cost community to be evaluated after the IGP distance to the next hop has been compared.
|
community-id
|
The ID for the configured extended community. The range is from 0 to 255.
|
cost-value
|
The configured cost that is set for matching paths in the route map. The range is from 0 to 4294967295.
|
Defaults
•
The default cost value is applied to routes that are not configured with the cost community attribute when cost community filtering is enabled. The default cost-value is half of the maximum value (4294967295) or 2147483647.
•
The IGP POI is applied by default a POI is not specified.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
12.0(24)S
|
This command was introduced into Cisco IOS Release 12.0(24)S.
|
12.3(2)T
|
This command was integrated.
|
12.2(18)S
|
This command was integrated.
|
12.0(27)S
|
• Support for mixed EIGRP MPLS VPN network topologies that contain back door routes was introduced into Cisco IOS Release 12.0(27)S.
|
12.3(8)T
|
• Support for mixed EIGRP MPLS VPN network topologies that contain back door routes was introduced into Cisco IOS Release 12.3(8)T.
|
12.2(25)S
|
• Support for mixed EIGRP MPLS VPN network topologies that contain back door routes was introduced into Cisco IOS Release 12.2(25)S.
|
Usage Guidelines
The cost community attribute is applied to internal routes by configuring the set extcommunity cost command in a route map. The cost community set clause is configured with a cost community ID number (0-255) and a cost community number value (0-4294967295). The path with the lowest cost community number is preferred. In the case where two paths have been configured with the same cost community value, the path selection process will then prefer the path with the lower community ID.
The BGP Cost Community feature can be configured only within the same autonomous-system or confederation. The cost community is a non-transitive extended community. The cost community is passed to internal BGP (iBGP) and confederation peers only and is not passed to external BGP (eBGP) peers. The cost community allows you to customize the local preference and best path selection process for specific paths. The cost extended community attribute is propagated to iBGP peers when extended community exchange is enabled with the neighbor send-community command.
The following commands can be used to apply the route map with the cost community set clause:
•
aggregate-address
•
neighbor default-originate route-map {in | out}
•
neighbor route-map
•
network route-map
•
redistribute route-map
Multiple cost community set clauses may be configured with the set extcommunity cost command in a single route map block or sequence. However, each set clause must be configured with a different ID value for each point of insertion (POI).
Aggregate routes and multipaths are supported by the BGP Cost Community feature. The cost community attribute can be applied to either type of route. The cost community attribute is passed to the aggregate or multipath route from component routes that carry the cost community attribute. Only unique IDs are passed, and only the highest cost of any individual component route will be applied to the aggregate on a per-ID basis. If multiple component routes contain the same ID, the highest configured cost is applied to the route. If one or more component routes does not carry the cost community attribute or if the component routes are configured with different IDs, then the default value (2147483647) will be advertised for the aggregate or multipath route.

Note
The BGP cost community attribute must be supported on all routers in an autonomous system or confederation before cost community filtering is configured. The cost community should be applied consistently throughout the local autonomous system or confederation to avoid potential routing loops.
Support for EIGRP MPLS VPN Back Door Links
The "pre-bestpath" point of insertion (POI) has been introduced in the BGP Cost Community feature to support mixed EIGRP VPN network topologies that contain VPN and backdoor links. This POI is applied automatically to EIGRP routes that are redistributed into BGP. The "pre-best path" POI carries the EIGRP route type and metric. This POI influences the best path calculation process by influencing BGP to consider this POI before any other comparison step. No configuration is required. This feature is enabled automatically for EIGRP VPN sites when a supporting is installed to a PE, CE, or back door router.
Examples
The following example configuration shows the configuration of the set extcommunity cost command. The following example applies the cost community ID of 1 and cost community value of 100 to routes that are permitted by the route map. This configuration will cause the best path selection process to prefer this route over other equal cost paths that were not permitted by this route map sequence.
Router(config)# router bgp 50000
Router(config-router)# neighbor 10.0.0.1 remote-as 50000
Router(config-router)# neighbor 10.0.0.1 update-source Loopback 0
Router(config-router)# address-family ipv4
Router(config-router-af)# neighbor 10.0.0.1 activate
Router(config-router-af)# neighbor 10.0.0.1 route-map COST1 in
Router(config-router-af)# neighbor 10.0.0.1 send-community both
Router(config-router-af)# exit
Router(config)# route-map COST1 permit 10
Router(config-route-map)# match ip-address 1
Router(config-route-map)# set extcommunity cost 1 100
Related Commands
Command
|
Description
|
aggregate-address
|
Creates an aggregate entry in a BGP or multicast BGP database.
|
bgp bestpath cost-community ignore
|
Configures a router that is running BGP to not evaluate the cost community attribute during the best path selection process.
|
neighbor default-originate
|
Allows a BGP speaker (the local router) to send the default route 0.0.0.0 to a neighbor for use as a default route.
|
neighbor route-map
|
Applies a route map to incoming or outgoing routes.
|
network (BGP and multiprotocol BGP)
|
Specifies the networks to be advertised by the BGP and multiprotocol BGP routing processes.
|
redistribute (IP)
|
Redistributes routes from one routing domain into another routing domain.
|
show ip bgp
|
Displays entries in the BGP routing table.
|
show route-map
|
Displays all route maps configured or only the one specified.
|
set interface
To indicate where to output packets that pass a match clause of a route map for policy routing, use the set interface command in route-map configuration mode. To delete an entry, use the no form of this command.
set interface type number [...type number]
no set interface type number [...type number]
Syntax Description
type
|
Interface type, used with the interface number, to which packets are output.
|
number
|
Interface number, used with the interface type, to which packets are output.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
12.3(7)T
|
This command was updated for use in configuring IPv6 policy-based routing (PBR).
|
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the type and number arguments.
Use the ip policy route-map interface configuration command, the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for policy routing packets. The ip policy route-map command identifies a route map by name. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which policy routing occurs. The set commands specify the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.
In PBR for IPv6, use the ipv6 policy route-map or ipv6 local policy route-map command with match and set route map configuration commands to define conditions for policy routing packets.
If the first interface specified with the set interface command is down, the optionally specified interfaces are tried in turn.
The set clauses can be used in conjunction with one another. They are evaluated in the following order:
1.
set ip next-hop
2.
set interface
3.
set ip default next-hop
4.
set default interface
A useful next hop implies an interface. As soon as a next hop and an interface are found, the packet is routed.
Specifying the set interface null 0 command is a way to write a policy that the packet be dropped and an "unreachable" message be generated.
Examples
In the following example, packets with a Level 3 length of 3 to 50 bytes are output to Ethernet interface 0:
ip policy route-map testing
In the following example for IPv6, packets with a Level 3 length of 3 to 50 bytes are output to Ethernet interface 0:
ipv6 policy route-map testing
Related Commands
Command
|
Description
|
ipv6 local policy route-map
|
Configures PBR for IPv6 for originated packets.
|
ip policy route-map
|
Identifies a route map to use for policy routing on an interface.
|
ipv6 policy route-map
|
Configures IPv6 policy-based routing (PBR) on an interface.
|
match ip address
|
Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, and performs policy routing on packets.
|
match ipv6 address
|
Specifies an IPv6 access list to use to match packets for PBR for IPv6.
|
match length
|
Bases policy routing on the Level 3 length of a packet.
|
route-map
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
set default interface
|
Indicates where to output packets that pass a match clause of a route map for policy routing and have no explicit route to the destination.
|
set interface
|
Indicates where to output packets that pass a match clause of route map for policy routing.
|
set ip default next-hop verify-availability
|
Indicates where to output pa |