{"id":30767,"date":"2024-08-24T00:18:13","date_gmt":"2024-08-24T00:18:13","guid":{"rendered":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/linux-operating-systems\/how-to-use-iperf-to-test-network-speed-and-bandwidth\/"},"modified":"2026-01-19T00:45:46","modified_gmt":"2026-01-19T00:45:46","slug":"how-to-use-iperf-to-test-network-speed-and-bandwidth","status":"publish","type":"docs","link":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/","title":{"rendered":"How to Use iPerf to Test Network Speed and Bandwidth on Linux"},"content":{"rendered":"<p>In this tutorial, you will learn how to use iPerf3 to measure throughput and simulate network loads on your networking infrastructure. iPerf3 is a useful, simple command-line tool for testing network throughput and performance. We will provide step-by-step instructions as well as a few common examples and use cases of ways to effectively use iPerf in your environment.<\/p>\n<p>The tutorial was tested with our \u201cUbuntu 24.04\u201d templates and is meant to work on our self-managed virtual private servers.<\/p>\n<p><iframe title=\"How to use iPerf to test network speed and bandwidth on Linux | VPS Tutorial\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/-hix2R_wvds?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h3>1. Install iPerf on Linux<\/h3>\n<pre># apt install iperf3<\/pre>\n<p>If you want to use your Linux host as the iperf3 server, you need to open the TCP\/UDP ports 5201 in firewalld (or iptables):<\/p>\n<pre># firewall-cmd --permanent --add-port=5201\/udp \r\n# firewall-cmd --permanent --add-port=5201\/tcp \r\n# firewall-cmd --reload<\/pre>\n<h3>2. How to use iperf3<\/h3>\n<p>When renting a server or a VPS and being committed to 1 Gbps bandwidth, you need to determine whether the bandwidth is as committed. You can use the iPerf tool to test the connection<\/p>\n<p>Connection model:<\/p>\n<ul>\n<li>1 machine called client -1 Gbps bandwidth<\/li>\n<li>1 machine called server &#8211; 1 Gbps bandwidth<\/li>\n<\/ul>\n<h4>Test with TCP\u00a0 Protocol<\/h4>\n<p>\u2013 On the server-mode machine, run the following command:<\/p>\n<p>Syntax to start iPerf server-side:<\/p>\n<pre># iperf3 -s -p &lt;port&gt;<\/pre>\n<ul>\n<li>p: Specifies the listen port. If no -p option is given, the default listen port is 5001.<\/li>\n<\/ul>\n<p>Now the server is open and listening to TCP port 5201<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-30823 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png\" alt=\"\" width=\"1242\" height=\"88\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png 1242w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port-300x21.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port-1024x73.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port-768x54.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port-20x1.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port-32x2.png 32w\" sizes=\"(max-width: 1242px) 100vw, 1242px\" \/><\/p>\n<p>\u2013 On VPS client-mode, run the following command to connect to the server:<\/p>\n<p>Syntax to start iPerf client-side:<\/p>\n<pre># iperf3 -c &lt;dst - ip&gt; [ options ]<\/pre>\n<p>Note: replace server with the server&#8217;s IP address or domain<\/p>\n<pre># iperf3 -c &lt;dst - ip&gt; -p &lt; port&gt;<\/pre>\n<ul>\n<li>p: specify a port destination on the iPerf server.<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone wp-image-30827 size-full\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2.png\" alt=\"\" width=\"1288\" height=\"403\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2.png 1288w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2-300x94.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2-1024x320.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2-768x240.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2-20x6.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port2-32x10.png 32w\" sizes=\"(max-width: 1288px) 100vw, 1288px\" \/><\/p>\n<p>Above is the result of connecting from the VPS Client to the VPS server and the result returned is about 786 Mbits\/sec.<\/p>\n<ul>\n<li>At this time, the server side will also see similar results:<\/li>\n<li>On the VPS acting as the iPerf server, to stop receiving connections, press the key combination Ctrl + C<\/li>\n<li>As the result returned by iperf3, the bandwidth of the server and the VPS client both reach &lt;1 Gbps. This proves that the VPS service provider has met the bandwidth commitment for the Customer to use.<\/li>\n<\/ul>\n<h4>Test with UDP Protocol<\/h4>\n<p>Similar to the TCP protocol, we also start the UDP server on VPS to act as server-mode<\/p>\n<pre># iperf3 -s -p &lt; port&gt;<\/pre>\n<p>The client-mode side executes the command:<\/p>\n<pre># iperf3 -c\u00a0 &lt; dst - ip &gt; -p &lt; port&gt; -u -b 100M<\/pre>\n<ul>\n<li>dst-ip: IP of VPS server-mode<\/li>\n<li>u: create a UDP Protocol connection<\/li>\n<li>b: by default iPerf sets the default UDP connection limit to 1.05Mb\/s. Therefore we need to turn on the -c flag with the max BW we want to test &#8211; in the example above it is 100M or you can replace it with parameter 0 for unlimited<\/li>\n<\/ul>\n<p>Default<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-30779 size-large\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4-1024x308.png\" alt=\"\" width=\"1024\" height=\"308\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4-1024x308.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4-300x90.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4-768x231.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4-20x6.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4-32x10.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d4.png 1321w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>After enabling the bandwidth limit you want to test to 100M<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30783 size-large\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7-1024x309.png\" alt=\"\" width=\"1024\" height=\"309\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7-1024x309.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7-300x90.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7-768x232.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7-20x6.png 20w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7-32x10.png 32w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/d7.png 1320w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h4>Some other common iPerf options<\/h4>\n<pre># iperf -c &lt;dst - IP&gt; -u -b 1000m -i 0.5 -t 100 -m<\/pre>\n<p>Command parameter explanation:<\/p>\n<ul>\n<li>c: host address of iPerf server<\/li>\n<li>u: use UDP protocol<\/li>\n<li>b: maximum bandwidth value is 1000 Mbits\/sec<\/li>\n<li>i: time interval between 2 result reports in seconds (0.5s)<\/li>\n<li>t: time to push traffic in seconds (100s)<\/li>\n<li>m: print MTU header<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>So Greencloud has guided you through how to perform a test on the network performance of a virtual server\/physical server. Wish you success.<\/p>\n<p>Good Luck!<\/p>\n<p><a href=\"https:\/\/greencloudvps.com\/billing\/aff.php?aff=2871\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18943\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2.png\" alt=\"\" width=\"1280\" height=\"214\" srcset=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2.png 1280w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-300x50.png 300w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-1024x171.png 1024w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-768x128.png 768w, https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/03\/KVM-VPS_banner_2-20x3.png 20w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use iPerf3 to measure throughput and simulate network loads on your networking infrastructure. iPerf3 is a useful, simple command-line tool for testing network throughput and performance. We will provide step-by-step instructions as well as a few common examples and use cases of ways to effectively use iPerf [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"parent":17817,"menu_order":452,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-30767","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use iPerf to Test Network Speed and Bandwidth on Linux - GreenCloud Documentation<\/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:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use iPerf to Test Network Speed and Bandwidth on Linux - GreenCloud Documentation\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn how to use iPerf3 to measure throughput and simulate network loads on your networking infrastructure. iPerf3 is a useful, simple command-line tool for testing network throughput and performance. We will provide step-by-step instructions as well as a few common examples and use cases of ways to effectively use iPerf [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"GreenCloud Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-19T00:45:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1242\" \/>\n\t<meta property=\"og:image:height\" content=\"88\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/\",\"name\":\"How to Use iPerf to Test Network Speed and Bandwidth on Linux - GreenCloud Documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/port.png\",\"datePublished\":\"2024-08-24T00:18:13+00:00\",\"dateModified\":\"2026-01-19T00:45:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/port.png\",\"contentUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/port.png\",\"width\":1242,\"height\":88},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GreenCloud Documents\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/docs\\\/greencloud-documents\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Linux Operating Systems\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/linux-operating-systems\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to Use iPerf to Test Network Speed and Bandwidth on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\",\"name\":\"GreenCloud Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/green.cloud\\\/docs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use iPerf to Test Network Speed and Bandwidth on Linux - GreenCloud Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Use iPerf to Test Network Speed and Bandwidth on Linux - GreenCloud Documentation","og_description":"In this tutorial, you will learn how to use iPerf3 to measure throughput and simulate network loads on your networking infrastructure. iPerf3 is a useful, simple command-line tool for testing network throughput and performance. We will provide step-by-step instructions as well as a few common examples and use cases of ways to effectively use iPerf [&hellip;]","og_url":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/","og_site_name":"GreenCloud Documentation","article_modified_time":"2026-01-19T00:45:46+00:00","og_image":[{"width":1242,"height":88,"url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/","url":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/","name":"How to Use iPerf to Test Network Speed and Bandwidth on Linux - GreenCloud Documentation","isPartOf":{"@id":"https:\/\/green.cloud\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/#primaryimage"},"image":{"@id":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png","datePublished":"2024-08-24T00:18:13+00:00","dateModified":"2026-01-19T00:45:46+00:00","breadcrumb":{"@id":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/#primaryimage","url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png","contentUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2024\/08\/port.png","width":1242,"height":88},{"@type":"BreadcrumbList","@id":"https:\/\/green.cloud\/docs\/how-to-use-iperf-to-test-network-speed-and-bandwidth-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/green.cloud\/docs\/"},{"@type":"ListItem","position":2,"name":"GreenCloud Documents","item":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/"},{"@type":"ListItem","position":3,"name":"Linux Operating Systems","item":"https:\/\/green.cloud\/docs\/linux-operating-systems\/"},{"@type":"ListItem","position":4,"name":"How to Use iPerf to Test Network Speed and Bandwidth on Linux"}]},{"@type":"WebSite","@id":"https:\/\/green.cloud\/docs\/#website","url":"https:\/\/green.cloud\/docs\/","name":"GreenCloud Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/green.cloud\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/30767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/comments?post=30767"}],"version-history":[{"count":19,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/30767\/revisions"}],"predecessor-version":[{"id":32091,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/30767\/revisions\/32091"}],"up":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/17817"}],"wp:attachment":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/media?parent=30767"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/doc_tag?post=30767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}