LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NS2 + Wimax, erro ao executa o script. (https://www.linuxquestions.org/questions/linux-newbie-8/ns2-wimax-erro-ao-executa-o-script-4175535456/)

stefferson94 03-01-2015 01:48 PM

NS2 + Wimax, erro ao executa o script.
 
Hello, good guys am new to linux and also the issue of NS2, I need to run by the NS2 + WiMAX + LTE, the more I'm in trouble, I did this step by step http://gotoanswer.stanford.edu/?q=in...imax+in+ns2.35, installed straight over at the time I enter / ns2-35 / tcl / wimax and run a script with the $ ns wimax-script.tcl command it returns an error as shown in the image below, if anyone can help me I would be very grateful, hugs.

@obs.:I am using windows to make the simulation more the same error is repeated in linux.

https://dl-web.dropbox.com/get/Captu...K-UC2uSPQn_xtA

knudfl 03-01-2015 03:13 PM

ns-2.35 + Wimax + LTE
 
Welcome to LQ.

Actually very easy to do :
$ tar xvf ns-allinone-2.35_gcc482.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ zcat wimax-awg26_ns235.patch.gz | patch -p0
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ patch -p0 < LTE-ns235_2014-2.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.35/
$ sudo make install
$ cp ns ns235-wimax.awg+lte
$ sudo cp ns235-wimax.awg+lte /usr/local/bin/

Testing simulations ...
1) Wimax
Code:

$ ns235-wimax.awg+lte test-be-mod.tcl 1 2 http://www.linuxquestions.org/questions/lqspy.php 1000
→ Is OK

2) LTE
$ ns235-wimax.awg+lte eyana.tcl : Also OK.

LTE info
. http://www.linuxquestions.org/questions/tags/lte/
. http://network-simulator-ns-2.7690.n...=lte&sort=date
. http://network-simulator-ns-2.7690.n...20.html#a29711

Wimax info
. http://www.linuxquestions.org/questions/tags/wimax/
. http://www.linuxquestions.org/questi...-a-4175523810/

LTE examples, lte-examples-0614.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

stefferson94 03-01-2015 03:17 PM

Thank you, I will try to do as your tutorial, greetings from the Brazilian.

@Edit - Appeared these errors

In file included from /home/stefferson/Downloads/ns-allinone-2.35/tk8.5.10/unix/../generic/tkInt.h:19:0,
from /home/stefferson/Downloads/ns-allinone-2.35/tk8.5.10/unix/../generic/tk3d.c:14:
/home/stefferson/Downloads/ns-allinone-2.35/tk8.5.10/unix/../generic/tk.h:76:23: fatal error: X11/Xlib.h: Arquivo ou diretório não encontrado
# include <X11/Xlib.h>
^
compilation terminated.
Makefile:908: recipe for target 'tk3d.o' failed
make: *** [tk3d.o] Error 1
tk8.5.10 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com

Could explain them ?

knudfl 03-01-2015 03:44 PM

→ ref #3.

You will of course have to install the ns2 prerequisites,
before you can build any ns2.

Debian, Ubuntu, Mint : $ sudo apt-get install \
g++ automake make patch libtool libxmu-dev xgraph

CentOS, Fedora : # yum install \
gcc-c++ autoconf automake libtool libXmu-devel

Nam http://www.linuxquestions.org/questi...-4175524760/#2


-

stefferson94 03-01-2015 04:07 PM

Well apparently install, would somehow I run the script and see it running in Nam?

@edit

I managed to run LTE with scripts you left attached, only I could not rotate the Wimax scripts, they give error, the same mistake was giving in windows, to using "we simple.tcl" to run the scripts, I'm doing something wrong?

knudfl 03-01-2015 04:26 PM

← ref. #5.

Which OS are you using for ns2 ? Name and version, please.


Quote:

I run the script
Which script ? ? ?

About 'nam' : Did you install a `nam´ package ?


-

stefferson94 03-01-2015 04:30 PM

To using ubuntu 14:10 virtualized, Nam would be to display the script on the screen in graphical form, as shown in the picture http://marco.uminho.pt/~joao/pim-ns2/nam-pim-sm.jpg to trying to run scripts of wimax folder that is inside /tcl/wimax/simple.tcl

@edit

stefferson@stefferson-virtual-machine:~/Downloads/ns-allinone-2.35/ns-2.35/tcl/wimax$ ns test-be.tcl

Wrong Number of Arguments! No arguments in this topology
Syntax: ns test-be.tcl nbMNs

expected integer but got "(1)"
while executing
"exit (1)"
invoked from within
"if {$argc != 1} {
puts ""
puts "Wrong Number of Arguments! No arguments in this topology"
puts "Syntax: ns test-be.tcl nbMNs"
puts ""
exit..."
(file "test-be.tcl" line 33)
stefferson@stefferson-virtual-machine:~/Downloads/ns-allinone-2.35/ns-2.35/tcl/wimax$

knudfl 03-02-2015 04:16 AM

1 Attachment(s)
← ref. #7.

"The ``nist-mob´´ ns-2.29 (or ns-2.31) ///tcl/wimax/test-be.tcl :
Not the same as the "Wimax-awg ns-2.35/test-be-mod.tcl .

Nist-mob : "Syntax: ns test-be.tcl nbMNs"
Example : $ ns-wimax-nist test-be.tcl 19

Wimax-awg : "Syntax: ns test-be-mod.tcl seed diuc dl/ul distance"
Example : See post #2. $ ns235-wimax.awg+lte <5-times-options>

----------------

/tcl/wimax/simple.tcl : Unknown "wimax file".
Which version of Wimax are you talking about ?
-

stefferson94 03-02-2015 05:03 AM

Well my goal is to create a scenario of wireless networks Wiriless 802.11 802.16 Wimax and LTE 4G

knudfl 03-02-2015 06:19 AM

← ref. #9.
Quote:

.. my goal is to create a scenario of wireless networks :
Wireless 802.11, 802.16 Wimax and LTE 4G
... Please read this → other members who worked with {Wimax + LTE}
( Wimax-awg + LTE + DCCP + MPTCP ) → →
. http://www.linuxquestions.org/questi...-a-4175524406/
. http://www.linuxquestions.org/questi...lp-4175520070/
.... and ask @nassou19891, @Master_Stu what they achived.


-

stefferson94 03-02-2015 07:39 AM

Ok I'll try, the patch that spoke to was I put this patch-ns-2.31-041707
along with this step by step:

1) copy the patch for the ns-2.29 folder

2) access the folder

cd ~ / ns-allinone-2.29 / ns-2.29

3) installar the patch:

pacth -p1 <patch-ns-2.31-041707

4) recompile ns:

./configure && make && make clean

5) after recompiled, access the following folder:

cd ~ / ns-allinone-2.29 / ns-2.29 / tcl / wimax

within that folder has an example of simulation scripts

@edit

[code omitted because of length]
: invalid command name "Phy/WirelessPhy/OFDM"
while executing
"Phy/WirelessPhy/OFDM set g_ 0"

knudfl 03-02-2015 09:18 AM

← ref. #11.

#6 http://www.linuxquestions.org/questi...-4175516729/#6
Building ns-2.29 + nist-mob : Ubuntu 11.* - 15.* - 32bits example :
$ tar xvf ns-allinone-2.29.3.tar.gz
http://sourceforge.net/projects/nsna...ar.gz/download
$ 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=gcc41 CXX=g++41 && ./install

$ cd ns-2.29/
$ cp ns ns229-nist
$ sudo cp ns229-nist /usr/local/bin/

And about the compilers gcc41/g++41 :
You will have to tell which Ubuntu 14.04 you are using →
Please show the output from the command $ uname -m


-

stefferson94 03-02-2015 09:24 AM

root@stefferson-pc:/home/stefferson/ns2/ns-allinone-2.35/ns-2.35# ./configure && make clean && make
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
No .configure file found in current directory
Continuing with default options...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ANSI C header files... (cached) yes
checking for string.h... (cached) yes
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... yes
checking if C++ libraries work without any namespace... no
checking if C++ libraries work with namespace std... yes
checking if STL works without any namespace... no
checking if STL works with namespace std... yes
checking should use STL... yes
checking for tcl.h... -I../include
checking for tclInt.h... -I../include
checking for libtcl8.6... no
checking for init.tcl... ../lib/tcl8.5
checking for http.tcl... ../lib/tcl8.5/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.6.1... no
checking for tclsh8.6... /usr/bin/tclsh8.6
configure: error: Installation of tcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tcl is
using the argument --with-tcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tcl=no.
root@stefferson-pc:/home/stefferson/ns2/ns-allinone-2.35/ns-2.35#


I am using the 64-bit version here at work and at home use the 32-bit

knudfl 03-02-2015 09:34 AM

ref. #13.
Quote:

root@stefferson-pc:/home/stefferson/ns2/ns-allinone-2.35/ns-2.35# ./configure
You can do `./configure´ in ns-2.2x .. ns-2.34, not in ns-2.35 !
The command to use is : ./install →
takes care of all ./configure && make clean && make

I.e. $ cd ns-allinone-2.35/ && ./install


-

stefferson94 03-02-2015 09:44 AM

Lets see if I understand correctly, you said up there that the Wimax NS2.29 is not the same NS2.35?

I just need to run the two modules Wimax and LTE with Wifi, just wanted to do this: /


All times are GMT -5. The time now is 08:15 PM.