Installation problems with ns-2.33

View: New views
7 Messages — Rating Filter:   Alert me  

Parent Message unknown Installation problems with ns-2.33

by Siraj Shaikh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
on here: http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04

Everything worked fine and as expected. No errors encountered.

I the validation set up and even the path/environment variables. Have
checked the paths since then and they are all fine.

The problem: for any file xxx.tcl (in the right folder) every time I type

$ ns xxx.tcl

I get

$ xxx.tcl does not exist, try again

Why? When I type

$ ns

I get

Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
Check soa:  host [-v] [options] -C zone
Addrcheck:  host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage:  [-x [name ...]] [-X server [name ...]]

What is the problem? Please help!


Re: Installation problems with ns-2.33

by Leyond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You mean you have installed NS correctly, but you couldn't run tcl file as expected, right?
I have installed ns2.33 on Ubuntu too, but everything goes well.
I want to remind is that please make sure you have access right[Write access] to the folder, because after you type ns xx.tcl, it will produce some files like xx.tr and xx.nam.
So, that is it.
Siraj Shaikh wrote:
I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
on here: http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04

Everything worked fine and as expected. No errors encountered.

I the validation set up and even the path/environment variables. Have
checked the paths since then and they are all fine.

The problem: for any file xxx.tcl (in the right folder) every time I type

$ ns xxx.tcl

I get

$ xxx.tcl does not exist, try again

Why? When I type

$ ns

I get

Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
Check soa:  host [-v] [options] -C zone
Addrcheck:  host [-v] [options] -A host
Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
Special options: [-O srcaddr] [-j minport] [-J maxport]
Extended usage:  [-x [name ...]] [-X server [name ...]]

What is the problem? Please help!

Re: Installation problems with ns-2.33

by Tom Henderson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Siraj Shaikh wrote:

> I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
> on here: http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04
>
> Everything worked fine and as expected. No errors encountered.
>
> I the validation set up and even the path/environment variables. Have
> checked the paths since then and they are all fine.
>
> The problem: for any file xxx.tcl (in the right folder) every time I type
>
> $ ns xxx.tcl
>
> I get
>
> $ xxx.tcl does not exist, try again
>
> Why? When I type
>
> $ ns
>
> I get
>
> Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
> Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
> Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
> Check soa:  host [-v] [options] -C zone
> Addrcheck:  host [-v] [options] -A host
> Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
> Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
> Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
> Special options: [-O srcaddr] [-j minport] [-J maxport]
> Extended usage:  [-x [name ...]] [-X server [name ...]]
>
> What is the problem? Please help!
>
>

It looks like you are not invoking "ns" the network simulator but
another program named "ns" that is a name service.  If you type "which
ns" you will see what program is being invoked when you simply type
"ns".  To work around this, try typing the absolute path to the ns
binary that you want to invoke, such as "/usr/local/bin/ns xxx.tcl".

Tom


Re: Installation problems with ns-2.33

by Siraj Shaikh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


2008/9/4 Tom Henderson <tomh@...>:

> Siraj Shaikh wrote:
>>
>> I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
>> on here:
>> http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04
>>
>> Everything worked fine and as expected. No errors encountered.
>>
>> I the validation set up and even the path/environment variables. Have
>> checked the paths since then and they are all fine.
>>
>> The problem: for any file xxx.tcl (in the right folder) every time I type
>>
>> $ ns xxx.tcl
>>
>> I get
>>
>> $ xxx.tcl does not exist, try again
>>
>> Why? When I type
>>
>> $ ns
>>
>> I get
>>
>> Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
>> Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
>> Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
>> Check soa:  host [-v] [options] -C zone
>> Addrcheck:  host [-v] [options] -A host
>> Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
>> Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
>> Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
>> Special options: [-O srcaddr] [-j minport] [-J maxport]
>> Extended usage:  [-x [name ...]] [-X server [name ...]]
>>
>> What is the problem? Please help!
>>
>>
>
> It looks like you are not invoking "ns" the network simulator but another
> program named "ns" that is a name service.  If you type "which ns" you will
> see what program is being invoked when you simply type "ns".  To work around
> this, try typing the absolute path to the ns binary that you want to invoke,
> such as "/usr/local/bin/ns xxx.tcl".
>
>

Tom

You are right, it is invoking ns in '/usr/bin/ns' every time I type
ns. I tried the absolute path as you suggested and it works! Well not
really.

I get the following error now

$ ns: finish: couldn't execute "nam": no such file or directory
       while executing
"exec nam ptrace.nam &"
       (procedure "finish" line 6)
       invoked from within
"finish"

What is happening here?

So now I have two problems. First, how do I avoid typing the absolute
path every time I want to run ns-2? Could I rename the name of the
ns-2 executable file - would that simply do?

And also, what is this second error?

Thanks for your help - sorry for the delay in this reponse!

Siraj


Re: Installation problems with ns-2.33

by Siraj Shaikh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


2008/9/10 Siraj Shaikh <siraj.shaikh@...>:

> 2008/9/4 Tom Henderson <tomh@...>:
>> Siraj Shaikh wrote:
>>>
>>> I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
>>> on here:
>>> http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04
>>>
>>> Everything worked fine and as expected. No errors encountered.
>>>
>>> I the validation set up and even the path/environment variables. Have
>>> checked the paths since then and they are all fine.
>>>
>>> The problem: for any file xxx.tcl (in the right folder) every time I type
>>>
>>> $ ns xxx.tcl
>>>
>>> I get
>>>
>>> $ xxx.tcl does not exist, try again
>>>
>>> Why? When I type
>>>
>>> $ ns
>>>
>>> I get
>>>
>>> Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
>>> Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
>>> Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
>>> Check soa:  host [-v] [options] -C zone
>>> Addrcheck:  host [-v] [options] -A host
>>> Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N skipzone]
>>> Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T] [-Z]
>>> Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u] [-w]
>>> Special options: [-O srcaddr] [-j minport] [-J maxport]
>>> Extended usage:  [-x [name ...]] [-X server [name ...]]
>>>
>>> What is the problem? Please help!
>>>
>>>
>>
>> It looks like you are not invoking "ns" the network simulator but another
>> program named "ns" that is a name service.  If you type "which ns" you will
>> see what program is being invoked when you simply type "ns".  To work around
>> this, try typing the absolute path to the ns binary that you want to invoke,
>> such as "/usr/local/bin/ns xxx.tcl".
>>
>>
>
> Tom
>
> You are right, it is invoking ns in '/usr/bin/ns' every time I type
> ns. I tried the absolute path as you suggested and it works! Well not
> really.
>
> I get the following error now
>
> $ ns: finish: couldn't execute "nam": no such file or directory
>       while executing
> "exec nam ptrace.nam &"
>       (procedure "finish" line 6)
>       invoked from within
> "finish"
>
> What is happening here?
>
> So now I have two problems. First, how do I avoid typing the absolute
> path every time I want to run ns-2? Could I rename the name of the
> ns-2 executable file - would that simply do?
>
> And also, what is this second error?
>
> Thanks for your help - sorry for the delay in this reponse!
>
> Siraj
>
Hello again

Following up on my previous message, just want to confirm that I had
problems in the path so thats why ns-2 wasnt working. Now it works
fine, but I still dont know how to avoid typing the entire absolute
path every time.

Please help!!

Thanks

Siraj


Re: Installation problems with ns-2.33

by harsh batra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


hi...i am new to ns so dont know much...but i know this problem can be
solved by setting the path.....with command PATH=EXPORT PATH folllowed by
the paths of ur standard directories......when u must have installed ur
ns...it must have given u a path which should be saved.....
now if that path is not saved properly...it wont allow u to execute nam file
directly as it doesnt know where it stores and u get the error of
$ ns: finish: couldn't execute "nam": no such file or directory
      while executing
"exec nam ptrace.nam &"
      (procedure "finish" line 6)
      invoked from within
"finish"

u can see the output by going to nam directory under ur ns folder
and open out.tr thru nam

and for avoiding the error set ur path to nam file

and plse anybody help me also...
i need a coding for a algo but i m cluless how to start....if anybody can
help me then i can communicate with that person and can tell u the algo to
be implemented...
pls help me
regards
harsh
On Wed, Sep 10, 2008 at 5:46 PM, Siraj Shaikh <siraj.shaikh@...>wrote:

>
> 2008/9/10 Siraj Shaikh <siraj.shaikh@...>:
>  > 2008/9/4 Tom Henderson <tomh@...>:
> >> Siraj Shaikh wrote:
> >>>
> >>> I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
> >>> on here:
> >>> http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04
> >>>
> >>> Everything worked fine and as expected. No errors encountered.
> >>>
> >>> I the validation set up and even the path/environment variables. Have
> >>> checked the paths since then and they are all fine.
> >>>
> >>> The problem: for any file xxx.tcl (in the right folder) every time I
> type
> >>>
> >>> $ ns xxx.tcl
> >>>
> >>> I get
> >>>
> >>> $ xxx.tcl does not exist, try again
> >>>
> >>> Why? When I type
> >>>
> >>> $ ns
> >>>
> >>> I get
> >>>
> >>> Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
> >>> Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
> >>> Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
> >>> Check soa:  host [-v] [options] -C zone
> >>> Addrcheck:  host [-v] [options] -A host
> >>> Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N
> skipzone]
> >>> Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T]
> [-Z]
> >>> Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u]
> [-w]
> >>> Special options: [-O srcaddr] [-j minport] [-J maxport]
> >>> Extended usage:  [-x [name ...]] [-X server [name ...]]
> >>>
> >>> What is the problem? Please help!
> >>>
> >>>
> >>
> >> It looks like you are not invoking "ns" the network simulator but
> another
> >> program named "ns" that is a name service.  If you type "which ns" you
> will
> >> see what program is being invoked when you simply type "ns".  To work
> around
> >> this, try typing the absolute path to the ns binary that you want to
> invoke,
> >> such as "/usr/local/bin/ns xxx.tcl".
> >>
> >>
> >
> > Tom
> >
> > You are right, it is invoking ns in '/usr/bin/ns' every time I type
> > ns. I tried the absolute path as you suggested and it works! Well not
> > really.
> >
> > I get the following error now
> >
> > $ ns: finish: couldn't execute "nam": no such file or directory
> >       while executing
> > "exec nam ptrace.nam &"
> >       (procedure "finish" line 6)
> >       invoked from within
> > "finish"
> >
> > What is happening here?
> >
> > So now I have two problems. First, how do I avoid typing the absolute
> > path every time I want to run ns-2? Could I rename the name of the
> > ns-2 executable file - would that simply do?
> >
> > And also, what is this second error?
> >
> > Thanks for your help - sorry for the delay in this reponse!
> >
> > Siraj
> >
> Hello again
>
> Following up on my previous message, just want to confirm that I had
> problems in the path so thats why ns-2 wasnt working. Now it works
> fine, but I still dont know how to avoid typing the entire absolute
> path every time.
>
> Please help!!
>
> Thanks
>
> Siraj
>
>

Parent Message unknown Re: Installation problems with ns-2.33

by Siraj Shaikh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


2008/9/10 Mayur <mayur@...>:

> Siraj Shaikh wrote:
>>
>> 2008/9/10 Siraj Shaikh <siraj.shaikh@...>:
>>
>>>
>>> 2008/9/4 Tom Henderson <tomh@...>:
>>>
>>>>
>>>> Siraj Shaikh wrote:
>>>>
>>>>>
>>>>> I installed ns-2.33 on my machine (Ubuntu). Followed the intstructions
>>>>> on here:
>>>>> http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04
>>>>>
>>>>> Everything worked fine and as expected. No errors encountered.
>>>>>
>>>>> I the validation set up and even the path/environment variables. Have
>>>>> checked the paths since then and they are all fine.
>>>>>
>>>>> The problem: for any file xxx.tcl (in the right folder) every time I
>>>>> type
>>>>>
>>>>> $ ns xxx.tcl
>>>>>
>>>>> I get
>>>>>
>>>>> $ xxx.tcl does not exist, try again
>>>>>
>>>>> Why? When I type
>>>>>
>>>>> $ ns
>>>>>
>>>>> I get
>>>>>
>>>>> Usage:      host [-v] [-a] [-t querytype] [options]  name  [server]
>>>>> Listing:    host [-v] [-a] [-t querytype] [options]  -l zone  [server]
>>>>> Hostcount:  host [-v] [options] -H [-D] [-E] [-G] zone
>>>>> Check soa:  host [-v] [options] -C zone
>>>>> Addrcheck:  host [-v] [options] -A host
>>>>> Listing options: [-L level] [-S] [-A] [-p] [-P prefserver] [-N
>>>>> skipzone]
>>>>> Common options:  [-d] [-f|-F file] [-I chars] [-i|-n] [-q] [-Q] [-T]
>>>>> [-Z]
>>>>> Other options:   [-c class] [-e] [-m] [-o] [-r] [-R] [-s secs] [-u]
>>>>> [-w]
>>>>> Special options: [-O srcaddr] [-j minport] [-J maxport]
>>>>> Extended usage:  [-x [name ...]] [-X server [name ...]]
>>>>>
>>>>> What is the problem? Please help!
>>>>>
>>>>>
>>>>>
>>>>
>>>> It looks like you are not invoking "ns" the network simulator but
>>>> another
>>>> program named "ns" that is a name service.  If you type "which ns" you
>>>> will
>>>> see what program is being invoked when you simply type "ns".  To work
>>>> around
>>>> this, try typing the absolute path to the ns binary that you want to
>>>> invoke,
>>>> such as "/usr/local/bin/ns xxx.tcl".
>>>>
>>>>
>>>>
>>>
>>> Tom
>>>
>>> You are right, it is invoking ns in '/usr/bin/ns' every time I type
>>> ns. I tried the absolute path as you suggested and it works! Well not
>>> really.
>>>
>>> I get the following error now
>>>
>>> $ ns: finish: couldn't execute "nam": no such file or directory
>>>      while executing
>>> "exec nam ptrace.nam &"
>>>      (procedure "finish" line 6)
>>>      invoked from within
>>> "finish"
>>>
>>> What is happening here?
>>>
>>> So now I have two problems. First, how do I avoid typing the absolute
>>> path every time I want to run ns-2? Could I rename the name of the
>>> ns-2 executable file - would that simply do?
>>>
>>> And also, what is this second error?
>>>
>>> Thanks for your help - sorry for the delay in this reponse!
>>>
>>> Siraj
>>>
>>>
>>
>> Hello again
>>
>> Following up on my previous message, just want to confirm that I had
>> problems in the path so thats why ns-2 wasnt working. Now it works
>> fine, but I still dont know how to avoid typing the entire absolute
>> path every time.
>>
>> Please help!!
>>
>> Thanks
>>
>> Siraj
>>
>>
>
> Siraj,
> The system tries to find any executables (the commands we give on the
> prompt) in the PATH. You can know what is the current path by typing 'echo
> $PATH' . So, when we type 'ns' it tries to find that in that path. Now in
> your case, as you say you already have changed the PATH by adding <ns2> bin
> path as suggested during installation. Now, if there are two SAME NAMED
> executable in two different directories, (both of them are in the PATH) then
> the first found in the order of the PATH is executed. This is why when you
> type 'ns' it executes the /usr/bin/ns which is something else we dont
> want... One way to overcome this problem (to get rid of typing the FULL path
> to our ns) is to rename/remove the 'ns' in usr/bin/ folder to some other
> name, say 'ns_different'. Of course here I assume that you need not use that
> ns at least in near by future. (How will you use it if you don't know what
> it is???) In future, however, if you need it you must use it as
> 'ns_different' command.
> Now for the 'nam' related error, I suppose that nam should not have
> installed at all. You can check it by checking the presence of
>>
>> <ns-allinone-2.33>/nam-1.13/nam.
>
>> If 'nam' is not there than it is not installed at all. However if it is
>> there then again the problem is related to the path. You can confirm the
>> proper installation by executing (full pathed command)
>> '<pathtoallinone>/nam-1.13/nam <your nam file> '. You can correct this path
>> related problem as discussed above for the NS.
>
> bye
> Mayur
>
Mayur

Thanks for your helpful reply. Makes sense. The current setup on my
machine is dedicated to using ns-2. I would like to, however, use the
internet (browse) from time to time. I am just wondering whether
renaming the usual name service (ns) would have any impact on the
access to the internet or any other hidden/system services?

If not, then I wouldnt mind just commenting out the entry for the ns
program for now. If need be, I can simply reinstate it then later.

Any thoughts on this from anyone would be great.

Thanks

Siraj