|
|
Table Of Contents
IP Routing Protocol-Independent Commands
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 Network Protocols Configuration Guide, Part 1.
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
Default
Forever (Starting time is January 1, 1993, and ending time is infinite.)
Command Mode
Key chain key configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Only DRP Agent, IP Enhanced IGRP, and RIP Version 2 use key chains.
Specify a start-time and one of the following: infinite, end-time, or duration seconds.
We recommend running 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.
Example
In the following example, 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 discrepancies in the router's set time. There is a half-hour leeway on each side to handle time differences.
interface ethernet 0ip rip authentication key-chain treesip rip authentication mode md5!router ripnetwork 172.19.0.0version 2!key chain treeskey 1key-string chestnutaccept-lifetime 13:30:00 Jan 25 1996 duration 7200send-lifetime 14:00:00 Jan 25 1996 duration 3600key 2key-string birchaccept-lifetime 14:30:00 Jan 25 1996 duration 7200send-lifetime 15:00:00 Jan 25 1996 duration 3600Related Commands
You can use the master indexes or search online to find documentation of related commands.
key
key chain
key-string
send-lifetime
show key chainclear ip route
To remove one or more routes from the IP routing table, use the clear ip route EXEC command.
clear ip route {network [mask] | *}
Syntax Description
network
Network or subnet address to remove.
mask
(Optional) Network mask associated with the IP address you wish to remove.
*
Removes all entries.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Example
The following example removes a route to network 132.5.0.0 from the IP routing table:
clear ip route 132.5.0.0Related Commands
You can use the master indexes or search online to find documentation of related commands.
distance
To define an administrative distance, use the distance router configuration command. To remove a distance definition, use the no form of this command.
distance weight {ip-address {ip-address mask}} [ip list]
no distance weight {ip-address {ip-address mask}} [ip list]Syntax Description
Default
lists default administrative distances.
Command Mode
Router configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0. The access-list-number | name argument first appeared in Cisco IOS Release 11.2. The access-list-number | name argument was removed in Cisco IOS Release 11.3. The ip list argument was added in Cisco IOS Release 11.3. The keyword ip was removed in Cisco IOS Release 11.3.
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.
Weight values are also subjective; there is no quantitative method for choosing weight values.
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.
Example
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.31.7.0 and 128.88.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.31.7.0 to 90. The third distance command sets the administrative distance for the router with the address 128.88.1.3 to 120.
router igrp 109network 192.31.7.0network 128.88.0.0distance 255distance 90 192.31.7.0 0.0.0.255distance 120 128.88.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 128.88.0.0. The second distance command specifies an administrative distance of 90 for network 192.31.7.0. The third distance command specifies an administrative distance of 120 for network 128.88.0.0.
In the following example, the set distance is from the least to the most specific network.
router igrp 100network 10.0.0.0distance 22 10.0.0.0distance 33 10.11.0.0 0.0.255.255distance 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
You can use the master indexes or search online to find documentation of related commands.
distance bgp
distribute-list in
To filter networks received in updates, use the distribute-list in router configuration command. To change or cancel the filter, use the no form of this command.
distribute-list {access-list-number | name} in [type number]
no distribute-list {access-list-number | name} in [type number]Syntax Description
Default
Disabled
Command Mode
Router configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0. The access-list-name, type, and number arguments first appeared in Cisco IOS Release 11.2.
This command is not supported in IS-IS or OSPF.
Example
In the following example, the Enhanced IGRP routing process accepts only two networks—network 0.0.0.0 and network 131.108.0.0:
access-list 1 permit 0.0.0.0access-list 1 permit 131.108.0.0access-list 1 deny 0.0.0.0 255.255.255.255router eigrpnetwork 131.108.0.0distribute-list 1 inRelated Commands
You can use the master indexes or search online to find documentation of related commands.
access-list (extended)
access-list (standard)
distribute-list out
redistributedistribute-list out
To suppress networks from being advertised in updates, use the distribute-list out router configuration command. To cancel this function, use the no form of this command.
distribute-list {access-list-number | name} out [interface-name | routing-process |
autonomous-system-number]
no distribute-list {access-list-number | name} out [interface-name | routing-process |
autonomous-system-number]Syntax Description
Default
Disabled
Command Mode
Router configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0. The access-list-name argument first appeared in Cisco IOS Release 11.2.
When redistributing networks, 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 131.108.0.0.
access-list 1 permit 131.108.0.0access-list 1 deny 0.0.0.0 255.255.255.255router ripnetwork 131.108.0.0distribute-list 1 outIn the following example, access list 1 is applied to outgoing routing updates and IS-IS is enabled on Ethernet interface 0. Only network 131.131.101.0 will be advertised in outgoing IS-IS routing updates.
router isisredistribute ospf 109distribute-list 1 outinterface Ethernet 0ip router isisaccess-list 1 permit 131.131.101.0 0.0.0.255Related Commands
You can use the master indexes or search online to find documentation of related commands.
access-list (extended)
access-list (standard)
distribute-list in
redistributeip default-network
To select a network as a candidate route for computing the gateway of last resort, use the ip default-network global configuration command. To remove a route, use the no form of this command.
ip default-network network-number
no ip default-network network-numberSyntax Description
Default
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 Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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 ip default-network) 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 131.108.3.4ip default-network 10.0.0.0
If the following command was issued on a router not connected to network 129.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 129.140.0.0Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip local policy route-map
To identify a route map to use for local policy routing, use the ip local policy route-map global configuration command. 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-tagSyntax 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.
Default
Packets that are generated by the router are not policy-routed.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1
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.
Example
In the following example, packets with a destination IP address matching that allowed by extended access list 131 are sent to the router at IP address 174.21.3.20:
ip local policy route-map xyz!route-map xyzmatch ip address 131set ip next-hop 174.21.3.20Related Commands
You can use the master indexes or search online to find documentation of related commands.
match ip address
match length
route-map
set default interface
set interface
set ip default next-hop
set ip next-hop
show ip local policyip policy route-map
To identify a route map to use for policy routing on an interface, use the ip policy route-map interface configuration command. 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-tagSyntax Description
map-tag
Name of the route map to use for policy routing. Must match a map-tag specified by a route-map command.
Default
No policy routing occurs on the interface.
Command Mode
Interface configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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.
Example
In the following example, packets with the destination IP address of 174.95.16.18 are sent to a router at IP address 174.21.3.20:
interface serial 0ip policy route-map wethersfield!route-map wethersfieldmatch ip address 174.95.16.18set ip next-hop 174.21.3.20Related Commands
You can use the master indexes or search online to find documentation of related commands.
match ip address
match length
route-map
set default interface
set interface
set ip default next-hop
set ip next-hopip route
To establish static routes, use the ip route global configuration command. To remove static routes, use the no form of this command.
ip route prefix mask {address | interface} [distance] [tag tag] [permanent]
no ip route prefix maskSyntax Description
Default
No static routes are established.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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 will be advertised via RIP, IGRP, and other dynamic routing protocols, regardless of whether redistribute static commands were specified for those routing protocols. This is 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.
Examples
In the following example, an administrative distance of 110 was chosen. In this case, packets for network 10.0.0.0 will be routed through to a router at 131.108.3.4 if dynamic information with administrative distance less than 110 is not available.
ip route 10.0.0.0 255.0.0.0 131.108.3.4 110
In the following example, packets for network 131.108.0.0 will be routed to a router at 131.108.6.6:
ip route 131.108.0.0 255.255.0.0 131.108.6.6key
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 numberSyntax 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.
Default
No key exists on the key chain.
Command Mode
Key chain configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Only DRP Agent, IP Enhanced IGRP, and 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 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.
Example
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.
interface ethernet 0ip rip authentication key-chain treesip rip authentication mode md5!router ripnetwork 172.19.0.0version 2!key chain treeskey 1key-string chestnutaccept-lifetime 13:30:00 Jan 25 1996 duration 7200send-lifetime 14:00:00 Jan 25 1996 duration 3600key 2key-string birchaccept-lifetime 14:30:00 Jan 25 1996 duration 7200send-lifetime 15:00:00 Jan 25 1996 duration 3600Related Commands
You can use the master indexes or search online to find documentation of related commands.
accept-lifetime
key chain
key-string
send-lifetime
show key chainkey chain
To enable authentication for routing protocols, identify a group of authentication keys by using the key chain global configuration command. To remove the key chain, use the no form of this command.
key chain name-of-chain
no key chain name-of-chainSyntax 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.
Default
No key chain exists.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Only DRP Agent, IP Enhanced IGRP, and 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.
Example
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.
interface ethernet 0ip rip authentication key-chain treesip rip authentication mode md5!router ripnetwork 172.19.0.0version 2!key chain treeskey 1key-string chestnutaccept-lifetime 13:30:00 Jan 25 1996 duration 7200send-lifetime 14:00:00 Jan 25 1996 duration 3600key 2key-string birchaccept-lifetime 14:30:00 Jan 25 1996 duration 7200send-lifetime 15:00:00 Jan 25 1996 duration 3600Related Commands
You can use the master indexes or search online to find documentation of related commands.
accept-lifetime
ip rip authentication key-chain
key
key-string
send-lifetime
show key chainkey-string
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
Default
No key exists.
Command Mode
Key chain key configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Only DRP Agent, IP Enhanced IGRP, and 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 show running-config command, the software displays key-string 7 encrypted text.
Example
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.
interface ethernet 0ip rip authentication key-chain treesip rip authentication mode md5!router ripnetwork 172.19.0.0version 2!key chain treeskey 1key-string chestnutaccept-lifetime 13:30:00 Jan 25 1996 duration 7200send-lifetime 14:00:00 Jan 25 1996 duration 3600key 2key-string birchaccept-lifetime 14:30:00 Jan 25 1996 duration 7200send-lifetime 15:00:00 Jan 25 1996 duration 3600Related Commands
You can use the master indexes or search online to find documentation of related commands.
accept-lifetime
key
key chain
send-lifetime
service password-encryption
show key chainmatch interface
To distribute any routes that have their next hop out one of the interfaces specified, use the match interface route-map configuration command. 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
Default
No match interfaces are defined.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes that have their next hop out Ethernet interface 0 will be distributed:
route-map namematch interface ethernet 0Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightmatch ip address
To distribute any routes that have a destination network number address that is permitted by a standard or extended access list, or to perform policy routing on packets, use the match ip address route-map configuration command. To remove the match ip address entry, use the no form of this command.
match ip address {access-list-number | name} [...access-list-number | name]
no match ip address {access-list-number | name} [...access-list-number | name]Syntax Description
access-list-number | name
Number or name of a standard or extended access list. It can be an integer from 1 to 199.
Default
No access list numbers are specified.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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. 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 related match commands are listed in the section "Related Commands for Redistribution." 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 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 interface configuration command, in addition to the route-map global configuration command, and the match and set route-map configuration commands to define the conditions for policy routing packets. Each route-map command has a list of match and set commands associated with it. The related match and set commands are listed in the section "Related Commands for Policy Routing." 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-map namematch ip address 5 80In the following policy routing example, packets that have addresses specified by access list numbers 6 or 25 will be routed to Ethernet interface 0:
interface serial 0ip policy route-map chicago!route-map chicagomatch ip address 6 25set interface ethernet 0Related Commands for Redistribution
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightRelated Commands for Policy Routing
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match length
route-map
set default interface
set interface
set ip default next-hop
set ip next-hopmatch ip next-hop
To redistribute any routes that have a next-hop router address passed by one of the access lists specified, use the match ip next-hop route-map configuration command. To remove the next-hop entry, use the no form of this command.
match ip next-hop {access-list-number | name}[...access-list-number | name]
no match ip next-hop {access-list-number | name}[...access-list-number | name]Syntax Description
access-list-number | name
Number or name of a standard or extended access list. It can be an integer from 1 to 199.
Default
Routes are distributed freely, without being required to match a next-hop address.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes that have a next-hop router address passed by access list 5 or 80 will be distributed:
route-map namematch ip next-hop 5 80Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightmatch 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 route-map configuration command. To remove the route-source entry, use the no form of this command.
match ip route-source {access-list-number | name}[...access-list-number | name]
no match ip route-source {access-list-number | name}[...access-list-number | name]Syntax Description
access-list-number | name
Number or name of a standard or extended access list. It can be an integer from 1 to 199.
Default
No filtering on route source.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes that have been advertised by routers and access servers at the addresses specified by access lists 5 and 80 will be distributed:
route-map namematch ip route-source 5 80Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightmatch length
To base policy routing on the Level 3 length of a packet, use the match length route-map configuration command. To remove the entry, use the no form of this command.
match length min max
no match length min maxSyntax 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.
Default
No policy routing on the length of a packet.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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.
Example
In the following example, packets 3 to 200 bytes long, inclusive, will be routed to FDDI interface 0:
interface serial 0ip policy route-map interactive!route-map interactivematch length 3 200set interface fddi 0Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match ip address
route-map
set default interface
set interface
set ip default next-hop
set ip next-hopmatch metric
To redistribute routes with the metric specified, use the match metric route-map configuration command. To remove the entry, use the no form of this command.
match metric metric-value
no match metric metric-valueSyntax Description
metric-value
Route metric, which can be an IGRP five-part metric. It is a metric value from 0 to 4294967295.
Default
No filtering on a metric value.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.2.
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.
Example
In the following example, routes with the metric 5 will be redistributed:
route-map namematch metric 5Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightmatch route-type
To redistribute routes of the specified type, use the match route-type route-map configuration command. 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
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0. The following keywords first appeared in Cisco IOS Release 11.2: local and external [type-1 | type-2].
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.
Example
In the following example, internal routes will be redistributed:
route-map namematch route-type internalRelated Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightmatch tag
To redistribute routes in the routing table that match the specified tags, use the match tag route-map configuration command. 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
Default
No match tag values are defined.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes stored in the routing table with tag 5 will be redistributed:
route-map namematch tag 5Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weightmaximum-paths
To control the maximum number of parallel routes an IP routing protocol can support, use the maximum-paths router configuration command. To restore the default value, use the no form of this command.
maximum-paths maximum
no maximum-pathsSyntax 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 Mode
Router configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.2.
Example
The following example allows a maximum of 2 paths to a destination:
maximum-paths 2passive-interface
To disable sending routing updates on an interface, use the passive-interface router configuration command. To reenable the sending of routing updates, use the no form of this command.
passive-interface type number
no passive-interface type numberSyntax Description
Default
Routing updates are sent on the interface.
Command Mode
Router configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
For 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 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.
Enhanced 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 131.108.0.0 except Ethernet interface 1:
router igrp 109network 131.108.0.0passive-interface ethernet 1The 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:
router isis Financepassive-interface Ethernet 0interface Ethernet 1ip router isis Financeinterface serial 0ip router isis Financeredistribute
To redistribute routes from one routing domain into another routing domain, use the redistribute router configuration command. 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] [weight weight] [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] [weight weight] [subnets]Syntax Description
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.
weight weight—No network weight is defined.
subnets—No subnets are defined.Command Mode
Router configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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 keyword level-1-2 allows both 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 route, which gets a metric of 1.
When redistributing routes 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.
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 route, which gets a metric of 1.
Examples
The following are examples of the various configurations you would use to redistribute one routing protocol into another routing protocol.
The following example configuration causes OSPF routes to be redistributed into a BGP domain:
router bgp 109redistribute ospf...The following example configuration causes IGRP routes to be redistributed into an OSPF domain:
router ospf 110redistribute igrp...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.
router ospf 109redistribute igrp 108 metric 100 subnetsredistribute rip metric 200 subnetsIn the following example, BGP routes are configured 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.
router isisredistribute bgp 120 metric 5 metric-type externalRelated Commands
You can use the master indexes or search online to find documentation of related commands.
default-information originate (BGP)
default-information originate (IS-IS)
default-information originate (OSPF)
distribute-list out
route-map
show route-maproute-map
To define the conditions for redistributing routes from one routing protocol into another, or to enable policy routing, use the route-map global configuration command and the match and set route-map configuration commands. 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
Default
No default is available.
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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 related match commands are listed in the section "Related Commands for Redistribution." 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 related match and set commands are listed in the section "Related Commands for Policy Routing." 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 works as follows:
1
If no entry is defined with the supplied tag, an entry is created with sequence-number 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 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 sequence-number is required.
If no route-map map-tag is specified (with no sequence-number), the whole route-map is deleted.
Example
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.
router ospf 109redistribute rip route-map rip-to-ospfroute-map rip-to-ospf permitmatch metric 1set metric 5set metric-type type1set tag 1Related Commands for Redistribution
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight
show route-mapRelated Commands for Policy Routing
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match ip address
match length
set default interface
set interface
set ip default next-hop
set ip next-hopsend-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
Default
Forever (The starting time is January 1, 1993, and the ending time is infinite.)
Command Mode
Key chain key configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Specify a start-time and one of the following: infinite, end-time, or duration seconds.
We recommend running 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.
Example
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.
interface ethernet 0ip rip authentication key-chain treesip rip authentication mode md5!router ripnetwork 172.19.0.0version 2!key chain treeskey 1key-string chestnutaccept-lifetime 13:30:00 Jan 25 1996 duration 7200send-lifetime 14:00:00 Jan 25 1996 duration 3600key 2key-string birchaccept-lifetime 14:30:00 Jan 25 1996 duration 7200send-lifetime 15:00:00 Jan 25 1996 duration 3600Related Commands
You can use the master indexes or search online to find documentation of related commands.
accept-lifetime
key
key chain
key-string
show key chainset automatic-tag
To automatically compute the tag value, use the set automatic-tag route-map configuration command. To disable this function, use the no form of this command.
set automatic-tag
no set automatic-tagSyntax Description
This command has no arguments or keywords.
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, the Cisco IOS software is configured to automatically compute the tag value for the BGP learned routes:
route-map tagmatch as path 10set automatic-tag!router bgp 100table-map tagRelated Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight
show route-mapset 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 route-map configuration command. 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.
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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:
set ip next-hop
set interface
set ip default next-hop
set default interfaceExample
In the following example, packets that have a Level 3 length of 3 to 50 bytes and for which the software has no explicit route to the destination are output to Ethernet interface 0:
interface serial 0ip policy route-map brighton!route-map brightonmatch length 3 50set default interface ethernet 0Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match ip address
match length
route-map
set interface
set ip default next-hop
set ip next-hopset interface
To indicate where to output packets that pass a match clause of route map for policy routing, use the set interface route-map configuration command. 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.
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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:
set ip next-hop
set interface
set ip default next-hop
set default interfaceA useful next hop implies an interface. As soon as a next hop and an interface are found, the packet is routed.
Specifying set interface null 0 is a way to write a policy that the packet be dropped and an "unreachable" message be generated.
Example
In the following example, packets with a Level 3 length of 3 to 50 bytes are output to Ethernet interface 0:
interface serial 0ip policy route-map testing!route-map testingmatch length 3 50set interface ethernet 0Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match ip address
match length
route-map
set default interface
set ip default next-hop
set ip next-hopset 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 route-map configuration command. 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
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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 that appears to be adjacent to the router is used. 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:
set ip next-hop
set interface
set ip default next-hop
set default interfaceExample
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.0access-list 2 permit ip 2.2.2.2 0.0.0.0!interface async 1ip policy route-map equal-access!route-map equal-access permit 10match ip address 1set ip default next-hop 6.6.6.6route-map equal-access permit 20match ip address 2set ip default next-hop 7.7.7.7route-map equal-access permit 30set default interface null0Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match ip address
match length
route-map
set default interface
set interface
set ip next-hopset 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 route-map configuration command. To delete an entry, use the no form of this command.
set ip next-hop ip-address [...ip-address]
no set ip next-hop ip-address [...ip-address]Syntax Description
ip-address
IP address of the next hop to which packets are output. The next hop must be an adjacent router.
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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:
set ip next-hop
set interface
set ip default next-hop
set default interfaceExample
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:
interface serial 0ip policy route-map thataway!route-map thatawaymatch length 3 50set ip next-hop 161.14.2.2Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip policy route-map
match ip address
match length
route-map
set default interface
set interface
set ip default next-hopset ip precedence
To set the precedence value in the IP header, use the set ip precedence route-map configuration command. To instruct the router to leave the precedence value alone, use the no form of this command.
set ip precedence value
no set ip precedenceSyntax Description
Default
The software leaves the value that was there.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.0.
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 in the "Performance Management Commands" chapter in the Configuration Fundamentals Command Reference.
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.
Example
The following example sets the IP precedence to 5 (critical) for packets that pass the route-map match:
interface serial 0ip policy route-map texas!route-map texasmatch length 68 128set ip precedence 5Related Commands
You can use the master indexes or search online to find documentation of related commands.
fair-queue
ip policy route-map
route-mapset level
To indicate where to import routes, use the set level route-map configuration command. 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
Defaults
Disabled
For IS-IS destinations, the default value is level-2. For OSPF destinations, the default value is backbone.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes will be imported into the Level 1 area:
route-map nameset level level-lRelated Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set community
set local-preference
set local-preference
set metric
set metric-type
set next-hop
set origin
set tag
set weight
show route-mapset local-preference
To specify a preference value for the autonomous system path, use the set local-preference route-map configuration command. To delete an entry, use the no form of this command.
set local-preference value
no set local-preference valueSyntax Description
Default
Preference value of 100
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, the local preference is set to 100 for all routes that are included in access list 1:
route-map map-preferencematch as-path 1set local-preference 100Related Commands
You can use the master indexes or search online to find documentation of related commands.
bgp default local-preference
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set metric
set metric-type
set next-hop
set origin
set tag
set weightset metric
To set the metric value for a routing protocol, use the set metric route-map configuration command. To return to the default metric value, use the no form of this command.
set metric metric-value
no set metric metric-valueSyntax Description
metric-value
Metric value; an integer from -294967295 to 294967295. This argument applies to all routing protocols except IGRP and IP Enhanced IGRP.
Default
The dynamically-learned metric value.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Note
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.
Example
In the following example, the metric value for the routing protocol is set to 100:
route-map set-metricset metric 100Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set community
set level
set local-preference
set metric-type
set next-hop
set origin
set tag
set weight
show route-mapset metric-type
To set the metric type for the destination routing protocol, use the set metric-type route-map configuration command. 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.
external
IS-IS external metric.
type-1
OSPF external type 1 metric.
type-2
OSPF external type 2 metric.
Default
Disabled
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, the metric type of the destination protocol is set to OSPF external type 1:
route-map map-typeset metric-type type-1Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set next-hop
set origin
set tag
set weight
show route-mapset next-hop
To specify the address of the next hop, use the set next-hop route-map configuration command. To delete an entry, use the no form of this command.
set next-hop next-hop
no set next-hop next-hopSyntax Description
Default
Default next-hop address.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes that pass the access list have the next hop set to 198.92.70.24:
route-map map_hopmatch address 5set next-hop 198.92.70.24Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set origin
set tag
set weight
show route-mapset origin
To set the BGP origin code, use the set origin route-map configuration command. To delete an entry, use the no form of this command.
set origin {igp | egp autonomous-system | incomplete}
Syntax Description
igp
Remote IGP.
egp
Local EGP.
autonomous-system
Remote autonomous system. This is an integer from 0 to 65535.
incomplete
Unknown heritage.
Default
Default origin, based on route in main IP routing table.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, routes that pass the route map have the origin set to IGP:
route-map set_originmatch as-path 10set origin igpRelated Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set tag
set weight
show route-mapset tag
To set a tag value of the destination routing protocol, use the set tag route-map configuration command. To delete the entry, use the no form of this command.
set tag tag-value
no set tag tag-valueSyntax Description
Default
If not specified, the default action is to forward the tag in the source routing protocol onto the new destination protocol.
Command Mode
Route-map configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
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.
Example
In the following example, the tag value of the destination routing protocol is set to 5:
route-map tagset tag 5Related Commands
You can use the master indexes or search online to find documentation of related commands.
match as-path
match community-list
match interface
match ip address
match ip next-hop
match ip route-source
match metric
match route-type
match tag
route-map
set as-path
set automatic-tag
set community
set level
set local-preference
set metric
set metric-type
set next-hop
set origin
set weight
show route-mapshow ip cache policy
To display the cache entries in the policy route-cache, use the show ip cache policy EXEC command.
show ip cache policy
Syntax Description
This command has no arguments or keywords.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.3.
Sample Display
The following is sample output from the show ip cache policy command:
Router# show ip cache policyTotal adds 10, total deletes 10Type Routemap/sequence Age Interface Next HopNH george/10 00:04:31 Ethernet0 171.69.1.2Int george/30 00:01:23 Serial4 171.69.5.129describes the significant fields in the display.
Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip route-cache
show ip local policy
To display the route map used for local policy routing, if any, use the show ip local policy EXEC command.
show ip local policy
Syntax Description
This command has no arguments or keywords.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Sample Display
The following is sample output from the show ip local policy command:
Router# show ip local policyLocal policy routing is enabled, using route map equalroute-map equal, permit, sequence 10Match clauses:length 150 200Set clauses:ip next-hop 10.10.11.254Policy routing matches: 0 packets, 0 bytesroute-map equal, permit, sequence 20Match clauses:ip address (access-lists): 101Set clauses:ip next-hop 10.10.11.14Policy routing matches: 2 packets, 172 bytesdescribes the fields in the display.
Related Commands
You can use the master indexes or search online to find documentation of related commands.
ip local policy route-map
match ip address
match length
route-map
set default interface
set interface
set ip default next-hop
set ip next-hopshow ip policy
To display the route map used for policy routing, use the show ip policy EXEC command.
show ip policy
Syntax Description
This command has no arguments or keywords.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Sample Displays
The following is sample output from the show ip policy command:
Router# show ip policyInterface Route maplocal equalEthernet0 equalThe following is sample output from the show route-map command, which relates to the preceding sample display:
Router# show route-maproute-map equal, permit, sequence 10Match clauses:length 150 200Set clauses:ip next-hop 10.10.11.254Policy routing matches: 0 packets, 0 bytesroute-map equal, permit, sequence 20Match clauses:ip address (access-lists): 101Set clauses:ip next-hop 10.10.11.14Policy routing matches: 144 packets, 15190 bytesdescribes the fields in the display.
Related Commands
You can use the master indexes or search online to find documentation of related commands.
match ip address
match length
route-map
set default interface
set interface
set ip default next-hop
set ip next-hopshow ip protocols
To display the parameters and current state of the active routing protocol process, use the show ip protocols EXEC command.
show ip protocols
Syntax Description
This command has no arguments or keywords.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
The information displayed by show ip protocols 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.
Sample Displays
The following is sample output from the show ip protocols command, showing IGRP processes:
Router# show ip protocolsRouting Protocol is "igrp 109"Sending updates every 90 seconds, next due in 44 secondsInvalid after 270 seconds, hold down 280, flushed after 630Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setDefault networks flagged in outgoing updatesDefault networks accepted from incoming updatesIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0IGRP maximum hopcount 100IGRP maximum metric variance 1Redistributing: igrp 109Routing for Networks:198.92.72.0Routing Information Sources:Gateway Distance Last Update198.92.72.18 100 0:56:41198.92.72.19 100 6d19198.92.72.22 100 0:55:41198.92.72.20 100 0:01:04198.92.72.30 100 0:01:29Distance: (default is 100)Routing Protocol is "bgp 1878"Sending updates every 60 seconds, next due in 0 secondsOutgoing update filter list for all interfaces is 1Incoming update filter list for all interfaces is not setRedistributing: igrp 109IGP synchronization is disabledAutomatic route summarization is enabledNeighbor(s):Address FiltIn FiltOut DistIn DistOut Weight RouteMap192.108.211.17 1192.108.213.89 1198.6.255.13 1198.92.72.18 1198.92.72.19198.92.84.17 1Routing for Networks:192.108.209.0192.108.211.0198.6.254.0Routing Information Sources:Gateway Distance Last Update198.92.72.19 20 0:05:28Distance: external 20 internal 200 local 200describes significant fields shown in the display.
The following is sample output from the show ip protocols command, showing Enhanced IGRP processes:
Router# show ip protocolsRouting Protocol is "eigrp 77"Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: eigrp 77Automatic network summarization is in effectRouting for Networks:160.89.0.0Routing Information Sources:Gateway Distance Last Update160.89.81.28 90 0:02:36160.89.80.28 90 0:03:04160.89.80.31 90 0:03:04Distance: internal 90 external 170describes the fields that might be shown in the display.
The following is sample output from the show ip protocols command, showing IS-IS processes:
Router# show ip protocolsRouting Protocol is "isis"Sending updates every 0 secondsInvalid after 0 seconds, hold down 0, flushed after 0Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: isisAddress Summarization:NoneRouting for Networks:Serial0Routing Information Sources:Distance: (default is 115)The following is sample output from the show ip protocols command, showing RIP processes:
Router# show ip protocolsRouting Protocol is "rip"Sending updates every 30 seconds, next due in 2 secondsInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces is not setIncoming update filter list for all interfaces is not setRedistributing: ripDefault version control: send version 2, receive version 2Interface Send Recv Key-chainEthernet0 2 2 treesFddi0 2 2Routing for Networks:172.19.0.02.0.0.03.0.0.0Routing Information Sources:Gateway Distance Last UpdateDistance: (default is 120)show ip route
Use the show ip route EXEC command to display the current state of the routing table.
show ip route [address [mask] [longer-prefixes]] | [protocol [process-id]]
Syntax Description
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 9.2. The "D—EIGRP, EX—EIGRP external, N1—OSPF NSSA external type 1 route and N2—OSPF NSSA external type 2 route" codes first appeared in Cisco IOS Release 10.0. The process-id argument first appeared in Cisco IOS
Release 10.3. The longer-prefixes keyword first appeared in Cisco IOS Release 11.0. The "U—per-user static route" code first appeared in Cisco IOS Release 11.1. The "o—on-demand routing" code first appeared in Cisco IOS Release 11.2. In Release 11.3 the output of the show ip route IP-address command was enhanced to display the origination of an IP route in IS-IS networks.Sample Displays
The following is sample output from the show ip route command when entered without an address:
Router# show ip routeCodes: 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, U - per-user static route, o - on-demand routing,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 routeGateway of last resort is 131.119.254.240 to network 129.140.0.0O E2 150.150.0.0 [160/5] via 131.119.254.6, 0:01:00, Ethernet2E 192.67.131.0 [200/128] via 131.119.254.244, 0:02:22, Ethernet2O E2 192.68.132.0 [160/5] via 131.119.254.6, 0:00:59, Ethernet2O E2 130.130.0.0 [160/5] via 131.119.254.6, 0:00:59, Ethernet2E 128.128.0.0 [200/128] via 131.119.254.244, 0:02:22, Ethernet2E 129.129.0.0 [200/129] via 131.119.254.240, 0:02:22, Ethernet2E 192.65.129.0 [200/128] via 131.119.254.244, 0:02:22, Ethernet2E 131.131.0.0 [200/128] via 131.119.254.244, 0:02:22, Ethernet2E 192.75.139.0 [200/129] via 131.119.254.240, 0:02:23, Ethernet2E 192.16.208.0 [200/128] via 131.119.254.244, 0:02:22, Ethernet2E 192.84.148.0 [200/129] via 131.119.254.240, 0:02:23, Ethernet2E 192.31.223.0 [200/128] via 131.119.254.244, 0:02:22, Ethernet2E 192.44.236.0 [200/129] via 131.119.254.240, 0:02:23, Ethernet2E 140.141.0.0 [200/129] via 131.119.254.240, 0:02:22, Ethernet2E 141.140.0.0 [200/129] via 131.119.254.240, 0:02:23, Ethernet2The following is sample output that includes some IS-IS Level 2 routes learned:
Router# show ip routeCodes: 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, U - per-user static route, o - on-demand routing,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 routeGateway of last resort is not set160.89.0.0 is subnetted (mask is 255.255.255.0), 3 subnetsC 160.89.64.0 255.255.255.0 is possibly down,routing via 0.0.0.0, Ethernet0i L2 160.89.67.0 [115/20] via 160.89.64.240, 0:00:12, Ethernet0i L2 160.89.66.0 [115/20] via 160.89.64.240, 0:00:12, Ethernet0describes significant fields shown in these two displays.
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 131.119.0.0.
Router# show ip route 131.119.0.0Routing entry for 131.119.0.0 (mask 255.255.0.0)Known via "igrp 109", distance 100, metric 10989Tag 0Redistributing via igrp 109Last update from 131.108.35.13 on TokenRing0, 0:00:58 agoRouting Descriptor Blocks:* 131.108.35.13, from 131.108.35.13, 0:00:58 ago, via TokenRing0Route metric is 10989, traffic share count is 1Total delay is 45130 microseconds, minimum bandwidth is 1544 KbitReliability 255/255, minimum MTU 1500 bytesLoading 2/255, Hops 4When 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.1Routing entry for 10.0.0.1/32Known via "isis", distance 115, metric 20, type level-1Redistributing via isisLast update from 223.191.255.251 on Fddi1/0, 00:00:13 agoRouting Descriptor Blocks:* 10.22.22.2, from 223.191.255.247, via Serial2/3Route metric is 20, traffic share count is 1223.191.255.251, from 223.191.255.247, via Fddi1/0Route metric is 20, traffic share count is 1Compare 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 isis10.0.0.0/8 is variably subnetted, 2 subnets, 2 masksi L1 10.0.0.1/32 [115/20] via 10.22.22.2, Serial2/3[115/20] via 223.191.255.251, Fddi1/022.0.0.0/24 is subnetted, 2 subnetsi L1 22.22.23.0 [115/20] via 223.191.255.252, Fddi1/0describes significant fields shown in this last display. describes significant fields shown when using the show ip route command with an IP address (previous displays).
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-prefixesCodes: 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, U - per-user static route, o - on-demand routing,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 routeGateway of last resort is not setS 134.134.0.0 is directly connected, Ethernet0S 131.131.0.0 is directly connected, Ethernet0S 129.129.0.0 is directly connected, Ethernet0S 128.128.0.0 is directly connected, Ethernet0S 198.49.246.0 is directly connected, Ethernet0S 192.160.97.0 is directly connected, Ethernet0S 192.153.88.0 is directly connected, Ethernet0S 192.76.141.0 is directly connected, Ethernet0S 192.75.138.0 is directly connected, Ethernet0S 192.44.237.0 is directly connected, Ethernet0S 192.31.222.0 is directly connected, Ethernet0S 192.16.209.0 is directly connected, Ethernet0S 144.145.0.0 is directly connected, Ethernet0S 140.141.0.0 is directly connected, Ethernet0S 139.138.0.0 is directly connected, Ethernet0S 129.128.0.0 is directly connected, Ethernet0172.19.0.0 255.255.255.0 is subnetted, 1 subnetsC 172.19.64.0 is directly connected, Ethernet0171.69.0.0 is variably subnetted, 2 subnets, 2 masksC 171.69.232.32 255.255.255.240 is directly connected, Ethernet0S 171.69.0.0 255.255.0.0 is directly connected, Ethernet0Router#Related Commands
You can use the master indexes or search online to find documentation of related commands.
show interfaces tunnel
show ip route summaryshow ip route summary
To display the current state of the routing table, use the show ip route summary EXEC command.
show ip route summary
Syntax Description
This command has no arguments or keywords.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Sample Display
The following is sample output from the show ip route summary command:
Router# show ip route summaryRoute Source Networks Subnets Overhead Memory (bytes)connected 0 3 126 360static 1 2 126 360igrp 109 747 12 31878 91080internal 3 360Total 751 17 32130 92160Router#describes the fields shown in the display:
Related Commands
You can use the master indexes or search online to find documentation of related commands.
show ip route supernets-only
To display information about supernets, use the show ip route supernets-only privileged EXEC command.
show ip route supernets-only
Syntax Description
This command has no arguments or keywords.
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Sample Display
The following is sample output from the show ip route supernets-only command. This display shows supernets only; it does not show subnets.
Router# show ip route supernets-onlyCodes: I - IGRP derived, R - RIP derived, O - OSPF derivedC - connected, S - static, E - EGP derived, B - BGP derivedi - IS-IS derived, D - EIGRP derived* - candidate default route, IA - OSPF inter area routeE1 - OSPF external type 1 route, E2 - OSPF external type 2 routeL1 - IS-IS level-1 route, L2 - IS-IS level-2 routeEX - EIGRP external routeGateway of last resort is not setB 198.92.0.0 (mask is 255.255.0.0) [20/0] via 198.92.72.30, 0:00:50B 192.0.0.0 (mask is 255.0.0.0) [20/0] via 198.92.72.24, 0:02:50describes the fields in the display.
show key chain
To display authentication key information, use the show key chain EXEC command.
show key chain [name-of-chain]
Syntax Description
Default
Information about all key chains is displayed.
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
Sample Display
The following is sample output from the show key chain command:
Router#show key chainKey-chain flintstone:key 1 -- text "fred"accept lifetime (always valid) - (always valid) [valid now]send lifetime (always valid) - (always valid) [valid now]key 2 -- text "barney"accept lifetime (00:00:00 Dec 5 1995) - (23:59:59 Dec 5 1995)send lifetime (06:00:00 Dec 5 1995) - (18:00:00 Dec 5 1995)Related Commands
You can use the master indexes or search online to find documentation of related commands.
accept-lifetime
key
key chain
key-string
send-lifetimeshow route-map
To display configured route-maps, use the show route-map EXEC command.
show route-map [map-name]
Syntax Description
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Sample Display
The following is sample output from the show route-map command:
Router# show route-maproute-map abc, permit, sequence 10Match clauses:tag 1 2Set clauses:metric 5route-map xyz, permit, sequence 20Match clauses:tag 3 4Set clauses:metric 6describes the fields shown in the display:
Related Commands
You can use the master indexes or search online to find documentation of related commands.
Posted: Tue Sep 14 17:01:38 PDT 2004
All contents are Copyright © 1992--2004 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.