IP SLAs DHCP Operation

Feature History for IP SLAs - DHCP 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 - DHCP Operation: This operation measures the round-trip time (RTT) needed to discover a DHCP server and obtain a leased IP address.

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

IP SLAs DHCP

The IP SLAs DHCP operation measures the round-trip time (RTT) needed to discover a DHCP server and obtain a leased IP address. After the operation completes, IP SLAs releases the leased IP address. The RTT data collected from this process can be used to assess DHCP server performance and ensure efficient IP address allocation within the network.

IP SLAs DHCP relay agent options

A DHCP relay agent is a host that forwards DHCP packets between clients and servers, enabling communication when clients and servers are not on the same physical subnet. Relay agents are essential in networks where direct communication is not possible due to subnet boundaries. Unlike standard IP packet forwarding, which switches packets transparently between networks, a relay agent receives DHCP messages and generates new DHCP messages to send out on another interface, ensuring that DHCP requests and replies reach their intended destinations.

How IP SLAs DHCP works

The DHCP operation supports two modes. By default, it sends discovery packets on every available IP interface on the device to locate a DHCP server. However, if a specific DHCP server is configured, the operation directs discovery packets only to that designated server. This flexibility allows for either broad network testing or targeted performance monitoring of a particular DHCP server.

Configure a DHCP operation on the source device

Follow the steps in each of these tasks to configure a DHCP operation on the source device.

Before you begin

There is no need to configure an IP SLAs responder on the destination device.

Procedure


Step 1

Configure any one of these tasks

Step 2

Schedule IP SLAs operations


Configure a basic DHCP operation

Perform this task to configure a basic DHCP operation.

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

dhcp {destination-ip-address | destination-hostname} [source-ip {ip-address | hostname}]

Example:

Device(config-ip-sla)# dhcp 10.10.10.3

Defines a DHCP operation and enters IP SLA DHCP configuration mode.

  • destination-ip-address : The IP address of the DHCP server to which the discovery packet will be sent.

  • destination-hostname : The hostname of the DHCP server to which the discovery packet will be sent.

  • source-ip {ip-address | hostname} : (Optional) Specifies the source IP address or hostname from which the DHCP request will be sent.

Step 5

frequency seconds

Example:

Device(onfig-ip-sla-dhcp)# frequency 90

(Optional) Sets the rate at which a specified IP SLAs operation repeats.

Step 6

end

Example:

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

Exits to privileged EXEC mode.


Configure a DHCP operation with optional parameters

Perform this task to configure a DHCP operation with optional parameters.

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

dhcp {destination-ip-address | destination-hostname} [source-ip {ip-address | hostname}]

Example:

Device(config-ip-sla)# dhcp 10.10.10.3

Defines a DHCP operation and enters IP SLA DHCP configuration mode.

  • destination-ip-address : The IP address to query for its host name (reverse lookup).

  • destination-hostname : The host name to query for its IP address (standard lookup).

  • name-server ip-address : The IP address of the DHCP server to be used for the query.

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

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

Step 5

history buckets-kept size

Example:

Device(config-ip-sla-dhcp)# history buckets-kept 25

(Optional) Sets the number of history buckets that are kept during the lifetime of an IP SLAs operation.

Step 6

history distributions-of-statistics-kept size

Example:

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

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

Step 7

history enhanced [interval seconds] [buckets number-of-buckets]

Example:

Device(config-ip-sla-dhcp)# history enhanced interval 900 buckets 100

(Optional) Enables enhanced history gathering for an IP SLAs operation.

  • interval seconds : (Optional) The time interval, in seconds, between each statistics recording.

  • buckets number-of-buckets : (Optional) The number of history data buckets (records) to store for the operation.

Step 8

history filter {none | all | overThreshold | failures}

Example:

Device(config-ip-sla-dhcp)# history filter failures

(Optional) Defines the type of information kept in the history table for an IP SLAs operation.

Step 9

frequency seconds

Example:

Device(config-ip-sla-dhcp)# frequency 30

(Optional) Sets the rate at which a specified IP SLAs operation repeats.

Step 10

history hours-of-statistics-kept hours

Example:

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

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

Step 11

history lives-kept lives

Example:

Device(config-ip-sla-dhcp)# history lives-kept 5

(Optional) Sets the number of lives maintained in the history table for an IP SLAs operation.

Step 12

owner owner-id

Example:

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

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

Step 13

history statistics-distribution-interval milliseconds

Example:

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

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

Step 14

tag text

Example:

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

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

Step 15

threshold milliseconds

Example:

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

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

Step 16

timeout milliseconds

Example:

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

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

Step 17

end

Example:

Device(config-ip-sla-dhcp)# 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 IP SLAs DHCP operation

In the following example, IP SLAs operation number 12 is configured as a DHCP operation enabled for DHCP server 172.16.20.3. Note that DHCP option 82 is used to specify the circuit ID.

Device B Configuration

Device> enable
Device# configure terminal
Device(config)# ip dhcp-server 172.16.20.3
!
Device(config)# ip sla 12
Device(config-ip-sla)# dhcp 10.10.10.3
Device(config-ip-sla)# frequency 30
Device(config-ip-sla)# timeout 5000
Device(config-ip-sla)# tag DHCP_Test
Device(config-ip-sla)# exit
!
Device(config)# ip sla schedule 12 start-time now