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.