Test Router and Wifi Speed using iperf command

This posts shows how to test your local network bandwidth speed which is useful for testing router settings or letting you know if it is time to upgrade your wifi card on your laptop. This test requires a minimum of two computers, with one acting as a server for the other to connect to. I am using Ubuntu linux on these computers. All commands are in italics and run in a terminal window.

Server Computer

  • This computer should be connected by an ethernet cable to your wifi router
  • You need to know the ip address of your server computer
    • ifconfig
      • output follows
      • eth0      Link encap:Ethernet  HWaddr d0:50:99:5b:70:b2
        inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
        inet6 addr: xxx::xxxx:99ff:fe5b:70b2/64 Scope:Link
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:64155953 errors:0 dropped:487 overruns:0 frame:0
        TX packets:97383655 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:7182981438 (7.1 GB)  TX bytes:126082997710 (126.0 GB)
        Interrupt:16
    • This is the ip address from above: 192.168.1.3
  • iperf installation
    • sudo apt-get install iperf
  • run the iperf command in server mode
    • iperf -s -u -i 1 -f M
      • -s = server
      • -u = udp packets
      • -i 1 = report every 1 second
      • -f M = report in Megabytes

Client Computer, this is the computer you are testing

  • This computer can have a wifi or ethernet connection
  • installation is the same as the server
  • run the iperf command in testing mode
    • iperf -c 192.168.1.3 -u -i 1 -l 1300 -b 999999m -t 10 -f M
      • -c 192.168.1.3 = connect at the servers ip address
      • -u
      • -i 1
      • -l 1300
      • -b 999999m
      • -t 10 = amount of time to run test in seconds
      • -f M

With ethernet, I am getting 85 Mb/sec and on wifi 2 Mb/sec. Wifi is very slow on my netbook.

Leave a Reply

Your email address will not be published. Required fields are marked *