On the 31st of May, Uptrennd will stop its services and merge into Trodl.com. More information can be found here: https://www.uptrennd.com/post-detail/the-evolution-of-uptrennd-trodl~ODkxMzMw
Droptail Simulation and Random Early Detection in Network Simulator 3


This is my English translated undergraduate assignment for my Telecommunication Queuing System course in the Department of Electrical Engineering, Faculty of Engineering, Udayana University. This task has never been published anywhere and I, as the author and copyright holder, license this assignment as customized CC-BY-SA where anyone can share, copy, republish, and sell it provided that my name is written as the original author and notify that the original and open version available here.

Chapter 1 Introduction

1.1 Background

The queue theory is a theory in which customers must queue to get service from the waiter. Queuing theory aims to regulate the level of service with customer arrival data. In queuing theory there are ways to set the right level of service, the level of waiters busyness, how long a customer has to wait, how many customers are in the queue, how big is the waiting room to be prepared, and so on. In the real world, a service cannot be separated from the queue, including services on the data network. To simulate queues on data networks, there are many software such as Network Simulator, which has now developed into NS3 (Network Simulator 3). In NS3 the queue can be set manually, but there are 2 types of queues that have been made, namely Droptail and RED (Random Early Detection) Queue. There are examples made by Marcos Talau and Duy Nguyen. In this paper we will simulate REDQueue on a simple point-to-point computer network.


How is the REDQueue simulation provided by Marcos Talau and Duy Nguyen?


To simulate REDQueue by Marcos Talau and Duy Nguyen on NS3.

1.4 Benefit

  1. Get an overview of the REDQueue queue simulation.

  2. Can implement queue simulation by yourself.

1.5 Scope and Limitation

  1. Using point-to-point IPv4 networks.

  2. On a 10Mbps network.

  3. Using the Linux version of the NS3 simulator.

  4. Uses Droptail and REDQueue provided on NS3.

Chapter 2 Literature Review

2.1 Queue

A simple queue model can be seen as follows:

preview not available
Figure 2.1 Simple queuing model

Figure 2.1 shows the arrival of the customer λ in erlang units, the system provides a maximum waiting room w with each customer having a waiting time of Tw, and there is a waiter s with service time Ts where the level of activity is p. Tr is the average time a customer waits in the system, and r is the number of customers in the system. For calculations, see the following image (Stalling, 1998):

preview not available
Figure 2.2 Calculation of the basic queue
preview not available
Figure 2.3 Calculation of 3 types of queues

2.2 Droptail and RED (Random Early Detection) Queue

Droptail uses a basic queue, namely FIFO (first in first out) by discarding packets when the buffer at the node is full, while Random Early Detection instructs a connection to slow down before the buffer is full. The aim of RED is congestion avoidance to avoid congestion rather than to overcome, global synchronization avoidance, avoidance of bias against bursty traffic, and bound on average queue length to maintain the average queue length so that it maintains the average delay. In general, the algorithm from RED is that the average queue length is less than the minimum limit, so the packet will be queued. If the average queue length is between the minimum and maximum limits, there will be a probability of discarding the package. If it is above the maximum, the package will be discarded (Stallings, 1998).

2.3 Network Simulator 3

ns-3 is a discrete event network simulator, targeted primarily for research and educational use. ns-3 is free software, licensed under the GNU GPLv2 license, and the public for research, development and use (ns3-project, 2012).

Chapter 3 Experimental Method

3.1 Place and Time of Experiment

The experiment was carried out at home on May 30, 2013.

3.2 Tools

NO Tools Specification
Table 3.1 Tools used
1 ACER Laptop Intel® Pentium® dual – core processor T4200 (2.0 GHz, 800 MHz FSB, 1 MB L2 cache) Mobile Intel® Graphics Media Accelerator 4500MHD 1GB DDR2 128 WXGA Acer CrystalBriteTM LCD 250GB HDD Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet Controller Atheros Communications Inc. AR928X Wireless Network Adapter Operating System Linux Backtrack 5 R3
2 Software NS3 (Network Simulator 3)

3.3 Program

The first program takes an example from John Abraham, namely the comparison of Droptail with RED. The second program is about REDQueue by Marcos Talau and Duy Nguyen.

The source codes cannot be posted on this platform, please go down and try other mirrors.

Chapter 4 Discussion

4.1 Droptail and RED comparison simulation

It can be seen in Figure 4.1 and Figure 4.2 that according to Stallings, 1998, the droptail node will wait until the queue capacity is full before dumping it, so that a large decrease in speed is seen, which is around 300 Kbps at full time.

preview not available
Figure 4.1 Droptail Simulation

Meanwhile, in RED there is a preventive effort so that the capacity will not be full so disposal occurs before full capacity. Disposal of packages occurs based on the potential for excess capacity. So that you can see a gradual decrease in speed but not as big as in Droptail, which is around 50 Kbps.

preview not available
Figure 4.2 RED Simulation

4.2 RED simulation on simple topology

First, initialization occurs, namely adjustment with a very large decrease in speed, which is around 1000 Kbps.

preview not available
Figure 4.3 Detailed RED Simulation 1

After that, it can be seen in Figure 4.4 that the node tries to keep the capacity from exceeding 25,000 packages by gradually decreasing the speed. In the figure after Figure 4.4 the node decreases speed gradually in terms of the potential for full capacity. According to Stallings, 1998, REDQueue's work is that packets will queue if the average queue capacity does not exceed the minimum limit specified by RED. If the average queue capacity is between the minimum and the maximum limits then disposal occurs based on the probability that full capacity will occur. If the average queue capacity exceeds the maximum limit, a package discard will occur. It can be seen in the next result according to the theory.

preview not available
Figure 4.4 Detailed RED Simulation 2
preview not available
Figure 4.5 Detailed RED Simulation 3
preview not available
Figure 4.6 Detailed RED Simulation 4
preview not available
Figure 4.7 Detailed RED Simulation 5

Chapter 5 Closing

5.1 Conclusion

Network Simulator 3 can simulate REDQueue and display animation so it's easier to observe. While this simple queue simulation is in accordance with the theory where the animation shows packet dumping in the droptail when the traffic exceeds the capacity which could potentially be negative on the system, whereas in random early detection (RED) the animation shows packet dumping before the traffic exceeds capacity which can reduce the negative potential on the system.

5.2 Future Work

This simulation is just a simple experiment. Actually Network Simulator is made to simulate more complicated experiments.


  • Ns3-project. 2012. http://www.nsnam.org. Access 27 Mei 2013.

  • Stallings, W. 1998. High-Speed Networks. Prentice-Hall,inc : New Jersey.








Engage with all topics about Computers!


Bitcoin Cash

29898 subscribers


28821 subscribers

Cryptocurrency Mining

28133 subscribers

Trading & TA

25350 subscribers


20123 subscribers

Uptrennd Optimization

16973 subscribers

© 2021 UpTrennd.com