{"id":531,"date":"2017-05-06T15:53:27","date_gmt":"2017-05-06T14:53:27","guid":{"rendered":"http:\/\/www.flat-planet.net\/?p=531"},"modified":"2017-05-06T15:53:27","modified_gmt":"2017-05-06T14:53:27","slug":"iperf-testing-on-arista-eos","status":"publish","type":"post","link":"https:\/\/flat-planet.net\/?p=531","title":{"rendered":"iperf Testing on Arista EOS"},"content":{"rendered":"<p>One of the many useful tools included with Arista EOS is iperf(2.0.5) which allows the switch to generate test TCP or UDP traffic. Something to note is that the total generated traffic is limited by the both the CPU capacity and the link between the CPU and the forwarding hardware, so do not expect this to be capable of linerate testing. This is useful for functional testing only.<\/p>\n<p>For the client side, just drop to the bash shell, and point it towards the iperf server<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nL1#bash\r\nArista Networks EOS shell\r\n&#x5B;admin@L1 ~]$ iperf\r\nUsage: iperf &#x5B;-s|-c host] &#x5B;options]\r\nTry `iperf --help' for more information.\r\n&#x5B;admin@L1 ~]$ iperf  -c 172.16.0.4\r\n------------------------------------------------------------\r\nClient connecting to 172.16.0.4, TCP port 5001\r\nTCP window size: 22.5 KByte (default)\r\n------------------------------------------------------------\r\n&#x5B;  3] local 172.16.12.1 port 51455 connected with 172.16.0.4 port 5001\r\n&#x5B; ID] Interval       Transfer     Bandwidth\r\n&#x5B;  3]  0.0-28.6 sec   384 KBytes   110 Kbits\/sec\r\n<\/pre>\n<p>Running the IPerf server (traffic is from client to server) on the switch requires a little more work. By default iperf uses the port TCP\/5001 in server mode for inbound connections. But Arista blocks this port by default as part of the Control Plane Policer. Therefore you have to temporarily add an iptables rule in the EOS shell to allow access to port TCP\/5001.<\/p>\n<pre>[admin@L1 ~]$ sudo iptables -I INPUT -p tcp -m tcp --dport 5001 -j ACCEPT<\/pre>\n<p>This can later be undone by<\/p>\n<pre>[admin@L1 ~]$ sudo iptables -D INPUT -p tcp -m tcp --dport 5001 -j ACCEPT<\/pre>\n<p>Once you have the port open, start iperf in server mode and you will see reports of the incoming connections.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&#x5B;admin@L2 ~]$ iperf -s -i 5\r\n------------------------------------------------------------\r\nServer listening on TCP port 5001\r\nTCP window size: 85.3 KByte (default)\r\n------------------------------------------------------------\r\n&#x5B;\u00a0 4] local 172.16.0.4 port 5001 connected with 172.16.12.1 port 51455\r\n&#x5B; ID] Interval\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Transfer\u00a0\u00a0\u00a0\u00a0 Bandwidth\r\n&#x5B;\u00a0 4]\u00a0 0.0- 5.0 sec\u00a0 55.1 KBytes\u00a0 90.4 Kbits\/sec\r\n&#x5B;\u00a0 4]\u00a0 5.0-10.0 sec\u00a0 59.4 KBytes\u00a0 97.3 Kbits\/sec\r\n&#x5B;\u00a0 4] 10.0-15.0 sec\u00a0 58.0 KBytes\u00a0 95.0 Kbits\/sec\r\n&#x5B;\u00a0 4] 15.0-20.0 sec\u00a0 67.9 KBytes\u00a0\u00a0 111 Kbits\/sec\r\n&#x5B;\u00a0 4] 20.0-25.0 sec\u00a0 65.0 KBytes\u00a0\u00a0 107 Kbits\/sec\r\n&#x5B;\u00a0 4] 25.0-30.0 sec\u00a0 18.4 KBytes\u00a0 30.1 Kbits\/sec\r\n&#x5B;\u00a0 4]\u00a0 0.0-31.7 sec\u00a0\u00a0 384 KBytes\u00a0 99.3 Kbits\/sec\r\n<\/pre>\n<p>Note that these results are in a virtualized, simulated environment. The amount of traffic that a real switch can generate is much higher.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the many useful tools included with Arista EOS is iperf(2.0.5) which allows the switch to generate test TCP or UDP traffic. Something to note is that the total generated traffic is limited by the both the CPU capacity and the link between the CPU and the forwarding hardware, so do not expect this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96,95],"tags":[97,106,339,42,40,32,186,291],"series":[],"class_list":["post-531","post","type-post","status-publish","format-standard","hentry","category-arista","category-data-networking","tag-arista-2","tag-eos","tag-iperf","tag-linux-2","tag-networking","tag-simple-things","tag-testing","tag-tips"],"_links":{"self":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=531"}],"version-history":[{"count":3,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/531\/revisions"}],"predecessor-version":[{"id":534,"href":"https:\/\/flat-planet.net\/index.php?rest_route=\/wp\/v2\/posts\/531\/revisions\/534"}],"wp:attachment":[{"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=531"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/flat-planet.net\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}