<?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>Aaron&#039;s Worthless Words &#187; bcmsn</title>
	<atom:link href="http://aconaway.com/tag/bcmsn/feed/" rel="self" type="application/rss+xml" />
	<link>http://aconaway.com</link>
	<description>It&#039;s possible that someone somewhere needs to see this.</description>
	<lastBuildDate>Wed, 01 Feb 2012 02:07:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>BCMSN Notes &#8211; EtherChannel Distribution</title>
		<link>http://aconaway.com/2009/06/23/bcmsn-notes-etherchannel-distribution/</link>
		<comments>http://aconaway.com/2009/06/23/bcmsn-notes-etherchannel-distribution/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 17:51:22 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bcmsn]]></category>
		<category><![CDATA[calculation]]></category>
		<category><![CDATA[ccnp]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[etherchannel]]></category>
		<category><![CDATA[xor]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=349</guid>
		<description><![CDATA[EtherChannel lets you aggregate links into one logical connection, but the distribution of traffic is not uniform.  It does not use per-packet load-balancing or the like to determine what interface in the bundle to use.  Instead, it uses a XOR function on packet information to generate a hash that is used to determine what interface to use. By default, the switch will use both the source and destination IP addresses to generate the hash, but there are lots of others. src-ip:  Just the source IP dst-ip:  Just the destination IP src-dst-ip:  Both the source and destination IPs src-mac:  Just the source MAC dst-mac:  Just the destination MAC src-dst-mac:  The source and destination MACs src-port:  Just the source TCP/UDP port dst-port:  Just the destination TCP/UPD port src-dst-port:  The source and destination TCP/UDP ports You change the method by giving the port-channel load-balance method directive in global config mode.  Notice that this is a system command, so any change affects all channel groups. To generate the hash, the switch takes the binary representation of the address(es) and does a XOR (that is, are they different? yes/no) on the last few bits of each to get a value.  If you have 8 interfaces, [...]]]></description>
			<content:encoded><![CDATA[<p>EtherChannel lets you aggregate links into one logical connection, but the distribution of traffic is not uniform.  It does not use per-packet load-balancing or the like to determine what interface in the bundle to use.  Instead, it uses a XOR function on packet information to generate a hash that is used to determine what interface to use.</p>
<p>By default, the switch will use both the source and destination IP addresses to generate the hash, but there are lots of others.</p>
<ul>
<li><strong>src-ip</strong>:  Just the source IP</li>
<li><strong>dst-ip</strong>:  Just the destination IP</li>
<li><strong>src-dst-ip</strong>:  Both the source and destination IPs</li>
<li><strong>src-mac</strong>:  Just the source MAC</li>
<li><strong>dst-mac</strong>:  Just the destination MAC</li>
<li><strong>src-dst-mac</strong>:  The source and destination MACs</li>
<li><strong>src-port</strong>:  Just the source TCP/UDP port</li>
<li><strong>dst-port</strong>:  Just the destination TCP/UPD port</li>
<li><strong>src-dst-port</strong>:  The source and destination TCP/UDP ports</li>
</ul>
<p>You change the method by giving the <em>port-channel load-balance method</em> directive in global config mode.  Notice that this is a system command, so any change affects all channel groups.</p>
<p>To generate the hash, the switch takes the binary representation of the address(es) and does a XOR  (that is, are they different? yes/no) on the last few bits of each to get a value.  If you have 8 interfaces, it uses the last 3 bits (2^3 = 8).  If you have 4 interfaces, it uses 2 bits.  Two interfaces means a single bit.</p>
<p>What we wind up with is an index of the interface to use.  If you do a <em>show etherchannel detail</em> on your switch, you&#8217;ll see each interface is assigned an index that starts with 0.</p>
<p>Let&#8217;s go through an example.  You have a switch that has F0/1(index 0) and F0/2 (index 1) in Po10.  You also have left the load-balancing method to the default of <strong>src-dst-ip</strong>.  The switch needs to forward a packet that is sourced from 10.0.0.1 and destined to 10.0.0.2 over Po10.  Let&#8217;s step through it.</p>
<blockquote><p>10.0.0.1 = 00001010 00000000 00000000 00000001<br />
10.0.0.2 = 00001010 00000000 00000000 00000010</p></blockquote>
<p>Since we have two interfaces in the channel group, we look at the last bit of each address and XOR them to get an index of 1 (1 XOR 0 = 1).  That&#8217;s F0/2, so that interface will be used to send the frame over.</p>
<p>If we add f0/3 and f0/4 to the channel group, we would calculate a XOR on the last 2 bits of each address, which would give us 11, which is 3 in binary.  The interface with an index of 3 (probably f0/4) would get the traffic.</p>
<p>What if I&#8217;m switching IPX packets?  Any non-IP packet will default to using the MAC address.  Can someone answer exactly what method it will be used?</p>
<p>What if we then add f0/5?  That&#8217;s a good question, but I&#8217;m not exactly sure how the switch handles a number of interfaces not a power of 2.  Can someone help on this, too?</p>
<p>Send any obvious corrections and questions my way.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2009/06/23/bcmsn-notes-etherchannel-distribution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BCMSN Notes &#8212; STP States</title>
		<link>http://aconaway.com/2009/05/21/bcmsn-notes-stp-states/</link>
		<comments>http://aconaway.com/2009/05/21/bcmsn-notes-stp-states/#comments</comments>
		<pubDate>Fri, 22 May 2009 01:49:20 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bcmsn]]></category>
		<category><![CDATA[blocking]]></category>
		<category><![CDATA[ccnp]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[forwarding]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[listening]]></category>
		<category><![CDATA[spanning tree]]></category>
		<category><![CDATA[state]]></category>
		<category><![CDATA[stp]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=340</guid>
		<description><![CDATA[I&#8217;ve decided to take on the CCNP certification, so I&#8217;m going to wind up with a few posts will be more my own notes than anything.  :) A switch port on a 2960 comes up with a default configuration on VLAN 1.  What happens from the perspective of spanning-tree? First, the port comes up on blocking mode.  This is to make sure that loops aren&#8217;t created without first listening to the network to see what&#8217;s going on. Next, if the port may be a root or designated port, the port is moved to the listening state.  In this state, the port can send and receives BPDUs only.  It can&#8217;t send traffic, but it can discover the other switches participating in STP. After the forwarding delay, the port goes into the learning state.   In this state, the port can send and receive BPDUs as in listening, but it can now receive traffic.  It can&#8217;t yet send any. After the forwarding delay again, the port goes into the forwarding state.  The port can now send and receive data. If the port is configured with spanning-tree portfast, the mode goes from blocking directly to forwarding without going through these steps.  Obviously you don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to take on the CCNP certification, so I&#8217;m going to wind up with a few posts will be more my own notes than anything.  :)</p>
<p>A switch port on a 2960 comes up with a default configuration on VLAN 1.  What happens from the perspective of spanning-tree?</p>
<ul>
<li>First, the port comes up on <strong>blocking </strong>mode.  This is to make sure that loops aren&#8217;t created without first listening to the network to see what&#8217;s going on.</li>
<li>Next, if the port may be a root or designated port, the port is moved to the <strong>listening </strong>state.  In this state, the port can send and receives BPDUs only.  It can&#8217;t send traffic, but it can discover the other switches participating in STP.</li>
<li>After the forwarding delay, the port goes into the <strong>learning </strong>state.   In this state, the port can send and receive BPDUs as in listening, but it can now receive traffic.  It can&#8217;t yet send any.</li>
<li>After the forwarding delay again, the port goes into the <strong>forwarding </strong>state.  The port can now send and receive data.</li>
</ul>
<p>If the port is configured with <em>spanning-tree portfast</em>, the mode goes from <strong>blocking </strong>directly to <strong>forwarding </strong>without going through these steps.  Obviously you don&#8217;t want a switch plugged into a port configured for portfast since you may wind up with a loop.</p>
<p>Here&#8217;s the <em>debug spanning-tree events</em> output from one of my labs.  F0/3 is configured for portfast.  I <em>shut</em>/<em>no shut</em> it to see what happens.</p>
<blockquote>
<pre>*Mar  8 18:09:51.163: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
sw01#
*Mar  8 18:09:51.747: set portid: VLAN0007 Fa0/3: new port id 8003
*Mar  8 18:09:51.747: STP: VLAN0007 Fa0/3 -&gt;jump to forwarding from blocking
sw01#
*Mar  8 18:09:53.739: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
*Mar  8 18:09:54.739: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up</pre>
</blockquote>
<p>Notice the &#8220;jump to forwarding from blocking&#8221;.</p>
<p>Here&#8217;s the same output when the port is not in portfast mode.  Notice the timestamps.  It takes about 30 seconds (2 x default foward delay) to go from blocking to listening to learning to forwarding.</p>
<blockquote>
<pre>*Mar  8 18:13:05.313: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
sw01#
*Mar  8 18:13:06.013: set portid: VLAN0007 Fa0/3: new port id 8003
*Mar  8 18:13:06.013: STP: VLAN0007 Fa0/3 -&gt; listening
sw01#
*Mar  8 18:13:06.381: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
*Mar  8 18:13:07.381: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
sw01#
*Mar  8 18:13:21.013: STP: VLAN0007 Fa0/3 -&gt; learning
sw01#
*Mar  8 18:13:36.013: STP: VLAN0007 Fa0/3 -&gt; forwarding</pre>
</blockquote>
<p>Send any obvious corrections and questions my way.</p>
<div class="wp-about-author-containter-around" style="background-color:#ffffff;"><div class="wp-about-author-pic"><img alt='' src='http://1.gravatar.com/avatar/14352aa939196349e4b9f2a272ca5112?s=100&amp;d=&amp;r=G' class='avatar avatar-100 photo' height='100' width='100' /></div><div class="wp-about-author-text"><h3><a href='http://aconaway.com/author/jac/' title='Aaron Conaway'>Aaron Conaway</a></h3><p>I like to lean my head to the left, hit it with the palm of my right hand, and document what knowledge falls out.</p><p><a href='http://aconaway.com' title='Aaron Conaway'>Website</a> - <a href='http://aconaway.com/author/jac/' title='More posts by Aaron Conaway'>More Posts</a> </p></div></div>]]></content:encoded>
			<wfw:commentRss>http://aconaway.com/2009/05/21/bcmsn-notes-stp-states/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

