100% found this document useful (1 vote)
85 views3 pages

TCP Performance Study with Simulator

The document describes a study to analyze TCP performance in a network simulator. It involves: 1) Creating a network topology with 4 nodes connected by links of varying bandwidths. 2) Adding a TCP agent to one node and TCP sink agent to another to generate and receive data. 3) Simulating FTP traffic between the nodes and recording data rates every 0.5 seconds. 4) Analyzing the performance graph generated from the trace file.

Uploaded by

vigneshvatican
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
85 views3 pages

TCP Performance Study with Simulator

The document describes a study to analyze TCP performance in a network simulator. It involves: 1) Creating a network topology with 4 nodes connected by links of varying bandwidths. 2) Adding a TCP agent to one node and TCP sink agent to another to generate and receive data. 3) Simulating FTP traffic between the nodes and recording data rates every 0.5 seconds. 4) Analyzing the performance graph generated from the trace file.

Uploaded by

vigneshvatican
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Ex.

no: Date:

STUDY OF TCP PERFORMANCE USING NETWORK SIMULATOR.

AIM:
To study the performance of TCP based network by considering the bandwidth

PROCEDURE:
[Link] STEP [Link] a simulator variable (ns). STEP [Link] the animator file and the trace file to simulator. STEP [Link] nodes for the network topology. STEP [Link] the topology by connecting the nodes with required links and desirable orientation. STEP [Link] TCP agent to a specific node and assign another node as the sink. STEP [Link] the Application level traffic, File Transfer (FTP), to represent the data flow. STEP [Link] the data rate at every interval of 0.5 seconds and store the contents in a trace file. STEP [Link] this trace file to draw a performance graph. STEP [Link] all the instances of ns and trace files. STEP [Link] the animator (nam) STEP [Link] the designed network. STEP [Link] the output. STEP [Link]

PROGRAM:
set ns [new Simulator] set nf [open [Link] w] $ns namtrace-all $nf set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] $ns color 0 Blue $ns color 1 Red $ns duplex-link $n0 $n2 5Mb 2ms DropTail $ns duplex-link $n1 $n2 5Mb 2ms DropTail $ns duplex-link $n2 $n3 1.5Mb 10ms DropTail set tcp0 [new Agent/TCP] $ns attach-agent $n1 $tcp0 set sink0 [new Agent/TCPSink] $ns attach-agent $n3 $sink0 set ftp [new Application/FTP] $ftp attach-agent $tcp0 $ns connect $tcp0 $sink0 $ns at 1.0 "$ftp start" $ns at 10.0 "$ftp stop" $ns at 10.5 "finish" proc finish {} { global ns nf $ns flush-trace #close $f close $nf puts "running nam..." exec nam [Link] & exit 0 } $ns run

OUTPUT:

RESULT:
Thus, the program to study the performance of TCP based network by considering the bandwidth has been executed successfully.

You might also like