Sie sind auf Seite 1von 34

Reliable Static Routing Backup Using Object Tracking

The Reliable Static Routing Backup Using Object Tracking feature introduces the ability for the Cisco IOS software to use Internet Control Message Protocol (ICMP) pings to identify when a Point-to-Point over Ethernet (PPPoE) or IP Security Protocol (IPSec) Virtual Private Network (VPN) tunnel goes down, allowing the initiation of a backup connection from any alternative port. The Reliable Static Routing Backup Using Object Tracking feature is compatible with both preconfigured static routes and Dynamic Host Configuration Protocol (DHCP) configurations.
Feature History for Reliable Static Routing Backup Using Object Tracking
Release Modification

12.3(2)XE 12.3(8)T 12.3(14)T

This feature was introduced. Support for this feature was integrated into Cisco IOS Release 12.3(8)T. The Cisco IOS command-line interface (CLI) used to configure the Cisco IOS IP Service Level Agreements (SLAs) monitoring and management feature set was modified. This feature was integrated into Cisco IOS Release 12.2(33)SRA. This feature was integrated into Cisco IOS Release 12.2(33)SXH.

12.2(33)SRA 12.2(33)SXH

Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Americas Headquarters: Cisco Systems, Inc., 170 West Tasman Drive, San Jose, CA 95134-1706 USA

20032007 Cisco Systems, Inc. All rights reserved.

Reliable Static Routing Backup Using Object Tracking Contents

Contents

Prerequisites for Reliable Static Routing Backup Using Object Tracking, page 2 Restrictions for Reliable Static Routing Backup Using Object Tracking, page 2 Information About Reliable Static Routing Backup Using Object Tracking, page 2 How to Configure Reliable Static Routing Backup Using Object Tracking, page 4 Configuration Examples for Reliable Static Routing Backup Using Object Tracking, page 23 Additional References, page 26 Command Reference, page 27

Prerequisites for Reliable Static Routing Backup Using Object Tracking


Dial-on-demand routing (DDR) must be configured if the backup connection is configured on a dialer interface. For more information on configuring DDR, refer to the Dial-on-Demand Routing Configuration part of the Cisco IOS Dial Technologies Configuration Guide.

Restrictions for Reliable Static Routing Backup Using Object Tracking


This feature is supported in all Cisco IOS software images for the Cisco 1700 series modular access routers except the Cisco IOS IP Base image.

Information About Reliable Static Routing Backup Using Object Tracking


To configure the Reliable Static Routing Backup Using Object Tracking feature, you should understand the following concepts:

Reliable Static Routing Backup Using Object Tracking, page 2 Cisco IOS IP SLAs, page 3 Benefits of Reliable Static Routing Backup Using Object Tracking, page 3

Reliable Static Routing Backup Using Object Tracking


The Reliable Static Routing Backup Using Object Tracking feature introduces the ability to reliably back up PPPoE or IPSec VPN deployments by initiating a DDR connection from an alternative port if the circuit to the primary gateway is interrupted. The Reliable Static Routing Backup Using Object Tracking feature can ensure reliable backup in the case of several catastrophic events, such as Internet circuit failure or peer device failure. A typical scenario is shown in Figure 1.

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking Information About Reliable Static Routing Backup Using Object Tracking

Figure 1

Reliable Static Routing Backup Using Object Tracking Network Diagram

Primary_GW Main office 172.16.23.7

Tracked object Internet

Primary interface 10.1.1.1 Remote LAN Secondary interface 10.2.2.2


103087

PSTN/ISP

Traffic from the remote LAN is forwarded to the main office from the primary interface of the remote router. If the connection to the main office is lost, the status of the tracked object changes from up to down. When the state of the tracked object changes to down, the routing table entry for the primary interface is removed and the preconfigured floating static route is installed on the secondary interface. Traffic is then forwarded to the preconfigured destination from the secondary interface. If DDR is configured on the secondary interface, interesting traffic will trigger DDR. The backup circuit can be configured to use the public switched telephone network (PSTN) or the Internet. When the state of the tracked object changes from down to up, the routing table entry for the primary interface is reinstalled and the floating static route for the secondary interface is removed.

Cisco IOS IP SLAs


The Reliable Static Routing Backup Using Object Tracking feature uses Cisco IOS IP SLAs, a network monitoring feature set, to generate ICMP pings to monitor the state of the connection to the primary gateway. Cisco IOS IP SLAs is configured to ping a target, such as a publicly routable IP address or a target inside the corporate network. The pings are routed from the primary interface only. A track object is created to monitor the status of the Cisco IOS IP SLAs configuration. The track object informs the client, the static route, if a state change occurs. The preconfigured floating static route on the secondary interface will be installed when the state changes from up to down. HTTP GET, User Datagram Protocol (UDP) echo, or any other protocol supported by Cisco IOS IP SLAs can be used instead of ICMP pings.

Benefits of Reliable Static Routing Backup Using Object Tracking


PPPoE and IPSec VPN deployments provide cost-effective and secure Internet-based solutions that can replace traditional dialup and Frame Relay circuits. The Reliable Static Routing Backup Using Object Tracking feature can determine the state of the primary connection without enabling a dynamic routing protocol. The Reliable Static Routing Backup Using Object Tracking feature introduces a reliable backup solution for PPPoE and IPSec VPN deployments, allowing these solutions to be used for critical circuits that must not go down without a backup circuit automatically engaging.

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

How to Configure Reliable Static Routing Backup Using Object Tracking


This section contains the following tasks:

Configuring the Primary Interface for Reliable Static Routing Backup Using Object Tracking, page 4 (required) Configuring the Backup Interface for Reliable Static Routing Backup Using Object Tracking, page 7 (required) Configuring Network Monitoring with Cisco IOS IP SLAs for Reliable Static Routing Backup Using Object Tracking, page 8 (required) Configuring the Routing Policy for Reliable Static Routing Backup Using Object Tracking, page 14 (required) Configuring the Default Route for the Primary Interface Using Static Routing, page 21 (required) Configuring a Floating Static Default Route on the Secondary Interface, page 22 (required) Verifying the State of the Tracked Object for Reliable Static Routing Backup Using Object Tracking, page 22 (optional)

Configuring the Primary Interface for Reliable Static Routing Backup Using Object Tracking
You must configure the connection between the primary interface and the remote gateway. The status of this connection will be monitored by the Reliable Static Routing Backup Using Object Tracking feature. The primary interface can be configured in one of three ways: for PPPoE, DHCP, or static routing. You must choose one of these configuration types. If you are unsure of which method to use with your network configuration, consult your Internet service provider (ISP) or network administrator. Perform one of the following tasks to configure the primary interface:

Configuring the Primary Interface for PPPoE, page 4 Configuring the Primary Interface for DHCP, page 5 Configuring the Primary Interface for Static Routing, page 7

Configuring the Primary Interface for PPPoE


Perform this task to configure the primary interface if you are using PPPoE.

SUMMARY STEPS
1. 2. 3. 4. 5.

enable configure terminal interface type number [name-tag] description string no ip address

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

6. 7.

pvc [name] vpi/vci [ces | ilmi | qsaal | smds | l2transport] pppoe-client dial-pool-number number [dial-on-demand]

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

interface type number [name-tag]

Configures an interface type and enters interface configuration mode.

Example:
Router(config)# interface ATM 0

Step 4

description string

Adds a description to an interface configuration.

Example:
Router(config-if)# description primary-link

Step 5

no ip address

Sets a primary or secondary IP address for an interface.

Example:
Router(config-if)# no ip address

Step 6

pvc [name] vpi/vci [ces | ilmi | qsaal | smds | l2transport] Example: Router(config-if)# pvc 0/33

Creates or assigns a name to an ATM permanent virtual circuit (PVC), specifies the encapsulation type on an ATM PVC, and enters ATM virtual circuit configuration mode.

Step 7

pppoe-client dial-pool-number number [dial-on-demand]

Configures a PPPoE client and specifies DDR functionality.

Example:
Router(config-if-atm-vc)# pppoe-client dial-pool-number 1

Configuring the Primary Interface for DHCP


Perform this task to configure the primary interface if you are using DHCP.

SUMMARY STEPS
1. 2.

enable configure terminal

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

3. 4. 5. 6.

interface type number [name-tag] description string ip dhcp client route track number ip address dhcp

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

interface type number [name-tag]

Configures an interface type and enters interface configuration mode.

Example:
Router(config)# interface FastEthernet 0/0

Step 4

description string

Adds a description to an interface configuration.

Example:
Router(config-if)# description primary-link

Step 5

ip dhcp client route track number

Configures the DHCP client to associate any added routes with the specified track number.

Example:
Router(config-if)# ip dhcp client route track 123

route track numberAssociates a track object with the DHCP-installed static route. Valid values for the number argument range from 1 to 500. You must configure the ip dhcp client command before issuing the ip address dhcp command on an interface. The ip dhcp client command is checked only when an IP address is acquired from DHCP. If the ip dhcp client command is issued after an IP address has been acquired from DHCP, it will not take effect until the next time the router acquires an IP address from DHCP.

Note

Step 6

ip address dhcp

Acquires an IP address on an Ethernet interface from DHCP.

Example:
Router(config-if)# ip address dhcp

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Configuring the Primary Interface for Static Routing


Perform this task to configure the primary interface if you are using static routing.

SUMMARY STEPS
1. 2. 3. 4. 5.

enable configure terminal interface type number [name-tag] description string ip address ip-address mask [secondary]

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

interface type number [name-tag]

Configures an interface type and enters interface configuration mode.

Example:
Router(config)# interface FastEthernet 0/0

Step 4

description string

Adds a description to an interface configuration.

Example:
Router(config-if)# description primary-link

Step 5

ip address ip-address mask [secondary]

Sets a primary or secondary IP address for an interface.

Example:
Router(config-if)# ip address 10.1.1.1 255.0.0.0

Configuring the Backup Interface for Reliable Static Routing Backup Using Object Tracking
You must configure a backup interface to contact the remote gateway. If the connection between the primary interface and the remote gateway goes down, the backup interface will be used. Perform the following task to configure the backup interface. This task applies to PPPoE, DHCP, and static routing configurations.

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

SUMMARY STEPS
1. 2. 3. 4. 5.

enable configure terminal interface type number [name-tag] description string ip address ip-address mask [secondary]

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

interface type number [name-tag]

Configures an interface type and enters interface configuration mode.

Example:
Router(config)# interface Dialer 0

Step 4

description string

Adds a description to an interface configuration.

Example:
Router(config-if)# description backup-link

Step 5

ip address ip-address mask [secondary]

Sets a primary or secondary IP address for an interface.

Example:
Router(config-if)# ip address 10.2.2.2 255.0.0.0

Configuring Network Monitoring with Cisco IOS IP SLAs for Reliable Static Routing Backup Using Object Tracking
The Reliable Static Routing Backup Using Object Tracking feature uses a Cisco IOS IP SLAs configuration to generate ICMP pings to monitor the state of the connection to the primary gateway. Beginning in Cisco IOS Release 12.3(14)T, the CLI used to configure Cisco IOS IP SLAs was modified.

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Perform one of the following tasks to configure Cisco IOS IP SLAs depending on which Cisco IOS software release you are running:

Configuring Cisco IOS IP SLAs for Cisco IOS Release 12.3(8)T, 12.3(11)T, and 12.2(33)SRA, page 9 Configuring Cisco IOS IP SLAs for Cisco IOS Release 12.3(14)T, 12.4, 12.4(2)T, and 12.2(33)SXH, page 10 Configuring Cisco IOS IP SLAs for Cisco IOS Release 12.4(4)T and Later Releases, page 12

Configuring Cisco IOS IP SLAs for Cisco IOS Release 12.3(8)T, 12.3(11)T, and 12.2(33)SRA
Perform this task to create an IP SLAs configuration to ping the target address. This task applies to PPPoE, DHCP, and static routing configurations.

SUMMARY STEPS
1. 2. 3. 4. 5. 6. 7. 8. 9.

enable configure terminal rtr [operation-number] type echo protocol ipIcmpEcho {destination-ip-address | destination-hostname} [source-ipaddr {ip-address | hostname} timeout milliseconds frequency seconds threshold milliseconds exit rtr schedule operation-number [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds]

10. track object-number rtr rtr-operation {state | reachability}

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

rtr [operation-number]

Begins configuration for a Cisco IOS IP SLAs operation and enters RTR configuration mode.

Example:
Router(config)# rtr 1

Multiple Cisco IOS Releases

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 4
type echo protocol ipIcmpEcho {destination-ip-address | destination-hostname} [source-ipaddr {ip-address | hostname}

Purpose Configures a Cisco IOS IP SLAs end-to-end echo response time probe operation.

Example:
Router(config-rtr)# type echo protocol ipIcmpEcho 172.16.23.7

Step 5

timeout milliseconds

Sets the amount of time for which the Cisco IOS IP SLAs operation waits for a response from its request packet.

Example:
Router(config-rtr)# timeout 1000

Step 6

frequency seconds

Sets the rate at which a specified Cisco IOS IP SLAs operation is sent into the network.

Example:
Router(config-rtr)# frequency 3

Step 7

threshold milliseconds

Example:
Router(config-rtr)# threshold 2

Sets the rising threshold (hysteresis) that generates a reaction event and stores history information for the Cisco IOS IP SLAs operation. Exits RTR configuration mode.

Step 8

exit

Example:
Router(config-rtr)# exit

Step 9

rtr schedule operation-number [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds]

Configures a Cisco IOS IP SLAs ICMP echo operation.

Example:
Router(config)# rtr schedule 1 life forever start-time now

Step 10

track object-number rtr rtr-operation {state | reachability}

Tracks the state of a Cisco IOS IP SLAs operation and enters tracking configuration mode.

Example:
Router(config)# track 123 rtr 1 reachability

Configuring Cisco IOS IP SLAs for Cisco IOS Release 12.3(14)T, 12.4, 12.4(2)T, and 12.2(33)SXH
Perform this task to create an IP SLAs configuration to ping the target address. This task applies to PPPoE, DHCP, and static routing configurations.

SUMMARY STEPS
1. 2. 3.

enable configure terminal ip sla monitor [operation-number]

Multiple Cisco IOS Releases

10

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

4. 5. 6. 7. 8. 9.

type echo protocol ipIcmpEcho {destination-ip-address | destination-hostname} [source-ipaddr {ip-address | hostname} | source-interface interface-name] timeout milliseconds frequency seconds threshold milliseconds exit ip sla monitor schedule operation-number [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds] [recurring]

10. track object-number rtr rtr-operation {state | reachability}

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

ip sla monitor [operation-number]

Begins configuring a Cisco IOS IP SLAs operation and enters IP SLA monitor configuration mode.

Example:
Router(config)# ip sla monitor 1

Step 4

type echo protocol ipIcmpEcho {destination-ip-address | destination-hostname} [source-ipaddr {ip-address | hostname} | source-interface interface-name]

Configures a Cisco IOS IP SLAs end-to-end ICMP echo response time operation.

Example:
Router(config-sla-monitor)# type echo protocol ipIcmpEcho 172.16.23.7

Step 5

timeout milliseconds

Sets the amount of time for which the Cisco IOS IP SLAs operation waits for a response from its request packet.

Example:
Router(config-sla-monitor-echo)# timeout 1000

Step 6

frequency seconds

Sets the rate at which a specified Cisco IOS IP SLAs operation is sent into the network.

Example:
Router(config-sla-monitor-echo)# frequency 3

Step 7

threshold milliseconds

Example:
Router(config-sla-monitor-echo)# threshold 2

Sets the rising threshold (hysteresis) that generates a reaction event and stores history information for the Cisco IOS IP SLAs operation.

Multiple Cisco IOS Releases

11

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 8
exit

Purpose Exits IP SLAs ICMP echo configuration mode.

Example:
Router(config-sla-monitor-echo)# exit

Step 9

ip sla monitor schedule operation-number [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds] [recurring]

Configures the scheduling parameters for a single Cisco IOS IP SLAs operation.

Example:
Router(config)# ip sla monitor schedule 1 life forever start-time now

Step 10

track object-number rtr rtr-operation {state | reachability}

Tracks the state of a Cisco IOS IP SLAs operation and enters tracking configuration mode.

Example:
Router(config)# track 123 rtr 1 reachability

Configuring Cisco IOS IP SLAs for Cisco IOS Release 12.4(4)T and Later Releases
Perform this task to create an IP SLAs configuration to ping the target address. This task applies to PPPoE, DHCP, and static routing configurations.

SUMMARY STEPS
1. 2. 3. 4. 5. 6. 7. 8. 9.

enable configure terminal ip sla [operation-number] icmp-echo {destination-ip-address | destination-hostname} [source-ip {ip-address | hostname} | source-interface interface-name] timeout milliseconds frequency seconds threshold milliseconds exit ip sla schedule operation-number [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds] [recurring]

10. track object-number rtr rtr-operation {state | reachability}

Multiple Cisco IOS Releases

12

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

ip sla [operation-number]

Begins configuring a Cisco IOS IP SLAs operation and enters IP SLA configuration mode.

Example:
Router(config)# ip sla 1

Step 4

icmp-echo {destination-ip-address | destination-hostname} [source-ip {ip-address | hostname} | source-interface interface-name]

Configures a Cisco IOS IP SLAs end-to-end ICMP echo response time operation.

Example:
Router(config-ip-sla)# icmp-echo 172.16.23.7

Step 5

timeout milliseconds

Sets the amount of time for which the Cisco IOS IP SLAs operation waits for a response from its request packet.

Example:
Router(config-ip-sla-echo)# timeout 1000

Step 6

frequency seconds

Sets the rate at which a specified Cisco IOS IP SLAs operation is sent into the network.

Example:
Router(config-ip-sla-echo)# frequency 3

Step 7

threshold milliseconds

Example:
Router(config-ip-sla-echo)# threshold 2

Sets the rising threshold (hysteresis) that generates a reaction event and stores history information for the Cisco IOS IP SLAs operation. Exits IP SLAs ICMP echo configuration mode.

Step 8

exit

Example:
Router(config-ip-sla-echo)# exit

Multiple Cisco IOS Releases

13

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 9
ip sla schedule operation-number [life {forever | seconds}] [start-time {hh:mm[:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds] [recurring]

Purpose Configures the scheduling parameters for a single Cisco IOS IP SLAs operation.

Example:
Router(config)# ip sla schedule 1 life forever start-time now

Step 10

track object-number rtr rtr-operation {state | reachability}

Tracks the state of a Cisco IOS IP SLAs operation and enters tracking configuration mode.

Example:
Router(config)# track 123 rtr 1 reachability

Configuring the Routing Policy for Reliable Static Routing Backup Using Object Tracking
In order to track the status of the primary connection to the remote gateway, the Cisco IOS IP SLAs ICMP pings must be routed only from the primary interface. Perform one of the following tasks to configure a routing policy that will ensure that the Cisco IOS IP SLAs pings are always routed out of the primary interface:

Configuring a Routing Policy for PPPoE, page 14 Configuring a Routing Policy for DHCP, page 16 Configuring a Routing Policy for Static Routing, page 17

Configuring a Routing Policy for PPPoE


Perform this task to configure a routing policy if the primary interface is configured for PPPoE.

SUMMARY STEPS
1. 2. 3.

enable configure terminal access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments] route-map map-tag [permit | deny] [sequence-number] match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] set interface type number [... type number] exit ip local policy route-map map-tag

4. 5. 6. 7. 8.

Multiple Cisco IOS Releases

14

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments]

Defines an extended IP access list.

Example:
Router(config)# access-list 101 permit icmp any host 172.16.23.7 echo

Step 4

route-map map-tag [permit | deny] [sequence-number]

Enters route-map configuration mode and defines the conditions for redistributing routes from one routing protocol into another.

Example:
Router(config)# route-map MY-LOCAL-POLICY permit 10

Step 5

match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name]

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, or performs policy routing on packets.

Example:
Router(config-route-map)# match ip address 101

Step 6

set interface type number [... type number]

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

Example:
Router(config-route-map)# set interface null 0

The interface must be configured for null 0 in this scenario. If the next hop is not set because the interface is down, the packet will be routed to the null interface and discarded. Otherwise policy routing will fail and the packet will be routed using the Routing Information Base (RIB) card. Routing the packet using the RIB card is undesirable.

Multiple Cisco IOS Releases

15

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 7
exit

Purpose Exits route-map configuration mode.

Example:
Router(config-route-map)# exit

Step 8

ip local policy route-map map-tag

Identifies a route map to use for local policy routing.

Example:
Router(config)# ip local policy route-map MY-LOCAL-POLICY

Configuring a Routing Policy for DHCP


Perform this task to configure a routing policy if the primary interface is configured for DHCP.

SUMMARY STEPS
1. 2. 3.

enable configure terminal access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments] route-map map-tag [permit | deny] [sequence-number] match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] set ip next-hop dynamic dhcp exit ip local policy route-map map-tag

4. 5. 6. 7. 8.

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Multiple Cisco IOS Releases

16

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 3
access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments]

Purpose Defines an extended IP access list.

Example:
Router(config)# access-list 101 permit icmp any host 172.16.23.7 echo

Step 4

route-map map-tag [permit | deny] [sequence-number]

Enters route-map configuration mode and defines the conditions for redistributing routes from one routing protocol into another.

Example:
Router(config)# route-map MY-LOCAL-POLICY permit 10

Step 5

match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name]

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, or performs policy routing on packets.

Example:
Router(config-route-map)# match ip address 101

Step 6

set ip next-hop dynamic dhcp

Sets the next hop to the gateway that was most recently learned by the DHCP client.

Example:
Router(config-route-map)# set ip next-hop dynamic dhcp

Step 7

exit

Exits route-map configuration mode.

Example:
Router(config-route-map)# exit

Step 8

ip local policy route-map map-tag

Identifies a route map to use for local policy routing.

Example:
Router(config)# ip local policy route-map MY-LOCAL-POLICY

Configuring a Routing Policy for Static Routing


Perform one of the following tasks if the primary interface is configured for static routing:

Configuring a Routing Policy for Static Routing with a Point-to-Point Primary Gateway, page 17 Configuring a Routing Policy for Static Routing with a Multipoint Primary Gateway, page 19

Configuring a Routing Policy for Static Routing with a Point-to-Point Primary Gateway
Perform this task to configure a routing policy if the primary interface is configured for static routing and the primary gateway is a point-to-point gateway.

Multiple Cisco IOS Releases

17

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

SUMMARY STEPS
1. 2. 3.

enable configure terminal access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments] route-map map-tag [permit | deny] [sequence-number] match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] set interface type number [... type number] exit ip local policy route-map map-tag

4. 5. 6. 7. 8.

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments]

Defines an extended IP access list.

Example:
Router(config)# access-list 101 permit icmp any host 172.16.23.7 echo

Step 4

route-map map-tag [permit | deny] [sequence-number]

Enters route-map configuration mode and defines the conditions for redistributing routes from one routing protocol into another.

Example:
Router(config)# route-map MY-LOCAL-POLICY permit 10

Multiple Cisco IOS Releases

18

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 5
match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name]

Purpose Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, or performs policy routing on packets.

Example:
Router(config-route-map)# match ip address 101

Step 6

set interface type number [...type number]

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

Example:
Router(config-route-map)# set interface dialer 0 Null 0

Step 7

exit

Exits route-map configuration mode.

Example:
Router(config-route-map)# exit

Step 8

ip local policy route-map map-tag

Identifies a route map to use for local policy routing.

Example:
Router(config)# ip local policy route-map MY-LOCAL-POLICY

Configuring a Routing Policy for Static Routing with a Multipoint Primary Gateway
Perform this task to configure a routing policy if the primary interface is configured for static routing and the primary gateway is a multipoint gateway.

SUMMARY STEPS
1. 2. 3.

enable configure terminal access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments] route-map map-tag [permit | deny] [sequence-number] match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] set ip next-hop ip-address [... ip-address] set interface type number [... type number] exit ip local policy route-map map-tag

4. 5. 6. 7. 8. 9.

Multiple Cisco IOS Releases

19

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

access-list access-list-number [dynamic dynamic-name [timeout minutes]] {deny | permit} icmp source source-wildcard destination destination-wildcard [icmp-type [icmp-code] | icmp-message] [precedence precedence] [tos tos] [log | log-input] [time-range time-range-name] [fragments]

Defines an extended IP access list.

Example:
Router(config)# access-list 101 permit icmp any host 172.16.23.7 echo

Step 4

route-map map-tag [permit | deny] [sequence-number]

Enters route-map configuration mode and defines the conditions for redistributing routes from one routing protocol into another.

Example:
Router(config)# route-map MY-LOCAL-POLICY permit 10

Step 5

match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name]

Distributes any routes that have a destination network number address that is permitted by a standard or extended access list, or performs policy routing on packets.

Example:
Router(config-route-map)# match ip address 101

Step 6

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

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

Example:
Router(config-route-map)# set ip next-hop 10.1.1.242

Step 7

set interface type number [... type number]

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

Example:
Router(config-route-map)# set interface null 0

Multiple Cisco IOS Releases

20

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Command or Action
Step 8
exit

Purpose Exits route-map configuration mode.

Example:
Router(config-route-map)# exit

Step 9

ip local policy route-map map-tag

Identifies a route map to use for local policy routing.

Example:
Router(config)# ip local policy route-map MY-LOCAL-POLICY

Configuring the Default Route for the Primary Interface Using Static Routing
Perform this task to configure the static default route only if you are using static routing.

SUMMARY STEPS
1. 2. 3.

enable configure terminal ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag]

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag]

Establishes static routes.

track numberSpecifies that the static route will be installed only if the configured track object is up.

Example:
Router(config)# ip route 0.0.0.0 0.0.0.0 10.1.1.242 track 123

Multiple Cisco IOS Releases

21

Reliable Static Routing Backup Using Object Tracking How to Configure Reliable Static Routing Backup Using Object Tracking

Configuring a Floating Static Default Route on the Secondary Interface


Perform this task to configure a floating static default route on the secondary interface. This task applies to PPPoE, DHCP, and static routing configurations.

SUMMARY STEPS
1. 2. 3.

enable configure terminal ip route network-number network-mask {ip-address | interface} [distance] [name name]

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

configure terminal

Enters global configuration mode.

Example:
Router# configure terminal

Step 3

ip route network-number network-mask {ip-address | interface} [distance] [name name]

Establishes static routes and defines the next hop.

Example:
Router(config)# ip route 0.0.0.0 0.0.0.0 10.2.2.125 254

Verifying the State of the Tracked Object for Reliable Static Routing Backup Using Object Tracking
Perform the following task to determine if the state of the tracked object is up or down.

SUMMARY STEPS
1. 2.

enable show ip route track-table

Multiple Cisco IOS Releases

22

Reliable Static Routing Backup Using Object Tracking Configuration Examples for Reliable Static Routing Backup Using Object Tracking

DETAILED STEPS

Command or Action
Step 1
enable

Purpose Enables privileged EXEC mode.

Enter your password if prompted.

Example:
Router> enable

Step 2

show ip route track-table

Displays information about the IP route track table.

Example:
Router# show ip route track-table

Configuration Examples for Reliable Static Routing Backup Using Object Tracking
This section provides the following configuration examples:

Configuring Reliable Static Routing Backup Using Object Tracking: PPPoE Example, page 23 Configuring Reliable Static Routing Backup Using Object Tracking: DHCP Example, page 24 Configuring Reliable Static Routing Backup Using Object Tracking: Static Routing Examples, page 24 Verifying the State of the Tracked Object: Example, page 26

Configuring Reliable Static Routing Backup Using Object Tracking: PPPoE Example
The following example configures the Reliable Static Routing Backup Using Object Tracking feature using PPPoE. The primary interface is an ATM interface, and the backup interface is a BRI interface. This example applies to Cisco IOS Release 12.3(8)T, 12.3(11)T, 12.2(33)SRA, and 12.2(33)SXH.
interface ATM 0 description primary-link no ip address pvc 0/33 pppoe-client dial-pool-number 1 ! interface BRI 0 description backup-link ip address 10.2.2.2 255.0.0.0 ! rtr 1 type echo protocol ipIcmpEcho 172.16.23.7 timeout 1000 frequency 3 threshold 2 rtr schedule 1 life forever start-time now track 123 rtr 1 reachability

Multiple Cisco IOS Releases

23

Reliable Static Routing Backup Using Object Tracking Configuration Examples for Reliable Static Routing Backup Using Object Tracking

access list 101 permit icmp any host 172.16.23.7 echo route map MY-LOCAL-POLICY permit 10 match ip address 101 set interface null 0 ! ip local policy route-map MY-LOCAL-POLICY ip route 0.0.0.0 0.0.0.0 10.2.2.125 254

Configuring Reliable Static Routing Backup Using Object Tracking: DHCP Example
The following example configures the Reliable Static Routing Backup Using Object Tracking feature using DHCP. The primary interface is an Ethernet interface, and the backup interface is a serial interface. This example applies to Cisco IOS Release 12.3(14)T and later releases.
! ip dhcp-client default-router distance 25 ip sla monitor 1 type echo protocol ipIcmpEcho 172.16.23.7 timeout 1000 threshold 2 frequency 3 ip sla monitor schedule 1 life forever start-time now track 123 rtr 1 reachability ! interface Ethernet0/0 description primary-link ip dhcp client route track 123 ip address dhcp ! interface Serial2/0 description backup-link ip address 10.2.2.2 255.0.0.0 ! ip local policy route-map MY-LOCAL-POLICY ip route 0.0.0.0 0.0.0.0 10.2.2.125 254 ! access-list 101 permit icmp any host 172.16.23.7 echo route-map MY-LOCAL-POLICY permit 10 match ip address 101 set ip next-hop dynamic dhcp

Configuring Reliable Static Routing Backup Using Object Tracking: Static Routing Examples
The following example configures the Reliable Static Routing Backup Using Object Tracking feature using static routing for a point-to-point primary gateway. The primary interface is a PPPoE Fast Ethernet interface, and the backup interface is a dialer interface. This example applies to Cisco IOS Release 12.3(14)T and later releases.
interface FastEthernet 0/0 description primary-link ip address 10.1.1.1 255.0.0.0

Multiple Cisco IOS Releases

24

Reliable Static Routing Backup Using Object Tracking Configuration Examples for Reliable Static Routing Backup Using Object Tracking

interface Dialer 0 description backup-link ip address 10.2.2.2 255.0.0.0 ip sla monitor 1 type echo protocol ipIcmpEcho 172.16.23.7 timeout 1000 frequency 3 threshold 2 ip sla monitor schedule 1 life forever start-time now track 123 rtr 1 reachability access list 101 permit icmp any host 172.16.23.7 echo route map MY-LOCAL-POLICY permit 10 match ip address 101 set interface dialer 0 null 0 ! ip local policy route-map MY-LOCAL-POLICY ip route 0.0.0.0 0.0.0.0 10.1.1.242 track 123 ip route 0.0.0.0 0.0.0.0 10.2.2.125 254

The following example configures the Reliable Static Routing Backup Using Object Tracking feature using static routing for a multipoint primary gateway. Both the primary interface and the backup interface are Ethernet interfaces. This example applies to Cisco IOS Release 12.3(14)T and later releases.
interface ethernet 0 description primary-link ip address 10.1.1.1 255.0.0.0 interface ethernet 1 description backup-link ip address 10.2.2.2 255.0.0.0 ip sla monitor 1 type echo protocol ipIcmpEcho 172.16.23.7 timeout 1000 frequency 3 threshold 2 ip sla monitor schedule 1 life forever start-time now track 123 rtr 1 reachability access list 101 permit icmp any host 172.16.23.7 echo route map MY-LOCAL-POLICY permit 10 match ip address 101 set ip next-hop 10.1.1.242 set interface null 0 ! ip local policy route-map MY-LOCAL-POLICY ip route 0.0.0.0 0.0.0.0 10.1.1.242 track 123 ip route 0.0.0.0 0.0.0.0 10.2.2.125 254

Multiple Cisco IOS Releases

25

Reliable Static Routing Backup Using Object Tracking Additional References

Verifying the State of the Tracked Object: Example


The following example displays information about track objects in the IP route track table:
Router# show ip route track-table ip route 0.0.0.0 0.0.0.0 10.1.1.242 track-object 123 state is [up]

Additional References
The following sections provide references related to the Reliable Static Routing Backup Using Object Tracking feature.

Related Documents
Related Topic IPSec configuration tasks IPSec commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples VPDN configuration tasks VPDN commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples PPPoE configuration tasks Document Title The Configuring IPSec Network Security chapter in the Cisco IOS Security Configuration Guide The Cisco IOS Security Command Reference

The Cisco IOS VPDN Configuration Guide The Cisco IOS VPDN Command Reference

The Configuring Broadband Access: PPP and Routed Bridge Encapsulation chapter in the Cisco IOS Wide-Area Networking Configuration Guide The Cisco IOS Wide-Area Networking Command Reference

PPPoE commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples DDR configuration tasks

The Dial-on-Demand Routing Configuration part in the Cisco IOS Dial Technologies Configuration Guide Configuring and Troubleshooting DDR Backup

DDR commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples IP SLAs configuration tasks IP SLAs commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples

The Cisco IOS Dial Technologies Command Reference

Cisco IOS IP SLAs Configuration Guide Cisco IOS IP SLAs Command Reference

Multiple Cisco IOS Releases

26

Reliable Static Routing Backup Using Object Tracking Command Reference

Standards
Standards None Title

MIBs
MIBs None MIBs Link To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs

RFCs
RFCs None Title

Technical Assistance
Description Link The Cisco Support website provides extensive online http://www.cisco.com/techsupport resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. If you have a valid service contract but do not have a user ID or password, you can register on Cisco.com.

Command Reference
This section documents onlycommands that are new or modified .

ip dhcp client ip route set ip next-hop dynamic dhcp show ip route track-table

Multiple Cisco IOS Releases

27

Reliable Static Routing Backup Using Object Tracking ip dhcp client

ip dhcp client
To configure the Dynamic Host Configuration Protocol (DHCP) client to associate any added routes with a specified tracked object number, use the ip dhcp client command in interface configuration mode. To restore the default setting, use the no form of this command. ip dhcp client route track number no ip dhcp client route track

Syntax Description

route track number

Associates a tracked object number with the DHCP-installed static route. Valid values for the number argument range from 1 to 500.

Defaults

No routes are associated with a track number.

Command Modes

Interface configuration

Command History

Release 12.3(2)XE 12.3(8)T 12.2(33)SRA 12.2(33)SXH

Modification This command was introduced. This command was integrated into Cisco IOS Release 12.3(8)T. This command was integrated into Cisco IOS Release 12.2(33)SRA. This command was integrated into Cisco IOS Release 12.2(33)SXH.

Usage Guidelines

The ip dhcp client command must be configured before the ip address dhcp command is configured on an interface. The ip dhcp client command is checked only when an IP address is acquired from DHCP. If the ip dhcp client command is specified after an IP address has been acquired from DHCP, the ip dhcp client command will not take effect until the next time the router acquires an IP address from DHCP.

Examples

The following example configures DHCP on an Ethernet interface and associates tracked object 123 with routes generated from this interface:
interface ethernet 0/0 ip dhcp client route track 123 ip address dhcp

Related Commands

Command ip address dhcp

Description Acquires an IP address on an Ethernet interface from the DHCP.

Multiple Cisco IOS Releases

28

Reliable Static Routing Backup Using Object Tracking ip route

ip route
To establish static routes, use the ip route command in global configuration mode. To remove static routes, use the no form of this command. ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [dhcp] [distance] [name] [permanent | track number] [tag tag] no ip route prefix mask

Syntax Description

prefix mask ip-address interface-type interface-number dhcp

IP route prefix for the destination. Prefix mask for the destination. IP address of the next hop that can be used to reach that network. Network interface type and interface number. (Optional) Enables a Dynamic Host Configuration Protocol (DHCP) server to assign a static route to a default gateway (option 3).
Note

Specify the dhcp keyword for each routing protocol.

distance name permanent track number tag tag

(Optional) An administrative distance. The default administrative distance for a static route is 1. (Optional) Applies a name to the specified route. (Optional) Specifies that the route will not be removed, even if the interface shuts down. (Optional) Associates a track object with this route. Valid values for the number argument range from 1 to 500. (Optional) Tag value that can be used as a match value for controlling redistribution via route maps.

Defaults

No static routes are established.

Command Modes

Global configuration

Command History

Release 10.0 12.3(2)XE 12.3(8)T 12.3(9) 12.2(33)SRA 12.2(33)SXH

Modification This command was introduced. The track keyword and number argument were added. The track keyword and number argument were integrated into Cisco IOS Release 12.3(8)T. The dhcp keyword was added. The changes made in Cisco IOS Release 12.3(8)T were added to Cisco IOS Release 12.3(9). This command was integrated into Cisco IOS Release 12.2(33)SRA. This command was integrated into Cisco IOS Release 12.2(33)SXH.

Multiple Cisco IOS Releases

29

Reliable Static Routing Backup Using Object Tracking ip route

Usage Guidelines

The establishment of a static route is appropriate when the Cisco IOS software cannot dynamically build a route to the destination. When you specify a DHCP server to assign a static route, the interface type and number and administrative distance may be configured also. If you specify an administrative distance, you are flagging a static route that can be overridden by dynamic information. For example, routes derived with Enhanced Interior Gateway Routing Protocol (EIGRP) have a default administrative distance of 100. To have a static route that would be overridden by an EIGRP dynamic route, specify an administrative distance greater than 100. Static routes have a default administrative distance of 1. Static routes that point to an interface on a connected router will be advertised by way of Routing Information Protocol (RIP) and EIGRP regardless of whether redistribute static commands are specified for those routing protocols. This situation occurs because static routes that point to an interface are considered in the routing table to be connected and hence lose their static nature. Also, the target of the static route should be included in the network (DHCP) command. If this condition is not met, no dynamic routing protocol will advertise the route unless a redistribute static command is specified for these protocols. With the following configuration:
rtr1 (serial 172.16.188.1/30)--------------> rtr2(Fast Ethernet 172.31.1.1/30) ------> router [rip | eigrp] network 172.16.188.0 network 172.31.0.0

RIP and EIGRP redistribute the route if the route is pointing to the Fast Ethernet interface:
ip route 172.16.188.252 255.255.255.252 FastEthernet 0/0

RIP and EIGRP do not redistribute the route with the following ip route command because of the split horizon algorithm:
ip route 172.16.188.252 255.255.255.252 serial 2/1

EIGRP redistributes the route with both of the following commands:


ip route 172.16.188.252 255.255.255.252 FastEthernet 0/0 ip route 172.16.188.252 255.255.255.252 serial 2/1

With the Open Shortest Path First (OSPF) protocol, static routes that point to an interface are not advertised unless a redistribute static command is specified. Adding a static route to an Ethernet or other broadcast interface (for example, ip route 0.0.0.0 0.0.0.0 Ethernet 1/2) will cause the route to be inserted into the routing table only when the interface is up. This configuration is not generally recommended. When the next hop of a static route points to an interface, the router considers each of the hosts within the range of the route to be directly connected through that interface, and therefore it will send Address Resolution Protocol (ARP) requests to any destination addresses that route through the static route. The practical implication of configuring the ip route 0.0.0.0 0.0.0.0 ethernet 1/2 command is that the router will consider all of the destinations that the router does not know how to reach through some other route as directly connected to Ethernet interface 1/2. So the router will send an ARP request for each host for which it receives packets on this network segment. This configuration can cause high processor utilization and a large ARP cache (along with memory allocation failures). Configuring a default route or other static route that directs the router to forward packets for a large range of destinations to a connected broadcast network segment can cause your router to reload.

Multiple Cisco IOS Releases

30

Reliable Static Routing Backup Using Object Tracking ip route

Specifying a numerical next hop that is on a directly connected interface will prevent the router from using proxy ARP. However, if the interface with the next hop goes down and the numerical next hop can be reached through a recursive route, you may specify both the next hop and interface (for example, ip route 0.0.0.0 0.0.0.0 ethernet 1/2 10.1.2.3) with a static route to prevent routes from passing through an unintended interface. The track number keyword and argument combination specifies that the static route will be installed only if the state of the configured track object is up.

Examples

The following example chooses an administrative distance of 110. In this case, packets for network 10.0.0.0 will be routed to a router at 172.31.3.4 if dynamic information with an administrative distance less than 110 is not available.
ip route 10.0.0.0 255.0.0.0 172.31.3.4 110

Note

Specifying the next hop without specifying an interface when configuring a static route can cause traffic to pass through an unintended interface if the default interface goes down. The following example routes packets for network 172.31.0.0 to a router at 172.31.6.6:
ip route 172.31.0.0 255.255.0.0 172.31.6.6

The following example routes packets for network 192.168.1.0 directly to the next hop at 10.1.2.3. If the interface goes down, this route is removed from the routing table and will not be restored unless the interface comes back up.
ip route 192.168.1.0 255.255.0.0 Ethernet 0 10.1.2.3

The following example installs the static route only if the state of track object 123 is up:
ip route 0.0.0.0 0.0.0.0 Ethernet 0/1 10.1.1.242 track 123

The following example shows that using the dhcp keyword in a configuration of Ethernet interfaces 1 and 2 enables the interfaces to obtain the next-hop router IP addresses dynamically from a DHCP server:
ip route 10.165.200.225 255.255.255.255 ether1 dhcp ip route 10.165.200.226 255.255.255.255 ether2 dhcp 20

Related Commands

Command network (DHCP) redistribute (IP)

Description Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server. Redistributes routes from one routing domain into another routing domain.

Multiple Cisco IOS Releases

31

Reliable Static Routing Backup Using Object Tracking set ip next-hop dynamic dhcp

set ip next-hop dynamic dhcp


To set the next hop to the gateway that was most recently learned by the Dynamic Host Configuration Protocol (DHCP) client, use the set ip next-hop dynamic dhcp command in route-map configuration mode. To restore the default setting, use the no form of this command. set ip next-hop dynamic dhcp no set ip next-hop dynamic dhcp

Syntax Description

This command has no arguments or keywords.

Defaults

This command is disabled by default.

Command Modes

Route-map configuration

Command History

Release 12.3(2)XE 12.3(8)T 12.2(33)SRA 12.2(33)SXH

Modification This command was introduced. This command was integrated into Cisco IOS Release 12.3(8)T. This command was integrated into Cisco IOS Release 12.2(33)SRA. This command was integrated into Cisco IOS Release 12.2(33)SXH.

Usage Guidelines

The set ip next-hop dynamic dhcp command supports only a single DHCP interface. If multiple interfaces have DHCP configured, the gateway that was most recently learned among all interfaces running DHCP will be used by the route map.

Examples

The following example configures a local routing policy that sets the next hop to the gateway that was most recently learned by the DHCP client:
access list 101 permit icmp any host 172.16.23.7 echo route map MY-LOCAL-POLICY permit 10 match ip address 101 set ip next-hop dynamic dhcp ! ip local policy route-map MY-LOCAL-POLICY

Related Commands

Command access list (IP extended)

Description Defines an extended IP access list.

Multiple Cisco IOS Releases

32

Reliable Static Routing Backup Using Object Tracking show ip route track-table

show ip route track-table


To display information about the IP route track table, use the show ip route track-table command in privileged EXEC mode. show ip route track-table

Syntax Description

This command has no arguments or keywords.

Command Modes

Privileged EXEC

Command History

Release 12.3(2)XE 12.3(8)T 12.2(33)SRA 12.2(33)SXH

Modification This command was introduced. This command was integrated into Cisco IOS Release 12.3(8)T. This command was integrated into Cisco IOS Release 12.2(33)SRA. This command was integrated into Cisco IOS Release 12.2(33)SXH.

Examples

The following example displays information about the IP route track table:
Router# show ip route track-table ip route 0.0.0.0 0.0.0.0 10.1.1.242 track-object 123 state is [up]

Table 1 describes the significant fields shown in the display.


Table 1 show ip route track-table Field Descriptions

Field ip route track-object state is

Description The configured IP route. The track object number. The state of the track object. The object may be up or down.

Multiple Cisco IOS Releases

33

Reliable Static Routing Backup Using Object Tracking show ip route track-table

CCVP, the Cisco logo, and Welcome to the Human Network are trademarks of Cisco Systems, Inc.; Changing the Way We Work, Live, Play, and Learn is a service mark of Cisco Systems, Inc.; and Access Registrar, Aironet, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Enterprise/Solver, EtherChannel, EtherFast, EtherSwitch, Fast Step, Follow Me Browsing, FormShare, GigaDrive, HomeLink, Internet Quotient, IOS, iPhone, IP/TV, iQ Expertise, the iQ logo, iQ Net Readiness Scorecard, iQuick Study, LightStream, Linksys, MeetingPlace, MGX, Networkers, Networking Academy, Network Registrar, PIX, ProConnect, ScriptShare, SMARTnet, StackWise, The Fastest Way to Increase Your Internet Quotient, and TransPath are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries. All other trademarks mentioned in this document or Website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0711R)

20032007 Cisco Systems, Inc. All rights reserved.

Multiple Cisco IOS Releases

34

Das könnte Ihnen auch gefallen