What is TCP keepalive, how do I change it and how can I tell it is enabled on a particular socket?

Solution Verified - Updated -

Issue

  • What is TCP keepalive?
  • How can I tell keepalive is enabled on a particular socket?
  • Why is TCP keepalive not enabled on all sockets?
  • What are the tunable values for TCP keep alive?
  • How do I calculate the time to detect TCP connection failure?
  • How do I set and change TCP keepalive?
  • In AIX, the time to detect TCP connection failure is tcp_keepidle + ( tcp_keepintvl * tcp_keepcnt ), how is this calculated on Linux?

Environment

  • Red Hat Enterprise Linux (all versions)
  • TCP connections

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.