Command:

set ip default next-hop


Mode:

Router(config-route-map)#


Syntax:

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

 

Syntax Description:

ip-address IP address of the next hop to which packets are output.The next hop must be an adjacent router.

 

Command Description:

To indicate where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destination, use the set ip default next-hop command in route-map configuration mode. To delete an entry, use the no form of this command.

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.

If the first interface specified with the set interface command is down, the optionally specified interfaces are tried in turn.

The set clauses can be used in conjunction with one another. They are evaluated in the following order:

1. set ip next-hop

2. set interface

3. set ip default next-hop

4. set default interface


Example:

The following example provides two sources with equal access to two different service providers. Packets arriving on asynchronous interface 1 from the source 10.1.1.1 are sent to the router at 172.16.6.6 if the software has no explicit route for the destination of the packet. Packets arriving from the source 10.2.2.2 are sent to the router at 172.17.7.7 if the software has no explicit route for the destination of the packet. All other packets for which the software has no explicit route to the destination are discarded.

Router(config)# access-list 1 permit ip 10.1.1.1 0.0.0.0
Router(config)# access-list 2 permit ip 10.2.2.2 0.0.0.0

Router(config)# interface async 1
Router(config-if)# ip policy route-map equal-access

Router(config)# route-map equal-access permit 10
Router(config-route-map)# match ip address 1
Router(config-route-map)# set ip default next-hop 172.16.6.6 
Router(config)# route-map equal-access permit 20
Router(config-route-map)# match ip address 2
Router(config-route-map)# set ip default next-hop 172.17.7.7 
Router(config-route-map)# route-map equal-access permit 30
Router(config-route-map)# set default interface null0


Misconceptions:

The set ip next-hop and set ip default next-hop are similar commands but have a different order of operations. Configuring the set ip next-hop command causes the system to use policy routing first and then use the routing table. Configuring the set ip default next-hop command causes the system to use the routing table first and then policy route the specified next hop.


Related Commands:

ip policy route-map
match ip address
match length
route-map
set default interface
set ip default next-hop verify-availability
set ip next-hop

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)