The ns-3 Network Simulator Project

Plot a Line graph for TCP congestion window (cwnd) using gnuplot

Run example tcp-variants-comparison.cc which is available in examples/tcp directory in ns-3. Several ‘.data’ files will be created in the ns-3 root directory. Plot the TcpVariantsComparison-cwnd.data file using gnuplot. Follow the steps given below for completing this task:

  1. Configure ns-3 using command: ./waf configure --enable-examples
  2. Build ns-3 using command: ./waf
  3. Run the example tcp-variants-comparison.cc using below command:
          ./waf --run "tcp-variants-comparison --tracing=true"
    
  4. Check if the file TcpVariantsComparison-cwnd.data is created in the ns-3 root directory.
  5. Use gnuplot to plot this file. The resultant graph should follow the guidelines given below:
     Format of the graph: .png
     Name of the image: cwnd.png
     Type of Graph: Line Graph
     X-axis label: Time (in Seconds)
     Y-axis label: cwnd (in Bytes)
     Title of the graph: Congestion Window Plot
     Position of the key: outside and top right corner
     Line width: 2
    

Task tags

  • graph
  • coding
  • gnuplot

Students who completed this task

Parth Pratim, Asanali, Victor Hu, sikfeng, Parth Pandya, Phyxkal, bartekche

Task type

  • code Code
close

2018