Advanced

parameters tcp_retries2

A UNIX Parameter
$cat /proc/sys/net/ipv4/tcp_retries2
15
$

Parameter Definition
How  many  times  to   retry  before  killing  alive  TCP
connection. RFC1122 says that  the limit should be longer
than 100 sec.  It is too small number.  The default value
of 15 corresponds to ~ 13 - 30 minutes, depending on RTO.

Parameter Code Internals


snippet 1
{
.procname = "tcp_retries2",
.data = &sysctl_tcp_retries2,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},

snippet 2
if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
/* Black hole detection */
tcp_mtu_probing(icsk, sk);

dst_negative_advice(sk);
}

retry_until = sysctl_tcp_retries2;
if (sock_flag(sk, SOCK_DEAD)) {
const int alive = (icsk->icsk_rto < TCP_RTO_MAX);

retry_until = tcp_orphan_retries(sk, alive);
do_reset = alive ||
!retransmits_timed_out(sk, retry_until, 0, 0);

if (tcp_out_of_resources(sk, do_reset))
return 1;
}


Related From Research Paper
A tool  for TCP  stack testing and  TCP/IP fingerprinting
(a.k.a.   OS  detection)   is  introduced.   While  tools
presently exist  to do either  OS detection[1, 2]  or TCP
stack testing[3, 4], the  methods they employ are limited
by  the  techniques  and  analysis  performed,  sometimes
resulting in incorrect re- sults or no results at all. We
introduce   synscan,  a  tool   whose  objective   is  to
fingerprint     every      aspect     of     a     TCP/IP
implementation.    synscan   is    not    meant   as    a
proof-of-concept tool; rather, it  is a robust and useful
tool which can  be used in addition to  others for TCP/IP
stack  testing and OS  de- tection.  synscan incorporates
most  of the  techiques used  by the  existing  tools and
introduces  a number  of new  ones.  synscan's  s primary
advantage is that each test begins with a TCP SYN segment
(hence the name)  to an open port, giving  it the ability
to   test  and  fingerprint   even  the   most  fortified
hosts. Conclusive data from  large network scans and com-
parisons  to   results  from  existing   tools  are  also
reported.

source:
SYNSCAN: Towards Complete TCP/IP Fingerprinting
                       Greg Taleck
                    
                    NFR Security, Inc.
               5 Choke Cherry Rd, Suite 200
                   Rockville, MD 20850




parameter tcp_retries1

A UNIX Parameter
$cat /proc/sys/net/ipv4/tcp_retries1
3
$echo 4 > /proc/sys/net/ipv4/tcp_r

Parameter Definition
This value influences the  time, after which TCP decides,
that  something  is   wrong  due  to  unacknowledged  RTO
retransmissions,  and  reports   this  suspicion  to  the
network   layer.   RFC   1122  recommends   at   least  3
retransmissions, which is the default.

Parameter Code Internals


snippet 1
{
.procname = "tcp_retries1",
.data = &sysctl_tcp_retries1,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.extra2 = &tcp_retr1_max
},

snippet 2
if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) {
/* Black hole detection */
tcp_mtu_probing(icsk, sk);

dst_negative_advice(sk);
}


Related From Research Paper
In this paper we have investigated TCP behavior in a 802.11b wireless Infrastructure network by means of experiments in a wireless network testbed. We have compared results obtained with similar experiments done in NS2 simulator. We conclude that TCP ACK skipping indeed improves TCP performance in real-life wireless LANs. Although the original goal was to explore the simultaneous-send problem reported in [1], several other insights were also obtained. The NS2 simulations showed the simultaneous-send problem manifest when MAC retries were disabled. However we were unable to reproduce the NO MAC retries case. Unlike in the NS2 simulator, various status indicators cannot be tracked in real experimentation. Instead the simultaneous-send phenomenon was observed using standalone network sniffers.
source: Experimental Evaluation of the TCP Simultaneous-Send Problem in 802.11 Wireless Local Area Networks Sumathi Gopal WINLAB, Rutgers University 73, Brett Road Piscataway, NJ 08854-8048 001 609 720 1202 sumathi@winlab.rutgers.edu Dipankar Raychaudhuri WINLAB, Rutgers University 73, Brett Road Piscataway, NJ 08854-8048 001 732 445 0877 ray@winlab.rutgers.edu

full size packets . tcp_retrans_collapse

$cat /proc/sys/net/ipv4/tcp_retrans_collapse
1
$

Try to send full-sized packets during retransmit.
This is enabled by default.
TCP smart Framing, or TCP-SF for short, enables  the Fast
Retransmit/Recovery  algorithms even when  the congestion
window  is small.  Without modifying  the  TCP congestion
control              based             on             the
additive-increase/multiplicative-decrease        paradigm,
TCP-SF  adopts  a  novel  segmentation  algorithm:  while
Classic TCP  always tries to send  full-sized segments, a
TCP-SF  source  adopts  a  more flexible  s  segmentation
algorithm to try and always  have a number of in flight s
segments larger than 3 so  as to enable Fast Recovery. We
motivate  this  choice by  real  traffic c  measurements,
which indicate  that today's  traffic is is  populated by
short-li flows, whose only means to recover from a packet
loss is  by triggering a Retransmission  Timeout. The key
idea of  TCP-SF can  be imple- mented  on top of  any TCP
flavor,   ,  from   Tahoe   to  SACK,   and  re-   quires
modifications s to the server  TCP stack only, and can be
easily  coupled   with  recent  TCP   enhancements.   The
performance of the proposed TCP modification were studied
by means  of simulations,  live measurements and  an ana-
lytical model. In addition,  the analytical model we have
devised has a  general scope, making it a  valid tool for
TCP  performance evaluation in  the small  window region.
Improvements  are  remark-   able  under  several  buffer
management   schemes,  and  maximized   by  byte-oriented
schemes.

TCP Smart Framing: A Segmentation Algorithm
to Reduce TCP Latency
Marco Mellia, Member, IEEE, Michela Meo, Member, IEEE, and Claudio Casetti