Friday, 27 February 2015

Meaureable,Reilable,Adaptable, Fair Flexible Solution to Bufferbloat Problem



Introduction
Transmission Control Protocol is the Internet’s most widely used transport control protocol. TCP provides applications like FTP, Telnet etc. with a connection oriented, and reliable byte stream service on top of the Internet Protocol (IP). When a process communicates with another using TCP as the underlying transport mechanism, the sending process sends a SYN packet to which the receiving process replies with its SYN-ACK and the sender replies with an ACK. Once this three way handshake is negotiated, the connection is established and data transmission can begin. When all the data is sent, the client and the server exchange FIN and ACK in both directions and terminate the connection. Each byte of data that is sent by a client is assigned a sequence number, unique to that session. The server acknowledges receipt of each byte of the data using ACK segments. Acknowledgements of TCP are cumulative; an ACK confirms the successful receipt of all the data bytes up to (but not including) the acknowledged sequence number. Normally, TCP does not acknowledge each and every byte received individually, nor does it send ACK packets every time it receives data. It waits for a certain amount of time. During this period, if more data segments arrives, these segments are acknowledged together at once (“delayed acknowledgment”) or if a data segment has to be sent, the acknowledgment is ‘piggy backed” along with the data packet. The major control mechanisms of TCP are its congestion avoidance and congestion control mechanism. They are discussed in detail below:
·         Slow Start
Before TCP can send data at a fast rate, it needs to estimate the bandwidth available. If this is not done, the throughput of the TCP connection will drastically decrease, as the intermediate routers would have to queue or even drop the packets for want of buffer space. The slow start mechanism adds a new parameter that controls the rate at which packets are sent, congestion window denoted by cwnd. When a new TCP connection is established, the initial value of cwnd is set to a value less than or equal to 2*Maximum Segment Size (MSS), but not greater than two segments [15]. Every time an ACK segment is received, the cwnd   is increased by one segment. Thus, when an ACK arrives that acknowledges the first packet, the cwnd  is increased to two and two data segments are sent. When ACKs for these two segments arrives, the       cwnd is increased to four. This process thus provides an exponential increase to the cwnd parameter. At any point, the TCP sender can send up to the minimum of receiver’s advertised window and its own value of cwnd. TCP remains in this exponentially increasing slow start phase as long as cwnd value is less than or equal to “slow start threshold”, ssthresh (some implementations use just the “less than” condition).

Saturday, 14 February 2015

best blogs of NS2


http://naveenshanmugam.blogspot.in/

http://karthicksivakrr.blogspot.in/

http://ns2blogger.blogspot.in/

Friday, 13 February 2015

Network Simulator 2: a Simulation Tool for Linux

The ARIES (Advanced Research on Internet E-Servers) Project started in 2000 as part of the Open Systems Lab research activities at the Ericsson Corporate Unit of Research. Initially, the project aimed to find and prototype the necessary technology to prove the feasibility of an internet server that had the guaranteed availability, response time and scalability using Linux and open-source software. The project was successful, and it continued in 2001 to focus on enhancing the clustering capabilities of Linux to be the operating system of choice for the Mobile Internet servers. Many enhancements were added in the areas of load balancing, traffic distribution and security, in addition to IPv6 support.
One interesting question that came up was what is the impact of supporting IPv6 on other protocols used by different applications on our Linux clusters? To answer this question, we started a study investigating the effects of IPv6 support on other protocols, such as SCTP. Part of the study is to test applications in SCTP over IPv6. However, we did not have the time and resources to set up a lab with multiple nodes and applications that use SCTP over IPv6. Instead, we chose the next best solution, network simulation.
There is a growing recognition within different internet communities of the importance of simulation tools that help design and test new internet protocols. New services and protocols present challenges for testing. For instance, quality of service and multicast delivery require large and complex environments. Protocol designers recognize the advantages of simulation when computing resources are not available or are too expensive to duplicate a real lab setup. With simulation, you can do large-scale tests that are controlled and reproducible. This was exactly what we needed to build our case scenarios; the search started primarily for an open-source tool because most of our work targets the deployment of open-source software based on Linux.
Our target application is a real-time network simulation tool that we can use to define the different scenarios. A very interesting open-source tool we came across was Network Simulator 2 (NS2), which was developed by the Information Sciences Institute at the University of Southern California.
In this article, we summarize how to install and configure NS2 and look at two different simulation scenarios. The first scenario involves monitoring SCTP traffic between two nodes, and the second scenario looks at the behavior of web traffic and web applications over TCP over a six-node network.
The Tool: Network Simulator 2
NS2 is an open-source simulation tool that runs on Linux. It is a discreet event simulator targeted at networking research and provides substantial support for simulation of routing, multicast protocols and IP protocols, such as UDP, TCP, RTP and SRM over wired and wireless (local and satellite) networks. It has many advantages that make it a useful tool, such as support for multiple protocols and the capability of graphically detailing network traffic. Additionally, NS2 supports several algorithms in routing and queuing. LAN routing and broadcasts are part of routing algorithms. Queuing algorithms include fair queuing, deficit round-robin and FIFO.
NS2 started as a variant of the REAL network simulator in 1989 (see Resources). REAL is a network simulator originally intended for studying the dynamic behavior of flow and congestion control schemes in packet-switched data networks.
Currently NS2 development by VINT group is supported through Defense Advanced Research Projects Agency (DARPA) with SAMAN and through NSF with CONSER, both in collaboration with other researchers including ACIRI (see Resources). NS2 is available on several platforms such as FreeBSD, Linux, SunOS and Solaris. NS2 also builds and runs under Windows.
Simple scenarios should run on any reasonable machine; however, very large scenarios benefit from large amounts of memory. Additionally, NS2 requires the following packages to run: Tcl release 8.3.2, Tk release 8.3.2, OTcl release 1.0a7 and TclCL release 1.0b11.
Installation and Configuration
The process of installing NS2 is straightforward yet lengthy. At the time of writing, the most recent version was 2.1b8. We are interested in the "all-in-one" package because it includes the source code that we want to patch in SCTP support.
You can download the all-in-one package from the NS2 home page (see Resources) into /usr/src and extract it as follows:
cd /usr/src
tar xzvf ns-allinone-2.1b8.tar.gz
cd ns-allinone-2.1b8
Because we want to examine a case scenario involving SCTP, we need to apply the SCTP patch to NS2 from the University of Delaware. The patch is available for the NS2 all-in-one 2.1b8 version and can be downloaded from the Protocol Engineering Lab home page (see Resources). With the Linux patch utility, you can update the NS2 source code to include support for SCTP by applying the patch:
patch -p0 < ns-allinone-2.1b8.sctp-rel2.2_patch_orig
In the same directory, there is a script named install that will configure, compile and install the required and optional NS2 components. There is no interaction with the user while installing; the script is completely automated. You must execute the script as superuser so that installation of binaries will be completed:
./install
When the installation process is complete, the following message will appear on your shell
Please put
$CUR_PATH/bin:$CUR_PATH/tcl$TCLVER/unix:$CUR_PATH/
tk$TKVER/unix into your PATH environment; so that
you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES: [...]
Carefully follow all instructions given in the notices. The above-mentioned variables can be updated either by editing /etc/profile or changing environment variables directly. In case you updated /etc/profile, you need to source your new environment for the changes to take effect (i.e., source /etc/profile).
The NS2 validation suite will verify that all protocols are functional. This will fail if the install process was not completed; however, running validation is optional, and it consumes twice as much time as the compilation and installation process.
To run the validation suite:
cd ./ns-2.1b8
./validate