Search code examples
networkingtcpscapypacket-snifferspacket-loss

How to calculate packet loss rate with scapy?


I'm trying to calculate packet loss rate from youtube when a video is running.

I sniff packets one by one by Scapy, on eth0 and filter TCP packets with IP header.

To calculate packet loss rate, I should have a number of received packets and a number of sent packets (or excepted packets).

I can easily calculate the number of received packets, but I have a problem with sent packets from youtube.


Solution

  • After more google search I found an article from the Cisco that explained how to approximate packet loss rate base on the bandwidth.

    This is the link, that helps me I hope that can help you too.

    Bandwidth, Packets Per Second, and Other Network Performance Metrics

    Thanks.