Note
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.
1.2 Problem
How is the REDQueue simulation provided by Marcos Talau and Duy Nguyen?
1.3 Objective
To simulate REDQueue by Marcos Talau and Duy Nguyen on NS3.
1.4 Benefit
- Get an overview of the REDQueue queue simulation.
- Can implement queue simulation by yourself.
1.5 Scope and Limitation
- Using point-to-point IPv4 networks.
- On a 10Mbps network.
- Using the Linux version of the NS3 simulator.
- Uses Droptail and REDQueue provided on NS3.
Chapter 2 Literature Review
2.1 Queue
A simple queue model can be seen as follows:
![Gambar 2.1 Model antrean sederhana.png](https://images.hive.blog/DQmcbAbSiJjhZEHfZu5osrxr3bkCUdKejdu8DATqF2NWWEM/Gambar%202.1%20Model%20antrean%20sederhana.png)
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):
![Gambar 2.2 Perhitungan antrean dasar.png](https://images.hive.blog/DQmfEQRnTLMA7XxyfMyfmPDqvfoDdiGnHSWmhUkT97FYTHb/Gambar%202.2%20Perhitungan%20antrean%20dasar.png)
Figure 2.2 Calculation of the basic queue
![Gambar 2.3 Perhitungan 3 jenis antrean.png](https://images.hive.blog/DQmcynVUvLrUsifH7qYqirt7T9cejdFGeCMvgVy4ja1E9BL/Gambar%202.3%20Perhitungan%203%20jenis%20antrean.png)
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.
Table 3.1 Tools used
NO |
Tools |
Specification |
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.
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: John Abraham <john.abraham@gatech.edu>
*
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/point-to-point-layout-module.h"
#include
#include
#include