2

how i get the value of TCP connection establishment timing ,retry timing for any TCP connection and also Quality of services parameters in Ubuntu .

1
  • you should start with sudo sysctl -ae | fgrep -i "net.ipv4.tcp" I did not found description of these parameters, but apparently they rule TCP communication on the server. There are many statistics printed out with netstat -s, and then man netstat. There is also /sbin/ifconfig -v to gather few stats per interface. – Jay jargot May 18 '16 at 9:32
0

Try this to display the values currently used for TCP communication:

sudo sysctl -ae | fgrep -i "net.ipv4.tcp"

Some Variables are documented in this man page:

man 7 tcp

Quick start:

man 7 tcp | awk '/proc interfaces/,/Socket options/ {print prev; prev=$0}'

Quality of services parameters, can be displayed with:

netstat -s 
/sbin/ifconfig

----

tcp_retries1 (integer; default: 3; since Linux 2.2)
  The number of times TCP will attempt to retransmit a packet on an established
  connection normally, without the extra effort of getting the network layers
  involved. Once we exceed this number of retransmits, we first have the network
  layer update the route if possible before each new retransmit. The default is
  the RFC specified minimum of 3. 

tcp_retries2 (integer; default: 15; since Linux 2.2)
  The maximum number of times a TCP packet is retransmitted in established
  state before giving up. The default value is 15, which corresponds to a duration
  of approximately between 13 to 30 minutes, depending on the retransmission
  timeout. The RFC 1122 specified minimum limit of 100 seconds is typically deemed
  too short. 

If you consider default values tcp_retries1=3 and tcp_retries2=15:

  • in case of failure to transmit a packet, 3 (tcp_retries1) retransmitions will be attempted, without extra effort.
  • after 3 attempts, the network layer is involved to update the route
  • this is done up to 15 attempts maximum (tcp_retries2), then it stops.
5
  • I have tried command : $ man tcp(7) and found many parameter .I have confusion with these two: tcp_retries1 and tcp_retries2, I'm not able to distinct between them – Asmaul Husna May 19 '16 at 12:53
  • @AsmaulHusna The answer had been updated. – Jay jargot May 19 '16 at 14:10
  • OK.When we open Browser the connect() started and if there is any delay in SYN so can I also get information about it from given command which is sysctl ? And the value shown under sysctl is stored value of system setting for TCP or it is current value of open connection in browser? Thank you so much @Jayjargot – Asmaul Husna May 20 '16 at 9:50
  • 1
    @AsmaulHusna sysctl are static values. To monitor the time of the packets then you need to sniff them on the network interface. tcpdump can be used to record packets passing by a network interface. – Jay jargot May 21 '16 at 10:28
  • Sir u have told about "sudo sysctl -ae | fgrep -i "net.ipv4.tcp" now this is giving static value what is set for tcp such as retries , keep alive and so on .Now if i have TCP connection established in my browser and there is any delay of receiving packet. Now can i able to see on which number of retry attempt that particular packet received ? – Asmaul Husna May 22 '16 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.