Calculate bit rate from network traffic

Viewed 26

I have extracted a packet trace in csv file from wireshark and I am interested in finding out the bit rate of the trace.

I have the arrival time of each packet, its frame length and boolean values of multiple flags in tcp header.

Can someone please help in explaining the bit rate calculation process?

1 Answers

I'll assume you have frame length in A, arrival time in B, and first row is headers. You need the following steps:

  • C2: Convert frame length from octets to bits with =8*A2
  • D2: Calculate total data sent with =SUM(C2:C$2)
  • E2: Calculate total seconds since start of experiment =(B2-B$2)*86400 source
  • F2: Calculate bit rate =D2/E2

When you drag these formulas out, cells like A2 should become A3, A4, A5, ... But cells like A$2 should stay A$2.

You will notice the bit rate is variable at first but stabilized over time. This is because you are effectively averaging more and more data. If your experiment covers a long time, such as many days, there will be natural variation (e.g. nobody is sending packets at night) that will mean this averaging is inappropriate, so you will have to use more sophisticated approaches like a sliding window average (this is complicated in Excel, you should make a new question for it). But if these packets are from a short period, like a few seconds or minutes, it should be okay.

Related