Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-14-2012, 04:05 PM
|
#1
|
|
LQ Newbie
Registered: Mar 2012
Posts: 7
Rep: 
|
VanetMobiSim/ ns2
salaam,
I am working with VanetMobiSim. Can anyone specify any guide/example/tutorial where I can able to find how to generate traffic movement files for NS2 (file .tcl)?
|
|
|
|
03-15-2012, 05:22 AM
|
#2
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,612
|
|
|
|
|
03-15-2012, 05:36 PM
|
#3
|
|
LQ Newbie
Registered: Mar 2012
Posts: 7
Original Poster
Rep: 
|
thanks brother, I found this:
<extension class="de.uni_stuttgart.informatik.canu.mobisim.extensions.NSOutput" output="ns_trace.txt"/>
|
|
|
|
03-19-2012, 03:55 PM
|
#4
|
|
LQ Newbie
Registered: Mar 2012
Posts: 7
Original Poster
Rep: 
|
salaam,
I found this command to generate movement file as like as with VanetMobiSim
cd ~/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest
./setdest -v 1 -n 100 -p 0 -M 50.0 -t 1000 -x 1000 -y 10000 > scen-100-test #100 nodes with 50.0 m/s as maximum speed and the name of #movement file is scen-100-test
then, we can generate the traffic file with this command
cd ~/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/
ns cbrgen.tcl -type tcp -nn 100 -seed 1.0 -mc 19 -rate 4.0> tcp-100-test #tcp-100-test is the name of traffic
to execute the simulation we create the simulation file nsSim.tcl
#nsSim.tcl
set val(chan) Channel/WirelessChannel
set val(prop) Propagation/TwoRayGround
set val(netif) Phy/WirelessPhy
set val(mac) Mac/802_11
set val(ifq) CMU/DropTail/PriQueue
set val(ll) LL
set val(ant) Antenna/OmniAntenna
set val(x) 670 ;# X dimension of the topography
set val(y) 670 ;# Y dimension of the topography
set val(ifqlen) 50 ;# max packet in ifq
set val(seed) 0.0
set val(adhocRouting) DSR
set val(nn) 100 ;# how many nodes are simulated
set val(cp) "~/exempleVanet/tcp-100-test"
set val(sc) "~/exempleVanet/scen-100-test"
set val(stop) 1000.0 ;# simulation time
set ns_ [new Simulator]
set ftrace [open out.tr w]
$ns_ trace-all $ftrace
set fnam [open out.nam w]
$ns_ namtrace-all-wireless $fnam $val(x) $val(y)
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
set god_ [create-god $val(nn)]
# Create channel #1 and #2
set chan_1_ [new $val(chan)]
set chan_2_ [new $val(chan)]
$ns_ node-config -adhocRouting $val(adhocRouting)
-llType $val(ll)\
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $chan_1_ \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node ]
$node_($i) random-motion 0 ;# disable random motion
}
#
# Define node movement model
#
puts "Loading connection pattern..."
source $val(cp)
#
# Define traffic model
#
puts "Loading scenario file..."
source $val(sc)
# Define node initial position in nam
for {set i 0} {$i < $val(nn)} {incr i} {
# 20 defines the node size in nam, must adjust it according to your
# scenario size.
# The function must be called after mobility model is defined
$ns_ initial_node_pos $node_($i) 100
}
puts $ftrace "M 0.0 nn $val(nn) x $val(x) y $val(y) rp $val(adhocRouting)"
puts $ftrace "M 0.0 sc $val(sc) cp $val(cp) seed $val(seed)"
puts $ftrace "M 0.0 prop $val(prop) ant $val(ant)"
#
# Tell nodes when the simulation ends
#
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at 1000.0 "$node_($i) reset";
}
$ns_ at 1000.0001 "stop"
$ns_ at 1000.0002 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ ftrace fnam
$ns_ flush-trace
close $ftrace $fnam
}
puts "Starting Simulation..."
$ns_ run
but, the pb is wihle I execute ns nsSim.tcl, I have this errorinvalid command name "-llType"
while executing
"-llType $val(ll)\
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
..."
(file "nsSim.tcl" line 38
any one can help me???? please.
|
|
|
|
03-30-2012, 01:57 AM
|
#5
|
|
LQ Newbie
Registered: Mar 2012
Posts: 7
Original Poster
Rep: 
|
errors found:
1) ./setdest -v 1 -n 100 -p 0 -M 50.0 -t 1000 -x 1000 -y 10000 > scen-100-test # replace -y 10000 by -y 1000
2) $ns_ node-config -adhocRouting $val(adhocRouting)
-llType $val(ll)\
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $chan_1_ \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF
we must take this
$ns_ node-config -adhocRouting $val(adhocRouting) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $chan_1_ \
-topoInstance $topo \
-agentTrace ON \
-routerTrace OFF \
-macTrace OFF
|
|
|
|
12-28-2012, 07:08 AM
|
#6
|
|
LQ Newbie
Registered: Dec 2012
Posts: 24
Rep: 
|
problem with ns2 VanetMobiSIm
hi , help me plz , how can i integrate output file from VanetMobiSim in ns2 ¿
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:38 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|