LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 09-17-2018, 10:47 AM   #16
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Re #14


Quote:
Originally Posted by knudfl View Post
Re #13.

Repeat : Use another name for dsr.tcl !
The original dsr.tcl has no line saying "source mobility.tcl".

-
for the use of the Tora routing protocol, can you provide me with the steps for processing it? and as far as I know it requires additional patches, sir ?
 
Old 09-17-2018, 02:48 PM   #17
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #15, #16 : There is no need to quote anything. Please don't.
The "Re # " will do.

#15 »» delay.awk script that is suitable for DSR routing protocols ? «« :
Finding a script : See post #3.
There is no other way than working your way through all relevant scripts.
The script must match the trace file. ( Not especially DSR.)
But the again, if a simulation records no packets sent or received, the analysis cannot be trusted.

Delay scripts, awk and perl:
all-2.awk
Avg_Del.awk
Avg_Del_Flow.awk
Instnt_Del.awk
Instnt_Del_Flow.awk
delay_alterado_einar.awk
delay.awk
delay-e2e.awk
delay-link.awk
delay_original.awk
del-ratio.awk
insdelay_tcp-cbr-vbr.awk
measure-delay.awk
thr_drop_delay.awk
avg-delay_E2E.pl
e2e.awk
e2edelay.awk
e2ethroughput.awk
en2end-delay.awk ?
end-to-end.awk
Endtoenddelay.awk
End-to-End-Delay.awk
End-to-End-Delay##.pl
Endtoenddelay-Xgr.awk
delay-e2e.awk
tess-delay.awk
Ref. https://drive.google.com/file/d/1y1g...ew?usp=sharing


#16, Tora : tora_ns235-1.patch https://drive.google.com/file/d/0B7S...ew?usp=sharing

All ~300 patches https://drive.google.com/drive/folde...00?usp=sharing

Tora-examples_10.17.tar.gz https://drive.google.com/file/d/1fQa...ew?usp=sharing

Ns-2.35 + tora :
Code:
$ tar xvf ns-allinone-2.35_gcc5.tar.gz     ('Nov 2014 .. 2017' update)
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd ns-allinone-2.35/
patch -p0 < tora_ns235-1.patch
$ ./install
$ cd ns-2.35/
$ cp ns ns235-tora ( This is your backup )
$ sudo cp ns235-tora /usr/local/bin/

------- Simulation -----------
$ ns235-tora 02-T-msg12973.tcl

Last edited by knudfl; 09-17-2018 at 02:49 PM.
 
Old 09-17-2018, 03:38 PM   #18
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Unhappy Re #17

There was an error when I tried to install the tora, sir.
Code:
rio@azmi-28:~$ cd ns-allinone-2.35/
rio@azmi-28:~/ns-allinone-2.35$ patch -p0 < tora_ns235-1.patch
bash: tora_ns235-1.patch: No such file or directory
rio@azmi-28:~/ns-allinone-2.35$ patch -p0 < tora_ns235-1.patch
patching file ns-2.35/imep/imep.cc
patching file ns-2.35/tora/tora.cc
patching file ns-2.35/tora/tora.h
rio@azmi-28:~/ns-allinone-2.35$ ./install
Code:
In file included from /home/rio/ns-allinone-2.35/tk8.5.10/unix/../generic/tkInt.h:19:0,
                 from /home/rio/ns-allinone-2.35/tk8.5.10/unix/../generic/tk3d.c:14:
/home/rio/ns-allinone-2.35/tk8.5.10/unix/../generic/tk.h:76:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
Makefile:908: recipe for target 'tk3d.o' failed
make: *** [tk3d.o] Error 1
tk8.5.10 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
rio@azmi-28:~/ns-allinone-2.35$
roughly where is the mistake ?
 
Old 09-17-2018, 08:55 PM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #18.
Quote:
X11/Xlib.h: No such file ....
Well, for building ns-allinone-2 the "build prerequisites" must be installed.

Example Ubuntu 18.04
$ sudo apt install g++ g++-4.8 autoconf libtool libxmu-dev

Be aware that no later than g++-5.4 can compile ns-2.35/.
If the OS is Ubuntu 18.04, the build command is
$ export CC=gcc-4.8 CXX=g++-4.8 && ./install

-
 
Old 09-17-2018, 11:37 PM   #20
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Unhappy Re #19

Quote:
Originally Posted by knudfl View Post
Re #18.

Well, for building ns-allinone-2 the "build prerequisites" must be installed.

Example Ubuntu 18.04
$ sudo apt install g++ g++-4.8 autoconf libtool libxmu-dev

-
The Ubuntu I use is 16.04 sir. I have searched for the build command on Google, but I have not met it.
 
Old 09-18-2018, 03:27 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #20.

The default build command is : $ ./install
... i.e. you run the shell script `install´ present in ns-allinone-2.35 .
See post #17.

-
 
Old 09-18-2018, 05:05 AM   #22
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Unhappy Re #21

I am already install NS2 including TORA protocol with it. Also I already edit tora.h, tora.cc, and imep.cc like the instruction from http://ns2-xgraph.blogspot.com/2013/...ra-in-ns2.html but when I trying to execute tora example, i got error messages like this:

Code:
rio@azmi-28:~/TA/tora-files+examples/Tora-examples$ ns tora2.tcl
num_nodes is set 6
INITIALIZE THE LIST xListHead

    (_o22 cmd line 1)
    invoked from within
"_o22 cmd port-dmux _o37"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o22" line 2)
    (SplitObject unknown line 2)
    invoked from within
"$agent port-dmux $dmux_"
    (procedure "_o19" line 11)
    (Node/MobileNode add-target-rtagent line 11)
    invoked from within
"$self add-target-rtagent $agent $port"
    (procedure "_o19" line 28)
    (Node/MobileNode add-target line 28)
    invoked from within
"$self add-target $agent $port"
    (procedure "_o19" line 15)
    (Node attach line 15)
    invoked from within
"$node attach $ragent [Node set rtagent_port_]"
    (procedure "_o3" line 85)
    (Simulator create-wireless-node line 85)
    invoked from within
"_o3 create-wireless-node"
    ("eval" body line 1)
    invoked from within
"eval $self create-wireless-node $args"
    (procedure "_o3" line 23)
    (Simulator node line 23)
    invoked from within
"$ns node"
    invoked from within
"set n(0) [$ns node]"
    (file "tora2.tcl" line 115)
and this the source code from tora2.tcl

Code:
# ======================================================================
# Define options
# ======================================================================
 set val(chan)         Channel/WirelessChannel  ;# channel type
 set val(prop)         Propagation/TwoRayGround ;# radio-propagation model
 set val(ant)          Antenna/OmniAntenna      ;# Antenna type
 set val(ll)           LL                       ;# Link layer type
 set val(ifq)          Queue/DropTail/PriQueue  ;# Interface queue type
 set val(ifqlen)       50                       ;# max packet in ifq
 set val(netif)        Phy/WirelessPhy          ;# network interface type
 set val(mac)          Mac/802_11               ;# MAC type
 set val(nn)           6                        ;# number of mobilenodes
 set val(rp)	       TORA                     ;# routing protocol
 set val(x)            800
 set val(y)            800

set ns [new Simulator]
#ns-random 0

set f [open 1_out.tr w]
$ns trace-all $f
set namtrace [open 1_out.nam w]
$ns namtrace-all-wireless $namtrace $val(x) $val(y)
set f0 [open proj_out0.tr w]
set f1 [open proj_out1.tr w]
set f2 [open proj_out2.tr w]
set f3 [open proj_out3.tr w]

set topo [new Topography]
$topo load_flatgrid 800 800

create-god $val(nn)

set chan_1 [new $val(chan)]
set chan_2 [new $val(chan)]
set chan_3 [new $val(chan)]
set chan_4 [new $val(chan)]
set chan_5 [new $val(chan)]
set chan_6 [new $val(chan)]

# CONFIGURE AND CREATE NODES

$ns node-config  -adhocRouting $val(rp) \
 		 -llType $val(ll) \
                 -macType $val(mac) \
                 -ifqType $val(ifq) \
                 -ifqLen $val(ifqlen) \
                 -antType $val(ant) \
                 -propType $val(prop) \
                 -phyType $val(netif) \
                 #-channelType $val(chan) \
                 -topoInstance $topo \
                 -agentTrace OFF \
                 -routerTrace ON \
                 -macTrace ON \
                 -movementTrace OFF \
                 -channel $chan_1  # \
                 #-channel $chan_2   \
                 #-channel $chan_3   \
                 #-channel $chan_4   \  
                 #-channel $chan_5   \
                 #-channel $chan_6  


proc finish {} {
	global ns f f0 f1 f2 f3 namtrace
	$ns flush-trace
        close $namtrace   
	close $f0
        close $f1
 	close $f2
        close $f3
       # exec xgraph proj_out0.tr proj_out1.tr 
                                     # proj_out2.tr proj_out3.tr 
        exec nam -r 5m 1_out.nam &
	exit 0
}

proc record {} {
  global sink0 sink1 sink2 sink3 sink4 sink5 f0 f1 f2 f3
   #Get An Instance Of The Simulator
   set ns [Simulator instance]
   
   #Set The Time After Which The Procedure Should Be Called Again
   set time 0.05
   #How Many Bytes Have Been Received By The Traffic Sinks?
   set bw0 [$sink5 set npkts_]
   set bw1 [$sink5 set nlost_]
   #set bw2 [$sink2 set npkts_]
   #set bw3 [$sink3 set npkts_]
   
   #Get The Current Time
   set now [$ns now]
   
   #Save Data To The Files
   puts $f0 "$now [expr $bw0]"
   puts $f1 "$now [expr $bw1]"
   #puts $f2 "$now [expr $bw2]"
   #puts $f3 "$now [expr $bw3]"

   #Re-Schedule The Procedure
   $ns at [expr $now+$time] "record"
  }
 
# define color index
$ns color 0 blue
$ns color 1 red
$ns color 2 chocolate
$ns color 3 red
$ns color 4 brown
$ns color 5 tan
$ns color 6 gold
$ns color 7 black
                        
set n(0) [$ns node]
#$ns at 0.0 "$n(0) color red"
$n(0) color "0"
$n(0) shape "circle"
set n(1) [$ns node]
$n(1) color "blue"
$n(1) shape "circle"
set n(2) [$ns node]
$n(2) color "tan"
$n(2) shape "circle"
set n(3) [$ns node]
$n(3) color "red"
$n(3) shape "circle"
set n(4) [$ns node]
$n(4) color "tan"
$n(4) shape "circle"
set n(5) [$ns node]
$n(5) color "red"
$n(5) shape "circle"






for {set i 0} {$i < $val(nn)} {incr i} {
	$ns initial_node_pos $n($i) 30+i*100
}

$n(0) set X_ 0.0
$n(0) set Y_ 0.0
$n(0) set Z_ 0.0

$n(1) set X_ 0.0
$n(1) set Y_ 0.0
$n(1) set Z_ 0.0

$n(2) set X_ 0.0
$n(2) set Y_ 0.0
$n(2) set Z_ 0.0

$n(3) set X_ 0.0
$n(3) set Y_ 0.0
$n(3) set Z_ 0.0

$n(4) set X_ 0.0
$n(4) set Y_ 0.0
$n(4) set Z_ 0.0

$n(5) set X_ 0.0
$n(5) set Y_ 0.0
$n(5) set Z_ 0.0

$ns at 0.0 "$n(0) setdest 100.0 100.0 3000.0"
$ns at 0.0 "$n(1) setdest 200.0 200.0 3000.0"
$ns at 0.0 "$n(2) setdest 300.0 200.0 3000.0"
$ns at 0.0 "$n(3) setdest 400.0 300.0 3000.0"
$ns at 0.0 "$n(4) setdest 500.0 300.0 3000.0"
$ns at 0.0 "$n(5) setdest 600.0 400.0 3000.0"

$ns at 2.0 "$n(5) setdest 100.0 400.0 500.0"
#$ns at 1.5 "$n(3) setdest 450.0 150.0 500.0"


# CONFIGURE AND SET UP A FLOW


set sink0 [new Agent/LossMonitor]
set sink1 [new Agent/LossMonitor]
set sink2 [new Agent/LossMonitor]
set sink3 [new Agent/LossMonitor]
set sink4 [new Agent/LossMonitor]
set sink5 [new Agent/LossMonitor]
$ns attach-agent $n(0) $sink0
$ns attach-agent $n(1) $sink1
$ns attach-agent $n(2) $sink2
$ns attach-agent $n(3) $sink3
$ns attach-agent $n(4) $sink4
$ns attach-agent $n(5) $sink5

#$ns attach-agent $sink2 $sink3
set tcp0 [new Agent/TCP]
$ns attach-agent $n(0) $tcp0
set tcp1 [new Agent/TCP]
$ns attach-agent $n(1) $tcp1
set tcp2 [new Agent/TCP]
$ns attach-agent $n(2) $tcp2
set tcp3 [new Agent/TCP]
$ns attach-agent $n(3) $tcp3
set tcp4 [new Agent/TCP]
$ns attach-agent $n(4) $tcp4
set tcp5 [new Agent/TCP]
$ns attach-agent $n(5) $tcp5


proc attach-CBR-traffic { node sink size interval } {
   #Get an instance of the simulator
   set ns [Simulator instance]
   #Create a CBR  agent and attach it to the node
   set cbr [new Agent/CBR]
   $ns attach-agent $node $cbr
   $cbr set packetSize_ $size
   $cbr set interval_ $interval

   #Attach CBR source to sink;
   $ns connect $cbr $sink
   return $cbr
  }

set cbr0 [attach-CBR-traffic $n(0) $sink5 1000 .015]
#set cbr1 [attach-CBR-traffic $n(1) $sink2 1000 .015]
#set cbr2 [attach-CBR-traffic $n(2) $sink3 1000 .015]
#set cbr3 [attach-CBR-traffic $n(3) $sink0 1000 .015]
#set cbr4 [attach-CBR-traffic $n(4) $sink3 1000 .015]
#set cbr5 [attach-CBR-traffic $n(5) $sink0 1000 .015]

 

$ns at 0.0 "record"
#$ns at 0.5 "$cbr0 start"
#$ns at 0.5 "$cbr2 start"
#$ns at 2.0 "$cbr0 stop"
#$ns at 2.0 "$cbr2 stop"
$ns at 1.0 "$cbr0 start"
#$ns at 4.0 "$cbr3 stop"

$ns at 10.0 "finish"

puts "Start of simulation.."
$ns run
Hope you want to help me to resolve this problem.
 
Old 09-18-2018, 02:33 PM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #22.

1. That's the default tora2.tcl from Tora-examples_11.17/.

2. Old is http://ns2-xgraph.blogspot.com/2013/...ra-in-ns2.html
... The latest is : tora_ns235-1.patch (Nov 2017), see post #17.

3. Please setup a new ns-allinone-2.35_gcc5.tar.gz in a new folder in /home/name/ns2/.
See post #17.

4. Your simulation command should be $ ns235-tora tora2.tcl
No issues here :
Code:
$ ns235-tora-64 tora2.tcl 
num_nodes is set 6
INITIALIZE THE LIST xListHead
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
Start of simulation..
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 550.0
SORTING LISTS ...DONE!
-

Last edited by knudfl; 09-18-2018 at 02:37 PM.
 
1 members found this post helpful.
Old 09-20-2018, 05:50 AM   #24
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Smile Re #23

Thanks a lot, I already try all steps you suggest, and it's work. Now I'm trying to modified the script according to my scenario. Hope you wil help later if I get another problems.
 
Old 10-04-2018, 03:41 AM   #25
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
hello, can you give me a sample TORA script to use "source mobility.tcl" in script TORA.tcl ? I have tried modifying the example script above. I am confused about using 100 nodes. Hope you will help me
 
Old 10-04-2018, 11:05 AM   #26
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #25.

Use an example that can handle 100 nodes.
(E.g. mc-tora.tcl, tora-project-code_input.tcl, urban-VANET-TeatinosM40.tcl).
... It's do and try, until it works.

Tora examples modified to "100 nodes" :
12mc-tora.tcl, 14tora-project-code_input.tcl, 15tora-project-code_input.tcl

Vanet example modified to TORA : 18urban-VANET-TeatinosM40.tcl

Package with the above → vanet-tora/ → vanet-tora.tar.gz
https://drive.google.com/file/d/1DEc...ew?usp=sharing

-
 
Old 10-04-2018, 11:12 AM   #27
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Okay thank you, I will try it. If there are obstacles that I find later, I hope you can help me
 
Old 10-07-2018, 11:28 AM   #28
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Unhappy Re #26

Hello, I have modified the TORA script according to my scenario. But, when I want to do a test, there are PDR parameters, Overhead Routing and Delay, I have problems like this :

Code:
rio@azmi-28:~$ cd TA
rio@azmi-28:~/TA$ ls
10-TA-dsr  dsr  TA-dsr  TA-dsr1  TA-tora  tora  tora-files+examples
rio@azmi-28:~/TA$ cd TA-tora
rio@azmi-28:~/TA/TA-tora$ ls
activity.tcl            pdr.awk           TA-tora.rou.alt.xml  testora.tcl
del.awk                 ro.awk            TA-tora.rou.xml      tora.tcl
delay1.awk              TA-tora.nam       TA-tora.sumo.cfg     trips.trips.xml
delay.awk               TA-tora.net.xml   TA-tora.sumo.xml     t.tcl
mobility.tcl            TA-tora.osm       TA-tora.tcl
osmPolyconvert.typ.xml  TA-tora.poly.xml  TA-tora.tr

rio@azmi-28:~/TA/TA-tora$ ns235-tora testora.tcl
num_nodes is set 125
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 156.7
SORTING LISTS ...DONE!
NS EXITING...

rio@azmi-28:~/TA/TA-tora$ awk -f pdr.awk TA-tora.tr
Ratio:0.0000

rio@azmi-28:~/TA/TA-tora$ awk -f ro.awk TA-tora.tr

routing   packets:     0
data =                 0
overhead     :  -nan

rio@azmi-28:~/TA/TA-tora$ awk -f delay.awk TA-tora.tr


Average End-to-End Delay    = -nan s


rio@azmi-28:~/TA/TA-tora$
The TORA script that I use is as follows:

Code:
# =============================================================================
# Define options
# ============================================================================= 

set val(chan) 		Channel/WirelessChannel  ;
set val(prop) 		Propagation/TwoRayGround ;
set val(netif) 		Phy/WirelessPhy          ;
set val(mac) 		Mac/802_11               ;
set val(ifq) 		Queue/DropTail/PriQueue  ;
set val(ll) 		LL                       ;
set val(ant) 		Antenna/OmniAntenna      ;
set val(ifqlen) 	50                       ;
set val(nn) 		125                      ;
set val(rp) 		TORA                     ;
set opt(x) 		7669			 ;
set opt(y) 		7889			 ;
set val(stop) 		300                      ;

#802.11p default parameters
Phy/WirelessPhy set freq_ 2.472e9  
Phy/WirelessPhy set RXThresh_ 2.62861e-09; #100m radius
Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]]
Phy/WirelessPhy set bandwidth_ 11.0e6 
Mac/802_11 set dataRate_ 11Mb 
Mac/802_11 set basicRate_ 2Mb

# Initialize Global Variables
# Create simulator
set ns_ [new Simulator]

# Set up trace file
set tracefd [open TA-tora.tr w]
$ns_ trace-all $tracefd

$ns_ use-newtrace
set namtrace [open TA-tora.nam w]
$ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y)

# set up topography object
set topo [new Topography]
$topo load_flatgrid $opt(x) $opt(y)

create-god $val(nn)

# CONFIGURE AND CREATE NODES
$ns_ node-config -adhocRouting $val(rp) \
                -llType $val(ll) \
                -macType $val(mac) \
                -ifqType $val(ifq) \
                -ifqLen $val(ifqlen) \
                -antType $val(ant) \
                -propType $val(prop) \
                -phyType $val(netif) \
                -channelType $val(chan) \
                -topoInstance $topo \
                -agentTrace ON \
                -routerTrace ON \
                -macTrace ON \
                -movementTrace OFF \


for {set i 0} {$i < $val(nn) } {incr i} {
	set node_($i) [$ns_ node]
	$node_($i) random-motion 0	; # disable random motion

	$ns_ initial_node_pos $node_($i) 10  
}

# Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes
source mobility.tcl

set tcp [new Agent/TCP]
set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(10) $tcp
$ns_ attach-agent $node_(27) $sink
$ns_ connect $tcp $sink
$tcp set packetSize_ 512
$tcp set interval_ 2
$tcp set random_ 1
$tcp set maxpkts- 10000
set ftp [new Application/FTP]
$ftp attach-agent $tcp


$ns_ at 0.0 "$ftp start"

for {set i 0} {$i < $val(nn) } {incr i} {
 $ns_ at $val(stop) "$node_($i) reset"
}

$ns_ at $val(stop) "stop"
$ns_ at $val(stop) "puts \"NS EXITING...\" ; $ns_ halt"

proc stop {} {
	global ns_ tracefd namtrace
	$ns_ flush-trace
	close $tracefd
	close $namtrace
}

puts "Starting Simulation..."
$ns_ run
Can you provide a solution to the problem ?
 
Old 10-11-2018, 05:26 AM   #29
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Ref. #26.

Updated package = Vanet-examples-09.18.tar.gz
https://drive.google.com/file/d/1wcD...ew?usp=sharing

An update of vanet-tora/ is included in "Vanet-examples-09.18.tar.gz" : vanet-tora-1/
 
Old 10-15-2018, 05:11 AM   #30
Rio_azmi
LQ Newbie
 
Registered: Sep 2018
Posts: 22

Original Poster
Rep: Reputation: Disabled
Unhappy #Re27

Hello, I've tried fixing the tora script. But for testing the packet delivery ratio the result is still 0.000, routing overhead and the delay result is -nan. How about a solution like this ?
 
  


Reply

Tags
ns2, tora, vanet



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
vanet sheena16sa Linux - Wireless Networking 1 04-03-2012 04:05 PM
vanet sheena16sa Linux - Wireless Networking 1 04-02-2012 06:29 AM
Vanet Praveen_Gp Linux - General 2 02-21-2012 03:17 PM
Vanet yashu Linux - Networking 2 02-17-2012 11:32 AM
Vanet sheena16sa Linux - Newbie 1 10-04-2011 05:09 AM

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

All times are GMT -5. The time now is 09:02 AM.

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