26

Is there a way to benchmark how fast my router is connected to my PC, independent of the internet?

I've had slower-than-usual internet-based benchmarks, and I'm having a hard time figuring out if it's because of a bad router-to-PC connection (interference, bad signal, etc.) or if it's indeed because my internet is actually slower.

user541686
  • 23,629

4 Answers4

10

If you have two available computers, you can measure the TCP speed directly between them, without using file-transfer which is notoriously slow.

The tool to use is iPerf, available for all major operating systems.

For details see the article How to use Iperf to test the speed on TP-Link routers.

The schema of test configuration is:

enter image description here

Use your computer as the server connected via Wifi. Both computers should be on the LAN side of the router. You may connect the computer you are not testing to the router by cable (if faster), to ensure that its performance is not the bottleneck in the test.

The main points are:

  • Install iPerf on both computers

  • Disable all firewalls

  • Set static IP address for PC A

  • Set static IP address for WAN port of the Router (your router configuration must support this)

  • On PC A start the server:

    iperf3 -s
    
  • on PC B run the command :

    iperf3 -c 192.168.2.30   (replace IP as required)
    

The result may look like this (on the sender) when the speed is 95 Mbps:

enter image description here

harrymc
  • 498,455
10

In UNIX, you can use a utility called pv (pipe viewer) to measure data through a pipeline. You can hack this to test throughput to another host. Assuming you have ssh access to your router:

yes | pv | ssh router.foo.com "cat > /dev/null"

You're basically piping arbitrary data from the yes command to /dev/null on your router and measuring the throughput with pv.

There are a number of other ways to accomplish this, with a variety of tools. If you're on a Windows box, you can try hacking similar operations with Cygwin, but I'm sure others on this forum can provide solid suggestions on other applications.

tcdyl
  • 201
2

If you have another PC in the same network, you can have a file transfer between those 2 PC's and see the network bandwidth usage via standard methods available.

1

iwconfig, is a good tool for this job. See output:

wlp3s0    IEEE 802.11  ESSID:"******"  
Mode:Managed  Frequency:2.437 GHz  Access Point: ******   
Bit Rate=39 Mb/s   Tx-Power=22 dBm   
Retry short limit:7   RTS thr:off   Fragment thr:off
Power Management:on
Link Quality=43/70  Signal level=-67 dBm  
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:78  Invalid misc:5862   Missed beacon:0

as written in the man page it collects its statistics from /proc/net/wireless so it's also possible to collect wireless statistics from this file

ofirule
  • 199