Re: [ns] error while running tcl file

2006-01-22 Thread Filippos Kolovos

You are not running the simulation from somewhere
where your environment variables for ns are not properly initialized
according to the NS-2. Init.tcl is one of the primary files executed during
the start of a simulation. Verify that you are executing the file from the
appropriate shell environment.

This can also happen if you are trying to run ns through ddd from KDE, but
you start ddd from KDE while you have installed ns in your home dir (in this
case the X environment does not automatically initializes your Shell
variables).

Or, finally, you might have incorrectly installed ns. Was the installation
carried out
smoothly? No errors reported? However, I suppose that you had no errors
regarding this
part, but I mention it anyway.

-Fk

On 1/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Send Ns-users mailing list submissions to
> ns-users@isi.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://mailman.isi.edu/mailman/listinfo/ns-users
> or, via email, send a message with subject or body 'help' to
> [EMAIL PROTECTED]
>
> You can reach the person managing the list at
> [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ns-users digest..."
>
>
> Today's Topics:
>
>1. kindly help me  with these simulations (Ashutosh Srivastava)
>2. NS 2.29 in X86_64 (Suse 10.0) ([EMAIL PROTECTED])
>3. Maintaining and Updating vector table (mahesh l)
>4. qospf extention for ns-2.29 (Fatemeh Karimirad)
>5. error while running tcl file (anusherin)
>6. Re: how to reduce the signal range for a mobile node
>   (Hajer FERJANI)
>
>
>
> -- Forwarded message --
> From: Ashutosh Srivastava <[EMAIL PROTECTED]>
> To: ns-users@ISI.EDU
> Date: Fri, 20 Jan 2006 20:40:35 + (GMT)
> Subject: [ns] kindly help me with these simulations
>
> dear all ,
>
>   Please go through this scenario that I am supposed to simulate (it is an
> excerpt from a paper) . I have already underlined the part I am unable to
> have under simulate .Please go through the whole mail and kindly send in
> your inputs .I have already mailed about this topic even earlier but could
> not get through ,due to lack of any sort of input .
>
>
>   
> 
>   The DSR implementation built in to NS-2 version 2.1b9 was used as a
> base, and some slight modifications were made to simulate the sinkhole
> attacker node. The simulation environment was composed of 20 wireless nodes,
> each with a transmission radius of 250m. At the start of each simulation,
> the nodes were given random placements in a 1000m x 1000m area, and a random
> movement pattern was generated, which the nodes adhered to, using CMU's
> setdest program, which is included with NS-2.
> The program generates node movement files using the random
>   waypoint algorithm, in which nodes choose a random point
>   within the area boundaries, and proceed towards it at a
>   randomly chosen constant velocity. When the node arrives at its
>   destination, it pauses for some interval, and then repeats the
>   process. Constant bit rate traffic patterns were also generated at
>   the start of each simulation, using the cbrgen.tcl program that is
>   included with NS-2.
>   A total of 23,710 simulations were run. Of these, 19,797 of
>   them were normal, cooperative DSR networks with no sinkhole
>   attacker, and 3,913 of them were with a single sinkhole attacker
>   identified as node 20. In the simulation, the sinkhole attacker
>   ran the same DSR code as the other nodes. However, in
>   addition to the normal behavior, a new behavior was triggered
>   by a timer that normally goes off every 0.03 seconds to check
>   the DSR send buffer – the normal purpose of this is to flush
>   packets that have been queued for asynchronous transmission.
>   In the case of the attacker, this timer would cause 18 bogus
>   route request messages to be sent, in rapid succession, with the purpose
> of redirecting all routes leading to a particular target node, starting with
> node 1. The target node would then be incremented. After the timer had fired
> 18 times, the attacker would have made an effort to redirect all routes in
> the network to itself, and the target node would be reset to 1.
>
>   For these
>   messages, the attacker node used sequence numbers starting at ,
> incrementing the sequence number each time a message was sent.
>
>
>
>
>
>
>
>
>I am supposed to simulate the Sinkhole attack (made on
> Ad-Hoc Networks) . As i am quite new to  ns-2 programming I am unable to do
> so .The main problem is that how do we create routing tables for the
> different nodes in the ad-hoc network (or Mobile Network)  and then
> how can we represent the sending of information from a compromised node that
> it has the shortest route for a number of nod

[ns] power aware routing protocol

2006-01-22 Thread jagadish kranti

 Hi all
 I am working on power aware routing protocol. Anybody did some coding 
in ns-2 for developing power aware routing protocol please help me for my 
coding ...like any useful links and stuff.  Any reference to already done work 
will be much useful for me.
 Thanks in advance 
   Samana Srikanth 
 


-
 
 What are the most popular cars?  Find out at Yahoo! Autos


[ns] implementing IPV6 address scheme

2006-01-22 Thread jagadish kranti

 Hi everybody,
 According to ns manual, the number of bits allocated for IP 
address is  32. The code for this was given as follows in ns-default.tcl file.
  AllocAddrBits set DEFADDRSIZE_ 32
  AllocAddrBits set MAXADDRSIZE_ 32 
  But for IPV6 addressing 128 bits are needed. How to implement IPV6 addressing?
  Can it be solved simply by changing MAXADDRSIZE to 128? Any body please help 
me in solving this problem. Waiting for your reply. 
  
  Thanks in advance,
  Jagadish


-
 
 What are the most popular cars?  Find out at Yahoo! Autos


[ns] Mpeg simulation

2006-01-22 Thread MOHAN REDDY

  
Hi all,
can any one tell how to send video packet , if some one could help me with 
little tcl script , i would be very thankful to them
bye

On Sun, 22 Jan 2006 Amita Singh wrote :
>
>Hi all !
>Where should I specify the number of source nodes required as I have to 
>simulate using different number of source nodes
>regards
>Amita


[ns] How to call function in .cc file from .tcl file

2006-01-22 Thread mahesh l

Hi,
 Is there any way to call function in .cc file from a .tcl file.
  I know that we can execute a command in tcl which will call command( ) method 
in .cc, but is there any way to call directly?

Send instant messages to your online friends http://in.messenger.yahoo.com 


[ns] 802.11g - doubt in ns-2.29

2006-01-22 Thread Tamára Rosini

Hi all!

*
  I'm doing a kind of project in ns-2.29 wired cum wireless with 802.11g.
Everything is working fine, but i couldn't make it work with a datarate of
54mb and a cbr of 54mb. Do you have any idea what is happening? May I change
something in C++ code to make it work? Or just configure some parameters in
tcl code?
I would be really glad if you help me.

there are some things that i tried, but didn't work out.*

Mac/802_11 *set* CWMin15
Mac/802_11 *set* CWMax1023
Mac/802_11 *set* SlotTime_0.09
Mac/802_11 *set* CCATime_ 0.03
Mac/802_11 *set* RxTxTurnaroundTime_  0.02
Mac/802_11 *set* SIFS_0.16
Mac/802_11 *set* PreambleLength_  96
Mac/802_11 *set* PLCPHeaderLength_40
Mac/802_11 *set* PLCPDataRate_6.0e6
*#define DSSS_MaxPropagationDelay0.005   // 0.5us*

*this is the topology of my network *
*# w(0)   w(1)  *
*#  \  | *
*#   \ |  *
*# \   |  *
*#  \  |  *
*#   \ |   *
*#\|  *
*#w(2)*
*# |*
*# |*
*# BS*
*#/|*
*#   / |   *
*#  /  | *
*# /   | *
*#/| *
*#  /  |  *
*# n(0)   n(1) *
*#*
*# w(i): Wired nodes*
*# BS: base station*
*# n(i): Wireless nodes

Thank's in advance
Tamara Rosini
*


[ns] Where should I specify the number of source nodes required

2006-01-22 Thread Amita Singh

Hi all !
Where should I specify the number of source nodes required as I have to 
simulate using different number of source nodes
regards
Amita  


[ns] Multicast simulation with Multi groups

2006-01-22 Thread mmulibra

Hi All,

I would like to simulate a simple multicast of 5 nodes, where there are 2
groups and 2 sources and 2 nodes leaving and joining different groups.
However I got this error :

ns: _o15 new-group 0 -2147483648 -1 cache-miss: can't read "protocols_(-1)":
no such variable
while executing
"$protocols_($iface) upcall $code $source $group $iface"
(procedure "_o16" line 9)
(mrtObject upcall line 9)
invoked from within
"$mrtObject_ upcall $code $src $group $iface"
(procedure "_o10" line 3)
(Node new-group line 3)
invoked from within
"$node_ new-group $src $group $iface $code"
(procedure "_o15" line 3)
(Classifier/Multicast new-group line 3)
invoked from within
"_o15 new-group 0 -2147483648 -1 cache-miss"

Hopefully someone can give me a hint
Thanks for your kind attention



Here is my tcl script:
-

set ns [new Simulator -multicast on]

# Dense Mode Multicast Protocol
set mproto DM
set mrthandle [$ns mrtproto $mproto {}]

# allocate a multicast address;
set group0 [Node allocaddr]
set group1 [Node allocaddr]

# Open nam tracefile
set nf [open prob1.nam w]

# Open tracefile
set nt [open trace.tr w]

$ns namtrace-all $nf
$ns trace-all $nt

$ns color 1 red
# the nam colors for the prune packets
$ns color 30 purple
# the nam colors for the graft packets
$ns color 31 green

#Define a 'finish' procedure
proc finish {} {
global ns nf nt
$ns flush-trace
close $nf
close $nt
puts "running nam..."
exec nam -a prob1.nam &
exit 0
}

# create 5 nodes
puts "create 5 nodes now."

set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]

puts "create connections now."

# Create connection
$ns duplex-link $n1 $n2 1Mb 5ms DropTail
$ns duplex-link $n2 $n3 1Mb 5ms DropTail
$ns duplex-link $n3 $n4 1Mb 5ms DropTail
$ns duplex-link $n2 $n4 1Mb 5ms DropTail
$ns duplex-link $n2 $n5 1Mb 5ms DropTail

# Node orientation
$ns duplex-link-op $n1 $n2 orient right
$ns duplex-link-op $n2 $n3 orient right
$ns duplex-link-op $n3 $n4 orient right
$ns duplex-link-op $n2 $n4 orient down
$ns duplex-link-op $n2 $n5 orient up

puts "Create agents and attach to appropriate nodes..."

# Create agents and attach to appropriate nodes
set udp0 [new Agent/UDP]
$ns attach-agent $n1 $udp0
$udp0 set dst_addr_ $group0
$udp0 set dst_port_ 0
set cbr0 [new Application/Traffic/CBR]
$cbr0 attach-agent $udp0

set udp1 [new Agent/UDP]
$ns attach-agent $n3 $udp1
$udp1 set dst_addr_ $group1
$udp1 set dst_port_ 1
set cbr1 [new Application/Traffic/CBR]
$cbr1 attach-agent $udp1

puts "schedule transmitting packets..."
# create receiver agents
set rcvr0 [new Agent/LossMonitor]
set rcvr1 [new Agent/LossMonitor]

$ns attach-agent $n4 $rcvr0
$ns attach-agent $n5 $rcvr1

# joining and leaving the group;
$ns at 0.10 "$n4 join-group $rcvr0 $group0"
$ns at 0.12 "$n5 join-group $rcvr1 $group0"
$ns at 0.50 "$n4 leave-group $rcvr0 $group0"
$ns at 0.60 "$n4 join-group $rcvr0 $group1"

$ns at 0.05 "$cbr0 start"
$ns at 0.05 "$cbr1 start"
$ns at 0.80 "finish"
$ns run