<?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; span</title>
	<atom:link href="http://aconaway.com/tag/span/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>RSPANs on Cisco Switches</title>
		<link>http://aconaway.com/2009/03/18/rspans-on-cisco-switches/</link>
		<comments>http://aconaway.com/2009/03/18/rspans-on-cisco-switches/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 20:11:54 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[rspan]]></category>
		<category><![CDATA[span]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=272</guid>
		<description><![CDATA[We discussed SPANs earlier, but let&#8217;s talk about RSPANs for a bit. Can anyone guess what the &#8220;R&#8221; means?  You guessed it &#8212; &#8220;Remote&#8221;.  An RSPAN is a way to get traffic from a SPAN source on one switch to a SPAN destination on another switch that&#8217;s connected via a trunk. The basic premise is that a special VLAN is created on all the switches and allowed to traverse the trunks.  You then set up a SPAN session that copies your traffic to this special VLAN.  This VLAN then gets the traffic to the other switches through some voodoo magic to be used as source for a SPAN on another switch. Let&#8217;s work through the steps.  In our example, we want to copy traffic from G2/18 on SwitchA to G3/38 on SwitchB. First, on both switches, we need to create the new RSPAN VLAN.  We&#8217;ll assume you&#8217;ve already got it set up to allow this VLAN over your trunks. vlan 2000 name RSPAN remote-span Notice the nice keyword remote-span.  This designates the VLAN to be used in an RSPAN.  Easy so far. Now, let&#8217;s create the session to copy traffic to the RSPAN.  The source port is G2/18, and the [...]]]></description>
			<content:encoded><![CDATA[<p>We <a title="AConaway.com -- SPANs on Cisco Switches" href="http://aconaway.com/2009/03/13/spans-on-cisco-switches/">discussed SPANs</a> earlier, but let&#8217;s talk about RSPANs for a bit.</p>
<p>Can anyone guess what the &#8220;R&#8221; means?  You guessed it &#8212; &#8220;Remote&#8221;.  An RSPAN is a way to get traffic from a SPAN source on one switch to a SPAN destination on another switch that&#8217;s connected via a trunk.</p>
<p>The basic premise is that a special VLAN is created on all the switches and allowed to traverse the trunks.  You then set up a SPAN session that copies your traffic to this special VLAN.  This VLAN then gets the traffic to the other switches through some voodoo magic to be used as source for a SPAN on another switch.</p>
<p>Let&#8217;s work through the steps.  In our example, we want to copy traffic from G2/18 on SwitchA to G3/38 on SwitchB.</p>
<p>First, on both switches, we need to create the new RSPAN VLAN.  We&#8217;ll assume you&#8217;ve already got it set up to allow this VLAN over your trunks.</p>
<blockquote>
<pre>vlan 2000
 name RSPAN
 remote-span</pre>
</blockquote>
<p>Notice the nice keyword <em>remote-span</em>.  This designates the VLAN to be used in an RSPAN.  Easy so far.</p>
<p>Now, let&#8217;s create the session to copy traffic <strong>to</strong> the RSPAN.  The source port is G2/18, and the destination is the RSPAN VLAN.</p>
<blockquote>
<pre>switchA(config)# monitor session 1 source interface Gi 2/18
switchA(config)# monitor session 1 destination remote vlan 2000</pre>
</blockquote>
<p>Now the traffic is being copied to the RSPAN, so let&#8217;s copy that traffic <strong>from</strong> the RSPAN to the sniffer.  In this case, the source is the RSPAN, and the destination is the sniffer&#8217;s port.  Let&#8217;s use session 8 to avoid confusion.</p>
<blockquote>
<pre>switchB(config)# monitor session 8 source remote vlan 2000
switchB(config)# monitor session 8 destination interface Gi 3/38</pre>
</blockquote>
<p>There are always things to look out for, aren&#8217;t there?  The first that comes to mind is the fact that you&#8217;re copying traffic from a port onto one or more trunks.  If the port is sending enough traffic and your trunk is close to capacity, you may wind up crushing the trunk link.  That would suck.</p>
<p>If you have a fully-meshed switch environment, you&#8217;ll see the additional traffic across all your trunks if you&#8217;re set up that way.  If you have four trunks that transport all VLANs, you may have four copies of the data coming out of the switch.  Let&#8217;s say the box being monitored is compromised and sending out 600Mbps of data.  That means that every switch will have to deal with that much traffic.  This sounds to me like a CPU/memory issue waiting to happen.</p>
<p>Don&#8217;t expect RSPANs to work on your 2950 like this.  On the lower-end switches, you have to use a reflector port to copy the traffic to the RSPAN.  I don&#8217;t get into that here, but Google is your friend.</p>
<p>Send any <span style="text-decoration: line-through;">Cadbury Creme Eggs</span> 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/03/18/rspans-on-cisco-switches/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SPANs on Cisco Switches</title>
		<link>http://aconaway.com/2009/03/13/spans-on-cisco-switches/</link>
		<comments>http://aconaway.com/2009/03/13/spans-on-cisco-switches/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 13:49:37 +0000</pubDate>
		<dc:creator>Aaron Conaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[span]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[tcpdump]]></category>

		<guid isPermaLink="false">http://aconaway.com/?p=263</guid>
		<description><![CDATA[I can&#8217;t believe I haven&#8217;t blogged on this yet.  SPANs are one of my favorite things in the world. The switched port analyzer (SPAN) is a mechanism on Cisco switches that allows you to take traffic on one port and copy it to another.  It&#8217;s generally used to get traffic to a sniffer or IDS for analysis, but it&#8217;s a great tool to use to sample traffic from a host for troubleshooting. Let&#8217;s use a real-world example.  You&#8217;ve told your roommate to quit illegally downloading songs off the Internet, but you suspect he&#8217;s still doing it.  Instead of sneaking into his room at night and checking his machine, you can use a SPAN to copy his traffic to another switch interface where you can use tcpdump to record what&#8217;s happening. Let&#8217;s say you have a 2950, and the roomie is on F0/1.  You have a Linux box plugged into F0/24 ready to capture the traffic.  Here&#8217;s what you do. monitor session 1 source interface F0/1 both monitor session 1 destination interface F0/24 This will create a new monitor session (that is, a SPAN session) that copies traffic from port F0/1 in both directions to port F0/24.  Now, when you run [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t believe I haven&#8217;t blogged on this yet.  SPANs are one of my favorite things in the world.</p>
<p>The switched port analyzer (SPAN) is a mechanism on Cisco switches that allows you to take traffic on one port and copy it to another.  It&#8217;s generally used to get traffic to a sniffer or IDS for analysis, but it&#8217;s a great tool to use to sample traffic from a host for troubleshooting.</p>
<p>Let&#8217;s use a real-world example.  You&#8217;ve told your roommate to quit illegally downloading songs off the Internet, but you suspect he&#8217;s still doing it.  Instead of sneaking into his room at night and checking his machine, you can use a SPAN to copy his traffic to another switch interface where you can use <em>tcpdump </em>to record what&#8217;s happening.</p>
<p>Let&#8217;s say you have a 2950, and the roomie is on F0/1.  You have a Linux box plugged into F0/24 ready to capture the traffic.  Here&#8217;s what you do.</p>
<blockquote>
<pre>monitor session 1 source interface F0/1 both
monitor session 1 destination interface F0/24</pre>
</blockquote>
<p>This will create a new monitor session (that is, a SPAN session) that copies traffic from port F0/1 in both directions to port F0/24.  Now, when you run tcpdump on your Linux box, you see all the traffic coming in and going out of your roommate&#8217;s port.</p>
<p>That&#8217;s pretty easy, right?  You can have multiple sources ports by just adding more source lines or using ranges of ports.  You can also just copy received or transmitted traffic from a source.  Check out the contextual help for a little more info.</p>
<p>To see what&#8217;s going on, you can do a <em>show monitor</em> or a <em>show monitor session 1</em> (depending on the IOS version).  You&#8217;ll see something like this.</p>
<blockquote>
<pre>switch#sh monitor
Session 1
---------
Type              : Local Session
Source Ports      :
Both          : Fa0/1
Destination Ports : Fa0/24
Encapsulation : Native
Ingress : Disabled</pre>
</blockquote>
<p>If you take a look at the destination port when the SPAN is running, you&#8217;ll see it&#8217;s in a state of <em>up/down (monitoring)</em>.  I think you can figure out that this means we&#8217;re monitoring some traffic to this port.  Here&#8217;s what you&#8217;ll see if you look at the port.</p>
<blockquote>
<pre>switch#sh int f0/24
FastEthernet0/24 is up, line protocol is down (monitoring)
...</pre>
</blockquote>
<p>There are two big things to keep in mind when doing SPANs.  The first is that monitoring a port can drive CPU utilization way up (depending on the platform and traffic volume), so you may run into problems if you have a bunch of SPANs going at the same time.  Related to this is the fact that, if your switch has to decide between switching and copying traffic, it will stop copying until there&#8217;s enough CPU headroom to do that safely, and you&#8217;ll lose packets in the meantime.  It&#8217;s a switch &#8212; not a copier.</p>
<p>The second thing to keep in mind involves those little voices in your head called ethics.  What if you see a VOIP phone call from your boss to the HR department?  How about if you find someone in upper management copying a spreadsheet of people to be fired tomorrow?  How about if you find an engineer&#8217;s telnet password to a key system?  These are things that you probably shouldn&#8217;t see, so be careful when looking at the packets.  I would suggest you tell someone in your security when you&#8217;re going to do a packet capture to make sure someone knows you&#8217;re not up to no good.</p>
<p>Send <span style="text-decoration: line-through;">shamrocks</span> 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/03/13/spans-on-cisco-switches/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

