LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-01-2011, 12:37 PM   #1
jnhun6
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Rep: Reputation: Disabled
Extending NS-2.34 to include RCP - [code omitted because of length] : invalid command


Dear All,

I am working on Ubuntu 11.04 and trying to extend NS-2.34 to include Rate Control Protocol (RCP). I have done the steps in readMe of RCP to install it, namely the following steps:

__________________________________________________
To install RCP:
***************

1. Put the 'rcp' directory under ns-allinone-2.30/ns-2.30. The rcp directory has: rcp.cc, rcp-host.cc and rcp-host.h. These are the only newly created files.

The following are existing ns-2 files modified for RCP:

2. ns-packet.tcl at ns-allinone-2.30/ns-2.30/tcl/lib

3. ns-default.tcl at ns-allinone-2.30/ns-2.30/tcl/lib

4. packet.h at ns-allinone-2.30/ns-2.30/common

5. trace.cc at ns-allinone-2.30/ns-2.30/trace

6. Add the following line in Makefile to compile rcp:
rcp/rcp.o rcp/rcp-host.o

7. You can find some sample .tcl files to run RCP in example-tcl-files
__________________________________________________

I have made these changes to the corresponding files in NS-2.34.

Before adding RCP, I was able to run tcl files using NS. Now after adding RCP and recompiling NS, when I try to run any tcl file, I get the following error:
___________________________________________________
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"
___________________________________________________

Any immediate helps on resolving this issue would be very much appreciated.

Btw, the incremental code of RCP is here [in case more detailed info is needed]:

<http://yuba.stanford.edu/rcp/rcp-ns2.30.tar.gz>

Last edited by jnhun6; 12-01-2011 at 12:41 PM.
 
Old 12-01-2011, 01:05 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.
Quote:
1. Put the 'rcp' directory under ns-allinone-2.30/ns-2.30
1) Do not expect an ns-2.30 modification to work in ns-2.34 .
Patches / modifications are always meant for a specific version.

2) You can have as many versions of ns2 installed at the same time.
Just do not any of those to your PATH, LD_LIBRARY_PATH.
 
Old 12-01-2011, 04:12 PM   #3
jnhun6
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks knudfl.

That's completely true. For steps 2-6 I have changed the particular lines in the files and not just simply replacing the files. For step 1, I directly copied the rcp directory. However, since the compilation was successful, I am expecting that for a tcl file which does not use anything from RCP, the execution should be successful. That's why I am thinking there might be some other problem.

I have also been trying to install NS-2.30 on Ubuntu 11.04, but not successful yet. I installed it based on the steps here <http://erl1.wordpress.com/?s=ns-2.30> (although it's for Ubuntu 10.04 Lucid Lynx). It got installed, however when I run a tcl file I get a buffer overflow error. According to <http://erl1.wordpress.com/2011/05/12/installing-ns-2-34-on-ubuntu-11-04/> which suggests to mention an (older) compiler version directly in "Makefile.in" of tcl for buffer overflow error and then re-install it, I did so, but I mentioned version at the beginning of the command, i.e.,
"-V 4.4 CC = @CC@", as otherwise it gets aborted in the middle complaining that,
"gcc: '-V' must come at the start of the command line".

It got installed, but when I run tcl files, it still gives a buffer overflow error along with map of the memory.

Do you have any ideas as how to get NS-2.30 successfully installed and have it working?

Thank you so much in advance.

Last edited by jnhun6; 12-01-2011 at 05:03 PM.
 
Old 12-01-2011, 05:35 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Ubuntu 11.04 is not really fit for any ns2.
( Ubuntu 11.10 is even worse.)

If it must be Ubuntu, then Ubuntu 10.04 should be preferred.
( All ns2 was created on CentOS / RHEL.
The perfect choice is CentOS 5.7 ).


About Ubuntu 10.04 : No need to use any "Erlend's modifications".
I.e.: 'export CC=gcc-4.1 CXX=g++-4.1 && ./install' will usually do.

..

Last edited by knudfl; 12-02-2011 at 03:37 AM.
 
Old 12-01-2011, 07:04 PM   #5
jnhun6
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
'export CC=gcc-4.1 CXX=g++-4.1 && ./install' does not work; it gets aborted with the errors which need "Erlend's modifications" (I am assuming that you meant 4.4, since version 4.1 is not available to be installed).

With "Erlend's modifications" NS-2.30 can be installed, but when running tcl files, it generates buffer overflow error.

Any suggestions as how to install NS-2.30 on Ubuntu 11.04 successfully?
 
Old 12-02-2011, 01:28 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
With "Erlend's modifications" NS-2.30 can be installed,
but when running tcl files, it generates buffer overflow error.
"buffer overflow error" : Nothing to do.

"Erlend's modifications" may have worked the day they were written.
But Ubuntu updates after that time will prevent ns2 from working :
"Buffer overflow" will be the result. We have seen the issue before
here at LQ.

If you insist in using 11.04, the "gcc41-compat" for 11.04 can used.
( Not tested specificly with ns-2.30 )
> > > Start from scratch with a new unpacked ns-allinone-2.30 .

Please install the 2 packages 1) gcc41-compat-4.1.2_i386.deb
https://docs.google.com/open?id=0B7S...RjNjJhOTZjNjI2

2) g++41-compat-4.1.2_i386.deb
https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4
Then reboot, and the binaries gcc41, g++41 are ready for use.


Generally : Do not use Ubuntu 11.04 or later for ns2.

P.S. : Please see the EDIT in post #4 : Line 6 is about 10.04 .
(The export command will work in 11.04 too, with gcc41/g++41 -compat:
'export CC=gcc41 CXX=g++41 && ./install' ).

..

Last edited by knudfl; 12-02-2011 at 04:02 AM.
 
Old 12-02-2011, 08:26 AM   #7
jnhun6
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks.

Quote:
Please install the 2 packages 1) gcc41-compat-4.1.2_i386.deb
https://docs.google.com/open?id=0B7S...RjNjJhOTZjNjI2

2) g++41-compat-4.1.2_i386.deb
https://docs.google.com/open?id=0B7S...hjMjljN2M2MGU4
Then reboot, and the binaries gcc41, g++41 are ready for use.
These two links don't show.
When I try to install the two packages, they cannot be located.
If there are specific things to install these, could you please let me know (I guess that should be in the links you have provided--but those don't show)?


And another question: what version of Ubuntu works well for NS-2.30? Is there a "safe" way to downgrade or it should be installed from scratch?
 
Old 12-02-2011, 02:06 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
What version of Ubuntu works well for NS-2.30
Ubuntu 10.04 will work with ns-2.30 (And all other ns2 from version 2.27 up.)

A downgrade is not possible, but you can install 10.04 on a spare partition.


By the way, the links in post #6 seem to work OK :
Packages are downloaded to the default "Downloads" folder.
And can be installed with :
'sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb'

..
 
Old 12-02-2011, 04:39 PM   #9
jnhun6
LQ Newbie
 
Registered: Dec 2011
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
By the way, the links in post #6 seem to work OK :
I still cannot access it, it gives me this error: Not Found - Error 404.
Maybe read permissions are not set for public.



Quote:
Packages are downloaded to the default "Downloads" folder.
And can be installed with :
'sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb'
generates error, not accessible:
_______________________________________________________________
dpkg: error processing gcc41-compat-4.1.2_i386.deb (--install):
cannot access archive: No such file or directory
dpkg: error processing g++41-compat-4.1.2_i386.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
gcc41-compat-4.1.2_i386.deb
g++41-compat-4.1.2_i386.deb
_______________________________________________________________

Last edited by jnhun6; 12-02-2011 at 04:40 PM.
 
Old 12-03-2011, 05:55 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The link options for the 2 packages on 'Google Docs' are :

Shared, "Public on the Internet", "Anybody can access and view".


Optional method http://www.linuxquestions.org/questi...ember&u=386037
= Send email to knudfl.
( Then I will attach the 2 files to a return mail.)

..

Last edited by knudfl; 12-03-2011 at 05:58 AM.
 
Old 08-08-2012, 06:58 AM   #11
bhargavigoswami
LQ Newbie
 
Registered: Jul 2012
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by jnhun6 View Post
Dear All,

I am working on Ubuntu 11.04 and trying to extend NS-2.34 to include Rate Control Protocol (RCP). I have done the steps in readMe of RCP to install it, namely the following steps:

__________________________________________________
To install RCP:
***************

1. Put the 'rcp' directory under ns-allinone-2.30/ns-2.30. The rcp directory has: rcp.cc, rcp-host.cc and rcp-host.h. These are the only newly created files.

The following are existing ns-2 files modified for RCP:

2. ns-packet.tcl at ns-allinone-2.30/ns-2.30/tcl/lib

3. ns-default.tcl at ns-allinone-2.30/ns-2.30/tcl/lib

4. packet.h at ns-allinone-2.30/ns-2.30/common

5. trace.cc at ns-allinone-2.30/ns-2.30/trace

6. Add the following line in Makefile to compile rcp:
rcp/rcp.o rcp/rcp-host.o

7. You can find some sample .tcl files to run RCP in example-tcl-files
__________________________________________________

I have made these changes to the corresponding files in NS-2.34.

Before adding RCP, I was able to run tcl files using NS. Now after adding RCP and recompiling NS, when I try to run any tcl file, I get the following error:
___________________________________________________
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"
___________________________________________________

Any immediate helps on resolving this issue would be very much appreciated.

Btw, the incremental code of RCP is here [in case more detailed info is needed]:

<http://yuba.stanford.edu/rcp/rcp-ns2.30.tar.gz>

-------------------------------------------------------------
I tried alot to install RCP over ns2.30. But I was unsuccessful.
First I installed ns2.30. I could successfully do that over Fedora.
Second I downloaded RCP for ns2.30 from following link

http://yuba.stanford.edu/rcp/

But, I could not implement it successfully.

During RCP implementation over ns2.30, it does not give me any error.
But when I run ns command, I get following error:

[amg@localhost ~]$ ns
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"


I m stuck now. Can't move forward my research.
Need your help. Please help me.
 
Old 11-01-2012, 06:55 AM   #12
bhargavigoswami
LQ Newbie
 
Registered: Jul 2012
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by bhargavigoswami View Post
-------------------------------------------------------------
I tried alot to install RCP over ns2.30. But I was unsuccessful.
First I installed ns2.30. I could successfully do that over Fedora.
Second I downloaded RCP for ns2.30 from following link

http://yuba.stanford.edu/rcp/

But, I could not implement it successfully.

During RCP implementation over ns2.30, it does not give me any error.
But when I run ns command, I get following error:

[amg@localhost ~]$ ns
ns:
[code omitted because of length]
: invalid command name "Queue/DropTailVariant"
while executing
"Queue/DropTailVariant set drop_front_ false"


I m stuck now. Can't move forward my research.
Need your help. Please help me.
The problem is solved.
Need change in ns-default.tcl. Just replace rcp related agents with Queue/DropTail/RCP
for more details please mail me at bhargavigoswami@gmail.com
Hope it helps you in yr research.
 
  


Reply

Tags
g++41-compat


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
code omitted & invalid command naren123.k Programming 1 04-23-2011 02:39 PM
trying normal rcp (/usr/bin/rcp) Permission denied. Martin Peter Clarke Linux - Server 5 12-21-2010 10:42 AM
HP DC7900 error (ACPI: invalid PBLK length (7)) iansane Fedora - Installation 1 07-30-2009 07:10 AM
code omitted because of length newbie06 Linux - Newbie 0 03-13-2007 10:58 AM
ERROR: Invalid password length 4222. greigster Linux - Security 6 02-17-2006 04:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration