LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-05-2011, 07:12 AM   #1
TLa
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: 0
Cool Issue with NS2.34 with BGP patch


Hello Everyone,

I'd like to use NS2 version 2.34 using the BGP patch (available at : http://www.ensc.sfu.ca/~ljilja/cnl/p...-2.34-BGP.html)

I've followed the procedure but when I try to run './install' from the ns-allinone-2.34 directory I got :

(...)
usion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o bgp/Util/ipaddress.o bgp/Util/ipaddress.cc
bgp/Util/ipaddress.cc: In constructor ‘IPaddress::IPaddress(std::string)’:
bgp/Util/ipaddress.cc:164: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’:
bgp/Util/ipaddress.cc:280: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc:296: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘boolVector IPaddress::str2bin(std::string)’:
bgp/Util/ipaddress.cc:311: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘int IPaddress::intval()’:
bgp/Util/ipaddress.cc:421: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘int IPaddress::masked_intval(int)’:
bgp/Util/ipaddress.cc:581: warning: comparison between signed and unsigned integer expressions
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’:
bgp/Util/ipaddress.cc:668: error: ‘sprintf’ was not declared in this scope
bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’:
bgp/Util/ipaddress.cc:699: error: ‘sprintf’ was not declared in this scope
make: *** [bgp/Util/ipaddress.o] Erreur 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


I've replaced #include<string.h> with #include<cstring> in the 'ipaddress.cc' but it does not work...
I work with Ubuntu10.4...
Can you help me ?

Thanks !

TLa
 
Old 05-06-2011, 04:11 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Welcome to LQ.

Ubuntu 10.04 Lucid :

Probably :
sudo apt-get install g++-4.3

cd ns-allinone-2.34/ && export CC=gcc-4.3 CXX=g++-4.3 && ./install
1) You may have to run 'make clean' in ns-allinone-2.34/ns-2.34/.
2) May be an even older compiler is required.
The g++-3.4 from Ubuntu 8.04 Hardy can be used.
..
 
1 members found this post helpful.
Old 05-09-2011, 02:54 AM   #3
TLa
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks knudfl it's working now ! The problem was the compiler.
Now I have written a script to use BGP

I would like to emulate a network made up of 2 AS; and in each AS 5 nodes.
For that I have installed the NS-2 2.34 version with the BGP patch.
I created two BGP nodes like this :

$ns node-config -BGP ON
set n0 [$ns node 0:10.0.0.1]
set n1 [$ns node 1:10.1.1.1]
$ns node -config -BGP OFF


And I would like to create the other nodes using the dynamic routing (LS or DV)

I know that I cannot use the line : $ns rtproto DV (or LS) otherwise I will be contradictory with the begin with BGP...

Do you have an advice on that issue? Is there a possibility to put locally the dynamic routing for a node or a link ?
 
Old 11-13-2012, 07:42 PM   #4
lovsis
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Rep: Reputation: 0
hello, which commands have you used to solve the BGP patch issues. thanks

Last edited by lovsis; 11-13-2012 at 07:46 PM.
 
Old 11-14-2012, 04:54 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 4, @ lovsis
Quote:
BGP patch issues
There are not supposed to be any issues with BGP.
Which OS are you using ? Name and version, please.

Examples : 1) Ubuntu 10.04, 10.10
cd ns-allinone-2.34/ && tar xvf ns-2.34-bgp_2.0.tgz &&
patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc-4.1 CXX=g++-4.1 && ./install

2) Ubuntu 11.04 : The "export command" is : export CC=gcc41 CXX=g++41
3) Fedora : export CC=gcc34 CXX=g++34

Simulation example : ns-allinone-2.34/ns-2.34/tcl/bgp/test/
ns drop-peer2.tcl : OK.

.
 
Old 02-15-2013, 12:17 AM   #6
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
I am using ubuntu 12.04,i tried to install ns-2.34 but i am getting this error while installing..

In file included from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tkInt.h:21:0,
from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.h:18,
from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.c:16:
/home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk.h:81:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.4.18 make failed! Exiting ...
 
Old 02-15-2013, 03:54 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
Post # 6, @yashwanth58 : Welcome to LQ.

This thread is about BGP only.
If you are just installing a plain ns-allinone-2.34 :
.... Please start a new thread :
http://www.linuxquestions.org/questi...ux-software-2/ > New Thread.

Prerequisites for ns2 : sudo apt-get install \
g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev
... And : gcc41-compat*12*, g++41-compat, post #47 here
http://www.linuxquestions.org/questi...532/page4.html

-
 
Old 02-15-2013, 06:50 AM   #8
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Unhappy

#7 @knudfl



I want information regarding bgp only but i am not able to install ns-2.34..i have installed gcc-4.4


but i am getting this error


In file included from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tkInt.h:21:0,
from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.h:18,
from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.c:16:
/home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk.h:81:23: fatal error: X11/Xlib.h: No such file or directory
compilation terminated.
make: *** [tk3d.o] Error 1
tk8.4.18 make failed! Exiting ...
 
Old 02-15-2013, 07:04 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 8

No ns2 any version can be installed until you do $ sudo apt-get install libxmu-dev

Did you read post # 7 : sudo apt-get install \
g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev


And post # 5 :
Code:
cd 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++41 && ./install

Last edited by knudfl; 02-20-2013 at 08:09 AM.
 
Old 02-15-2013, 10:06 AM   #10
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Smile

@knudfl




yashwanth@ubuntu:~$ cd 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
while doing this i am getting this

patching file ns-2.34/common/node.cc
Reversed (or previously applied) patch detected! Assume -R? [n]


next what shall i do..
 
Old 02-15-2013, 11:19 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 10
Quote:
patching file ns-2.34/common/node.cc
Reversed (or previously applied) patch detected! Assume -R? [n]
Happens when you apply the patch more than one time, usually.
You can just hit <Enter> for every "Assume -R? [n] "

-
 
Old 02-15-2013, 09:48 PM   #12
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Thanks for helping me

while installing ns-2.34 i am getting this



tcl8.4.18 make succeeded.
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/yashwanth/ns-allinone-2.34/lib/
cp: cannot create regular file `/home/yashwanth/ns-allinone-2.34/lib/#inst.4683#': Permission denied
rm: cannot remove `/home/yashwanth/ns-allinone-2.34/lib/libtcl8.4.a': Permission denied
mv: cannot stat `/home/yashwanth/ns-allinone-2.34/lib/#inst.4683#': 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.
yashwanth@ubuntu:~/ns-allinone-2.34$
 
Old 02-15-2013, 09:59 PM   #13
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
previously i changed the

CC= @CC@
and change it to:
CC= gcc-4.4 in .bashrc



but now these lines are not there in .bashrc itself
 
Old 02-16-2013, 03:18 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,522

Rep: Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503Reputation: 2503
# 13
Quote:
previously i changed the CC= @CC@ , and change it to:
CC= gcc-4.4 in .bashrc
Please don't do that. Makes no sense. Use the appropriate export command :
export CC=gcc41 CXX=g++41


# 12
If sudo was used for any commands, you will have no access : Permission denied.
Delete everything, and do :
Code:
tar xvf ns-allinone-2.34.tar.gz && cd 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++41 && ./install

Last edited by knudfl; 02-20-2013 at 08:10 AM.
 
Old 02-16-2013, 10:21 AM   #15
yashwanth58
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
sir,i followed all the steps above you provided..and installed ns2.34 in uduntu 12.04,while validating i got this

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

Last edited by yashwanth58; 02-18-2013 at 10:24 AM.
 
  


Reply

Tags
bgp, bgp-ns2, bgp-rfd-mrai, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
installing leach patch in ns2.34 in ubuntu9.10 g_vaibh Ubuntu 13 04-29-2014 05:17 PM
how to installing LTE module patch in NS2.33 kiwiw Ubuntu 121 02-24-2014 07:32 AM
patch LTE module for ns2 Emna Linux - Newbie 1 03-10-2011 02:59 AM
need 802.11e patch for ns2 stud17 Linux - Software 1 03-09-2011 06:54 AM
integrating patch in ns2 MLinux Linux - Networking 2 11-30-2010 08:26 AM


All times are GMT -5. The time now is 10:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration