<?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>Phocean.net / Computer Security &#187; dummy</title>
	<atom:link href="http://www.phocean.net/tag/dummy/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phocean.net</link>
	<description>&#34;A defense that hedgehogs possess is the ability to roll into a tight ball, causing all of the spines to point outwards.&#34; -- Wikipedia</description>
	<lastBuildDate>Wed, 30 Nov 2011 22:02:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Connecting your GNS3 labs to the real network</title>
		<link>http://www.phocean.net/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=connecting-your-gns3-labs-to-the-real-network</link>
		<comments>http://www.phocean.net/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html#comments</comments>
		<pubDate>Sun, 01 Mar 2009 02:02:21 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dummy]]></category>
		<category><![CDATA[gns3]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=334</guid>
		<description><![CDATA[There is a nice video tutorial to get your GNS3 lab connected to your physical network. However, it requires you to use a real network card with a fixed IP for doing that. This is not really handy if, llike me, you use GNS3 on a laptop whose connectivity is frequently switching between cable and [...]]]></description>
			<content:encoded><![CDATA[<p>There is a <a title="GNS3 bridge to the physical network" href="http://www.blindhog.net/linux-bridging-for-gns3-lan-communications/" target="_blank">nice video tutorial</a> to get your GNS3 lab connected to your physical network.</p>
<p>However, it requires you to use a real network card with a fixed IP for doing that. This is not really handy if, llike me, you use GNS3 on a laptop whose connectivity is frequently switching between cable and wireless, and on different subnets.</p>
<p>I started to look for something more convenient like a virtual interface.</p>
<p>I first thought about declaring a virtual IP on eth0, but no way : briding is layer 2 (based on MAC address), you can&#8217;t add eth0:0 to a bridge.</p>
<p>Then I found the very handy <strong><em>dummy</em></strong> interface.</p>
<p>Load the module :</p>
<pre class="brush: plain; title: ; notranslate">% sudo modprobe dummy
% lsmod | grep dummy
dummy                   3192  0
% ifconfig dummy0
dummy0    Link encap:Ethernet  HWaddr AE:89:91:BD:61:87
BROADCAST NOARP  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)</pre>
<p>To have the module loaded at boot time, do :</p>
<p><em>In debian :</em></p>
<pre class="brush: plain; title: ; notranslate">% echo dummy &gt;&gt; /etc/modules</pre>
<p><em>In openSUSE, edit this line in <strong>/etc/sysconfig/kernel </strong>:</em></p>
<pre class="brush: plain; title: ; notranslate">MODULES_LOADED_ON_BOOT=&quot;dummy&quot;</pre>
<p>Then, you could go on with the tutorial linked above, replacing <strong><em>eth0</em></strong> with <em><strong>dummy0</strong></em>, or use the script I made :</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/sh

/bin/tunctl -t tap0
/sbin/ifconfig tap0 0.0.0.0 promisc up
/sbin/ifconfig dummy0 0.0.0.0 promisc up
/sbin/brctl addbr br0
/sbin/brctl addif br0 tap0
/sbin/brctl addif br0 dummy0
/sbin/ifconfig br0 10.10.10.99/24 up
/path/to/GNS3-0.6-src/gns3</pre>
<p>You may also insert this line if you want to interconnect your lab network with your other networks (it activates kernel&#8217;s IP forwarding) :</p>
<pre class="brush: bash; title: ; notranslate">echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre>
<p>I saved it <strong><em>/usr/local/bin/gns</em> </strong>and created a pretty shortcut for the application browser of Gnome :</p>
<pre class="brush: plain; title: ; notranslate">% cat /usr/share/applications/gns3.desktop
[Desktop Entry]
X-SuSE-translate=true
Encoding=UTF-8
Name=gns3
GenericName=Cisco routers emulator
Exec=/usr/local/bin/gns-start
Terminal=false
Type=Application
X-KDE-SubstituteUID=true
Icon=gnome-window-manager
Categories=GNOME;Network;</pre>
<p>This shortcut will prompt you for the root password (unfortunately, when dealing with tap interface, GNS3 requires root access &#8211; security could be tighten with SELinux or AppArmor) and launch GNS3 with most of the network stuff prepared.</p>
<p>Just in case you want to clear that all quickly, there is the <strong><em>gns-stop</em></strong> script :</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/sh
ifconfig br0 down
brctl delif br0 tap0
brctl delif br0 eth0
brctl delbr br0
tunctl -d tap0</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

