Keepalive

from Wikipedia, the free encyclopedia

Keep Alive (German maintenance ) is a mechanism for data transmission to keep up with the goals, a network connection alive and convince yourself of accessibility and functionality of a communication partner.

description

Keepalives are usually specific packets of a network protocol . A keepalive signal is often sent at predefined intervals. If no response is received after a signal has been sent, it is assumed that the connection has been interrupted or that future data will be routed via another path until the connection is re-established. A keepalive signal can also be used to indicate to the Internet infrastructure that the connection should be maintained. Without a keepalive signal, NAT -capable intermediate routers can terminate the connection after a timeout.

Since the only purpose is to find links that aren't working or to indicate connections that should be kept, keepalive messages are typically short and don't use much bandwidth. However, its exact format and use depend on the communication protocol.

Other ways of interpreting a lack of response to a keepalive packet can be:

  • Restoring the network connection with the existing protocol (e.g. continuing a file download, session management for HTTP and VPN connections),
  • Reconnecting by restarting the protocol (e.g. sending e-mail via SMTP ),
  • final connection task ( timeout ), d. H. Termination of the protocol with an error message,
  • Deleting route information from routing tables.

TCP keepalives

In the TCP protocol Keepalives are optional, if they are, however, included, they must be disabled by default. In addition, keep-alive packets should only be sent if no data or acknowledgment packets for the connection have been received within an interval. This interval must be configurable. The default setting cannot be less than two hours.

The keepalive packet does not contain any data. There are three parameters related to keepalive:

  • The hold time is the duration between two keepalive transmissions in the idle state. The TCP keepalive interval must be configurable and is set to no less than 2 hours by default.
  • The keepalive interval is the duration between two consecutive keepalive repetitions if no confirmation of the previous keepalive transmission is received.
  • Keepalive retry is the number of retries that must be performed before declaring the remote end to be unavailable.

When two hosts are connected over a network using TCP / IP, TCP keepalive packets can be used to determine if the connection is still valid and to terminate it if necessary.

Individual evidence

  1. Keepalive. Retrieved May 30, 2019 .
  2. TCP: Keepalive. October 1989, accessed May 31, 2019 .
  3. Using TCP keepalive under Linux. Retrieved May 31, 2019 .