0% found this document useful (0 votes)
302 views

Study of Udp Performance Using Network Simulator

The document describes a study that used a network simulator to analyze the performance of a UDP-based network by varying the data rate of transmitted packets. The study involved: 1) Creating a network topology with 4 nodes connected by links and designating one node as the packet source and another as the destination. 2) Adding a UDP agent to the source node and assigning the destination node as the sink. 3) Generating constant bit rate application traffic from the source to sink. 4) Recording the data rate every 0.5 seconds and storing it in a trace file to analyze performance as the data rate changed.

Uploaded by

vigneshvatican
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
302 views

Study of Udp Performance Using Network Simulator

The document describes a study that used a network simulator to analyze the performance of a UDP-based network by varying the data rate of transmitted packets. The study involved: 1) Creating a network topology with 4 nodes connected by links and designating one node as the packet source and another as the destination. 2) Adding a UDP agent to the source node and assigning the destination node as the sink. 3) Generating constant bit rate application traffic from the source to sink. 4) Recording the data rate every 0.5 seconds and storing it in a trace file to analyze performance as the data rate changed.

Uploaded by

vigneshvatican
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Ex.

no: Date:

STUDY OF UDP PERFORMANCE USING NETWORK SIMULATOR

AIM:
To study the performance of an UDP based network by considering the data rate of the packets sent.

PROCEDURE:
STEP 1.Start STEP 2.Set a simulator variable (ns). STEP 3.Set the animator file and the trace file to simulator. STEP 4.Create nodes for the network topology. STEP 5.Design the topology by connecting the nodes with required links and desirable orientation. STEP 6.Add UDP agent to a specific node and assign another node as the sink. STEP 7.The data (traffic) flows from the agent to the sink. STEP 8.Create the Application level traffic, Constant Bit Rate (CBR), to represent the data flow. STEP 9.Record the data rate at every interval of 0.5 seconds and store the contents in a trace file. STEP 10.Use this trace file to draw a performance graph. STEP 11.Close all the instances of ns and trace files. STEP 12.Initiate the animator (nam). STEP 13.Simulate the designed network. STEP 14.Verify the output. STEP 15.Stop.

PROGRAM:
set ns [new Simulator] set f [open out.tr w] $ns trace-all $f set nf [open out.nam 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 udp0 [new Agent/UDP] $ns attach-agent $n0 $udp0 set cbr0 [new Application/Traffic/CBR] $cbr0 attach-agent $udp0 $udp0 set class_ 0 set null0 [new Agent/Null] $ns attach-agent $n3 $null0 ns connect $udp0 $null0 $ns at 1.0 "$cbr0 start" puts [$cbr0 set packetSize_] puts [$cbr0 set interval_] $ns at 3.0 "finish" proc finish {} { global ns f nf $ns flush-trace close $f close $nf puts "running nam..." exec nam out.nam & exit 0 } $ns run

OUTPUT:

RESULT:
Thus, the program to study the performance of an UDP based network by considering the data rate of the packets sent has been executed successfully.

You might also like