Showing posts with label adhoc. Show all posts
Showing posts with label adhoc. Show all posts

Apr 8, 2010

Adapting BitTorrent to wireless ad hoc networks

By : Mohamed Karim Sbai, Chadi Barakat, Jaeyoung Choi,

Anwar AlHamra and Thierry Turletti


Abstract:

BitTorrent is one of the Internet's most efficient content distribution protocols. It is known to perform very well over the wired Internet where end-to-end performance is almost guaranteed. However, in wireless ad hoc networks, many constraints appear as the scarcity of resources and their shared nature, which make running BitTorrent with its default configuration not lead to best performances. To these constraints it adds the fact that peers are both routers and end-users and that TCP-performance drops seriously with the number of hops. We show in this work that the neighbor selection mechanism in BitTorrent plays an important role in determining the performance of the protocol when deployed over a wireless ad hoc network. It is no longer efficient to choose and treat with peers independently of their location. A first solution is to limit the scope of the neighborhood. In this case, TCP connections are fast but there is no more diversity of pieces in the network: pieces propagate in a unique direction from the seed to distant peers. This prohibits peers from reciprocating data and leads to low sharing ratios and suboptimal utilization of network resources. To recover from these impairments, we propose an enhancement to BitTorrent which aims to minimize the time to download the content and at the same time to enforce cooperation among peers. Our solution considers a restricted neighborhood to reduce routing overhead and to improve throughput, while establishing few connections to remote peers to improve diversity of pieces. With the help of extensive NS-2 simulations, we show that these enhancements to BitTorrent significantly improve the file completion time while fully profiting from the incentives implemented in BitTorrent to enforce fair sharing.

Paper:

Mohamed Karim Sbai, Chadi Barakat, Jaeyoung Choi, Anwar Al Hamra, Thierry Turletti, "Adapting BitTorrent to wireless ad hoc networks" to appear in proceedings of 7th International conference on ad hoc networks and wireless 2008 (AD-HOC NOW), Sophia Antipolis, France, September 2008. download

NS-2 Simulator code and scripts:

Click here to download code.

May 2, 2007

The Design and Implementation of WiMAX Module for ns-2 Simulator

The Network Simulator 2 (ns-2) is a popular and powerful simulation tool for the simulation of packet-switched networks, which provides substantial support for simulation of TCP, routing, and MAC protocols over wired and wireless networks, such as wireless LANs, mobile ad hoc networks (MANETs), and satellite communications, etc, and is widely used in both academia and industry. Although many protocol modules have been implemented in the ns-2, the IEEE 802.16 broadband wireless access networks (BWANs) or WiMAX module has not been contributed yet. Thus, in this paper, we present our detailed design and implementation of the WiMAX module based on the IEEE 802.16 standard with the point-to-multipoint (PMP) mode for the ns-2. The implemented module comprises fundamental functions of the service-specific convergence sublayer (CS), the MAC common part sublayer (CPS), and the PHY layer. A simple call admission control (CAC) mechanism and the scheduler are also included in this module.



Installation

To install the patch, follow the instructions below:

  1. Download the software cygwin and ns-allinone-2.29.3 package.(refer to this website on how to setup cygwin + ns-2)
  2. Download the latest ns-2 WiMAX module source code.
  3. Decompress the ns-2 WiMAX module source code file which including three files : 802_16、common and queue.
  4. Put the 802_16 into c:\cigwin\home\"your_account"\ns-allinone-2.28\ns-2.28\mac.
  5. Move data for common and queue to c:\cigwin\home\"your_account"\ns-allinone-2.28\ns-2.28\common and queue respectively.
  6. Renew your Makefile .
  7. To compile your files by execute "make".


More info

tags :

Mar 29, 2006

Printing routing table in AODV

Here's an example for printing routing table in AODV



For more click here

Tags :

Mar 16, 2006

Exercise - Simulate Ad Hoc Network

General

The objective of this assignment is to get familiar with the network simulator tool (ns-2) and mobile wireless network environment. This study about ad hoc wireless network will be carried out by simulations using the ns-2 tool.
These simulations will be run using Sun workstations of the Birdland (Lintula). The results of the work will be reported in writing.

In this document there are first some are conceptual definitions, instructions for simulations, reporting, grading and returning the report. In the end of this document there are some facts related to implementation details and tips for those who find the required scripting problematic.

Using ns-2

"Ns is a discrete event simulator targeted at networking research. Ns provides
substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks." (http://www.isi.edu/nsnam/ns, 18.6.2004) ns-2 is an interpreter of OTcl language, which includes objects for simulating networks. Those objects are implemented using C++, but OTcl is an interface that can be used for calling methods of the objects.



The network topology, transmission and application agents
In the picture every circle represents a wireless mobile node. The network consists of TCP source node (n0) and destination node (n1) over an area size of 500m x 500m. Node (n0)uses Agent/TCP/Reno as the sending TCP agent and FTP traffic source. Node (n1) is the receivers of FTP transfers, and it uses Agent/TCPSink as its TCP-agent for the connection establishment.

The routing protocol used for the simulation scenario is ad hoc routing protocol Destination Sequenced Distance Vector (DSDV) and IEEE 802.11 MAC protocol. The targets of the simulation.

In this simulation you will study, the three different wireless network scenario;

  • TCP connection over two static nodes network.
    The ns-2 script file 2node_script.tcl (http://www.cs.tut.fi/kurssit/TLT-2756/assign.html) for this wireless network is provided. This creates the topology described earlier, runs the simulation for 150 seconds and shows the TCP window size in two static nodes scenario with DSDV routing protocol. Run the script and analyze the output graph for the given scenario.

  • TCP connection over 2-nodes (1 mobile and 1 static) network.
    Use the given script file and change the state of the node (n1) from static to mobile for this second scenario. At time 10 s, node (n1) starts moving towards the point (45, 285) at a speed 5 m/s. The syntax of movement command;

    $ns at
  • TCP connection over 3-nodes (2 mobile and 1 static) network.
    Use the given script file, add the static node (n2) and change the state of the nodes (n0 and n1) from static to mobile for this third scenario.

    At time 10 s, node (n1) starts moving towards the point (45, 285) at a speed 5 m/s.
    At time 25 s, node (n0) starts moving towards the point (250, 125) at a speed 7 m/s.

    Analyze the output graph and plot the TCP bandwidth (Mbps) for the given scenario.

    TCP Bandwidth Calculation

    This experiment shows the bandwidth distribution for the above scenario. First to plot the bandwidth, we need to trace the data corresponding to the events registered at the network into a file. The bandwidth graph can be plot using e.g. the xgraph-program, gnu plot, or you can import the values into Excel or Matlab from the trace file (create one for bw calculation) and use tools to draw the graph.

    Instructions for scripting

    Create a trace file and the procedure for calculating bandwidth. The general form of the procedure for bandwidth calculation in tcl programming is

    proc {} {
    global
    # Bytes received by the traffic sinks
    set bw [$sink set bytes_]
    # calculates the bandwidth (in MBit/s) and writes it to the file puts $ "$now [expr $bw/$time*8/1000000]"
    }

    After the simulation, ns outputs the TCP window size xgraph and writes a trace files named output.tr for xgraph and out.nam automatically launches the nam animator, which is an X-windows based graphical software that animates the traffic based on the traces in the out.nam file.

    Similarly, the bandwidth graph can be plot using e.g. the xgraph-program, gnu plot, or you can import the values into Excel or Matlab from the trace file (create one for bw calculation) and use tools to draw the graph.

    Reporting

    Write a compact (1-2 pages) description of the scenarios based on ad hoc network. In that you may use the text, images and formulas of these instructions. Next you should present the graph describing the behavior of TCP window size for different networks and the TCP bandwidth distribution for the third scenario. The results must be analyzed compared and commented.

  •