Lab2
pdf
keyboard_arrow_up
School
Georgia Institute Of Technology *
*We aren’t endorsed by this school
Course
6110
Subject
Industrial Engineering
Date
Feb 20, 2024
Type
Pages
3
Uploaded by EarlKnowledge13348
ECE 6110 Lab Assignment 2: Congestion Control Due: Friday, Feb. 23, 11:55 PM In this lab, you will create a topology, as specified below, and compare and contrast the performances of the TCP CUBIC and NewReno congestion control algorithms. Note on Random Numbers in ns-3: In ns-3, start times for different applications are typically chosen randomly to prevent lots of simulation events with the exact same start time. Information about random numbers in ns-3 can be found in the Doxygen documentation on the ns-3 Web site under Modules->Core-
>Random Variables. Set the seed for the random number generator at the beginning of each of your programs to “123456789”.
Turn-in Instructions: Create a separate folder for each part of the assignment inside a main folder named “Lab2_<your_last_name>_<your_first_name>”. Then create a single tarball of the main folder and all of its subfolders and submit it in Canvas. Important programming instructions:
All code must be hand typed in your editor of choice. No auto-
formatting is allowed to change the text that you type in manually. Also, make sure to use the exact program name and command-line parameter names specified in each part. You will get points deducted if you do not follow these instructions even if your code is functionally correct!! Part 1: Topology with a Bottleneck Link and Homogeneous Flows Using what you learned from Lab 1, create the depicted topology with 6 nodes and 5 point-to-point links. Set the data rates and delays on the link from the sources and the links to the destinations as shown. Make the data rate, delay, and error rate on the bottleneck link command-line parameters in your program. Also include command-line parameters for the number of flows that will be sent from each source to the destinations (maximum of 10) and the protocol to use (TcpCubic or TcpNewReno). Name your program “lab2-part1.cc” and name the command line parameters “dataRate”, “delay”, “errorRate”, “nFlows”, and “transport_prot”. Using the BulkSend application in ns-3, set up nFlows/2 TCP flows from each source to dest1 and nFlows/2 TCP flows from each source to dest2 (you can assume nFlows is an even number, also set the parameter data_mbytes to 0 for each flow to make the flow send data as fast as possible for the duration of the simulation). The bottleneck link in this topology represents the Internet. Set the default parameters for the bottleneck link to be 1 Mbps data rate, 20 msec delay, and a byte error rate of 0.00001. Your program should output congestion window changes from one flow during the simulation and the goodput achieved by each flow at the end of the simulation.
1
Set the simulation duration to 20 seconds, start the sink applications at time 0, and start each flow at a random time between 1 second and 1.5 seconds. Note that your program will have to remember the start time of each flow in order to properly calculate the flows’ goodputs. 1
Goodput refers to the amount of data received at the packet sink application divided by the time that the flow was active (19 seconds given the start and stop times specified above). Report the goodput in bits per second. Bottleneck link 100 Mbps 0.01 ms 100 Mbps 0.01 ms source 1 dest 1 source 2 100 Mbps 0.01 ms dest 2 100 Mbps 0.01 ms
Important notes on example code: You can find example code for most of what is needed for this assignment in the following program: $NS_DIR/examples/tcp/tcp-variants-comparison.cc where $NS_DIR stands for the top-level directory in which you installed ns-3. The fifth.cc program from the ns-3 tutorial also introduces the concept of congestion window tracing, although it uses a different sending application from this assignment. If you use tcp-variants-comparison.cc as a starting point, there are a lot of changes you will need to make for this assignment beyond the obvious difference in topology and assignment of flows to nodes. You can remove all the tracing methods except the two related to congestion window tracing. Also, remove or comment out the 4 lines related to configuring the TCP buffers, SACK, and recovery type and the lines related to configuring queue sizes. Also, change the error model unit from ERROR_UNIT_PACKET to ERROR_UNIT_BYTE. There might be some other changes needed as well. If you have made all these changes but your code does not seem to be producing correct results, talk to the professor or TA to try to understand why. Part1a: For a bottleneck link data rate of 10 Mbps, delay of 100 msec, and error rate of 0.00001, and with two flows per source, plot the congestion window size of TCP with CUBIC and TCP with NewReno for one of the flows (whichever one you choose to trace). Compare and contrast these two plots. Also, comment on the shapes of each of the plots. Do you see some behaviors that were discussed in class? If so, mention what those are and point them out in the plots. Also, report the goodputs achieved by CUBIC and NewReno in this example and compare them using what you learned from the CUBIC paper. Part1b: For a bottleneck link data rate of 1 Mbps and error rate of 0.00001, and for 2, 4, and 8 flows per source, plot the aggregate goodput across all flows vs. bottleneck link delay for delays of 50 to 300 msec in steps of 50 and for both TCP CUBIC and TCP NewReno. Compare and contrast the CUBIC and NewReno goodput behaviors. (There should be 6 line plots on your graph; aggregate goodput for 2, 4, and 8 flows per source for CUBIC and the same for NewReno.) Part1c: For a bottleneck link data rate of 1 Mbps and delay of 1 msec, and for 2, 4, and 8 flows per source, plot the aggregate goodput across all flows vs. bottleneck link error rate for error rates of 0.00001, 0.00005, 0.0001, 0.0005, and 0.001 for both TCP CUBIC and TCP NewReno. Compare and contrast the CUBIC and NewReno goodput behaviors. (There should be 6 line plots on your graph; aggregate goodput for 2, 4, and 8 flows per source for CUBIC and the same for NewReno.) Turn-in instructions: In your Part 1 subfolder, include the source code of your program with the given topology, all plots specified above, and your discussion about each set of results as called for above. Also, include screen shots and text files of two sample outputs, one for CUBIC and one for NewReno, with 4 total flows and the link data rate, delay, and error rate values from Part 1a. Part 2: Topology with a Bottleneck Link and Heterogeneous Flows Consider the network below, which is a minor variation of the network from Part 1, where two of the links have much longer delays than the others. For this part, set the bottleneck link data rate to 10 Mbps, the bottleneck link delay to 10 msec, and the byte error rate to 0.00001. Bottleneck link 100 Mbps 0.01 ms 100 Mbps 100 ms source 1 dest 1 source 2 100 Mbps 100 ms dest 2 100 Mbps 0.01 ms
This network will result in three sets of very different RTTs of flows (one set with short delays on both ends, one set with one short and one long delay, and one set with long delays on both ends). Name your program “lab2-part2.cc” and have the same command-line parameters as in Part 1. Run the following experiments and plot the results. For nFlows = 2, 4, 6, and 8, calculate the average aggregate goodput for each of the 3 sets of flows (short-short, 1 short/1 long, and long-long) for both TCP CUBIC and TCP NewReno. To ensure you get representative behavior, run this experiment 10 times for each value of nFlows and each algorithm and average the results across all runs. Here, you should set the random number generator seed differently on each run.
2
Your graph should show average aggregate goodputs for the three sets of flows versus nFlows for the values of nFlows specified and for both CUBIC and NewReno (6 line plots with 4 data points each). Comment on the RTT fairness of the two algorithms and how the results compare to the goodputs you observed in Part 1. All parameters not specified here should be the same as in Part 1. Turn-in instructions: In your Part 2 subfolder, include the source code of your program with the modified network, the goodputs vs. nFlows graph, and your discussion about goodputs and RTT fairness. Also, include screen shots and text files of two sample outputs, one for CUBIC and one for NewReno, with 4 flows, the default RNG seed (123456789) with a run number of 1, and other parameters as specified above. 2
You can do this using the RngSeedManager::SetRun() function described in the ns-3 random variables documentation.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help