• HOWTO: Getting started with ns-3-click - Part I

    Since its development, I've been seeing a lot of requests for an ns-3-click 101. So with no further ado, here's the first in a series of tutorials to help you get an idea of how to go about using ns-3-click. In this article, I'll provide an idea of what ns-3-click is and how to install it .

    1. What is ns-3-click?

    ns-3-click, or the NS-3 Click Integration, is a feature of the ns-3 tool which allows a user to use a Click Modular Router instance to handle an ns-3 node's layer 3 functionality. Click is an architecture for designing highly flexible router configurations. Basically, it offers a large number of fine grained packet processing units called "elements", which can be put connected in various combinations into a Click graph. A Click graph defines a particular configuration for a router. The motivation for bringing Click into ns-3 is simple. Click users get to test their Click graphs in a powerful simulation environment which ns-3 offers, and ns-3 benefits from the large feature set that Click brings with it in the form of elements. In ns-3-click, the design choice was to entirely delegate ns-3's layer 3 functionality to Click. This means that an ns-3 node running a Click router will now have to use Click's implementations of ARP, routing tables and so forth.

    So before you get started with ns-3-click, I suggest going through [0] and [1]. The first paper should tell you everything you need to know about what Click is, and the second one will inform you about where Click fits into ns-3. The latter will help you understand what ns-3-click can or cannot do for you.

    2. Installation

    By now, you know what ns-3-click is, and its time to get your hands dirty. The first step is to download and build Click.

    $: git clone git://read.cs.ucla.edu/git/click DIR

    $: cd DIR

    $: ./configure --enable-nsclick --enable-userlevel

    Note: If you require additional modules, enable them as required using the --enable-<module> flag.

    Now build Click:

    $: make

    Once this is complete, we need to build ns-3 and point it to the Click source we've just compiled. So let's proceed to fetch and build ns-3. Note that ns-3-click was merged post ns-3.10, and will be released with ns-3.11. It is currently available in ns-3-dev.

    $: hg clone http://code.nsnam.org/ns-3-dev

    $: cd ns-3-dev

    $: ./waf configure --with-nsclick=<path-to-click-source> --enable-examples

    Once the last command has finished executing, you should see a list of features/modules that have been enabled. At this point, you should see the following line:

    NS-3 Click Integration        : enabled

    Now, let's build ns-3:

    $: ./waf build

    If all goes well, ns-3 should now be built successfully. To test whether things went well, try running one of the example scripts.

    $: ./waf --run nsclick-simple-lan

    This should generate some PCAP traces (nsclick-simple-lan-*.pcap). If you see packets being exchanged in there, then you're good to go!

    This concludes part I of the ns-3-click tutorial. In the next part, I'll provide a code walk through of a simple example script that uses ns-3-click. If you find any bugs with ns-3-click, please don't hesitate to file a bug report on our bugzilla. :)

    References

    [0] Eddie Kohler, Robert Morris, Benjie Chen, John Jannotti, and M. Frans Kaashoek, "The Click Modular Router". ACM Transactions on Computer Systems 18(3), August 2000, pages 263-297. (Paper from the MIT-PDOS page)

    [1] Lalith Suresh P., Ruben Merz, ”NS-3-Click: Click Modular Router Integration for NS-3”. In Proc. of 3rd International ICST Workshop on NS-3 (WNS3), Barcelona, Spain. March, 2011. paper

  • NS-3 Summer of Code 2011: Results Announced!

    The wait is over, and we hereby announce the students selected for the NS-3 Summer of Code 2011 programme!
    • Ashwin Narayan with "Click-MAC extensions for ns-3-click". Mentored by Ruben Merz and myself.
    • Pankaj Gupta with "LTE-RRC extensions". Mentored by Giuseppe Piro and Francesco Capozzi.
    • Atishay Jain with "IPv6 Global Routing". Mentored by Tom Henderson and Mitch Watrous.
    Congratulations to all the students. Hoping to see a lot of good code come out of this effort and most importantly, some long term contributors to the ns-3 project itself. :)
  • Bavarian Vacation

    Say you're a Masters student studying distributed systems, and you just completed 3 major project checkpoints, and wrapped up some work with a research project. So what do you do during the Easter break that immediately follows the deadlines? You go on vacation of course! So I just got back from a wonderful four day holiday split across the dreamy fields of Schwangau and the Bavarian captial, Munich. Schwangau is a must see for anyone who wants to swim in a sea of breathtaking views and experience the European countryside. It is the home to the famous Neuschwanstein castle, which was the main inspiration for Disney's Sleeping Beauty's castle. The village of Schwangau itself lies under the protective watch of the Alps, running through the border between Germany and Austria. I stayed with a good friend of mine, and had a wonderful Bavarian Easter with her family, sharing stories of our cultures and lifestyles. On Easter Sunday itself, we went hiking up the Alps, and I'm still surprised that I made it alive at the end of a 3 hour ordeal. After years of not having any physical exercise of any form, this was indeed rather taxing, but I guess all the muscle strain was definitely worth the experience, the views, and most importantly, the satisfaction that followed taking a hard path up a 1.708km high mountain for your first ever hike. :) The latter half of the holiday involved a visit to old city of Munich. Culturally rich and with a Bavarian feel all over, it was a fun experience to walk through the city streets. One thing I found particularly funny was that the Maximilianeum building, which houses the Bavarian parliament, had no gates nor security guards on the outside, which is in absolute contrast to equivalent buildings back home in India, which can be aptly labelled mini fortresses. The last day of the visit was reserved for a trip around the Munich marketplace and of course, the one and only Allianz Arena, which I finally got the opportunity to visit as a long time Bayern Munich fan. :) As is always the case with my travels, cuisine formed an important component of the visit too. Thanks to Eva's help, I was able to compile a list of dishes/drinks I had: Apfelstrudel, Neuernberger Rostbratwuerste mit sauerkraut, Kaesspatzen, Leberkaes mit Kartoffelsalat und Spiegelei, Weisswuerst mit Suessem senf, Schweinsbraten mit Kartoffelknoedel, Schweinshaxen, Brezeln, Radler, Weissbier and Weizen. I particularly loved the German variety as far as beers are concerned. Radler from an altitude of 1.708km tastes heavenly by the way. I would have loved to stay a little longer, but as the saying goes, all good things must come to an end. Now back in Lisbon, I'm finding it a little hard to shake off the vacation mood and get back to my projects, but I think I'll pull that off sooner or later.
  • Paper review: Adaptive Offloading for Pervasive Computing

    My friend Marcus recently suggested a good idea to keep track of papers that we read by writing a publicly available review about the work. So here's the first in a series of such posts.

    Title: Adaptive Offloading for Pervasive Computing

    Authors: Xiaohui Gu and Klara Nahrstedt (UIUC), Alan Messer, Ira Greenberg, and Dejan Milojicic (HP Labs)

    Motivation: Certain applications have high memory requirements, and thus cannot be easily run on resource constrained devices like mobile devices which are an essential component of pervasive computing environments. In lieu of such constraints, the authors propose a scheme wherein the deployment of such applications on mobile devices is made possible by "offloading" objects in the code (the paper assumes an object oriented language like Java or C#) onto a network-nearby device, hereafter referred to as the surrogate. This needs to be achieved by keeping the application completely oblivious to what's happening underneath. The problem: when to trigger an offload, and which objects to offload. Assumptions in the paper: Object oriented languages need to be used. High speed wireless link required. Summary: The core of the work involves describing each Java program as a graph of classes called the Application Execution Graph (AEG). Classes are chosen as the basic unit for representing an application because: 1) Classes map directly to interactions in the system, 2) classes allow more precise/fine-grained decision making for the offloading process (while this line isn't explained clearly, I believe it has to do with the next point) 3) The said interactions are easier to represent with classes than with several thousand Java objects. The graph of classes is to be partitioned into two chunks, one of which will remain on the device, and will be locally referenced, whereas the remaining chunk will be offloaded onto another device called the surrogate, usually a desktop or some non-resource-constrained device. Objects on the surrogate will be referenced using remote object invocations. This partitioning will be transparent to the application itself. This means that the Java application would be completely oblivious to the physical locations of the objects that it's dealing with, but the underlying VM will perform this partitioning, and will use local or remote invocations as would be the case. The VM used for the work was HP's Chai JVM. The AEG has weights for the nodes, and the edges. Weights are assigned to the nodes based on the access frequency of the class, the memory size of an instance of the class, the current location of the object, and whether the object _has_ to be on the device (device specific classes like a touchscreen reader for instance, which make no sense on the surrogate). The last property is called the IsNative property. The partitioning of the AEG is performed using a min cut algorithm, using the weights described above as a parameter for deciding the cut itself. Since determining the min-cut of a graph is an NP-Complete problem, the algorithm produces several possible min cut partitions, and maintains a set of such partitions. In run-time, one of these partitions is picked, depending on what is felt to be most optimal, given the particulars of the constraints in that scenario. All classes which have the IsNative property set to true, are bound to the device and will _not_ be offloaded to the surrogate. The architecture of the proposed solution is decomposed into a form wherein resource constraints are expressed using Fuzzy Logic. The fuzzy values like "low" and "high" depend on the application itself. Each application can have its own rules for the partitioning of the AEG. Depending on the rules and the current status of resource availability (like bandwidth and memory), we can pick the appropriate partition of the AEG that was generated in the step above. The partitioning is performed in a timely manner such that this computation needn't be performed when an offload has to be initiated, and we already have a partition available when we hit the resource limit. The solution was evaluated in a real setting (for a change!) and tools like Dia, Biomer and Java Notes was run. I won't be elaborating much on the evaluation itself, as it is clearly explained in the paper. I don't consider it very strong, as it does not explore cases where bandwidth was constrained, but it's still better than some other evaluations out there. Weaknesses in the work: Surrogates cannot be migrated on the fly, and this restricts how _far_ the mobile client can stray away from the surrogate. Furthermore, hacking the VM to achieve this may impact portability of the code, but this is much better than having to re-write applications.
  • NSoC student application deadline is nearby!

    The NS-3 Summer of Code programme has received a good deal of interest from students so far, and I'm pretty excited to see what the final set of applications will look like. Anyhow, hurry up students, the deadline for NSoC is on the 15th of April, 2011 at 19:00 UTC! Visit the NSoC wiki to find information regarding the applying process. Meanwhile, we recommend that you discuss your proposals as much as possible on the ns-developers mailing list and with your potential mentors before you apply to keep your proposal focused and polished.