cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1581
Views
10
Helpful
6
Replies

IP SLA : set ip next hope

medharrak
Level 1
Level 1

Hi,

I'm configuring IP SLA in Cisco Router to ping 8.8.8.8 , any idea how to specify the ip next hope?

Thank you

1 Accepted Solution

Accepted Solutions

Hello
if i understand you wish to make sure ip sla icmp probe to 8.8.8.8 is only reachable via a certain default path possibly the active default path and negate the probe reaching 8,8,8.8 via an alternate path if/when the current default path becomes unavailable?

example1:
ip sla 1
icmp-echo 8.8.8.8 source-interface fa0/1
timeout 1000
threshold 2000
frequency 15


ip sla schedule 1 start now life forever
track 10 rtr1 reachabilty 


ip route 0.0.0.0 0.0.0.0 fa0/1 x.x.x.x track10  name primary link
ip route 0.0.0.0 0.0.0.0 fa0/0 x.x.x.x 2  name backup link
ip route 8.8.8.8 255.255.255.255 Null0 2

 

example2:
same ip sla as in example 1
access-list 100  permit icmp host <source ip> host 8.8.8.8 echo
route-map ipsla 
match ip address 100
set ip next-hop (next hop of interface fa0/1)
set interface Null0


ip local policy route-map ipsla 
ip route 0.0.0.0 0.0.0.0 fa0/1 <nexthop ip> track 10 name primary link
ip route 0.0.0.0 0.0.0.0 fa0/0 <nexthop ip> 2 name backup link

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

6 Replies 6

balaji.bandi
Hall of Fame
Hall of Fame

I am may interpreting wrong here ? what are you looking for next hop syntax ?

 

example :

 

http://www.firewall.cx/cisco-technical-knowledgebase/cisco-routers/861-cisco-router-pbr-ipsla-auto-redirect.html

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

medharrak
Level 1
Level 1

I'm looking to know if there is a way to specify which output interface to take.

I see in your example that route-map is used

Sure if you have different path to go out, yes you need to choose which path to choose to reach destination and based on the results take action.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

medharrak
Level 1
Level 1

but my question if how to do it , there is No "ip next hop" command in ip sla .

so what I did is : I added a route to 8.8.8.8/32 to go through a specific interface

pman
Spotlight
Spotlight

Your next hop is determined by the routing table.


For example if to get to 8.8.8.8 you exit through Gi0/0/0 at IP address 192.168.1.1/24 (this ip configured on Gi0/0/0):

 

R1#show ip route 8.8.8.8
Routing entry for 8.8.8.8/32
Last update from 192.168.1.2 on GigabitEthernet0/0/0, 00:17:00 ago

 

If you work with static routing you can specify the route and the alternate interface through which the next hop should be found:
ip route 0.0.0.0 0.0.0.0 Gi0/0/0

 

https://www.cisco.com/c/en/us/support/docs/dial-access/floating-static-route/118263-technote-nexthop-00.html#anc5

Hello
if i understand you wish to make sure ip sla icmp probe to 8.8.8.8 is only reachable via a certain default path possibly the active default path and negate the probe reaching 8,8,8.8 via an alternate path if/when the current default path becomes unavailable?

example1:
ip sla 1
icmp-echo 8.8.8.8 source-interface fa0/1
timeout 1000
threshold 2000
frequency 15


ip sla schedule 1 start now life forever
track 10 rtr1 reachabilty 


ip route 0.0.0.0 0.0.0.0 fa0/1 x.x.x.x track10  name primary link
ip route 0.0.0.0 0.0.0.0 fa0/0 x.x.x.x 2  name backup link
ip route 8.8.8.8 255.255.255.255 Null0 2

 

example2:
same ip sla as in example 1
access-list 100  permit icmp host <source ip> host 8.8.8.8 echo
route-map ipsla 
match ip address 100
set ip next-hop (next hop of interface fa0/1)
set interface Null0


ip local policy route-map ipsla 
ip route 0.0.0.0 0.0.0.0 fa0/1 <nexthop ip> track 10 name primary link
ip route 0.0.0.0 0.0.0.0 fa0/0 <nexthop ip> 2 name backup link

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card