<?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>Jason's Computer Science Blog &#187; Simulation</title>
	<atom:link href="http://www.jasonernst.com/tag/simulation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonernst.com</link>
	<description>By Jason Ernst</description>
	<lastBuildDate>Tue, 07 Sep 2010 18:53:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tutorial: Install ns-3.7.1 in Windows 7 using cygwin</title>
		<link>http://www.jasonernst.com/2010/04/15/ns-3-7-1-windows-7-cygwin/</link>
		<comments>http://www.jasonernst.com/2010/04/15/ns-3-7-1-windows-7-cygwin/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 19:35:56 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[802.11]]></category>
		<category><![CDATA[802.11s]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[NS-3.7.1]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=781</guid>
		<description><![CDATA[Ns-3 is one of the most popular simulation tools for network simulation. See the website: http://www.nsnam.org/. It is the successor to the popular ns-2 simulator. The tool is written in c++ / python, but I manage to get by using mostly only c++ (as opposed to ns-2 which uses c/c++ and tcl). One major difference [...]]]></description>
			<content:encoded><![CDATA[<p>Ns-3 is one of the most popular simulation tools for network simulation. See the website: <a href="http://www.nsnam.org/">http://www.nsnam.org/</a>. It is the successor to the popular ns-2 simulator. The tool is written in c++ / python, but I manage to get by using mostly only c++ (as opposed to ns-2 which uses c/c++ and tcl). One major difference between ns-3 and ns-2 is that this version has been designed for wireless network simulation from the ground up. (There is support for many types of 802.11 networks including 802.11s mesh networks which interest me).</p>
<p><span id="more-781"></span></p>
<p>The following instructions explain how to install the latest stable version of ns3 (as of April 14th, 2010) on windows 7 with cygwin. I will try to include any common problems I have encountered, or those of users who comment on the post experience in order to make your install easier.</p>
<p>Step 1:<br />
<a href="http://www.cygwin.com/setup.exe">Download &#038; install cygwin</a>. (note: I install it in the recommended directory &#8220;{System Root}/cygwin/&#8221;). Make sure you select &#8220;install&#8221; for python and devel. This will ensure you have python and gcc/g++ as well as all of the dependencies. You can do this by clicking on the word default in the list of packages. I left all of the other package options on default for the install.</p>
<p>Step 2:<br />
<a href="http://www.nsnam.org/releases/ns-allinone-3.7.1.tar.bz2">Download ns3.7.1</a>. Save the file to &#8220;{System Root}/cygwin/home/{your-username}&#8221;</p>
<p>Step 3:<br />
Start cygwin. At the cygwin prompt type: &#8220;tar xvf ns-allinone-3.7.1.tar.bz2&#8243;. This will unpack the ns3 archive so you can use it.</p>
<p>Step 4:<br />
After it has unpacked, change directory to the new ns3 directory with the following: &#8220;cd ns-allinone-3.7.1&#8243;. Then build ns3 by typing the following: &#8220;./build.py&#8221;. You can probably grab a coffee or tea while it compiles.</p>
<p><center>
<div class="image"><img src="http://www.jasonernst.com/wp-content/uploads/2010/04/cygwin-ns3-300x200.jpg" alt="ns3 cygwin windows 7"/>
<p style="text-align:center;">ns3 on windows 7 with cygwin</div>
<p></center></p>
<p>Step 5:<br />
You should be good to go. You can validate the install by changing directory again to the ns-3.7.1 directory (&#8220;cd ns-3.7.1&#8243;) and running &#8220;./test.py&#8221;. It will let you know with a PASS / FAIL for each test case. You can now edit the files yourself. The scenario files are located in &#8220;&#8221; and the source files are located in &#8220;&#8221;. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2010/04/15/ns-3-7-1-windows-7-cygwin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>AINA 2009 Conference Presentation</title>
		<link>http://www.jasonernst.com/2009/06/01/aina-2009-conference-presentation/</link>
		<comments>http://www.jasonernst.com/2009/06/01/aina-2009-conference-presentation/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 18:04:29 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[AINA 2009]]></category>
		<category><![CDATA[Bradford]]></category>
		<category><![CDATA[Fair Scheduling]]></category>
		<category><![CDATA[Jason B. Ernst]]></category>
		<category><![CDATA[Mesh]]></category>
		<category><![CDATA[Mieso Denko]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Publication]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[UK]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=673</guid>
		<description><![CDATA[This past week I travelled to the UK to present at my first International Conference &#8211; Advanced Information Networking and Applications (AINA 2009) in Bradford, UK. My presentation was on &#8220;Fair Scheduling in Wireless Mesh Networks with Multiple Gateways&#8221;. The paper for the conference was published in the main AINA conference and I presented on [...]]]></description>
			<content:encoded><![CDATA[<p>This past week I travelled to the UK to present at my first International Conference &#8211; Advanced Information Networking and Applications (AINA 2009) in Bradford, UK. My presentation was on &#8220;Fair Scheduling in Wireless Mesh Networks with Multiple Gateways&#8221;. The paper for the conference was published in the main AINA conference and I presented on the first day, in the first session. It was nice to have it over with right away so that I could relax and focus on meeting as many people as possible at the conference. </p>
<p><span id="more-673"></span></p>
<p>There were people from 40 different countries there and I feel like I met someone from almost every one of them at some point. There were over 300 people at AINA this year, which apparently is down from the last couple of years (where they had 4-500) but it was still a great conference for me. I will post my slides from my presentation in this post in case anyone is interested, along with a link to the paper once it is available. I submitted another paper last night for a conference in Toronto and am working on two more papers, so hopefully I&#8217;ll be travelling soon. I am trying to aim for ICC in South Africa next year.</p>
<p>Here are a few pictures from the conference. </p>
<div class="image"><img src="http://www.jasonernst.com/wp-content/uploads/2009/06/aina03-300x225.jpg" alt="" title="aina03" width="300" height="225" class="alignnone size-medium wp-image-678" /></div>
<div class="image"><img src="http://www.jasonernst.com/wp-content/uploads/2009/06/aina02-300x225.jpg" alt="" title="aina02" width="300" height="225" class="alignnone size-medium wp-image-677" /></div>
<div class="image"><img src="http://www.jasonernst.com/wp-content/uploads/2009/06/aina01-300x225.jpg" alt="" title="aina01" width="300" height="225" class="alignnone size-medium wp-image-676" /></div>
<p><strong>Abstract:</strong><br />
This paper addresses the problem of scheduling  in Wireless Mesh  Networks (WMNs). The paper first discusses existing scheduling algorithms and classifies them based on the technique they use and their implementation frameworks.Then detailed discussions of the proposed scheduling method are presented. Simulation experiments are conducted to compare the performance of fair scheduling with the method that does not use fair scheduling. The simulation results confirm that the proposed scheduling method has better performance with respect to the metrics used for  performance evaluation.</p>
<p>J.B. Ernst, M.K. Denko, &#8220;Fair Scheduling with Multiple Gateways in Wireless Mesh Networks&#8221;, in Proc. of the 22nd IEEE Int. Conf. on Advanced Information Networking and Applications (AINA 2009), Bradford UK, 2009.</p>
<p>The paper itself is available through <a href="http://ieeexplore.ieee.org/xpls/abs_all.jsp?tp=&#038;arnumber=5076187&#038;isnumber=5076162">IEEE Xplore</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2009/06/01/aina-2009-conference-presentation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ns-3.2 on Ubuntu 8.04 Hardy Heron</title>
		<link>http://www.jasonernst.com/2008/11/22/ns-32-on-ubuntu-804-hardy-heron/</link>
		<comments>http://www.jasonernst.com/2008/11/22/ns-32-on-ubuntu-804-hardy-heron/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 18:18:22 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[8.04]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Hardy]]></category>
		<category><![CDATA[Heron]]></category>
		<category><![CDATA[NS-3.2]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=203</guid>
		<description><![CDATA[For the next stage of my thesis instead of using the well known ns-2 simulator as originally planned, I have opted to instead use ns-3. I have chosen this particular environment because it seems to be designed from the ground up to be a wireless simulation tool while ns-2 was originally designed solely for wired [...]]]></description>
			<content:encoded><![CDATA[<p>For the next stage of my thesis instead of using the well known ns-2 simulator as originally planned, I have opted to instead use ns-3. I have chosen this particular environment because it seems to be designed from the ground up to be a wireless simulation tool while ns-2 was originally designed solely for wired network simulation. I have made some use of ns-2 however, so if you are looking for a guide to getting that working in Ubuntu see my post &#8220;<a href="http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/">NS-2.33 on Ubuntu 8.04 Hardy Heron</a>&#8220;.  In addition to this, ns-3 no longer uses the tcl scripting language.  Instead the choice of pure c++ or a combination of c++ and python may be used to define the simulation parameters. I prefer this approach because I have no desire to learn tcl and find the c++ ns-3 ot be more intuitive than ns-2. Additionally, this guide will be used as a reference for myself while I learn the ns-3 environment. Check back for regular updates and useful infromation.</p>
<p><span id="more-203"></span></p>
<p>So back to the point of this article, a guide on how to install ns-3.2 on Ubuntu 8.04 Hardy Heron. Ns-3 installation is quite simple since an automatic build tool named waf is used to build the project. Enter the following in the terminal to download, untar and build ns-3.2.<br />
<code><br />
wget http://www.nsnam.org/releases/ns-3.2.tar.bz2<br />
tar -xvf ns-3.2.tar.bz2<br />
./waf -d debug configure<br />
</code>
</p>
<h3>How to start working with NS-3</h3>
<p>So from here on out, all you have to do is use the waf tool for compiling and running your ns3 simulations. There are many example scenarios located in the /examples folder. You can run a simulation with any of the scenarios using the waf command. For example if you wanted to run a scenario file named first.cc you would enter the following command:<br />
<code><br />
./waf --run=first<br />
</code><br />
Notice that you do not need to include the .cc on the filename. If you do happen to misspell the file, ns3 will provide you with a list of all of the scenarios you are able to run. One other important note is that the /scratch folder automatically includes the .cc files as scenarios which you can run. This is likely where you will want to place your new scenarios when working on them. (If you try to put them in the examples folder you will need to edit the wscript file (see <a href="#links">NS3 tutorial</a> on how to do this). On other important thing to note is that ns3 supports improved logging / output compared with ns2 using the pcap file format which can be read using tcpdump or wireshark. These types of files were originally used for packet capturing in real working networks so it makes alot of sense to include this ability in simulation as well.
</p>
<h3>How to display exactly what is going on to the screen (Logging)</h3>
<p>Sometimes when making changes and implementing something new, it is helpful to show everything that is happening on the screen. You can achieve this by entering the following at the linux command line:<br />
<code><br />
export 'NS_LOG=*=level_all|prefix_func|prefix_time'<br />
</code><br />
If you want to restrict the information to only certain parts of the simulation, for example the MAC layer of a wifi AP you could do something like this:<br />
<code><br />
export 'NS_LOG=NqapWifiMac=level_all|prefix_func|prefix_time'<br />
</code><br />
For more information on how to configure the logging to do exactly what you want, see the <a href="http://www.nsnam.org/docs/tutorial.html#SEC42" target="_blank">NS3 Tutorial</a> section on logging.
</p>
<p>If you have turned on logging, you have likely noticed that ns3 generates so much information that it scrolls by way to fast to be of any use. So you will probably want to output the results to a file. For example if you were running the first.cc file again and you have turned on logging you could do this:<br />
<code><br />
./waf --run=first >&#038; first.txt<br />
</code><br />
which would send the logging output to the file first.txt where you could easily read it.
</p>
<h3>Useful Functions</h3>
<p>So far I have found these functions make debugging scenarios easier:<br />
<code><br />
static Vector<br />
GetPosition (Ptr<Node> node)<br />
{<br />
  Ptr<MobilityModel> mobility = node->GetObject<MobilityModel> ();<br />
  return mobility->GetPosition ();<br />
}<br />
</code><br />
<code><br />
static Ipv4Address<br />
GetAddress (Ptr<Node> node, uint32_t interface)<br />
{<br />
  Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();<br />
  return ipv4->GetAddress(interface);<br />
}<br />
</code></p>
<h3 id="tips">Tips</h3>
<p>The following are a few important things I&#8217;ve discovered that may save you time when trying to work with ns3 on certain tasks:</p>
<ul>
<li>When simulating an ad-hoc or wireless mesh network using OLSR, make sure you set your mobility model <strong>before</strong> you install the OLSR routing on the nodes. If you do not do this, OLSR may generate link pairs for links which are actually too far away to communicate because before the mobility model is installed on the nodes they are all close enough to communicate.<br/></li>
<li>Also with OLSR, make sure you give OLSR enough time to determine the network topology before you allow the applications to start running on the network. I have read that about 100s of waiting time before starting is enough, however I imagine as the network size grows this may also grow (I have tested with a size of 4&#215;4 and this is enough time &#8211; I will adjust this as I play with the numbers as well)</li>
</ul>
<h3 id="links">Useful Links</h3>
<ul>
<li><a href="http://www.nsnam.org/doxygen-release/index.html" target="blank">NS3 Doxygen Documentation</a></li>
<li><a href="http://www.nsnam.org/docs/tutorial.html" target="_blank">NS3 Tutorial</a></li>
<li><a href="http://www.nsnam.org/docs/release/manual.html" target="_blank">NS3 Manual</a></li>
<li><a href="http://www.nsnam.org/wiki/index.php/Main_Page" target="_blank">NS3 Wiki</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2008/11/22/ns-32-on-ubuntu-804-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Tutorial: Ns-2.33 (and nam) on Ubuntu 8.04 (Hardy Heron)</title>
		<link>http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/</link>
		<comments>http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 14:57:54 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[8.04]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Hardy]]></category>
		<category><![CDATA[Heron]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[NS-2.33]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=29</guid>
		<description><![CDATA[Since I have been working with ns2 for the last few months in preparation for my thesis I have decided to write a guide on how to install the most recent version of ns2 on the most recent version of ubuntu (at the time of this writing, Monday June 9th, 2008). I have found many [...]]]></description>
			<content:encoded><![CDATA[<p>Since I have been working with ns2 for the last few months in preparation for my thesis I have decided to write a guide on how to install the most recent version of ns2 on the most recent version of ubuntu (at the time of this writing, Monday June 9th, 2008). </p>
<p>I have found many people already who have had difficulty setting it up so maybe this will be of some help to someone.  For this tutorial I am assuming you have installed the most recent version of Ubuntu (8.04). (At the time of writing)</p>
<p><span id="more-29"></span></p>
<h3>Step 1: Update Ubuntu</h3>
<p>Since it has already been a month or so since Hardy Heron has been released its probably best, if you haven&#8217;t already done so to update Ubuntu. The easiest way I&#8217;ve found is to go to System&gt;&gt;Administration&gt;&gt;Update Manager. Alternatively, you can enter this into the terminal:</p>
<div class="snippet">
<div class="snippet-shell">
<code>sudo apt-get update<br />
sudo apt-get upgrade<br />
</code></div>
</div>
<div class="image" style="float:right;"><a href="http://www.jasonernst.com/wp-content/uploads/2008/06/update.png"><img class="alignnone size-medium wp-image-30" title="Ubuntu - Update" src="http://www.jasonernst.com/wp-content/uploads/2008/06/update-300x187.png" alt="Update Manager - Ubuntu Hardy Heron" width="300" height="187" /></a></div>
<h3>Step 2: Download all of the required pieces to make ns2 work</h3>
<p>Here is a list of archives required for ns2 to work properly (you can download them by clicking the links or just enter all of the commands in the code sections below for automatic download and untar). I saved each archive to the desktop so I could find each one easily but you could use anywhere you like.</p>
<ol class="list">
<li><a title="tcl 8.4.14" href="http://www.jasonernst.com/wp-content/uploads/2008/06/tcl8.4.19-src.tar.gz" target="_self">tcl 8.4.14</a></li>
<li><a title="tk 8.4.14" href="http://www.jasonernst.com/wp-content/uploads/2008/06/tk8.4.19-src.tar.gz" target="_self">tk 8.4.14</a></li>
<li><a title="otcl 1.13" href="http://www.jasonernst.com/wp-content/uploads/2008/06/otcl-src-1.13.tar.gz" target="_self">otcl 1.13</a></li>
<li><a title="tclcl 1.19" href="http://www.jasonernst.com/wp-content/uploads/2008/06/tclcl-src-1.19.tar.gz" target="_self">tclcl 1.19</a></li>
<li><a title="ns-2.33" href="http://www.jasonernst.com/wp-content/uploads/2008/06/ns-2.33.tar.gz" target="_self">ns 2.33</a></li>
<li><a title="nam 1.13" href="http://www.jasonernst.com/wp-content/uploads/2008/06/nam-src-1.13.tar.gz" target="_self">nam 1.13</a></li>
</ol>
<h3>Step 2.5: Install Ubuntu Packages</h3>
<p>Before installing everything else, I have found that it is helpful to get a few packages from the ubuntu repositories or else it wont build correctly. Grab a cup of coffee it might take a while since kdebase-dev is somewhat large. I&#8217;m sure there is a way to do this with fewer packages however I know this works. If anyone figures out exactly which packages are required let me know so I can update this.</p>
<div class="snippet">
<div class="snippet-shell">
<code>sudo apt-get install libx11-dev kdebase-dev</code>
</div>
</div>
<h3>Step 3: Install tcl</h3>
<div class="snippet">
<div class="snippet-shell">
<code >wget http://www.jasonernst.com/wp-content/uploads/2008/06/tcl8.4.19-src.tar.gz<br />
tar xvf tcl8.4.19-src.tar.gz<br />
cd tcl8.4.19/unix<br />
./configure<br />
make<br />
sudo make install<br />
</code></div>
</div>
<h3>Step 4: Install tk</h3>
<div class="snippet">
<div class="snippet-shell">
<code>cd ..<br />
cd ..<br />
wget http://www.jasonernst.com/wp-content/uploads/2008/06/tk8.4.19-src.tar.gz<br />
tar xvf tk8.4.19-src.tar.gz<br />
cd tk8.4.19/unix<br />
./configure<br />
make<br />
sudo make install</code>
</div>
</div>
<h3>Step 5: Install oTcl</h3>
<p><em>Important Note:</em> The &#8216;./configure &#8211;with-tcl=&#8217; portion of the following two code fragments should point to the source files for tcl. If you have been following the guide by copying and pasting the previous commands what we have here will work just fine. Otherwise you will need to change this to point to the correct location of your tcl source files. </p>
<div class="snippet">
<div class="snippet-shell">
<code>cd ..<br />
cd ..<br />
wget http://www.jasonernst.com/wp-content/uploads/2008/06/otcl-src-1.13.tar.gz<br />
tar xvf otcl-src-1.13.tar.gz<br />
cd otcl-1.13<br />
./configure --with-tcl=../tcl*/<br />
make<br />
sudo make install</code>
</div>
</div>
<h3>Step 6: Install tclcl</h3>
<div class="snippet">
<div class="snippet-shell">
<code>cd ..<br />
wget http://www.jasonernst.com/wp-content/uploads/2008/06/tclcl-src-1.19.tar.gz<br />
tar xvf tclcl-src-1.19.tar.gz<br />
cd tclcl-1.19<br />
./configure --with-tcl=../tcl*/<br />
make<br />
sudo make install</code></div>
</div>
<h3>Step 7: Install ns2</h3>
<div class="snippet">
<div class="snippet-shell">
<code>cd ..<br />
wget http://www.jasonernst.com/wp-content/uploads/2008/06/ns-2.33.tar.gz<br />
tar xvf ns-2.33.tar.gz<br />
cd ns-2.33<br />
./configure<br />
make<br />
sudo make install</code>
</div>
</div>
<p>You will likely get alot of warnings for deprecated conversions. Just ignore these or if you really are concerned about them visit the <a href="http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#ns-2_not_building_with_gcc.2Fg.2B.2B_4.3.2">nsnam troubleshooting page</a>. If you want to make sure your version of ns-2 is working correctly after the install you can run the validation test from within the ns2 source directory. You can do this by entering:</p>
<div class="snippet">
<div class="snippet-shell">
<code>./validate</code>
</div>
</div>
<p>You should see that the test output agrees with the reference output. Congratulations you have a working version of ns-2 installed.</p>
<h3>Step 8: (optional) Install nam</h3>
<div class="snippet">
<div class="snippet-shell">
<code>cd ..<br />
wget http://www.jasonernst.com/wp-content/uploads/2008/06/nam-src-1.13.tar.gz<br />
tar xvf nam-src-1.13.tar.gz<br />
cd nam-1.13<br />
./configure<br />
make<br />
sudo make install</code>
</div>
</div>
<p>Note: if you get this error:</p>
<div class="snippet">
<div class="snippet-shell">
<code>error: X11/Xmu/WinUtil.h: No such file or directory</code></div>
</div>
<p>it may be necesary to do this: </p>
<div class="snippet">
<div class="snippet-shell">
<code>sudo apt-get install libxmu-dev</code></div>
</div>
<p>You are now ready to start working with ns2 and nam. If you are like me and working on a new protocol or something you will want to start modifying the ns-2 source code and recompile again so you might want to keep that folder handy. The rest of the source can be safely removed as far as i know. Keep in mind after you have modified the source you will want to do another make install so that when you type ns in your terminal the version you just compiled is used. </p>
<h3>Getting Started with NS2</h3>
<p>These are some quick tips to get you started using ns2 if you are a beginner.</p>
<p>All example files are located in ns/tcl/ex. You can run these scenarios on ns2 using <code>ns filename.tcl</code> The best way to start is probably changing things in these files until you understand what is happening more thoroughly.</p>
<p>The output will usually be a trace file with a similar name: ex) filename.tr. Trace files can usually be viewed with a text-editor program. There are also tools to analyze the trace files and pull stats from them. These may require some tweaking however depending on the format of the trace file. Additionally, a nam output file for visualization may be generated as well. This will usually be named filename.nam. To view the visualization use: <code>nam filename.nam</code></p>
<h3>Useful Links</h3>
<p>I thought it might be useful to add a section on useful links here since this article has become quite popular. If you would like to suggest a link feel free to contact me.</p>
<ul class="list">
<li><a href="http://nsnam.isi.edu/nsnam/index.php/Main_Page">Ns2 Wiki</a></li>
<li><a href="http://isi.edu/nsnam/ns/tutorial/index.html">Marc Greis&#8217; Tutorial</a></li>
<li><a href="http://isi.edu/nsnam/ns/ns-documentation.html">NS Manual</a></li>
<li><a href="http://www-sop.inria.fr/maestro/personnel/Eitan.Altman/COURS-NS/n3.pdf">NS for Beginners</a> (pdf)</li>
<li><a href="http://isi.edu/nsnam/ns/ns-problems.html">Common NS2 Installation Problems</a></li>
<li><a href="http://nsnam.isi.edu/nsnam/index.php/Contributed_Code#Wireless_and_Mobility">NS2 Wireless and Mobility Modules</a></li>
<li><a href="http://www.nabble.com/Network-Simulator-ns-2-f15582.html">NS2 Mailing Lists</a></li>
<li><a href="http://dsn.tm.uni-karlsruhe.de/english/Overhaul_NS-2.php">NS2.33 Wireless MAC and PHY improvements</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/feed/</wfw:commentRss>
		<slash:comments>101</slash:comments>
		</item>
		<item>
		<title>Fair Scheduling &amp; Load Balancing in WMN</title>
		<link>http://www.jasonernst.com/2008/05/28/fair-scheduling-load-balancing-in-wmn/</link>
		<comments>http://www.jasonernst.com/2008/05/28/fair-scheduling-load-balancing-in-wmn/#comments</comments>
		<pubDate>Wed, 28 May 2008 16:42:43 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[Balancing]]></category>
		<category><![CDATA[Fair]]></category>
		<category><![CDATA[Load]]></category>
		<category><![CDATA[Mesh]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Scheduling]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://jasonernst.com/?p=26</guid>
		<description><![CDATA[My research is becoming more focused as of late towards the area of fair scheduling and load balancing in Wireless Mesh Networks. Earlier this week I gave a talk in our wireless research group at Guelph on WMN: Fair Scheduling and Load Balancing which I will make available at the bottom of the post. The [...]]]></description>
			<content:encoded><![CDATA[<p>My research is becoming more focused as of late towards the area of fair scheduling and load balancing in Wireless Mesh Networks. Earlier this week I gave a talk in our wireless research group at Guelph on WMN: Fair Scheduling and Load Balancing which I will make available at the bottom of the post. </p>
<p>The presentation gave a background on why load balancing and scheduling are important in WMNs. Additionally a survey on the current problems that I find interesting in the area was presented. In case you don&#8217;t want to get the presentation / you don&#8217;t have MS Office here are the main points from the presentation:</p>
<p><span id="more-26"></span></p>
<h4>Why is Fair Scheduling Important in WMN:</h4>
<ul class="list">
<li>Starvation &amp; Unequal Quality of Service (Qos) caused by &#8220;greedy&#8221; flows or proximity from Gateways which allow other traffic to be ignored or serviced unequally</li>
<li>In commercial applications of WMNs customers pay equal amounts and expect equal service</li>
<li>In many solutions that exist today, we cannot have Fairness and Throughput at the same time</li>
</ul>
<div class="image" style="float:right;"><a href="http://jasonernst.com/wp-content/uploads/2008/05/figure1.jpg"><img src="http://jasonernst.com/wp-content/uploads/2008/05/figure1-300x228.jpg" title="Example of a Wireless Mesh Network : netdts.com"  alt="Example of a Wireless Mesh Network : netdts.com" width="300" height="228" /></a>
<p>Example of a Wireless Mesh Network : netdts.com</p>
</div>
<h4>Why is Load Balancing Important in WMN:</h4>
<ul class="list">
<li>Multiple path redundancy is an important trait of WMN however instead of traffic being spread around the multiple links, often the same links become overused and congested while other links are barely used</li>
<li>Load Balancing tries to solve this problem using at Mesh Routers, Gateways, and sometimes Links to attempt to spread the traffic around the network (although some papers claim that Load Balancing on the links isn&#8217;t effective)</li>
</ul>
<h4>Current Problems in Fair Scheduling and Load Balancing in WMN:</h4>
<ul class="list">
<li>Assumptions in some papers: single hop networks only, limited or no mobility (of the Mesh Routers), fixed topology (Mesh Routers cannot be added or removed and the topology is known at all times)</li>
<li>Some papers assume that uplink and downlink scheduling can be treated the same when it may be beneficial to treat them independently</li>
<li>Distributed Vs Centralized Scheduling &amp; Load Balancing</li>
<li>Future work on many papers cite experimentation with different metrics, optimal locations and number of gateways etc.</li>
<li>Thorough investigation of load balancing at the gateways, links or mesh routers</li>
</ul>
<p>If after all this you would still like the presentation, you can download it from the link below:</p>
<h4>Download:</h4>
<p><a href="http://jasonernst.com/wp-content/uploads/2008/05/fair-scheduling-load-balancing.ppt">Fair Scheduling and Load Balancing in Wireless Mesh Networks by Jason Ernst. May 26th 2008.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2008/05/28/fair-scheduling-load-balancing-in-wmn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java Discrete Event Driven Simulation</title>
		<link>http://www.jasonernst.com/2008/04/14/java-discrete-event-driven-simulation/</link>
		<comments>http://www.jasonernst.com/2008/04/14/java-discrete-event-driven-simulation/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 16:27:21 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[Discrete]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://jasonernst.com/?p=13</guid>
		<description><![CDATA[Recently in my Networks course at Guelph they had us create an event-driven discrete simulation to model both a wireless network and a switch. For the project I got a hexagonal geometry for the wireless network which was to be arranged similar to a Manhattan Street Network with each node having at most six neighbours. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Recently in my Networks course at Guelph they had us create an event-driven discrete simulation to model both a wireless network and a switch. For the project I got a hexagonal geometry for the wireless network which was to be arranged similar to a Manhattan Street Network with each node having at most six neighbours. Other groups got triangular and square geometries for this portion.  For the switch I got an 8&#215;8 <a href="http://www.laynetworks.com/Banyan%20Switch.htm">Banyan switch</a>. Other groups got the crossbar switch or backplane switches.</p>
<p><span id="more-13"></span></p>
<p><a href="http://jasonernst.com/wp-content/uploads/2008/04/hexagonal.gif"></a></p>
<p style="text-align: center;"><img class="alignnone size-medium wp-image-16" title="hexagonal" src="http://jasonernst.com/wp-content/uploads/2008/04/hexagonal-300x282.gif" alt="Hexagonal Wirless Network" width="300" height="282" /></p>
<p style="text-align: left;">The first run of the simulation was terrible. There were problems with the timing in the simulation and nodes which were supposed to be holding packets in them towards the end of the simulation were actually blocking traffic right at the start causing an extremely high proportion of packets to be dropped.  In revision two the problems were fixed and the results were so well done that the prof accused us of doctoring them.</p>
<p style="text-align: left;">So basically, I thought I would post the code online in case anyone would like to make use of it.  Right now the simulation does not take into account such factors as interference and is fairly simplistic however it is good for testing different network geometries and routing algorithms within them. It could easily be extended to include more complicated factors such as interference however it was not necessary at the time of the project. If you are making use of the code please leave a reference to my name in it.  If you have any questions or would like some help getting it to work feel free to contact me.</p>
<p style="text-align: left;">For those who are interested here are some of the results from the simulations:</p>
<p style="text-align: center;"><a href="http://jasonernst.com/wp-content/uploads/2008/04/banyan-results.jpg"><img style="vertical-align: middle; border: 0;" src="http://jasonernst.com/wp-content/uploads/2008/04/banyan-results-231x300.jpg" alt="" width="231" height="300" /></a> <a href="http://jasonernst.com/wp-content/uploads/2008/04/hexagonal-results.jpg"><img style="vertical-align: middle; border: 0;" src="http://jasonernst.com/wp-content/uploads/2008/04/hexagonal-results-231x300.jpg" alt="" width="231" height="300" /></a></p>
<p style="text-align: left;">And for those who would like the code here are the links:</p>
<ul>
<li><a href="http://jasonernst.com/wp-content/uploads/2008/04/Project%201.tar.gz">Wireless Hexagonal Network Simulation</a></li>
<li><a href="http://jasonernst.com/wp-content/uploads/2008/04/Project%202.tar.gz">Banyan Switch Simulation</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2008/04/14/java-discrete-event-driven-simulation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customized Reconfigureable Interconnection Network (CRIN) Paper</title>
		<link>http://www.jasonernst.com/2008/03/08/customized-reconfigureable-interconnection-network-crin-paper/</link>
		<comments>http://www.jasonernst.com/2008/03/08/customized-reconfigureable-interconnection-network-crin-paper/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 19:02:58 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[CRIN]]></category>
		<category><![CDATA[Customized]]></category>
		<category><![CDATA[Hongbing Fan]]></category>
		<category><![CDATA[Interconnection]]></category>
		<category><![CDATA[Jason B. Ernst]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Paper]]></category>
		<category><![CDATA[Progress]]></category>
		<category><![CDATA[Reconfigurable]]></category>

		<guid isPermaLink="false">http://jasonernst.com/?p=5</guid>
		<description><![CDATA[Recently, I have begun working on a new research project dealing with some graph theory with Dr. Hongbing Fan at Wilfrid Laurier University. As the title suggests the problem works with customized reconfigurable interconnection networks (CRINs). Dr. Fan has proposed an algorithm which attempts to minimize the connections within a network based on a set [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I have begun working on a new research project dealing with some graph theory with <a href="http://physcomp1.wlu.ca/~hfan/">Dr. Hongbing Fan</a> at Wilfrid Laurier University.  As the title suggests the problem works with customized reconfigurable interconnection networks (CRINs).  Dr. Fan has proposed an algorithm which attempts to minimize the connections within a network based on a set of routing requirements.</p>
<p style="text-align: center"><a href="http://jasonernst.com/wp-content/uploads/2008/03/interconnection-graph.gif"><img src="http://jasonernst.com/wp-content/uploads/2008/03/interconnection-graph.thumbnail.gif" alt="This is an example of an Interconnection Graph Problem" /></a></p>
<p align="center">An example Interconnection Graph Problem, Click to Enlarge</p>
<p>Since December of 2007 I have been working at implementing, testing and experimenting the algorithm as well as providing feedback and new ideas for improvements.  The paper is almost ready to be submitted for publication this so hopefully I will be able to provide a link to it in the future.</p>
<p>In relation with my thesis, I am planning on making use of the CRIN algorithm to attempt to optimize wireless network protocols. There still needs to be some experimentation and research to determine if in fact the algorithm can be used in this way however I feel optimistic that this is the case.</p>
<p>There is also the potential that the source code for the CRIN implementation may be made open source and released for use by anyone. If this is the case it will be uploaded to this site in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2008/03/08/customized-reconfigureable-interconnection-network-crin-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
