<?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/category/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, 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>Simple IOS authentication with Freeradius server</title>
		<link>http://ccielab.ro/2012/03/simple-ios-authentication-with-freeradius-server/</link>
		<comments>http://ccielab.ro/2012/03/simple-ios-authentication-with-freeradius-server/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 19:47:58 +0000</pubDate>
		<dc:creator>Alex Juncu</dc:creator>
				<category><![CDATA[CCNP]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Switching]]></category>
		<category><![CDATA[AAA]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[FreeRADIUS]]></category>
		<category><![CDATA[RADIUS]]></category>
		<category><![CDATA[securing devices]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=162</guid>
		<description><![CDATA[Securing a router or a switch involves not only filtering traffic with ACLs, but also means securing the device itself. Creating users with certain privilege levels is an important first step.  This can be done on a device by device basis or using a centralized authentication server. In any case, it involves using AAA (Authentication, [...]]]></description>
			<content:encoded><![CDATA[<p>Securing a router or a switch involves not only filtering traffic with ACLs, but also means securing the device itself. Creating users with certain privilege levels is an important first step.  This can be done on a device by device basis or using a centralized authentication server. In any case, it involves using <strong>AAA</strong> (Authentication, Authorization and Accounting).</p>
<p>If using a centralized system for user authentication, the router or switch would be an authentication client. It will need to communicate with a server using a specialized protocol. Two such protocols are wide known: TACACS, a Cisco proprietary protocol and RADIUS, an open standard protocol. In a Cisco-centered  network, IOS authentication would work with Cisco&#8217;s ACS (Access Control Server), but in some cases , specially for lab purposes, ACS could be harder to get an setup.</p>
<p>A very quick way to setup an authentication server is to use <strong>FreeRADIUS</strong>, an open source server that uses the RADIUS protocol. It can be easily installed on a Linux box and used with minimum configurations. Here are the steps to setup:</p>
<p>Install the packet:</p>
<blockquote><p>root@radiusserver# apt-get install freeradius</p></blockquote>
<p>Add each client (router or switch) in the /etc/freeradius/clients.conf file. Each client is identified by its hostname and requires a password (secret).</p>
<blockquote><p>root@radiusserver# vim /etc/freeradius/clients.conf</p>
<p>Client 192.168.0.2<br />
{<br />
secret = authentications3cr3t<br />
shortname = ClientRouter</p>
<p>}</p></blockquote>
<p>Add each user that is allowed on the device.</p>
<blockquote><p>root@radiusserver# vim /etc/freeradius/users.conf</p>
<p>iosuser Cleartext-Password := “icanhazroot”<br />
DEFAULT Auth-Type := Reject</p></blockquote>
<p>Start or restart the FreeRADIUS server:</p>
<blockquote><p>root@radiusserver# /etc/init.d/freeradius restart</p></blockquote>
<p>On the client side (the network device), AAA needs to be enabled, the RADIUS server configured and then the authentication need to be set to use an external server.</p>
<blockquote><p>ClientRouter(config)# aaa new-model<br />
ClientRouter(config)# radius-server host $RADIUS_SERVER_IP auth 1812 acct 1813 key authentications3cr3t<br />
ClientRouter(config)# aaa authentication login default group radius</p></blockquote>
<p>This is a basic configuration of a FreeRADIUS server, but it can also provide features like LDAP intergration.</p>
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2012/03/simple-ios-authentication-with-freeradius-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>2</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>
		<item>
		<title>Wake on LAN</title>
		<link>http://ccielab.ro/2009/10/wake-on-lan/</link>
		<comments>http://ccielab.ro/2009/10/wake-on-lan/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 21:43:35 +0000</pubDate>
		<dc:creator>Dragos Draghicescu</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[power management]]></category>
		<category><![CDATA[Wake on LAN]]></category>
		<category><![CDATA[WOL]]></category>

		<guid isPermaLink="false">http://ccielab.ro/?p=14</guid>
		<description><![CDATA[
As I was looking through the DD-WRT Linux distribution capabilities I have seen an interesting protocol named Wake on LAN, allowing one to power up a device remotely.
Basically, for implementation,  you have to configure the BIOS on the PC (usually in Power Management section) to support it. After that, your network card will remain [...]]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in" align="justify">As I was looking through the DD-WRT Linux distribution capabilities I have seen an interesting protocol named Wake on LAN, allowing one to power up a device remotely.</p>
<p style="margin-bottom: 0in" align="justify">Basically, for implementation,  you have to configure the BIOS on the PC (usually in Power Management section) to support it. After that, your network card will remain active even after you power off the PC, waiting in a low-power state for a “magic packet” to turn it back on. I managed to implement it in a lab and it&#8217;s really nice to have full control over configuring  a host PC from turn on to shut down. And in a lab with 45 PC&#8217;s..   it kind of helps <img src='http://ccielab.ro/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p style="margin-bottom: 0in" align="justify">I&#8217;ve played a little with an embedded ARM device with Linux, and cross-compiled the program <a href="http://ccielab.ro/wp-content/uploads/2009/10/wol.c" target="_blank">&lt;here&gt;</a> for use with the command line. The script that fires it lies <a href="http://ccielab.ro/wp-content/uploads/2009/10/wol.txt" target="_self">&lt;here&gt;</a>. I apologise for not having around the latest version at the time writing this. It looks like this:</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } --></p>
<p style="margin-bottom: 0in" align="justify">
<div id="attachment_15" class="wp-caption alignnone" style="width: 509px"><img class="size-full wp-image-15" src="http://ccielab.ro/wp-content/uploads/2009/10/wol_dialog.png" alt="WOL_screen" width="499" height="346" /><p class="wp-caption-text">WOL_screen</p></div>
<p style="margin-bottom: 0in" align="justify">You can look on the web for more information about WOL (it&#8217;s very well documented).</p>
<p style="margin-bottom: 0in" align="justify">Good luck!</p>
<p style="margin-bottom: 0in">DD</p>
<p style="margin-bottom: 0in">
]]></content:encoded>
			<wfw:commentRss>http://ccielab.ro/2009/10/wake-on-lan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

