Cisco Support Community
Community Member

route map?


i have internet router connected to two ISPs:



i need the subnet to go to the ISP1.

the others i need them to go to ISP2

in case of failure one ISP the second ISP should be used; i did the following:

1) creat a route map to match

if it's then

- if ISP1 reachable then set it as next hub

- else check ISP2 if it's reachable set it as next hop

2) other traffics (other subnets) will go directly to the routing table

- it will use default route (AD=0) to ISP2

- if not it will use the ISP1; floating static route.

i will provide my config.

i want to ask :

Is the route map correct?

if the condition is match from subnet then it will do one set command or the two at the same time;

please advice?


interface Ethernet0/0

ip address


interface Ethernet1/0

ip address


interface Ethernet2/0

ip address

ip policy route−map alpha



track 123 rtr 1 reachability

!−−− Track Router 1's reachability.


track 124 rtr 2 reachability

!−−− Track Router 2's reachability.

access-list 15 permit

route−map alpha permit 10

match ip address 10

set ip next−hop verify−availability 10 track 123

set ip next−hop verify−availability 20 track 124



rtr 1

!−−− Define and start Router 1.

type echo protocol ipIcmpEcho

rtr schedule 1 life forever start−time now

rtr 2

!−−− Define and start Router 2.

type echo protocol ipIcmpEcho

rtr schedule 2 life forever start−time now

ip route

ip route 220

Hall of Fame Super Bronze

Re: route map?

"Is the route map correct? "

You may want to use 'set ip default next-hop' instead of 'set ip next-hop'.

ip next-hop will send all traffic to the ISP, while ip default next-hop will only send the 'gateway of last resort' routes.

Community Member

Re: route map?


My scenario almost like :

but i need to know is the set commands executed at the same time ?

if there's a match then the first set command will be executed (with check reachability)

if yes it will use it and ignore the second set?

or it will use both set commands?

in summry i need the subnet; to use ISP1 in case it's reachable

if not i need it to use ISP2?

please help;


Hall of Fame Super Bronze

Re: route map?


" Set Clauses Defining the Route

If the match clauses are satisfied, one of the following set clauses can be used to specify the criteria for forwarding packets through the router; they are evaluated in the order listed:

1 List of interfaces through which the packets can be routed If more than one interface is specified, then the first interface that is found to be up will be used for forwarding the packets.

2 List of specified IP addresses The IP address can specify the adjacent next hop router in the path toward the destination to which the packets should be forwarded. The first IP address associated with a currently "up" connected interface will be used to route the packets.

3 List of default interfaces If there is no explicit route available to the destination address of the packet being considered for policy routing, then route it to the first up interface in the list of specified default interfaces.

4 List of default next hop IP addresses?Route to the interface or the next hop specified by this set clause only if there is no explicit route for the destination address of the packet in the routing table.

5 IP TOS A value or keyword can be specified to set the type of service in the IP packets.

6 IP precedence A value or keyword can be specified to set the precedence in the IP packets.

The set commands can be used in conjunction with each other.

The next hop router specified in the set clauses must be adjacent to the policy router, sharing a subnetwork with the policy router.

If the packets do not meet any of the defined match criteria (that is, if the packets fall off the end of a route map), then those packets are routed through the normal destination based routing process. If it is desired not to revert to normal forwarding and to drop the packets that do not match the specified criteria, then interface Null 0 should be specified as the last interface in the list by using the set clause. "


Please rate helpful posts.


CreatePlease to create content