Need help in ns2

82 views
Skip to first unread message

Lotus Khan

unread,
Oct 26, 2020, 8:56:20 AM10/26/20
to ns-u...@googlegroups.com
 
I want to integrate 6LoWPAN with PMIPv6 in ns2  to compare my proposed protocol with other mobility management protocols in LoW Power Wireless Networks.
Can any one help in this regard?

knudfl

unread,
Oct 26, 2020, 10:46:16 AM10/26/20
to Network Simulator 2 (NS2)
Hi.

The available code for 6LoWPAN and PMIPv6 is available for ns-2.29 ....

6LoWPAN_ns229.patch
https://drive.google.com/file/d/1cS0CSx4E6PVwDArKJzUfbJBbTtwU4LNo/view?usp=sharing

ns-2.29-nist-mob-022707.tgz
https://0cf449a4-a-62cb3a1a-s-sites.googlegroups.com/site/pmip6ns/pmipv6-for-ns-2/downloads/ns-2.29-nist-mob-022707.tgz
... or  https://drive.google.com/file/d/1R2_eUsQ3_sHqaPib7fS4Ij33PPalhJiu/view?usp=sharing

pmip6-for-ns-2.29-nist.patch
https://drive.google.com/file/d/1t7bKv551Cx_rQavksU7Lp6euKYZyuD8H/view?usp=sharing

6LoWPAN-for-ns229NIST.patch
https://drive.google.com/file/d/0B7S255p3kFXNeTlESTRMQ21hVWM/view?usp=sharing

INFO https://www.linuxquestions.org/questions/linux-newbie-8/how-to-integrate-pmipv6-with-6lowpan-on-ns2-please-help-4175609958/#3
-------------------------

The easy way to start tests is with an ns2 APP:
Will usually work with your current OS  ....
nist-pmip6-6lowpan-ns_2.29-ubuntu12_i386.deb
https://drive.google.com/file/d/1UuXjL2-rHphOV6C1M6eekmIWSqhiRxlT/view?usp=sharing

nist-pmip6-6LoWPAN-2.29-1.el6.i686.rpm
https://drive.google.com/file/d/1tinuKYju0EzwBMMXA2f2ctrnzXcLkaBu/view?usp=sharing
-------------------------

Building ns2 with the current 6LoWPAN / PMIPv6 code :
32bits old OS, either Ubuntu 11.04 - i386 or CentOS 6.10 - i386 is required.

Lotus Khan

unread,
Oct 26, 2020, 12:40:45 PM10/26/20
to ns-u...@googlegroups.com, knu...@ofir.dk
--
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/bf535522-933f-4ef9-9b68-a2369ee8cc13n%40googlegroups.com.

Sir i hv ns 2.35 will this work on it

knudfl

unread,
Oct 26, 2020, 2:53:18 PM10/26/20
to Network Simulator 2 (NS2)

»» ns 2.35 will this work on it «« :
ns-2.35 has a very different setup of the MAC code : ns-2.35/mac/**.
....  So usually it's not possible.
As far as I remember nobody have used 6LowPan with ns-2.35 .
And there isn't any known examples of nistmob + PMIPv6 with ns-2.35 .

»» I have ns 2.35 will this work on it «« :
You can have as many ns-allinone-2.xx as you want, installed at the same time

Lotus Khan

unread,
Oct 28, 2020, 3:09:59 AM10/28/20
to ns-u...@googlegroups.com
 I try to to run the command like the bellow and I get this
error, So can anyone help me with problem?
=============
~/Ns/ns-allinone-2.29/ns-2.29/pmip6$ ns pmip.tcl
invalid command name "Agent/PMIPv6"
    while executing
"Agent/PMIPv6 set debug_ $opt(debug)"
    (file "pmip.tcl" line 34)

knudfl

unread,
Oct 28, 2020, 7:51:56 AM10/28/20
to Network Simulator 2 (NS2)
Not quite clear what you are doing.
Please specify your OS.  Name, version, architecture  please.
Like this :  Ubuntu 10.04 - i386 .... Ubuntu 12.04 - amd64 .... etc. etc.
..... And please tell how you got a command  "ns" which might run the simulation.
Note :  "ns-new-name" is preferred when it's a new changed / patched ns2.

You are not supposed to run 'ns' from ns-2.29/pmip6/ ... and no default `pmip.tcl´ in ns-2.29/pmip6/.

Example : 
nist-pmip6-6lowpan-ns_2.29-ubuntu12_i386.deb provides /usr/local/bin/ns229-pmip6-nist-6LoWPAN-el6
.... So the simulation command is , example :
$ cd ex-nist-2018/    ## the examples can have any location in /home/**
$ ns229-pmip6-nist-6LoWPAN-el6 pmip.tcl


Your error  »»invalid command name "Agent/PMIPv6"«« :
You are using a copy of the executable 'ns' with no PMIPv6.

Lotus Khan

unread,
Oct 31, 2020, 9:33:42 AM10/31/20
to ns-u...@googlegroups.com
Can you please share me the tcl script of PMIPv6 or other examples related PMIPv6.

knudfl

unread,
Oct 31, 2020, 11:49:57 AM10/31/20
to Network Simulator 2 (NS2)

Lotus Khan

unread,
Nov 3, 2020, 3:22:28 AM11/3/20
to ns-u...@googlegroups.com
i got segmentation fault error when using xgraph with ns2.29

--
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.

Lotus Khan

unread,
Nov 3, 2020, 3:24:15 AM11/3/20
to ns-u...@googlegroups.com
all packets in my pmipv6 simulation are dropped and no one is received show by awk file

On Sat, Oct 31, 2020, 8:50 PM knudfl <knu...@ofir.dk> wrote:
--

knudfl

unread,
Nov 3, 2020, 5:59:19 AM11/3/20
to Network Simulator 2 (NS2)
REPEAT : Please specify your OS. Name, version, architecture please.
And :  Your simulation command is missing.

My tests .....
$ ns229-nist-pmip6-el6 pmip.tcl
num_nodes is set 6
INITIALIZE THE LIST xListHead
_o97 channelID = 2412000000.000000
_o127 channelID = 2437000000.000000
_o200 channelID = 2412000000.000000
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5,  distCST_ = 513.3
SORTING LISTS ...DONE!
Link Connect to AP 0 on Channel 1
Link Connect to AP 1 on Channel 6

----------------
$ grep "s "  trace.out | wc -l
23782
        ## I.e. 23782 packets were sent
Not that easy with $ grep "r "  trace.out because of cbr<space> in r lines :
$ grep "r "  trace.out | wc -l              ## cbr´s are counted too.
----------------
$ perl perl-all.pl trace.out
sent packets= 0
received packets= 11470
packets dropped=-11470
       ## No 'sent' results with awk or perl
       ## probably because of missing AGT/RTR/cbr in sent (s) lines.
----------------

My trace.out https://drive.google.com/file/d/14Zm39EgICJRPbkdOR3kOO6FC_BhgboXG/view?usp=sharing

~240 awk, perl ns2 scripts: Awk+Perl_ns2-scripts-07.19.tar.gz
https://drive.google.com/drive/folders/1rU_MFAEl1GCLMTJPLR3zbxPxkQQHkQ7T?usp=sharing

Lotus Khan

unread,
Nov 3, 2020, 9:58:23 AM11/3/20
to ns-u...@googlegroups.com
OS is ubuntu may be some thing wrong in tcl file but what ,can't understand what can be a problem.

knudfl

unread,
Nov 3, 2020, 10:25:01 AM11/3/20
to Network Simulator 2 (NS2)
Also important : Your simulation command is missing.  Please show.

Ubuntu : Please specify version and architecture.
Like Ubuntu 12.04 - amd64.
If it's an Ubuntu version later than version 11.04, the ns2 app nist-pmip6-6lowpan-ns_2.29-ubuntu12_i386.deb ( 2.8MB ) is required for test. Provides /usr/local/bin/ns229-pmip6-nist-6LoWPAN-el6 .
Which means the "ns command" is $ ns229-pmip6-nist-6LoWPAN-el6

Download .... and install :
$ sudo gdebi Downloads/nist-pmip6-6lowpan-ns_2.29-ubuntu12_i386.deb
      If the OS is 64bit, some 32bit dependencies will be installed too.

Lotus Khan

unread,
Nov 3, 2020, 10:45:29 AM11/3/20
to ns-u...@googlegroups.com
I install, nist-pmip6-6lowpan-ns_2.29-ubuntu12_i386.deb. And use "ns command" is $ ns229-pmip6-nist-6LoWPAN-el6 for simulating pmip.tcl file.
Simulation runs successfully nam and tr files are also created.but when analyze by awk code it shows packet sends 1000
Received 0
Dropped 1000

knudfl

unread,
Nov 3, 2020, 2:22:44 PM11/3/20
to Network Simulator 2 (NS2)
»» when analyze by awk code it shows packet sends 1000 «« :
Depends which script you are using. Please specify / upload / attach.
None of the many awk scripts I tested earlier today worked OK with the `trace.out´, so please do not expect it to be easy.
There isn't any "general" about creating an ns2 awk script.  The script must be a match for the trace file !
  • I found one "usable"  in my storage : packets.awk ... from Awk+Perl_ns2-scripts-0520.tar.gz .
$ awk -f packets.awk trace.out
GeneratedPackets = 8870

ReceivedPackets = 11472
Packet Delivery Ratio = 129.335
Total Dropped Packets = 7589
Average End-to-End Delay = 5001.53 ms

---------------------
My trace.out has 237,029 lines, is 15.8 MB.  How is yours ?

All 240 scripts,  Awk+Perl_ns2-scripts-0520.tar.gz

P.S.:  I have all major Ubuntu versions 8.04 ... 20.04 installed, to test ns2 simulations.
So I can also do a test with your version,  when you specify the version.

knudfl

unread,
Nov 3, 2020, 3:16:56 PM11/3/20
to Network Simulator 2 (NS2)
$ grep "s " trace.out | wc -l
23782
$ grep "r " trace.out | wc -l
225105
$ grep "cbr " trace.out | wc -l
213404
... Which means received (r) = 11701 packets     ( 225105 - 213404 ).

Lotus Khan

unread,
Nov 5, 2020, 9:05:03 AM11/5/20
to ns-u...@googlegroups.com
can all type of tr files be analyze on App tool master?
Any document which describe the use of app tool master.

knudfl

unread,
Nov 5, 2020, 9:37:37 AM11/5/20
to Network Simulator 2 (NS2)
ns2 APP-Tool

The awk scripts used in APP-Tool/Final/**  are among the "top 25" scripts which will match the most trace files

»» can all type of tr files be analyze on App tool master «« :
There are some trace files not matching the 20 scripts.

Lotus Khan

unread,
Nov 11, 2020, 4:05:55 AM11/11/20
to ns-u...@googlegroups.com
error occurs is segmentation fault after installing xgraph on ubuntu 17.10

Lotus Khan

unread,
Nov 11, 2020, 4:46:57 AM11/11/20
to ns-u...@googlegroups.com
error occurs is segmentation fault after installing xgraph on ubuntu 17.10

On Mon, Oct 26, 2020, 7:46 PM knudfl <knu...@ofir.dk> wrote:
--
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.

knudfl

unread,
Nov 11, 2020, 4:56:52 AM11/11/20
to Network Simulator 2 (NS2)
@khanlo... ,  Hi.

Later Ubuntu Xgraph packages :  No `xgraph´ package in the new Ubuntu versions.
Ubuntu 17.10 :  I'd suggest the older package that we are using in 18* ... 20.04 → →
xgraph_12.1-17_amd64.deb   ( It's the Ubuntu 16.04 version, I think )

Download .... and install
sudo gdebi Downloads/xgraph_12.1-17_amd64.deb
Reply all
Reply to author
Forward
0 new messages