Wired cum wireless topology in DREAM protocol

57 views
Skip to first unread message

Imam Utomo

unread,
Jun 26, 2019, 10:13:45 AM6/26/19
to Network Simulator 2 (NS2)
Dear sir Knudfl, good evening.
I want implement wired-wireless topology in GPSR for vehicle and RSU communication. Vehicles are the mobile nodes that using wireless and RSU are static nodes that using wired. 

How these nodes can communicate each other? there are no problems with pure wireless communication but after i follow https://www.isi.edu/nsnam/ns/tutorial/nsscript6.htmland wired-cum-wireless-sim.tcl from /tcl/ex i always getting error message like Wrong node routing agent! or Error!! str2addr:Address -1 outside range of address field length 2048.

Thank you Sir.
dream.tcl
dream2.awk
scene-7
sendDataFile.dat
Message has been deleted
Message has been deleted

knudfl

unread,
Jun 26, 2019, 11:53:24 AM6/26/19
to Network Simulator 2 (NS2)
Hi.

First : You cannot use the file name dream.tcl → that's the name of the original dream simulation.
Please always use a new unique file name for a new file. Like dream-Utomo-1.tcl

Your errors : Please compare with the file "dream_2.tcl" from lar+dream-examples-0918.tar.gz
https://drive.google.com/file/d/1NDKO7UylZ3eNgMWWv6vS2ePbcVx8o_vu/view?usp=sharing

GPSR :  No gpsr seems present in your files.
Available patches :  GPSR-KeLiu_for-LAR-patched_ns232.patch, "gpsr.hls+lar_ns233-files-3.tar.gz".

Examples, gpsr, aodv :   gpsr__lar+dream-ex.tar.gz  ( patches are included.)

Note :  The best LAR+Dream results are usually achieved with ns-2.32 .

Imam Utomo

unread,
Jun 26, 2019, 12:13:27 PM6/26/19
to Network Simulator 2 (NS2)
Sorry sir, I meant I want implement wired-wireless topology in DREAM Protocol for vehicle and RSU communication. I follow https://www.youtube.com/watch?v=NMyBFSKMn5E that video implement on DSDV. In my case I want to do that in DREAM Protocol. Can you help me, Sir? Thank you, Sir.

knudfl

unread,
Jun 26, 2019, 1:45:03 PM6/26/19
to Network Simulator 2 (NS2)
DSDV :  Again, the starting point can be dream_2.tcl .  I.e. the file works perfectly with DSDV.
→ DSDV-dream_2.tcl

And a vanet example with Sumo files : 
vanet-DSDV-dream_2.tcl + flowmod-teatinos-G45.tcl + mobmod-teatinos-G45A.tcl

Using an old ns-2.32 executable "ns-lar" :
$ ns-lar vanet-DSDV-dream_2.tcl > vanet-dsdv-dream_2_result.txt
                               
// the result is attached
$ nam brad
&

The examples :  Dream-dsdv-ex.tar.gz

vanet-dsdv-dream_2_result.txt

Imam Utomo

unread,
Jun 26, 2019, 1:57:44 PM6/26/19
to Network Simulator 2 (NS2)
Okay, thank you sir for your help.
Message has been deleted

knudfl

unread,
Jun 28, 2019, 5:30:38 AM6/28/19
to Network Simulator 2 (NS2)
Note :  Dream is not a main protocol. 
As you can see from the above, the main protocol can be AODV, DSDV, etc. (ZRP, GPSR.)

The Dream stuff is these sections in the simulations :
# =====================================================================
# DREAM options
# =====================================================================
# This is the earliest time a location packet might be sent
set locationStartTime 1.1
# Location packets will be started uniform randomly between $locationStartTime
#  and $locationStartTime + $locationStartOffset
set locationStartOffset 5

# Set the seed of the default random number generator.
#ns-random 538474442L

# This is the random variable that determines when the location
#  information will start sending.
set randomVar [new RandomVariable/Uniform]
$randomVar
set min_ $locationStartTime
$randomVar
set max_ [expr $locationStartTime + $locationStartOffset]

# =====================================================================
.
.
# =====================================================================================
#        Create dream agents and attach them to the nodes
# =====================================================================================

for {set i 0} {$i < $val(nn)} {incr i} {
 
set d($i) [new Agent/Dream]
  $node_
($i) attach $d($i) 253

 
# need to tell the geocast agents about their link layers
 
set ll($i) [$node_($i) set ll_(0)]
  $ns_ at
0.0 "$d($i) set-ll $ll($i)"

 
# need to tell the geocast agents which nodes they're on also
  $ns_ at
0.0 "$d($i) set-node $node_($i)"

 
# This is the number of short location packets per long packet
  $ns_ at
0.0 "$d($i) set-freqOfLongLocationPackets 13"

 
# This is the transmission distance of the node, so that the
 
# dream agent can make the right size circle.
  $ns_ at
0.0 "$d($i) set-neighborDistance 100"

 
# This is the distance that a short location packet will travel.
 
# If set to -1 the packet will travel the whole screen and if set to
 
# 0 then only one packet will be sent per locaiton packet except
 
# if there are two nodes in the exact same place.
 
# 100 for old way
  $ns_ at
0.0 "$d($i) set-shortLocationPacketDistance 0"
 
#$ns_ at 0.0 "$d($i) set-shortLocationPacketDistance 0"

 
# This is the transmission distance of the long location packets
 
#  this is set to -1 for and infinite transmission distance (entire net)
  $ns_ at
0.0 "$d($i) set-longLocationPacketDistance -1"

 
# This is the number of seconds that location time is considered good
  $ns_ at
0.0 "$d($i) set-locationGoodTime 46"

 
# This is the number of seconds that a dream agent will wait for an ack
 
# packet for a data packet before it resorts to the recovery method
  $ns_ at
0.0 "$d($i) set-maxPacketTimeout 1"

  $ns_ at
0.0 "$d($i) set-bradsDreamFactor 10"

  $ns_ at
0.0 "$d($i) set-bradsDreamLongTime 23"
   
 
# This is the maximum node velocity in grid units per second
 
# We do not need this line if we are not using a global max node velocity.
 
# Add 1 to speed of mobility file for this
 
#$ns_ at 0.0 "$d($i) set-maxNodeVelocity 0"

 
# This is the debug value, set to -1 for no output
  $ns_ at
0.0 "$d($i) set-debugLevel -1"
}

puts
"Scheduling the location events"

# This sets the time when the location packets start being sent.
for {set i 0} {$i < $val(nn) } {incr i} {
 
set locationStart_($i) [$randomVar value]
 
#puts "Location Start Time for node($i) = $locationStart_($i)"
}

for {set i 0} {$i < $val(nn)} {incr i} {
  $ns_ at $locationStart_
($i) "$d($i) startLocationService"
}

puts
"Scheduling the send events"
#$ns_ at 2.5 "$d(2) sendData 10"
#$ns_ at 2.5 "$d(5) sendData 14"
#$ns_ at 2.5 "$d(8) sendData 18"

# doesn't work right away
#$ns_ at 2.5 "$d(10) sendData 2"

#$ns_ at 2.5 "$d(14) sendData 2"
#source $opt(tf)

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

# =====================================================================



Imam Utomo

unread,
Oct 16, 2019, 10:42:24 AM10/16/19
to Network Simulator 2 (NS2)
you said Dream is not a main protocol, is there any possibilities that DREAM protocol can stand alone as adhoc routing? Thank you sir.

knudfl

unread,
Oct 16, 2019, 1:07:16 PM10/16/19
to Network Simulator 2 (NS2)
@Imam Utomo

DREAM is not an ordinary "adhocRouting protocol".
DREAM : Table-driven (proactive) routing.
This type of protocols maintains fresh lists of destinations and their routes by periodically distributing routing tables throughout the network.
https://en.wikipedia.org/wiki/List_of_ad_hoc_routing_protocols

DREAM : A distance routing effect algorithm for mobility
https://en.wikipedia.org/wiki/DREAM_(protocol)

Imam Utomo

unread,
Oct 16, 2019, 1:23:15 PM10/16/19
to Network Simulator 2 (NS2)
so DREAM can not run without AODV/DSDV sir?

knudfl

unread,
Oct 16, 2019, 5:24:49 PM10/16/19
to Network Simulator 2 (NS2)
@Imam Utomo

Easy to try out. 
Why don't you just do that,  to known how that works out.

Imam Utomo

unread,
Oct 16, 2019, 8:30:44 PM10/16/19
to Network Simulator 2 (NS2)
I have tried it without AODV/DSDV, but the simulation can not run, there is an error message when I run the Dream simulation without other protocol (ex: AODV/DSDV). I ask you because maybe you know how to implement Dream without add other protocol (ex: AODV/DSDV/DSR etc) as Adhoc routing.
Thank you for your answer sir.

knudfl

unread,
Oct 17, 2019, 6:06:46 AM10/17/19
to Network Simulator 2 (NS2)
@Imam Utomo

»» Dream without add other protocol (ex: AODV/DSDV/DSR etc) as Adhoc routing «« :
DREAm is an algorithm collecting geographical position of a node. Collect data and print data.

`dream.h´ is mostly a copy of " geocast.h".
Please read the file.  The most lines are documentation.

`dream.cc´ :  322 lines with explaining text.  Please read.
$ grep "// " dream.cc | wc -l
I.e.  the "// " lines are documentation.


hafte agebash

unread,
Oct 20, 2019, 12:38:28 AM10/20/19
to ns-u...@googlegroups.com
Thanks dears .
 1, how to know distance between nodes.
2, how to know degrees of a node
3, what's the code for this solutions and how to add ?

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/2899ad27-6826-46af-b5d6-472d06384e54%40googlegroups.com.

knudfl

unread,
Oct 20, 2019, 8:00:47 AM10/20/19
to Network Simulator 2 (NS2)

knudfl

unread,
Oct 20, 2019, 10:00:20 AM10/20/19
to Network Simulator 2 (NS2)
→  Vanet-examples-10.19.tar.xz 
The missing ``vanet-DSDV-dream_2.tcl´´  is now included.
Reply all
Reply to author
Forward
0 new messages