<?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>Mon, 02 Jan 2012 00:15:56 +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>IOS + Linux = Quagga</title>
		<link>http://ccielab.ro/2011/12/ios-linux-quagga/</link>
		<comments>http://ccielab.ro/2011/12/ios-linux-quagga/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 22:41:49 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[Cisco IOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[BGP]]></category>
		<category><![CDATA[OSFP]]></category>
		<category><![CDATA[quagga]]></category>
		<category><![CDATA[RIP]]></category>
		<category><![CDATA[zebra]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=180</guid>
		<description><![CDATA[Cisco IOS&#8217;s shell is a popular interface for devices in the networking world. But also in the network world, there are a lot of Linux/Open Source fans. The Quagga open source project tries to bring together IOS and Linux, by providing an IOS-like interface for configuring Linux&#8217;s interfaces, routing table and firewall, along side its [...]]]></description>
			<content:encoded><![CDATA[<p>Cisco IOS&#8217;s shell is a popular interface for devices in the networking world. But also in the network world, there are a lot of Linux/Open Source fans. The <a href="http://www.quagga.net" target="_blank"><strong>Quagga</strong></a> open source project tries to bring together IOS and Linux, by providing an IOS-like interface for configuring Linux&#8217;s interfaces, routing table and firewall, along side its own implementations of RIP, OSPF and BGP daemons.</p>
<p>The Quagga Software Routing Suite comes as a set of daemos. The main one is the <strong>zerbra daemon</strong> (Zebra is the old name of the project). This core daemon does the interaction with the Linux kernel and, also, with other daemons like ripd (RIP daemon), ospfd (OSPF daemon), bgpd (BGP daoemon). Quagga is modular, so you can implement new protocols if needed via a standard API.</p>
<p>To configure Quagga, you first need to start the daemons (at least the core one), in the <em>/etc/quagga/daemons</em> file. Each daemon has its own configuration file (ex. <em>/etc/quagga/zebra.conf</em>, <em>/etc/quagga/ripd.conf</em> etc.). Accessing the IOS-like shell is done via the <strong>vtysh</strong> command. Once in this shell, most commands available in Cisco&#8217;s IOS are available.</p>
<blockquote><p>Router / # cd<br />
Router ~ # vtysh</p>
<p>Hello, this is Quagga (version 0.99.18).<br />
Copyright 1996-2005 Kunihiro Ishiguro, et al.</p>
<p>Router# conf t<br />
Router(config)# hostname  LinuxRouter<br />
LinuxRouter(config)# exit<br />
LinuxRouter# show ?<br />
bgp             BGP information<br />
clns            clns network information<br />
daemons         Show list of running daemons<br />
debugging       State of each debugging option</p>
<p>[...]</p></blockquote>
<p>Keep in mind that some things are not 100% identical to a Cisco router (ex. the interface names). Here&#8217;s an example of how to configure an interface.</p>
<blockquote><p>LinuxRouter# conf t<br />
LinuxRouter(config)# interface  eth0<br />
LinuxRouter(config-if)# ip address  141.85.42.1 ?<br />
A.B.C.D/M  IP address (e.g. 10.0.0.1/8)<br />
LinuxRouter(config-if)# ip address  141.85.42.1/24<br />
LinuxRouter(config-if)# link-detect</p></blockquote>
<p>Monitor output (show commands) are similar aside some Linux specific details (ex. Kernel routes are available in Linux, but not in IOS).</p>
<blockquote><p>Router# sh ip route<br />
Codes: K &#8211; kernel route, C &#8211; connected, S &#8211; static, R &#8211; RIP, O &#8211; OSPF,<br />
I &#8211; ISIS, B &#8211; BGP, &gt; &#8211; selected route, * &#8211; FIB route</p>
<p>K * 0.0.0.0/0 via 192.0.2.1, venet0 inactive<br />
O 10.10.12.0/24 [110/10] is directly connected, eth0, 00:03:41<br />
C&gt;* 10.10.12.0/24 is directly connected, eth0<br />
O 10.10.14.0/24 [110/10] is directly connected, eth1, 00:03:36<br />
C&gt;* 10.10.14.0/24 is directly connected, eth1<br />
O&gt;* 10.10.23.0/24 [110/20] via 10.10.12.2, eth0, 00:02:46<br />
O&gt;* 10.10.24.0/24 [110/20] via 10.10.12.2, eth0, 00:02:14<br />
*via 10.10.14.4, eth1, 00:02:14<br />
O&gt;* 10.10.25.0/24 [110/20] via 10.10.12.2, eth0, 00:02:41<br />
O&gt;* 10.10.35.0/24 [110/30] via 10.10.12.2, eth0, 00:01:21<br />
* via 10.10.14.4, eth1, 00:01:21<br />
O&gt;* 10.10.45.0/24 [110/20] via 10.10.14.4, eth1, 00:02:08<br />
C&gt;* 127.0.0.0/8 is directly connected, lo<br />
C&gt;* 127.0.0.1/32 is directly connected, venet0<br />
C&gt;* 172.10.10.0/32 is directly connected, venet0<br />
K&gt;* 192.0.2.1/32 is directly connected, venet0</p></blockquote>
<p>Configuring a routing protocol instance is also similar:</p>
<blockquote><p>LinuxRouter# conf t<br />
LinuxRouter(config)# router ospf<br />
LinuxRouter(config-router)# network  192.168.123.0/0 area 0</p></blockquote>
<p>As you can see, coming from an IOS background, this tool is very easy to use on your Linux box. It is far from perfect since it doesn&#8217;t have the years in production like IOS or iproute2, but it is cool to test out.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2011/12/ios-linux-quagga/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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>

