[ns] seting no. of hops in ns

2006-08-11 Thread sachin gajjar

hi all
can anyone let me know how to set different number of hops for nodes in
wireless networks tcl examples
I will really be grateful..
thanks


-- 
Sachin Gajjar
9868023204(m)
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Re: [ns] send_time = Now or Scheduler::instance().clock();

2006-08-11 Thread Bie New

Thanks Pedro, But where can I find the definition of NOW. Would you tell me
in which files?

:)


2006/8/11, Pedro Fortuna [EMAIL PROTECTED]:

 Actually, I think it is exactly the same thing, as Now is defined as a
 Scheduler::instance().clock(). You may even see in some places the
 macro CURRENT_TIME. They are all macros for
 Scheduler::instance().clock().

 Regards,
 Pedro Fortuna
 INESC Porto

 On 8/10/06, Bie New [EMAIL PROTECTED] wrote:
 
  Dear all,
 
  I check some .CC files and find in some programs they use send_time =
 NOW,
  but the other use send_time =Scheduler::instance().clock().
 
  Does anyone know what's the different between NOW and
  Scheduler::instance().clock() ?
 
  in Scheduler.h/.cc
 
  class Scheduler : public TclObject {
  public:
  ..
  double clock() const {  // simulator virtual time
  return (clock_);
   }
   .
  protected:
   .
   double clock_;
   ..
  };
 



[ns] doubt in Mac/802_11 parameters

2006-08-11 Thread Sandeep

Hi all,
In Mac/802_11 what do dataRate_ basicRate_ and  PLCPDataRate_ mean? 
what's the difference btw them. What's the difference btw 
PreambleLength_ and PLCPHeaderLength_
I set them in my code as below
Mac/802_11 set dataRate_ 11Mb
Mac/802_11 set PreambleLength_ 144
Mac/802_11 set PLCPHeaderLength_  48  ;# 48 bits
Mac/802_11 set PLCPDataRate_  6.0e6   ;# 6Mbps

but only 1mbps throughput is coming
Please some one help.
Thanks in advance.
bye



[ns] Event Unique ID

2006-08-11 Thread Chris c

Hello there,

for example,  N0---N1---N2, PingAgents on N0 and N2.
Before Agent on N0 send ping-packet -send(pkt,0) , the pkt-uid_ is 3;
when Agent on N2 receive that ping-packet, the pkt-uid_ is -5,  when it
send reply message,  the pkt-uid_ is 7;
when Agent on N0 receive the reply-packet, the pkt-uid_ is -9.

Anyone knows what happen to there number, I mean, where is 4 or -4, 8 or -8
???

Thanks in advance


Re: [ns] trace file

2006-08-11 Thread plucs

How did you find the mailing list yet fail to find the links to the 
installation instructions?

Windows:
http://www.isi.edu/nsnam/ns/ns-win32-build.html

Linux:
http://www.isi.edu/nsnam/ns/ns-build.html

P.

[EMAIL PROTECTED] wrote:
 Assuming you are using linux:

 tar -xzf ns source
 enter the directory and login as root
 run ./configure
 run make
 run make install (and ns is going to be put at the /usr/local/bin directory)

 apparently you need to have the make util and the g++ compiler

 There are installation instruction on the nsnam website so check them out.


 Quoting Amalorpavam R [EMAIL PROTECTED]:

   
 hai,
  how to see the trace files?
  how to compile the available c++ code?
  i need your reply.please.


 -
 Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great 
 rates starting at 1¢/min.

 




   



[ns] can I use duplex-link between nodes in wireless environment

2006-08-11 Thread Sandeep

Can I use the following command for nodes in wireless envirnoment
because even though I configured nodes as Mac/802_11 the through put is 
very large
depending on the speed I pass to following command

$ns duplex-link $node_(0) $node_(1) 50mb 2ms DropTail

its ignoring Mac/802_11 dataRate_   and other similar 802_11 parameters



[ns] connect x attach-agent

2006-08-11 Thread Renata Vidal

What's the difference among atttach-agent and connect?

It's look like the connect is about 2 agents, and the attach-agent is about
node and agent. It's correct!?

I'm experiencing the message above, it always implies with all lines with
connect, so I'm doing something wrong. Any tip will be appreciated

can't read agent_addr_: no such variable
while executing
subst $[subst $var]
(procedure _o19 line 5)
(SplitObject set line 5)
invoked from within
$dst set agent_addr_
(procedure _o3 line 2)
(Simulator simplex-connect line 2)
invoked from within
$self simplex-connect $src $dst
(procedure _o3 line 9)
(Simulator connect line 9)
invoked from within
$ns connect $udp($i) $s($i)
(for body line 10)
invoked from within
for {set i 0} {$i  $numeroNodos} {incr i} {
set udp($i) [new Agent/UDP]
$udp($i) set packetSize_ 512
$udp($i) set fid_ ($i)
set cbr($i) [new Appl...
(file renata.tcl line 89)

Thanks, Renata
-- 
Renata Vidal
Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos
ataques sem cultivar o espírito da iniciativa (A Arte da Guerra – SUN TSU –
pg 102)


Re: [ns] connect x attach-agent

2006-08-11 Thread ggeorgak

I can't debug your problem but from what I understand by looking the 
source code
and using ns attach-agent is used to bind an Agent object to source generators
or sinks. For example:

set tcp [new Agent/TCP]
$ns attach-agent $somenode %tcp
(I think this is valid too: $somenode attach-agent $tcp)

and the same applies to Applications too:

set ftp [new Application/FTP]
$ftp attach-agent $tcp

Whereas connect is used to create a virtual connection between two agents so
they can communicate:

(Continuing from above)
set sink [new Agent/TCPSink]
$ns connect $tcp $sink

I hope I was helpful.

ggeorgak
Quoting Renata Vidal [EMAIL PROTECTED]:


 What's the difference among atttach-agent and connect?

 It's look like the connect is about 2 agents, and the attach-agent is about
 node and agent. It's correct!?

 I'm experiencing the message above, it always implies with all lines with
 connect, so I'm doing something wrong. Any tip will be appreciated

 can't read agent_addr_: no such variable
while executing
 subst $[subst $var]
(procedure _o19 line 5)
(SplitObject set line 5)
invoked from within
 $dst set agent_addr_
(procedure _o3 line 2)
(Simulator simplex-connect line 2)
invoked from within
 $self simplex-connect $src $dst
(procedure _o3 line 9)
(Simulator connect line 9)
invoked from within
 $ns connect $udp($i) $s($i)
(for body line 10)
invoked from within
 for {set i 0} {$i  $numeroNodos} {incr i} {
set udp($i) [new Agent/UDP]
$udp($i) set packetSize_ 512
$udp($i) set fid_ ($i)
set cbr($i) [new Appl...
(file renata.tcl line 89)

 Thanks, Renata
 --
 Renata Vidal
 Triste é o destino de quem tenta vencer as batalhas e ter sucesso nos
 ataques sem cultivar o espírito da iniciativa (A Arte da Guerra – SUN TSU –
 pg 102)





Re: [ns] send_time = Now or Scheduler::instance().clock();

2006-08-11 Thread Pedro Fortuna

It's in common/object.h
#define NOW Scheduler::instance().clock()

Please don't ask questions when you can easily find the answer by your
self with little effort. It's a waste of everyone's time.

On 8/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 If you are curious to find NOW why don't you use find with grep??

 P.

 Bie New wrote:
  Thanks Pedro, But where can I find the definition of NOW. Would you tell me
  in which files?
 
  :)
 
 
  2006/8/11, Pedro Fortuna [EMAIL PROTECTED]:
 
  Actually, I think it is exactly the same thing, as Now is defined as a
  Scheduler::instance().clock(). You may even see in some places the
  macro CURRENT_TIME. They are all macros for
  Scheduler::instance().clock().
 
  Regards,
  Pedro Fortuna
  INESC Porto
 
  On 8/10/06, Bie New [EMAIL PROTECTED] wrote:
 
  Dear all,
 
  I check some .CC files and find in some programs they use send_time =
 
  NOW,
 
  but the other use send_time =Scheduler::instance().clock().
 
  Does anyone know what's the different between NOW and
  Scheduler::instance().clock() ?
 
  in Scheduler.h/.cc
 
  class Scheduler : public TclObject {
  public:
  ..
  double clock() const {  // simulator virtual time
  return (clock_);
   }
   .
  protected:
   .
   double clock_;
   ..
  };
 
 
 
 
 
 




-- 
Cumprimentos,
Pedro Fortuna



[ns] new 802.11 - CAP proportion too big

2006-08-11 Thread Pedro Fortuna

Hello Mathieu,

Sorry for bothering you again.  I have a question which might have
more to do with the 802.11e standard, but maybe you can enlighten me a
bit. Im using your 802.11e implementation in NS2 to setup a scenario
where a number of VoIP flows is exchanged between the QAP and a bunch
of nodes.

Each flow is configured with the exact same TSpec:
# set TSpec
set tspec [new TclTspec]
$tspec set-minimum-service-interval 0.0
$tspec set-maximum-service-interval 0.0
# ms
$tspec set-delay-bound 0.125
# bytes
$tspec set-nominal-msdu-size 80
# bytes per second
$tspec set-mean-data-rate 8000
$tspec set-peak-data-rate 8000

But when running the simulation, only the first flows are accepted (1
or 2 flows). The subsequent flows are refused due to CAP proportion
being too big.
I understand that during the CP, the QAP is able to provide TXOP to
stations (CAPs), and that the overall number of CAPs shouln't not be
over a certain value (0.4 i think). But why such a limited set of
flows result in this error? When there aren't enough CAPs to offer,
the flows should try to transmit them using regular EDCA contention
rules I'm not getting this behavior :(

Thank you.
-- 
Best Regards,
Pedro Fortuna
INESC Porto



[ns] ns2 emulation - urgent help needed

2006-08-11 Thread Vincent Ngo


Hi everyone,

I am a undergraduate research student at the University of Waterloo, Ontario 
and am a complete beginner to NS2 (and even Linux).  I'm working for a 
research group and my task is to demonstrate a very basic emulation example
by 
next week just to show that it is possible to use ns2 to emulate.  I've been 
trying to get any simple emulation script to work for the past few weeks but 
have failed.  I'm sure it would take an expert just a few minutes to 
write a couple lines of code to do this.  Most explainations I have read to 
similar problems are even too advanced for my understanding either in terms
of 
NS2 or Linux.  If someone could please help me on a student level that would
be  
greatly appreciated.   

I am using a Linux machine and so far I have downloaded and installed the 
allinone ns-2.29.  I have also googled for some simple example emulation 
scripts.

For example, I found this one:

# Create simulator
set ns [new Simulator]
$ns use-scheduler RealTime 

# Emulator address
set me [exec hostname]

# Packet input
set bpf0 [new Network/Pcap/Live]
$bpf0 set promisc_ true
set nd0 [$bpf0 open readonly fxp0] 
set filt (not ip host $me)
$bpf0 filter $filt 

# Packet output
set ipnet [new Network/IP]
$ipnet open writeonly

# Input agent
set pfa [new Agent/Tap]
$pfa network $bpf0 

# Output agent
set ipa [new Agent/Tap]
$ipa network $ipnet 

# ICMP ECHO agent
set echoagent [new Agent/PingResponder]

set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
$ns simplex-link $n0 $n2 100Mb 1000ms DropTail
$ns simplex-link $n2 $n1 100Mb 1000ms DropTail 
$ns attach-agent $n0 $pfa
$ns attach-agent $n1 $ipa
$ns attach-agent $n2 $echoagent
$ns simplex-connect $pfa $echoagent
$ns simplex-connect $ipa $echoagent

# Wait for ping to come in...
$ns run



When I try running this script I get a message that says:

invalid command name Network/Pcap/Live
  while executing
Network/Pcap/Live create o_11 
  invoked from within 
catch $className create $o $args msg
  (procedure new line 3)
  invoked within
new Network/Pcap/Live
  invoked from within 
set bpf0 [new Network/Pcap/Live]
  (file ./vince/emu1.tcl line 12)


Can anyone help me with this problem please?  Since I am not yet an ns2 
expert, I don't know all too well how that code works.  I believe it is a
ping 
responder.  All I need is a very simple emulation example to show that it 
works so any other suggestions or example scripts would be great!  

Thanks,

Vincent Ngo
-- 
View this message in context: 
http://www.nabble.com/ns2-emulation---urgent-help-needed-tf2092368.html#a5767814
Sent from the ns-users forum at Nabble.com.



[ns] s-mac in ns 2.28

2006-08-11 Thread Lambrakis Emmanouil

hello ns users
 
i would like to ask
 
1) Could somebody tell me if s-mac protocoll is already installed in ns 2.28 
?
2) Is phenom object availlable in ns 2.29 
 
 
Thanks a lot
 
Best regards
 
 


[ns] nsaddr_t data type

2006-08-11 Thread Albalas F \(AT\)

Hi,

I know it may be a simple question, but I could not manage.

 

How can I display using printf the value of (ih-daddr) the ip
address of the destination, I can see the type of this field is
nsaddr_t.

 

 

  Thank in advance

 



Re: [ns] nsaddr_t data type

2006-08-11 Thread Pedro Fortuna

Remember that grep is your friend!

nsaddr_t is defined in /config.h :
typedef int32_t nsaddr_t;

int *ptr=ih-daddr();
so something like printf(%d,*ptr); should do the trick.


On 8/12/06, Albalas F (AT) [EMAIL PROTECTED] wrote:

 Hi,

 I know it may be a simple question, but I could not manage.



 How can I display using printf the value of (ih-daddr) the ip
 address of the destination, I can see the type of this field is
 nsaddr_t.





   Thank in advance






-- 
Cumprimentos,
Pedro Fortuna



Re: [ns] doubt in Mac/802_11 parameters

2006-08-11 Thread plucs

Have you done a google search? There is extensive material letting you 
know how to modify these parameters. It is not straightforward however 
to change the data rate.

Sandeep wrote:
 Hi all,
 In Mac/802_11 what do dataRate_ basicRate_ and  PLCPDataRate_ mean? 
 what's the difference btw them. What's the difference btw 
 PreambleLength_ and PLCPHeaderLength_
 I set them in my code as below
 Mac/802_11 set dataRate_ 11Mb
 Mac/802_11 set PreambleLength_ 144
 Mac/802_11 set PLCPHeaderLength_  48  ;# 48 bits
 Mac/802_11 set PLCPDataRate_  6.0e6   ;# 6Mbps

 but only 1mbps throughput is coming
 Please some one help.
 Thanks in advance.
 bye