Professional Documents
Culture Documents
Ex - No 7
Ex - No 7
Aim:
Algorithm:
Step 3:Using the aforesaid object write all the trace output into the file
Step 4:Using an object create a file to write all nam window output into it
Step 7: Create duplex-link from node 0 to node n2 of bandwidth 2Mb with delay 10ms
using DropTail Queue
Step 8: Create duplex-link from node 1 to node n2 of bandwidth 2Mb with delay 10ms
using DropTail Queue
Step 9:Create duplex-link from node 2 to node n3 of bandwidth 0.3Mb with delay 200ms
using DropTail Queue
Step 10:Create duplex-link from node 3 to node n4 of bandwidth 0.5Mb with delay 40ms
using DropTail Queue
Step 11:Create duplex-link from node 3 to node n5 of bandwidth 0.5Mb with delay 30ms
using DropTail Queue
Step 23:Attach ping agent to node 0 and node 4 ,connect it to calculate RTT
Step 27:P lot the congestion window # cwnd_ used from tcp-reno.cc file
Step 28:Call the finish procedure to execute the nam window file and congestion trace file
$ns trace-all $f
# to create the link between the nodes with bandwidth, delay and queue
# ---------------------------------------------------------------------------
global ns
proc finish {} {
exit 0
}
# Run simulation
$ns run
Output:
Result:
Thus the program to simulate the behaviour of TCP congestion control using NS 2
simulator.