Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-08-04
2
Medium Priority
?
2,949 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
e-tsik earned 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

604 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