I have to ISP A and B and i want to redirect  some traffic  to  ISP B and if ISP B goes down traffic will go through ISP A for that I had made route map

route-map test permit 10
 match ip address trafficX
 set ip next-hop ISP B
route-map test permit 20
 match ip address trafficX
 set ip next-hop ISP A

now problem is that
1- when ISP B goes down its not switching trafficX to ISP A .What be the reason
2- Please confirm me is sequence number defines order in which request processed ie sequence 10 would be processed first  and if sequence 10 will not work then it goes to sequence 20

please answer above to questions

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1.  There needs to be a default route for ISP A
2. Yes, the sequence defines the order, but the processing through the map stops when a match is found.

For your example above, you need:

ip route  <ISP A>

and just:

route-map test permit 10
 match ip address trafficX
 set ip next-hop ISP B

Usual traffic will use ISP A and trafficX will use ISP B. If ISP B does down so that the next hop is not in the routing table then normal routing is used.
Don JohnstonInstructorCommented:
>1- when ISP B goes down its not switching trafficX to ISP A .What be the reason

Route maps are pretty much absolute. If a route map says "go this way", that is what's going to happen.

>2- Please confirm me is sequence number defines order in which request processed

You are correct.
If you want to make the traffic re-route during a failure you need to use interface or object tracking so that the router will know when to re-route the traffic. I would use IP SLA with a track object tied to your default route. YOu still use a route-map to make sure that the IP you are tracking always routes the test traffic out the primary interface.

So first choose an IP you want to track (could be your default gateway, or could be something out on the Internet like global DNS, I'll use that as the example) IN the IP SLA below replace the Gig0 with whatever your WAN port is facing ISP A.

ip sla 1
 icmp-echo source-interface Gig0 (wan interface on primary connection)
 frequency 25
ip sla schedule 1 life forever start-time now

Next you want to track the state of this IP SLA..

track 1 ip sla 1 reachability
 default-state up
 delay down 55 up 55

By delaying the change on the up/down you make it go through 2 ping intervals before it will change from up to down or vice versa..Now lets build the route map to force the traffic out the correct interface. Create an ACL to ID the traffic, build the route map to force it through the ISP A connection, and then load the route-map as a local policy on the router..

access-list 100 permit icmp any host echo
route-map test permit 1
match ip address 100
set ip next-hop <def gateway ISP A>
set interface Null0
ip local policy route-map test

Ok, so now you are checking the connection on the primary link, and trackong the state of that ping, and you are making sure that no matter what the routing is all test packets will go out ISP A. Now load 2 default routes, put the route to ISP B with a higher metric, then put the route to ISP A with a lower metric but tied to the tracker you built..This way when the tracker goes down, the primary route will be ripped out and the backup route to ISP B will be installed.

ip route (def_gateway ISP A> track 1
ip route (def_gateway ISP B) 100

Thats the router will failover when the primary link losses internet connectivity.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.