Table Of Contents
IP Routing Protocol-Independent Commands
accept-lifetime
distance (IP)
distribute-list in (IP)
distribute-list out (IP)
ip default-network
ip local policy route-map
ip policy route-map
ip route
ip route profile
key
key chain
key-string (authentication)
match interface (IP)
match ip address
match ip next-hop
match ip route-source
match length
match metric (IP)
match route-type (IP)
match tag
maximum-paths
passive-interface
redistribute (IP)
route-map (IP)
send-lifetime
set automatic-tag
set default interface
set interface
set ip default next-hop
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
IP Routing Protocol-Independent Commands
Use the commands in this chapter to configure and monitor the features that are routing protocol-independent. For configuration information and examples on IP routing protocol-independent features, refer to the "Configuring IP Routing Protocol-Independent Features" chapter of the Cisco IOS IP and IP Routing Configuration Guide.
accept-lifetime
To set the time period during which the authentication key on a key chain is received as valid, use the accept-lifetime key chain key configuration command. To revert to the default value, use the no form of this command.
accept-lifetime start-time {infinite | end-time | duration seconds}
no accept-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 received. 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
date—date (1-31)
Month—first three letters of the month
year—year (four digits)
The default start time and the earliest acceptable date is January 1, 1993.
|
infinite
|
Key is valid to be received from the start-time on.
|
end-time
|
Key is valid to be received from the start-time until end-time. The end-time must be after the start-time. The syntax is the same as that for start-time. The default end time is an infinite time period.
|
duration seconds
|
Length of time (in seconds) that the key is valid to be received.
|
Defaults
Forever (Starting time is January 1, 1993, and ending time is infinite.)
Command Modes
Key chain key configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Only DRP Agent, IP Enhanced Interior Gateway Routing Protocol (IGRP), and Routing Information Protocol (RIP) Version 2 use key chains.
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 assign a lifetime to a key.
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
In the following example, 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:40 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 router's set time. There is a half-hour 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
distance (IP)
To define an administrative distance, use the distance command in router configuration mode. To remove a distance definition, use the no form of this command.
distance {ip-address {ip-address mask}} [ip standard list] [ip extended list]
no distance {ip-address {ip-address mask}} [ip standard list] [ip extended list]
Syntax Description
address
|
IP address in four-part, dotted notation.
|
mask
|
IP address mask in four-part, dotted-decimal format. A bit set to 1 in the mask argument instructs the software to ignore the corresponding bit in the address value.
|
ip standard ip extended
|
(Optional) Number or name of a standard or extended IP access list to be applied to incoming routing updates.
|
Defaults
Table 87 lists default administrative distances.
Table 87 Default Administrative Distances
Route Source
|
Default Distance
|
Connected interface
|
0
|
Static route
|
1
|
EIGRP summary route
|
5
|
External BGP
|
20
|
Internal EIGRP
|
90
|
IGRP
|
100
|
OSPF
|
110
|
IS-IS
|
115
|
RIP
|
120
|
EGP
|
140
|
EIGRP external route
|
170
|
Internal BGP
|
200
|
Unknown
|
255
|
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The access-list-number | name argument was added.
|
11.3
|
The access-list-number | name argument was removed.
|
11.3
|
The ip keyword was removed.
|
12.0
|
The ip standard | extended list arguments were added.
|
Usage Guidelines
Numerically, an administrative distance is an integer between 0 and 255. In general, the higher the value, the lower the trust rating. An administrative distance of 255 means the routing information source cannot be trusted at all and should be ignored.
When the optional access list number is used with this command, it is applied when a network is being inserted into the routing table. This behavior allows filtering of networks according to the IP address of the router supplying the routing information. This could be used, as an example, to filter out possibly incorrect routing information from routers not under your administrative control.
For BGP, the distance command sets the administrative distance of the External BGP route.
The show ip protocols EXEC command displays the default administrative distance for a specified routing process.
Always set the administrative distance from the least to the most specific network.
Note
The weight of a route can no longer be set with the distance command. To set the weight for a route, use a route-map.
Examples
In the following example, the router igrp global configuration command sets up IGRP routing in autonomous system number 109. The network router configuration commands specify IGRP routing on networks 192.168.7.0 and 172.16.0.0. The first distance router configuration command sets the default administrative distance to 255, which instructs the Cisco IOS software to ignore all routing updates from routers for which an explicit distance has not been set. The second distance command sets the administrative distance for all routers on the Class C network 192.168.7.0 to 90. The third distance command sets the administrative distance for the router with the address 172.16.1.3 to 120.
distance 90 192.168.7.0 0.0.0.255
distance 120 172.16.1.3 0.0.0.0
Note
In this example, the distance command specifies an administrative distance of 255 for networks 192. 31.7.0 and 172.16.0.0. The second distance command specifies an administrative distance of 90 for network 192.168.7.0. The third distance command specifies an administrative distance of 120 for network 172.16.0.0.
In the following example, the set distance is from the least to the most specific network.
distance 33 10.11.0.0 0.0.255.255
distance 44 10.11.12.0 0.0.0.255
Note
In this example, adding distance 255 to the end of the list would override the distance values for all networks within the range specified in the example. The result is that the distance values are set to 255.
Related Commands
Command
|
Description
|
distance bgp
|
Allows the use of external, internal, and local administrative distances that could be a better route to a node.
|
distribute-list in (IP)
To filter networks received in updates, use the distribute-list in command in router configuration mode. To change or cancel the filter, use the no form of this command.
distribute-list {access-list-number | access-list-name} in [type number]
no distribute-list {access-list-number | access-list-name} in [type number]
Syntax Description
access-list-number | access-list-name
|
Standard IP access list number or name. The list defines which networks are to be received and which are to be suppressed in routing updates.
|
in
|
Applies the access list to incoming routing updates.
|
type
|
(Optional) Interface type.
|
number
|
(Optional) Interface number on which the access list should be applied to incoming updates. If no interface is specified, the access list will be applied to all incoming updates.
|
Defaults
This command is disabled by default.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The access-list-name, type, and number arguments were added.
|
Usage Guidelines
This command is not supported in IS-IS or OSPF.
Examples
In the following example, the EIGRP routing process accepts only two networks—network 0.0.0.0 and network 10.108.0.0:
access-list 1 permit 0.0.0.0
access-list 1 permit 10.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
Related Commands
Command
|
Description
|
access-list (IP extended)
|
Defines an extended IP access list.
|
access-list (IP standard)
|
Defines a standard IP access list.
|
distribute-list out (IP)
|
Suppresses networks from being advertised in updates.
|
redistribute (IP)
|
Redistributes routes from one routing domain into another routing domain.
|
distribute-list out (IP)
To suppress networks from being advertised in updates, use the distribute-list out command in router configuration mode. To cancel this function, use the no form of this command.
distribute-list {access-list-number | access-list-name} out [interface-name | routing-process |
autonomous-system-number]
no distribute-list {access-list-number | access-list-name} out [interface-name | routing-process |
autonomous-system-number]
Syntax Description
access-list-number | access-list-name
|
Standard IP access list number or name. The list defines which networks are to be sent and which are to be suppressed in routing updates.
|
out
|
Applies the access list to outgoing routing updates.
|
interface-name
|
(Optional) Name of a particular interface.
|
routing-process
|
(Optional) Name of a particular routing process, or the keyword static or connected.
|
autonomous-system-number
|
(Optional) Autonomous system number.
|
Defaults
This command is disabled by default.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The access-list-name argument was added.
|
Usage Guidelines
When networks are redistributed, a routing process name can be specified as an optional trailing argument to the distribute-list command. This causes the access list to be applied to only those routes derived from the specified routing process. After the process-specific access list is applied, any access list specified by a distribute-list command without a process name argument will be applied. Addresses not specified in the distribute-list command will not be advertised in outgoing routing updates.
Note
To filter networks received in updates, use the distribute-list in command.
Examples
The following example would cause only one network to be advertised by a RIP routing process, network 10.108.0.0:
access-list 1 permit 10.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
The following example applies access list 1 to outgoing routing updates and enables IS-IS on Ethernet interface 0. Only network 10.10.101.0 will be advertised in outgoing IS-IS routing updates.
access-list 1 permit 10.10.101.0 0.0.0.255
Related Commands
Command
|
Description
|
access-list (IP extended)
|
Defines an extended IP access list.
|
access-list (IP standard)
|
Defines a standard IP access list.
|
distribute-list in (IP)
|
Filters networks received in updates.
|
redistribute (IP)
|
Redistributes routes from one routing domain into another routing domain.
|
ip default-network
To select a network as a candidate route for computing the gateway of last resort, use the ip default-network command in global configuration mode. To remove a route, use the no form of this command.
ip default-network network-number
no ip default-network network-number
Syntax Description
network-number
|
Number of the network.
|
Defaults
If the router has a directly connected interface onto the specified network, the dynamic routing protocols running on that router will generate (or source) a default route. For RIP, this is flagged as the pseudonetwork 0.0.0.0; for IGRP, it is the network itself, flagged as an exterior route.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
The Cisco IOS software uses both administrative distance and metric information to determine the default route. Multiple ip default-network commands can be given. All candidate default routes, both static (that is, flagged by the ip default-network command) and dynamic, appear in the routing table preceded by an asterisk.
If the IP routing table indicates that the specified network number is subnetted and a non-zero subnet number is specified, then the system will automatically configure a static summary route. This static summary route is configured instead of a default network. The effect of the static summary route is to cause traffic destined for subnets that are not explicitly listed in the IP routing table to be routed using the specified subnet.
Examples
The following example defines a static route to network 10.0.0.0 as the static default route:
ip route 10.0.0.0 255.0.0.0 10.108.3.4
ip default-network 10.0.0.0
If the following command was issued on a router not connected to network 10.140.0.0, the software might choose the path to that network as a default route when the network appeared in the routing table:
ip default-network 10.140.0.0
Related Commands
Command
|
Description
|
show ip route
|
Displays the current state of the routing table.
|
ip local policy route-map
To identify a route map to use for local policy routing, use the ip local policy route-map command in global configuration mode. To disable local policy routing, use the no form of this command.
ip local policy route-map map-tag
no ip local policy route-map map-tag
Syntax Description
map-tag
|
Name of the route map to use for local policy routing. The name must match a map-tag specified by a route-map command.
|
Defaults
Packets that are generated by the router are not policy routed.
Command Modes
Global configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Packets that are generated by the router are not normally policy routed. However, you can use this command to policy route such packets. You might enable local policy routing if you want packets originated at the router to take a route other than the obvious shortest path.
The ip local policy route-map command identifies a route map to use for local 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 packets should be policy routed. The set commands specify the set actions—the particular policy routing actions to perform if the criteria enforced by the match commands are met. The no ip local policy route-map command deletes the reference to the route map and disables local policy routing.
Examples
The following example sends packets with a destination IP address matching that allowed by extended access list 131 to the router at IP address 172.130.3.20:
ip local policy route-map xyz
set ip next-hop 172.130.3.20
Related Commands
Command
|
Description
|
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
|
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
|
show ip local policy
|
Displays the route map used for local policy routing.
|
ip policy route-map
To identify a route map to use for policy routing on an interface, use the ip policy route-map command in interface configuration mode. To disable policy routing on the interface, use the no form of this command.
ip policy route-map map-tag
no ip policy route-map map-tag
Syntax Description
map-tag
|
Name of the route map to use for policy routing. Must match a map-tag specified by a route-map command.
|
Defaults
No policy routing occurs on the interface.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
You might enable policy routing if you want your packets to take a route other than the obvious shortest path.
The ip policy route-map command identifies a route map to use 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 policy routing is allowed for the interface, based on the destination IP address of the packet. The set commands specify the set actions—the particular policy routing actions to perform if the criteria enforced by the match commands are met. The no ip policy route-map command deletes the pointer to the route map.
Policy routing can be performed on any match criteria that can be defined in an extended IP access list when using the match ip address command and referencing an extended IP access list.
Examples
The following example sends packets with the destination IP address of 172.120.16.18 to a router at IP address 172.130.3.20:
ip policy route-map wethersfield
match ip address 172.120.16.18
set ip next-hop 172.130.3.20
Related Commands
Command
|
Description
|
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
|
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
|
ip route
To establish static routes, use the ip route command in global configuration mode. To remove static routes, use the no form of this command.
ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name]
[permanent] [tag tag]
no ip route prefix mask
Syntax Description
prefix
|
IP route prefix for the destination.
|
mask
|
Prefix mask for the destination.
|
address
|
IP address of the next hop that can be used to reach that network.
|
interface-type interface-number
|
Network interface type and interface number.
|
distance
|
(Optional) An administrative distance.
|
name
|
(Optional)Applies a name to the specified route.
|
permanent
|
(Optional) Specifies that the route will not be removed, even if the interface shuts down.
|
tag tag
|
(Optional) Tag value that can be used as a "match" value for controlling redistribution via route maps.
|
Defaults
No static routes are established.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
A static route is appropriate when the Cisco IOS software cannot dynamically build a route to the destination.
If you specify an administrative distance, you are flagging a static route that can be overridden by dynamic information. For example, IGRP-derived routes have a default administrative distance of 100. To have a static route that would be overridden by an IGRP dynamic route, specify an administrative distance greater than 100. Static routes have a default administrative distance of 1.
Static routes that point to an interface on a connected router will be advertised by way of Routing Information Protocol (RIP), Interior Gateway Routing Protocol (IGRP), and Exterior Gateway Routing Protocol (EIGRP) regardless of whether redistribute static commands were specified for those routing protocols. This situation occurs because static routes that point to an interface are considered in the routing table to be connected and hence lose their static nature. Also, the target of the static route should be included in the network command. If this condition is not met, no dynamic routing protocol will advertise the route unless a redistribute static command is specified for these protocols. With the following configuration:
rtr1 (serial 172.140..188.1/30)--------------> rtr2(Fast Ethernet 172.150.1.1/30) ------>
router [rip | eigrp | igrp]
•
RIP and IGRP redistribute the route if the route is pointing to the Fast Ethernet interface:
ip route 172.140..188.252 255.255.255.252 FastEthernet0/0
RIP and IGRP do not redistribute the route with the following ip route command because of the split horizon algorithm:
ip route 172.140..188.252 255.255.255.252 s2/1
•
EIGRP redistributes the route with both of the following commands:
ip route 172.140..188.252 255.255.255.252 FastEthernet0/0
ip route 172.140..188.252 255.255.255.252 s2/1
With Open Shortest Path First (OSPF), static routes that point to an interface are not advertised unless a redistribute static command is specified.
Adding a static route to an Ethernet or other broadcast interface (for example, ip route 0.0.0.0 0.0.0.0 Ethernet 1/2) will cause the route to be inserted into the routing table only when the interface is up. This configuration is not generally recommended. When the next hop of a static route points to an interface, the router considers each of the hosts within the range of the route to be directly connected through that interface, and therefore it will send ARP requests to any destination addresses that route through the static route.
The practical implication of configuring "ip route 0.0.0.0 0.0.0.0 Ethernet 1/2" is that the router will consider all of the destinations that the router does not know how to reach through some other route as directly connected to Ethernet 1/2. So the router will send an ARP request for each host that it receives packets for on this network segment. This configuration can cause high processor utilization and a very large ARP cache (along with attendant memory allocation failures). Configuring a default route or other static route that directs the router to forward packets for a large range of destinations to a connected broadcast network segment can cause your router to reload.
Specifying a numerical next hop that is on a directly connected interface will prevent the router from using Proxy ARP. However, if the interface with the next hop goes down and the numerical next hop can be reached through a recursive route, you may specify both the next hop and interface (for example, "ip route 0.0.0.0 0.0.0.0 Ethernet1/2 10.1.2.3") with a static route to prevent routes from passing through an unintended interface.
Examples
The following example chooses an administrative distance of 110. In this case, packets for network 10.0.0.0 will be routed through to a router at 172.31.3.4 if dynamic information with administrative distance less than 110 is not available.
ip route 10.0.0.0 255.0.0.0 172.31.3.4 110
Note
Specifying the next hop without specifying an interface when configuring a static route can cause traffic to pass through an unintended interface if the default interface goes down.
The following example routes packets for network 172.31.0.0 to a router at 172.31.6.6:
ip route 172.31.0.0 255.255.0.0 172.31.6.6
The following example routes packets for network 192.168.1.0 directly to the next hop at 10.1.2.3. If the interface goes down, this route is removed from the routing table and will not be restored unless the interface comes back up.
ip route 192.168.1.0 255.255.0.0 Ethernet0 10.1.2.3
ip route profile
To enable IP routing table statistics collection, use the ip route profile command in global configuration mode. To disable collection of routing table statistics, use the no form of the command.
ip route profile
no ip route profile
Syntax Description
This command has no arguments or keywords.
Defaults
The time interval for each sample, or sampling interval, is a fixed value and is set at 5 seconds.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
Usage Guidelines
The ip route profile command helps you to monitor routing table fluctuations that can occur as the result of route flapping, network failure, or network restoration.
This command identifies route flapping over brief time intervals. The time interval for each sample, or sampling interval, is a fixed value and is set at 5 seconds.
Two sets of statistics are collected. The per-interval statistics are collected over a sampling interval, while the routing table change statistics are the result of aggregating the per-interval statistics. The per-interval statistics are collected as a single set of counters, with one counter tracking one event. All counters are initialized at the beginning of each sampling interval; counters are incremented as corresponding events occur anywhere in the routing table.
At the end of a sampling interval, the per-interval statistics for that sampling interval are integrated with the routing table change statistics collected from the previous sampling intervals. The counters holding the per-interval statistics are reset and the process repeats.
Routing table statistics are collected for the following events:
•
Forward-Path Change. This statistic is the number of changes in the forwarding path, which is the accumulation of prefix-add, next-hop change, and pathcount change statistics.
•
Prefix-Add. A new prefix was added to the routing table.
•
Next-Hop Change. A prefix is not added or removed, but the next hop changes. This statistic is only seen with recursive routes that are installed in the routing table.
•
Pathcount Change. The number of paths in the routing table has changed. This statistic is the result of an increase in the number of paths for an Interior Gateway Protocol (IGP) prefix in the routing table.
•
Prefix Refresh. Standard routing table maintenance; the forwarding behavior is not changed.
Use the show ip route profile command to display the routing table change statistics.
Examples
The following example enables the collection of routing table statistics:
Related Commands
Command
|
Description
|
show ip route profile
|
Displays routing table change statistics.
|
key
To identify an authentication key on a key chain, use the key key-chain configuration command. To remove the key from the key chain, use the no form of this command.
key number
no key number
Syntax Description
number
|
Identification number of an authentication key on a key chain. The range of keys is 0 to 2147483647. The key identification numbers need not be consecutive.
|
Defaults
No key exists on the key chain.
Command Modes
key-chain configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Only DRP Agent, IP Enhanced Interior Gateway Routing Protocol (EIGRP), and Routing Information Protocol (RIP) Version 2 use key chains.
It is useful to have multiple keys on a key chain so that the software can sequence through the keys as they become invalid after time, based on the accept-lifetime and send-lifetime key chain key command settings.
Each key has its own key identifier, which is stored locally. The combination of the key identifier and the interface associated with the message uniquely identifies the authentication algorithm and MD5 authentication key in use. Only one authentication packet is sent, regardless of the number of valid keys. The software starts looking at the lowest key identifier number and uses the first valid key.
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.
To remove all keys, remove the key chain by using the no key chain command.
Examples
The following example configures a key chain named 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:40 p.m. and be sent from 3:00 p.m. to 4:00 p.m. The overlap allows for migration of keys or a discrepancy in the router's set time. There is a half-hour leeway on each side to handle time-of-day 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 chain
|
Enables authentication for routing protocols.
|
key-string (authentication)
|
Specifies the authentication string for a key.
|
send-lifetime
|
Sets the time period during which an authentication key on a key chain is valid to be sent.
|
show key chain
|
Displays authentication key information.
|
key chain
To enable authentication for routing protocols, identify a group of authentication keys by using the key chain command in global configuration mode. To remove the key chain, use the no form of this command.
key chain name-of-chain
no key chain name-of-chain
Syntax Description
name-of-chain
|
Name of a key chain. A key chain must have at least one key and can have up to 2147483647 keys.
|
Defaults
No key chain exists.
Command Modes
Global configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Only DRP Agent, IP Enhanced Interior Gateway Routing Protocol (IGRP), and Routing Information Protocol (RIP) Version 2 use key chains.
You must configure a key chain with keys to enable authentication.
You can identify multiple key chains, but it makes sense to use one key chain per interface per routing protocol. Upon specifying the key chain command, you enter key chain mode.
Examples
The following example configures a key chain named 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:40 p.m. and be sent from 3:00 p.m. to 4:00 p.m. The overlap allows for migration of keys or a discrepancy in the router's set time. There is a half-hour leeway on each side to handle time-of-day 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.
|
ip rip authentication key-chain
|
Enables authentication for RIP Version 2 packets and specifies the set of keys that can be used on an interface.
|
ip route profile
|
Identifies an authentication key on a key chain.
|
key-string (authentication)
|
Specifies the authentication string for a key.
|
send-lifetime
|
Sets the time period during which an authentication key on a key chain is valid to be sent.
|
show key chain
|
Displays authentication key information.
|
key-string (authentication)
To specify the authentication string for a key, use the key-string key chain key configuration command. To remove the authentication string, use the no form of this command.
key-string text
no key-string [text]
Syntax Description
text
|
Authentication string that must be sent and received in the packets using the routing protocol being authenticated. The string can contain from 1 to 80 uppercase and lowercase alphanumeric characters, except that the first character cannot be a number.
|
Defaults
No key exists.
Command Modes
Key chain key configuration
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Usage Guidelines
Only DRP Agent, IP Enhanced Interior Gateway Routing Protocol (IGRP), and Routing Information Protocol (RIP) Version 2 use key chains. Each key can have only one key string.
If password encryption is configured (with the service password-encryption command), the software saves the key string as encrypted text. When you write to the terminal with the more system:running-config command, the software displays key-string 7 encrypted text.
Examples
The following example configures a key chain named 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:40 p.m. and be sent from 3:00 p.m. to 4:00 p.m. The overlap allows for migration of keys or a discrepancy in the router's set time. There is a half-hour leeway on each side to handle time-of-day 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.
|
ip route profile
|
Identifies an authentication key on a key chain.
|
key chain
|
Enables authentication for routing protocols.
|
send-lifetime
|
Sets the time period during which an authentication key on a key chain is valid to be sent.
|
service password-encryption
|
Encrypts passwords.
|
show key chain
|
Displays authentication key information.
|
match interface (IP)
To distribute any routes that have their next hop out one of the interfaces specified, use the match interface command in route-map configuration mode. To remove the match interface entry, use the no form of this command.
match interface type number [...type number]
no match interface type number [...type number]
Syntax Description
type
|
Interface type.
|
number
|
Interface number.
|
Defaults
No match interfaces are defined.
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 match route-map configuration command has multiple formats. The match commands may 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.
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.
Examples
In the following example, routes that have their next hop out Ethernet interface 0 will be distributed:
match interface ethernet 0
Related Commands
Command
|
Description
|
match as-path
|
Matches a BGP autonomous system path access list.
|
match community-list
|
Matches a BGP community.
|
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 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 tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
match ip address
To distribute any routes that have a destination network number address that is permitted by a standard access list, an extended access list, or a prefix list, or to perform policy routing on packets, use the match ip address command in route-map configuration mode. To remove the match ip address entry, use the no form of this command.
match ip address {access-list-number [access-list-number... | access-list-name...] |
access-list-name [access-list-number...| access-list-name] | prefix-list prefix-list-name
[prefix-list-name...]}
no match ip address {access-list-number [access-list-number... | access-list-name...] |
access-list-name [access-list-number...| access-list-name] | prefix-list prefix-list-name
[prefix-list-name...]}
Syntax Description
access-list-number...
|
Number of a standard or extended access list. It can be an integer from 1 to 199. The ellipsis indicates that multiple values can be entered.
|
access-list-name...
|
Name of a standard or extended access list. It can be an integer from 1 to 199. The ellipsis indicates that multiple values can be entered.
|
prefix-list
|
Distributes routes based on a prefix list.
|
prefix-list-name...
|
Name of a specific prefix list. The ellipsis indicates that multiple values can be entered.
|
Defaults
No access list numbers or prefix lists are specified.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
An ellipsis (...) in the command syntax indicates that your command input can include multiple values for the access-list-number, access-list-name, or prefix-list-name arguments.
Like matches in the same route map subblock are filtered with "or" semantics. If any one match clause is matched in the entire route map subblock, this match is treated as a successful match. Dissimilar match clauses are filtered with "and" semantics. So dissimilar matches are filtered logically. If the first set of conditions is not met, the second match clause is filtered. This process continues until a match occurs or there are no more match clauses.
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.
When you are passing routes through a route map, a route map can have several sections that contain specific match clauses. 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. The match ip address command allows you to policy route packets based on criteria that can be matched with an extended access list; for example, a protocol, protocol service, and source or destination IP address. To define the conditions for policy routing packets, use the ip policy route-map interface configuration command, in addition to the route-map global configuration command, and the match and set route-map configuration commands. 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. You might want to policy route packets based on their source, for example, using an access list.
Examples
In the following example, routes that have addresses specified by access list numbers 5 or 80 will be matched:
Route maps that use prefix lists can be used for route filtering, default origination, and redistribution in other routing protocols. In the following example, a default route 0.0.0.0/0 is conditionally originated when there exists a prefix 10.1.1.0/24 in the routing table:
ip prefix-list cond permit 10.1.1.0/24
route-map default-condition permit 10
match ip address prefix-list cond
default-information originate route-map default-condition
In the following policy routing example, packets that have addresses specified by access list numbers 6 or 25 will be routed to Ethernet interface 0:
ip policy route-map chicago
Related Commands
Command
|
Description
|
ip local policy route-map
|
Identifies a route map to use for policy routing on an interface.
|
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
|
Matches a BGP community.
|
match interface (IP)
|
Distributes any routes that have their next hop out one of the interfaces specified.
|
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.
|
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 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
|
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.
|
match ip next-hop
To redistribute any routes that have a nexthop router address passed by one of the access lists specified, use the match ip next-hop command in route-map configuration mode. To remove the nexthop entry, use the no form of this command.
match ip next-hop {access-list-number | access-list-name}[...access-list-number |
...access-list-name]
no match ip next-hop {access-list-number | access-list-name}[...access-list-number |
...access-list-name]
Syntax Description
access-list-number | access-list-name
|
Number or name of a standard or extended access list. It can be an integer from 1 to 199.
|
Defaults
Routes are distributed freely, without being required to match a next-hop address.
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 match route-map configuration command has multiple formats. The match commands may 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.
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.
Examples
The following example distributes routes that have a next-hop router address passed by access list 5 or 80 will be distributed:
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 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 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 tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
match ip route-source
To redistribute routes that have been advertised by routers and access servers at the address specified by the access lists, use the match ip route-source command in route-map configuration mode. To remove the route-source entry, use the no form of this command.
match ip route-source {access-list-number | access-list-name}[...access-list-number |
...access-list-name]
no match ip route-source {access-list-number | access-list-name}[...access-list-number |
...access-list-name]
Syntax Description
access-list-number | access-list-name
|
Number or name of a standard or extended access list. It can be an integer from 1 to 199.
|
Defaults
No filtering on route source.
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. 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 may 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.
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 second route-map section with an explicit match specified.
There are situations in which a route's next hop and source router address are not the same.
Examples
The following example distributes routes that have been advertised by routers and access servers at the addresses specified by access lists 5 and 80:
match ip route-source 5 80
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 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 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 tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
match length
To base policy routing on the Level 3 length of a packet, use the match length command in route-map configuration mode. To remove the entry, use the no form of this command.
match length min max
no match length min max
Syntax Description
min
|
Minimum Level 3 length of the packet, inclusive, allowed for a match. Range is 0 to 0x7FFFFFFF.
|
max
|
Maximum Level 3 length of the packet, inclusive, allowed for a match. Range is 0 to 0x7FFFFFFF.
|
Defaults
No policy routing on the length of a packet.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
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 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 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 packet to be routed according to the set actions given with the set commands. The no forms of the match commands remove the specified match criteria.
You might want to base your policy routing on the length of packets so that your interactive traffic and bulk traffic are directed to different routers.
Examples
In the following example, packets 3 to 200 bytes long, inclusive, will be routed to FDDI interface 0:
ip policy route-map interactive
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.
|
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
|
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
|
match metric (IP)
To redistribute routes with the metric specified, use the match metric command in route-map configuration mode. To remove the entry, use the no form of this command.
match metric metric-value
no match metric metric-value
Syntax Description
metric-value
|
Route metric, which can be an IGRP five-part metric. It is a metric value from 0 to 4294967295.
|
Defaults
No filtering on a metric value.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.2
|
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 match route-map configuration command has multiple formats. The match commands may 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.
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 second route-map section with an explicit match specified.
Examples
In the following example, routes with the metric 5 will be redistributed:
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 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 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 tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
match route-type (IP)
To redistribute routes of the specified type, use the match route-type command in route-map configuration mode. To remove the route-type entry, use the no form of this command.
match route-type {local | internal | external [type-1 | type-2] | level-1 | level-2}
no match route-type {local | internal | external [type-1 | type-2] | level-1 | level-2}
Syntax Description
local
|
Locally generated BGP routes.
|
internal
|
OSPF intra-area and interarea routes or EIGRP internal routes.
|
external [type-1 | type-2]
|
OSPF external routes, or EIGRP external routes. For OSPF, external type-1 matches only Type 1 external routes and external type-2 matches only Type 2 external routes.
|
level-1
|
IS-IS Level 1 routes.
|
level-2
|
IS-IS Level 2 routes.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.2
|
The local and external [type-1 | type-2] keywords were added.
|
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 match route-map configuration command has multiple formats. The match commands may 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.
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 second route-map section with an explicit match specified.
Examples
The following example redistributes internal routes:
match route-type internal
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 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 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 tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
match tag
To redistribute routes in the routing table that match the specified tags, use the match tag command in route-map configuration mode. To remove the tag entry, use the no form of this command.
match tag tag-value [...tag-value]
no match tag tag-value [...tag-value]
Syntax Description
tag-value
|
List of one or more route tag values. Each can be an integer from 0 to 4294967295.
|
Defaults
No match tag values are defined.
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 match route-map configuration command has multiple formats. The match commands may 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.
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 second route-map section with an explicit match specified.
Examples
The following example redistributes routes stored in the routing table with tag 5:
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.
|
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 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 tag (IP)
|
Sets a tag value of the destination routing protocol.
|
set weight
|
Specifies the BGP weight for the routing table.
|
maximum-paths
To control the maximum number of parallel routes an IP routing protocol can support, use the maximum-paths command in router configuration mode. To restore the default value, use the no form of this command.
maximum-paths maximum
no maximum-paths
Syntax Description
maximum
|
Maximum number of parallel routes an IP routing protocol installs in a routing table, in the range 1 to 6.
|
Defaults
The default for BGP is 1 path. The default for all other IP routing protocols is 4 paths.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.2
|
This command was introduced.
|
Examples
The following example allows a maximum of 2 paths to a destination:
passive-interface
To disable sending routing updates on an interface, use the passive-interface command in router configuration mode. To reenable the sending of routing updates, use the no form of this command.
passive-interface [default] {type number}
no passive-interface type number
Syntax Description
default
|
(Optional) All interfaces become passive.
|
type
|
Interface type.
|
number
|
Interface number.
|
Defaults
Routing updates are sent on the interface.
Command Modes
Router configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
12.0
|
The default keyword was added.
|
Usage Guidelines
If you disable the sending of routing updates on an interface, the particular subnet will continue to be advertised to other interfaces, and updates from other routers on that interface continue to be received and processed.
The default keyword sets all interfaces as passive by default. You can then configure individual interfaces where adjacencies are desired using the no passive-interface command. The default keyword is useful in Internet service provider and large enterprise networks where many of the distribution routers have more than 200 interfaces.
For Open Shortest Path First (OSPF), OSPF routing information is neither sent nor received through the specified router interface. The specified interface address appears as a stub network in the OSPF domain.
For Intermediate System-to-Intermediate System (IS-IS), this command instructs IS-IS to advertise the IP addresses for the specified interface without actually running IS-IS on that interface. The no form of this command for IS-IS disables advertising IP addresses for the specified address.
Note
For IS-IS you must keep at least one active interface and configure the interface with the ip router isis command.
Enhanced Interior Gateway Routing Protocol (IGRP) is disabled on an interface that is configured as passive although it advertises the route.
Examples
The following example sends IGRP updates to all interfaces on network 10.108.0.0 except Ethernet interface 1:
passive-interface ethernet 1
The following configuration enables IS-IS on interfaces Ethernet 1 and serial 0 and advertises the IP addresses of Ethernet 0 in its Link State PDUs:
passive-interface Ethernet 0
The following example sets all interfaces as passive then activates the Ethernet 0 interface:
passive-interface default
no passive-interface ethernet0
network 10.108.0.1 0.0.0.255 area 0
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} [metric metric-value]
[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} [metric metric-value]
[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, egp, igrp, isis, mobile, ospf, static [ip], connected, and rip.
The keyword static [ip] is used to redistribute IP static routes. The optional ip keyword is used when redistributing into IS-IS.
The keyword connected refers to routes which are established automatically by virtue of having enabled IP on an interface. For routing protocols such as OSPF and IS-IS, these routes will be redistributed as external to the autonomous system.
|
process-id
|
(Optional) For bgp, egp, or igrp, this is an autonomous system number, which is a 16-bit decimal number. For isis, this is an optional tag 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 ospf, 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 rip, no process-id value is needed.
|
level-1
|
For IS-IS, Level 1 routes are redistributed into other IP routing protocols independently.
|
level-1-2
|
For IS-IS, both Level 1 and Level 2 routes are redistributed into other IP routing protocols.
|
level-2
|
For IS-IS, Level 2 routes are redistributed into other IP routing protocols independently.
|
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.
|
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 which is < 63.
external—IS-IS metric which is > 64 < 128.
The default is internal.
|
match {internal | external 1 | external 2}
|
(Optional) For OPSF, the criteria by which OSPF routes are redistributed into other routing domains. It an 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 the OSPF protocol itself. It may be used to communicate information between Autonomous System Boundary Routers. If none is specified, then the remote autonomous system number is used for routes from BGP and EGP; for other protocols, zero (0) is used.
|
route-map
|
(Optional) Route map 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.
|
Defaults
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 type-value—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 argument 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.
|
Usage Guidelines
Changing or disabling any keyword will not affect the state of other keywords.
A router receiving a link-state protocol (LSP) 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 should always be filtered by the distribute-list out router configuration command. This 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 Autonomous System Boundary Router (ASBR). However, an ASBR does not, by default, generate a default route into the OSPF routing domain.
When routes are redistributed between OSPF processes, no OSPF metrics are preserved.
When routes are redistributed into OSPF and no metric is specified in the metric keyword, the default metric that OSPF uses is 20 for routes from all protocols except BGP, which gets a metric of 1. Furthermore, when the router redistributes from one OSPF process to another OSPF process on the same router, and if no default metric is specified, the metrics in one process are carried to the redistributing process.
When routes are redistributed into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.
The only connected routes affected by this redistribute command are the routes not specified by the network 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 default-information originate is specified.
Examples
The following example causes OSPF routes to be redistributed into a BGP domain:
The following example causes IGRP routes to be redistributed into an OSPF domain:
The following example causes the specified IGRP process routes to be redistributed into an OSPF domain. The IGRP-derived metric will be remapped to 100 and RIP routes to 200.
redistribute igrp 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 20.0.0.0 will appear as an external LSA in OSPF 1 with a cost of 100 (the cost is preserved):
ip address 20.0.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 20.0.0.0 0.255.255.255 area 0
Related Commands
Command
|
Description
|
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 permit 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 permit 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 deny is specified, the route is not redistributed or 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, it reverts to the normal forwarding algorithm.
|
sequence-number
|
(Optional) Number that indicates the position a new route map is to have in the list of route maps already configured with the same name. If given with the no form of this command, it specifies the position of the route map that 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 following example as 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 RIP routes with a hop count equal to 1 into OSPF. These routes will be redistributed into OSPF as external link state advertisements 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
|
For Redistribution
|
|
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.
|
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 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.
|
For Policy Routing
|
|
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.
|
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
|
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.
|
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
date—date (1-31)
Month—first three letters of the month
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 on.
|
end-time
|
Key is valid to be sent from the start-time until end-time. The syntax is the same as that for start-time. The end-time must be after the start-time. 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 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 birch will be accepted from 2:30 p.m. to 4:40 p.m. and be sent from 3:00 p.m. to 4:00 p.m. The overlap allows for migration of keys or a discrepancy in the router's set time. There is a half-hour leeway on each side to handle time-of-day 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
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 of a route map's match criteria 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 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 type number [...type number]
no set default interface type number [...type number]
Syntax Description
type
|
Interface type, used with the interface number, to which packets are output.
|
number
|
Interface number, used with the interface type, to which packets are output.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
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
|
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 route map for policy routing, use the set interface command in route-map configuration mode. To delete an entry, use the no form of this command.
set interface type number [...type number]
no set interface type number [...type number]
Syntax Description
type
|
Interface type, used with the interface number, to which packets are output.
|
number
|
Interface number, used with the interface type, to which packets are output.
|
Defaults
This command is disabled by default.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
Usage Guidelines
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
|
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
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 async interface 1 from the source 1.1.1.1 are sent to the router at 6.6.6.6 if the software has no explicit route for the packet's destination. Packets arriving from the source 2.2.2.2 are sent to the router at 7.7.7.7 if the software has no explicit route for the packet's destination. All other packets for which the software has no explicit route to the destination are discarded.
access-list 1 permit ip 1.1.1.1 0.0.0.0
access-list 2 permit ip 2.2.2.2 0.0.0.0
ip policy route-map equal-access
route-map equal-access permit 10
set ip default next-hop 6.6.6.6
route-map equal-access permit 20
set ip default next-hop 7.7.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 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
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 161.14.2.2:
ip policy route-map thataway
set ip next-hop 161.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
|
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 hop(s) of a route map is a Cisco Discovery Protocol (CDP) neighbor(s) 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.
Command Modes
Route-map configuration
Command History
Release
|
Modification
|
12.0(3)T
|
This command was introduced.
|
Usage Guidelines
One example of when you might configure this command is if 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, due to 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, use this command to configure the router to first verify that the next hop(s) of the route map is the router's CDP neighbor(s) 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 are either 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 test sequence 10, the subsequent packets of the same flow always take the same route map test sequence 10, not route map test sequence 20, because they all match or pass access list 1 check.
set ip precedence priority
set ip next-hop verify-availability
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 value
no set ip precedence
Syntax Description
value
|
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 queuing (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 WRED at points downstream in the network. Typically, you would set IP precedence at the edge of the network (or administrative domain) and have queuing act on it thereafter. WFQ can speed up handling for high precedence traffic at congestion points. WRED ensures 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 our high-end Internet 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% of the bandwidth on output links in the network, and IP precedence 6 can be given 5% using the DWFQ implementation on the 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 of a route map's match criteria are met. When all match criteria are met, all set actions are performed.
Examples
The following example sets the IP precedence to 5 (critical) for packets that pass the route-map match:
ip policy route-map texas
Related Commands
Command
|
Description
|
fair-queue
|
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 Level-2 subdomain.
|
level-1-2
|
Imports routes into Level-1 and Level-2.
|
stub-area
|
Imports routes into OSPF NSSA area.
|
backbone
|
Imports routes into OSPF backbone area.
|
Defaults
This command is disabled by default.
For 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 of a route map's match criteria 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:
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 local-preference
|
Specifies a preference value for the autonomous system path.
|
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 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 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 value
no set local-preference value
Syntax Description
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 of a route map's match criteria 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:
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-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 automatic-tag
|
Automatically computes the tag value.
|
set community
|
Sets the BGP COMMUNITIES attribute.
|
set level (IP)
|
Indicates where to import routes.
|
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 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 IGRP and IP 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 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 a route map's match criteria 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:
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-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 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
|
IS-IS internal metric, or IGP metric as the MED for BGP.
|
external
|
IS-IS external metric.
|
type-1
|
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 of a route map's match criteria 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:
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 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 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 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 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 of a route map's match criteria 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:
set next-hop 172.160.70.24
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 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 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 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 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 of a route map's match criteria 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:
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 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 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.
|
show ip cache policy
To display the cache entries in the policy route-cache, use the show ip cache policy command in EXEC mode.
show ip cache policy
Syntax Description
This command has no arguments or keywords.
Command Modes
EXEC
Command History
Release
|
Modification
|
11.3
|
This command was introduced.
|
Examples
The following is sample output from the show ip cache policy command:
Router# show ip cache policy
Total adds 10, total deletes 10
Type Routemap/sequence Age Interface Next Hop
NH george/10 00:04:31 Ethernet0 172.110.1.2
Int george/30 00:01:23 Serial4 172.110.5.129
Table 88 describes the significant fields in the display.
Table 88 show ip cache policy Field Descriptions
Field
|
Description
|
Total adds
|
Number of times a cache entry was created.
|
total deletes
|
Number of times a cache entry or the entire cache was deleted.
|
Type
|
NH indicates set ip next-hop command.
Int indicates set interface command.
|
Routemap
|
Name of the route map that created the entry; in this example, george.
|
sequence
|
Route map sequence number.
|
Age
|
Age of the cache entry.
|
Interface
|
Output interface type and number.
|
Next Hop
|
IP address of the next hop.
|
Related Commands
Command
|
Description
|
ip route-cache
|
Configures the router to export the flow cache entry to a workstation when a flow expires.
|
show ip local policy
To display the route map used for local policy routing, if any, use the show ip local policy command in EXEC mode.
show ip local policy
Syntax Description
This command has no arguments or keywords.
Command Modes
EXEC
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Examples
The following is sample output from the show ip local policy command:
Router# show ip local policy
Local policy routing is enabled, using route map equal
route-map equal, permit, sequence 10
Policy routing matches: 0 packets, 0 bytes
route-map equal, permit, sequence 20
ip address (access-lists): 101
Policy routing matches: 2 packets, 172 bytes
Table 89 describes the fields in the display.
Table 89 show ip local policy Field Descriptions
Field
|
Description
|
route-map equal
|
The name of the route map is equal.
|
permit
|
The route map contains permit statements.
|
sequence
|
The sequence number of the route map, which determines in what order it is processed among other route maps.
|
Match clauses:
|
Clauses in the route map that must be matched to satisfy the permit or deny action.
|
Set clauses:
|
Set clauses that will be put into place if the match clauses are met.
|
Policy routing matches: packets
|
Number of packet that meet the match clauses.
|
bytes
|
Number of bytes in the packets that meet the match clauses.
|
Related Commands
Command
|
Description
|
ip local policy route-map
|
Identifies a route map to use for local policy routing.
|
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
|
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.
|
show ip policy
To display the route map used for policy routing, use the show ip policy command in EXEC mode.
show ip policy
Syntax Description
This command has no arguments or keywords.
Command Modes
EXEC
Command History
Release
|
Modification
|
11.1
|
This command was introduced.
|
Examples
The following is sample output from the show ip policy command:
The following is sample output from the show route-map command, which relates to the preceding sample display:
route-map equal, permit, sequence 10
Policy routing matches: 0 packets, 0 bytes
route-map equal, permit, sequence 20
ip address (access-lists): 101
Policy routing matches: 144 packets, 15190 bytes
Table 90 describes the fields in the display.
Table 90 show ip policy Field Descriptions
Field
|
Description
|
route-map equal
|
The name of the route map is equal.
|
permit
|
The route map contains permit statements.
|
sequence
|
Sequence number of the route map, which determines in what order it is processed among other route maps.
|
Match clauses:
|
Clauses in the route map that must be matched to satisfy the permit or deny action.
|
Set clauses:
|
Set clauses that will be put into place if the match clauses are met.
|
Policy routing matches: packets
|
Number of packet that meet the match clauses.
|
bytes
|
Number of bytes in the packets that meet the match clauses.
|
Related Commands
Command
|
Description
|
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
|
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.
|
show ip protocols
To display the parameters and current state of the active routing protocol process, use the show ip protocols command in EXEC mode.
show ip protocols
Syntax Description
This command has no arguments or keywords.
Command Modes
EXEC
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
Usage Guidelines
The information displayed by the show ip protocols command is useful in debugging routing operations. Information in the Routing Information Sources field of the show ip protocols output can help you identify a router suspected of delivering bad routing information.
Examples
The following is sample output from the show ip protocols command, showing IGRP processes:
Router# show ip protocols
Routing Protocol is "igrp 109"
Sending updates every 90 seconds, next due in 44 seconds
Invalid after 270 seconds, hold down 280, flushed after 630
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
IGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0
IGRP maximum hopcount 100
IGRP maximum metric variance 1
Routing Information Sources:
Gateway Distance Last Update
172.160.72.18 100 0:56:41
172.160.72.22 100 0:55:41
172.160.72.20 100 0:01:04
172.160.72.30 100 0:01:29
Distance: (default is 100)
Routing Protocol is "bgp 1878"
Sending updates every 60 seconds, next due in 0 seconds
Outgoing update filter list for all interfaces is 1
Incoming update filter list for all interfaces is not set
IGP synchronization is disabled
Automatic route summarization is enabled
Address FiltIn FiltOut DistIn DistOut Weight RouteMap
Routing Information Sources:
Gateway Distance Last Update
Distance: external 20 internal 200 local 200
Table 91 describes significant fields shown in the display.
Table 91 show ip protocols Field Descriptions for IGRP Processes
Field
|
Description
|
Routing Protocol is "igrp 109"
|
Specifies the routing protocol used.
|
Sending updates every 90 seconds
|
Specifies the time between sending updates.
|
next due in 44 seconds
|
Precisely when the next update is due to be sent.
|
Invalid after 270 seconds
|
Specifies the value of the invalid parameter.
|
hold down for 280
|
Specifies the current value of the hold-down parameter.
|
flushed after 630
|
Specifies the time in seconds after which the individual routing information will be thrown (flushed) out.
|
Outgoing update ...
|
Specifies whether the outgoing filtering list has been set.
|
Incoming update ...
|
Specifies whether the incoming filtering list has been set.
|
Default networks
|
Specifies how these networks will be handled in both incoming and outgoing updates.
|
IGRP metric
|
Specifies the value of the K0-K5 metrics, as well as the maximum hopcount.
|
Redistributing
|
Lists the protocol that is being redistributed.
|
Routing
|
Specifies the networks for which the routing process is currently injecting routes.
|
Routing Information Sources
|
Lists all the routing sources the Cisco IOS software is using to build its routing table. For each source, you will see the following displayed:
• IP address
• Administrative distance
• Time the last update was received from this source.
|
The following is sample output from the show ip protocols command, showing EIGRP process 77:
Router# show ip protocols
Routing Protocol is "eigrp 77"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Automatic network summarization is in effect
Routing Information Sources:
Gateway Distance Last Update
Distance: internal 90 external 170
Table 92 describes the fields that might be shown in the display.
Table 92 show ip protocols Field Descriptions for EIGRP Process 77
Field
|
Description
|
Routing Protocol is "eigrp 77"
|
Name and autonomous system number of the currently running routing protocol.
|
Outgoing update filter list for all interfaces...
|
Indicates whether a filter for outgoing routing updates has been specified with the distribute-list out command.
|
Incoming update filter list for all interfaces...
|
Indicates whether a filter for incoming routing updates has been specified with the distribute-list in command.
|
Redistributing: eigrp 77
|
Indicates whether route redistribution has been enabled with the redistribute command.
|
Automatic network summarization...
|
Indicates whether route summarization has been enabled with the auto-summary command.
|
Routing for Networks:
|
Networks for which the routing process is currently injecting routes.
|
Routing Information Sources:
|
Lists all the routing sources that the Cisco IOS software is using to build its routing table. The following is displayed for each source: IP address, administrative distance, and time the last update was received from this source.
|
Distance: internal 90 external 170
|
Internal and external distances of the router. Internal distance is the degree of preference given to EIGRP internal routes. External distance is the degree of preference given to EIGRP external routes.
|
The following is sample output from the show ip protocols command, showing IS-IS processes:
Router# show ip protocols
Routing Protocol is "isis"
Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Routing Information Sources:
Distance: (default is 115)
The following is sample output from the show ip protocols command, showing RIP processes:
Router# show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 2 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default version control: send version 2, receive version 2
Interface Send Recv Key-chain
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 120)
show ip route
Use the show ip route command in EXEC mode to display the current state of the routing table.
show ip route [[address [mask] [longer-prefixes]] | [protocol [process-id]] | [list
access-list-number | access-list-name]]
Syntax Description
address
|
(Optional) Address about which routing information should be displayed.
|
mask
|
(Optional) Argument for a subnet mask.
|
longer-prefixes
|
(Optional) The address and mask pair becomes a prefix and any routes that match that prefix are displayed.
|
protocol
|
(Optional) Name of a routing protocol, or the keyword connected, static, or summary. If you specify a routing protocol, use one of the following keywords: bgp, egp, eigrp, hello, igrp, isis, ospf, or rip.
|
process-id
|
(Optional) Number used to identify a process of the specified protocol.
|
list
|
(Optional) The list keyword is required to filter output by an access list name or number.
|
access-list-name
|
(Optional) Filters the displayed output from the routing table based on the specified access list name.
|
access-list-number
|
(Optional) Filters the displayed output from the routing table based on the specified access list number.
|
Command Modes
EXEC
Command History
Release
|
Modification
|
9.2
|
This command was introduced.
|
10.0
|
The "D—EIGRP, EX—EIGRP, N1—OSPF NSSA external type 1 route and N2—OSPF NSSA external type 2 route" codes were added to the command output.
|
10.3
|
The process-id argument was added.
|
11.0
|
The longer-prefixes keyword was added.
|
11.1
|
The "U—per-user static route" code was added to the command output.
|
11.2
|
The "o—on-demand routing" code was added to the command output.
|
11.3
|
The output from the show ip route IP-address command was enhanced to display the origination of an IP route in IS-IS networks.
|
12.0(1)T
|
The "M—mobile" code was added to the command output.
|
12.0(3)T
|
The "P—periodic downloaded static route" code was added to the command output.
|
12.0(4)T
|
The "ia—IS-IS" code was added to the command output.
|
Examples
The following is sample output from the show ip route command when entered without an address:
Codes: I - IGRP derived, R - RIP derived, O - OSPF derived,
C - connected, S - static, E - EGP derived, B - BGP derived,
* - candidate default route, IA - OSPF inter area route,
i - IS-IS derived, ia - IS-IS, U - per-user static route,
o - on-demand routing, M - mobile, P - periodic downloaded static route,
D - EIGRP, EX - EIGRP external, E1 - OSPF external type 1 route,
E2 - OSPF external type 2 route, N1 - OSPF NSSA external type 1 route,
N2 - OSPF NSSA external type 2 route
Gateway of last resort is 10.119.254.240 to network 10.140.0.0
O E2 172.150.0.0 [160/5] via 10.119.254.6, 0:01:00, Ethernet2
E 172.17.10.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2
O E2 172.70.132.0 [160/5] via 10.119.254.6, 0:00:59, Ethernet2
O E2 10.130.0.0 [160/5] via 10.119.254.6, 0:00:59, Ethernet2
E 172.30.0.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2
E 10.129.0.0 [200/129] via 10.119.254.240, 0:02:22, Ethernet2
E 172.80.129.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2
E 10.10.0.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2
E 172.60.139.0 [200/129] via 10.119.254.240, 0:02:23, Ethernet2
E 172.90.208.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2
E 192.84.148.0 [200/129] via 10.119.254.240, 0:02:23, Ethernet2
E 192.168.223.0 [200/128] via 10.119.254.244, 0:02:22, Ethernet2
E 192.44.236.0 [200/129] via 10.119.254.240, 0:02:23, Ethernet2
E 10.141.0.0 [200/129] via 10.119.254.240, 0:02:22, Ethernet2
E 10.140.0.0 [200/129] via 10.119.254.240, 0:02:23, Ethernet2
The following is sample output that includes some IS-IS Level 2 routes learned:
Codes: I - IGRP derived, R - RIP derived, O - OSPF derived,
C - connected, S - static, E - EGP derived, B - BGP derived,
* - candidate default route, IA - OSPF inter area route,
i - IS-IS derived, ia - IS-IS, U - per-user static route,
o - on-demand routing, M - mobile, P - periodic downloaded static route,
D - EIGRP, EX - EIGRP external, E1 - OSPF external type 1 route,
E2 - OSPF external type 2 route, N1 - OSPF NSSA external type 1 route,
N2 - OSPF NSSA external type 2 route
Gateway of last resort is not set
172.180.0.0 is subnetted (mask is 255.255.255.0), 3 subnets
C 172.180.64.0 255.255.255.0 is possibly down,
routing via 0.0.0.0, Ethernet0
i L2 172.180.67.0 [115/20] via 172.180.64.240, 0:00:12, Ethernet0
i L2 172.180.66.0 [115/20] via 172.180.64.240, 0:00:12, Ethernet0
Table 93 describes significant fields shown in these two displays.
Table 93 show ip route Field Descriptions
Field
|
Description
|
O
|
Indicates protocol that derived the route. Possible values include the following:
• I—IGRP derived
• R—RIP derived
• O—OSPF derived
• C—connected
• S—static
• E—EGP derived
• B—BGP derived
• D—EIGRP
• EX—EIGRP external
• i—IS-IS derived
• ia—IS-IS
• M—mobile
• P—periodic downloaded static route
• U—per-user static route
• o—on-demand routing
|
E2
|
Type of route. Possible values include the following:
• *—Indicates the last path used when a packet was forwarded. It pertains only to the non-fast-switched packets. However, it does not indicate what path will be used next when forwarding a non-fast-switched packet, except when the paths are equal cost.
• IA—OSPF interarea route.
• E1—OSPF external type 1 route.
• E2—OSPF external type 2 route.
• L1—IS-IS Level 1 route.
• L2—IS-IS Level 2 route.
• N1—OSPF NSSA external type 1 route.
• N2—OSPF NSSA external type 2 route.
|
172.150.0.0
|
Indicates the address of the remote network.
|
[160/5]
|
The first number in the brackets is the administrative distance of the information source; the second number is the metric for the route.
|
via 10.119.254.6
|
Specifies the address of the next router to the remote network.
|
0:01:00
|
Specifies the last time the route was updated in hours:minutes:seconds.
|
Ethernet2
|
Specifies the interface through which the specified network can be reached.
|
When you specify that you want information about a specific network displayed, more detailed statistics are shown. The following is sample output from the show ip route command when entered with the address 10.119.0.0.
Router# show ip route 10.119.0.0
Routing entry for 10.119.0.0 (mask 255.255.0.0)
Known via "igrp 109", distance 100, metric 10989
Redistributing via igrp 109
Last update from 10.108.35.13 on TokenRing0, 0:00:58 ago
Routing Descriptor Blocks:
* 10.108.35.13, from 10.108.35.13, 0:00:58 ago, via TokenRing0
Route metric is 10989, traffic share count is 1
Total delay is 45130 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
When an IS-IS router advertises its link state information, it includes one of its own IP addresses to be used as the originator IP address. When other routers calculate IP routes, they can store the originator IP address with each route in the routing table.
The following example shows the output from the show ip route command when looking at an IP route generated by IS-IS. Each path that is shown under the Routing Descriptor Blocks report displays two IP addresses. The first address (10.22.22.2) is the next hop address, the second is the originator IP address from the advertising IS-IS router. This address helps you determine where a particular IP route has originated in your network. In the example the route to 10.0.0.1/32 was originated by a router with IP address 223.191.255.247.
Router# show ip route 10.0.0.1
Routing entry for 10.0.0.1/32
Known via "isis", distance 115, metric 20, type level-1
Last update from 223.191.255.251 on Fddi1/0, 00:00:13 ago
Routing Descriptor Blocks:
* 10.22.22.2, from 223.191.255.247, via Serial2/3
Route metric is 20, traffic share count is 1
223.191.255.251, from 223.191.255.247, via Fddi1/0
Route metric is 20, traffic share count is 1
Compare the report above using the show ip route command with an IP address to the following report using the show ip route isis command:
Router# show ip route isis
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
i L1 10.0.0.1/32 [115/20] via 10.22.22.2, Serial2/3
[115/20] via 223.191.255.251, Fddi1/0
22.0.0.0/24 is subnetted, 2 subnets
i L1 22.22.23.0 [115/20] via 223.191.255.252, Fddi1/0
Table 93 describes significant fields shown in this last display. Table 94 describes significant fields shown when using the show ip route command with an IP address (previous displays).
Table 94 show ip route with Address Field Descriptions
Field
|
Description
|
Routing entry for 10.119.0.0 (mask 255.255.0.0)
|
Network number and mask.
|
Known via ...
|
Indicates how the route was derived.
|
distance
|
Administrative distance of the information source.
|
Tag
|
Integer that is used to implement the route.
|
Redistributing via ...
|
Indicates redistribution protocol.
|
Last update from 10.108.35.13 on ...
|
Indicates the IP address of a router that is the next hop to the remote network and the router interface on which the last update arrived.
|
0:00:58 ago
|
Specifies the last time the route was updated in hours:minutes:seconds.
|
10.108.35.13, from 10.108.35.13, 0:00:58 ago
|
Indicates the next hop address, the address of the gateway that sent the update, and the time that has elapsed since this update was received in hours:minutes:seconds.
|
Routing Descriptor Blocks:
|
Displays the next hop IP address followed by the information source.
|
from...via ...
|
The first address is the next hop IP address, and the other is the information source. This report is followed by the interface for this route.
|
Route metric
|
This value is the best metric for this routing descriptor block.
|
traffic share count
|
Number of uses for this routing descriptor block.
|
Total delay
|
Total propagation delay in microseconds.
|
minimum bandwidth
|
Minimum bandwidth encountered when sending data along this route.
|
Reliability 255/255
|
Likelihood of successful packet transmission expressed as a number between 0 and 255 (255 is 100 percent reliability).
|
minimum MTU
|
Smallest MTU along the path.
|
Loading 2/255
|
Effective bandwidth of the route in kilobits per second/255 is saturation.
|
Hops
|
Number of hops to the destination or to the router where the route first enters IGRP.
|
The following is sample output using the longer-prefixes keyword. When the longer-prefixes keyword is included, the address and mask pair becomes the prefix, and any address that matches that prefix is displayed. Therefore, multiple addresses are displayed.
In the following example, the logical AND operation is performed on the source address 128.0.0.0 and the mask 128.0.0.0, resulting in 128.0.0.0. Each destination in the routing table is also logically ANDed with the mask and compared to that result of 128.0.0.0. Any destinations that fall into that range are displayed in the output.
Router# show ip route 128.0.0.0 128.0.0.0 longer-prefixes
Codes: I - IGRP derived, R - RIP derived, O - OSPF derived,
C - connected, S - static, E - EGP derived, B - BGP derived,
* - candidate default route, IA - OSPF inter area route,
i - IS-IS derived, ia - IS-IS, U - per-user static route,
o - on-demand routing, M - mobile, P - periodic downloaded static route,
D - EIGRP, EX - EIGRP external, E1 - OSPF external type 1 route,
E2 - OSPF external type 2 route, N1 - OSPF NSSA external type 1 route,
N2 - OSPF NSSA external type 2 route
Gateway of last resort is not set
S 10.134.0.0 is directly connected, Ethernet0
S 10.10.0.0 is directly connected, Ethernet0
S 10.129.0.0 is directly connected, Ethernet0
S 172.30.0.0 is directly connected, Ethernet0
S 172.40.246.0 is directly connected, Ethernet0
S 172.20.97.0 is directly connected, Ethernet0
S 172.50.88.0 is directly connected, Ethernet0
S 172.19.141.0 is directly connected, Ethernet0
S 172.60.138.0 is directly connected, Ethernet0
S 192.44.237.0 is directly connected, Ethernet0
S 192.168.222.0 is directly connected, Ethernet0
S 172.90.209.0 is directly connected, Ethernet0
S 10.145.0.0 is directly connected, Ethernet0
S 10.141.0.0 is directly connected, Ethernet0
S 10.138.0.0 is directly connected, Ethernet0
S 10.128.0.0 is directly connected, Ethernet0
172.19.0.0 255.255.255.0 is subnetted, 1 subnets
C 172.19.64.0 is directly connected, Ethernet0
172.110.0.0 is variably subnetted, 2 subnets, 2 masks
C 172.110.232.32 255.255.255.240 is directly connected, Ethernet0
S 172.110.0.0 255.255.0.0 is directly connected, Ethernet0
Related Commands
Command
|
Description
|
show interfaces tunnel
|
Lists tunnel interface information.
|
show ip route summary
|
Displays the current state of the routing table in summary format.
|
show ip route profile
To display routing table change statistics, use the show ip route profile command in EXEC mode.
show ip route profile
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values
Command Modes
EXEC
Command History
Release
|
Modification
|
12.0
|
This command was introduced.
|
Usage Guidelines
Use this command in combination with the ip route profile global configuration command to validate the routing table change statistics.
Examples
The following example shows the frequency of routing table changes in a 5-second sampling interval. In this example, the Prefix add change occurred 22 times in one interval and 24 times in another interval. The output represents this with a Fwd-path change value of 2 and a Prefix add value of 2:
Router# show ip route profile
--------------------------------------------------------------------
Change/ Fwd-path Prefix Nexthop Pathcount Prefix
interval change add Change Change refresh
--------------------------------------------------------------------
Table 95 describes the significant fields shown in the display.
Table 95 show ip route profile Field Descriptions
Field
|
Description
|
Change/interval
|
Represents the frequency buckets. A Change/interval of 20 represents the bucket that is incremented when a particular event occurs 20 times in a sampling interval. It is very common to see high counters for the Change/interval bucket for 0. This counter represents the number of sampling intervals in which there were no changes to the routing table. Route removals are not counted in the statistics, only route additions.
|
Fwd-path change
|
Number of changes in the forwarding path. This value represents the accumulation of Prefix add, Nexthop change, and Pathcount change.
|
Prefix add
|
A new prefix was added to the routing table.
|
Nexthop change
|
A prefix is not added or removed, but the next hop changes. This statistic is only seen with recursive routes that are installed in the routing table.
|
Pathcount change
|
The number of paths in the routing table has changed. This change is the result of an increase in the number of paths for an Interior Gateway Protocol (IGP).
|