You are on page 1of 3

Department of Electronics & Communication Engineering

National Institute of Technology Calicut


EC 3023 Computer Networks
Assignment 1

Prerequisite: Assignment Preliminaries

I. Create a LAN based on 802.3 (CSMA/CD), which is the name of the MAC
standard for Ethernet. It takes as inputs the number of nodes that will be part
of the LAN and a seed for the random number generator. Each node in the
LAN generates CBR traffic at the rate of 100kbps and the one way link
delay is 2 ms. Every node uses IPv4 at the Internet layer. The application
layer uses UDP echo application where the echo messages are generated at
different data generation rate. There should be one UDP flow between the
nodes.
A. Answer the following questions considering 4 nodes.
1. What are the total numbers of packets (P) successfully received by the
receiver?
2. What are the total number of packets dropped (at different senders) during
the simulation? Why are these packets dropped? What is the average packet
drop percentage at a sender?
3. What is the system throughput and efficiency? System throughput is defined
as the total number of bits successfully received (P * packet size * 8) divided
by the simulation duration. System efficiency is the ratio of system
throughput by the data rate of the LAN. Express system efficiency as a
percentage. Why is the system efficiency not 100%?
4. What are the individual throughputs of nodes? Check that the sum of
individual throughputs sums to the system throughput calculated in (3).
5. Trace the collision profile for the first generated by nodes. In other words,
what is the time at which these packets got generated? When did they get
transmitted? Did they collide? If so, who won the collision etc....?

B. Throughput, Efficiency and Packet Drops

1. Vary the number of nodes from 1 to 20. (You will need to automate this
process using a for loop in bash.)
2. For each run, calculate the system efficiency, system throughput and total
drops and plots system throughput, system efficiency, total drops as a
function of number of nodes. (For plotting, you can use “gnuplot” or
whichever you are comfortable with.

C. Faireness

1. Run the experiment by setting the number of nodes as 20. For this run,
calculate the individual throughputs for each of the individual nodes i.e. 1, 2,
3......20 and plot the individual node throughputs.
2. Use the Jain's fairness index (http://en.wikipedia.org/wiki/Fairness_measure)
to comment on the fairness of Ethernet.

II. Repeat experiment I by implementing p-persistent CSMA with exponential


back off by making changes to the source code for p = 0.1, 0.5, 0.9.

Note:

1. To model link layer dynamics like channel error, external interference etc.,
network simulators use pseudorandom generators. This pseudorandom
generator is governed by a seed value. Please look into the following
document to know more about random generators and seed values:
http://www.nsnam.org/doxygen/classns3_1_1_rng_seed_manager.html

2. In this experiment, you have to use random seed generators to make the
simulation more realistic. For this purpose, you have to execute every
scenario with 10 different seed values and take the average and the standard
deviation of the performance metric. The standard deviation is also called
the confidence interval that tells you how much the performance results can
deviate in different channel conditions. Note that one good choice for the
seed value is the system time in milliseconds. So every time you execute the
script, the system time will change and give you a different seed value.

In summary, your task will be to do the following:

a. For a particular number of nodes, compute performance parameters for 10


different seed values and take the average with standard deviation
(confidence interval).
b. Plot the results for different number of nodes along with the confidence
interval.
Submission guidelines:

1. You need to do this experiment in a group of two.


2. Answers to the questions for Part A need to be documented. No need
to repeat Part A for experiment II.
3. The Part B for experiment I and II to be submitted as separate graphs
for the three parameters.
4. The Part C for experiment I and II to be submitted as a table.
5. The .cc file along with script needs to be submitted.
6. The above documents shall be submitted during class evaluation of
the Assignment I.

You might also like