Monday, July 29, 2013

IP SLA Notes

IPSLA: 
  • Object tracking of IP SLAs operations allows clients to track the output from IP SLAs objects and use this information to trigger an action. Every IP SLAs operation maintains an SNMP operation return-code value, such as OK or OverThreshold, that can be interpreted by the tracking process. You can track two aspects of IP SLAs operation: state and reachability. For state, if the return code is OK, the track state is up; if the return code is not OK, the track state is down. For reachability, if the return code is OK or OverThreshold, reachability is up; if not OK, reachability is down.   
  • Cisco IOS IP SLAs is a network performance measurement and diagnostics tool that uses active monitoring. Active monitoring is the generation of traffic in a reliable and predictable manner to measure network performance. Cisco IOS software uses IP SLAs to collect real-time metrics such as response time, network resource availability, application performance, jitter (inter packet delay variance), connect time, throughput, and packet loss.  
Cisco IOS IP SLAs responder enabled on the target device. When the responder is enabled, it allows the target device to take two timestamps: when the packet arrives on the interface at interrupt level and again just as it leaves. This eliminates processing time. This time-stamping is made with a granularity of sub-millisecond (ms). The following is a basic reaction configuration and trigger CLI example. In this example, upon a connection loss, operation 1 will trap and trigger operation 2. Operation 1 is a jitter measurement, and operation 2 is an ICMP echo measurement. The ICMP echo lifetime is set to 60 seconds, so after the connection loss the ICMP will test latency to the endpoint for 60 seconds and stop. The ICMP echo operation will activate every 5 seconds and trap if there is still no connectivity.
ip sla 1  
udp-jitter 1.0.1.2 5555 num-packets 5
ip sla schedule 1 life forever start-time now
ip sla reaction-configuration 1 connection-loss-enable action-type trapAndTrigger
ip sla reaction-trigger 1 2
ip sla 2
icmp-echo 1.0.1.2
frequency 5
threshold 200
ip sla schedule 2 life 60 start-time pending
ip sla reaction-configuration 2 timeout-enable action-type trapOnly 

Once a key-chain is configured, then that key-chain has to be tied to Cisco IOS IP SLAs, so that it could use these authentication strings for authenticating control messages.

NOTE: The authentication configuration should be the same on both source router and target router, even the order of the authentication strings (although the key-chain name can be different).

(config #) ip sla key-chain <name>
Use the following commands to verify that the Cisco IOS IP SLAs feature is configured properly: 
show ip sla application
This command shows the types of operations available on the device. 
show ip sla configuration
This command shows the details of what was configured in CLI for each or all operations on the device. Use the following commands to view the results of operations:
show ip sla statistics
show ip sla statistics details

Instantaneous view of the current statistics for the latest measurement. Aggregated view of the statistics over the hour period.
show ip sla statistics aggregated
show ip sla statistics aggregated details

Configuring a UDP Echo Operation

(config)# ip sla 1
(config-ip-sla)# udp-echo 100.100.100.2 5000
(config)#ip sla sch 1 start-time now

The command includes configuration of a scheduled ICMP ping with request data size of 400 bytes and TOS bit equal 160 to give the traffic some class of service.

(config)#rip sla 2
(config-ip-sla)#icmp-echo 100.100.100.2
(config-ip-sla-echo)#request-data-size 400
(config-ip-sla-echo)#tos 160
(config)#ip sla schedule 2 start now

The ICMP Path Echo operation computes hop-by-hop response time between a Cisco router and any IP device on the network.  It discovers the path using traceroute and then measures response time between the source router and each intermittent hop in the path. If there are multiple equal cost routes between source and destination devices, pathEcho operation has the capability to identify a specific path by using LSR option (if enabled on intermediate devices). This feature enables Cisco IOS IP SLAs to discover paths more accurately, as compared to a typical traceroute.



ICMP Path Echo operation:

Router#
ip sla 3
path-echo <destination ip_address>
frequency 10
ip sla schedule 3 life 25 start-time now
Router#show ip sla statistics aggregated 55

Creating a TCP operation that does not require Cisco IOS IP SLAs responder.

since the operation tries to perform a TCP connection to a well-defined port (http server). The control disable command allows the TCP operation to be used without the IP SLAs responder.
(config)# ip sla 1
(config-ipsla)# tcp-connect 5.0.0.2 80 control disable
(config)# ip sla schedule 1 start-time now

Creating a TCP operation that requires a responder.

the bits are also specified to measure QOS.

(config)# ip-sla 1
(config-ip-sla)# tcp-connect 5.0.0.2 8008
(config-ip-sla)# tos 4
(config)# ip-sla schedule 1 start-time now

Configuration of the DNS operation

ip sla 1
dns www.cisco.com name-server 10.52.128.30
ip sla schedule 1 start-time now

Defining HTTP RAW Operation from CLI

(config)# ip sla 6
(config-ip-sla)# http raw http://6.0.0.2
(config-ip-sla)# http-raw-request
(config-ip-sla-http)# GET /index.html HTTP/1.0\r\n
(config-ip-sla-http)# \r\n
(config-ip-sla-http)# exit

Defining HTTP RAW Operation, for Going Through a Proxy Server, from CLI

In this example 3.0.0.2 is the proxy server and 5.0.0.2 is the target HTTP Server.
(config)# ip sla 6
(config-ip-sla)# http raw http://3.0.0.2
(config-ip-sla)# http-raw-request
config-ip-sla-http)# GET http://5.0.0.2/index.html HTTP/1.0 \r\n
config-ip-sla-httpr\n
config-ip-sla-http)# exit
(config)# ip sla schedule 6 start-time now

Defining HTTP RAW Operation, with Authentication, from CLI

ip sla 1
http raw \
http://nsite-bru.cisco.com
http-raw-request
GET /lab/index.html HTTP/1.0\r\n
Authorization: Basic btNpdGT4biNvoZe=\r\n\r\n
exit
ip sla schedule 1 start-time now

The router always has a single null interface, Null0. By default, a packet sent to the null interface causes the router to respond by sending an Internet Control Message Protocol (ICMP) unreachable message to the packet's source IP address. You can configure the router either to send these responses or to silently drop the packets. In order to disable the sending of ICMP unreachable messages in response to packets sent to the null interface, type this command in interface configuration mode:
!
interface Null0
 no ip unreachable
!

No comments:

Post a Comment