{"id":185,"date":"2018-02-10T18:01:13","date_gmt":"2018-02-11T00:01:13","guid":{"rendered":"http:\/\/jacobncalvert.com\/?p=185"},"modified":"2018-02-10T18:01:44","modified_gmt":"2018-02-11T00:01:44","slug":"network-bandwidth-testing-with-iperf3","status":"publish","type":"post","link":"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/","title":{"rendered":"Network bandwidth testing with iperf3"},"content":{"rendered":"<p>Everyone knows how to use speedtest.net to test your internet connection speed, but how do you test your LAN bandwidth?<\/p>\n<p>&nbsp;<\/p>\n<p>When you want to troubleshoot speed issues on your LAN, what can you use? Luckily, some clever software call\u00a0<em>iperf3<\/em> can help us out.\u00a0 You can find the tool at the main website for\u00a0<a href=\"https:\/\/iperf.fr\/iperf-download.php\"><em>iperf<\/em> and\u00a0<em>iperf3\u00a0<\/em> here.<\/a>\u00a0This tool is available for Windows, Linux, Mac, Android, and iOS, so you&#8217;ve got options.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter wp-image-187 size-medium\" src=\"http:\/\/jacobncalvert.com\/wp-content\/uploads\/2018\/02\/speed-300x199.jpg\" alt=\"\" width=\"300\" height=\"199\" srcset=\"https:\/\/jacobncalvert.com\/blog-archive\/wp-content\/uploads\/2018\/02\/speed-300x199.jpg 300w, https:\/\/jacobncalvert.com\/blog-archive\/wp-content\/uploads\/2018\/02\/speed.jpg 768w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>There are two parts to testing your network with\u00a0<em>iperf3<\/em>. First you need to set\u00a0up the server. The server will listen on a particular port for client connections and will host a &#8220;control&#8221; connection with a client once the test\u00a0begins. In today&#8217;s example, I will be testing the network between my laptop and my router (the Linux box I built in the previous series <a href=\"http:\/\/jacobncalvert.com\/2017\/04\/10\/build-your-own-router-part-1\/\">BYORpt1<\/a> and <a href=\"http:\/\/jacobncalvert.com\/2017\/04\/19\/build-your-own-router-part-2\/\">BYORpt2<\/a>).<\/p>\n<p>I&#8217;ll be using the Linux router as the server and my laptop as the client. Later I&#8217;ll show an option which will reverse the directions of traffic flow without any extra work.<\/p>\n<h4>Setting up the Server<\/h4>\n<pre>root@calvert-home:\/home\/jacob# iperf3 -s -p 8384\r\n-----------------------------------------------------------\r\nServer listening on 8384\r\n-----------------------------------------------------------\r\n<\/pre>\n<p>These commands instruct\u00a0<em>iperf3<\/em> to act as (s)erver on (p)ort 8384. That&#8217;s it for the basic tests.<\/p>\n<h4>Setting up the Client<\/h4>\n<pre>jacob@jacob-laptop ~ $ iperf3 -c 172.16.0.1 -p 8384\r\n<\/pre>\n<p>Once you execute this command, testing will begin. The default parameters will run the test as fast as possible for 10 seconds.<\/p>\n<p>Your output will look something like:<\/p>\n<pre>Connecting to host 172.16.0.1, port 8384\r\n[ 4] local 172.16.2.21 port 35950 connected to 172.16.0.1 port 8384\r\n[ ID] Interval Transfer Bandwidth Retr Cwnd\r\n[ 4] 0.00-1.00 sec 4.94 MBytes 41.4 Mbits\/sec 0 311 KBytes \r\n[ 4] 1.00-2.00 sec 5.22 MBytes 43.8 Mbits\/sec 0 553 KBytes \r\n[ 4] 2.00-3.00 sec 4.81 MBytes 40.3 Mbits\/sec 0 803 KBytes \r\n[ 4] 3.00-4.00 sec 5.06 MBytes 42.4 Mbits\/sec 0 1.03 MBytes \r\n[ 4] 4.00-5.00 sec 5.05 MBytes 42.4 Mbits\/sec 0 1.22 MBytes \r\n[ 4] 5.00-6.00 sec 5.08 MBytes 42.6 Mbits\/sec 0 1.24 MBytes \r\n[ 4] 6.00-7.00 sec 5.02 MBytes 42.1 Mbits\/sec 0 1.24 MBytes \r\n[ 4] 7.00-8.00 sec 5.06 MBytes 42.5 Mbits\/sec 0 1.24 MBytes \r\n[ 4] 8.00-9.00 sec 5.56 MBytes 46.7 Mbits\/sec 0 1.24 MBytes \r\n[ 4] 9.00-10.00 sec 4.59 MBytes 38.5 Mbits\/sec 0 1.24 MBytes \r\n- - - - - - - - - - - - - - - - - - - - - - - - -\r\n[ ID] Interval Transfer Bandwidth Retr\r\n[ 4] 0.00-10.00 sec 50.4 MBytes 42.3 Mbits\/sec 0 sender\r\n[ 4] 0.00-10.00 sec 50.4 MBytes 42.3 Mbits\/sec receiver<\/pre>\n<p>Notice, I have pretty bad performance for a GbE capable machine. Unfortunately, I have to link up to the switch through a PowerLine adapter, which causes some slowdown.<\/p>\n<h4>Reversing the Direction<\/h4>\n<p>To reverse the direction of &#8220;server&#8221; and &#8220;client&#8221; responsibilities, we simply append the flag <code>-R<\/code><\/p>\n<h4>Output on the Server Side<\/h4>\n<p>On the server side you will also see output that should mirror your client.<\/p>\n<pre>-----------------------------------------------------------\r\nServer listening on 8384\r\n-----------------------------------------------------------\r\nAccepted connection from 172.16.2.21, port 35948\r\n[ 5] local 172.16.0.1 port 8384 connected to 172.16.2.21 port 35950\r\n[ ID] Interval Transfer Bandwidth\r\n[ 5] 0.00-1.00 sec 4.30 MBytes 36.1 Mbits\/sec \r\n[ 5] 1.00-2.00 sec 4.73 MBytes 39.6 Mbits\/sec \r\n[ 5] 2.00-3.00 sec 4.86 MBytes 40.8 Mbits\/sec \r\n[ 5] 3.00-4.00 sec 5.04 MBytes 42.3 Mbits\/sec \r\n[ 5] 4.00-5.00 sec 5.06 MBytes 42.4 Mbits\/sec \r\n[ 5] 5.00-6.00 sec 4.96 MBytes 41.6 Mbits\/sec \r\n[ 5] 6.00-7.00 sec 5.06 MBytes 42.4 Mbits\/sec \r\n[ 5] 7.00-8.00 sec 5.08 MBytes 42.6 Mbits\/sec \r\n[ 5] 8.00-9.00 sec 5.26 MBytes 44.2 Mbits\/sec \r\n[ 5] 9.00-10.00 sec 4.95 MBytes 41.6 Mbits\/sec \r\n[ 5] 10.00-10.21 sec 1.08 MBytes 44.3 Mbits\/sec \r\n- - - - - - - - - - - - - - - - - - - - - - - - -\r\n[ ID] Interval Transfer Bandwidth Retr\r\n[ 5] 0.00-10.21 sec 50.4 MBytes 41.4 Mbits\/sec 0 sender\r\n[ 5] 0.00-10.21 sec 50.4 MBytes 41.4 Mbits\/sec receiver<\/pre>\n<h4>Going Further<\/h4>\n<p><em>iperf3<\/em> supports multiple processes (but not multiple threads!! beware!!) with the <code>-P<\/code>\u00a0option. That can have some interesting results.<\/p>\n<p>Thanks for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Everyone knows how to use speedtest.net to test your internet connection speed, but how do you test your LAN bandwidth? &nbsp; When you want to troubleshoot speed issues on your LAN, what can you use? Luckily, some clever software call\u00a0iperf3 can help us out.\u00a0 You can find the tool at the main website for\u00a0iperf and\u00a0iperf3\u00a0 here.\u00a0This tool is available for Windows, Linux, Mac, Android, and iOS, so you&#8217;ve got options. There are two parts to testing your network with\u00a0iperf3. First&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[73],"tags":[74,10,75],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Network bandwidth testing with iperf3 - Jacob N Calvert<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Network bandwidth testing with iperf3 - Jacob N Calvert\" \/>\n<meta property=\"og:description\" content=\"Everyone knows how to use speedtest.net to test your internet connection speed, but how do you test your LAN bandwidth? &nbsp; When you want to troubleshoot speed issues on your LAN, what can you use? Luckily, some clever software call\u00a0iperf3 can help us out.\u00a0 You can find the tool at the main website for\u00a0iperf and\u00a0iperf3\u00a0 here.\u00a0This tool is available for Windows, Linux, Mac, Android, and iOS, so you&#8217;ve got options. There are two parts to testing your network with\u00a0iperf3. First&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/\" \/>\n<meta property=\"og:site_name\" content=\"Jacob N Calvert\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-11T00:01:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-11T00:01:44+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jacobncalvert.com\/wp-content\/uploads\/2018\/02\/speed-300x199.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#website\",\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/\",\"name\":\"Jacob N Calvert\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/jacobncalvert.com\/blog-archive\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/jacobncalvert.com\/wp-content\/uploads\/2018\/02\/speed-300x199.jpg\",\"contentUrl\":\"http:\/\/jacobncalvert.com\/wp-content\/uploads\/2018\/02\/speed-300x199.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/#webpage\",\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/\",\"name\":\"Network bandwidth testing with iperf3 - Jacob N Calvert\",\"isPartOf\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/#primaryimage\"},\"datePublished\":\"2018-02-11T00:01:13+00:00\",\"dateModified\":\"2018-02-11T00:01:44+00:00\",\"author\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#\/schema\/person\/f4b22a996d41bf09ed2bbe22912a8c8a\"},\"breadcrumb\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/\",\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/2018\/02\/10\/network-bandwidth-testing-with-iperf3\/#webpage\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#\/schema\/person\/f4b22a996d41bf09ed2bbe22912a8c8a\",\"name\":\"Jacob\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/jacobncalvert.com\/blog-archive\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/64a2dd1c00cb39dfc19bb1204c87efbc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/64a2dd1c00cb39dfc19bb1204c87efbc?s=96&d=mm&r=g\",\"caption\":\"Jacob\"},\"sameAs\":[\"https:\/\/jacobncalvert.com\"],\"url\":\"https:\/\/jacobncalvert.com\/blog-archive\/author\/jcalvert\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts\/185"}],"collection":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":11,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/posts\/185\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jacobncalvert.com\/blog-archive\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}