Solved

How do I configure tcp_max_orphans, tcp_keepalive_intvl, tcp_keepalive_probes and tcp_keepalive_time?

Posted on 2004-08-04
2
2,788 Views
Last Modified: 2013-12-06
Hello,

I'm trying to change the values of "tcp_max_orphans", "tcp_keepalive_intvl", "tcp_keepalive_probes" and "tcp_keepalive_time" in Red Hat 8.0.  I'm trying to modify the files using GEdit, but for some reason is not letting me do it.  Is there any way to change their default values?

I want to be able to kill inactive socket connections after a short period of time.  Am I in the right track?

Thanks in Advance.

J.H
0
Comment
Question by:frankmorrison
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
e-tsik earned 500 total points
ID: 11722945
Hi :-)

Two options:
1.
echo "xxxx" > /proc/sys/net/ipv4/tcp_max_orphans
echo "xxxx" > /proc/sys/net/ipv4/tcp_keepalive_intvl
echo "xxxx" > /proc/sys/net/ipv4/tcp_keepalive_probes
echo "xxxx" > /proc/sys/net/ipv4/tcp_keepalive_time
(replace "xxxx" with the numbers you want to set)

2.
To permanently set these options, edit /etc/sysctl.conf. Put the lines:
net.ipv4.tcp_max_orphans = "xxxx"
net.ipv4.tcp_keepalive_intvl = "xxxx"
net.ipv4.tcp_keepalive_probes = "xxxx"
net.ipv4.tcp_keepalive_time = "xxxx"

About closing connections after a short period of time. A general optimzer for a routing machine should be:
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.tcp_window_scaling = 0
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0

Look into those items and see if they fit your requirements. www.lartc.org (Linux advanced routing and control traffic howto).

Enjoy!
0
 
LVL 9

Expert Comment

by:e-tsik
ID: 12082005
Thanks!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question