CS 349 Assignment – 4: Network Simulation Using ns-3 solution

$24.99

Category:

Description

5/5 - (3 votes)

In this assignment you need to simulate a computer network for a given application using the discrete event
network simulator ns-3. You can download the software and documentation of ns-3 from the website https://
www.nsnam.org.
The assignment will be solved in groups where each group, comprised of 3 members, needs to work on an
application assigned to it. The group membership information is given in this document. The applications’
network specifications, the required experiments, and related questions are also given in this document.
Follow the general instructions given below and any specific instructions mentioned in the application
description.
General Instructions:
1. Each group needs to simulate one application assigned to it and make one single submission on Moodle.
Only one member from a group needs to make the submission. The information about the allocation of
applications to groups is contained in Table 1 given below. Group members’ information is given in
Table 2.
2. Install ns-3 on your computer, write programs and simulate the network described in the given
application assigned to you, perform the required experiments, and answer the given questions.
3. Use ns-3’s Flow Monitor module to collect and store the performance data of network protocols from
the simulation. Do not use PCAP + Wireshark for the trace collection. No marks will be awarded if
your application uses PCAP file for trace collection.
4. Submit your set of source code files, and your report containing the graphs and the answers, for the
assigned application as a zipped file on Moodle (maximum file size is 1 MB) by the deadline of 11:55
pm on Wednesday, 15th April 2020 (hard deadline). The ZIP file’s name should be the same as
your group number, for example, “Group_4.zip”, or “Group_4.rar”, or “Group_4.tar.gz”.
5. The assignment will be evaluated through viva voce in your lab during your lab session on Wednesday,
22nd April 2020 (9:00 am to 11:55 am) where you also need to explain your source codes and execute
them in front of the evaluator (evaluation schedule and TA allocation will be notified in due time).
6. Write your own source codes and do not copy from any source. Plagiarism and use of unfair
means will be penalised by awarding NEGATIVE marks (equal to the maximum marks for the
assignment).
Table 1: Allocation of applications to groups
Application Number Group Numbers
1 1, 7, 13, 19, 25, 31, 37, 43
2 2, 8, 14, 20, 26, 32, 38, 44
3 3, 9, 15, 21, 27, 33, 39, 45
4 4, 10, 16, 22, 28, 34, 40, 46
5 5, 11, 17, 23, 29, 35, 41, 47
6 6, 12 ,18 ,24 ,30 ,36 ,42 ,48
1
Application #1:
Analyse and compare TCP Hybla, TCP Westwood+, and TCP YeAH-TCP performance. Select a Dumbbell
topology with two routers R1 and R2 connected by a (10 Mbps, 50 ms) wired link. Each of the routers is
connected to 3 hosts, i.e. H1, H2, H3 (i.e. senders) are connected to R1, and H4, H5, H6 (i.e. receivers) are
connected to R2. The hosts are attached with (100 Mbps, 20 ms) links. Both the routers use drop-tail queues
with queue size set according to bandwidth-delay product. Senders (i.e. H1, H2 and H3) are attached with TCP
Hybla, TCP Westwood+, and TCP YeAH-TCP agents, respectively. Choose a packet size of 1.5 KB and perform
the following tasks. Make appropriate assumptions wherever necessary.
1. Start only one flow and analyse the throughput over sufficiently long duration. Mention how you select
the duration. Plot the evolution of congestion window w.r.t. time. Perform this experiment with all the
flows attached to all the three sending agents.
2. In the next experiment, start 2 other flows sharing the bottleneck link while the first one is in progress
and measure the throughput (in Kbps) of each flow. Plot the throughput and evolution of the TCP
congestion window for each of the flow at a steady-state. Report the maximum throughput observed for
each of the flows.
3. Measure the congestion loss and the goodput over the duration of the experiment for each of the flows.
2
Application #2:
Compare the performance of TCP over wired and wireless networks. Consider a topology as described below.
The network consists of two TCP sources Node0 and Node2, corresponding to two TCP destinations Node1 and
Node3 respectively. Node2 and Node3 come in wired domain with two routers R1 and R2 (connected by a
{10 Mbps, 50 ms} wired link) between them. Both the routers use drop-tail queues with queue size set
according to bandwidth-delay product. Node0 comes in domain of Base Station 1 (BS1) and Node1 comes in
domain of Base Station 2 (BS2). BS1 and BS2 are connected by a (10 Mbps, 100 ms) wired link. The hosts,
i.e. Node0, Node1, Node2, Node3 are attached with (100 Mbps, 20ms) links to routers or base stations (as
shown in the figure below). The sources (Node0 and Node2)) use three TCP agents (i.e. TCP Westwood,
TCP Veno and TCP Vegas) to generate three different TCP flows. Study and plot the fairness index (Jain’s
fairness index) and throughput change when the TCP packet size is varied; all the other parameter values are
kept constant. You should use the following TCP packet size values (in Bytes): 40, 44, 48, 52, 60, 250, 300, 552,
576, 628, 1420 and 1500 for your experiments. The throughput (in Kbps) and fairness index must be calculated
at steady-state. Make appropriate assumptions wherever necessary.
3
Application #3:
Create a topology of two nodes N0 and N1 connected by a link of bandwidth 1 Mbps and link delay 10 ms. Use a
drop-tail queue at the link. Set the queue size according to bandwidth-delay product. Create a TCP agent (type
of the agent specified below) and FTP traffic at N0 destined for N1. Create 5 CBR traffic agents of rate 250 Kbps
each at N0 destined for N1. Make appropriate assumptions wherever necessary. The timing of the flows are as
follows:
 FTP starts at 0 sec and continues till the end of simulation.
 CBR1 starts at 200 ms and continues till end.
 CBR2 starts at 400 ms and continues till end.
 CBR3 starts at 600 ms and stops at 1200 ms.
 CBR4 starts at 800 ms and stops at 1400 ms.
 CBR5 starts at 1000 ms and stops at 1600 ms.
 Simulation runs for 1800 ms.
1. Plot graph(s) of TCP congestion window w.r.t. time for following 5 TCP congestion control algorithm
implementations, and describe the TCP congestion control algorithms’ behaviour.
 Case 1: use TCP New Reno
 Case 2: use TCP Hybla
 Case 3: use TCP Westwood
 Case 4: use TCP Scalable
 Case 5: use TCP Vegas
2. Draw a graph showing cumulative TCP packets dropped w.r.t. time comparing above 5 TCP congestion
control algorithm implementations.
3. Draw a graph showing cumulative bytes transferred w.r.t. time comparing above 5 TCP congestion
control algorithm implementations.
4
Application #4:
Compare the effect of buffer size on TCP and UDP flows. Select a Dumbbell topology with two routers R1 and R2
connected by a (10 Mbps, 100 ms) link. Each of the routers is connected to 3 hosts, i.e. H1, H2, H3 are connected
to R1, and H4, H5, H6 are connected to R2. All the hosts are attached to the routers with (100 Mbps, 10 ms)
links. Both the routers (i.e. R1 and R2) use drop-tail queues with equal queue size set according to
bandwidth-delay product. Choose a packet size of 1.5 KB. Start 3 TCP New Reno flows, and after a while start 3
CBR over UDP flows each with 20 Mbps. These flows are randomly distributed across H1, H2 and H3. Increase
the rate of one UDP flow up to 100 Mbps and observe its impact on the throughput of the TCP flows and the
other UDP flow. Vary the buffer size in the range of 10 packets to 800 packets and repeat the above
experiments to find out the impact of buffer size on the fair share of bandwidth and plot the necessary graphs.
Make appropriate assumptions wherever necessary.
5
Application #5:
Using the network simulator ns-3, study the characteristics of IEEE 802.11. For the purpose of experiment, use
the topology as follows. There are 3 nodes in the network located in a straight line at locations 200*i, with i=0,
1, 2. Node 0 and Node 2 both have TCP traffic to Node 1 (started randomly within 1 to 5 seconds of starting the
simulation). Consider TCP Westwood+ or TCP Hybla for the TCP agents at Node 0 and Node 2, respectively. You
have to run the simulations and measure the following from the trace output (the averages are taken over all
the nodes). Do not use PCAP file for collecting the trace. Use Flow Monitor module in ns-3 for trace collection.
No marks will be given if you consider PCAP trace with Wireshark.
1. Average bandwidth spent in transmitting RTS, CTS, and ACK.
2. Average bandwidth spent in transmitting TCP segments and TCP acks.
3. Average bandwidth wasted due to collisions.
4. TCP throughput (number of acknowledged bytes per unit time) at each node.
You have to run the simulations for 50 seconds each with different RTS thresholds (i.e. 0, 256, 512 and
1024 bytes) and TCP segment size of 1000 bytes. You can use scripts for trace file analysis and to plot the
results. Make appropriate assumptions wherever necessary.
6
0 1 2
Application #6:
The objective is to compare the effect of CBR traffic over UDP agent and FTP traffic over TCP agent. Consider a
TCP agent from TCP HighSpeed, TCP Vegas and TCP Scalable for the FTP traffic. Consider a Dumbbell topology
with two routers R1 and R2 connected by a wired link (30 Mbps, 100 ms), and use drop-tail queues with queue
size set according to bandwidth-delay product of the link. Each of the routers is connected to 2 hosts, i.e. H1, H2
are connected to R1, and H3, H4 are connected to R2. The hosts are attached to the routers with (80 Mbps,
20ms) links. The CBR traffic over UDP agent and FTP traffic over TCP agent are attached to H1 and H2
respectively. Choose appropriate packet size for your experiments and perform the following:
1. Compare the delay (in sec) and throughput (in Kbps) of CBR and FTP traffic streams when only one of
them is present in the network. Plot the graphs for the delay (in sec) and throughput (in Kbps)
observed with different packet sizes.
2. Start both the flows at the same time and also at different times. Also, compare the delay (in sec) and
throughput (in Kbps) of CBR and FTP traffic streams. Plot the graphs for the delay (in sec) and
throughput (in Kbps) observed with different packet sizes.
Make appropriate assumptions wherever necessary.
7
Table 2: Group Members corresponding to each Group
8
Group ID Roll Name
1150123034 ROHIT KUMAR 1
1170123014 BARISH BHAGAT 1
1170123026 KONDRU SURAJ 1
1170123006 ANKIT TRIPATHI 1
2170101055 ROHAN NIGAM 2
2170123036 MOHIT DHAKA 2
2170123037 MOHIT KUMAR MEENA 2
3170101005 AMAN MISHRA 3
3170101031 KEERTI HARPAVAT 3
3170101049 Priyanshu Singh 3
4170101081 UDBHAV CHUGH 4
4170123013 BAGAL SATEJ BABANRAO 4
4170123052 TANYA CHAUHAN 4
5170123015 BOJJA SAI PREETHAM 5
5170123024 KESHETTI SAI KUMAR 5
5170123031 MALISETTI KIRAN KARTHEEK 5
6170101036 MANI MANNAMPALLI 6
6170101068 SUNNY KUMAR 6
6170101087 SIDDHARTH AGARWAL 6
7170101084 MAYANK BARANWAL 1
7170123017 DEV PRIYA GOEL 1
7170123059 SHRUTI DINESH AGARWAL 1
8170101035 MANAN GUPTA 2
8170123011 ASHISH AGARWAL 2
8170123038 MRIGANKA BASU ROY CHOWDHURY 2
9170101043 PARTHA PRATIM MALAKAR 3
9170101048 PRANSHU SRIVAS 3
9170101070 THAHIR MAHMOOD POOVADA 3
10170101039 NAGULAPALLI KASI VENKATA SAI KIRAN 4
10170101051 RAJANALA HARSHAVARDHAN REDDY 4
10170123016 CHINDAM SUJANA MAITHILI 4
11170101029 KAPIL JANGID 5
11170101044 PARVINDAR SINGH 5
11170101057 RUTVIK GHUGHAL 5
12170101077 VEMURI SAHITHYA 6
12170123039 NAKKA LAHARI 6
12170123054 TUMARADA ADITYA 6
13170101054 RISHI PATHAK 1
13170101063 SHIVAM BANSAL 1
13170101088 SHASHANK SHARMA 1
14170101040 NAKKA SRIHARSHA 2
14170123025 KOMMINENI NIKHIL 2
14170123028 KRISHNA PRIYATAM D 2
15170101001 AAYUSH PATNI 3
15170101052 RASHI SINGH 3
15170101066 SOUMIK PAUL 3
16170101033 LUCKY 4
16170101034 MAKHARIA AAYUSH 4
16170123021 HEMANT YADAV 4
Application ID
Assigned
9
Group ID Roll Name
17170123004 ADITYA RAJ 5
17170123040 PARV SOOD 5
17170123043 SAHILPREET SINGH THIND 5
18160101011 AKHIL CHANDRA PANCHUMARTHI 6
18170101017 CH ROHITH RAVI PRABHU TEJA 6
18170101050 PULIKONDA ROOP SAI RAKESH GUPTA 6
19170101006 AMAN RAJ 1
19170123029 KUSHAGRA MAHAJAN 1
19170123034 MIHIR YADAV 1
20170101074 UMANG 2
20170123051 TANVI OHRI 2
20170123053 TEJASVEE PANWAR 2
21170101078 VINEET MALIK 3
21170101080 VIVEK KUMAR 3
21170101085 Sparsh Sinha 3
22170101019 CHIRAG GUPTA 4
22170101076 VAKUL GUPTA 4
22170101082 LAVISH GULATI 4
23170101026 HARDIK KATYAL 5
23170101030 KARTIK GUPTA 5
23170101075 UTKARSH JAIN 5
24170123023 KEDAR NATH 6
24170123056 PRATHIK.S.NAYAK 6
24170123064 AGNIV BANDYOPADHYAY 6
25170101060 SANCHIT 1
25170123018 GARVIT MEHTA 1
25170123020 harit gupta 1
26170101002 ABHISHEK JAISWAL 2
26170101038 MAYANK WADHWANI 2
26170123007 ANKUR PRAMOD INGALE 2
27170101067 SOURABH JANGID 3
27170101071 THEEGALA RAKESH REDDY 3
27170101073 TUSHAR RAJENDRA BHUTADA 3
28170101009 ANUBHAV TYAGI 4
28170101045 Piyush Gupta 4
28170101053 RAVI SHANKAR 4
29160101017 AUTONU KRO 5
29170101023 FUGARE ASHISH DILEEP 5
29170101027 KADAM KIRAN ZATINGRAO 5
30170101011 ARANYA ARYAMAN 6
30170101015 AVNEET SINGH CHANNA 6
30170101041 NAVEEN KUMAR GUPTA 6
31170101059 Sachin Giri 1
31170101061 SAYAK DUTTA 1
31170123010 ARYAN RAJ 1
32170101013 ARYAN AGRAWAL 2
32170101014 AVIRAL GUPTA 2
32170101022 DEVANSH GUPTA 2
Application ID
Assigned
10
Group ID Roll Name
33170101064 SHUBHAM KUMAR 3
33170101065 SHYAM SUNDAR RAV 3
33170101079 VINIT KUMAR 3
34170101037 MAYANK CHANDRA 4
34170101046 PRABHAT KUMAR 4
34170123050 SUMEDH RAVI JOURAS 4
35170123001 AAYUSH BANSAL 5
35170123057 KARTIK SETHI 5
35170123058 ARUN KUMAR 5
36170101008 ANNANYA PRATAP SINGH CHAUHAN 6
36170101012 ARPIT GUPTA 6
36170101086 SHIVANG DALAL 6
37170123027 KOTTA PREM SUJAN 1
37170123035 MOGILLAPALLI NIKHIL 1
37170123042 S SAI VAMSHI 1
38170101007 ANIKET RAJPUT 2
38170101020 DEEPAK GAMI 2
38170101047 PRANAY GARG 2
39170101056 ROUNAK PARIHAR 3
39170101058 RYTHUM SINGLA 3
39170101083 UTKARSH SANTOSH MISHRA 3
40170123060 TRIKAY NALAMADA 4
40170123061 MAHFOOZUR RAHMAN KHAN 4
40170123062 DIVYANSH MANGAL 4
41170123003 ABHINAV R 5
41170123008 ARAV GARG 5
41170123063 JOEL RAJA SINGH 5
42170101021 DEVAISHI TIWARI 6
42170123048 SIDDHANT SINHA 6
42170123022 JAYANT PATIDAR 6
43170123012 AYUSH DALIA 1
43170123033 MAYANK SAHARAN 1
43170123044 SAKSHI SHARMA 1
44170123002 ABHINAV ANAND 2
44170123041 RUPAM SAHU 2
44170123045 SAURABH KUMAR 2
45170123019 GARVIT SARJARE 3
45170123032 MANNE HEMA PRIYA 3
45170123046 SHALINI KUMARI 3
46170101004 AJINKYA SHIVASHANKAR SHIVASHANKAR 4
46170101025 HANSRAJ PATEL 4
46170101003 ADITYA VARDHAN GARA 4
47170101016 BANDAGONDA SHRI RAAM REDDY 5
47170101018 CHALUMURU BHAVANI DATT 5
47170101024 GEDDAM IKYA VENUS 5
47 160101074 Sumedh Manwar 5
48170101028 KANCHUGANTLA RHYTHM 6
48170101032 KETHAVATH NAVEEN 6
48170101042 NAYANJYOTI DEURY 6
49170123005 ANKIT KUMAR KANOJIYA 6
Application ID
Assigned