{"id":201,"date":"2018-02-11T00:42:15","date_gmt":"2018-02-11T00:42:15","guid":{"rendered":"https:\/\/www.kuncar.net\/blog\/?p=201"},"modified":"2018-02-11T00:42:15","modified_gmt":"2018-02-11T00:42:15","slug":"how-to-test-ipv6-with-iperf","status":"publish","type":"post","link":"https:\/\/www.kuncar.net\/blog\/2018\/how-to-test-ipv6-with-iperf\/","title":{"rendered":"How to test IPv6 with iperf"},"content":{"rendered":"<div class=\"entry-content\">\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif;\"><a href=\"https:\/\/web.archive.org\/web\/20150327031311\/http:\/\/www.kuncar.net\/blog\/how-to-test-ipv6-with-iperf\/2012\/logo-iana\/\" rel=\"attachment wp-att-584\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-584\" title=\"logo-iana\" src=\"https:\/\/web.archive.org\/web\/20150327031311im_\/http:\/\/www.kuncar.net\/blog\/wp-content\/uploads\/2012\/05\/logo-iana.png\" alt=\"\" width=\"146\" height=\"63\" \/><\/a><span style=\"font-size: 14px;\">Lately there has been yet again a big surge of interest in IPv6 and I did find to my surprise that even thought IPerf supports IPv6 for quite some time no-one actually has written how to actually do this rather trivial test.<\/span><\/span><br \/>\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> First thing about IPv6 is that your interface on the end-point PCs will auto-assign a link-local address to itself. The link local address is in fe80::macaddress format (where one bit of the mac address can be changed depending on the implementation). So this looks fine \u2013 no problems. You should be able to ping between those ip addresses using ipv6 ping riight? Lets try to ping localhost\u2019s ipv6 link-local address. In order to do this you need to specify the interface you are using as ping can\u2019t lookup the address automatically as it can with IPv4.<\/span><\/p>\n<pre><em><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">$ ping -I eth0 fe80::7983:2bdc:4a2a:61b9<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Pinging fe80::7983:2bdc:4a2a:61b9 with 32 bytes of data:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from fe80::7983:2bdc:4a2a:61b9: time &lt; 1ms<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from fe80::7983:2bdc:4a2a:61b9: time &lt; 1ms<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from fe80::7983:2bdc:4a2a:61b9: time &lt; 1ms<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from fe80::7983:2bdc:4a2a:61b9: time &lt; 1ms<\/span><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Ping statistics for fe80::7983:2bdc:4a2a:61b9:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Approximate round trip times in milli-seconds:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Minimum = 0ms, Maximum = 0ms, Average = 0ms<\/span><\/em><\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">OK so far so good \u2013 lets assign a public ip address to the eth0 interface as unfortunately we cannot use the link-local addresses for anything except ping. This is very important to note \u2013 as at the time of writing iperf does not work over link-local addresses (starting with fe80:). the testing machines I was using are running debian stable so the assignment of ip addresses is linux-style.<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">$ ifconfig eth0 inet6 2012::1\/64 up<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Interesting thing to note that you need to specify the \u201cinet6\u2033 ip address as ifconfig is not smart enough to recognize the IP address family from its syntax.<\/span><br \/>\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> The next thing to do is obviously to bring the other PC\u2019s interface up. So as before:<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">$ ifconfig eth0 inet6 2012::2\/64 up<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Yet again check the connectivity with ping:<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">$ ping -I eth0 2012::2<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Pinging 2012::2 with 32 bytes of data:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from 2012::2: time &lt; 1ms<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from 2012::2: time &lt; 1ms<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from 2012::2: time &lt; 1ms<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Reply from 2012::2: time &lt; 1ms<\/span><\/pre>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Ping statistics for 2012::2:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Approximate round trip times in milli-seconds:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> Minimum = 1ms, Maximum = 1ms, Average = 1ms<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Ok now we have a working connectivity over IPv6 so the last step is to actually configure and run iperf. The one thing to remember is to use -V switch which sets iperf to IPv6 mode. All the remaining parameters are used as in IPv4.<\/span><\/p>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Server side:<\/span>\r\n\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> iperf -V -s -u -B 2012::2<\/span>\r\n\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">-s is for server, -u for udp, -B bind to specific, IP -V for IPv6<\/span><\/pre>\n<\/blockquote>\n<blockquote>\n<pre><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">The Client side:<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">\r\n iperf -u -t 30 -i 1 -V -c 2012::2 -b 5M\r\n<\/span>\r\n<span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\"> -c is for client, -u for udp, -V for IPv6,t for 30 seconds duration, -i for 1 second reporting interval, -b 5M for 5mbps of test traffic<\/span><\/pre>\n<\/blockquote>\n<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14px;\">Well obviously you can tweak the parameters as much as you want and I haven\u2019t noticed any significant difference in behavior between IPv4 and IPv6 iperf (and that includes dual test and TCP instead of UDP).<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Lately there has been yet again a big surge of interest in IPv6 and I did find to my surprise that even thought IPerf supports IPv6 for quite some time no-one actually has written how to actually do this rather trivial test. First thing about IPv6 is that your interface on the end-point PCs will &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.kuncar.net\/blog\/2018\/how-to-test-ipv6-with-iperf\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to test IPv6 with iperf&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,4,13,14],"tags":[],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-recovered","category-testing"],"_links":{"self":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":3,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/posts\/201\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kuncar.net\/blog\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}