FedoraThis forum is for the discussion of the Fedora Project.
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.
Hi,
I am using the LAR code for NS2.35.
In box.tcl, I'm trying to understand why it use the AODV in the routing protocol, and I asked Dr. Tracy Camp to explain how LAR protocol is using AODV in the .tcl but she told me this work was 15-20 years ago.
Can you help me please, Thank you.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
The main protocol used for LAR simulations is e.g. AODV.
The "Location-Based routing" is done with the "Agent/LAR" settings.
Other main protocol example, DSDV : See dsdv__Lar.tcl → → lar+dream-examples-0918.tar.gz https://drive.google.com/file/d/1NDK...ew?usp=sharing
Example, LAR settings (from "box-Helen.tcl") :
Code:
# the format now for the lar send is
#
# "$nodeId sendData <dest ID> <size> <method>"
#
# this will be used to test in a static configuration, and will
# change once the mobility portion is figured out.
#Schedule events
puts "Scheduling the send events"
for {set k $val(dataStart)} {$k < $val(dataStop)} {set k [expr $k + 0.25] } \
{
$ns_ at $k "$g(0) sendData 49 64 B"
$ns_ at [expr $k + .0001] "$g(1) sendData 48 64 B"
$ns_ at [expr $k + .0002] "$g(2) sendData 47 64 B"
}
# this is done to make the simulator continue running and "settle" things out
for {set i 0} {$i < $val(nn)} {incr i} {
$ns_ at $val(signalStop) "$g($i) larDone"
}
And "Lar.tcl"
Code:
.
#Create lar agents and attach them to the nodes
puts "creating lar agents and attaching them to nodes..."
for {set i 0} {$i < $val(nn)} {incr i} {
set g($i) [new Agent/LAR]
$node_($i) attach $g($i) 254
# need to tell the lar agents about their link layers
set ll($i) [$node_($i) set ll_(0)]
$ns_ at 0.0 "$g($i) set-ll $ll($i)"
# need to tell the lar agents which nodes they're on also
$ns_ at 0.0 "$g($i) set-node $node_($i)"
}
.
.
sir, do i need to uninstall the existing ns2, or can i just install the new one?
because i've tried to uninstall ns2 but when i check using command 'ns' the message still '%'
if i overwrite or stack up ne ns2, will it works OK?
sir, i did exactly as the following instruction. and i'ts still failed to work.
this is the message:
bisma@ubuntu:~/Downloads/lar+dream-examples-0919$ ns box-Helen.tcl
setting initial variables...
setting other default settings...
removing unecessary packet headers...
num_nodes is set 20
creating channel...
setting global node values...
creating the nodes...
INITIALIZE THE LIST xListHead
Loading the mobility file...
creating lar agents and attaching them to nodes...
invalid command name "Agent/LAR"
while executing
"Agent/LAR create _o69 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/LAR"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn)} {incr i} {
set g($i) [new Agent/LAR]
$node_($i) attach $g($i) 254
# need to tell the lar agents about their link layers..."
(file "box-Helen.tcl" line 174)
sir, i tried use command "ns235-lar". it failed with the message "command not found"
then i tried use command "ns ns235-lar". and this occured:
bisma@ubuntu:~/Downloads/ns-allinone-2.35/ns-2.35$ ns ns235-lar
invalid command name "ELF>à~^@Ðk¢@8"
while executing
"ELF>à~^@Ðk¢@8 @(%@@@..."
(file "ns235-lar" line 1)
ahh.. yes, sir. my wrongdoing. it works OK now, thank you.
and sir, i want to use gui so that i can make a documentation out of it.
i read that its about wrong gcc version. i use ubuntu 16.04 with NS2.35, does my gcc version's the right one?
and the result only appeared on terminal, is it that way or my installation process that was wrong?
is there a way so i could know how the traffic works etc. etc. ??
thank you, sir. although it take much time for me, it works.
sir, could it be possible if 1 (node 0) node stationary (stand still) while other nodes mobile(or moving)?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.