0

I have ubuntu 14.04 LTS ,and opening connection information window from the top title bar->network connection icon, I see the following:

General: interface: ... h/w address: ... speed: 65Mbps security: ... etc...

Similarly, on my android htc explorer phone, tapping on the current wifi connection, it displays bandwidth: 39 Mbps etc... among other things.

I know that calculations of bandwidth are done by taking the amount of packets received in the interface and the time taken for the same and dividing one by the other.

But how is the time of end of packet transmission determined. For example, I may open a http page in browser, for 1 minute and then sit idle for the next minute. But Operating system wouldnt know that using the first minute only, the bandwidth should be calculated and second minute shouldnt be included in the calculation.

Not only that, there may be a situation where bandwidth is underused for some time, and how does this affect the bandwidth calculation of operating system on an interface.

Iam actually confused.. I want to know both the OS perspective and the HOW of general passive method of bandwidth calculation in a system. pls help.

user3391196
  • 361
  • 4
  • 13

1 Answers1

1

This isn't al calculation, is the speed that you're currently connected to your WiFi hotspot. There is a relationship between the power of the signal (dbM) and the speed of the link.

EG: 802.11g at optimal conditions works at 54 Mbps. Go a little further, and you'll see this speed decreasing.

This is related to the 802.11 standard, so it's the same on all OSes (android, ubuntu...) that you mention

EDIT: You can see the list of network speeds here

webo80
  • 3,365
  • 5
  • 35
  • 52
  • Really, OSes don't calculate REAL speed network AFAIK – webo80 Jan 21 '15 at 09:15
  • Thank you for the info. But then how do tools like iftop, nload etc... calculate the network bandwidth of an internet connection over an interface... – user3391196 Jan 22 '15 at 06:54
  • They work using libpcap, so work capturing and counting TCP/IP packets. They know packets/s and size of packets, so it's trivial to know the network speed. – webo80 Jan 23 '15 at 07:43
  • But how is the time measured.. From what time to what time is the packet counted. If only 1 pkt comes in 10 minutes, you can either take the time period when 1 minute before the pkt as start time and 1 minute after the pkt as stop time, or you can take 10 minutes also. So how does it work. – user3391196 Jan 26 '15 at 14:45
  • Instant speed and Wi-fi speed are different things, and i've already answer how both are calculated. Please, read again. "Packet counting" is for instant speed (eg. calculated once a second) and wi-fi speed shows the current wireless link speed between your device and the access point. – webo80 Feb 02 '15 at 08:42