23

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.

7
  • Is the connection wired or wireless from the PC to the router?
    – Paul
    Dec 23, 2011 at 8:18
  • @Paul: Wireless.
    – user541686
    Dec 23, 2011 at 8:25
  • sourceforge.net/projects/iperf Cross-platform tool with great functionality.
    – user203508
    Mar 1, 2013 at 23:02
  • Please add the OS and router model you have. BTW, you can connect the laptop both wired and wireless (eventually with a virtual network device), and test the transfer data speed between the two connections (The bottleneck is the wireless connection). You can realize it even installing a Virtual Machine (or a snap server of some kind) and giving to it one of the two connection in use, then you can start to test the data transfer (with no compression or cached data)...
    – Hastur
    Apr 23, 2019 at 9:43
  • @laggin Which is the bandwidth you record with the test and which is the nominal speed limit for the wireless connection? How the benchmark speed change if you connect your laptop with a cable? From the answer to these questions you may understand if it is the wi-fi or if you have a bad provider :-). If it doesn't change and it is less then the wi-fi speed limit the provider is the bad guy. If via cable you have the maximum allowed by the provider and via wi-fi less then it and of the speed limit of the router, it is the wi-fi.
    – Hastur
    Apr 23, 2019 at 10:09

4 Answers 4

10
+250

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

0
9

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.

2
  • 2
    SSH usually uses compression, so this is not the best way to measure it.
    – Ernestas
    Dec 29, 2012 at 9:10
  • 3
    This might solve compression-problem: yes | pv | ssh -o "Compression no" router.foo.com "cat > /dev/null"
    – Tvartom
    Jan 5, 2017 at 21:05
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.

3
  • The trouble is that PC-to-PC transfer is ridiculously slower than internet download anyway (no idea why), so this doesn't work.
    – user541686
    Dec 23, 2011 at 9:37
  • @Mehrdad: are you serious?? How can that be??? You should edit the question with your wireless modem, and what all config options have you seected.. Dec 24, 2011 at 14:45
  • See here.
    – user541686
    Dec 24, 2011 at 18:20
0

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

1
  • This is no actual answer. Only not-really-precise rate/and other useless information. Apr 2, 2023 at 23:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .