olsr in ns2

99 views
Skip to first unread message

nuraina hazirah ibrahim

unread,
Jun 19, 2023, 9:13:04 AM6/19/23
to Network Simulator 2 (NS2)
hi sir, i am analysing data transmission in olsr including the performance metrics like throughput, dropped data and end-to-end delay. i generate the network environment from osm sumo. below i attached the link to my tcl, awk, mobility model and network route files. i get below error after running the tcl file. can you help me to solve this problem and can you check as well whether my awk file is correct because i can't get the dropped data value. please help me sir.
gdrive link : https://drive.google.com/drive/folders/15LLcAPMSiEHFC9dLnAenHT1Y7NazAiNt?usp=sharing

can't read "agent_addr_": no such variable
    while executing
"subst $[subst $var]"
    (procedure "_o488" line 5)
    (Object next line 5)
    invoked from within
"_o488 next agent_addr_"
    ("eval" body line 1)
    invoked from within
"eval $self next $args"
    (procedure "_o488" line 11)
    (Object next line 11)
    invoked from within
"_o488 next agent_addr_"
    ("eval" body line 1)
    invoked from within
"eval $self next $args"
    (procedure "_o488" line 13)
    (Application/Traffic/CBR set line 13)
    invoked from within
"$dst set agent_addr_"
    (procedure "_o3" line 2)
    (Simulator simplex-connect line 2)
    invoked from within
"$self simplex-connect $dst $src"
    (procedure "_o3" line 10)
    (Simulator connect line 10)
    invoked from within
"$ns_ connect $cbr($i) $tcp($i)"
    ("for" body line 6)
    invoked from within
"for {set i 0} {$i < $val(nn)-1} {incr i} {
    set cbr($i) [new Application/Traffic/CBR]
    $cbr($i) set packetSize_ 1000
    $cbr($i) set rate_ 1mb
..."
    (file "peta.tcl" line 89)

knudfl

unread,
Jun 20, 2023, 8:24:30 AM6/20/23
to Network Simulator 2 (NS2)
Hi.

"agent definition" → line 89
I have never seen a combination of TCP and CBR written in that way.
See ns-2.35/tcl/mobility/scene/cbr-3-test for a simple example.

I edited peta.tcl into two examples, 2-peta-2.tcl and 3-peta-3.tcl with valid traffic files: tcp20-20 and traffic-20-rate.2

About "mobility": The SUMO created file is for 50 nodes. I used another SUMO created file = mobmod-urban-malaga-S20.tcl

Link to 2-peta-2.tcl, 3-peta-3.tcl, tcp20-20, traffic-20-rate.2, mobmod-urban-malaga-S20.tcl →  https://drive.google.com/drive/folders/1fL321zuYQEzenr8d9m-zVfvleLlyTu7t?usp=sharing
--------

OLSR examples, olsr-examples-09.19.tar.gz
https://drive.google.com/file/d/19Q_nEXAP4DRFL3gx7a9fLEx5RQe-X9Ce/view?usp=sharing
... and https://neo.lcc.uma.es/staff/jamal/vanet/index.html%3Fq=node%252F11.html

nuraina hazirah ibrahim

unread,
Jun 20, 2023, 12:29:39 PM6/20/23
to Network Simulator 2 (NS2)
thank you sir!

knudfl

unread,
Jun 21, 2023, 4:57:17 AM6/21/23
to Network Simulator 2 (NS2)
About 'peta.awk' :
$ ns235-olsr-64 2-peta-2.tcl   → peta.tr 9.5MB is created
$ ns235-olsr-64 3-peta-3.tcl   → peta.tr 9.5MB is created

Same "awk analyzing" result from both peta.tr :

$ awk -f peta.awk peta.tr
Average End-to-End Delay = 676.406 ms
Generated Packets = 22832
Received Packets = 21107
Throughput = 426.43
Dropped Packets = 0
Total Dropped Data = 0 bytes

nuraina hazirah ibrahim

unread,
Jun 25, 2023, 4:24:36 PM6/25/23
to Network Simulator 2 (NS2)
tq sir!

Hameurlaine Hicham

unread,
Aug 9, 2023, 5:32:35 AM8/9/23
to Network Simulator 2 (NS2)
Hi all, I hope you are doing well, I want to get the packet loss and end to end delay using olsr with an area with obstacle, 
my question is how do I simulate the obstacles?
kind regard

knudfl

unread,
Aug 9, 2023, 6:06:42 AM8/9/23
to Network Simulator 2 (NS2)
@hichamham...

Hint ns2

Hint ns3, please see pages 13... 16

?More with Google:       ns2 obstacle model

hicham hicham

unread,
Aug 10, 2023, 9:57:44 AM8/10/23
to Network Simulator 2 (NS2)
@ knudfl
Thank you so much for your support, please, how can I modify the basic version of olsr? should I install a new patch? kind regard

knudfl

unread,
Aug 12, 2023, 7:44:24 AM8/12/23
to Network Simulator 2 (NS2)

@ham.hi... ,      Hi.

How to modify basic OLSR?       Modify some C++ code xxx.cc, etc. tcl/lib/ns-[file].tcl


cope+olsr_ns235.patch
Geo3D+olsr_ns235.patch
mpolsr_umolsr-v1_ns235.patch
OLSR-Dream_ns235.patch  (Lar, Dream)
OLSR_for-Antnet-patched_ns235.patch
olsr-for_LAR-patched_ns235.patch
umolsr_for-zrp-patched_ns235.patch

A patch is not required to modify some code, but when code has been modified, a patch can be created with the diff command : if you want 1. to present the code in one file, 2. to present an easy install with of code, 3. etc. easy storage of the code.
diff -Naur orig_ns-2.35/ ns-2.35(modified) > patch-name_ns235.patch

Hameurlaine Hicham

unread,
Aug 12, 2023, 8:52:52 AM8/12/23
to ns-u...@googlegroups.com
thank you Sir, @knudfl, please how to modify olsr protocol as  changing the computation of willingness....  

--
You received this message because you are subscribed to a topic in the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-users/_dA2vvdKdBQ/unsubscribe.
To unsubscribe from this group and all its topics, 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/bbeaa9fb-2f67-419e-8704-b3dbd6c539a1n%40googlegroups.com.

knudfl

unread,
Aug 12, 2023, 10:55:03 AM8/12/23
to Network Simulator 2 (NS2)
Reply all
Reply to author
Forward
0 new messages