Professional Documents
Culture Documents
QoS Experiment PDF
QoS Experiment PDF
This experiment provides experience in how to apply and simulate QoS mechanisms in
communication networks by means of NS2. We focus on RSVP in this experiment.
1.1.
An RSVP link between two nodes, node_1 and node_2 is created with the following Tcl
command:
ns duplex-rsvp-link <node_1> <node_2> <bw> <delay> <reservable> <rsvp> <queue>
<adc> <est>
where:
rsvp stands for the bandwidth (bits per second) reserved for RSVP control messages. If
this value is set to zero, all RSVP control messages will be transmitted as best effort
packets. Otherwise, a WFQ class with the specified bandwidth will be reserved for RSVP
control messages to avoid control messages loss.
queue is the size of the queue (in bytes) assigned to serve best-effort packets.
adc determines the used admission control algorithm. There are currently five admission
control algorithms implemented [2], namely Parameter-based Simple Sum algorithm
(Param), Measured Sum (MS), Hoeffding Bounds (HB), Acceptance Region-Tangent at
Origin (ACTO) and Acceptance Region-Tangent at Peak (ACTP).
Example: $ns duplex-rsvp-link $a $b 1Mb 10ms 0.5 100 50000 Param Null
1.2.
The following creates an RSVP-agent named rsvpagent and adds it to the node node_1.
set rsvpagent [$node_1 add-rsvp-agent]
Another way to add the rsvpagent to the node node_1 is the following:
$node_1 add-rsvp-agent
1.3.
TCL Commands
Create a session:
Release a session:
Reserve bandwidth
<rsvp-agent> sessions
2.1.
2.2.
2.3.
The following task aims at analyzing how best effort traffic affects RSVP session. For this
purpose, do the following:
1. Build a normal UDP session with a CBR source sending 500 bytes packets each 5 ms
between both nodes 1 and 4.
2. Change the rate of the normal UDP session and notice how this affects the sending
rate as well as the bandwidth loss of RSVP session between 1 and 4.
3. TCL Script
# Create the scheduler and define the nam file and where the sending rates as well as
bandwidth loss will be stored.
set ns [new Simulator]
set nf [open out.nam w]
set ratef [open rate.tr]
set lossf [open loss.tr]
$ns namtrace-all $nf
# Define two colors, each will be used for an RSVP session
$ns color 1 Blue
$ns color 2 Red
# Create network nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]
# Write a procedure named "create_link" This procedure is used to create an RSVP
connection between two nodes, namely src_node and dst_node
proc create_link {src_node dst_node} {
global ns
set rate 1Mb
set delay 10ms
set reservable 0.9
set rsvp_rate 100
set bo_queue_size 5000
$ns duplex-rsvp-link $src_node $dst_node $rate $delay $reservable $rsvp_rate
$bo_queue_size Param Null;
}
# create RSVP connections between network nodes
create_link $n0 $n2
create_link $n1 $n2
create_link $n2 $n3
create_link $n3 $n4
4. References
[1]
[2]