At Keep Alive (also called KA), it is a message sent from one device to another to verify that the connection between the two is working or to prevent the connection from being broken.
Description of Keep Alive
A signal from Keep Alive is sent very frequently at predefined intervals and plays a significant role on the Internet. If no response is received after the signal is sent, the program assumes that it is a connection interruption. Thus, all further data is sent via a different path. This continues until a connection can be re-established.
TCP-Keep Alives(Transmission Control Protocol) are an optional feature and, if included, must be disabled by default. The KA packet does not contain any data. In an Ethernet network, this results in frames with a minimum size (64 Byte). There are three parameters that refer to KAs:
- The KA time is the duration between two idle KA transmissions. The TCP retention time shall be configurable and shall be set to at least two hours by default.
- The KA interval is the duration between two consecutive KA retransmissions when no acknowledgement is received for the previous KA transmission.
- The KA retry is the number of retransmissions that must be performed before declaring that the remote end is not available.
Typically, TCP Keep Alives are sent every 45 or 60 seconds on an inactive TCP connection. The connection is terminated after three consecutive ACKs are missed. This varies depending on the host. For example, by default, Windows PCs send the first TCP Keep Alive packet after 7,200,000 ms (2 hours) and then 5 Keep Alives at 1,000 ms intervals. The connection is terminated if there is no response to any of the KA packets.
Keep Alive s on higher layers
Since TCP-KA is optional, several protocols (e.g., SMB and TLS) implement their own KA function in addition to TCP. It is also common for protocols that manage a session over a connectionless protocol, e.g. OpenVPN over UDP, to implement their own KA function.
Do you have any more questions?