<?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; Linux</title>
	<atom:link href="http://ccielab.ro/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://ccielab.ro</link>
	<description>Cry in the Lab, Laugh in the Datacenter</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:29:37 +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>Telnet handler in Firefox-(K)Ubuntu</title>
		<link>http://ccielab.ro/2009/11/telnet-handler-in-firefox-kubuntu/</link>
		<comments>http://ccielab.ro/2009/11/telnet-handler-in-firefox-kubuntu/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 16:16:17 +0000</pubDate>
		<dc:creator>Radu</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[a mad cry in the night]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=49</guid>
		<description><![CDATA[In labs we use reverse telnet to access our equipment (as in &#8220;routers and switches&#8221;) directly into console. To make things a little bit easier for our students we created a web page with &#8220;telnet://&#8221; links pointing directly to each router/switch.
That should be enough to solve all those pesky little questions like &#8220;what was that [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">In labs we use reverse telnet to access our equipment (as in &#8220;routers and switches&#8221;) directly into console. To make things a little bit easier for our students we created a web page with &#8220;telnet://&#8221; links pointing directly to each router/switch.<br />
That should be enough to solve all those pesky little questions like &#8220;what was that address again ?&#8221;. And it is. At least when the computer used by our students is running Windows. But we do have a little problem because all our computers in the lab are running Ubuntu. And Firefox. And it appears that Firefox in Ubuntu doesn&#8217;t know how to handle &#8220;telnet://&#8221; links.</p>
<p style="text-align: justify">I solved the problem by installing Opera browser and add the telnet handler in Opera. Or even better, install Opera and Putty and use Putty to handle &#8220;telnet://&#8221;. But the problem with Firefox kept bugging me and even if I&#8217;m lazy i knew that it became personal.<br />
So I started to search the allmighty internet. I found out that I can add telnet protocol in user prefs in Firefox. But it didn&#8217;t work. So I kept searching and finally I&#8217;ved put the bits and pieces together and solved the problem. Here it goes.</p>
<p style="text-align: justify">First thing to do is to tell Firefox that we WANT to use telnet:// links. To do that we must open Firefox and type &#8220;about:config&#8221; in address bar. And we create a new boolean preference (right click on an empty space), name it &#8220;network.protocol-handler.expose.telnet&#8221; and set the value &#8220;false&#8221; and restart the browser. That should be enough for Firefox to let us select an external application to open &#8220;telnet://&#8221; links.<br />
From this point forward we can choose the easy way and choose putty or the hard way and use gnome-terminal/xterm/konsole. The &#8220;hard way&#8221; because telnet in terminal doesn&#8217;t know how to handle &#8220;address:port&#8221; format. So how should we do that ? Simple, we create a shell script and we use that script as the default application to open &#8220;telnet://&#8221; links in Firefox.</p>
<p style="text-align: justify">The script is pretty easy :</p>
<blockquote>
<pre style="text-align: justify">

#!/bin/sh

address=`echo ${*##telnet://} | sed 's/:/ /g'`

#For xterm junkies :
xterm -e "telnet $address"

#For gnome-terminal users :
#uncomment the next line but comment
#all other terminal launchers (xterm, konsole)
#gnome-terminal -e "telnet $address"

#For konsole hipsters :
#konsole sends args separately to command so we use "" only for telnet
#uncomment the next line but comment
#all other terminal launchers (gnome-terminal, xterm)
#konsole -e "telnet" $address
</pre>
</blockquote>
<p>And voila, sit back, relax and enjoy a cold beer&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2009/11/telnet-handler-in-firefox-kubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>
