<?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.comnic | MaddHat.com</title>
	<atom:link href="http://maddhat.com/tag/nic/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>Reassign NIC Identifiers In Ubuntu</title>
		<link>http://maddhat.com/reassign-nic-identifiers-in-ubuntu</link>
		<comments>http://maddhat.com/reassign-nic-identifiers-in-ubuntu#comments</comments>
		<pubDate>Tue, 15 Jun 2010 15:00:31 +0000</pubDate>
		<dc:creator>MadHatter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[intel]]></category>
		<category><![CDATA[lspci]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[nic]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wake-on-lan]]></category>
		<category><![CDATA[wol]]></category>

		<guid isPermaLink="false">http://maddhat.com/?p=121</guid>
		<description><![CDATA[I swapped out some NICs recently on a few of my lab machines.  These machines had a working install of Ubuntu Server 9.04.  After installing the NICs and rebooting, ifconfig showed nothing but lo details.  The first thing I did was ensured that the cards were seen by the OS by typing: lspci &#124; grep Ethernet to which I received the output: 02:04.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08) 02:05.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08) This was correct as my new NIC was a dual Intel NIC.  From there I issued the command: sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old I reboot the system and all NICs were re-assigned to the correct Eth* interface.  Note that that the 70-persistent-net.rules.old will contain the old configuration should I choose this new NIC doesn’t work out for the system. Where I originally found the re-assignment command.]]></description>
			<content:encoded><![CDATA[<p>I swapped out some NICs recently on a few of my lab machines.  These machines had a working install of Ubuntu Server 9.04.  After installing the NICs and rebooting, ifconfig showed nothing but lo details.  The first thing I did was ensured that the cards were seen by the OS by typing:</p>
<pre>lspci | grep Ethernet</pre>
<p>to which I received the output:</p>
<pre>02:04.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08) 

02:05.0 Ethernet controller: Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08)</pre>
<p>This was correct as my new NIC was a dual Intel NIC.  From there I issued the command:</p>
<pre>sudo mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.old</pre>
<p>I reboot the system and all NICs were re-assigned to the correct Eth* interface.  Note that that the 70-persistent-net.rules.old will contain the old configuration should I choose this new NIC doesn’t work out for the system.</p>
<p><a href="http://www.paulkiddie.com/2009/11/force-udev-to-reassign-ethx-identifiers-in-ubuntu-8-04/" target="_blank">Where I originally found the re-assignment command.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maddhat.com/reassign-nic-identifiers-in-ubuntu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>

