Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Iperf how to

    Scheduled Pinned Locked Moved General pfSense Questions
    18 Posts 6 Posters 40.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      luke240778
      last edited by

      Can someone tell me how to setup iperf on pfsense so i can test throughput to my clients antennas?

      I want the iperf server to be pfsense, and want to test thoughput to the clients antennas IP address.

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • L
        luke240778
        last edited by

        Ok.. so no one here uses or knows anything about iperf?

        1 Reply Last reply Reply Quote 0
        • M
          Metu69salemi
          last edited by

          test it and let the rest of us know how to deal with it

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            You realise there is a package for iperf?
            There is even some documentation for it: http://doc.pfsense.org/index.php/Iperf_package

            I personally used TTCP when I was throughput testing a while back, mostly because I didn't realise iperf existed!

            Steve

            1 Reply Last reply Reply Quote 0
            • N
              Nachtfalke
              last edited by

              Install iperf on both pfsense.
              start one as server and the other as client.
              then enter IP address of "server-iperf" on the client-iperf and then the test will start.

              1 Reply Last reply Reply Quote 0
              • L
                luke240778
                last edited by

                @stephenw10:

                You realise there is a package for iperf?
                There is even some documentation for it: http://doc.pfsense.org/index.php/Iperf_package

                I personally used TTCP when I was throughput testing a while back, mostly because I didn't realise iperf existed!

                Steve

                Yes i realise and have read that. But it seems that you need iperf setup at both ends. Hence my question of how is it possible to test my server to a clients antenna?

                1 Reply Last reply Reply Quote 0
                • L
                  luke240778
                  last edited by

                  @Nachtfalke:

                  Install iperf on both pfsense.
                  start one as server and the other as client.
                  then enter IP address of "server-iperf" on the client-iperf and then the test will start.

                  Once again, my question was how to test from pfsense to client antenna.. i never mentioned having pfsense at each end.

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    Well you have to install iperf on a remote machine, presumably your cleint or a test box.
                    There are many tutorials for doing that. E.g. http://linhost.info/2010/02/iperf-on-windows/ (if it's a windows box).

                    Run iperf at both ends, one as server one as client, job done!

                    Steve

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      Install the iperf package on pfsense, and then run iperf on your client machine pointing to the ip of your pfsense box

                      you can grap iperf for window and or linux here.

                      http://sourceforge.net/projects/iperf/

                      If you don't want to install the package you can just use pkg_add -r

                      example
                      pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/iperf-2.0.5.tbz
                      Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/iperf-2.0.5.tbz… Done.

                      now from my pfsense shell I can start iperf in server mode

                      [2.1-DEVELOPMENT][admin@pfsense.local.lan]/root(9): iperf -s
                      –----------------------------------------------------------
                      Server listening on TCP port 5001
                      TCP window size: 63.7 KByte (default)

                      Now from a my windows client

                      
                      V:\iperf>iperf -c 192.168.1.253
                      ------------------------------------------------------------
                      Client connecting to 192.168.1.253, TCP port 5001
                      TCP window size: 8.00 KByte (default)
                      ------------------------------------------------------------
                      [108] local 192.168.1.4 port 18339 connected with 192.168.1.253 port 5001
                      [ ID] Interval       Transfer     Bandwidth
                      [108]  0.0-10.0 sec   107 MBytes  89.6 Mbits/sec
                      
                      V:\iperf>iperf -c 192.168.1.253 -w 256k
                      ------------------------------------------------------------
                      Client connecting to 192.168.1.253, TCP port 5001
                      TCP window size:  256 KByte
                      ------------------------------------------------------------
                      [108] local 192.168.1.4 port 18340 connected with 192.168.1.253 port 5001
                      [ ID] Interval       Transfer     Bandwidth
                      [108]  0.0-10.0 sec   112 MBytes  93.6 Mbits/sec
                      
                      V:\iperf>ver
                      
                      Microsoft Windows [Version 6.0.6002]
                      
                      

                      Notice I changed the default window size there, once you have the iperf on your server (pfsense) and whatever client you want you can do whatever you want the tool.

                      And you can see on my server it reported the speeds as well

                      
                      [2.1-DEVELOPMENT][admin@pfsense.local.lan]/root(9): iperf -s
                      ------------------------------------------------------------
                      Server listening on TCP port 5001
                      TCP window size: 63.7 KByte (default)
                      ------------------------------------------------------------
                      [  4] local 192.168.1.253 port 5001 connected with 192.168.1.4 port 18339
                      [ ID] Interval       Transfer     Bandwidth
                      [  4]  0.0-10.0 sec   107 MBytes  89.7 Mbits/sec
                      [  5] local 192.168.1.253 port 5001 connected with 192.168.1.4 port 18340
                      [  5]  0.0-10.0 sec   112 MBytes  93.6 Mbits/sec
                      
                      

                      192.168.1.253 is the IP address of my pfsense lan interface, and 192.168.1.4 is a windows client on my network.

                      you can use iperf -help for the different options you can use.

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 1
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Can't argue with that for comprehensive instructions. Nice.

                        Steve

                        1 Reply Last reply Reply Quote 0
                        • L
                          luke240778
                          last edited by

                          Excellent thanks for the instructions. I guess i am seeing that what i want to do is not at all possible. shame.

                          1 Reply Last reply Reply Quote 0
                          • johnpozJ
                            johnpoz LAYER 8 Global Moderator
                            last edited by

                            What exactly are you wanting to accomplish? There is really no way to test bandwidth between devices without some method of actually move data between the devices.

                            So normally you need some service running on the other system.  Be it a web server, ftp, samba, or something like iperf where it listens for connections on one device, and then you create the connection from the other device and move data between them so you can check the speed of that move of data.

                            If you want to check speed between your client and the pfsense interface you need a way to move data so you can measure the speed.  It does not have to be iperf, could be any method of moving data so you could measure.  ICMP could be use in a crude way if you increase the packet size.

                            So you could use for example bwping, which you can install on pfsense – don't need anything on the other device your testing other than the ability to answer a ping.  So for example here is test from my pfsense box to that same windows client

                            [2.1-DEVELOPMENT][admin@pfsense.local.lan]/root(24): bwping -b 100000 -s 1472 -v 100000000 192.168.1.4
                            Target: 192.168.1.4 (192.168.1.4), transfer speed: 100000 kbps, packet size: 1472 bytes, traffic volume: 100000000 bytes
                            Total: pkts sent/rcvd: 67935/66692, volume rcvd: 98170624 bytes, time: 9 sec, speed: 87262 kbps, rtt min/max/average: 1/76/1 ms

                            So looks to me I am seeing 87.262 Mbps to that client – now again this is CRUDE and RUFF estimate to be sure.. Your going to want to use something like iperf or even ftp to get a feel for testing the real abilities of the network.

                            An intelligent man is sometimes forced to be drunk to spend time with his fools
                            If you get confused: Listen to the Music Play
                            Please don't Chat/PM me for help, unless mod related
                            SG-4860 24.11 | Lab VMs 2.8, 24.11

                            1 Reply Last reply Reply Quote 0
                            • L
                              luke240778
                              last edited by

                              Thanks for that info. I will take a look at that.  I can't see bwping as a package at all, so how would i install that?

                              What i want to accomplish is for example, if i have a client complaining that his connection is slow or something, i want to be able to test the throughput to his antenna, so i can see what is going on.

                              1 Reply Last reply Reply Quote 0
                              • johnpozJ
                                johnpoz LAYER 8 Global Moderator
                                last edited by

                                you would add bwping the same way you can add iperf with the pkg_add -r command and url

                                Its a freebsd package, not pfsense package.

                                
                                ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/bwping-1.4.tbz
                                
                                

                                Looking at my past post, it looks like the url gets managled with http:// added?  So I put it in a code box.

                                Again this is RUFF information sort of thing, not something I would use for performance testing.  Also you keep saying their antenna?  These are wireless clients?  Is your pfsense box acting as the AP?  You have a wireless interface on it?

                                I would really not use the pfsense box it self as a test bed for wireless connection issues?

                                An intelligent man is sometimes forced to be drunk to spend time with his fools
                                If you get confused: Listen to the Music Play
                                Please don't Chat/PM me for help, unless mod related
                                SG-4860 24.11 | Lab VMs 2.8, 24.11

                                1 Reply Last reply Reply Quote 0
                                • L
                                  luke240778
                                  last edited by

                                  Hi there, i have my pfsense box connected to a switch which connects up to my AP (i am a small WiSP.. so all my clients are via antenna/CPE's)

                                  I am just at a point where i need someway of testing the connection to the antennas as i am getting so many of them complaining about speed, but everything in the office works perfectly.. so i need to see what the issue is.  I figured if i sell them a 2mbps connection, and i can somehow test the throughput and see that they are getting at least 2, then i can sort of prove that they are full of crap..

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    luke240778
                                    last edited by

                                    i just tried what you said but it seems to not have worked..

                                    at the shell i typed: pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/All/bwping-1.4.tbz

                                    then i tried to run bwping and it says package not found.. what did i miss?

                                    I see i also have that strange http:// issue.. but i dont know how to insert a code box sorry.. so you will understand what i mean anyways.

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      You have to either restart or:

                                      
                                      rehash
                                      
                                      

                                      In order to for pfSense to know what's installed where.
                                      Or you can call the executable with the complete path.

                                      Steve

                                      1 Reply Last reply Reply Quote 0
                                      • W
                                        wallabybob
                                        last edited by

                                        @luke240778:

                                        i am getting so many of them complaining about speed,

                                        If I recall correctly, you have stated elsewhere that bandwidth is expensive for you. Therefore I suspect that when customers complain about speed they might not be complaining about speed from your ISP but speed from somewhere far upstream of you (e.g. "streaming videos from Utube are very jerky".) The first problem can probably be solved relatively easily and cheaply. The second problem will be far more challenging UNLESS the issue is solely speed from the ISP.

                                        I don't recall if you have many pfSense wireless APs. If so, the Status -> Wireless page may be of interest since it reports the channel speed to associated clients. I suspect at least some other wireless APs will have similar reporting capability.

                                        @luke240778:

                                        i dont know how to insert a code box sorry.. so you will understand what i mean anyways.

                                        When composing a post click on the icon containing "#" immediately above emoticons immediately above the editing box. This will insert "code" tags in the editing box at the current cursor position. Then type the contents of the code box between the tags. Alternatively, add the contents of the code box to the text, select it, then click the icon containing "#" and the code tags will be added around the selected text. A bit of experimentation using the preview button below the editing box will give you idea. The icons above the editing box have "mouseover" hints: if you keep the mouse pointer on them for a little while they will display, in white text on a black background, hints of what they do.

                                        1 Reply Last reply Reply Quote 0
                                        • First post
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.