Cisco IOS IP Command Reference, Volume 2 of 4: Routing Protocols, Release 12.3
IP Routing Protocols Commands: send-lifetime through set-overload-bit

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 interface

set ip default next-hop

set ip default next-hop verify-availability

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

ssseconds

Monthfirst three letters of the month

datedate (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.

interface ethernet 0
 ip rip authentication key-chain trees
 ip rip authentication mode md5
!
router rip
 network 172.19.0.0
 version 2
!
key chain trees
 key 1
 key-string chestnut
 accept-lifetime 13:30:00 Jan 25 1996 duration 7200
 send-lifetime 14:00:00 Jan 25 1996 duration 3600
 key 2
 key-string birch
 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
 set as-path tag
!
router bgp 100
 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:

route-map set-as-path
 match as-path 1
 set as-path prepend 100 100 100
!
router bgp 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:

route-map tag
 match as path 10
 set automatic-tag 
!
router bgp 100
 table-map tag

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
 match as-path 1
 set community 109

route-map set_community 20 permit
 match as-path 2
 set community no-export

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
 match as-path 1
 set community 109

route-map set_community 20 permit
 match as-path 2
 set community local-as

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:

route-map tag
 match as path 10
 set dampening 30 1500 10000 120
!
router bgp 100
 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 interface-type interface-number [...interface-type interface-number]

no set default interface interface-type interface-number [...interface-type interface-number]

Syntax Description

interface-type

Interface type, used with the interface number, to which packets are output.

interface-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.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the interface-type interface-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.

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:

interface serial 0
 ip policy route-map brighton
!
route-map brighton
 match length 3 50
 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.

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 length

Bases policy routing on the Level 3 length of a packet.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.

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 ip next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing.


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 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 interface-type interface-number [...interface-type interface-number]

no set interface interface-type interface-number [...interface-type interface-number]

Syntax Description

interface-type

Interface type, used with the interface number, to which packets are output.

interface-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.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the interface-type interface-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.

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:

interface serial 0
 ip policy route-map testing
!
route-map testing
 match length 3 50
 set interface ethernet 0

Related Commands

Command
Description

ip policy route-map

Identifies a route map to use for policy routing 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 length

Bases policy routing on the Level 3 length of a packet.

route-map (IP)

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 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 ip next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing.


set ip default next-hop

To indicate 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, use the set ip default next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.

set ip default next-hop ip-address [...ip-address]

no set ip default next-hop ip-address [...ip-address]

Syntax Description

ip-address

IP address of the next hop to which packets are output.The next hop must be an adjacent router.


Defaults

This command is disabled by default.

Command Modes

Route-map configuration

Command History

Release
Modification

11.0

This command was introduced.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.

Use this command to provide certain users a different default route. If the software has no explicit route for the destination in the packet, then it routes the packet to this next hop. The first next hop specified with the set ip default next-hop command needs to be adjacent to the router. The optional specified IP addresses 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.

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


Note The set ip next-hop and set ip default next-hop are similar commands but have a different order of operations. Configuring the set ip next-hop command causes the system to use policy routing first and then use the routing table. Configuring the set ip default next-hop command causes the system to use the routing table first and then policy route the specified next hop.


Examples

The following example provides two sources with equal access to two different service providers. Packets arriving on asynchronous interface 1 from the source 10.1.1.1 are sent to the router at 172.16.6.6 if the software has no explicit route for the destination of the packet. Packets arriving from the source 10.2.2.2 are sent to the router at 172.17.7.7 if the software has no explicit route for the destination of the packet. All other packets for which the software has no explicit route to the destination are discarded.

access-list 1 permit ip 10.1.1.1 0.0.0.0
access-list 2 permit ip 10.2.2.2 0.0.0.0
!
interface async 1
 ip policy route-map equal-access
!
route-map equal-access permit 10
 match ip address 1
 set ip default next-hop 172.16.6.6
route-map equal-access permit 20
 match ip address 2
 set ip default next-hop 172.17.7.7
 route-map equal-access permit 30
 set default interface null0

Related Commands

Command
Description

ip policy route-map

Identifies a route map to use for policy routing 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 length

Bases policy routing on the Level 3 length of a packet.

route-map (IP)

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 next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing.


set ip default next-hop verify-availability

To configure a router, for policy routing, to check the CDP database for the availability of an entry for the default next hop that is specified by the set ip default next-hop command, use the set ip default next-hop verify-availability route map configuration command. To disable this function, use the no form of this command.

set ip default next-hop verify-availability

no set ip default next-hop verify-availability

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

12.1(1.05)T

This command was introduced.


Usage Guidelines

Use this command to force the configured policy routing to check the CDP database to determine if an entry is available for the next hop that is specified by the set ip default next-hop command. This command is used to prevent traffic from being "black holed" if the configured next hop becomes unavailable.

Examples

The following example :

Router(config-route-map)# set ip default next-hop verify-availability

Related Commands

Command
Description

set ip default next-hop verify-availability

Configures policy routing to verify if the next hops of a route map are CDP neighbors before policy routing to those next hops.

set ip next-hop

Indicates where to output packets that pass a match clause of a route map for policy routing.


set ip next-hop

To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.

set ip next-hop ip-address [...ip-address]

no set ip next-hop ip-address [...ip-address]

Syntax Description

ip-address

IP address of the next hop to which packets are output. It must be the address of an adjacent router.


Defaults

This command is disabled by default.

Command Modes

Route-map configuration

Command History

Release
Modification

11.0

This command was introduced.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.

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.

If the interface associated with the first next hop specified with the set ip next-hop command is down, the optionally specified IP addresses 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


Note The set ip next-hop and set ip default next-hop are similar commands but have a different order of operations. Configuring the set ip next-hop command causes the system to use policy routing first and then use the routing table. Configuring the set ip default next-hop command causesthe system to use the routing table first and then policy route the specified next hop.


Examples

In the following example, packets with a Level 3 length of 3 to 50 bytes are output to the router at IP address 10.14.2.2:

interface serial 0
 ip policy route-map thataway
!
route-map thataway
 match length 3 50
 set ip next-hop 10.14.2.2

Related Commands

Command
Description

ip policy route-map

Identifies a route map to use for policy routing 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 length

Bases policy routing on the Level 3 length of a packet.

route-map (IP)

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 ip next-hop (BGP)

To indicate where to output packets that pass a match clause of a route map for policy routing, use the set ip next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.

set ip next-hop ip-address [... ip-address] [peer-address]

no set ip next-hop ip-address [... ip-address] [peer-address]

Syntax Description

ip-address

IP address of the next hop to which packets are output. It need not be an adjacent router.

peer-address

(Optional) Sets the next hop to be the BGP peering address.


Defaults

This command is disabled by default.

Command Modes

Route-map configuration

Command History

Release
Modification

11.0

This command was introduced.

12.0

The peer-address keyword was added.


Usage Guidelines

An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the ip-address argument.

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.

If the first next hop specified with the set ip next-hop command is down, the optionally specified IP addresses are tried in turn.

When the set ip next-hop command is used with the peer-address keyword in an inbound route map of a BGP peer, the next hop of the received matching routes will be set to be the neighbor peering address, overriding any third-party next hops. So the same route map can be applied to multiple BGP peers to override third-party next hops.

When the set ip next-hop command is used with the peer-address keyword in an outbound route map of a BGP peer, the next hop of the advertised matching routes will be set to be the peering address of the local router, thus disabling the next hop calculation. The set ip next-hop command has finer granularity than the (per-neighbor) neighbor next-hop-self command, because you can set the next hop for some routes, but not others. The neighbor next-hop-self command sets the next hop for all routes sent to that neighbor.

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, three routers are on the same FDDI LAN (with IP addresses 10.1.1.1, 10.1.1.2, and 10.1.1.3). Each is in a different autonomous system. The set ip next-hop peer-address command specifies that traffic from the router (10.1.1.3) in remote autonomous system 300 for the router (10.1.1.1) in remote autonomous system 100 that matches the route map is passed through the router bgp 200, rather than sent directly to the router (10.1.1.1) in autonomous system 100 over their mutual connection to the LAN.

router bgp 200
neighbor 10.1.1.3 remote-as 300
neighbor 10.1.1.3 route-map set-peer-address out
neighbor 10.1.1.1 remote-as 100
route-map set-peer-address permit 10
set ip next-hop peer-address

Related Commands

Command
Description

ip policy route-map

Identifies a route map to use for policy routing 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 length

Bases policy routing on the Level 3 length of a packet.

neighbor next-hop-self

Disables next hop processing of BGP updates on the router.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol to 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 that have no explicit route to the destination.

set interface

Indicates where to output packets that pass a match clause of a route map for policy routing.

set ip default next-hop

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 ip next-hop verify-availability

To configure policy routing to verify that the next hops of a route map is a CDP neighbor before policy routing to that next hop, use the set ip next-hop verify-availability command in route-map configuration mode.

set ip next-hop verify-availability

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

12.0(3)T

This command was introduced.


Usage Guidelines

This command might be used in a case such as you have some traffic traveling via a satellite to a next hop. It might be prudent to verify that the next hop is reachable before trying to policy route to it.

This command has the following restrictions:

It causes some performance degradation.

CDP must be configured on the interface.

The next hop must be a Cisco device with CDP enabled.

It is supported in process switching and CEF policy routing, but not available in dCEF, because of the dependency of the CDP neighbor database.

If the router is policy routing packets to the next hop and the next hop happens to be down, the router will try unsuccessfully to use Address Resolution Protocol (ARP) for the next hop (which is down). This behavior will continue forever.

To prevent this situation from occurring, use this command to configure the router to first verify that the next hops of the route map are the router's CDP neighbors before routing to that next hop.

This command is optional because some media or encapsulations do not support CDP, or it may not be a Cisco device that is sending the router traffic.

If this command is set and the next hop is not a CDP neighbor, the router looks to the subsequent next hop, if there is one. If there is none, the packets simply are not policy routed.

If this command is not set, the packets either are successfully policy routed or remain forever unrouted.

If you want to selectively verify availability of only some next hops, you can configure different route map entries (under the same route map name) with different criteria (using access list matching or packet size matching), and use the set ip next-hop verify-availability command selectively.

Examples

The following example configures Policy Routing with CEF. Policy routing is configured to verify that next hop 50.0.0.8 of route map named test is a CDP neighbor before the router tries to policy route to it.

If the first packet is being policy routed via route map named test sequence 10, the subsequent packets of the same flow always take the same route map named test sequence 10, not route map named test sequence 20, because they all match or pass access list 1 check.

ip cef
interface ethernet0/0/1
 ip route-cache flow
 ip policy route-map test
route-map test permit 10
 match ip address 1
 set ip precedence priority
 set ip next-hop 50.0.0.8
 set ip next-hop verify-availability
route-map test permit 20

Related Commands

Command
Description

show route-map ipc

Displays counts of the one-way route map IPC messages sent from the RP to the VIP when NetFlow policy routing is configured.


set ip precedence

To set the precedence value in the IP header, use the set ip precedence command in route-map configuration mode. To instruct the router to leave the precedence value alone, use the no form of this command.

set ip precedence number | name

no set ip precedence

Syntax Description

number | name

Number or name that sets the precedence bits in the IP header. The number and its corresponding name are as follows, from least important to most important:

Number    Name

0              routine
1              priority
2              immediate
3              flash
4              flash-override
5              critical
6              internet
7              network


Defaults

This command has no default behavior.

Command Modes

Route-map configuration

Command History

Release
Modification

11.0

This command was introduced.


Usage Guidelines

You can set the precedence using either a number or the corresponding name.


Note Setting the precedence bit affects weighted fair queueing (WFQ). It acts as a multiplier on the WFQ weighting, using a formula of 4096 divided by the IP Precedence value plus 1. For more information, see the fair-queue command.


The way the network gives priority (or some type of expedited handling) to the marked traffic is through the application of WFQ or weighted random early detection (WRED) at points downstream in the network. Typically, you would set IP precedence at the edge of the network (or administrative domain) and have queueing act on it thereafter. WFQ can speed up handling for high precedence traffic at congestion points. WRED ensures that high precedence traffic has lower loss rates than other traffic during times of congestion.

The mapping from keywords such as routine and priority to a precedence value is useful only in some instances. That is, the use of the precedence bit is evolving. The customer can define the meaning of a precedence value by enabling other features that use the value. In the case of Cisco high-end Internet quality of service (QoS), IP precedences can be used to establish classes of service that do not necessarily correspond numerically to better or worse handling in the network. For example, IP Precedence 2 can be given 90 percent of the bandwidth on output links in the network, and IP Precedence 6 can be given 5 percent using the distributed weight fair queueing (DWFQ) implementation on the Versatile Interface Processors (VIPs).

Use the route-map global configuration command with 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 a list of match and set commands associated with it. 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 the match criteria of a route map are met. When all match criteria are met, all set actions are performed.

Examples

The following example sets the IP Precedence value to 5 (critical) for packets that pass the route map match:

interface serial 0
 ip policy route-map texas
!
route-map texas
 match length 68 128
 set ip precedence 5

Related Commands

Command
Description

fair-queue (WFQ)

Enables WFQ for an interface.

ip policy route-map

Identifies a route map to use for policy routing on an interface.

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.


set level (IP)

To indicate where to import routes, use the set level command in route-map configuration mode. To delete an entry, use the no form of this command.

set level {level-1 | level-2 | level-1-2 | stub-area | backbone}

no set level {level-1 | level-2 | level-1-2 | stub-area | backbone}

Syntax Description

level-1

Imports routes into a Level 1 area.

level-2

Imports routes into a Level 2 subdomain.

level-1-2

Imports routes into Level 1 and Level 2.

stub-area

Imports routes into an Open Shortest Path First (OSPF) not-so-stubby area (NSSA) area.

backbone

Imports routes into an OSPF backbone area.


Defaults

This command is disabled by default.

For Intermediate System-to-Intermediate System (IS-IS) destinations, the default value is level-2. For OSPF destinations, the default value is backbone.

Command Modes

Route-map configuration

Command History

Release
Modification

10.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.

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

In the following example, routes will be imported into the Level 1 area:

route-map name
 set level level-l

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 local-preference

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.

set local-preference number-value

no set local-preference number-value

Syntax Description

number-value

Preference value. An integer from 0 to 4294967295.


Defaults

Preference value of 100

Command Modes

Route-map configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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 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.

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

Examples

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

route-map map-preference
 match as-path 1
 set local-preference 100

Related Commands

Command
Description

bgp default local-preference

Changes the default local preference value.

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 metric (BGP, OSPF, RIP)

To set the metric value for a routing protocol, use the set metric command in route-map configuration mode. To return to the default metric value, use the no form of this command.

set metric metric-value

no set metric metric-value

Syntax Description

metric-value

Metric value; an integer from -294967295 to 294967295. This argument applies to all routing protocols except Interior Gateway Routing Protocol (IGRP) and Enhanced Interior Gateway Routing Protocol (EIGRP).


Defaults

The dynamically learned metric value.

Command Modes

Route-map configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

We recommend that you consult your Cisco technical support representative before changing the default value.

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 sets the metric value for the routing protocol to 100:

route-map set-metric
 set metric 100

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 metric (EIGRP)

To set the metric value for Enhanced Interior Gateway Routing Protocol (EIGRP) in a route map, use the set metric route-map configuration command. To return to the default metric value, use the no form of this command.

set metric bandwidth delay reliability loading mtu

no set metric bandwidth delay reliability loading mtu

Syntax Description

bandwidth

Metric value or EIGRP bandwidth of the route in kbps. The range is from 0 to 4294967295.

delay

Route delay (in tens of microseconds). It can be in the range from 0 to 4294967295.

reliability

Likelihood of successful packet transmission expressed as a number from 0 to 255. The value 255 means 100 percent reliability; 0 means no reliability.

loading

Effective bandwidth of the route expressed as a number from 0 to 255 (255 is 100 percent loading).

mtu

Minimum maximum transmission unit (MTU) size of the route, in bytes. It can be in the range from 0 to 4294967295.


Defaults

No metric will be set in the route map.

Command Modes

Route-map configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

We recommend you consult your Cisco technical support representative before changing the default value.

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 for a router are met. When all match criteria are met, all set actions are performed.

Examples

The following example sets the bandwidth to 10,000, the delay to 10, the reliability to 255, the loading to 1, and the MTU to 1500:

set metric 10000 10 255 1 1500

set metric-type

To set the metric type for the destination routing protocol, use the set metric-type command in route-map configuration mode. To return to the default, use the no form of this command.

set metric-type {internal | external | type-1 | type-2}

no set metric-type {internal | external | type-1 | type-2}

Syntax Description

internal

Intermediate System-to-Intermediate System (IS-IS) internal metric, or IGP metric as the MED for BGP.

external

IS-IS external metric.

type-1

Open Shortest Path First (OSPF) external Type 1 metric.

type-2

OSPF external Type 2 metric.


Defaults

This command is disabled by default.

Command Modes

Route-map configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Use the route-map global configuration command with 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.


Note This command is not supported for redistributing routes into Border Gateway Protocol (BGP).


Examples

The following example sets the metric type of the destination protocol to OSPF external Type 1:

route-map map-type
 set metric-type type-1

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.


set metric-type internal

To set the Multi Exit Discriminator (MED) value on prefixes advertised to external BGP (eBGP) neighbors to match the Interior Gateway Protocol (IGP) metric of the next hop, use the set metric-type internal command in route-map configuration mode. To return to the default, use the no form of this command.

set metric-type internal

no set metric-type internal

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.3

This command was introduced.


Usage Guidelines

This command will cause BGP to advertise a MED value that corresponds to the IGP metric associated with the next hop of the route. This command applies to generated, internal BGP (iBGP)-, and eBGP-derived routes.

If this command is used, multiple BGP speakers in a common autonomous system can advertise different MED values for a particular prefix. Also, note that if the IGP metric changes, BGP will readvertise the route every 10 minutes.

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 the route map are met. When all match criteria are met, all set actions are performed.


Note This command is not supported for redistributing routes into Border Gateway Protocol (BGP).


Examples

In the following example, the MED value for all the advertised routes to neighbor 172.16.2.3 is set to the corresponding IGP metric of the next hop:

router bgp 109
 network 172.16.0.0
 neighbor 172.16.2.3 remote-as 200
 neighbor 172.16.2.3 route-map setMED out
!
route-map setMED permit 10
 match as-path 1
 set metric-type internal
!
 ip as-path access-list 1 permit .*

Related Commands

Command
Description

route-map (IP)

Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.


set next-hop

To specify the address of the next hop, use the set next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.

set next-hop next-hop

no set next-hop next-hop

Syntax Description

next-hop

IP address of the next hop router.


Defaults

Default next hop address.

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 the router are met. When all match criteria are met, all set actions are performed.

Examples

In the following example, routes that pass the access list have the next hop set to 172.160.70.24:

route-map map_hop
 match address 5
 set next-hop 172.160.70.24

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.


set origin (BGP)

To set the BGP origin code, use the set origin command in route-map configuration mode. To delete an entry, use the no form of this command.

set origin {igp | egp as-number | incomplete}

no set origin {igp | egp as-number | incomplete}

Syntax Description

igp

Remote Interior Gateway Protocol (IGP) system.

egp

Local Exterior Gateway Protocol (EGP) system.

as-number

Remote autonomous system number. This is an integer from 0 to 65535.

incomplete

Unknown heritage.


Defaults

Default origin, based on route in main IP routing table

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 of the match criteria of a route map are met. When all match criteria are met, all set actions are performed.

Examples

The following example sets the origin of routes that pass the route map to IGP:

route-map set_origin
 match as-path 10
 set origin igp

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.


set tag (IP)

To set a tag value of the destination routing protocol, use the set tag command in route-map configuration mode. To delete the entry, use the no form of this command.

set tag tag-value

no set tag tag-value

Syntax Description

tag-value

Name for the tag. Integer from 0 to 4294967295.


Defaults

If not specified, the default action is to forward the tag in the source routing protocol onto the new destination protocol.

Command Modes

Route-map configuration

Command History

Release
Modification

10.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.

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 sets the tag value of the destination routing protocol to 5:

route-map tag
 set tag 5

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.


set traffic-index

To indicate where to output packets that pass a match clause of a route map for Border Gateway Protocol (BGP) policy accounting, use the set traffic-index command in route-map configuration mode. To delete an entry, use the no form of this command.

set traffic-index bucket-number

no set traffic-index bucket-number

Syntax Description

bucket-number

Number, in the range from 1 to 8, representing a bucket into which packet and byte statistics are collected for a specific traffic classification.


Defaults

Routing traffic is not classified.

Command Modes

Route-map configuration

Command History

Release
Modification

12.0(9)S

This command was introduced.

12.0(17)ST

This command was integrated into Cisco IOS Release 12.0(17)ST.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T.


Usage Guidelines

Use the set traffic-index route-map configuration command, the route-map global configuration command, and the match route-map configuration command to define the conditions for BGP policy accounting. The match commands specify the match criteria—the conditions under which policy routing occurs. The set traffic-index command specifies the set actions—the particular routing actions to perform if the criteria enforced by the match commands are met.

Examples

In the following example, an index for BGP policy accounting is set according to autonomous system path criteria:

route-map buckets permit 10
 match as-path 1
 set traffic-index 1

Related Commands

Command
Description

bgp-policy

Enables BGP policy accounting or policy propagation on an interface.

route-map

Defines the conditions for redistributing routes from one routing protocol to another, or enables policy routing.


set weight

To specify the BGP weight for the routing table, use the set weight command in route-map configuration mode. To delete an entry, use the no form of this command.

set weight number

no set weight number

Syntax Description

number

Weight value. It can be an integer ranging from 0 to 65535.


Defaults

The weight is not changed by the specified route map.

Command Modes

Route-map configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

The implemented weight is based on the first matched autonomous system path. Weights indicated when an autonomous system path is matched override the weights assigned by global neighbor commands. In other words, the weights assigned with the set weight route-map configuration command override the weights assigned using the neighbor weight command.

Examples

The following example sets the BGP weight for the routes matching the autonomous system path access list to 200:

route-map set-weight
 match as-path 10
 set weight 200

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.

Command
Description

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.


set-attached-bit

To specify constraints for when a Level 1 - Level 2 (L1L2) router should set its attached-bit, use the set-attached-bit route-map command in router configuration mode. To disable this function, use the no form of this command.

set-attached-bit route-map map-tag

no set-attached-bit route-map map-tag

Syntax Description

route-map map-tag

(Required) Identifier of a configured route map. If the specified route map is matched, the router continues to set its attached-bit.


Defaults

This command is disabled by default.

Command Modes

Router configuration

Command History

Release
Modification

12.2

This command was introduced.

12.2(4)B

This command was integrated into Cisco IOS Release 12.2(4)B.

12.2(14)S

This command was integrated into Cisco IOS Release 12.2(14)S.


Usage Guidelines

In the current IS-IS implementation, as specified in ISO 10589, L1L2 routers set their Level 1 (L1) link-state packet (LSP) attached-bit when they see other areas in their own domain, or see other domains. However, in some network topologies, adjacent L1L2 routers in different areas may lose connectivity to the Level 2 (L2) backbone. Level 1 (L1) routers may then send traffic destined outside of the area or domain to L1L2 routers that may not have such connectivity.

To allow more control over the attached-bit setting for L1L2 routers, enter the set-attached-bit command in router configuration mode. The route map can specify one or more CLNS routes. If at least one of the match address route-map clauses matches a route in the L2 CLNS routing table, and if all other requirements for setting the attached-bit are met, the L1L2 router will continue to set the attached-bit in its L1 LSP. If the requirements are not met or no match address route-map clauses match a route in the L2 CLNS routing table, the attached-bit will not be set.


Note Wildcarded matches are not supported. For each route-map statement, an exact route lookup of the specified route will be performed. The first matched route will have other match statements applied.


Examples

In the following example, the attached-bit will stay set when the router matches 49.00aa in the L2 CLNS routing table.

clns filter-set L2_backbone_connectivity permit 49.00aa
route-map check-for-L2_backbone_connectivity
 match clns address L2_backbone_connectivity
router isis
 set-attached-bit route-map check-for-L2_backbone_connectivity
end
show clns route 49.00aa

Known via "isis", distance 110, metric 30, Dynamic Entry
Routing Descriptor Blocks:
 via tr2, Serial0
   isis, route metric is 30, route version is 58

Related Commands

Command
Description

route-map

Defines the conditions for redistributing routes from one routing protocol into another.

show clns route

Displays one or all of the destinations to which a router knows how to route CLNS packets.


set-overload-bit

To configure the router to signal other routers not to use it as an intermediate hop in their shortest path first (SPF) calculations, use the set-overload-bit command in router configuration mode. To remove the designation, use the no form of this command.

set-overload-bit [on-startup {seconds | wait-for-bgp}] [suppress {[interlevel] [external]}]

no set-overload-bit

Syntax Description

on-startup

(Optional) Sets the overload bit upon the system starting up. The overload bit remains set for the number of seconds configured or until BGP has converged, depending on the subsequent argument or keyword specified.

seconds

(Optional) When the on-startup keyword is configured, causes the overload bit to be set upon system startup and remain set for the specified number of seconds. The range is from 5 to 86400 seconds.

wait-for-bgp

(Optional) When the on-startup keyword is configured, causes the overload bit to be set upon system startup and remain set until BGP has converged.

suppress

(Optional) Causes the type of prefix identified by the subsequent keyword or keywords to be suppressed.

interlevel

(Optional) When the suppress keyword is configured, prevents the IP prefixes learned from another IS-IS level from being advertised.

external

(Optional) When the suppress keyword is configured, prevents the IP prefixes learned from other protocols from being advertised.


Defaults

The overload bit is not set.

Command Modes

Router configuration

Command History

Release
Modification

11.2

This command was introduced.

11.3(2)

The on-startup keyword and the seconds argument were added.

12.0(7)S

The wait-for-bgp keyword was added.

12.1(9)

The wait-for-bgp keyword was added.

12.2(2)

The wait-for-bgp keyword was added.

12.0(21)ST

The suppress, interlevel, and external keywords were added.

12.2(8)

The suppress, interlevel, and external keywords were added.


Usage Guidelines

This command forces the router to set the overload bit (also known as the hippity bit) in its nonpseudonode link-state packets (LSPs). Normally, the setting of the overload bit is allowed only when a router runs into problems. For example, when a router is experiencing a memory shortage, it might be that the link-state database is not complete, resulting in an incomplete or inaccurate routing table. By setting the overload bit in its LSPs, other routers can ignore the unreliable router in their SPF calculations until the router has recovered from its problems.

The result will be that no paths through this router are seen by other routers in the IS-IS area. However, IP and Connectionless Network Service (CLNS) prefixes directly connected to this router will still be reachable.

This command can be useful when you want to connect a router to an IS-IS network but do not want real traffic flowing through it under any circumstances. Examples situations are as follows:

A test router in the lab, connected to a production network.

A router configured as an LSP flooding server, for example, on a nonbroadcast multiaccess (NBMA) network, in combination with the mesh group feature.

A router that is aggregating virtual circuits (VCs) used only for network management. In this case, the network management stations must be on a network directly connected to the router with the set-overload-bit command configured.

Unless you specify the on-startup keyword, this command sets the overload bit immediately.

In addition to setting the overload bit, you might want to suppress certain types of IP prefix advertisements from LSPs. For example, allowing IP prefix propagation between Level 1 and Level 2 effectively makes a node a transit node for IP traffic, which might be undesirable. The suppress keyword used with the interlevel or external keyword (or both) accomplishes that suppression while the overload bit is set.

Examples

The following example sets the overload bit upon startup and until BGP has converged, and suppresses redistribution between IS-IS levels and suppresses redistribution from external routing protocols while the overload bit is set:

interface Ethernet0
 ip address 10.1.1.1 255.255.255.0
 ip router isis
router isis
 net 49.0001.0000.0000.0001.00
 set-overload-bit on-startup wait-for-bgp suppress interlevel external
router bgp 100