LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-16-2014, 02:46 PM   #1
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Rep: Reputation: Disabled
How to change traffic from cbr to Pareto/exponential in ns2.35(ubuntu 12.04)


Hello everyone
i want to change traffic from cbr to pareto/ exponential
i have used the following code in my tcl file but no trace file is generated for this & the ouput is fatal error
Code:
                set p [new Application/Traffic/Pareto]
                $p set burst_time_ 500ms
                $p set idle_time_ 500ms
                $p set rate_ 200k
                $p set packetSize_ 512
                $p set shape_ 1.5
                
                #set e [new Application/Traffic/Exponential]
                #$e set packetSize_ 210
                #$e set burst_time_ 500ms
                #$e set idle_time_ 500ms
                #$e set rate_ 100k
i hv enable the pareto traffic & disable the cbr & exponential traffic
is this a right way to change traffic ???

thanx in advance
 
Old 10-17-2014, 02:18 AM   #2
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
plz someone help
i need it urgently
thanx in advance
 
Old 10-17-2014, 03:34 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #2 marks your thread as answered : The thread goes invisible.
No answers : The thread is bumped several times (for days),
and the kept visible in "Zero Reply Threads" for a very long time.
Conclusion : Never never make an answer to your own "post #1".


Google .. ns2 [new Application/Traffic/Pareto] ..
https://www.google.com/webhp?hl=all&...ffic%2FPareto]

Google .. [new Application/Traffic/Exponential] ..
https://www.google.com/webhp?hl=all&...2FExponential]

-

Last edited by knudfl; 10-17-2014 at 05:31 AM.
 
Old 10-17-2014, 04:21 AM   #4
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
ok thanx for ur suggestion sir
but above post doesn't solve my problem
 
Old 10-17-2014, 05:33 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Must be something ... lots of hits :

https://www.google.com/webhp?hl=all&...ffic%2FPareto]

https://www.google.com/webhp?hl=all&...2FExponential]
 
Old 10-17-2014, 02:02 PM   #6
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
thanx sir for ur reply
but i already read about pareto/exponential traffic generation on google but don't understand where m going wrong

Code:
if {$val(traffic) == "Node-UDP"} {
	for {set i 0} {$i < $val(nodes)} {incr i} {
		set udp($i) [new Agent/UDP]
		$ns attach-agent $node($i) $udp($i)
		set dest [expr round([$randomNode value])]
		while {$dest == $i} {
			set dest [expr round([$randomNode value])]
		}
		set monitor($dest) [new Agent/LossMonitor]
		$ns attach-agent $node($dest) $monitor($dest)
		$ns connect $udp($i) $monitor($dest)
		set p [new Application/Traffic/Pareto]
                $p set burst_time_ 500ms
                $p set idle_time_ 500ms
                $p set rate_ 200k
                $p set packetSize_ 512
                $p set shape_ 1.5
for this simulation is done for 20 nodes but trace file is not generated
plz help
 
Old 10-17-2014, 02:36 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #6 .

May be attach your complete file.tcl ?

Must be named <file>.tcl.txt ,
i.e. suffix .txt is a must for "text files".
 
1 members found this post helpful.
Old 10-19-2014, 12:39 PM   #8
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
attached aomdv.tcl file
Attached Files
File Type: txt aomdv.tcl.txt (14.5 KB, 67 views)
 
Old 10-19-2014, 03:24 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #8 .

* Forgot to tell you that your (edited) file.tcl
cannot have the same name as an already existing file.
The file in post #8 is not "aomdv.tcl". See ``1aomdv.diff´´.
And furthermore, the file has DOS (Windows©) characters,
not usable as is in a Unix/Linux environment.
( Easily fixed with $ dos2unix )

When edited, no issues : $ ns aomdv-Nindu.tcl
.. The files ns.trc 213 MB, scenario.trc 1.5 kB are created.

Edited to include {Exponential and Pareto} :
$ ns aomdv-Pareto.tcl
OK, ns-P.trc 213 MB, scenario-P.trc 1.5 kB
-
Attached Files
File Type: txt aomdv-files.tar.gz.txt (4.6 KB, 44 views)
 
Old 10-20-2014, 10:12 AM   #10
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
thanx sir for ur reply

in file ns aomdv-Pareto.tcl all traffics(cbr/pareto/exponential) are enabled & it gives the output for cbr traffic but i want to find output (using different parameters like pdf.awk, genthroghput.awk etc) for pareto traffic .
like i said in post no 1 .

plz help......

Last edited by Nindu; 10-24-2014 at 12:22 PM.
 
Old 10-25-2014, 01:10 PM   #11
Nindu
LQ Newbie
 
Registered: Oct 2014
Location: INDIA
Posts: 26

Original Poster
Rep: Reputation: Disabled
plz reply sir...
 
Old 06-02-2017, 02:01 PM   #12
cai
LQ Newbie
 
Registered: Dec 2016
Posts: 21

Rep: Reputation: Disabled
example TCL file for your problem

Quote:
Originally Posted by Nindu View Post
plz reply sir...
You may find the sample tcl from below website useful to you

http://wpage.unina.it/arafatur.rahman/D2CARP.html
 
1 members found this post helpful.
  


Reply

Tags
aomdv ns2, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NS2: How receive CBR packets at my own agent and duplicate them for new destination?? fahimeh_ak Programming 5 09-06-2016 11:12 PM
Can Network Simulator 2 supports FTP and CBR Traffic Harjinder Linux - Newbie 2 08-24-2012 08:19 AM
Can we control FTP rate in ns2 as wat we did for CBR? bsyew Linux - Networking 0 08-03-2012 03:03 AM
Cannot create CBR traffic in ns2 Cataj Linux - Newbie 21 08-13-2009 12:04 AM
Pareto traffic generator lucs Linux - Software 0 10-20-2005 04:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration