<?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>CCIE Lab &#187; tcl</title>
	<atom:link href="http://ccielab.ro/tag/tcl/feed/" rel="self" type="application/rss+xml" />
	<link>http://ccielab.ro</link>
	<description>Cry in the Lab, Laugh in the Datacenter</description>
	<lastBuildDate>Wed, 09 May 2012 12:02:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Run remote procedures &amp; GNS3</title>
		<link>http://ccielab.ro/2009/11/run-remote-procedures-gns3/</link>
		<comments>http://ccielab.ro/2009/11/run-remote-procedures-gns3/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 11:11:53 +0000</pubDate>
		<dc:creator>Dragos Draghicescu</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[CCNA]]></category>
		<category><![CDATA[Cisco IOS]]></category>
		<category><![CDATA[gns3]]></category>
		<category><![CDATA[tcl]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=31</guid>
		<description><![CDATA[
An interesting and pretty new capability of Cisco IOS is scripting through TCL language. What is not that well documented is that you can configure a router in some situations and the interesting thing is that you can store the configuration procedure remotely, like on a tftp server for example. What I will present may [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">An interesting and pretty new capability of Cisco IOS is scripting through TCL language. What is not that well documented is that you can configure a router in some situations and the interesting thing is that you can store the configuration procedure remotely, like on a tftp server for example. What I will present may be useful in lab environments, for simulation purposes. I used it to prepare a huge exercise for the CCNA 2 class.</p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">First of all, I will suppose that you have configured a tftp server somewhere in your LAN. Second thing is you can configure a bridge between your Ethernet interface and a tap interface (a virtual interface, for use with the emulated router). In Linux, you can use the <em>Bridge-utils</em> and <em>uml-utilities</em> to do that. You can find a tutorial on how to do a bridge<a href="http://www.blindhog.net/linux-bridging-for-gns3-lan-communications/"> &lt;here&gt;</a>.</p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">Now lets get to work! <img src='http://ccielab.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">In GNS3 (ran as root) you have to link the router with a clouds tap interface. In the cloud configuration panel, add a tap interface into the <em>NIO tap</em> tab (lets say <em>tap0</em>). Next, configure the router interface IP address like its part of your LAN. You can ping your gateway to verify that.</p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">It&#8217;s all said and done. The <a href="http://ccielab.ro/wp-content/uploads/2009/11/script.txt">script</a> I wrote reads a number of Loopback interfaces to be configured from the user input. The output looks like this:</p>
<p style="margin-bottom: 0in" lang="en-US">
<div id="attachment_32" class="wp-caption aligncenter" style="width: 487px"><a href="http://ccielab.ro/wp-content/uploads/2009/11/tcl.png"><img class="size-full wp-image-32" src="http://ccielab.ro/wp-content/uploads/2009/11/tcl.png" alt="IOS output" width="477" height="332" /></a><p class="wp-caption-text">IOS output</p></div>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">The output is incomplete, but the script configured Loopback 0 to 4 with ip addresses.</p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">I hope some will find what can be done with IOS TCL pretty interesting.</p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">Good luck!</p>
<p style="margin-bottom: 0in;text-align: justify" lang="en-US">DD</p>
<p style="margin-bottom: 0in" lang="en-US">
<p style="margin-bottom: 0in" lang="en-US">
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2009/11/run-remote-procedures-gns3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

