Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Attention: The Cisco Support Community site will be in read only mode on Dec14, 2017 from 12:01am PST to 11:30am for standard maintenance. Sorry for the inconvenience.

New Member

Tracking an SLA based on ICMP packet loss

Under IOS 12.4, I have to be able to make a routing table entry contingent on the level of ICMP packet loss experienced when accessing a particular IP address over a single hop. I've had no problem in the past basing tracking on simple go/no-go availability using an icmp-echo SLA. However, when it comes to attempting to use an icmp-jitter type SLA for such purposes in order to set an acceptable packet loss threshold, I've had no such luck.

Here's what I've been trying:

ip sla 1

icmp-jitter 169.254.0.9 interval 20 num-packets 100

frequency 30

!

ip sla reaction-configuration 1 react packetLoss threshold-type immediate threshold-value 5 1

ip sla schedule 1 life forever start-time now

track 1 ip sla 1 state

ip route 1.2.3.0 255.255.255.0 99.88.77.66 track 1

I have tried the "action-type" option on the "reaction-configuration", but to no avail.

Is it, in fact, the case that the "ip sla reaction-configuration" statement, doesn't affect the tracking state, but only traps and triggers?

The only way I seem to be able to cause the tracked object to show a "down" state is by logically disconnecting it in order to cause a timeout state.

(BTW, I do have the necessary equipment to induce a particular level a packet loss.)

Does anybody have any ideas as to how to achieve my seemingly simple goal?

12 REPLIES
New Member

Re: Tracking an SLA based on ICMP packet loss

After further twiddling, I have managed to achieve part of my goal, but not the entire goal, which I should restate for clarity:

I wish to define a tracked object with a state which will toggle "UP" upon packet loss to/from a specific address exceeding a specific threshold, and which will return to "DOWN", once packet loss falls back below a specific threshold.

Well, I've managed the first piece of this. I've set the action-type of SLA 1 to trapAndTrigger, and I've defined a second SLA (SLA 2) of type icmp-echo, which does nothing but refer to one of the router's own addresses (i.e. it's always up). By issuing a "ip sla reaction-trigger 1 2", I've been able to get SLA 1, when it sees excessive packet loss, to trigger the always-up SLA 2, which, in turn, is tracked. This results in the ability to cause a routing change (or other tracked-object action) when the threshold is exceeded, however nothing other than an SNMP trap occurs when the packet loss falls below the lower threshold.

New Member

Re: Tracking an SLA based on ICMP packet loss

Okay, I've solved it.

I've managed to use a stub tracking object and a couple of event manager applets which match patterns in the internal syslog entries generated by the traps. The event manager applets set the status of the stub tracking object.

New Member

Re: Tracking an SLA based on ICMP packet loss

Good day
Needed help, I have similar situation but already got a good deal when he falls from my BGP track changes in the HSRP active and standby.
  But I also need to switch the circuit when the HSRP packet lost.
  I wonder how did you log the ip sla for MES to take action.
Thanks if can help.

Rodrigo Bezerra

Brasil.

New Member

Re: Tracking an SLA based on ICMP packet loss

I had posted the original message two years ago.  The solution we wound up using, which is a little bit different, is as follows:

The approach we're using relies on setting a reaction-configuration that generates a trap (trapOnly) and using the "ip sla logging traps" command to ensure logging of these traps.

Then we use an event manager applet to react to, and parse, the logged message.

In part, the configuration is as follows:

ip sla 1

icmp-jitter 123.45.67.89 num-packets 50 interval 100

ip sla schedule 1 life forever start-time now

ip sla reaction-configuration 1 react packetLoss threshold-value 3 2 threshold-type average 15 action-type trapOnly

ip sla reaction-configuration 1 react jitterSDAvg threshold-value 35 30 threshold-type average 15 action-type trapOnly

ip sla reaction-configuration 1 react rtt threshold-value 100 75 threshold-type average 15 action-type trapOnly

ip sla logging traps

event manager applet linkPoor

event syslog pattern "IP SLAs\(1\): Threshold exceeded"

.....

and likewise:

event manager applet linkImproved

event syslog pattern "IP SLAs\(1\): Threshold below"

......

The actual log entry can be found in the event manager $_syslog_msg variable and can be further matched and parsed using the EEM regexp command.

New Member

Re: Tracking an SLA based on ICMP packet loss

thank you helped a lot already got log and configuration of the EEM is running, I'm still with some doubts in relation to the times because sometimes logs and I do not know who is dropping packets

Tks

Rodrigo Bezerra

From Brasil

Vai Corinthians !!!!

New Member

Re: Tracking an SLA based on ICMP packet loss

thank you helped a lot already got log and configuration of the EEM is running, I'm still with some doubts in relation to the times because sometimes logs and I do not know who is dropping packets

Tks

Rodrigo Bezerra

From Brasil

Vai Corinthians !!!!

New Member

Re: Tracking an SLA based on ICMP packet loss

Hi

ip sla 1

icmp-jitter 123.45.67.89 num-packets 50 interval 100

ip sla schedule 1 life forever start-time now

ip sla reaction-configuration 1 react packetLoss threshold-value 3 2 threshold-type average 15 action-type trapOnly

As   per the configuration above, how would i get to know what % of   packetloss will send the trap. I want to what parameters in the above   determine the packet loss. Plz explain.

Thanks!

Sunitha

Tracking an SLA based on ICMP packet loss

Hi Sunitha,

Just for more insight, can you paste the output of below command,

show ip sla monitor reaction-configuration 1

Regards,

Smitesh

New Member

Tracking an SLA based on ICMP packet loss

Hi Smitesh

Below is the config

ip sla 160

icmp-jitter x.x.x.x source-ip y.y.y.y num-packets 20 interval 100

frequency 30

ip sla schedule 160 life forever start-time now

ip sla reaction-configuration 16

RTR-MUL-MT-MPLS#sh ip sla reaction-configuration 160

Entry number: 160

Index: 1

Reaction: packetLoss

Threshold Type: Immediate

Rising (milliseconds): 3

Falling (milliseconds): 2

Threshold CountX: 5

Threshold CountY: 5

Action Type: Trap only

Thanks !

Regards

Sunitha

Re: Tracking an SLA based on ICMP packet loss

Hi Sunitha,

It will generate a trap Immediately when packet loss rises above 3 or falls below 2 out of 5 probes sent.

For more insight, also check the link which I had posted on your original discussion (Link repaste here too for your reference)

http://www.cisco.com/en/US/docs/ios/12_4/ip_sla/configuration/guide/hsthresh.html

HTH,

Smitesh

PS: If you think your concern was resolved, can you close your original thread, so that otherr community member does waste their time coming to that thread and finding it to be already answered.

Message was edited by: smitesh kharecha

New Member

Re: Tracking an SLA based on ICMP packet loss

Hi Smitesh,

Thanks for explanation. Will test this.

Will close the original thread.

Thanks a lot!

Regards

Sunitha

New Member

Re: Tracking an SLA based on ICMP packet loss

HI  benstrauss@imtt.com

I have been trying to make a track DOWN if the packet loss to ip x.x.x.x is 10 % or more for 10 minutes and bring it UP if the packet loss goes down to less then 5% for 10 minutes.

Can you help me for sample configuration ?

Thanks

4452
Views
10
Helpful
12
Replies
CreatePlease to create content