Category Archives: Misc

Iperf for Bandwidth testing

Iperf is a great tool to test bandwidth on both UDP (connectionless) and TCP. Iperf does a great job of showing how much bandwidth it can push through the link between server and client, as well as delay and jitter of the UDP session. You can download it here:


default time it runs is 10 seconds, on port 5001 with a window size of 64k. All settings can be changed

Using Iperf

Using Iperf is simple, run one instance on a server (receiving client)  with the -s option and another instance on the testing client (sender) with the -c option.

On the server run:

iperf -s  – this will then start the server, listening to TCP port 5001 by default. You can change to any port you like. 

On the client run:

iperf -c x.x.x.x where x is the ip address of the listening server.

Thats it. Iperf will try to push as much traffic as it can with a 64k window size through TCP.

Images are below. Note, this was done on my local machine, so just replace with your test address.






Running a UDP test will usually result in higher bandwidth tests due to UDP not having any flow control mechanisms.

To use UDP instead of TCP use the switch -u.

Server: iperf -u -s

Client : iperf -u -c x.x.x.x






Notice, that the server has both Jitter and lost packets included. This could be very beneficial when troubleshooting link quality for VOIP.

More Bandwidth!

What if you want to completely saturate the link, full stress testing? you can use a combination of both the TCP window size (switch is -w), and parallel streams (Switch is -P ). I would recommend using a max window size of 1024k, and as lets say 7 Parallel streams (running at the same time).

Also, we can change when Iperf reports back to use , we will change it to 2 seconds (switch is -i). For laughs, lets also run  this from the default time of 10 seconds, to 30 seconds (Switch is -t). Here are the commands on both server and client:


iperf -w 1024k -P 8 -i 2 -t 30 -c


iperf -w 1024k  -s






Other Switches

Iperf has a lot important switches but here are a few I use a lot:

– B – Bind to a host/interface – Great to use if you have multiple IPs on the machine, and just want to test with one

– P – Runs more thread in parallel, can totally flood network with as much traffic as possible. Great for stress testing.

– D – used for testing both send and receive at the same time.

– i – how often iperf reports back to you about transfer

– t – amount of time iperf runs and sends data.

– w – Window size, can be specified in kb or mb.




Ad-Hoc network with Chromecast and Windows 8.

I love the Chromecast device. It works great, and for the price, WOW!

I travel pretty often and most hotel wireless networks require signing in. Not to mention I usually have horrible signal strength. So to remedy this I created an Ad-Hoc wireless network from my Windows 8 laptop, and configured the Chromecast on this network. Everything works perfectly.

What I had to do:

Create the Ad Hoc network within Windows 8:


The command is as follows: netsh wlan set hostednetwork mode=allow ssid=jc-wifi key=password

jc-wifi is my ad hoc SSID

Next I had to start the network:


Next I just connected to the Chromecast, and configured my settings. Everything worked, execpt the Chromecast kept saying “Connected but no internet” – This actually stoped the Chromecast from being casted to.

I had to go in and Enable internet connection sharing on the Virtual adapter, and make sure it was set to use DHCP (for some reason it set a Static IP)


I then selected the correct connection (ad hoc) to share with. And everything worked great!