Table Of Contents
redistribute (IP)
route-map (IP)
send-lifetime
set automatic-tag
set default interface
set interface
set ip default next-hop
set ip default next-hop verify-availability
set ip next-hop
set ip next-hop verify-availability
set ip precedence
set level (IP)
set local-preference
set metric (BGP, OSPF, RIP)
set metric-type
set next-hop
set tag (IP)
show ip cache policy
show ip local policy
show ip policy
show ip protocols
show ip route
show ip route profile
show ip route summary
show ip route supernets-only
show key chain
show route-map
show route-map ipc
traffic-share min
redistribute (IP)
To redistribute routes from one routing domain into another routing domain, use the redistribute command in router configuration mode. To disable redistribution, use the no form of this command.
redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [as-number] [metric
{metric-value | transparent}] [metric-type type-value] [match {internal | external 1 |
external 2}]
[tag tag-value] [route-map map-tag] [subnets]
no redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [as-number] [metric
{metric-value | transparent}] [metric-type type-value] [match {internal | external 1 |
external 2}] [tag tag-value] [route-map map-tag] [subnets]
Syntax Description
protocol
|
Source protocol from which routes are being redistributed. It can be one of the following keywords: bgp, connected, eigrp, isis, mobile, ospf, static [ip], or rip.
The static [ip] keyword is used to redistribute IP static routes. The optional ip keyword is used when redistributing into the Intermediate System-to-Intermediate System (IS-IS) protocol.
The connected keyword refers to routes that are established automatically by virtue of having enabled IP on an interface. For routing protocols such as Open Shortest Path First (OSPF) and IS-IS, these routes will be redistributed as external to the autonomous system.
|
process-id
|
(Optional) For the bgp or eigrp keyword, this is an autonomous system number, which is a 16-bit decimal number.
For the isis keyword, this is an optional tag value that defines a meaningful name for a routing process. You can specify only one IS-IS process per router. Creating a name for a routing process means that you use names when configuring routing.
For the ospf keyword, this is an appropriate OSPF process ID from which routes are to be redistributed. This identifies the routing process. This value takes the form of a nonzero decimal number.
For the rip keyword, no process-id value is needed.
|
level-1
|
Specifies that for IS-IS Level 1 routes are redistributed into other IP routing protocols independently.
|
level-1-2
|
Specifies that for IS-IS both Level 1 and Level 2 routes are redistributed into other IP routing protocols.
|
level-2
|
Specifies that for IS-IS Level 2 routes are redistributed into other IP routing protocols independently.
|
as-number
|
(Optional) Autonomous system number for the redistributed route.
|
metric metric-value
|
(Optional) When redistributing from one OSPF process to another OSPF process on the same router, the metric will be carried through from one process to the other if no metric value is specified. When redistributing other processes to an OSPF process, the default metric is 20 when no metric value is specified.
|
transparent
|
(Optional) Causes RIP to use the routing table metric for redistributed routes as the RIP metric.
|
metric-type type-value
|
(Optional) For OSPF, the external link type associated with the default route advertised into the OSPF routing domain. It can be one of two values:
• 1—Type 1 external route
• 2—Type 2 external route
If a metric-type is not specified, the Cisco IOS software adopts a Type 2 external route.
For IS-IS, it can be one of two values:
• internal—IS-IS metric that is < 63.
• external—IS-IS metric that is > 64 < 128.
The default is internal.
|
match {internal | external 1 | external 2}
|
(Optional) For the criteria by which OSPF routes are redistributed into other routing domains. It can be one of the following:
• internal—Routes that are internal to a specific autonomous system.
• external 1—Routes that are external to the autonomous system, but are imported into OSPF as Type 1 external route.
• external 2—Routes that are external to the autonomous system, but are imported into OSPF as Type 2 external route.
|
tag tag-value
|
(Optional) 32-bit decimal value attached to each external route. This is not used by OSPF itself. It may be used to communicate information between Autonomous System Boundary Routers (ASBRs). If none is specified, then the remote autonomous system number is used for routes from Border Gateway Protocol (BGP) and Exterior Gateway Protocol (EGP); for other protocols, zero (0) is used.
|
route-map
|
(Optional) Route map that should be interrogated to filter the importation of routes from this source routing protocol to the current routing protocol. If not specified, all routes are redistributed. If this keyword is specified, but no route map tags are listed, no routes will be imported.
|
map-tag
|
(Optional) Identifier of a configured route map.
|
subnets
|
(Optional) For redistributing routes into OSPF, the scope of redistribution for the specified protocol.
|
Command Default
Route redistribution is disabled.
protocol: No source protocol is defined.
process-id: No process ID is defined.
metric metric-value: 0
metric-type type-value: Type 2 external route
match internal | external: Internal, external 1, external 2
external: Internal
tag tag-value: If no value is specified, the remote autonomous system number is used for routes from BGP and EGP; for other protocols, the default is 0.
route-map map-tag: If the route-map keyword is not entered, all routes are redistributed; if no map-tag value is entered, no routes are imported.
subnets: No subnets are defined.
Command Modes
Router configuration
Address family configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
12.0(5)T
|
Address family configuration mode was added.
|
12.0(22)S
|
Address family support under EIGRP was added in Cisco IOS Release 12.0(22)S.
|
12.2(15)T
|
Address family support under EIGRP was added in Cisco IOS Release 12.2(15)T.
|
12.2(18)S
|
Address family support under EIGRP was added.
|
12.2(27)SBC
|
This command was integrated into Cisco IOS Release 12.2(27)SBC.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
Usage Guidelines
Changing or disabling any keyword will not affect the state of other keywords.
A router receiving a link-state protocol with an internal metric will consider the cost of the route from itself to the redistributing router plus the advertised cost to reach the destination. An external metric only considers the advertised metric to reach the destination.
Routes learned from IP routing protocols can be redistributed at Level 1 into an attached area or at Level 2. The level-1-2 keyword allows both Level 1 and Level 2 routes in a single command.
Redistributed routing information must be filtered by the distribute-list out router configuration command. This guideline ensures that only those routes intended by the administrator are passed along to the receiving routing protocol.
Whenever you use the redistribute or the default-information router configuration commands to redistribute routes into an OSPF routing domain, the router automatically becomes an ASBR. However, an ASBR does not, by default, generate a default route into the OSPF routing domain.
When routes are redistributed into OSPF from protocols other than OSPF or BGP, and no metric has been specified with the metric-type keyword and type-value argument, OSPF will use 20 as the default metric. When routes are redistributed into OSPF from BGP, OSPF will use 1 as the default metric. When routes are redistributed from one OSPF process to another OSPF process, Autonomous system (AS) external and not-so-stubby-area (NSSA) routes will use 20 as the default metric. When intra-area and inter-area routes are redistributed between OSPF processes, the internal OSPF metric from the redistribution source process is advertised as the external metric in the redistribution destination process. (This is the only case in which the routing table metric will be preserved when routes are redistributed into OSPF.)
When routes are redistributed into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.
Routes configured with the connected keyword affected by this redistribute command are the routes not specified by the network router configuration command.
You cannot use the default-metric command to affect the metric used to advertise connected routes.
Note
The metric value specified in the redistribute command supersedes the metric value specified using the default-metric command.
Default redistribution of IGPs or EGP into BGP is not allowed unless the default-information originate router configuration command is specified.
Examples
The following example shows how OSPF routes are redistributed into a BGP domain:
The following example causes Enhanced Interior Gateway Routing Protocol (EIGRP) routes to be redistributed into an OSPF domain:
The following example causes the specified EIGRP process routes to be redistributed into an OSPF domain. The EIGRP-derived metric will be remapped to 100 and RIP routes to 200.
redistribute eigrp 108 metric 100 subnets
redistribute rip metric 200 subnets
The following example configures BGP routes to be redistributed into IS-IS. The link-state cost is specified as 5, and the metric type will be set to external, indicating that it has lower priority than internal metrics.
redistribute bgp 120 metric 5 metric-type external
In the following example, network 172.16.0.0 will appear as an external link-state advertisement (LSA) in OSPF 1 with a cost of 100 (the cost is preserved):
ip address 172.16.0.1 255.0.0.0
ip address 10.0.0.1 255.0.0.0
network 10.0.0.0 0.255.255.255 area 0
redistribute ospf 2 subnet
network 172.16.0.0 0.255.255.255 area 0
Related Commands
Command
|
Description
|
address-family ipv4 (BGP)
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.
|
address-family vpnv4
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.
|
default-information originate (BGP)
|
Allows the redistribution of network 0.0.0.0 into BGP.
|
default-information originate (IS-IS)
|
Generates a default route into an IS-IS routing domain.
|
default-information originate (OSPF)
|
Generates a default route into an OSPF routing domain.
|
distribute-list out (IP)
|
Suppresses networks from being advertised in updates.
|
route-map (IP)
|
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing.
|
show route-map
|
Displays all route maps configured or only the one specified.
|
route-map (IP)
To define the conditions for redistributing routes from one routing protocol into another, or to enable policy routing, use the route-map command in global configuration mode and the match and set command in route-map configuration modes. To delete an entry, use the no form of this command.
route-map map-tag [permit | deny] [sequence-number]
no route-map map-tag [permit | deny] [sequence-number]
Syntax Description
map-tag
|
Defines a meaningful name for the route map. The redistribute router configuration command uses this name to reference this route map. Multiple route maps may share the same map tag name.
|
permit
|
(Optional) If the match criteria are met for this route map, and the permit keyword is specified, the route is redistributed as controlled by the set actions. In the case of policy routing, the packet is policy routed.
If the match criteria are not met, and the permit keyword is specified, the next route map with the same map tag is tested. If a route passes none of the match criteria for the set of route maps sharing the same name, it is not redistributed by that set.
The permit keyword is the default.
|
deny
|
(Optional) If the match criteria are met for the route map and the deny keyword is specified, the route is not redistributed. In the case of policy routing, the packet is not policy routed, and no further route maps sharing the same map tag name will be examined. If the packet is not policy routed, the normal forwarding algorithm is used.
|
sequence-number
|
(Optional) Number that indicates the position a new route map will have in the list of route maps already configured with the same name. If given with the no form of this command, the position of the route map should be deleted.
|
Defaults
No default is available.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
Use route maps to redistribute routes or to subject packets to policy routing. Both purposes are described in this section.
Redistribution
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 match route-map configuration command has multiple formats. The match commands can be given in any order, and all match commands must "pass" to cause the route to be redistributed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.
Use route maps when you want detailed control over how routes are redistributed between routing processes. The destination routing protocol is the one you specify with the router global configuration command. The source routing protocol is the one you specify with the redistribute router configuration command. See the "Examples" section for an illustration of how route maps are configured.
When you are passing routes through a route map, a route map can have several parts. Any route that does not match at least one match clause relating to a route-map command will be ignored; that is, the route will not be advertised for outbound route maps and will not be accepted for inbound route maps. If you want to modify only some data, you must configure a second route map section with an explicit match specified.
Policy Routing
Another purpose of route maps is to enable policy routing. Use the ip policy route-map command, in addition to the route-map command, and the match and set commands to define the conditions for policy routing packets. The match commands specify the conditions under which policy routing occurs. The set commands specify the routing actions to perform if the criteria enforced by the match commands are met. You might want to policy route packets some way other than the obvious shortest path.
The sequence-number argument works as follows:
1.
If no entry is defined with the supplied tag, an entry is created with the sequence-number argument set to 10.
2.
If only one entry is defined with the supplied tag, that entry becomes the default entry for the following route-map command. The sequence-number argument of this entry is unchanged.
3.
If more than one entry is defined with the supplied tag, an error message is printed to indicate that the sequence-number argument is required.
If the no route-map map-tag command is specified (with no sequence-number argument), the whole route map is deleted.
Examples
The following example redistributes Routing Information Protocol (RIP) routes with a hop count equal to 1 into Open Shortest Path First (OSPF). These routes will be redistributed into OSPF as external link-state advertisements (LSAs) with a metric of 5, metric type of Type 1, and a tag equal to 1.
redistribute rip route-map rip-to-ospf
route-map rip-to-ospf permit
Related Commands
Command
|
Description
|
ip policy route-map
|
Identifies a route map to use for policy routing on an interface.
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community-list
|
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 length
|
Bases policy routing on the Level 3 length of a packet.
|
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.
|
set as-path
|
Modifies an autonomous system path for BGP routes.
|
set automatic-tag
|
Automatically computes the tag value.
|
set community
|
Sets the BGP communities attribute.
|
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 a 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 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.
|
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 key chain key configuration command. To revert to the default value, use the no form of this command.
send-lifetime start-time {infinite | end-time | duration seconds}
no send-lifetime [start-time {infinite | end-time | duration seconds}]
Syntax Description
start-time
|
Beginning time that the key specified by the key command is valid to be sent. The syntax can be either of the following:
hh:mm:ss Month date year
hh:mm:ss date Month year
hh—hours
mm—minutes
ss—seconds
Month—first three letters of the month
date—date (1-31)
year—year (four digits)
The default start time and the earliest acceptable date is January 1, 1993.
|
infinite
|
Key is valid to be sent from the start-time value on.
|
end-time
|
Key is valid to be sent from the start-time value until the end-time value. The syntax is the same as that for the start-time value. The end-time value must be after the start-time value. The default end time is an infinite time period.
|
duration seconds
|
Length of time (in seconds) that the key is valid to be sent.
|
Defaults
Forever (the starting time is January 1, 1993, and the ending time is infinite)
Command Modes
Key chain key configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Specify a start-time value and one of the following values: infinite, end-time, or duration seconds.
We recommend running Network Time Protocol (NTP) or some other time synchronization method if you intend to set lifetimes on keys.
If the last key expires, authentication will continue and an error message will be generated. To disable authentication, you must manually delete the last valid key.
Examples
The following example configures a key chain called trees. The key named chestnut will be accepted from 1:30 p.m. to 3:30 p.m. and be sent from 2:00 p.m. to 3:00 p.m. The key named birch will be accepted from 2:30 p.m. to 4:30 p.m. and be sent from 3:00 p.m. to 4:00 p.m. The overlap allows for migration of keys or discrepancies in the set time of the router. There is a 30-minute leeway on each side to handle time differences.
ip rip authentication key-chain trees
ip rip authentication mode md5
accept-lifetime 13:30:00 Jan 25 1996 duration 7200
send-lifetime 14:00:00 Jan 25 1996 duration 3600
accept-lifetime 14:30:00 Jan 25 1996 duration 7200
send-lifetime 15:00:00 Jan 25 1996 duration 3600
Related Commands
Command
|
Description
|
accept-lifetime
|
Sets the time period during which the authentication key on a key chain is received as valid.
|
key
|
Identifies an authentication key on a key chain.
|
key chain
|
Enables authentication for routing protocols.
|
key-string (authentication)
|
Specifies the authentication string for a key.
|
show key chain
|
Displays authentication key information.
|
set automatic-tag
To automatically compute the tag value, use the set automatic-tag command in route-map configuration mode. To disable this function, use the no form of this command.
set automatic-tag
no set automatic-tag
Syntax Description
This command has no arguments or keywords.
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
You must have a match clause (even if it points to a "permit everything" list) if you want to set tags.
Use the route-map global configuration command, and the match and set route-map configuration commands, to define the conditions for redistributing routes from one routing protocol into another. Each route-map command has a list of match and set commands associated with it. The match commands specify the match criteria—the conditions under which redistribution is allowed for the current route-map command. The set commands specify the set actions—the particular redistribution actions to perform if the criteria enforced by the match commands are met. The no route-map command deletes the route map.
The set route-map configuration commands specify the redistribution set actions to be performed when all the match criteria of a route map are met. When all match criteria are met, all set actions are performed.
Examples
The following example configures the Cisco IOS software to automatically compute the tag value for the Border Gateway Protocol (BGP) learned routes:
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community-list
|
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 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:
ip policy route-map brighton
set default interface ethernet 0
Related Commands
Command
|
Description
|
ip policy route-map
|
Identifies a route map to use for policy routing on an interface.
|
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 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.
Note
The set interface command is supported only over a point-to-point link, unless a route-cache entry exists using the same interface specified in the set interface command in the route map.
Examples
In the following example, packets with a Level 3 length of 3 to 50 bytes are output to Ethernet interface 0:
ip policy route-map testing
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
ip policy route-map equal-access
route-map equal-access permit 10
set ip default next-hop 172.16.6.6
route-map equal-access permit 20
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 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. 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 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 causes the 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:
ip policy route-map thataway
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 verify-availability
To configure policy routing to verify if the next hops of a route map are Cisco Discovery Protocol (CDP) neighbors before policy routing to those next hops, 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