Download

ns-2 code (This version has been tested in ns-2.26.)


Some tips for running the TCP-PR ns-2 code:

(This ns code was tested in ns-2.26.)

You can start TCP-PR simulation easily as follows.

1. Set alpha and beta values. (The default alpha and beta
values are 0.99 and 3.0, respectively.)

# Here, $alpha, $beta are your own values.
Agent/TCP/PR set alpha_ $alpha
Agent/TCP/PR set beta_ $beta

2. Make a connection as follows:

set tf$i [$ns create-connection TCP/PR $node_1 TCPSink/PR $node_2 0]
# in here, you can see the only difference from running other
# standard TCP is to use TCP/PR and TCPSink/PR agents.

By the way, there is a fixed value for max. packet sequence number (PR_MAX_SEQNO) in this ns code. If you would like to run a long-run simulation, you may want to change this value or to make the memory allocation dynamic.