{"id":14649,"date":"2014-12-09T19:28:59","date_gmt":"2014-12-10T01:28:59","guid":{"rendered":"http:\/\/bucktownbell.com\/?p=14649"},"modified":"2014-12-09T19:28:59","modified_gmt":"2014-12-10T01:28:59","slug":"how-to-calculate-packet-loss-from-a-binary-tcpdump-file","status":"publish","type":"post","link":"http:\/\/bucktownbell.com\/?p=14649","title":{"rendered":"how to calculate packet loss from a binary TCPDUMP file"},"content":{"rendered":"<blockquote><p>You can measure packet retransmits from the client to the server by counting the number of duplicate sequence numbers.<\/p>\n<p>Packet retransmits from the server to the client can be measured by counting duplicate Ack numbers.<\/p>\n<p>Note that a retransmit is triggered by more than just total loss (= timeout); if the remote machine rejects the packet, or the packet is corrupted, the local machine must also retransmit.<\/p><\/blockquote>\n<p>via <a href=\"http:\/\/serverfault.com\/questions\/336588\/how-to-calculate-packet-loss-from-a-binary-tcpdump-file\">networking &#8211; how to calculate packet loss from a binary TCPDUMP file &#8211; Server Fault<\/a>.<\/p>\n<p>I needed a way to measure this on a wifi network where packet loss can be very high and bursty.\u00a0 This answer seems relatively simple to implement &#8212; just store off\u00a0 ACK sequence numbers into an array of limited size and count how many times every new ACK matches in that array.\u00a0 By monitoring this count I can determine where and when certain areas are getting bad and perhaps alert or alarm based upon a certain threshold.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can measure packet retransmits from the client to the server by counting the number of duplicate sequence numbers. Packet retransmits from the server to the client can be measured by counting duplicate Ack numbers. Note that a retransmit is &hellip; <a href=\"http:\/\/bucktownbell.com\/?p=14649\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[104,1357,327,699],"class_list":["post-14649","post","type-post","status-publish","format-standard","hentry","category-networking","tag-howto","tag-performance-management","tag-tcp","tag-tcpdump"],"_links":{"self":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/14649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14649"}],"version-history":[{"count":1,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/14649\/revisions"}],"predecessor-version":[{"id":14650,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=\/wp\/v2\/posts\/14649\/revisions\/14650"}],"wp:attachment":[{"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14649"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bucktownbell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}