Application-Specific Scenario: HTTP

Before you configure IP SLA operations, the show ip sla application command lets you verify the supported IP SLA functions on the router:

router#show ip sla application
        IP Service Level Agreements
Version: Round Trip Time MIB 2.2.0, Infrastructure Engine-II
Time of last change in whole IP SLAs: 17:13:51.307 UTC Wed Dec 20 2006
Estimated system max number of entries: 72877

Estimated number of configurable operations: 72874
Number of Entries configured  : 3
Number of active Entries      : 0
Number of pending Entries     : 0
Number of inactive Entries    : 3

        Supported Operation Types
Type of Operation to Perform: dhcp
Type of Operation to Perform: dns
Type of Operation to Perform: echo
Type of Operation to Perform: frameRelay
Type of Operation to Perform: ftp
Type of Operation to Perform: http
Type of Operation to Perform: icmpJitter
Type of Operation to Perform: jitter
Type of Operation to Perform: pathEcho
Type of Operation to Perform: pathJitter
Type of Operation to Perform: rtp
Type of Operation to Perform: slm controller
Type of Operation to Perform: slm frame-relay interface
Type of Operation to Perform: slm frame-relay pvc
Type of Operation to Perform: slm interface
Type of Operation to Perform: tcpConnect
Type of Operation to Perform: udpEcho
Type of Operation to Perform: voip

IP SLAs low memory water mark: 99839841


					  

The following example shows how to configure an IP SLA with an operation that monitors the reachability of a NetFlow collector at the http://colfish:8080/nfc/ URL. This operation does not require the IP SLA Responder to be enabled:

Router(config)# ip sla 1
Router(config-ip-sla)# http get url http://colfish:8080/nfc/ version 1.1

At this point, the operation exists but is not yet enabled, because scheduling is a compulsory task.

Router(config)# ip sla schedule 1 start-time now life forever

At this point, the operation is active.

The output of show ip sla configuration 1 displays the entry's status, equivalent to the SNMP RowStatus Textual Convention RowStatus: notInService:

Router#show ip sla configuration 1
IP SLA Monitor, Infrastructure Engine-II.
Entry number: 1
Owner:
Tag:
Type of operation to perform: http
Target address: 10.48.71.129
Source address: 0.0.0.0
Target port: 8080
Source port: 0
Operation timeout (milliseconds): 60000
Type Of Service parameters: 0x0
HTTP Operation: get
HTTP Server Version: 1.1
URL: http://colfish:8080/nfc/
Proxy:
Raw String(s):
Cache Control: enable
Operation frequency (seconds): 60
Next Scheduled Start Time: Start Time already passed
Group Scheduled : FALSE
Life (seconds): Forever
Entry Ageout (seconds): never
Recurring (Starting Everyday): FALSE
Status of entry (SNMP RowStatus): Active
Threshold (milliseconds): 5000
Number of statistic hours kept: 2
Number of statistic distribution buckets kept: 1
Statistic distribution interval (milliseconds): 20
Number of history Lives kept: 0
Number of history Buckets kept: 15
History Filter Type: None


					  

From the show command, you can clearly see the characteristics. This operation is based on IP SLA infrastructure II, which increases measurement accuracy. The operation is an HTTP get on the URL http://colfish:8080/nfc/, with a default operation frequency of 60 seconds and a default threshold of 5000 ms.

However, the output from show ip sla statistics 1 displays Latest operation return code: DNS query error. At this point, the Domain Name Server (DNS) must be configured on the router:

Router(config)# ip name-server 10.10.10.10
Router(config)# ip domain-list cisco.com
Router(config)# ip domain-name cisco.com

The show ip sla statistics 1 output now displays the following:

Router # show ip sla statistics 1
Entry number: 1
Modification time: 23:51:04.664 CET Fri Oct 20 2000
Number of Octets Used by this Entry: 2656
Number of operations attempted: 7
Number of operations skipped: 0
Current seconds left in Life: Forever
Operational state of entry: Active
Last time this entry was reset: Never
Connection loss occurred: FALSE
Timeout occurred: FALSE
Over thresholds occurred: FALSE
Latest RTT (milliseconds): 352
Latest operation start time: 23:57:04.909 CET Fri Oct 20 2000
Latest operation return code: OK
Latest DNS RTT: 4
Latest TCP Connection RTT: 4
Latest HTTP time to first byte: 148
Latest HTTP Transaction RTT: 344
Latest HTTP Status: 301
Latest HTTP Message Size: 405
Latest HTTP Entity-Body size: 179


					  

The HTTP server response time measurements consist of three types:

  • DNS lookup is the RTT taken to perform domain name lookup—in this case, 4 ms.

  • TCP Connect is the RTT taken to perform a TCP connection to the HTTP server—in this case, 4 ms.

  • HTTP transaction time is the RTT taken to send a request and get a response from the HTTP server—in this case, 344 ms. The operation retrieves only the HTML home page.

Even if this operation does not require NTP, a good network practice is to set the clock accurately so that the operation start time is reported correctly.

Finally, a reaction threshold can be configured. Its objective would be to send a trap in case of connection loss for operation 1. The section "Thresholds and Notifications" explains the technical details as well as the configuration.



Part II: Implementations on the Cisco Devices