Request for mobility protocol (mipv6, fhmipv6, pmipv6 & fpmipv6)

473 views
Skip to first unread message

Wong Wei Lok

unread,
May 26, 2023, 11:53:59 PM5/26/23
to Network Simulator 2 (NS2)
I trying to integrate mobility protocol in wireless mesh network environment, but i having difficultly to find all the protocol and the wireless mesh environment. Can anyone help me.

knudfl

unread,
May 27, 2023, 4:42:39 AM5/27/23
to Network Simulator 2 (NS2)

cd patches__All-ns2-patches/
ls | grep -i mip
fhmip+6LoWPAN_ns235.patch
fhmip_ns233.patch
fhmip_ns235.patch
mannasim+nist+pmip6_ns229.patch.gz
ns2.31_fhmip.patch
pmip6-for-ns-2.29-nist.patch

Wong Wei Lok

unread,
May 31, 2023, 1:24:48 AM5/31/23
to Network Simulator 2 (NS2)
thanks for ur help, mr knudfl.
I do want to ask that is where can i get fpmip protocol?
How to simulate wireles mesh scenario? 
Is there have the code that simulate wireless mesh scenario, so that just integrate it in the protocol's tcl file?

knudfl

unread,
May 31, 2023, 3:57:30 AM5/31/23
to Network Simulator 2 (NS2)
Google    simulate fpmip protocol
no results ?        Seems that no net-simulators have "fpmip" available ...
---
"How to simulate wireless mesh" :  You already got a link to "available ns2 code/ patches"

hwmp  →  hwmp_ns235.patch

And : Mesh-802.16_ns235.patch → "Wimax-Mesh-802.16"
$ cd patches/
$ ls | grep -i mesh
Mesh-802.16_ns233.patch
Mesh-802.16_ns235.patch
______________________

Examples .....

Hwmp : The example is `wireless-mitf.tcl´ →  ns-2.35/tcl/ex/wireless-mitf.tcl
----------------------------------------

Build example ............
$ tar xvf ns-allinone-2.35_gcc5.tar.gz
https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing&resourcekey=0-EyPhoScBFDb7ul0VFk6FZQ

$ cd ns-allinone-2.35/
$ patch -p0 < hwmp_ns235.patch
https://drive.google.com/file/d/0B7S255p3kFXNX2JhN2djdlFDRjA/view?usp=sharing
$ export CC=gcc-4.8 CXX=g++-4.8 && ./install
$ cd ns-2.35/
$ cp ns ns235-hwmp
$ sudo cp ns235-hwmp /usr/local/bin/
--------- Simulation ------------
$ ns235-hwmp wireless-mitf.tcl

Wong Wei Lok

unread,
Jun 2, 2023, 12:23:08 PM6/2/23
to Network Simulator 2 (NS2)
sir, could you help me on fpmip protocol

Wong Wei Lok

unread,
Jun 30, 2023, 4:04:22 PM6/30/23
to Network Simulator 2 (NS2)
I am facing problem to simulate MIPv6. I downloaded the fhmip_235.patch and follow the instruction to block unwanted code. During simulate it pops out the error and terminate the simulation. Can someone help me?
__(Error Message)_________________________________________________________________________________________________
8.000340 BS send ADS 1.0.0
8.014205 BS send ADS 3.1.0
8.019705 MH 1.0.1 received ADS with coa 3.1.0
dst of request 2.0.0 (MAP), packet 35
8.019705 MH 1.0.1 sends request to 3.1.0
8.019705 MH agent list [COA 1.0.0]: 3.1.0-(0/0 0) [1.0.0-(0/0 0)]
MAC_802_11: accessing MAC cache_ array out of range (src 2, dst 1, size 1)!
MAC_802_11: accessing MAC cache_ array out of range (src 1, dst 2, size 1)!
8.024292 BS 3.1.0 forwarding map-reg-request from 1.0.1 to MAP 2.0.0, packet 35
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o35: no target for slot 0
_o35 type: Classifier/Port/Reserve
content dump:
classifier _o35
0 offset
0 shift
2147483647 mask
1 slots
slot 1: _o36 (Classifier/Addr/MIPDecapsulator)
---------- Finished standard no-slot{} default handler ----------
_________________________________________________________________________________________________
Blocked Section:
At file mip.reg.cc
//#define MAP_MODE                        /* RCH */    // Remember to attach-mapagent $MAP in simula.tcl!!!
//#define FAST_HANDOVER                   /* RCH */
//#define FAST_MAP_HANDOVER               /* RCH */

//#define OPTIMIZED_HANDOFF              /* TS_JCW */   // RCH: Remember to turn OPTIMIZED_HANDOFF off for MIPv4 simulation

//#define MIP_QUIET
//#define FAST_QUIET                    /* RCH */

At file fhmip_simula.tcl
#HA - 5
set HA [$ns_ node 1.0.0]
#[$HA set regagent_] priority 3

#MN - 6
$ns_ node-config -wiredRouting OFF
set MN [$ns_ node 1.0.1]
[$MN set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]
$ns_ node-config -wiredRouting ON

#PAR - 7
set PAR [$ns_ node 3.1.0 2.0.0]
#[$PAR set regagent_] #priority 3

#NAR - 8
set NAR [$ns_ node 4.1.0 2.0.0]
#[$NAR set regagent_] #priority 4
...
#$ns_ attach-mapagent $MAP

knudfl

unread,
Jun 30, 2023, 4:59:30 PM6/30/23
to Network Simulator 2 (NS2)
» follow the instruction to block unwanted code « :  Which instructions ??

ns-2.35 + fhmip_235.patch :
The simulation "fhmip_simula.tcl" runs OK here .....
$ ns235-fhmip-64 fhmip_simula.tcl
Files {all.cwnd 286.6kB, traffic.nam 47.2MB, traffic.tr 32.8MB} are created.

Terminal output, see the file fhmip_simula__Text.out  (40482 lines, 3.1MB) →

Wong Wei Lok

unread,
Oct 9, 2023, 4:42:08 AM10/9/23
to Network Simulator 2 (NS2)
sir, i reinstall the ns2.35 and install the fhmip_235.patch and i run the simulation "fhmip_simula.tcl" but it shows 
" num_nodes is set 1
Wrong node routing agent!"

knudfl

unread,
Oct 9, 2023, 7:36:58 AM10/9/23
to Network Simulator 2 (NS2)
Build example FHMIP
sudo su
echo "deb [trusted=yes] http://dk.archive.ubuntu.com/ubuntu/ bionic main universe" >> /etc/apt/sources.list
exit
sudo apt update
sudo apt install g++ g++-4.8 autoconf libtool libxmu-dev

 

export CC=gcc-4.8 CXX=g++-4.8 && ./install
cd ns-2.35/
cp ns ns235-fhmip
sudo cp ns235-fhmip /usr/local/bin/
----- Simulation -----------
ns235-fhmip fhmip_simula.tcl
.... This way you are sure using the fhmip patched executable "ns" command.

You can have as many ns-allinone-2.xx as you want, installed at the same time

Wong Wei Lok

unread,
Oct 11, 2023, 10:09:54 AM10/11/23
to Network Simulator 2 (NS2)

Thank you, sir. My problem solved.

Next, i do want to try simulate other types of Mobile IP. 

By following simulation instruction in fhmip_simula.tcl, i do need to block the required part of code.

Below is the screenshot of the simulation instruction:

Screenshot 2023-10-10 101517.jpg

My question is how to block the part of code? Do i block the part correctly?
This is how i block out the code when i simulating Mobile IP. ( Below are the part of the code in both file)

mip-reg.cc:

//#define MAP_MODE                        /* RCH */    // Remember to attach-mapagent $MAP in simula.tcl!!!
//#define FAST_HANDOVER                   /* RCH */
//#define FAST_MAP_HANDOVER               /* RCH */

//#define OPTIMIZED_HANDOFF              /* TS_JCW */   // RCH: Remember to turn OPTIMIZED_HANDOFF off for MIPv4 simulation

//#define MIP_QUIET

//#define FAST_QUIET                    /* RCH */ 

 

fhmip_simula.tcl:

#HA - 5
set HA [$ns_ node 1.0.0]
#[$HA set regagent_] priority 3

#MN - 6
$ns_ node-config -wiredRouting OFF
set MN [$ns_ node 1.0.1]
[$MN set regagent_] set home_agent_ [AddrParams addr2id [$HA node-addr]]
$ns_ node-config -wiredRouting ON

#PAR - 7
set PAR [$ns_ node 3.1.0 2.0.0]

#[$PAR set regagent_] priority 3



#NAR - 8
set NAR [$ns_ node 4.1.0 2.0.0]

#[$NAR set regagent_] priority 4 

 

# RCH Attaching the MAP agent.
#$ns_ attach-mapagent $MAP       ;# Need to enable MAP_MODE in mip-reg.cc

 

*I block the lines(red colored line) using comment in both files.

Then, I start simulation and i notice that it not working like fhmip. It seems like no packet transferring occur and simulation ends fast.

Below is the code file that i used to block code
https://drive.google.com/drive/folders/1s5uCtoobkv_Y9FBmWs6hPDvmW8VovH1f?usp=drive_link

knudfl

unread,
Oct 11, 2023, 11:21:58 AM10/11/23
to Network Simulator 2 (NS2)
Images with text will often not be read.
My comments : I guess you know how to copy-paste a text.

"My question is how to block the part of code?" : Sorry, I do not write code. Suggest : Use do and try, till you have a result.

Wong Wei Lok

unread,
Oct 15, 2023, 12:38:28 PM10/15/23
to Network Simulator 2 (NS2)
Noted,sir.
How to use the xgraph?

knudfl

unread,
Oct 15, 2023, 1:02:07 PM10/15/23
to Network Simulator 2 (NS2)
Download, install Xgraph   xgraph_12.1-17_amd64.deb  
sudo apt install Downloads/xgraph_12.1-17_amd64.deb
( This Ubuntu 14* version works for all later Ubuntu versions.)

"VIII. Creating Output Files for Xgraph"   http://www.isi.edu/nsnam/ns/tutorial/nsscript4.html


Wong Wei Lok

unread,
Nov 15, 2023, 1:47:33 PM11/15/23
to Network Simulator 2 (NS2)
sir, can you teach me how to build pmipv6 protocol 

knudfl

unread,
Nov 15, 2023, 3:12:45 PM11/15/23
to Network Simulator 2 (NS2)
pmipv6 : The above post of May 27, 2023 : pmip6-for-ns-2.29-nist.patch
.... Search for pmip6-for-ns-2.29-nist.patch at https://groups.google.com/g/ns-users
...... use CentOS 6.10 - i386 or Ubuntu 10.10 - i386, if you want a new build.

Others are using one of my older builds, e.g.  nist-pmip6-ns_229-ubuntu12_i386.deb (4.3MB)
https://drive.google.com/file/d/0B7S255p3kFXNcWw3U3ZVTnZjWDQ/view?usp=sharing
... Povides /usr/local/bin/ns229-nist-pmip6-el6
Install with $ sudo apt install Downloads/nist-pmip6-ns_229-ubuntu12_i386.deb

Simulation : $ ns229-nist-pmip6-el6 pmip.tcl
Search for other pmipv6 ex
cd ex-nist-2019/
$ grep -Rin pmipv6 *
_____________


Build example ............
CentOS 6.10 : https://vault.centos.org/6.10/isos/i386/CentOS-6.10-i386-LiveDVD.iso
repo file  https://drive.google.com/file/d/1SCeRmo5mbbvzpVyBJcyfF69shD9Cr2IV/view?usp=sharing
# yum install gcc-c++ compat-gcc-34-c++ automake autoconf libtool libXmu-devel
$ tar xvf ns-allinone-2.29.3.tar.gz
$ cd ns-allinone-2.29/
$ tar xvf ns-2.29-nist-mob-022707.tgz
$ patch -p0 < pmip6-for-ns-2.29-nist.patch
$ export CC=gcc34 CXX=g++34 && ./install
$ cd ns-2.29/
$ copy ns ns-nist
$ su
# copy ns-nist /usr/local/bin/
........ Simulation : $ ns-nist pmip.tcl
Message has been deleted

knudfl

unread,
Nov 15, 2023, 3:41:31 PM11/15/23
to Network Simulator 2 (NS2)
ns-2.29-nist-mob-022707.tgz
https://drive.google.com/file/d/1R2_eUsQ3_sHqaPib7fS4Ij33PPalhJiu/view

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

On Wednesday, November 15, 2023 at 9:37:57 PM UTC+1 knudfl wrote:

ns-2.29-nist-mob-022707.tgz
https://drive.google.com/file/d/1R2_eUsQ3_sHqaPib7fS4Ij33PPalhJiu/view

knudfl

unread,
Nov 16, 2023, 4:10:12 AM11/16/23
to Network Simulator 2 (NS2)
Correction :  Ubuntu 10.10 - 32bit was mentioned for nistmob + pmipv6
 → The correct version is the 32bit Ubuntu 8.04 - i386

Wong Wei Lok

unread,
Nov 16, 2023, 10:51:39 AM11/16/23
to Network Simulator 2 (NS2)
System Version Ubuntu-8.04-desktop-i386
i try patch but show bash: patch command not found. there for i find the patch package through :
https://old-releases.ubuntu.com/ubuntu/pool/main/p/patch/ 
i download the patch_2.5.9-5_i386.deb and install in ubuntu
then i start patch with command patch -p0 < pmip-for-ns-2.29-nist.patch and the output is:

can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uNr ns-2.29-nist/hsntg/nd.cc ns-2.29/hsntg/nd.cc
|--- ns-2.29-nist/hsntg/nd.cc 2007-01-20 07:31:42.000000000 +0900
|+++ ns-2.29/hsntg/nd.cc 2009-08-11 15:14:27.031250000 +0900
--------------------------
File to patch:  

 i dont know how to solve this? Am i doing right?

knudfl

unread,
Nov 16, 2023, 11:30:59 AM11/16/23
to Network Simulator 2 (NS2)
Build example Ubuntu 8.04  ............

$ tar xvf ns-allinone-2.29.3.tar.gz
$ cd ns-allinone-2.29/
$ tar xvf ns-2.29-nist-mob-022707.tgz           →  Did you forget NISTMOB ?    
$ patch -p0 < pmip6-for-ns-2.29-nist.patch
./install
$ cd ns-2.29/
$ copy ns ns-nist
sudo copy ns-nist /usr/local/bin/

........ Simulation : $ ns-nist pmip.tcl

Wong Wei Lok

unread,
Nov 16, 2023, 12:55:35 PM11/16/23
to Network Simulator 2 (NS2)
Sir, i stuck on ./intall and the only gcc version i found in ubuntu 8.04 is gcc-4.2 and no g++ is not isntalled. 
The source of ns-allinone-2.29 is form https://sourceforge.net/projects/nsnam/files/allinone/
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
gcc -g   -c -o ctangle.o ctangle.c
cweb failed to make, but it's optional
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
if test -r gb_io.ch; then ctangle gb_io.w gb_io.ch; else ctangle gb_io.w; fi
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
============================================================
Checking for gcc...
Building static library libz.a version 1.2.3 with gcc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
gcc -O3 -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H   -c -o example.o example.c
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.4.11
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no


knudfl

unread,
Nov 16, 2023, 2:50:39 PM11/16/23
to Network Simulator 2 (NS2)
If you really want to do a new build yourself in the old Hardy, you will of course have to install the ns2 build tools.
Replace the text in /etc/apt/sources.list with this text

deb http://old-releases.ubuntu.com/ubuntu/ hardy main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hardy multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ hardy-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hardy-updates multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ hardy-backports main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hardy-backports multiverse universe
deb http://old-releases.ubuntu.com/ubuntu/ hardy-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ hardy-security multiverse universe

.... and then do   $ sudo apt-get update
Install g++ etc. :        $ sudo apt-get install g++ autoconf libtool libxmu-dev

Please know that everybody else have used the modern 32bit CentOS 6.10 - x86, released year 2018
https://distrowatch.com/?newsid=10252

knudfl

unread,
Nov 16, 2023, 3:28:59 PM11/16/23
to Network Simulator 2 (NS2)
For the right version of ns-allinone-2.29, you simply search for ns-allinone-2.29.3.tar.gz in Google
The first hit is (of course)               ns-allinone-2.29.3.tar.gz
Message has been deleted

Wong Wei Lok

unread,
Nov 17, 2023, 6:32:30 AM11/17/23
to Network Simulator 2 (NS2)
first of all, sir, my installation still having problem.
then i try ur previous build( nist-pmip6-ns_229-ubuntu12_i386.deb  )  in ubuntu 8.04 and simulate noah_example_traffic.tcl.
The result show almost all packets are dropped.  
Error output:
common/packet.h:333: warning: deprecated conversion from string constant to ‘char*’
common/packet.h:335: warning: deprecated conversion from string constant to ‘char*’
g++ -c -Wall  -DUSE_802_21 -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_11 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/home/wwl/Desktop/ns-allinone-2.29/tclcl-1.17 -I/home/wwl/Desktop/ns-allinone-2.29/otcl-1.11 -I/home/wwl/Desktop/ns-allinone-2.29/include -I/home/wwl/Desktop/ns-allinone-2.29/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./bluetooth -I./hsntg -I./hsntg/802_21 -I./wimax -I./interference -I./myevalvid -I./wpan -I./pmip6 -o trace/trace.o trace/trace.cc
In file included from trace/trace.cc:39:
./common/packet.h: In constructor ‘p_info::p_info()’:
./common/packet.h:215: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:216: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:217: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:218: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:219: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:220: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:221: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:222: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:223: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:224: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:225: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:226: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:227: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:228: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:229: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:230: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:231: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:232: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:233: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:234: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:236: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:237: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:238: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:239: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:240: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:241: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:243: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:244: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:245: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:246: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:247: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:248: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:249: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:250: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:251: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:252: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:253: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:254: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:255: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:256: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:258: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:259: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:261: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:262: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:263: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:266: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:269: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:272: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:275: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:278: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:281: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:285: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:288: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:289: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:290: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:291: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:292: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:293: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:295: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:296: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:297: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:301: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:302: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:304: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:305: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:308: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:311: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:313: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:316: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:318: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:319: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:320: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:323: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:324: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:325: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:326: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:327: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:328: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:329: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:330: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:332: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:333: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:335: warning: deprecated conversion from string constant to ‘char*’
In file included from trace/trace.cc:42:
./sctp/sctp.h: At global scope:
./sctp/sctp.h:705: error: extra qualification ‘SctpAgent::’ on member ‘DumpSendBuffer’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
make: *** [trace/trace.o] Error 1
Ns make failed!

knudfl

unread,
Nov 17, 2023, 10:06:57 AM11/17/23
to Network Simulator 2 (NS2)
My tests ..................
ns229-nist-pmip6-el6 noah_example_traffic.tcl
............. noah_example.nam 9.8MB, noah_example.tr 8.2MB

$ ns235-fhmip-64 noah_example_traffic.tcl
.............  noah_example.nam 433.9MB, noah_example.tr 213.3MB
**** May indicate that noah_example_traffic.tcl is better run with the FHMIP executable.

Wong Wei Lok

unread,
Nov 17, 2023, 11:32:22 AM11/17/23
to Network Simulator 2 (NS2)
Sir, i appreciate ur help but i still facing the install problem. I followed the step u gave and it still keep showing the same error

warning: deprecated conversion from string constant to ‘char*’ 
when building ns2.
Hope sir able to show me how to solve the problem
2. I also trying to install ns2.29 in centos 6.10 and how to use the repo file?

knudfl

unread,
Nov 17, 2023, 2:02:36 PM11/17/23
to Network Simulator 2 (NS2)
Right, Ubuntu 8.04 is problematic. May be the old recommendation is not valid for the updated 8.04 ....
ns-2.29 builds OK with g++-3.4, but cannot finish = the linking of 'ns' fails.
? There may be a solution with the Redhat RHEL 5 "compat-gcc-34-c++-3.4.6".


filename = CentOS610_32.repo
--------------------------------------------------------------------------------------------
[centos610-32]
name=CentOS-610
baseurl=https://vault.centos.org/6.10/os/i386/
gpgcheck=1

[centos610-32-updates]
name=CentOS-610-updates
baseurl=https://vault.centos.org/6.10/updates/i386/
gpgcheck=1

--------------------------------------------------------------------------------------------
If any issues, change  gpgcheck=1  to  gpgcheck=0
Using : Copy the file to   /etc/yum.repos.d/

knudfl

unread,
Nov 17, 2023, 2:44:04 PM11/17/23
to Network Simulator 2 (NS2)
Ubuntu 8.04 :  Right, the "compat-gcc-34-c++-3.4.6-4.1-i386-EL5" will do for "ns-2.29-nist"
I.e. ns2 code was originally all made and tested with the year ~200 redhat 7 - redhat 9 compilers, and later with RHEL 5.x and RHEL 6.x. (Or CentOS 5.11 , CentOS 6.10)
.... There's a big difference. Some original gcc's, e.g. gcc-4.8 had ~100 patches added by Debian / Ubuntu.
So when Ubuntu issues, "g++48" was used instead of "g++-4.8".

Ubuntu 8.04, install ....................
$ cd /
$ sudo tar xvf [path-to]/compat-gcc-34-3.4.6-4.1.i386.tar.gz
$ sudo tar xvf [path-to]/compat-gcc-34-c++-3.4.6-4.1.i386.tar.gz

The ns-allinone-2.29 build command is then
export CC=gcc34 CXX=g++34 && ./install

Wong Wei Lok

unread,
Nov 18, 2023, 2:15:15 AM11/18/23
to Network Simulator 2 (NS2)
Sir, the link access denied, it need to request access.
https://drive.google.com/drive/folders/1hkZcmGhNAL4AuVd6oVRaeReKZCThHvVN?usp=drive_link

knudfl

unread,
Nov 18, 2023, 4:11:49 AM11/18/23
to Network Simulator 2 (NS2)
OK, it's a new folder ... and I forgot to mark it "access for everybody with a  link",   sorry.
Access to {compat-gcc-34-3.4.6-4.1.i386.tar.gz compat-gcc-34-c++-3.4.6-4.1.i386.tar.gz}
... is changed now.

knudfl

unread,
Nov 18, 2023, 7:26:06 AM11/18/23
to Network Simulator 2 (NS2)
I got the time to create a real package.deb from the files  {compat-gcc-34-3.4.6-4.1.i386.tar.gz compat-gcc-34-c++-3.4.6-4.1.i386.tar.gz}
Package =  compat-gcc-34-c++_3.4.6-4.1el5_i386.deb

Download,  and install :
sudo gdebi compat-gcc-34-c++_3.4.6-4.1el5_i386.deb

Wong Wei Lok

unread,
Nov 18, 2023, 9:47:51 AM11/18/23
to Network Simulator 2 (NS2)
Sir, i appreciate ur help, my centos is successfully install and run ns2.29.
Sir, do you have any script to analysis fhmip and pmip trace file? 

knudfl

unread,
Nov 18, 2023, 11:29:42 AM11/18/23
to Network Simulator 2 (NS2)
? Which analysis do you want to do ??
 
Analyzing trace files : Awk+Perl_ns2-scripts-01.21.tar.xz
https://drive.google.com/file/d/1uuVmyH8QPe4SRz2g1dnpfCIMvP26pCDj/view?usp=sharing
......... the usual : You will have to test with a lot of scripts,  i.e. the script must be a match for the trace. Hence the many different analyzing scripts.


Examples ..............................................
$ ns229-nist-pmip6-el6 pmip.tcl    // trace.out , throughput.out
          ( throughput.out is a plot file for e.g. xgraph )
$ awk -f Avg_Tput.awk trace.out
      startTime:  0
       stopTime:  19
   receivedPkts:  91641
  avgTput[kbps]:  111616
----
$ awk -f 3packet1udp1.awk trace.out 
GeneratedPackets = 8870
ReceivedPackets = 11472
Packet Delivery Ratio = 129.335%
Total Dropped Packets = 7589
Average End-to-End Delay = 1936.38 ms
Packet Loss Ratio = -29.3348%
Forward Packets =0
Routing overhead =0
NRL =0
Average Throughput[kbps] = 2467.52Kbps
StartTime= 1
StopTime= 19.593604253

--------------------------------------------------------
$ ns235-fhmip-64 fhmip_simula.tcl     // traffic.tr
$ awk -f Avg_Tput.awk traffic.tr
      startTime:  0
       stopTime:  79
   receivedPkts:  77604
  avgTput[kbps]:  2780.7
----
$ awk -f all-new-performance.awk traffic.tr  
No of pkts send                 8210
No of pkts recv                 611
Packet_delivery_ratio(%):       7.44214 %  
Delay in ms:                   59.6669 ms  
Jitter in ms:                   130.392 ms  
jcount in ms:                   610
Total_Energy_Consumption:       0
Avg Residual Energy:            -0.375

-

Wong Wei Lok

unread,
Nov 19, 2023, 12:28:33 AM11/19/23
to Network Simulator 2 (NS2)
Sir, i want to do analysis about throughput, packet delivery ratio, and handover latency. 

knudfl

unread,
Nov 19, 2023, 4:40:01 AM11/19/23
to Network Simulator 2 (NS2)
"analysis about throughput, packet delivery ratio, and handover latency"
Well, then please read the `-scripts-overview-11´ , and test with all the listed scripts.

knudfl

unread,
Nov 19, 2023, 5:52:09 AM11/19/23
to Network Simulator 2 (NS2)
"handover latency" :   handover and latency are not mentioned together in any script.awk, script.pl

Wong Wei Lok

unread,
Nov 21, 2023, 9:04:57 AM11/21/23
to Network Simulator 2 (NS2)
Sir, does there any patch that successfully simulate MIP, FMIP and HMIP?
The result for fhmip patch is only available for fhmip, others protocols are failed to run after modify according to the instruction in the example tcl file.  

knudfl

unread,
Nov 21, 2023, 11:41:13 AM11/21/23
to Network Simulator 2 (NS2)

Wong Wei Lok

unread,
Dec 8, 2023, 5:25:58 AM12/8/23
to Network Simulator 2 (NS2)
Sir, How do i intergrate protocol in a same environment to run simulation. (eg. mesh network environment)
Could you show me the steps and do you have example for environment?

knudfl

unread,
Dec 8, 2023, 6:39:50 AM12/8/23
to Network Simulator 2 (NS2)
" Integrate protocol in a same environment " : If you want  Mesh  added together with another added protocol, please specify.


We have "Wimax Mesh" .... on the list of miscellaneous Wimax versions:
wimax-802.16@
wimax-802.16BS@
Wimax_802.16j@
Wimax-802-16j-adaptive-quantum@
wimax-awg-2.6@
Wimax.awg+LTE@
Wimax.awg+LTE+MPTCP@
Wimax-crosslayer@
Wimax-Mesh-802.16@ :    Mesh-802.16_ns235.patch
wimax-Mesh+wimax-802-16j-OFDMA/ :    Wimax-Mesh+802-16j-OFDMA_ns235.patch
Wimax__MIH@
wimax-NIST@
Wimax-OFDMA@
wimax_QoS@
wimax_v2.03@

Wong Wei Lok

unread,
Dec 9, 2023, 12:10:34 PM12/9/23
to Network Simulator 2 (NS2)
Hello, sir
I am new to ns2 and i am totally stuck for my project.
My project is to having protocols (MIP, FMIP, HMIP, FHMIP and PMIP) to run in a same Mesh environment(or scenario? I dont know are they the same things?)
However, i only manage to get simulate MIP, FHMIP and PMIP by using the examples i get from sir.
My next goal is to intergrate all protocols i get into a same mesh environment so that i can compare the performance of protocols.
Could sir guide me how to complete my goal?

knudfl

unread,
Dec 9, 2023, 1:25:07 PM12/9/23
to Network Simulator 2 (NS2)
ns2 {MIP, FMIP, HMIP, FHMIP and PMIP} + mesh :    I don't think so.
There are no usable examples. And really no {MIP, FHMIP, PMIP} + mesh.
The one "wimax-mesh" example is  a video transfer example: mesh.tcl .
edited to also ns-2.35 : Mesh-802.16_ns235.patch

If you want to do new inventions with {MIP, FMIP, HMIP, FHMIP and PMIP} + mesh :
Find a modern simulator which can do it
(or can do a couple of these protocols.)
Many specialists would say "ns2 is not used any more".
ns2: Not updated for many years, no official support from www.nsnam.org for 8+ years.

Hameurlaine Hicham

unread,
Dec 9, 2023, 3:27:40 PM12/9/23
to Network Simulator 2 (NS2)
you can use bonmotion

knudfl

unread,
Dec 9, 2023, 6:30:54 PM12/9/23
to Network Simulator 2 (NS2)
< hichamham....

Bonnmotion :
? Which model do you suggest for a mesh like scenario ?
Message has been deleted

Wong Wei Lok

unread,
Dec 10, 2023, 2:29:43 AM12/10/23
to Network Simulator 2 (NS2)
Sorry, sir. I left out the patch file name. The patch file i used is Mesh-802.16_2.35.patch
On Sunday, December 10, 2023 at 3:17:33 PM UTC+8 Wong Wei Lok wrote:
Hello sir, i do try Wimax-Mesh patch. However, faced installing problem after patching.

./common/packet.h: In static member function ‘static void p_info::initName()’:
./common/packet.h:311:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_TCP]= "tcp";
                ^
./common/packet.h:312:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_UDP]= "udp";
                ^
./common/packet.h:313:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_CBR]= "cbr";
                ^
./common/packet.h:314:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_AUDIO]= "audio";
                  ^
./common/packet.h:315:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_VIDEO]= "video";
                  ^
./common/packet.h:316:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_ACK]= "ack";
                ^
./common/packet.h:317:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_START]= "start";
                  ^
./common/packet.h:318:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_STOP]= "stop";
                 ^
./common/packet.h:319:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PRUNE]= "prune";
                  ^
./common/packet.h:320:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_GRAFT]= "graft";
                  ^
./common/packet.h:321:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_GRAFTACK]= "graftAck";
                     ^
./common/packet.h:322:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_JOIN]= "join";
                 ^
./common/packet.h:323:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_ASSERT]= "assert";
                   ^
./common/packet.h:324:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_MESSAGE]= "message";
                    ^
./common/packet.h:325:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_RTCP]= "rtcp";
                 ^
./common/packet.h:326:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_RTP]= "rtp";
                ^
./common/packet.h:327:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_RTPROTO_DV]= "rtProtoDV";
                       ^
./common/packet.h:328:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_CtrMcast_Encap]= "CtrMcast_Encap";
                           ^
./common/packet.h:329:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_CtrMcast_Decap]= "CtrMcast_Decap";
                           ^
./common/packet.h:330:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_SRM]= "SRM";
                ^
./common/packet.h:332:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_REQUEST]= "sa_req";
                    ^
./common/packet.h:333:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_ACCEPT]= "sa_accept";
                   ^
./common/packet.h:334:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_CONFIRM]= "sa_conf";
                    ^
./common/packet.h:335:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_TEARDOWN]= "sa_teardown";
                     ^
./common/packet.h:336:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_LIVE]= "live";
                 ^
./common/packet.h:337:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_REJECT]= "sa_reject";
                   ^
./common/packet.h:339:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_TELNET]= "telnet";
                   ^
./common/packet.h:340:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_FTP]= "ftp";
                ^
./common/packet.h:341:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PARETO]= "pareto";
                   ^
./common/packet.h:342:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_EXP]= "exp";
                ^
./common/packet.h:343:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_INVAL]= "httpInval";
                  ^
./common/packet.h:344:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_HTTP]= "http";
                 ^
./common/packet.h:345:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_ENCAPSULATED]= "encap";
                         ^
./common/packet.h:346:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_MFTP]= "mftp";
                 ^
./common/packet.h:347:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_ARP]= "ARP";
                ^
./common/packet.h:348:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_MAC]= "MAC";
                ^
./common/packet.h:349:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_TORA]= "TORA";
                 ^
./common/packet.h:350:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DSR]= "DSR";
                ^
./common/packet.h:351:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_AODV]= "AODV";
                 ^
./common/packet.h:352:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_MDART]= "MDART";
                  ^
./common/packet.h:353:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_IMEP]= "IMEP";
                 ^
./common/packet.h:355:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_RAP_DATA] = "rap_data";
                      ^
./common/packet.h:356:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_RAP_ACK] = "rap_ack";
                     ^
./common/packet.h:358:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    name_[PT_TFRC]= "tcpFriend";
                  ^
./common/packet.h:359:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_TFRC_ACK]= "tcpFriendCtl";
                     ^
./common/packet.h:360:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PING]="ping";
                 ^
./common/packet.h:362:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PBC] = "PBC";
                 ^
./common/packet.h:365:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    name_[PT_DIFF] = "diffusion";
                   ^
./common/packet.h:368:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_RTPROTO_LS] = "rtProtoLS";
                        ^
./common/packet.h:371:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_LDP] = "LDP";
                 ^
./common/packet.h:374:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
                 name_[PT_GAF] = "gaf";      
                               ^
./common/packet.h:377:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_REALAUDIO] = "ra";
                       ^
./common/packet.h:380:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PUSHBACK] = "pushback";
                      ^
./common/packet.h:384:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PGM] = "PGM";
                 ^
./common/packet.h:388:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_LMS]="LMS";
                ^
./common/packet.h:389:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_LMS_SETUP]="LMS_SETUP";
                      ^
./common/packet.h:391:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_SCTP]= "sctp";
                 ^
./common/packet.h:392:24: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
    name_[PT_SCTP_APP1] = "sctp_app1";
                        ^
./common/packet.h:395:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_SMAC]="smac";
                 ^
./common/packet.h:398:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_HDLC]="HDLC";
                 ^
./common/packet.h:401:16: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_XCP]="xcp";
                ^
./common/packet.h:404:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_BLTRACE]="BellLabsTrace";
                    ^
./common/packet.h:407:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_AOMDV]= "AOMDV";
                  ^
./common/packet.h:410:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_PUMA]="PUMA";
                 ^
./common/packet.h:413:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP]="DCCP";
                 ^
./common/packet.h:414:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_REQ]="DCCP_Request";
                     ^
./common/packet.h:415:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_RESP]="DCCP_Response";
                      ^
./common/packet.h:416:21: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_ACK]="DCCP_Ack";
                     ^
./common/packet.h:417:22: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_DATA]="DCCP_Data";
                      ^
./common/packet.h:418:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_DATAACK]="DCCP_DataAck";
                         ^
./common/packet.h:419:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_CLOSE]="DCCP_Close";
                       ^
./common/packet.h:420:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_CLOSEREQ]="DCCP_CloseReq";
                          ^
./common/packet.h:421:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_DCCP_RESET]="DCCP_Reset";
                       ^
./common/packet.h:423:18: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   name_[PT_NTYPE]= "undefined";
                  ^
In file included from wimax/common/wimax_debug.cc:21:0:
./wimax/mesh/wimsh_packet.h: In static member function ‘static unsigned int WimshMshDsch::pers2frames(WimshMshDsch::Persistence)’:
./wimax/mesh/wimsh_packet.h:234:30: error: ‘UINT_MAX’ was not declared in this scope
    ( p == FRAME128 ) ? 128 : UINT_MAX; }
                              ^
wimax/common/wimax_debug.cc: In static member function ‘static void WimaxDebug::print(WimshMshDsch*, FILE*, const char*)’:
wimax/common/wimax_debug.cc:208:65: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘std::list<WimshMshDsch::NghIE>::size_type {aka long unsigned int}’ [-Wformat=]
    dsch->myself().nextXmtMx_, dsch->myself().xmtHoldoffExponent_);
                                                                 ^
wimax/common/wimax_debug.cc:216:57: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘std::list<WimshMshDsch::AvlIE>::size_type {aka long unsigned int}’ [-Wformat=]
  fprintf (os, "%sAVAILABILITIES (%d)\n", hdr, avl.size());
                                                         ^
wimax/common/wimax_debug.cc:229:51: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘std::list<WimshMshDsch::ReqIE>::size_type {aka long unsigned int}’ [-Wformat=]
  fprintf (os, "%sREQUESTS (%d)\n", hdr, req.size());
                                                   ^
wimax/common/wimax_debug.cc:237:63: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘std::list<WimshMshDsch::GntIE>::size_type {aka long unsigned int}’ [-Wformat=]
  fprintf (os, "%sGRANTS/CONFIRMATIONS (%d)\n", hdr, gnt.size());
                                                               ^
make: *** [Makefile:95: wimax/common/wimax_debug.o] Error 1

knudfl

unread,
Dec 10, 2023, 6:12:30 AM12/10/23
to Network Simulator 2 (NS2)
Ref.  Mesh-802.16_2.35.patch
Warnings are "developer information".  Warnings must be omitted from the error output. Please delete the post.

The error output is ...........
In file included from wimax/common/wimax_debug.cc:21:0:
./wimax/mesh/wimsh_packet.h: In static member function ‘static unsigned int WimshMshDsch::pers2frames(WimshMshDsch::Persistence)’:
./wimax/mesh/wimsh_packet.h:234:30: error: ‘UINT_MAX’ was not declared in this scope

Mesh-802.16_2.35.patch : The code is old.  g++ version 4.1.2 is required → gcc41-c++_4.1.2-16_amd64.deb
(for a 64bit OS)
$ sudo apt install ./gcc41-c++_4.1.2-16_amd64.deb

The build command is then
$ export CC=gcc41 CXX=g++41 && ./install

.... alternatively : $ cd ns-2.35/ && make clean
.....edit the Makefile line 37 to    CPP = g++41
and do $ make

Wong Wei Lok

unread,
Dec 14, 2023, 8:27:49 AM12/14/23
to Network Simulator 2 (NS2)
I do want to ask how to show perfect layout of topology when executing the nam file?

Let fhmip_simula.tcl as example
I am using ns2.35, ubuntu version 22.04
After i simulate the tcl file and execute the .nam file, only wireless node is at right position others wired nodes are not at the coordinate that set in tcl file.
How to solve this problem?

knudfl

unread,
Dec 14, 2023, 12:30:04 PM12/14/23
to Network Simulator 2 (NS2)
$ ns235-fhmip fhmip_simula.tcl :  
1. As you can see from the nam animation, the nodes are shown in a line, despite very different y-axes settings.
2. The second example,  FHMIPv6-script-2.tcl has no nam file.
.... so I would say, that like some other cluster set-ups, nam is not really supported.
( Examples LEACH and Mannasim (cluster heads) have no NAM support.)

Supported is "fhmip_plot_seq.pl"
(comment out line 38 to:   # open(secondarytrace, '0') or die "couldn't open 0"; )
Examples plot output ...............
$ gnuplot
gnuplot> plot 'recv1.log'
gnuplot> plot 'recv8.log'  
gnuplot> plot 'send5.log'
gnuplot> plot 'send5.log' w lines
gnuplot> q
$ xgraph send7.log &

Wong Wei Lok

unread,
Dec 27, 2023, 1:45:58 AM12/27/23
to Network Simulator 2 (NS2)
sir i do want to ask what error is this and how to solve it?


--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o20: no target for slot 1
_o20 type: Classifier/Addr
content dump:
classifier _o20
0 offset
22 shift
1023 mask
0 slots

---------- Finished standard no-slot{} default handler ----------

knudfl

unread,
Dec 27, 2023, 4:15:04 AM12/27/23
to Network Simulator 2 (NS2)
» Classfier::no-slot{} default handler «   is a common error with ns2 simulations.

Please use Google           Classfier::no-slot{} default handler
Example  ...........

Solution (if any) :  The usual → Every detailed information is required .........
Upload the simulation (if it's a new unknown one)
Specify the OS ... like Ubuntu 16.04 - amd64  /  Ubuntu 8.04 - i386    etc.
Show your command .....  $ ns??

-

Wong Wei Lok

unread,
Dec 27, 2023, 6:57:35 AM12/27/23
to Network Simulator 2 (NS2)
Im using Centos 6.10 with ns2.29 installed nist-mob-pmipv6.patch
i try to modify one of the nist-mob-pmipv6-example, pmip.tcl
i added 4 more nodes, make changes on domain, cluster of each node.
Error occur when a new node is added a new node, n1 between lma and cn.

Below is the modified code

#variable settings
set opt(debug)          0
set opt(bwtracetime)    0.01
set opt(dfLinkDelay)    1ms ;#default link delay
set opt(cnLinkDelay)    10ms ;#cn-lma link delay
set opt(agentType)      Agent/UDP
set opt(sinkType)       Agent/LossMonitor
set opt(trafficType)    Application/Traffic/CBR

#if traffic is CBR
set opt(cbrInterval)    0.001
set opt(cbrPacketSize)  1000

# Parameter for wireless nodes
set opt(chan)           Channel/WirelessChannel    ;# channel type
set opt(prop)           Propagation/TwoRayGround   ;# radio-propagation model
set opt(netif)          Phy/WirelessPhy            ;# network interface type
set opt(mac)            Mac/802_11                 ;# MAC type
set opt(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
set opt(ll)             LL                         ;# link layer type
set opt(ant)            Antenna/OmniAntenna        ;# antenna model
set opt(ifqlen)         50                  ;# max packet in ifq
set opt(adhocRouting)   NOAH                       ;# routing protocol

set opt(x) 670    ;# X dimension of the topography
set opt(y) 670    ;# Y dimension of the topography

Mac/802_11 set basicRate_ 1Mb
Mac/802_11 set dataRate_ 11Mb
Mac/802_11 set RTSThreshold_  30000
Mac/802_11 set debug_ 0

#debug messages
Agent/PMIPv6 set debug_ $opt(debug)
Agent/PMIPv6/MAG set debug_ $opt(debug)
Agent/PMIPv6/LMA set debug_ $opt(debug)

#defines function for flushing and closing files
proc finish {} {
        global ns tf bf
        $ns flush-trace
close $tf
close $bf

        exit
}

proc record {} {
global ns bf sink opt

set time $opt(bwtracetime)

set bw [$sink set bytes_]

set now [$ns now]
puts $bf "$now [expr $bw/$time*8/100000]"

$sink set bytes_ 0
$ns at [expr $now+$time] "record"
}

#create the simulator
set ns [new Simulator]

#give random seed
#ns-random 0

#create the topography
set topo [new Topography]
$topo load_flatgrid $opt(x) $opt(y)

#open file for trace
set tf [open trace.out w]
$ns trace-all $tf

set namtracefd [open example.nam w]
$ns namtrace-all $namtracefd

#open file for throughput trace
set bf [open throughput.out w]

# set up for hierarchical routing (needed for routing over a basestation)
$ns node-config -addressType hierarchical
AddrParams set domain_num_ 5           ;# domain number
AddrParams set cluster_num_ {2 1 1 2 2}
AddrParams set nodes_num_ {1 1 2 1 1 1 1 1}

# Create God
create-god 9

#creates the in first addressing space.
set ha [$ns node 1.0.0]
$ha set X_ 500.0
$ha set Y_ 100.0
$ha set Z_ 0.0
$ns initial_node_pos $ha 20

set lma [$ns node 2.0.0]
$lma set X_ 350.0
$lma set Y_ 200.0
$lma set Z_ 0.0
$ns initial_node_pos $lma 20

#attach Agent/PMIPv6/LMA to the LMA
set lma_pm [$lma install-lma]

set cn [$ns node 0.0.0]
$cn set X_ 500.0
$cn set Y_ 300.0
$cn set Z_ 0.0
$ns initial_node_pos $cn 20

set n1 [$ns node 0.1.0]
$n1 set X_ 450.0
$n1 set Y_ 200.0
$n1 set Z_ 0.0
$ns initial_node_pos $n1 20

set n2 [$ns node 3.0.0]
$n2 set X_ 50.0
$n2 set Y_ 100.0
$n2 set Z_ 0.0
$ns initial_node_pos $n2 20

set n3 [$ns node 4.0.0]
$n3 set X_ 300.0
$n3 set Y_ 100.0
$n3 set Z_ 0.0
$ns initial_node_pos $n3 20

#BE CAREFUL!. PMIPv6 agent must be installed before connecting link(duplex-link)
$ns duplex-link $n1 $lma 100Mb $opt(dfLinkDelay) DropTail
$ns duplex-link $cn $n1 100Mb $opt(cnLinkDelay) DropTail
$ns duplex-link $ha $n1 100Mb $opt(dfLinkDelay) DropTail


#define coverage area for base station: 20m coverage
Phy/WirelessPhy set Pt_ 0.025
Phy/WirelessPhy set RXThresh_ 2.025e-12
Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]]

#creates the Access Point (Base station)
$ns node-config -adhocRouting $opt(adhocRouting) \
                 -llType $opt(ll) \
                 -macType $opt(mac) \
                 -ifqType $opt(ifq) \
                 -ifqLen $opt(ifqlen) \
                 -antType $opt(ant) \
                 -propType $opt(prop)    \
                 -phyType $opt(netif) \
                 -channel [new $opt(chan)] \
                 -topoInstance $topo \
                 -wiredRouting ON \
                 -agentTrace ON \
                 -routerTrace OFF \
                 -macTrace ON  \
                 -movementTrace OFF

#create MAG1
set mag1 [$ns node 3.1.0]
$mag1 random-motion 0
$mag1 set X_ 100.0
$mag1 set Y_ 200.0
$mag1 set Z_ 0.0
$ns initial_node_pos $mag1 20

#NIST settings
set mag1_mac [$mag1 getMac 0]
set mag1_addr [$mag1_mac id]
$mag1_mac bss_id $mag1_addr
$mag1_mac set-channel 1
$mag1_mac enable-beacon
[$mag1 set netif_(0)] setTechno 802.11

#install PMIPv6/MAG agent to the MAG1
set mag1_pm [$mag1 install-mag]
set lmaa [$lma node-addr]
$mag1_pm set-lmaa [AddrParams addr2id $lmaa]

#setup 802.11 MAC to support MN ATTACH Event
$mag1_mac set use_pmip6_ext_ 1
$mag1_mac pmip6-agent $mag1_pm

#Create MAG2
set mag2 [$ns node 4.1.0]
$mag2 random-motion 0
$mag2 set X_ 600.0
$mag2 set Y_ 200.0
$mag2 set Z_ 0.0
$ns initial_node_pos $mag2 20

#NIST settings
set mag2_mac [$mag2 getMac 0]
set mag2_addr [$mag2_mac id]
$mag2_mac bss_id $mag2_addr
$mag2_mac set-channel 6
$mag2_mac enable-beacon
[$mag2 set netif_(0)] setTechno 802.11

#install PMIPv6/MAG agent to the MAG1
set mag2_pm [$mag2 install-mag]
$mag2_pm set-lmaa [AddrParams addr2id $lmaa]

#setup 802.11 MAC to support MN ATTACH Event
$mag2_mac set use_pmip6_ext_ 1
$mag2_mac pmip6-agent $mag2_pm

#ALSO, installing PMIPv6/MAG must come first before duplex-link
$ns duplex-link $mag1 $n2 100Mb $opt(dfLinkDelay) DropTail
$ns duplex-link $mag2 $n3 100Mb $opt(dfLinkDelay) DropTail
$ns duplex-link $n2 $lma 100Mb $opt(dfLinkDelay) DropTail
$ns duplex-link $n3 $lma 100Mb $opt(dfLinkDelay) DropTail

# creation of the mobile nodes
$ns node-config -wiredRouting OFF \
                -macTrace ON   ;# Mobile nodes cannot do routing.

Mac/802_11 set dataRate_ 11Mb

#Create mobile node
set mn [$ns node 1.0.1]
$mn random-motion 0
$mn base-station [AddrParams addr2id [$mag1 node-addr]]
$mn set X_ 100.0
$mn set Y_ 500.0
$mn set Z_ 0.0
$ns initial_node_pos $mn 20

#NIST settings
set mn_mac [$mn set mac_(0)]
[$mn set mac_(0)] set-channel 1
[$mn set netif_(0)] setTechno 802.11

#add MN-ID to the prefix_pool of LMA
#with ns-2, node's address cannot be changed.
#so, we use full MN's address as if it were MN's prefix
$lma_pm register-mn-addr [$mn_mac id] [AddrParams addr2id [$mn node-addr]]


#Traffic setup
set agent [new $opt(agentType)]
$agent set class_ 2
$ns attach-agent $cn $agent

set traffic [new $opt(trafficType)]
$traffic attach-agent $agent

if { $opt(trafficType) == "Application/Traffic/CBR" } {
$traffic set packetSize_ $opt(cbrPacketSize)
$traffic set interval_ $opt(cbrInterval)
}

set sink [new $opt(sinkType)]
$ns attach-agent $mn $sink

$ns connect $agent $sink

$ns at 0.0 "record"

$ns at 0.5 "$traffic start"
$ns at 19.5 "$traffic stop"


$ns at 1.0 "$mn setdest 600.00 500.00 50.00"
$ns at 90 "finish"

$ns run

knudfl

unread,
Dec 27, 2023, 1:56:05 PM12/27/23
to Network Simulator 2 (NS2)
"raymonw-pmip-Noah.tcl" :
So far no solution.  Something must be changed or simplified :  It's do and try

-

Wong Wei Lok

unread,
Dec 30, 2023, 1:46:31 PM12/30/23
to Network Simulator 2 (NS2)
sir, i do want to ask is there any example of mipv6 that do inter mobility?
I try to modified example code of mobiwan-examples-1.tar.gz, but fail to get it.
Is that the patch not support inter mobility management?

My system is Centos 6.10 using ns2.33 

knudfl

unread,
Dec 31, 2023, 4:26:34 AM12/31/23
to Network Simulator 2 (NS2)
"inter mobility" is not a generally known term in networking
I.e.  Google       inter mobility networking :   No hits related to network ? ?  I think

Please explain how "inter mobility" is supposed to work,  and in which context.

-

Wong Wei Lok

unread,
Dec 31, 2023, 5:01:30 AM12/31/23
to Network Simulator 2 (NS2)
All nodes in examples provided in mobiwan-examples-1.tar.gz are in same domain with different cluster except correspondent node(cn).
The mobile able to stay connected while moving to different Base Station(bs) nodes that located at different cluster .
I do want to simulate the mobile node able to establish connection while moving towards a BS node with different domain than mobile node

knudfl

unread,
Dec 31, 2023, 6:06:57 AM12/31/23
to Network Simulator 2 (NS2)
mobiwan-examples-1.tar.gz
→   { 2-Basic-Mobile-IPv6-example.tcl mobiwan_test_bidirct.tcl mobiwan_test_faster.tcl \
mobiwan_test_mntomn.tcl simple3_mipv6.tcl simple-mipv6.tcl }

-

knudfl

unread,
Dec 31, 2023, 7:29:31 AM12/31/23
to Network Simulator 2 (NS2)
There are alternative "mobiwan"s :  
1.   ns-2.33-mobiwan-an-110617.patch → mobiwan-an-110617__ns233.tar.gz
   $ cd ns-allinone-2.33
   $ patch -p1 < ns-2.33-mobiwan-an-110617.patch

2. ns-233-mobiwan-rfc3775-1.patch  ?an extension to mobiwan-1  ??
https://drive.google.com/file/d/1RAqhg3NOYsQZT0-kFbas45P7fwKtbCTz/view?usp=drive_link
$Id: ns-233-mobiwan-rfc3775-1.patch 192 2008-05-06 05:59:58Z omehani $
Adapation of the ns-2.32 patch [0] adding more RFC3775 compliance (based on [1]) to ns-2.33. 

-


-
Reply all
Reply to author
Forward
0 new messages