Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Counting TCP retransmissions

I would like to know if there is a way to count the number of TCP retransmissions that occurred in a flow, in LINUX. Either on the client side or the server side.

like image 906
M10TheMist Avatar asked May 30 '13 17:05

M10TheMist


People also ask

How many TCP retransmissions are normal?

Packet retransmissions The retransmission rate of traffic from and to the Internet should not exceed 2%. If the rate is higher, the user experience of your service may be affected.

How do you know if a TCP packet is retransmission?

TCP Retransmission Set when all of the following are true: This is not a keepalive packet. In the forward direction, the segment length is greater than zero or the SYN or FIN flag is set. The next expected sequence number is greater than the current sequence number.

What are TCP retransmissions?

What Is TCP Retransmission? TCP (the Transmission Control Protocol) connects network devices to the internet. When an outbound segment is handed down to an IP and there's no acknowledgment for the data before TCP's automatic timer expires, the segment is retransmitted.

What triggers TCP retransmission?

Common reasons for retransmissions include network congestion where packets are dropped (either a TCP segment is lost on its way to the destination, or the associated ACK is lost on the way back to the sender), tight router QoS rules that give preferential treatment to certain protocols, and TCP segments that arrive ...


2 Answers

Looks like netstat -s solves my purpose.

like image 92
M10TheMist Avatar answered Oct 13 '22 01:10

M10TheMist


You can see TCP retransmissions for a single TCP flow using Wireshark. The "follow TCP stream" filter will allow you to see a single TCP stream. And the tcp.analysis.retransmission one will show retransmissions.

For more details, this serverfault question may be useful: https://serverfault.com/questions/318909/how-passively-monitor-for-tcp-packet-loss-linux

like image 29
Christian Hudon Avatar answered Oct 13 '22 01:10

Christian Hudon