Showing posts with label IP SLA. Show all posts
Showing posts with label IP SLA. Show all posts

Friday, September 21, 2012

Sample IPSLA VO Configuration

My environment:  15.0(1)SE3, 3560 8-port switch

IP SLA VO is a tools to simulate video traffic in a network, especially you want to test the network readiness before the video endpoints are in place.

To enable IP SLA VO:


ip sla 1
 video 10.1.91.2 27010 source-ip 10.1.93.2 source-port 20010 profile TELEPRESENCE
 duration 60
 frequency 75
ip sla schedule 1 life forever start-time now
ip sla enable reaction-alerts
ip sla responder

To make sure it is running:
Harbour-UC-SW02#sh ip sla stat 1
IPSLAs Latest Operation Statistics

IPSLA operation id: 1
Type of operation: video
Latest operation start time: 00:07:16 HKT Wed Aug 8 2012
Latest operation return code: OK
Packets:
     Sender Transmitted:  57487
     Responder Received:  57487
Latency one-way time:
     Number of Latency one-way Samples: 37020
     Source to Destination Latency one way Min/Avg/Max: 0/5/11 milliseconds
     NTP sync state: SYNC
Inter Packet Delay Variation, RFC 5481 (IPDV):
     Number of SD IPDV Samples: 37019
     Source to Destination IPDV Min/Avg/Max: 0/500/1008 milliseconds
Packet Loss Values:
     Loss Source to Destination: 0
     Out Of Sequence: 0
Number of successes: 4
Number of failures: 0
Operation time to live: Forever

Sunday, April 6, 2008

EEM - Server Failure Detection

This example combine IOS IP SLA + EOT + EEM

1. Setup Email Environmental variables. Please refer to the previous EEM examples. On R4, configure an IP SLA ICMP Echo operation that will ping 3.3.3.3 with a frequency of 3 seconds and timeout of 500 msecs.

ip sla 10
icmp-echo 3.3.3.3
timeout 500
frequency 3
ip sla schedule 10 life forever start-time now

2. Verify that the SLA is being met.

R4#sh ip sla stat
Round Trip Time (RTT) for Index 10
Latest RTT: 1 milliseconds
Latest operation start time: *01:32:54.063 UTC Sat Sep 15 2007
Latest operation return code: OK
Number of successes: 4
Number of failures: 0
Operation time to live: Forever

3. Next, track the IP SLA ICMP-ECHO reachability state using Enhance Object Tracking (EOT). State is defined to be “down” if unreachable for more than 10 seconds. State defined to be “up” if reachable for more than 20 seconds.
!
track 10 rtr 10 reachability
delay down 10 up 20
!

4. Verify EOT reachability is in an “Up” state.
R4#sh track 10
Track 10
Response Time Reporter 10 reachability
Reachability is Up
1 change, last change 00:00:10
Delay up 20 secs, down 10 secs
Latest operation return code: OK
Latest RTT (millisecs) 1

5. Configure the following EEM applet named email_server_unreachable:
event manager applet email_server_unreachable
event track 10 state down
action 1.0 syslog msg "Ping has failed, server unreachable!"
action 1.1 cli command "enable"
action 1.2 cli command "del /force flash:server_unreachable"
action 1.3 cli command "show clock | append server_unreachable"
action 1.4 cli command "show ip route | append server_unreachable"
action 1.5 cli command "more flash:server_unreachable"
action 1.6 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Server Unreachable: ICMPEchos
Failed" body "$_cli_result"
action 1.7 syslog msg "Server unreachable alert has been sent to email server!"

6. Verify that the EEM applet has been registered and the required environment variables have been set properly:
R4#sh event manager policy registered

No. Class Type Event Type Trap Time Registered Name
# applet system track Off Sat Sep 15 01:50:52 2007 email_server_unreachable
track 10 state down
action 1.0 syslog msg "Ping has failed, server unreachable!"
action 1.1 cli command "enable"
action 1.2 cli command "del /force flash:server_unreachable"
action 1.3 cli command "show clock | append server_unreachable"
action 1.4 cli command "show ip route | append server_unreachable"
action 1.5 cli command "more flash:server_unreachable"
action 1.6 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Server Unreachable: ICMP-Echos
Failed" body "$_cli_result"
action 1.7 syslog msg "Server unreachable alert has been sent to email server!"

R4#sh event manager environment
No. Name Value
1 _email_server 50.50.50.1
2 _email_from router-abc@customer.com
3 _email_to attach@cisco.com

7. Shutdown R3’s Loopback0 interface to trigger the EEM applet.

R3#config t

Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int loop0
R3(config-if)#shut

8. Go to R4 and issue ‘show track 10’ several times to watch the state of the 3.3.3.3 go DOWN which will cause the EEM applet to trigger.

R4#sh track 10
Track 10
Response Time Reporter 10 reachability
Reachability is Up, delayed Down (1 sec remaining)
1 change, last change 00:22:23
Delay up 20 secs, down 10 secs
Latest operation return code: OK
Latest RTT (millisecs) 1
Tracked by:
EEM applet email_server_unreachable

R4#sh track 10
Track 10
Response Time Reporter 10 reachability
Reachability is Down
2 changes, last change 00:00:00
Delay up 20 secs, down 10 secs
Latest operation return code: Timeout
Tracked by:
EEM applet email_server_unreachable