0

I have some TCP packets being lost. I have monitored the interface with tcpdump pcap file - https://www.dropbox.com/s/7m3hr1b7065tenx/tcp.pcap?dl=0

I noticed that when I lose packets I only get 5 frames whereas I usually see 9. Example lost packets: 10.0.225.43 27/07/2022 20:39:31

10.0.225.43 27/07/2022 20:56:57

10.0.225.58 27/07/2022 21:37:49

10.0.225.43 27/07/2022 21:45:08

I am not sure what each frame is and the significance of only having 5 as opposed to 9. I have a ruby TCPServer which is not recieving these packets. I believe I am seeing SYN, ACK PSH frames but not FIN frames.

Can anyone help me to understand how I am losing packets so I can try and mitigate?

Thanks

  • What is the network topology? – Tero Kilkanen Jul 27 '22 at 21:06
  • Sorry unsure on this. Perhaps point to point? I have a device that has a SIM card in sending over a cellular network which has a private VPN tunnel to my stack – Ruby dev Jul 28 '22 at 07:54
  • I believe by not receiving the FIN frames my network layer is not pushing the packet up the stack to my app - I wonder if I can mitigate this? Can I ask my network / OS (AWS linux 2) to send packets after a timeout if no FIN recieved? I only even get 1 PSH which is my data payload I believe. – Ruby dev Jul 28 '22 at 07:54

1 Answers1

0

Your problem seems most likely physical.

Your device is on the cellular network, which, depending on your location and on time of the day, may cause packet loss.

In general, Wi-Fi network can cause packet loss due to the environment.

TCP works great, so that if you loose packets, it will retry.

Samuel PE
  • 48
  • 5
  • Yip agree - thats why we picked TCP to minimise packet lose and "guarantee" packet delivery. Have you ever come across not recieving a FIN frame from source before? Can I ask the network to time out if there is no FIN and send the packet to the port anyway? – Ruby dev Jul 28 '22 at 16:12