<?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>dummy &#8211; Phocean.net</title>
	<atom:link href="/tag/dummy/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Computer Security Blog</description>
	<lastBuildDate>Fri, 24 Feb 2017 21:17:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.10</generator>
	<item>
		<title>Connecting your GNS3 labs to the real network</title>
		<link>/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html</link>
		<comments>/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><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dummy]]></category>
		<category><![CDATA[gns3]]></category>
		<category><![CDATA[openSUSE]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=334</guid>
		<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...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html">Continue Reading</a></span>]]></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>% 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>% echo dummy &gt;&gt; /etc/modules</pre>
<p><em>In openSUSE, edit this line in <strong>/etc/sysconfig/kernel </strong>:</em></p>
<pre>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>#!/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>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>% 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>#!/bin/sh
ifconfig br0 down
brctl delif br0 tap0
brctl delif br0 eth0
brctl delbr br0
tunctl -d tap0</pre>
]]></content:encoded>
			<wfw:commentRss>/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
