Follow the below given steps:
For errors,
1.
- Download ns-allinnone-2.34 from nasam website
- Create a folder in home with name ns2
- Extract the tar file in ns2
- Open terminal and type cd ns2/ns-allinone-2.34
- Install required libraries for ns2 using terminal
- Then, sudo ./install
For errors,
1.
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Bad value
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
In otcl-1.13/configure, line number 6304
-SHLIB_LD="ld -shared"
+SHLIB_LD="gcc -shared"
2.
tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’:
tools/ranvar.cc:219:70: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive]
tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive]
make: *** [tools/ranvar.o] Error 1
Solution:
In ns-2.34/tools/ranvar.cc, line 219
-return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
+return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
3.
In file included from mac/mac-802_11Ext.cc:66:0:
mac/mac-802_11Ext.h: In member function ‘u_int32_t PHY_MIBExt::getHdrLen11()’:
mac/mac-802_11Ext.h:175:19: error: expected primary-expression before ‘struct’
mac/mac-802_11Ext.h:175:41: error: ‘dh_body’ was not declared in this scope
mac/mac-802_11Ext.h:175:51: error: ‘offsetof’ was not declared in this scope
mac/mac-802_11Ext.h:177:3: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [mac/mac-802_11Ext.o] Error 1
Ns make failed!
Solution:
In mac/mac-802_Ext.h, line 65
+#include<cstddef>
4.
mobile/nakagami.cc: In member function ‘virtual double Nakagami::Pr(PacketStamp*, PacketStamp*, WirelessPhy*)’:
mobile/nakagami.cc:183:73: error: cannot call constructor ‘ErlangRandomVariable::ErlangRandomVariable’ directly [-fpermissive]
mobile/nakagami.cc:183:73: error: for a function-style cast, remove the redundant ‘::ErlangRandomVariable’ [-fpermissive]
mobile/nakagami.cc:185:67: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive]
mobile/nakagami.cc:185:67: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive]
make: *** [mobile/nakagami.o] Error 1
Solution:
In ns-2.34/mobile/nakagami.cc, Line no.
-if (int_m == m) {
- resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value();
- } else {
- resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value();
- }
- return resultPower;
- }
+if (int_m == m) {
+ resultPower = ErlangRandomVariable(Pr/m, int_m).value();
+ } else {
+ resultPower = GammaRandomVariable(m, Pr/m).value();
+ }
+ return resultPower;
+ }
Path Setup:
# LD_LIBRARY_PATH
OTCL_LIB=/home/ramakrishna/ns2/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/ramakrishna/ns2/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ramakrishna/ns2/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ramakrishna/ns2/ns-allinone-2.34/bin:/home/ramakrishna/ns2/ns-allinone-2.34/tcl8.4.18/unix:/home/ramakrishna/ns2/ns-allinone-2.34/tk8.4.18/unix
NS=/home/ramakrishna/ns2/ns-allinone-2.34/ns-2.34/
NAM=/home/ramakrishna/ns2/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
ld: final link failed: Bad value
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
In otcl-1.13/configure, line number 6304
-SHLIB_LD="ld -shared"
+SHLIB_LD="gcc -shared"
2.
tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’:
tools/ranvar.cc:219:70: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive]
tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive]
make: *** [tools/ranvar.o] Error 1
Solution:
In ns-2.34/tools/ranvar.cc, line 219
-return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
+return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
3.
In file included from mac/mac-802_11Ext.cc:66:0:
mac/mac-802_11Ext.h: In member function ‘u_int32_t PHY_MIBExt::getHdrLen11()’:
mac/mac-802_11Ext.h:175:19: error: expected primary-expression before ‘struct’
mac/mac-802_11Ext.h:175:41: error: ‘dh_body’ was not declared in this scope
mac/mac-802_11Ext.h:175:51: error: ‘offsetof’ was not declared in this scope
mac/mac-802_11Ext.h:177:3: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [mac/mac-802_11Ext.o] Error 1
Ns make failed!
Solution:
In mac/mac-802_Ext.h, line 65
+#include<cstddef>
4.
mobile/nakagami.cc: In member function ‘virtual double Nakagami::Pr(PacketStamp*, PacketStamp*, WirelessPhy*)’:
mobile/nakagami.cc:183:73: error: cannot call constructor ‘ErlangRandomVariable::ErlangRandomVariable’ directly [-fpermissive]
mobile/nakagami.cc:183:73: error: for a function-style cast, remove the redundant ‘::ErlangRandomVariable’ [-fpermissive]
mobile/nakagami.cc:185:67: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive]
mobile/nakagami.cc:185:67: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive]
make: *** [mobile/nakagami.o] Error 1
Solution:
In ns-2.34/mobile/nakagami.cc, Line no.
-if (int_m == m) {
- resultPower = ErlangRandomVariable::ErlangRandomVariable(Pr/m, int_m).value();
- } else {
- resultPower = GammaRandomVariable::GammaRandomVariable(m, Pr/m).value();
- }
- return resultPower;
- }
+if (int_m == m) {
+ resultPower = ErlangRandomVariable(Pr/m, int_m).value();
+ } else {
+ resultPower = GammaRandomVariable(m, Pr/m).value();
+ }
+ return resultPower;
+ }
Path Setup:
- In terminal sudo gedit ~/.bash_aliases
- Then copy the following path and modify according to your system path
# LD_LIBRARY_PATH
OTCL_LIB=/home/ramakrishna/ns2/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/ramakrishna/ns2/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ramakrishna/ns2/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ramakrishna/ns2/ns-allinone-2.34/bin:/home/ramakrishna/ns2/ns-allinone-2.34/tcl8.4.18/unix:/home/ramakrishna/ns2/ns-allinone-2.34/tk8.4.18/unix
NS=/home/ramakrishna/ns2/ns-allinone-2.34/ns-2.34/
NAM=/home/ramakrishna/ns2/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
- Save the file and type source ~/.bash_aliases
can u provide wimax patch for the above procedure in wimax as i am working in NS2
ReplyDeleterayuvaraj@gmail.com
I think below given link will help you to continue...
Deletehttp://www.lrc.ic.unicamp.br/wimax_ns2/
Hi Ramakrishna, do you know how to run more than 1 instances of NS 2.34 at a time?
DeleteI have access to a 16 core server and I need to run many simulations on NS, but I only can run one simulation at a time..
Do you have any hints on how to speed up the process and use the 16 cores?
Thanks and nice tutorial, it helped me a lot!
Hi,
DeleteThank you for your comments.
Regarding your query, as per my knowledge, if you want to run multiple TCL scripts, you can run it in multiple terminal.
larations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Deletelinkstate/ls.h:137:20: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
karthick@karthick-Veriton-M275:~/ns_nano/ns-allinone-2.35$
now what can i do
Dear Karthick,
DeleteIf you give more details about the problem, I can try to help you to solve this error....
If you get solution please share it with me.
great this steps wworks fine in 12.04 ubuntu as well
Deletethank you
how to uninstall ns-allinone-2.35
Deletehow to uninstall ns-allinone-2.35
Deletei want to installnns-allinone-2.34 by uninstalling ns-allinone-2.35.pls send me the steps.
DeleteHi Ramakrishna,
ReplyDeleteI have upgraded my ubuntu to 12.04.1 LTS. While running tcl scripts in ns2 I was getting the error:
-----------------------------------------------------------------------
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
-----------------------------------------------------------------------
After this I did a make and got a compilation error. So I decided to reinstall the ns2. I removed the ns-allinone-2.34 directory and followed the steps (till source ~/.bash_aliases) as mentioned in your blog.
I am still getting the above mentioned error upon running a tcl script:
-----------------------------------------------------------------------
using backward compatible Agent/CBR; use Application/Traffic/CBR instead
-----------------------------------------------------------------------
Please help me.
Regards,
amar
amarnath.patra@gmail.com
Dear Amar,
DeleteIn your TCL script file, change Agent/CBR to Application/Traffic/CBR. Then it will work fine I suppose.
Please update the same.
I had already tried it, when I do the replacement I get a runtime error:
DeleteSegmentation fault (core dumped)
That's why I tried to reinstall ns2 on my new version, but still I get the same issue.
When I ran ./validate I got this report:
----------------------------------------------------
validate overall report: some portable tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
some non-portable tests also failed:
./test-all-session
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
----------------------------------------------------
I had not done the step 'sudo gedit ~/.bash_aliases'then so I completed this step followed by 'source ~/.bash_aliases' and then tried to run a script, but still getting the previous error.
-amar
Hi,
DeleteI have the exact problem as you. Could you solve this?
Plesae let me know..
Behnaz
i get the following error when i install ns 2.35 in ubuntu 12.04..
ReplyDeleteI receive the following error while installing ns 2.35 (sudo ./install) in ubuntu.
config.status: creating Makefile
rm -f libotcl.a otcl.o
gcc -V 4.5 -c -g -O2 -DNDEBUG -DUSE_SHM -DHAVE_UNISTD_H=1 -I. -I/home/arya/ns-allinone-
2.35/include -I/home/arya/ns-allinone-2.35/include -I/home/arya/ns-allinone-
2.35/include -I/include otcl.c
gcc: error: 4.5: No such file or directory
gcc: error: unrecognized option ‘-V’
make: * [libotcl.a] Error 1
otcl-1.14 make failed! Exiting ...
I changed the Makefile.in in /ns-allinone-2.35/otcl-1.14
CC = @CC@ -V 4.6.3
where -V 4.6.3 represents the gcc version.
H
ow to remove this error. Please help. Could not find any related help in google.
Hi,
DeleteSorry Vivek, I have not come across this error. I am trying to locate the error, once I get the solution, I will update.
Hello sir, thanks for the blog! It's quite helpful. I was able to install the ns2 successfully and added the path also. After giving the command ./validate, could you please tell me the message returned on successful installation.
ReplyDeleteHi,
ReplyDeleteOnce you run ./validate, if it is successful you will get following message:
Test output agrees with reference output
Running test wired:
../../ns test-suite-satellite.tcl wired QUIET
Test output agrees with reference output
Running test aloha:
../../ns test-suite-satellite.tcl aloha QUIET
Test output agrees with reference output
Running test aloha.collisions:
../../ns test-suite-satellite.tcl aloha.collisions QUIET
Test output agrees with reference output
Running test mixed.legacy:
../../ns test-suite-satellite.tcl mixed.legacy QUIET
Test output agrees with reference output
All test output agrees with reference output.
Tue Nov 6 11:49:45 IST 2012
These messages are NOT errors and can be ignored:
warning: using backward compatibility mode
This test is not implemented in backward compatibility mode
validate overall report: all tests passed
Hi Ramakrishna,
ReplyDeleteI am working on promiscuous mode in AODV. It is working fine, but the moment I put any logic to check the packet header, in the tap function, cbr applications stop running.
I am following the link:
https://www.cse.msu.edu/~wangbo1/ns2/nshowto1.html
Please guide me through this.
-amar
Hi Amar,
DeletePlease tell me the changes you have done in tap function.
Following are the changes (inside tap function):
Delete----------------------------------
struct hdr_cmn *ch = HDR_CMN(p);
if(ch->ptype() == PT_AODV) {
printf("overheard an AODV packet: \t");
}
struct hdr_aodv *ah = HDR_AODV(p);
/*
* Incoming Packets.
*/
switch(ah->ah_type) {
case AODVTYPE_RREQ:
printf("RREQ");
break;
case AODVTYPE_RREP:
printf("RREP");
break;
case AODVTYPE_RERR:
printf("RERR");
break;
case AODVTYPE_HELLO:
printf("HELLO");
break;
default:
printf("Invalid AODV type (%x)", ah->ah_type);
exit(1);
}
if(DATA_PACKET(ch->ptype()))
{
printf("data packet:");
}
----------------------------------------
Regards
amar
As I understood from the sample code you sent, you have to put the SWITCH-CASE block with in IF block. Try it and let me know.
DeleteI think I did it!!
DeleteJust now I did a small change, now the code looks like this:
--------------------------------------
printf("\n prom mode: my Address is =%d", index);
struct hdr_cmn *ch = HDR_CMN(p);
if(ch->ptype() == PT_AODV) {
printf("overheard an AODV packet: \t");
struct hdr_aodv *ah = HDR_AODV(p);
switch(ah->ah_type) {
case AODVTYPE_RREQ:
printf("RREQ");
break;
case AODVTYPE_RREP:
printf("RREP");
break;
case AODVTYPE_RERR:
printf("RERR");
break;
case AODVTYPE_HELLO:
printf("HELLO");
break;
default:
printf("Invalid AODV type (%x)", ah->ah_type);
exit(1);
}
}
if(DATA_PACKET(ch->ptype()))
{
printf("data packet:");
}
---------------------------------------
I included the switch case inside the previous if condition, thats all.
I am not sure why was the previous code, that I had sent to you, was causing the cbr application to not start at all.
Now with this modified code, the cbr applications are running, I am getting overhead packet message( through the printfs). The data packets are also seem to be overheard.
-Regards
amar
It seems you replied back before I did. Yes, you were right. You pointed out the mistake.
DeleteIts working now. But why would the cbr applications wouldnt run before? This is what I am trying to figure out.
Thanks for your help, Ramakrishna.
Regards,
amar
Yes, It will CBR because, all the Agent objects enters into the recv function of all protocols. So it is our duty to restrict the execution for particular type. In CBR, there is no AODVTYPE_RREQ, etc. which leads and error and comes out of the execution.
DeleteThanks a lot for the help and the explanation.
DeleteRegards,
amar
Hi How did you solve this error .....
ReplyDeletelinkstate/ls.h:137:20: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!
Can you please help
Thanks
Regards
Adnan
Hi,
DeleteThe error is due to libraries.
To solve this error you need to update all the library and install supporting libraries.
For more details you can use below given log file:
http://clang.debian.net/logs/2011-09-11/ns2_2.35~RC8-1_lsid64c.buildlog
http://clang.debian.net/status.php?version=2.9&key=USE_OF_UNDECLARED_IDENTIFIER
Hello sir i tried to install this cpuma to ns 2.35. i downloaded the files from : http://sourceforge.net/projects/cpuma/
ReplyDeletei proceeded as the instructions in the install file. but after doing every thing and after re-installing ns2.33 with the edited files when i run my TCL code i get the following errors:
invalid command name "Agent/CPUMA"
while executing
"Agent/CPUMA create _o17 0"
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/CPUMA [$node node-addr]"
(procedure "_o3" line 2)
(Simulator create-cpuma-agent line 2)
invoked from within
"$self create-cpuma-agent $node"
("CPUMA" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
CPUMA {
set ragent [$self create-cpuma-agent $node]
}
PUMA {
set ragent [$self create-puma-agent $node]
}
DSDV {
set ra..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
("for" body line 2)
invoked from within
"for {set i 0} { $i < $val(nn) } { incr i } {
set node_($i) [$ns node]
}"
in the tcl file i just replaced PUMA with CPUMA
i.e.
set val(rp) CPUMA
$ns node-config -adhocRouting $val(rp) \
am i doing it wrong?? Please help. Thanx
hello sir, i tried to install this cpuma to ns 2.33. i downloaded the files from : http://sourceforge.net/projects/cpuma/
ReplyDeletei proceeded as the instructions in the install file. but after doing every thing and after re-installing ns2.33 with the edited files when i run my TCL code i get the following errors:
invalid command name "Agent/CPUMA"
while executing
"Agent/CPUMA create _o17 0"
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/CPUMA [$node node-addr]"
(procedure "_o3" line 2)
(Simulator create-cpuma-agent line 2)
invoked from within
"$self create-cpuma-agent $node"
("CPUMA" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
CPUMA {
set ragent [$self create-cpuma-agent $node]
}
PUMA {
set ragent [$self create-puma-agent $node]
}
DSDV {
set ra..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns node"
("for" body line 2)
invoked from within
"for {set i 0} { $i < $val(nn) } { incr i } {
set node_($i) [$ns node]
}"
in the tcl file i just replaced PUMA with CPUMA
i.e.
set val(rp) CPUMA
$ns node-config -adhocRouting $val(rp) \
am i doing it wrong?? Please help. Thanx
Hi,
DeleteCan you send me the TCL script which you are trying to execute.
rkmundugar@gmail.com
Hi Ramakrishna,
ReplyDeleteI want to run a cbr application with the following details:
Total data : 5MB
Size of packet: 512 B
Simulation time: 600 sec
---------------------------------------------
My calculations:
Number of packets = 5 * (1024) * (1024) / 512 = 10240.
packet interval = 600 / 10240 = 0.05859375
---------------------------------------------
The setting in the tcl file:
$cbr_(0) set packetSize_ 512
$cbr_(0) set interval_ 0.05859375
$cbr_(0) set maxpkts_ ????
What does the value '$cbr_(0) set maxpkts_' in the tcl file signify?
Should I change it to 10240?
Regards
amar
God Bless!
ReplyDeletehi ramakrishna
ReplyDeletei hv ubuntu 12.04, ns2.34. i m working on peer to peer video-on-demand, is there any helpful resource with related ns2 code.
thankyou
Hi,
DeleteI hope below link will help you.
http://www.cc.gatech.edu/computing/compass/gnutella/gnusim.html
Hi Ramakrishna,
ReplyDeleteIs it possible to find out the number of reroute discoveries from the trace file (using awk script)? If yes, then please help me (with the awk script).
Hi Amar,
DeleteCan you give details about reroute discover.
hello, i am getting this this error while trying to add Route flap damping and reusable MRAI module to NS BGP and i am getting this error. do you have any ideas where i should correcct things ...
ReplyDeleteIn file included from bgp/Timing/bgp_timer.cc:19:0:
bgp/Timing/bgp_timer.h:27:29: fatal error: ../bgp_timer.cc: No such file or directory
compilation terminated.
make: *** [bgp/Timing/bgp_timer.o] Error 1
Hi Lovsis,
DeleteI feel it is error due to header file (#include).
thank you for your help, much appreciated
DeleteHi,
ReplyDeleteI try to install NS2.33 on Fedora 17 and i follow you instrcution about error but now I get another error:
In file included from linkstate/ls.cc:67:0:
linkstate/ls.h:107:38: erreur: expected class-name before ‘{’ token
linkstate/ls.h:109:11: erreur: définition fournie pour une instanciation explicite
linkstate/ls.h: In member function ‘void A::del()’:
linkstate/ls.h:112:20: erreur: ‘template class std::vector’ used without template parameters
linkstate/ls.h:112:35: erreur: ‘erase’ was not declared in this scope
linkstate/ls.h: At global scope:
linkstate/ls.h:115:2: erreur: explicit instantiation of non-template type ‘A’
In file included from linkstate/ls.cc:67:0:
linkstate/ls.h:458:8: erreur: ISO C++ forbids declaration of ‘begin’ with no type [-fpermissive]
linkstate/ls.h:458:8: erreur: expected ‘;’ at end of member declaration
linkstate/ls.h:458:9: erreur: expected unqualified-id before ‘.’ token
linkstate/ls.h:460:2: erreur: ‘message_storage’ does not name a type
linkstate/ls.h:461:2: erreur: ‘message_storage’ does not name a type
linkstate/ls.h: In constructor ‘LsMessageCenter::LsMessageCenter()’:
linkstate/ls.h:425:16: erreur: class ‘LsMessageCenter’ does not have any field named ‘lsa_messages’
linkstate/ls.h:425:32: erreur: class ‘LsMessageCenter’ does not have any field named ‘other_messages’
linkstate/ls.h: In member function ‘LsMessage* LsMessageCenter::retrieveMessagePtr(u_int32_t)’:
linkstate/ls.h:443:11: erreur: ‘lsa_messages’ was not declared in this scope
linkstate/ls.h:445:11: erreur: ‘other_messages’ was not declared in this scope
linkstate/ls.cc: In member function ‘LsMessage* LsMessageCenter::newMessage(int, ls_message_type_t)’:
linkstate/ls.cc:301:2: erreur: ‘message_storage’ was not declared in this scope
linkstate/ls.cc:301:19: erreur: ‘storagePtr’ was not declared in this scope
linkstate/ls.cc:306:18: erreur: ‘lsa_messages’ was not declared in this scope
linkstate/ls.cc:311:17: erreur: ‘other_messages’ was not declared in this scope
linkstate/ls.cc:321:2: erreur: ‘message_storage’ is not a class or namespace
linkstate/ls.cc:321:28: erreur: expected ‘;’ before ‘itr’
linkstate/ls.cc:324:6: erreur: ‘itr’ was not declared in this scope
linkstate/ls.cc: In member function ‘bool LsMessageCenter::deleteMessage(u_int32_t)’:
linkstate/ls.cc:334:2: erreur: ‘message_storage’ has not been declared
linkstate/ls.cc:334:28: erreur: expected ‘;’ before ‘itr’
linkstate/ls.cc:335:6: erreur: ‘itr’ was not declared in this scope
linkstate/ls.cc:335:13: erreur: ‘other_messages’ was not declared in this scope
linkstate/ls.cc:337:2: erreur: ‘other_messages’ was not declared in this scope
linkstate/ls.cc:337:23: erreur: ‘itr’ was not declared in this scope
linkstate/ls.cc: In member function ‘int LsRetransmissionManager::ackIn(int, const LsMessage&)’:
linkstate/ls.cc:448:29: attention : suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
In file included from linkstate/ls.cc:67:0:
linkstate/ls.h: In member function ‘LsMessage* LsMessageCenter::retrieveMessagePtr(u_int32_t)’:
linkstate/ls.h:447:2: attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type]
make: *** [linkstate/ls.o] Erreur 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
how can I fix it ?
Best regards.
hello, i am still getting error while trying reusable MRAI module to NS BGP and i am getting this error. do you have any ideas where i should correct things .
ReplyDeleteIn file included from bgp/Timing/reusableMRAItimer.h:20:0,
from bgp/Timing/reusableMRAItimer.cc:2:
bgp/Timing/../rtProtoBGP.h: At global scope:
bgp/Timing/../rtProtoBGP.h:363:16: error: ‘reusableMRAItimer’ was not declared in this scope
bgp/Timing/../rtProtoBGP.h:363:35: error: template argument 2 is invalid
bgp/Timing/../rtProtoBGP.h:363:35: error: template argument 4 is invalid
bgp/Timing/reusableMRAItimer.cc: In member function ‘virtual void reusableMRAItimer::expire(Event*)’:
bgp/Timing/reusableMRAItimer.cc:88:29: warning: unused variable ‘current_sigma’ [-Wunused-variable]
bgp/Timing/reusableMRAItimer.cc:170:47: error: redeclaration of ‘std::map::iterator i’
bgp/Timing/reusableMRAItimer.cc:157:21: error: ‘unsigned int i’ previously declared here
bgp/Timing/reusableMRAItimer.cc:203:46: error: invalid types ‘int[float]’ for array subscript
bgp/Timing/reusableMRAItimer.cc:204:46: error: invalid types ‘int[float]’ for array subscript
make: *** [bgp/Timing/reusableMRAItimer.o] Error 1
Hi Lovsis,
DeleteCan you give the details of the steps that followed to use BGP module.
Hello Ramakrishna ,
Deletei followed step from this link,
http://www2.ensc.sfu.ca/~ljilja/cnl/projects/RFD-AMRAI/
and the error come when i try recompile ns-2.
hope i have given good details
Hi Lovsis,
DeleteAre you using NS-2.27. The patch is version specific.
yes i am using NS-2.27.
DeleteSir
ReplyDeleteI don't get to see the trace file of my programs.
following is a simple program I ran:
[#Create a simulator object
set ns [new Simulator]
# open trace file
set tracefile [open out.tr w]
$ns trace-all $tracefile
#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf
#Define a 'finish' procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
close $tracefile
#Execute nam on the trace file
exec nam out.nam &
exit 0
}
#Create two nodes
set n0 [$ns node]
set n1 [$ns node]
#Create a duplex link between the nodes
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
#Create a UDP agent and attach it to node n0
set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
# Create a CBR traffic source and attach it to udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0
#Create a Null agent (a traffic sink) and attach it to node n1
set null0 [new Agent/Null]
$ns attach-agent $n1 $null0
#Connect the traffic source with the traffic sink
$ns connect $udp0 $null0
#Schedule events for the CBR agent
$ns at 0.5 "$cbr0 start"
$ns at 4.5 "$cbr0 stop"
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"
#Run the simulation
$ns run]
and I got the following error:
[ns: finish: can't read "tracefile": no such variable
while executing
"close $tracefile"
(procedure "finish" line 6)
invoked from within
"finish"]
plus is it possible to get a visual display of packet details in ns2 in a seperate window.
Regards
linkstate/ls.cc: In member function ‘int LsRetransmissionManager::ackIn(int, const LsMessage&)’:
ReplyDeletelinkstate/ls.cc:448:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
In file included from linkstate/ls.cc:67:0:
linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
dinesh@dinesh:~/Desktop/ns-allinone-2.34$
sir, i'm installing in ubuntu..i couldn't solve this problem...how to fix those libraries???please help me in detail
Hi,
DeletePlease change the code in the linkstate/ls.h as give below:
#include
template class A: public std::vector {
public:
void del() {
// The right syntax is:
// this->erase(std::vector::begin());
erase(std::vector::begin());
}
};
hello sir..which line that must be changed in linkstate/ls.h?
Deletei've already tried by added the command above because i dont know which line to be change.
Thank u in advance.
thank you so much sir, but can u specify the line no. to be changed??
ReplyDeletei don't know where to apply these changes..
HI,
DeletePlease find the function del() in the same file and change accordingly.
Hi Ramakrishna,
ReplyDeleteI have implemented promiscuous mode in AODV by following the link:http://www.dcs.warwick.ac.uk/~adhoc1/nshowto1.html.
(I had some problem with the tap function in which you had helped me!!)
I am facing a new problem now.
A node is able to overhear (hello packets) from neighbors which are not in its range.
I have set the transmission range of 250 mtrs in ns/tcl/lib/ns-default.tcl
"Phy/WirelessPhy set RXThresh_ 3.65e-10"
I took two nodes, kept them far enough so that no transmission was possible. (I checked the trace file.)
But, they were able to 'overhear' each other's hello packets.(I put some prints in the tap function.)
How is it possible?
Please help me.
Hi,
DeleteJust check the nodes' initial positions.
These are the initial values:
ReplyDelete$ns_ at 0.0 "$n(0) setdest 100.0 100.0 3000.0"
$ns_ at 0.0 "$n(1) setdest 100.0 400.0 3000.0"
May be some other values (viz. CSThresh_) in the ns-default.tcl have to be changed. I am not getting any proper solution from the internet.
Hi,
DeleteTrans
mission
range RXThreshold
5 7.69E-06 105 1.17E-08 205 8.08E-10
10 1.92E-06 110 9.75E-09 210 7.34E-10
15 8.54E-07 115 8.16E-09 215 6.68E-10
20 4.81E-07 120 6.88E-09 220 6.09E-10
25 3.08E-07 125 5.84E-09 225 5.57E-10
30 2.14E-07 130 5.00E-09 230 5.09E-10
35 1.57E-07 135 4.30E-09 235 4.67E-10
40 1.20E-07 140 3.71E-09 240 4.30E-10
45 9.49E-08 145 3.23E-09 245 3.96E-10
50 7.69E-08 150 2.82E-09 250 3.65E-10
55 6.36E-08 155 2.47E-09
60 5.34E-08 160 2.18E-09
65 4.55E-08 165 1.92E-09
70 3.92E-08 170 1.71E-09
75 3.42E-08 175 1.52E-09
80 3.00E-08 180 1.36E-09
85 2.66E-08 185 1.22E-09
90 2.17E-08 190 1.09E-09
95 1.75E-08 195 9.87E-10
100 1.43E-08 200 8.92E-10
If I add the following statement in the beginning of the code in the function, AODV::recv(Packet *p, Handler*) :
ReplyDeleteif(DATA_PACKET(ch->ptype())) { printf("\nNode: _%i _ recvd data packet at time: %.4lf", index, CURRENT_TIME); }
Then it prints for all active nodes except for the destination. Why is it happening?
If not in this function/file, then where can I check whether the destination received a data packet?
Hi Ramakrishna,
DeletePlease help me with the above problem.
-amar
Hi Amar,
DeleteI am not getting your problem. If you could elaborate it more, it will be better.
Hi Ramakrishna,
DeleteHappy New Year!!
Here is the description:
The function: AODV::recv(Packet *p, Handler*) in aodv.cc is(should be) called whenever a node receives a(any) packet.
When an intermediate node(node in an active path) receives any kind of packet, control or data, this function is called. This is an expected behaviour.
When the destination node receives a control packet, this function is called.
This is again an expected behaviour.
But, when the destination node receives a data packet, this function is not called. This is the problem.
To check that, I added this statement in the beginning of the recv function:
if(DATA_PACKET(ch->ptype())) { printf("\nNode: _%i _ recvd data packet at time: %.4lf", index, CURRENT_TIME); }
This statement is called every time a node receives any kind of packet, except when the destination node receives a data packet.
My question is : How to identify/recognize the destination node(s) in the aodv.cc code?
Please let me know if you are not clear with any part of the problem description I have given above.
-amar
Hi Amar,
DeleteHappy New Year...
The node id is used to check whether it is the destination or not. So once you receive the packet check destination variable of IP and AODV packet and accordingly you can perform necessary actions.
Hi Ramakrishna,
DeleteYes, I got the idea, but the problem is I am not able to receive a data packet when the aodv.cc code is run for the destination node. You can verify/check this by adding the statement which I have given above.
Thanks.
amar
hello sir...... I m facing the problem of Segmentation Fault(core dump) while using AODV in NS 2.35. I have modified the original AODV by adding a link list in aodv_rtable.cc
ReplyDeletePlz help me out
Hi,
DeleteThe Segmentation Fault(core dump) is due to memory allocation. Please check you linked list code.
hi,
ReplyDeletewhile executing a wireless program, i encountered a problem it is as follows,
chris@chris-ThinkPad-R400:~$ ns second.tcl
num_nodes is set 2
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
is there something that i have missed to install.
HI,
DeleteThe installation is proper. The warning message is due to old syntax of channel initialization.
It wont create any problem.
but why is there no output being shown in the nam window ? is it because wireless program's cannot run on ubantu and needs red hat linux?
Deletethe program is as follows:
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 2 ;# number of mobilenodes
set val(rp) DSDV ;# routing protocol
set ns_ [new Simulator]
set tracefd [open simple.tr w]
$ns_ trace-all $tracefd
set topo [new Topography]
$topo load_flatgrid 500 500
create-god $val(nn)
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF
for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
}
$node_(0) set X_ 5.0
$node_(0) set Y_ 2.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 390.0
$node_(1) set Y_ 385.0
$node_(1) set Z_ 0.0
$ns_ at 50.0 "$node_(1) setdest 25.0 20.0 15.0"
$ns_ at 10.0 "$node_(0) setdest 20.0 18.0 1.0"
$ns_ at 100.0 "$node_(1) setdest 490.0 480.0 15.0"
set tcp [new Agent/TCP]
$tcp set class_ 2
set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(0) $tcp
$ns_ attach-agent $node_(1) $sink
$ns_ connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns_ at 10.0 "$ftp start"
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at 150.0 "$node_($i) reset";
}
$ns_ at 150.0 "stop"
$ns_ at 150.01 "puts \"NS EXITING...\" ; $ns_ halt"
proc stop {} {
global ns_ tracefd
$ns_ flush-trace
close $tracefd
}
puts "Starting Simulation..."
$ns_ run
HI,
DeletePlease note that there is no nam file created in the code so you are not getting nam window.
You can use .tr file for checking the output.
hi,
ReplyDeleteI m using ns-2.29 with mannasim and i have made few changes in leach protocol by adding two new send member functions “Hello” and "Reply" and its corresponding receive member function "recvhello" and "recvreply" just like cluster head advertisement and join request funcions in leachApp.cc and leachApp.h. I have declared the function recvHELLO_ and recvREPLY_ in leachApp.h but when i run the make it gives the following errors for the corresponding receive functions. please guide how to resolve this.
regards,
najma ismat
mannasim/leach/app/leachApp.cc:992: error: no ‘void LeachApp::recvHELLO_(char*, int, double, int, int)’ member function declared in class ‘LeachApp’
mannasim/leach/app/leachApp.cc:1028: error: no ‘void LeachApp::recvREPLY_(char*, int)’ member function declared in class ‘LeachApp
Hi Najma, are you working on P2P simulation?
DeleteRespected Sir,
ReplyDeletecan you please guide me how to get the hop counts,delay and packet delivery ratio by simulation.
Hi,
DeleteYou need to use trace file for required information from simulation. You can write AWK scripts for reading all those.
sir i m a fresher to awk scripts can u pls guide me through some sample code or links it will be really helpful. thank you sir for your reply
DeleteHi sir I tried to install NS2.34 on Ubuntu12.10. Unfortunately, when I run validate test, it is failed.
ReplyDeleteI got this message
validate overall report: some portable tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
some non-portable tests also failed:
./test-all-srm ./test-all-smac-multihop ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-wireless-tdma
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
could please help me
Hi,
DeletePlease check path configurations.
Hi ... how can I do that
DeleteHi,
DeleteIn terminal,
sudo gedit ~/.bashrc
This comment has been removed by the author.
DeleteHI,
DeleteThen you try
source ~/.bashrc
For testing execute some tcl scripts from ns-2.34/tcl/ex....
Hi ...
DeleteI did .. and this is the configuration
# LD_LIBRARY_PATH
OTCL_LIB=/home/farij/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/farij/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/farij/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# TCL_LIBRARY
# PATH
XGRAPH=/home/farij/ns-allinone-2.34/bin:/home/farij/ns-allinone-2.34/tcl8.4.18/unix:/home/farij/ns-allinone-2.34/tk8.4.18/unix
NS=/home/farij/ns-allinone-2.34/ns-2.34/
NAM=/home/farij/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
unfortunately... got error while validate NS2.34
thank you for helping
Hi ...
DeleteI tried more than three times ...
still have same problem ...
validate overall report: some portable tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
some non-portable tests also failed:
./test-all-session
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Is it important to validate NS before use it ....
if not .. I will ignore it..
Thank you
Sir,
ReplyDeleteI got the following errors along with many optional errors as well after ./install ...
./install: 402: cd: can't do cd to ./tcl8.5.8/unix
autoconf: error: no input file
.install: 410: ./install: ./configure: not found
tcl8.5.8 configuration failed! Exiting..
Could you please suggest the solution to this problem?
Hi,
DeletePlease check supporting files before installing.
This comment has been removed by the author.
ReplyDeleteoot@sugnani-VirtualBox:/home/ns2/ns-allinone-2.34# ns
ReplyDelete*** buffer overflow detected ***: ns terminated
======= Backtrace: =========
/
...
...
...
....
7f5000 rw-p 00000000 00:00 0
bfccf000-bfcf0000 rw-p 00000000 00:00 0 [stack]
Aborted
Im getting the above error.. can yu plz help me out? n if possible plz reply to my gmail id :kumarsugnani846@gmail.com
If you get an error stating that there has been a buffer overflow *** buffer overflow detected ***: ./ns terminated including a backtrace, you need to do the following to make it work:
DeleteInstall gcc-4.4 and g++-4.4 including dependencies using the code below:
$ sudo apt-get install gcc-4.4 g++-4.4
Change the line 270 in tcl8.4.18/unix/Makefile.in that reads
CC = @CC@
so it appends the version parameter for version 4.4:
CC = @CC@ -V 4.4
Make sure it is a capital V.
Finally, run ./install from the ns-allinone-2.34 top folder again.
i tried like 100 hundred times.. can yu help me wid the help of team viewer .. please ..
Delete* Build tcl8.4.18
Delete============================================================
/bin/sh config.status
config.status: 519: cannot create config.log: Permission denied
make: *** [Makefile] Error 2
configure: WARNING: unrecognized options: --enable-gcc
./configure: line 1966: config.log: Permission denied
./configure: line 1976: config.log: Permission denied
tcl8.4.18 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform
HI,
DeleteYa sure, If time permits..
Hi Sir..
ReplyDeleteI have checked this class, but I didn't find it.. could you please tell me which lines i should change them ....
Thanks in advance
============This is the class=================
template class A: public std::vector {
public:
void del() {
// The right syntax is:
// this->erase(std::vector::begin());
erase(std::vector::begin());
}
};
Hi,
DeleteGo to same file and change erase(std::vector::begin()); to
this->erase(std::vector::begin());
It will work fine.
Hi Ramakrishna,
ReplyDeleteCan you tell me how to create a topology in grid pattern for ns2?
-amar
Hi Amar,
DeleteYou can make use of "SUMO & MOVE" or "NSG2.1" for creating topology of any type.
I found NSG2.1 very useful. Iam not able to open the tool in my ubuntu, it doesnt give any error however. Nevertheless, the tool works fine in windows, and I am able to get the generated tcl file.
DeleteThanks Ramakrishna for the help!!
sir,
ReplyDeleteI'm doing my final year project on secure on-demand routing protocol using friendship mechanism
so in that i want packet delivery ratio analysis (xgraph) source code for both routing protocols: AODV and DSR
Hi,
DeleteAre asking for source code of AODV and DSR? or AWK scripts??
sir,
Deletei need the source code of AODV and DSR not the AWK scripts
HI Ramya,
DeleteThe AODV and DSR codes are available in ns-allinone-2.34/ns-2.34 folder.
hello sir, can u provide anthocnet patch files for ns2.34 or the links for the same? i am working on the anthocnet routing protocol. i would be grateful if u helped.
ReplyDeleteHI,
DeletePlease try below link..
http://www.idsia.ch/~frederick/anthocnet/anthocnet.html
hi i want video transmission through ns2 in realtime can u provide the information regarding it
ReplyDeleteHi Suneel,
DeletePlease try to use MyEval and Evalvid package for video transmission.
hi,
ReplyDeleteI tried your instructions to install ns2.34 on ubuntu 12.04. They only thing that I did in addition of what you proposed was to install gcc-4.4 and g++-4.4 including dependencies using the below :
root/ Desktop > apt-get install gcc-4.4 g++-4.4
and then change the line 270 in tcl8.4.18/unix/Makefile.in
change into
CC = gcc-4.4
instead of
CC = @CC@
Ø so it uses gcc version 4.4
My installation was successful, but when I validate the installation some tests fail:
validate overall report: some portable tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
some non-portable tests also failed:
./test-all-session
Do you know what should I do? Could I uninstall and reinstall ns2 again?
Thanks,
Behnaz
hi Mr , thanks for your blog , when i ns in the end of the installation , a message appear like this :
ReplyDelete*** glibc detected *** ns: realloc(): invalid next size: 0x0a3d1278 ***
plz help me to fix it
Hello RamKrishna
ReplyDeleteI have got the following error while installing ns2.34 in Ubuntu 12.04.
tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’:
tools/ranvar.cc:219:70: error: cannot call constructor ‘GammaRandomVariable::GammaRandomVariable’ directly [-fpermissive]
tools/ranvar.cc:219:70: error: for a function-style cast, remove the redundant ‘::GammaRandomVariable’ [-fpermissive]
make: *** [tools/ranvar.o] Error 1
I tried the solution as given in one of your blogs.
Solution:
In ns-2.34/tools/ranvar.cc, line 219
-return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
+return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
Then when I run the command "./install" again, I get the following error.
tools/ranvar.cc: In member function ‘virtual double GammaRandomVariable::value()’:
tools/ranvar.cc:222:2: error: expected primary-expression before ‘return’
tools/ranvar.cc:222:2: error: expected ‘;’ before ‘return’
tools/ranvar.cc:223:2: error: expected primary-expression before ‘return’
tools/ranvar.cc:223:2: error: expected ‘;’ before ‘return’
tools/ranvar.cc:218:10: warning: unused variable ‘u’ [-Wunused-variable]
make: *** [tools/ranvar.o] Error 1
Ns make failed!
Kindly advice
Lambor
Hi Lambor,
DeleteI think ";" is missing.
"GammaRandomVariable" has appeared twice in the command. After I removed one, the installation progresses. Also I had to modify the mobile/nagakami.cc, unix/Makefile.in, ns2.34/Makefile.in, ns2.34/Makefile & otcl-1.13/configure files after which the installation was successful.
DeleteThanks
Installing libtcl8.5.a to /home/Desktop/ns-allinone-2.35/lib/
ReplyDeletecp: cannot create regular file `/home/Desktop/ns-allinone-2.35/lib/#inst.5809#': Permission denied
rm: cannot remove `/home/Desktop/ns-allinone-2.35/lib/libtcl8.5.a': Permission denied
mv: cannot stat `/home/Desktop/ns-allinone-2.35/lib/#inst.5809#': No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.5.10 installation failed.
Tcl is not part of the ns project.
please help me with this problem. Thank you
Hi Max Cash,
DeleteUse sudo command and continue the installation.
Hi Ramakrishna,
ReplyDeleteThe field prev_hop_ of struct hdr_cmn in ns/common/packet.h should have the value of the forwarding node. Unfortunately, this always shows "0". Please help me in getting the actual forwarding node.
-amar
Hi,
DeleteHow will you identify the forwarding node?
You wont find forwarding node value in packet.h as I know. You need to check in the routing protocol.
Hi Ramakrishna,
ReplyDeleteI'm working on IEEE802.11e EDCA in ns2.28 and my cross layer is between the udp class (udp.cc) and the Mac802_11e class (mac-802_11e.cc). I follow all the instructions in this link (http://wmnatupdiliman.blogspot.com/2011/02/exchanging-cross-layer-information-in.html?showComment=1359880388852#c2981451716500257750) in order to exchange information between these two layers but I got an error when I include in the udp.h header file the mac-802_11e.h file which is :
In file included from apps/udp.h:27,
from apps/udp.cc:24:
./mac/802_11e/mac-802_11e.h: At global scope:
./mac/802_11e/mac-802_11e.h:120: error: ‘ETHER_ADDR_LEN’ was not declared in this scope
./mac/802_11e/mac-802_11e.h:121: error: ‘ETHER_ADDR_LEN’ was not declared in this scope
./mac/802_11e/mac-802_11e.h:122: error: ‘ETHER_ADDR_LEN’ was not declared in this scope
./mac/802_11e/mac-802_11e.h: In member function ‘u_int32_t EDCA_PHY_MIB::getHdrLen11()’:
./mac/802_11e/mac-802_11e.h:160: error: ‘ETHER_FCS_LEN’ was not declared in this scope
./mac/802_11e/mac-802_11e.h: At global scope:
./mac/802_11e/mac-802_11e.h:209: error: expected class-name before ‘{’ token
./mac/802_11e/mac-802_11e.h:234: error: ‘MacState’ has not been declared
./mac/802_11e/mac-802_11e.h:235: error: ‘MacState’ has not been declared
./mac/802_11e/mac-802_11e.h:390: error: ‘MacState’ does not name a type
./mac/802_11e/mac-802_11e.h:391: error: ‘MacState’ does not name a type
./mac/802_11e/mac-802_11e.h: In member function ‘int Mac802_11e::initialized()’:
./mac/802_11e/mac-802_11e.h:304: error: ‘Mac’ has not been declared
make: *** [apps/udp.o] Error 1
and this error belongs to #include "mac/mac-802_11e.h" line in the udp.h file. So I don’t know if you have an idea about this error or does this error belongs to any kind of mistakes in ns2 during installation because if I include any other file except the mac-802_11e.h and mac-802_11.h in the udp.h header file, I don’t get any errors. So would you help me if you have an idea about how to fix this error, please? Also when I tried to include the ns2.28 integrated mac layer (mac-802_11.cc), I got the same error.
I'm stuck in this error from long time.
Thanks for your help in advance.
Hi Red Rose,
DeleteI have not worked in cross-layer concepts. If I find any solution I will update you.
Hi M. Ramakrishna
ReplyDeleteI just installed NS2 following the steps you mentioned. But at the end, when i type ns in the terminal, i have this message:
The program 'ns' is not installed yet. You can install it by typing:
sudo apt-get install ns2
Can you help me with this?
Regards
Hi Chakib Baouche,
DeletePlease check the path setting. Once it is done restart the system.
Thanks Man!
Deleteafter running the command
ReplyDeleteset ns [new simulator]
I am having this error
class simulator: constructor failed: invalid command name "simulator"
please help me out
Thank You.
Hi,
DeleteIn word Simulator, "S" should be capital letter.
Hi
ReplyDeleteI can't install ns2.35 with fedora 8
there is an error in the cc, gcc and cl packages
can you help me please
Salma
Hi,
DeleteYou need to change gcc to higher version.
and how can I do this?
DeleteHI,
DeletePlease use below given link...
http://kumar-pravin.blogspot.in/2011/02/install-ns-allinone-235-in-fedora-14.html
ns installation have been succeded and when I put ./validate after an hour in the end I receive:
DeleteStarting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
NS EXITING...
finishing..
Test output agrees with reference output
All test output agrees with reference output.
jeu fév 14 18:12:21 EST 2013
These messages are NOT errors and can be ignored:
warning: using backward compatibility mode
This test is not implemented in backward compatibility mode
validate overall report: some tests failed:
./test-all-tcpLinux ./test-all-tcpHighspeed ./test-all-red ./test-all-cbq
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
chat should I do?
the path config is below
Delete# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
Hi,
DeleteUsually validation is not required if you are getting % symbol when you type ns in terminal.
This comment has been removed by the author.
ReplyDeleteStill I am getting problem..i cant able to install ns-allinone-2.34..
ReplyDeletethese all the steps I did
first extract the ns-allinone-2.34 tar file,then change the directory
yashwanth@ubuntu:~$ cd ns-allinone-2.34
yashwanth@ubuntu:~/ns-allinone-2.34$
then copied the tar file of bgp(ns-2.34-bgp_2.0.tgz) to ns-allinone-2.34 folder,if I not did this means,while executing this command
yashwanth@ubuntu:~/ns-allinone-2.34$ tar xvf ns-2.34-bgp_2.0.tgz && patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc41 CXX=g++-4.1 && ./install
it will give error that this ns-2.34-bgp_2.0.tgz not found in the folder,so I copied bgp tar file to ns folder
then while installing,it give this error
Building static library libz.a version 1.2.3 with gcc41.
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.
gcc41 -O -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c
make: gcc41: Command not found
make: *** [example.o] Error 127
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.4.18
============================================================
configure: WARNING: unrecognized options: --enable-gcc
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... gcc41
checking whether the C compiler works... no
configure: error: in `/home/yashwanth/ns-allinone-2.34/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 configuration failed! Exiting ...
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
yashwanth@ubuntu:~/ns-allinone-2.34$
yashwanth@ubuntu:~/ns-allinone-2.34$
ReplyDeleteinstead of using this
yashwanth@ubuntu:~/ns-allinone-2.34$ tar xvf ns-2.34-bgp_2.0.tgz && patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc41 CXX=g++-4.1 && ./install
I used this
yashwanth@ubuntu:~/ns-allinone-2.34$./install
then it gives this error
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -I. -I/home/yashwanth/ns-allinone-2.34/include -I/home/yashwanth/ns-allinone-2.34/include -I/home/yashwanth/ns-allinone-2.34/include -I/include otcl.c
ar cq libotcl.a otcl.o
ranlib libotcl.a
rm -f libotcl.so otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/yashwanth/ns-allinone-2.34/include -I/home/yashwanth/ns-allinone-2.34/include -I/home/yashwanth/ns-allinone-2.34/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/yashwanth/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/yashwanth/ns-allinone-2.34/otcl-1.13/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Bad value
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
yashwanth@ubuntu:~/ns-allinone-2.34$
I am using ubuntu 12.04 and I checked the version of my gcc,by using gcc -v
it gives this
yashwanth@ubuntu:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
please help me out I am experiencing very difficult to install..
sir,i followed all the steps above you provided..and installed ns2.34 in uduntu 12.04,while validating i got this
ReplyDeleteRunning test aloha:
../../ns test-suite-satellite.tcl aloha QUIET
Test output agrees with reference output
Running test aloha.collisions:
../../ns test-suite-satellite.tcl aloha.collisions QUIET
Test output agrees with reference output
Running test mixed.legacy:
../../ns test-suite-satellite.tcl mixed.legacy QUIET
Test output agrees with reference output
All test output agrees with reference output.
Mon Feb 18 06:05:18 IST 2013
These messages are NOT errors and can be ignored:
warning: using backward compatibility mode
This test is not implemented in backward compatibility mode
validate overall report: some portable tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
some non-portable tests also failed:
./test-all-session
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$
i am using ns-2.34-bgp_2.0 patch for using bgp protocol..
> cd ~/ns-allinone-2.34/ns-2.34
> ./configure
> make clean ; make
while executing last step
i got this error
bgp/Util/ipaddress.cc: In constructor ‘IPaddress::IPaddress(std::string)’:
bgp/Util/ipaddress.cc:163: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’:
bgp/Util/ipaddress.cc:279: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc:295: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘boolVector IPaddress::str2bin(std::string)’:
bgp/Util/ipaddress.cc:310: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘int IPaddress::intval()’:
bgp/Util/ipaddress.cc:420: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘int IPaddress::masked_intval(int)’:
bgp/Util/ipaddress.cc:580: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’:
bgp/Util/ipaddress.cc:667: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’:
bgp/Util/ipaddress.cc:698: error: ‘sprintf’ was not declared in this scope
make: *** [bgp/Util/ipaddress.o] Error 1
yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$
i did this also
udo apt-get install \
> g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev
but i checked gcc version through this gcc -v
yashwanth@ubuntu:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
i am not able to run the bgp configured tcl file...please help me out..
Hi Yashwanth,
DeleteI feel that error is due to header file stdio.h. Check corresponding folder and file, then add this header for every or main .h file in the same folder.
i have to add only to bgp/Util/ipaddress.cc file..what about .h file in same folder..i didn't get it last few words..:-)
ReplyDeletei included include header file in every file wherever it asks,while executing this command make clean ; make
ReplyDeleteatlast i got this
make[1]: Entering directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/yashwanth/ns-allinone-2.34/ns-2.34/indep-utils/webtrace-conv/ucb'
yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$
Sir can you check this program
ReplyDeletei am getting below error
Sir for this program(which is related to bgp)
#
# select.tcl
#
puts ""
puts "SELECT Validation Test: "
puts ""
puts " A \"triangle\" consisting of three ASes. Each AS has one"
puts " BGP-speaking router. Each router is connected directly to"
puts " the routers in each neighboring AS."
puts ""
puts " AS----AS "
puts " \\ / "
puts " \\ / "
puts " AS "
puts ""
set nf [open select.nam w]
set ns [new Simulator]
$ns namtrace-all $nf
$ns node-config -BGP ON
set n0 [$ns node 0:10.0.0.1]
set n1 [$ns node 1:10.1.1.1]
set n2 [$ns node 2:10.2.2.1]
$ns node-config -BGP OFF
$ns duplex-link $n0 $n1 1Mb 1ms DropTail
$ns duplex-link $n0 $n2 1Mb 1ms DropTail
$ns duplex-link $n1 $n2 1Mb 1ms DropTail
set bgp_agent0 [$n0 get-bgp-agent]
$bgp_agent0 bgp-id 10.0.0.1
$bgp_agent0 neighbor 10.1.1.1 remote-as 1
$bgp_agent0 neighbor 10.2.2.1 remote-as 2
set bgp_agent1 [$n1 get-bgp-agent]
$bgp_agent1 bgp-id 10.1.1.1
$bgp_agent1 neighbor 10.0.0.1 remote-as 0
$bgp_agent1 neighbor 10.2.2.1 remote-as 2
set bgp_agent2 [$n2 get-bgp-agent]
$bgp_agent2 bgp-id 10.2.2.1
$bgp_agent2 neighbor 10.0.0.1 remote-as 0
$bgp_agent2 neighbor 10.1.1.1 remote-as 1
$ns at 0.25 "puts \ "\n time: 0.25 \n n0 (ip_addr 10.0.0.1) \
defines a network 10.0.0.0/24.\ ""
$ns at 0.25 "$bgp_agent0 network 10.0.0.0/24"
$ns at 39.0 "puts \ "\n time: 39 \
\n dump routing tables in all BGP agents: \n\ ""
$ns at 39.0 "$bgp_agent0 show-routes"
$ns at 39.0 "$bgp_agent1 show-routes"
$ns at 39.0 "$bgp_agent2 show-routes"
$ns at 40.0 "finish"
proc finish {} {
global ns nf
$ns flush-trace
close $nf
puts "Simulation finished. Executing nam..."
exec nam select.nam
exit 0
}
puts "Simulation starts..."
$ns run
i am getting this
yashwanth@ubuntu:~/bgp$ ns select.tcl
SELECT Validation Test:
A "triangle" consisting of three ASes. Each AS has one
BGP-speaking router. Each router is connected directly to
the routers in each neighboring AS.
AS----AS
\ /
\ /
AS
(_o10 cmd line 1)
invoked from within
"_o10 cmd get-bgp-agent"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o10" line 2)
(SplitObject unknown line 2)
invoked from within
"$n0 get-bgp-agent"
invoked from within
"set bgp_agent0 [$n0 get-bgp-agent]"
(file "select.tcl" line 28)
yashwanth@ubuntu:~/bgp$
Thanks for your last help...
ReplyDeleteHow can I display any particular node information...as I wanted to add neighbors my node and display my neighbors?
Thank You.
Sir which ubuntu version is suitable for ns-allinone-2.34 and i want to use bgp patch..i tried to execute some tcl script which is present in test folder under bgp folder..but i am getting there also error..I think its problem with the ubuntu itself..Currently i am using ubuntu 12.04..Which would you prefer..I am waiting for your response...
ReplyDeleteHi,
DeleteNs2.34 and ubuntu 12.04 is fine. There is no relation between the BGP patch and ubuntu version.
but it can depend on gcc compiler right..like there will be different gcc version for different ubuntu..and ns-allinone-2.34 will depend on particular gcc version know..
ReplyDeletesir i tried for the above topology,but i am not able to do it..if possible have a look at this once
ReplyDeletehttps://docs.google.com/file/d/0B2X6JPD4MS3Vc3JlOVJ2TDlkcUU/edit?usp=sharing
i edited in select.tcl of test folder..
i want to send packets via AS 1-3-5-7-9-12 and also other AS also should be present..
and this is the file for this
https://docs.google.com/file/d/0B2X6JPD4MS3VM2c4SUZKSHg5RUU/edit?usp=sharing
i am getting this error for this
yashwanth@ubuntu:~/project$ ns-bgp new2.tcl
SELECT Validation Test:
A "triangle" consisting of three ASes. Each AS has one
BGP-speaking router. Each router is connected directly to
the routers in each neighboring AS.
AS----AS
\ /
\ /
AS
Simulation starts...
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o30: no target for slot -1
_o30 type: Classifier/IPv4
content dump:
classifier _o30
0 offset
0 shift
2147483647 mask
0 slots
---------- Finished standard no-slot{} default handler ----------
yashwanth@ubuntu:~/project$
hi,
ReplyDeleteI need ur help in NS-2 installation on ubuntu on 12.4
when i try to install using the steps u have mentioned..
sudo apt-get install build-essential autoconf automake libxmu-dev
its gives me error
what should i do...
Hi,
DeletePlease send the error.
Hi,
Deletei am getting following error... plz guide me...
Thanks in advance
3/ns-allinone-2.35/tcl8.5.10/unix -ltcl8.5 -ldl -lieee -lm \
-Wl,-rpath,/home/msit123/ns-allinone-2.35/lib -o tclsh
tcl8.5.10 make succeeded.
Installing libtcl8.5.a to /home/msit123/ns-allinone-2.35/lib/
cp: cannot create regular file `/home/msit123/ns-allinone-2.35/lib/#inst.14705#': Permission denied
rm: cannot remove `/home/msit123/ns-allinone-2.35/lib/libtcl8.5.a': Permission denied
mv: cannot stat `/home/msit123/ns-allinone-2.35/lib/#inst.14705#': No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.5.10 installation failed.
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
msit123@msit123-Studio-1435:~/ns-allinone-2.35$
the sequence of commands that i gave is as follows
Delete$ sudo apt-get update
$ sudo apt-get install build-essential autoconf automake libxmu-dev
$ tar -zxvf ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35
$ ./install
even i tried to give this command as well....sudo apt-get install tcl
Hi,
DeleteYou try to install using sudo ./install
Sir,
ReplyDeleteI'm getting this error...pls help me..
user@user-OptiPlex-980:~/ns/ns-allinone-2.34/ns-2.32_tbmnd$ make clean
make: *** No rule to make target `clean'. Stop.
---Avni
hi i am doing a project called continous neighbor discovery i have the codes in .net but i want to simulate it in ns2 please help....
ReplyDeletewhat to do ,
Hi Divya,
DeleteYou can patch .net code in ns-2. You need to identify the patch in C or C++.
hi,
DeleteThanks....ns2 installation done...
could u plz tell me know from where to start...
i wish to make some changes in AODV protol and simulate it.
Thanks again.
hi i tried to install ns2 as per the steps. but it says-unable to locate package ns2 . how do ifix this problem?? plz help
ReplyDeleteHi,
DeleteI didnt get your error. Give some more details about the error.
i am work ns2 with cygwin i run the ns2 program like ns node.tcl but no nam file is execute only the coding is displayed pls help me how to run
ReplyDeleteHI
ReplyDeleteIn file included from linkstate/ls.cc:67:0:
linkstate/ls.h: In instantiation of ‘void LsMap::eraseAll() [with Key = int; T = LsIdSeq]’:
linkstate/ls.cc:396:28: required from here
linkstate/ls.h:137:20: error: ‘erase’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
linkstate/ls.h:137:20: note: declarations in dependent base ‘std::map, std::allocator > >’ are not found by unqualified lookup
linkstate/ls.h:137:20: note: use ‘this->erase’ instead
make: *** [linkstate/ls.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
root@moses-Satellite-C665:/home/moses/ns-allinone-2.35#
Can u plz help me
Hello Again,
ReplyDeleteHow to set the ranges of nodes so that i can transfer the packets to those nodes which are in the range of a particular node.
Thank You.
Hi,
DeleteUse below given variable for initiating communication range.
RXThresh_ = 8.92E-10; //200m
1.001487: d: 200.000000, Pr: 6.970779e-10
Delete1.077555: d: 200.000000, Pr: 6.970779e-10
3.042560: d: 200.000000, Pr: 6.970779e-10
3.078598: d: 200.000000, Pr: 6.970779e-10
5.005877: d: 200.000000, Pr: 6.970779e-10
5.009804: d: 200.000000, Pr: 6.970779e-10
5.059859: d: 200.000000, Pr: 6.970779e-10
5.084556: d: 200.000000, Pr: 6.970779e-10
5.089027: d: 200.000000, Pr: 6.970779e-10
7.018277: d: 200.000000, Pr: 6.970779e-10
7.066554: d: 200.000000, Pr: 6.970779e-10
7.074907: d: 200.000000, Pr: 6.970779e-10
7.086367: d: 200.000000, Pr: 6.970779e-10
7.087405: d: 200.000000, Pr: 6.970779e-10
can You help me understand this output for transmission range.
Thank You
Is there anyway to trace Retransmission timeout (RTO) in NS2, of tcp session , using Ftp or any client, if there please reply me fast sir
ReplyDeleteThanks You
Shiva
Hi Shiva,
DeleteYou need to refer tcp.cc file for retransmission function.
please tell me how to learn ns2 as fast as possible
ReplyDeleteHi,
DeleteStudy "Introduction to Network Simulator - 2" book.
Hi, I installed ns-2.34 using your instructions. The instalation was ok.
ReplyDeleteNow I'm running the script: infrastruct_rate_adaptation.tcl that is in ../ns-allinone-2.34/dei80211mr-1.1.4/samples/ and in the trace appears "tcp" instead of "cbr"
Hi,
DeleteI think AGT trace is disabled.
Thanks for your answer.
DeleteBut..., if you see the script that I mentioned, there are only cbr/udp sources (there isn't a tcp source) but in the trace appears "tcp".
This only occurs when I simulate wireless networks using the library dei80211mr
Thanks a lot,
clau
I was installed ns2 to my laptop.Path also setting , But when u open the terminal initially display of ,
ReplyDeletebash: /usr/local/lib: is adirectory
bash: 2.34/tcl8.4.18/unix.......
root@ubuntu:~$ ns
ns: Command not found
Hi,
DeletePlease follow the installation step properly.
1.001487: d: 200.000000, Pr: 6.970779e-10
ReplyDelete1.077555: d: 200.000000, Pr: 6.970779e-10
3.042560: d: 200.000000, Pr: 6.970779e-10
3.078598: d: 200.000000, Pr: 6.970779e-10
5.005877: d: 200.000000, Pr: 6.970779e-10
5.009804: d: 200.000000, Pr: 6.970779e-10
5.059859: d: 200.000000, Pr: 6.970779e-10
5.084556: d: 200.000000, Pr: 6.970779e-10
5.089027: d: 200.000000, Pr: 6.970779e-10
7.018277: d: 200.000000, Pr: 6.970779e-10
7.066554: d: 200.000000, Pr: 6.970779e-10
7.074907: d: 200.000000, Pr: 6.970779e-10
7.086367: d: 200.000000, Pr: 6.970779e-10
7.087405: d: 200.000000, Pr: 6.970779e-10
can You help me understand this output for transmission range.
Thank You
Hi,
ReplyDeleteUse sudo command along with install and make command.
sir i m working on project named as energy efficient strategy for multichannel MAC layer protocol in Wireless sensor network so sir can U help me,how to apply multichannel in NS2 2.34 and how to use it in our tcl scripts?
ReplyDeleterahul
HI,
DeleteThe below may help you:
http://itantenna.blogspot.in/2012/01/add-multiple-interfaces-and-multiple.html
i compare dsr and aodv routing protocol then we get result in this aodv better compare to dsr in end to end delay so i want to modified in dsr.cc file for this performance. so please help me
ReplyDeleteHI Sir,
ReplyDeleteI followed the steps to install NS2 on my ubuntu 12.04 but I am still getting the following problem:
============================================================
* Build OTcl-1.13
============================================================
./install: 497: ./install: ./configure: Permission denied
otcl-1.13 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.
Can I know how to fix the problem please?
Hello,
ReplyDeleteHow to calculate the distance between two nodes in the wireless networks?
Thank You
Hi,
DeleteFirst you need to find the node position information, which is available in x_ and y_ variable. Send position information along with packets.
Then, using distance formula you need to calculate
sir,
ReplyDeletecan u pls help me out with this error..
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o376: no target for slot 1889785610
_o376 type: Classifier/Port
content dump:
classifier _o376
0 offset
0 shift
2147483647 mask
2 slots
slot 0: _o408 (CMUTrace/Recv)
slot 255: _o378 (CMUTrace/Recv)
---------- Finished standard no-slot{} default handler ----------
thankyou
Hi,
DeleteSorry, I don't know about this error.
sir im getting the abve error whn i tried to run a tcl script..its nt during d installation.
ReplyDeletehi ramakrishna sir,
ReplyDeletei tried to install ns2 in ubuntu12.04 i used ur installation steps u said above but i got error in tk8.5.10 make failed exiting..i dont knw what to do..i ve tried many times..pls help me to get rid rid of this problem
Hi,
DeleteCan you send the error message.
Hello,
ReplyDeleteHow can I add extra information to a node like adding neighbors and listing them?
Thank You
Hi,
DeleteYou can create linked list or array in every node.
Hello,
ReplyDeletensaddr_t pkt_src_; // Node which originated this packet
Is the statement above tells about the node id of the source node or something else?
Thank You.
HI,
DeleteIt looks like source of packet.
HELLO SIR,
ReplyDeletewhen am used xgraph than i have got this error
No command 'xgrpah' found, did you mean: Command 'xgraph' from package 'xgraph' (universe) xgrpah: command not found
so please give me solution of this errot
Hi,
DeletePlease check other pages of this blog for same error.
dear ramakrishna,
ReplyDeletefirst of all i want to say a great great thanx to you that you started a blog like this to help people like us. I am installing the ns-2.34 in my ubuntu-12.04. I have done all the procedure as you have suggested and encountered the same error as you have guessed and solved exactly in the same way you suggested till adding PATH to bash file by changing the user name as mine in all the path variables. But as I typed 'ns' in terminal, it gives me the error that no ns2 is installed in your system and install it using 'sudo apt-get install ns2'. Previously I had installed ns2 by using the same command as 'sudo apt-get install ns2' and it installed the latest version on ns-2. Now what should I do? Basically I am down grading the version because I am working on LEACH protocol of WSN. So out of these two issues- either installation problem or any code regarding LEACH protocol- if you have any suggestion, please suggest me. And very very thanx to you for your all these great work.
Hi,
DeleteThank you for your comments.
The LEACH protocol installation requires older version of NS-2. Please find a page in this blog for installing LEACH and solution for errors.
Hi! I'm a new user of Ns2. When I read all the questions/comments above, I feel like Oooo...trouble in installation, not even started coding. I am going to test a new routing protocol using Ns2. Could you suggest me which version of Ns2 (2.34 or 2.35) and Ubuntu (10x/12x)is the best for my case? I would like to avoid getting error, if possible. My laptop is using Windows7. Thank you very much.
ReplyDeleteHi,
DeleteYou can go for NS-2.34 and UBUNTU 12.04.
In ubuntu 12.04.... while installing ns 2.34
ReplyDeletegetting some error...
tcl8.4.18 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
tk8.4.18 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
plz help me....
i have patch wimax module into ns-2.34
sir,
ReplyDeletethis following error comes while installing ns2.34 in ubuntu 12.04 please
give me a solution ......
Warning: tclStubInit.c may be out of date.
Developers may want to run "make genstubs" to regenerate.
This warning can be safely ignored, do not report as a bug!
Installing libtcl8.4.a to /home/prathap/ns2/ns-allinone-2.34/lib/
cp: cannot create regular file `/home/prathap/ns2/ns-allinone-2.34/lib/#inst.24443#': Permission denied
rm: cannot remove `/home/prathap/ns2/ns-allinone-2.34/lib/libtcl8.4.a': Permission denied
mv: cannot stat `/home/prathap/ns2/ns-allinone-2.34/lib/#inst.24443#': No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.4.18 installation failed.
Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
hello sir,
ReplyDeleteI want to do project in NS-2 . My project aim is to measure QOE of mobile received video. I want to know wheather it can be implemented in NS-2 or not
And my friend project aim is rate control of video transmission over wireless network and internet. Can this be implemented in Ns-2 or not i want to know sir.
ReplyDeleteHI,
DeleteBoth can be implemented. You can search for MyEval patch for streaming video in ns2.
Hello,
ReplyDeleteTo add list of neighbors, I can use array or linked list, but where to add these neighbors, In the main tcl script, or some where else?
Thank You.
Hi,
DeleteYou need to identify the code which collects information there you need to add linked to store all those values.
hello sir,
ReplyDeleteIam doing my final year Btec im trying to install ns2 2.35 version on fedora 16
im unable to run any program because
ns aodv.tcl
it says......
cannot exec nam:no such file or directory...
Please help me sir....
the same program works fine on other laptops
Hi,
DeleteYou need install nam separately.
Hi Sir
ReplyDeleteI am doing my final project MPTCP Packet Reordering and I want to test the three reordering algorithms in regular TCP which are DSACK, Eilef and F-RTO Could you please help me in how to build the MPTCP on Ns2.
Thank you very much.
Regards
Hi,
DeleteDo you have the patch for MPTCP.
Hi
DeleteYes I do
Hi,
ReplyDeleteI followed all the steps mentioned in nsrt-howto .pdf "Implementing a New Manet Unicast Routing Protocol in NS2" but when I recompile ns2 I have compilation errors.
./protoname/protoname.h:41: error: ‘protoname_state’ does not name a type
./protoname/protoname.h:53: error: ISO C++ forbids declaration of ‘protoname_state’ with no type
./protoname/protoname.h:53: error: ‘protoname_state’ declared as an ‘inline’ field
./protoname/protoname.h:53: error: expected ‘;’ before ‘&’ token
./protoname/protoname.h:54: error: expected ‘;’ before ‘inline’
protoname/protoname.cc: In member function ‘virtual void Protoname::recv(Packet*, Handler*)’:
protoname/protoname.cc:125: error: a function-definition is not allowed here before ‘{’ token
protoname/protoname.cc:144: error: a function-definition is not allowed here before ‘{’ token
protoname/protoname.cc: In member function ‘void Protoname::forward_data(Packet*)’:
protoname/protoname.cc:198: warning: comparison between signed and unsigned integer expressions
make:
Any Idea about these errors?
Thank You.
Hi,
DeleteThe errors look like coding syntax errors.