IP SLAs HTTP Operation

Feature History for IP SLAs - HTTP Operation

This table provides release and platform support information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature Name and Description

Supported Platform

Cisco IOS XE 17.18.1

IP SLAs - HTTP Operation: This operation monitors the response time between a Cisco device and an HTTP server when retrieving a web page.

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

IP SLAs HTTP

The IP SLAs HTTP operation is used to monitor the response time between a Cisco device and an HTTP server when retrieving a web page. This operation supports both standard GET requests and custom RAW requests, providing flexibility in how HTTP traffic is tested. By analyzing the results of the HTTP operation, network administrators can assess the performance of an HTTP server, identify potential issues, and ensure reliable web service delivery. The collected data can be displayed and reviewed to gain insights into server responsiveness and overall network health.

How IP SLAs HTTP work

The IP SLA HTTP operation measures the response time required to retrieve a web page from an HTTP server, providing valuable insight into web server performance. This operation involves three key response time measurements:

  • DNS lookup RTT (the round-trip time to resolve the domain name),

  • TCP Connect RTT (the time to establish a TCP connection to the server), and

  • HTTP transaction RTT (the time taken to send an HTTP request and receive the response, specifically for the home HTML page)

Additionally, the "time to first byte" metric records the duration from the start of the TCP connection to the receipt of the first HTML byte. The total HTTP RTT is the sum of DNS, TCP Connect, and HTTP transaction times. For GET requests, IP SLAs automatically format the request based on the provided URL, while RAW requests allow complete customization of the HTTP request, enabling control over fields such as authentication. HTTP requests can also be routed through a proxy server. The results of these operations help monitor web server performance by measuring the round-trip time to retrieve a web page. The operation continues to function regardless of HTTP errors, but the IP SLA HTTP operation is considered down only if the returned HTTP code is not 200.


Note


The only time the SLA probe goes down is when the SLA is unable to establish a TCP connection or is unable to receive an answer from the Remote server to its HTTP request.


Guidelines to configure IP SLAs HTTP operations

  • IP SLAs HTTP operations support only HTTP/1.0.

  • HTTP/1.1 is not supported for any IP SLAs HTTP operation, including HTTP RAW requests.

Configure an HTTP GET operation on the source device

Follow the steps in each of these tasks to configure an HTTP GET operation on the source device.

Procedure


Step 1

Perform any one of these tasks:

Step 2

Schedule IP SLAs operations


Configure a basic HTTP GET operation on the source device

Perform this task to configure a basic HTTP GET operation on the source device.

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ip sla operation-number

Example:

Device(config)# ip sla 10

Starts configuring an IP SLAs operation and enters IP SLA configuration mode.

Step 4

http {get | raw} url [name-server ip-address] [version version-number] [source-ip {ip-address | hostname}] [source-port port-number] [cache {enable | disable}] [proxy proxy-url]

Example:

Device(config-ip-sla)# http get http://198.133.219.25

Defines an HTTP operation and enters IP SLA configuration mode.

  • get : Specifies a standard HTTP GET request.

  • raw : Allows you to send a custom RAW HTTP request.

  • url : The target URL to retrieve.

  • name-server ip-address : (Optional) Specifies the DNS server to use for name resolution.

  • version version-number : (Optional) Sets the HTTP version to use for example 1.0, 1.1.

  • source-ip {ip-address | hostname} : (Optional) Specifies the source IP address or hostname to use for the request.

  • source-port port-number : (Optional) Specifies the source port number for the request.

  • cache {enable | disable} : (Optional) Enables or disables caching for the request.

  • proxy proxy-url : (Optional) Specifies the proxy server to use for the HTTP request.

Step 5

frequency seconds

Example:

Device(config-ip-sla-http)# frequency 90

(Optional) Sets the rate at which a specified IP SLAs HTTP operation repeats. The default and minimum frequency value for an IP SLAs HTTP operation is 60 seconds.

Step 6

end

Example:

Device(config-ip-sla-http)# end

Exits to privileged EXEC mode.


Configure an HTTP GET operation with optional parameters on the source device

Perform this task to configure an HTTP GET operation with optional parameters on the source device.

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ip sla operation-number

Example:

Device(config)# ip sla 10

Starts configuring an IP SLAs operation and enters IP SLA configuration mode.

Step 4

http {get | raw} url [name-server ip-address] [version version-number] [source-ip {ip-address | hostname}] [source-port port-number] [cache {enable | disable}] [proxy proxy-url]

Example:

Device(config-ip-sla)# http get http://198.133.219.25

Defines an HTTP operation and enters IP SLA configuration mode.

  • get : Specifies a standard HTTP GET request.

  • raw : Allows you to send a custom RAW HTTP request.

  • url : The target URL to retrieve.

  • name-server ip-address : (Optional) Specifies the DNS server to use for name resolution.

  • version version-number : (Optional) Sets the HTTP version to use for example 1.0, 1.1.

  • source-ip {ip-address | hostname} : (Optional) Specifies the source IP address or hostname to use for the request.

  • source-port port-number : (Optional) Specifies the source port number for the request.

  • cache {enable | disable} : (Optional) Enables or disables caching for the request.

  • proxy proxy-url : (Optional) Specifies the proxy server to use for the HTTP request.

Step 5

history distributions-of-statistics-kept size

Example:

Device(config-ip-sla-http)# history distributions-of-statistics-kept 5

(Optional) Sets the number of statistics distributions kept per hop during an IP SLAs operation.

Step 6

frequency seconds

Example:

Device(config-ip-sla-http)# frequency 90

(Optional) Sets the rate at which a specified IP SLAs HTTP operation repeats. The default and minimum frequency value for an IP SLAs HTTP operation is 60 seconds.

Step 7

history hours-of-statistics-kept hours

Example:

Device(config-ip-sla-http)# history hours-of-statistics-kept 4

(Optional) Sets the number of hours for which statistics are maintained for an IP SLAs operation.

Step 8

http-raw-request

Example:

Device(config-ip-sla-http)# http-raw-request

(Optional) Explicitly specifies the options for a GET request for an IP SLAs HTTP operation.

Step 9

owner owner-id

Example:

Device(config-ip-sla-http)# owner admin

(Optional) Configures the Simple Network Management Protocol (SNMP) owner of an IP SLAs operation.

Step 10

history statistics-distribution-interval milliseconds

Example:

Device(config-ip-sla-http)# history statistics-distribution-interval 10

(Optional) Sets the time interval for each statistics distribution kept for an IP SLAs operation.

Step 11

tag text

Example:

Device(config-ip-sla-http)# tag TelnetPollServer1

(Optional) Creates a user-specified identifier for an IP SLAs operation.

Step 12

threshold milliseconds

Example:

Device(config-ip-sla-http)# threshold 10000

(Optional) Sets the upper threshold value for calculating network monitoring statistics created by an IP SLAs operation.

Step 13

timeout milliseconds

Example:

Device(config-ip-sla-http)# timeout 10000

(Optional) Sets the amount of time an IP SLAs operation waits for a response from its request packet.

Step 14

tos number

Example:

Device(config-ip-sla-http)# tos 160

(Optional) Defines a type of service (ToS) byte in the IP header of an IP SLAs operation.

Step 15

end

Example:

evice(config-ip-sla-http)# end

Exits to privileged EXEC mode.


Configure an HTTP RAW operation on the source device

Before you begin

This operation does not require an IP SLAs Responder on the destination device.

Perform this task to configure an HTTP RAW operation on the source device.

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ip sla operation-number

Example:

Device(config)# ip sla 10

Starts configuring an IP SLAs operation and enters IP SLA configuration mode.

Step 4

http {get | raw} url [name-server ip-address] [version version-number] [source-ip {ip-address | hostname}] [source-port port-number] [cache {enable | disable}] [proxy proxy-url]

Example:

Device(config-ip-sla)# http get http://198.133.219.25

Defines an HTTP operation and enters IP SLA configuration mode.

  • get : Specifies a standard HTTP GET request.

  • raw : Allows you to send a custom RAW HTTP request.

  • url : The target URL to retrieve.

  • name-server ip-address : (Optional) Specifies the DNS server to use for name resolution.

  • version version-number : (Optional) Sets the HTTP version to use for example 1.0, 1.1.

  • source-ip {ip-address | hostname} : (Optional) Specifies the source IP address or hostname to use for the request.

  • source-port port-number : (Optional) Specifies the source port number for the request.

  • cache {enable | disable} : (Optional) Enables or disables caching for the request.

  • proxy proxy-url : (Optional) Specifies the proxy server to use for the HTTP request.

Step 5

http-raw-request

Example:

Device(config-ip-sla)# http-raw-request

Enters HTTP RAW configuration mode.

Step 6

Enter the required HTTP 1.0 command syntax.

Example:

Device(config-ip-sla-http)# GET /en/US/hmpgs/index.html HTTP/1.0\r\n\r\n

Specifies all the required HTTP 1.0 commands.

Step 7

end

Example:

Device(config-ip-sla-http)# end

Exits to privileged EXEC mode.


Schedule IP SLAs operations

Perform this task to schedule IP SLAs operations.

Before you begin

  • All IP SLAs operations to be scheduled must be already configured.

  • The frequency of all operations scheduled in a multioperation group must be the same.

  • The list of one or more operation ID numbers to be added to a multioperation group must be limited to a maximum of 125 characters in length, including commas (,).

Procedure


Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ip sla schedule operation-number [life {forever | seconds}] [start-time {[hh:mm:ss] [month day | day month] | pending | now | after hh:mm:ss}] [ageout seconds] [recurring]

Example:

Device(config)# ip sla schedule 10 life forever start-time
OR
Device(config)# ip sla schedule 1 3,4,6-9 schedule-period 50 frequency range 80-100

(Optional) Configures the scheduling parameters for an individual IP SLAs operation.

  • operation-number : The IP SLA operation number to schedule (must match a previously created IP SLA operation).

    The range is from 1 to 2147483647.

  • life {forever | seconds} : How long the operation will run.

    • forever : Runs the operation continuously until manually stopped.

    • seconds : Number of seconds the operation should run.

      The range is from 1 to 2147483647 seconds.

  • start-time {[hh:mm:ss] [month day | day month] | pending | now | after hh:mm:ss} : Specifies when to start the operation.

    • hh:mm:ss [month day | day month] : Specific time and date.

    • pending : Waits for a manual start.

    • now : Starts immediately.

    • after hh:mm:ss : Starts after the specified amount of time.

  • ageout seconds : Time (in seconds) after which the operation is automatically deleted.

    The range is from 0 to 2147483647 seconds.

  • recurring : Makes the operation run repeatedly according to its frequency settin

Step 4

ip sla group schedule group-operation-number operation-id-numbers {schedule-period schedule-period-range |schedule-together}[ageout seconds] frequency group-operation-frequency [life {forever | seconds}] [start-time {hh:mm [:ss] [month day | day month] | pending | now | after hh:mm[:ss]}]

Example:


Device(config)# ip sla group schedule 10 schedule-period frequency
OR
Device(config)# ip sla group schedule 1 3,4,6-9 life forever start-time now

(Optional) Specifies an IP SLAs operation group number and the range of operation numbers for a multioperation scheduler.

  • group-operation-number : The number assigned to the group operation (must be unique).

    The range is from 1 to 2147483647.

  • operation-id-numbers : List of individual IP SLA operation numbers to be included in the group.

    The range is from 1 to 2147483647 (can be a series separated by spaces).

  • schedule-period schedule-period-range: Schedules each operation in the group with a specified time period between them.

    The range is from 1 to 604800 (seconds; up to 7 days).

  • schedule-together : Starts all operations in the group at the same time.

  • frequency group-operation-frequency : How often (in seconds) the group operation runs.

    The range is from 1 to 604800 seconds.

Step 5

end

Example:

Device(config)# end

Exits global configuration mode and returns to privileged EXEC mode.


Configuration example for an HTTP RAW operation with authentication

The following example shows how to configure an HTTP RAW operation with authentication.


Device> enable
Device# configure terminal
Device(config)# ip sla 8
Device(config-ip-sla)# http raw url http://site-test.cisco.com
Device(config-ip-sla)# http-raw-request
Device(config-ip-sla)# GET /lab/index.html HTTP/1.0\r\n
Authorization: Basic btNpdGT4biNvoZe=\r\n
\r\n
Device(config-ip-sla)# end
Device# configure terminal
Device(config)# ip sla schedule 8 life forever start-time now