Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

deciding next hop by ping

Hi,

Is there any way to make the router to check for alive host at the remote end for a particular route, if there is no ping reply, then it should choose another route...

I am routing the traffic using route-map, I have defined x.x.x.1 as my "set ip next-hop", and want my traffic to switch over automatically to x.x.x.2 if there is no ping reply from the remote host using first route .

Thanks in advance

0
BEIT
Asked:
BEIT
  • 2
  • 2
1 Solution
 
Rick_O_ShayCommented:
A router deals with networks and not hosts so it won't consider a route unreachable unless the route to the whole network has gone bad due to a link going down etc.
With dynamic routing protocols between routers the routing protocol takes care of dropping paths that are no longer any good.
When you manually configure routes you are taking responsibility for them with the exception of the link on the local router used to get to the next hop. If the local link goes down the router should  remove the route but if something happens between point A and point B it has no control over it.
0
 
Vito_CorleoneCommented:
You shouldn't need Policy Routing for this. You will want to configure IP SLA:

ip sla 1
 icmp-echo <First IP that needs to be alive> source-interface Fa0/0
 timeout 1000
 threshold 40
 frequency 3
!
ip sla 2
 icmp-echo <Second IP that needs to be alive> source-interface Fa0/0
 timeout 1000
 threshold 40
 frequency 3
!
ip sla schedule 1 life forever start-time now
ip sla schedule 2 life forever start-time now
!
track 123 rtr 1 reachability
 delay down 15 up 10
!
track 345 rtr 2 reachability
 delay down 15 up 10
!
ip route 0.0.0.0 0.0.0.0 <default gateway> track 123
ip route 0.0.0.0 0.0.0.0 <default gateway> track 345

Here you're tracking two IPs, if one of them goes down the default route is pulled from the table. If you don't want it as your default gateway you can just modify the route statements for the ones you need.
0
 
BEITAuthor Commented:
Hi Vito_Corleone,

Thanks!, But I need to keep route map for some other reason. Can you provide me a little bit more detailed configuration?

I need to check host 10.87.129.197 alive through the gateway 192.168.25.1, if it is dead, then traffic should get shifted to 192.168.25.4 where it goes through another path.

My route map configuration is as given below.

route-map ABCD permit 10
 match ip address 111
 set ip next-hop 192.168.25.1
0
 
BEITAuthor Commented:
Also, is IP SLA command supported in Cisco 1841 IOS version 12.4(3i) ?
0
 
Vito_CorleoneCommented:
Ok then, we'll keep most of the config:

ip sla 1
 icmp-echo 10.87.129.197 source-ipaddr 192.168.25.1
 timeout 1000
 threshold 40
 frequency 3
!
ip sla 2
 icmp-echo <Second IP that needs to be alive> source-interface Fa0/0
 timeout 1000
 threshold 40
 frequency 3
!
ip sla schedule 1 life forever start-time now
ip sla schedule 2 life forever start-time now
!
track 123 rtr 1 reachability
 delay down 15 up 10
!
track 345 rtr 2 reachability
 delay down 15 up 10
!
route-map ABCD permit 10
 match ip address 111
 set ip next-hop verify-availability 192.168.25.1 10 track 123
 set ip next-hop verify-availability 192.168.25.4 20 track 345

IP SLA should work fine on your 1800. If any of this was unclear, check out this guide:

http://www.cisco.com/en/US/docs/ios/12_3t/12_3t4/feature/guide/gtpbrtrk.html#wp1053055
0

Featured Post

Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now