Published On: October 21ˢᵗ, 2021 08:40

IP Addressing Services Configuration Guide, Cisco IOS XE Amsterdam 17.3.x (Catalyst 9500 Switches)

Contents

Restrictions for TCP Keepalive Timer

The TCP Keepalive timer parameters can be configured only on vty and TTY applications.

Information about TCP Keepalive Timer

The TCP Keepalive Timer feature provides a mechanism to identify dead connections.

When a TCP connection on a routing device is idle for too long, the device sends a TCP keepalive packet to the peer with only the Acknowledgment (ACK) flag turned on. If a response packet (a TCP ACK packet) is not received after the device sends a specific number of probes, the connection is considered dead and the device initiating the probes frees resources used by the TCP connection.

The following parameters are used to configure TCP keepalive:

  • TCP Keepalive idle time: The value of this parameter indicates the time for which a TCP connection can be idle before the connection initiates keepalive probes.

  • TCP Keepalive retries: The value of this parameter is the number of unacknowledged probes that a device can send before declaring the connection as dead and tearing it down.

  • TCP Keepalive interval: The time between subsequent probe retries.

Configuring Keepalive Parameters

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. ip tcp keepalive interval seconds
  4. ip tcp keepalive retries number-of-retries
  5. end
  6. show running-config

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:

Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enables global configuration mode.

Step 3

ip tcp keepalive interval seconds

Example:

Device(config)# ip tcp keepalive interval 23

Configures the keepalive interval.

Step 4

ip tcp keepalive retries number-of-retries

Example:

Device(config)# ip tcp keepalive retries 5

Configures the number of unacknowledged probes that can be sent before declaring the connection as dead.

Step 5

end

Example:

Device(config)# end

Exits global configuration mode and returns to privileged EXEC mode.

Step 6

show running-config

Example:

Device# show running-config

(Optional) Displays the running configuration.

Example: Configuring Keepalive Parameters

The following example shows how to configure TCP keepalive parameters.

Device> enable
Device# configure terminal
Device(config)# ip tcp keepalive interval 2
Device(config)# ip tcp keepalive retries 5
Device(config)# end


The following is a sample output of the show running-config command:


Device# show running-config

ip tcp keepalive retries 5
ip tcp keepalive interval 2

Additional References for TCP Keepalive Timer

Standards and RFCs

Standard/RFC

Title

RFC 793

Transmission Control Protocol

RFC 1191

Path MTU discovery

RFC 1323

TCP Extensions for High Performance

RFC 2018

TCP Selective Acknowledgment Options

RFC 2581

TCP Congestion Control

RFC 3168

The Addition of Explicit Congestion Notification (ECN) to IP

RFC 3782

The NewReno Modification to TCP’s Fast Recovery Algorithm

RFC 4022

Management Information Base for the Transmission Control Protocol (TCP)

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for TCP Keepalive Timer

This table provides release and related 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.

Table 1. New Feature History

Release

Feature

Feature Information

Cisco IOS XE Fuji 16.8.1a

TCP Keepalive Timer

The TCP Keepalive Timer feature introduces the capability to identify dead connections between multiple routing devices.

The following command was introduced or modified by this feature: ip tcp keepalive .

Use the Cisco Feature Navigator to find information about platform and software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn.