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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content