<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MaddHat.comiperf | MaddHat.com</title>
	<atom:link href="http://maddhat.com/tag/iperf/feed" rel="self" type="application/rss+xml" />
	<link>http://maddhat.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Sep 2011 17:39:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<image>
  <link>http://maddhat.com</link>
  <url>http://maddhat.com/favicon.ico</url>
  <title>MaddHat.com</title>
</image>
		<item>
		<title>Setup Link Aggregation in Ubuntu</title>
		<link>http://maddhat.com/setup-link-aggregation-in-ubuntu</link>
		<comments>http://maddhat.com/setup-link-aggregation-in-ubuntu#comments</comments>
		<pubDate>Sat, 15 May 2010 15:00:57 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[802.3ad]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[bond]]></category>
		<category><![CDATA[ifenslave]]></category>
		<category><![CDATA[iperf]]></category>
		<category><![CDATA[link aggregation]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=182</guid>
		<description><![CDATA[Link aggregation is something that has greatly interested me the last few months and I&#8217;ve been anxious to play with it on my own network setup.  For those not familiar with link aggregation there is a lot of good documentation on Wikipedia to get caught up to speed.  In my lab I wanted to setup link aggregation on a box with a NC3134 which is a dual NIC (2x 10/100 full duplex ports).  I couldn’t do proper 802.3ad because I don’t have a switch which supports it…yet.  However, since I am running Ubuntu server I found I could still set it up using a different mode.  The mode I decided to configure the bond as is mode 0 otherwise known as the round-robin bond mode.  This type is described as &#8220;Round-robin policy: Transmit packets in sequential order from the first available slave through the last.  This mode provides load balancing and fault tolerance.&#8221; (Linux Horizon) The setup for bonding the NICs is actually quite simple. sudo apt-get install ifenslave sudo nano /etc/network/interfaces Comment out your current configuration lines using the “#” before all lines.  The following was my setup for the bond address configuration: auto bond0 iface bond0 inet static [...]]]></description>
			<content:encoded><![CDATA[<p>Link aggregation is something that has greatly interested me the last few months and I&#8217;ve been anxious to play with it on my own network setup.  For those not familiar with link aggregation there is a lot of good documentation on <a href="http://en.wikipedia.org/wiki/Link_aggregation" target="_blank">Wikipedia</a> to get caught up to speed.  In my lab I wanted to setup link aggregation on a box with a NC3134 which is a dual NIC (2x 10/100 full duplex ports).  I couldn’t do proper 802.3ad because I don’t have a switch which supports it…yet.  However, since I am running Ubuntu server I found I could still set it up using a different mode.  The mode I decided to configure the bond as is mode 0 otherwise known as the round-robin bond mode.  This type is described as &#8220;Round-robin policy:  Transmit packets in sequential order from the first available  slave through the last.  This mode provides load balancing and  fault tolerance.&#8221; (<a href="http://www.linuxhorizon.ro/bonding.html" target="_blank">Linux Horizon</a>)</p>
<p>The setup for bonding the NICs is actually quite simple.</p>
<pre>sudo apt-get install ifenslave
sudo nano /etc/network/interfaces</pre>
<p>Comment out your current configuration lines using the “#” before all lines.  The following was my setup for the bond address configuration:</p>
<pre>auto bond0
iface bond0 inet static
     address 192.168.2.200
     netmask 255.255.255.0
     broadcast 192.168.2.255
     gateway 192.168.2.1
slaves all
bond-mode 0
bond-miimon 100</pre>
<p>This configuration will use all of my network devices in the bond (which in this case is just 2) and give the IP address 192.168.2.200.  Note that I specified bond-mode 0.  There are several other bond types (some of which require a 802.3ad capable switch) and it would be worth your while to read up on them to find which would be best for you.</p>
<p>Another thing to note in this configuration is that I used bond-miimon 100.  This means that the links will be checked for failures every 100 milliseconds.  Setting this value to 0 disables checking for link failure.</p>
<p>Save and exit the configuration file.  From here you can take the interfaces down by issuing:</p>
<pre>sudo ifdown eth0
sudo ifdown eth1</pre>
<p>At this point I connected the 2<sup>nd</sup> Ethernet cable and restarted the networking services</p>
<pre>/etc/init.d/networking restart</pre>
<p>Simply type ifconfig and you should see bond0 in the list and listed as UP BROADCAST RUNNING MASTER MULTICAST and all others as UP BROADCAST RUNNING SLAVE MULTICAST.  Next we will test performance of the connection to ensure that the bond is functioning as it should.</p>
<p>Using iperf I can test the bandwidth utilized between the server and client in memory (which takes the drive write bottleneck out of the equation).  To setup iperf see my previous article on <a href="http://maddhat.com/testing-network-performance-using-iperf-3" target="_blank">using iperf</a>.</p>
<p>I have 192.168.2.101 setup as the server and 192.168.2.200 (the bonded NICs) as the client.  I issue the following command to test my connection:</p>
<pre>Iperf –c 192.168.2.101 –i 2</pre>
<p>The output was as follows:</p>
<pre>------------------------------------------------------------
Client connecting to 192.168.2.101, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.2.200 port 33878 connected with 192.168.2.101 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec  44.8 MBytes    188 Mbits/sec
[  3]  2.0- 4.0 sec  44.9 MBytes    188 Mbits/sec
[  3]  4.0- 6.0 sec  44.9 MBytes    188 Mbits/sec
[  3]  6.0- 8.0 sec  43.9 MBytes    184 Mbits/sec
[  3]  8.0-10.0 sec  44.8 MBytes    188 Mbits/sec
[  3]  0.0-10.0 sec    223 MBytes    187 Mbits/sec</pre>
<p>You can see that now the connection is reaching ~188Mbits out of the theoretical 200Mbits that the bond provides (remember we are using 2x 100mbit lines).  This is exactly the result we want.</p>
<p>Next, I wanted to test the fault of one line.  I disconnected one one of the cables from the dual NIC and ran the iperf connection test again.</p>
<pre>------------------------------------------------------------
Client connecting to 192.168.2.101, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.2.200 port 33879 connected with 192.168.2.101 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 2.0 sec  22.5 MBytes  94.4 Mbits/sec
[  3]  2.0- 4.0 sec  22.4 MBytes  94.1 Mbits/sec
[  3]  4.0- 6.0 sec  22.4 MBytes  94.0 Mbits/sec
[  3]  6.0- 8.0 sec  22.5 MBytes  94.2 Mbits/sec
[  3]  8.0-10.0 sec  22.4 MBytes  94.0 Mbits/sec
[  3]  0.0-10.0 sec    112 MBytes  94.2 Mbits/sec</pre>
<p>You can see that the bandwidth has fallen back down to 94Mbits but the line still worked correctly without any traffic loss.</p>
<p>That’s it!  Pretty simple to setup and test the bond.   If you are creating a bond purely for the bandwidth increase keep in mind that system bottlenecks can still hinder performance &#8211; your hard drive write speed being the most likely.</p>
<p>With such a simple setup for this networking task it shows another benefit Linux servers can provide in comparison to Windows servers which (to my knowledge) do not natively support link aggregation.</p>
<p>The question I asked myself after this setup was: How does the 802.3ad configuration (mode 4) differ from mode 0 which doesn’t require switches with 802.ad support?  After some further research I found that while mode 0 uses sequential transmission, it can often receive packets out of order which creates the need for segment retransmission (as mentioned <a href="http://wiki.mikrotik.com/wiki/Manual:Interface/Bonding" target="_blank">here</a>).  It seems that mode 4 is able to receive all packets in order which produces an overall increase in efficiency.  I would be curious to see some performance benchmarks between the two and plan to do so once I have a managed switch – so stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/setup-link-aggregation-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Network Performance Using Iperf</title>
		<link>http://maddhat.com/testing-network-performance-using-iperf-3</link>
		<comments>http://maddhat.com/testing-network-performance-using-iperf-3#comments</comments>
		<pubDate>Wed, 11 Mar 2009 01:09:46 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[iperf]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=34</guid>
		<description><![CDATA[Just a quick post on a great tool for testing network performance. Iperf is a very slim tool that will measure TCP/UDP bandwidth performance. It is an available ubuntu package “iperf ” and also has Windows/OSX binaries available. I found a working mirror here. What makes Iperf a good test versus a simple SMB/CIFS transfer for bandwidth performance is that it works in memory versus being limited by hard drive and CPU limitations. Now a quick guide to get things up and running. The guide will be for two Ubuntu machines, testing network performance between the two. 1.Install – Type the following in terminal “sudo apt-get install iperf ” for both machines 2.Server Setup &#8211; Decide upon a server machine and a client. On the server type the following in terminal “iperf -s ”. This will place iperf in server mode, and it will listen for incoming connections. 3.Client Setup - On the client machine you have a lot of options to play around with regarding how you want to connect to the server. You can explore what each of these are by typing “iperf –-help ”. The following is a simple test between the server (192.168.2.104), and the client [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post on a great tool for testing network performance.  Iperf is a very slim tool that will measure TCP/UDP bandwidth performance.  It is an available ubuntu package “<strong>iperf</strong> ” and also has Windows/OSX binaries available.  I found a working mirror <a title="iperf" href="http://noc.pregi.net/iperf.html" target="_blank">here</a>.  What makes Iperf a good test versus a simple SMB/CIFS transfer for bandwidth performance is that it works in memory versus being limited by hard drive and CPU limitations.</p>
<p>Now a quick guide to get things up and running.  The guide will be for two Ubuntu machines, testing network performance between the two.</p>
<p><strong>1.Install</strong> – Type the following in terminal “<strong>sudo apt-get install iperf</strong> ” for both machines</p>
<p><strong>2.Server Setup</strong> &#8211; Decide upon a server machine and a client.  On the server type the following in terminal “<strong>iperf -s</strong> ”.  This will place iperf in server mode, and it will listen for incoming connections.</p>
<p align="center"><img src="http://maddhat.com/wp-content/uploads/2009/03/iperf_server2.png" alt="iperf server" width="481" height="144" /></p>
<p><strong>3.Client Setup -</strong> On the client machine you have a lot of options to play around with regarding how you want to connect to the server.  You can explore what each of these are by typing “<strong>iperf –-help</strong> ”.  The following is a simple test between the server (192.168.2.104), and the client (192.168.2.103).</p>
<p><strong>4.Testing -</strong> Type “<strong>iperf 192.168.2.104 -i 2</strong>” (replacing the IP here with the test server IP and then enter key to start testing.  This will connect to the server running on 192.168.2.104 and have an interval of 2 seconds.  There will then be 6 tests completed.  This should give you all of the information you need regarding your connection speed between the two machines.</p>
<p align="center"><img src="http://maddhat.com/wp-content/uploads/2009/03/iperf_client2.png" alt="iperf client" width="481" height="209" /></p>
<p>This should be enough to get you started using iperf.  Check out the man page <a title="iperf man page" href="http://staff.science.uva.nl/~jblom/gigaport/tools/man/iperf.html" target="_blank">here</a> if you have any usage questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/testing-network-performance-using-iperf-3/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

