URGENT, throughput, delay, jitter calculation of ethernet implementation on NS2
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
URGENT, throughput, delay, jitter calculation of ethernet implementation on NS2
Hello everyone, i am trying to make an ethernet implementation on ns2. I have a tcl script;
Queue set limit_ 10
set opt(node) 8; # No. of nodes, n
set opt(bw) 10Mb; # Nominal link bandwidth
set opt(delay) 0.1ms; # Nominal link delay
set opt(ll) LL; # Link layer to use in ns-2
set opt(ifq) Queue/DropTail
# Drop tail queue to be used for buffers
# Drop tail queue drops from the tail end
# when full.
set opt(mac) Mac/802_3
# MAC protocol type
set opt(chan) Channel;
proc create-topology {} {
global ns opt
global lan node
set num $opt(node)
for {set i 0} {$i < $num} {incr i} {
set node($i) [$ns node]
lappend nodelist $node($i)
}
# This really specifies how the LAN should look like.
set lan [$ns newLan $nodelist $opt(bw) $opt(delay) \
-llType $opt(ll) -ifqType $opt(ifq) \
-macType $opt(mac) -chanType $opt(chan)]
}
## MAIN ##
set ns [new Simulator]
set tracefile [open output.tr w]
$ns trace-all $tracefile
create-topology
proc finish {} {
global ns tracefile
global lan
$ns flush-trace
close $tracefile
exit 0
}
# Set num = n-1
set num [ expr $opt(node) - 1 ]
for {set i 0} {$i < $num} {incr i} {
# Create and attach the UDP agent on the source nodes
set udp($i) [new Agent/UDP]
$ns attach-agent $node($i) $udp($i)
# Create an application (CBR) that will actually generate the
# traffic. Specify the parameters and attach it to UDP.
set cbr($i) [new Application/Traffic/CBR]
$cbr($i) set packetSize_ 64
$cbr($i) set rate_ 1.0Mb
$cbr($i) set random_ 1
$cbr($i) attach-agent $udp($i)
$ns at 0.0 "$cbr($i) start"
$ns at 2.0 "$cbr($i) stop"
}
$ns at 3.0 "finish"
$ns run
I obtain a trace file as a result, and want to analyze throughput, delay, jitter, packet delivery ratio of this file, how can i do this, please help me
Hello everyone, i am trying to make an ethernet implementation on ns2. I have a tcl script;
Code:
Queue set limit_ 10
set opt(node) 8; # No. of nodes, n
set opt(bw) 10Mb; # Nominal link bandwidth
set opt(delay) 0.1ms; # Nominal link delay
set opt(ll) LL; # Link layer to use in ns-2
set opt(ifq) Queue/DropTail
# Drop tail queue to be used for buffers
# Drop tail queue drops from the tail end
# when full.
set opt(mac) Mac/802_3
# MAC protocol type
set opt(chan) Channel;
proc create-topology {} {
global ns opt
global lan node
set num $opt(node)
for {set i 0} {$i < $num} {incr i} {
set node($i) [$ns node]
lappend nodelist $node($i)
}
# This really specifies how the LAN should look like.
set lan [$ns newLan $nodelist $opt(bw) $opt(delay) \
-llType $opt(ll) -ifqType $opt(ifq) \
-macType $opt(mac) -chanType $opt(chan)]
}
## MAIN ##
set ns [new Simulator]
set tracefile [open output.tr w]
$ns trace-all $tracefile
create-topology
proc finish {} {
global ns tracefile
global lan
$ns flush-trace
close $tracefile
exit 0
}
# Set num = n-1
set num [ expr $opt(node) - 1 ]
for {set i 0} {$i < $num} {incr i} {
# Create and attach the UDP agent on the source nodes
set udp($i) [new Agent/UDP]
$ns attach-agent $node($i) $udp($i)
# Create an application (CBR) that will actually generate the
# traffic. Specify the parameters and attach it to UDP.
set cbr($i) [new Application/Traffic/CBR]
$cbr($i) set packetSize_ 64
$cbr($i) set rate_ 1.0Mb
$cbr($i) set random_ 1
$cbr($i) attach-agent $udp($i)
set sink($i) [new Agent/Null]
$ns attach-agent $node($num) $sink($i)
$ns connect $udp($i) $sink($i)
$ns at 0.0 "$cbr($i) start"
$ns at 2.0 "$cbr($i) stop"
}
$ns at 3.0 "finish"
$ns run
I obtain a trace file as a result, and want to analyze throughput, delay, jitter, packet delivery ratio of this file, how can i do this, please help me
First, this is NOT URGENT for anyone here...we volunteer our time, so asking for/expecting 'urgent' help is rude. Secondly, you need to read the "Question Guidelines" link in my posting signature...we're happy to help, but what have you done/tried/researched so far??? Plenty of info here:
First, this is NOT URGENT for anyone here...we volunteer our time, so asking for/expecting 'urgent' help is rude. Secondly, you need to read the "Question Guidelines" link in my posting signature...we're happy to help, but what have you done/tried/researched so far??? Plenty of info here:
Of course i have done researches, i obtained a trace file but it is in old format, now i am trying to use an awk file to calculate throughput, but awk files generally calculate new format of trace file, so now i'm searching to obtain new trace file from my tcl script, thanks for your "plenty info".
Of course i have done researches, i obtained a trace file but it is in old format, now i am trying to use an awk file to calculate throughput, but awk files generally calculate new format of trace file, so now i'm searching to obtain new trace file from my tcl script, thanks for your "plenty info".
If you want to be snotty, ask somewhere else. Otherwise, as you were told, read the "Question Guidelines"...we have NO IDEA what you've done/tried until you actually POST IT, do we??? You don't post what you did get, what you've tried/done, etc., just that it's 'urgent' for you (and your homework is NOT urgent).
Post a sample of your trace file, the awk script you're running, what you're getting, and what you WANT to see, and we can try to help. But we aren't going to look things up for you, nor write your scripts for you. Show your effort, and we'll be glad to help
I have a tcl script named etherlan.txt, and trying to use an awk file named throughput.txt in the attached files to obtain throughput characteristic, but I can not view sent packets by the source in my trace file, how can i obtain them? I couldn't attach my trace file because it's size is too big. Here is an example of my output trace file:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.