I need to compare different type of TCP using ns-3 for a class project. I am new with ns-3. I don't want to implement a new code. Briefly, I have 2 questions:
- Which example of ns-3 is the best for my purpose? Tcp-Variants-Comparison.cc?
- How can I see the output. I ran the code, but there was no output.
You can run your example using
.waf
. Navigate to your ns-3 directory (the place where.waf
executable is located) and run:This will compile (if needed) and run the example with default arguments. You can change arguments using
--command-template="%s <args>"
. If you look inside the tcp-variants-comparison.cc you can see all available arguments, e.g.:So here is an example how you can store congestion window of default TcpWestwood protocol to cwndTrace file:
You can then use any tool you like to display the data. Here is how to plot it with
gnuplot
:You should also take a look at this NS-3 tutorial. This gives you a pretty good introduction to NS-3, so read it carefully.
So to answer your question completely, you can use this example for comparison of:
So run this example with different
transport_prot
arguments and compare your traces.