Congestion window size is a major factor in predicting the performance of a TCP Network. NS2 handles the Congestion window like a variable cwnd_ and it can be printed to a graph and as well printed as values at various intervals of time. The following tcl script will let you understand the working of the network (TCP Reno Protocol) and also helps you in plotting the characteristics of Congestion window value. Xgraph is used to plot the congestion window. To install xgraph, one can use the ns-allinone-2.3x package or directly install using yum install xgraph (fedora) and sudo apt-get install xgraph (Ubuntu, Linux Mint and Debian families) Each and every line of the code is explained with comments. Still any doubts, please post your queries in the comment section. When you copy and paste the following lines in your editor, see whether the characters are ASCII or else download here . #create simulator set ns [new Simulator] #to create nodes set n0 [$...
Its all about Network Simulations (NS2, NS3), Internet of Things, Sensor Networks, Programming, Embedded Systems, Cyber Physical Systems, etc