Re: [ns] ns2 project

2011-05-13 Thread chethan kumar

hello sir i am chethan i have taken the paper(An Efficient N-to-1 Multipath
Routing Protocol in Wireless Sensor Networks) attached with this mail to
implement could u please send me the source code of it.
i eagarly waiting for your response
i will be very thankful to you if you send me the code

with regards

[ns] Wiamx Simulation Script Problem

2011-05-13 Thread sajeeb saha

Hello everyone,

I need some help regarding wimax simulation.

 have written a wimax simulation script with 2 base stations. My 
flow is something like this :

WL(0) -- BS(0) --- BS(1) 
--- WL(3).

But my code is always skipping BS(1).  I am not 
getting the problem. Can you help me in this regard?

I am using NIST Wimax Patch and using NS 2.31.  

Thanks in 

My code is below:

# Test file for wimax
 Topology scenario:
#        |-|    |-|  
 ; 0.0.1 | MN1 |    | MN2 |   ; 0.0.2
|-|    |-|
#          (^)       (^)
        |        |
#              |---|
 Base Station 1|         ; 0.0.0
# |---|

#         |
#              |---|
# | Base 
Station 2|         ; 1.0.0
# |---|
    |        |
#              (V)       (V)
    |-|    |-|  
#    ; 1.0.1 | MN3 |    | MN4 
|    ; 1.0.2 
#        |-|    |-|

 input parameters
if {$argc != 0} {
    puts Wrong
 Number of Arguments! No arguments in this topology
 exit (1)

# set global variables
set nb_mn 4            
    ;# max number
 of mobile node
#set packet_size    1500            ;# packet size in
 bytes at CBR applications 
set output_dir .
set gap_size 1 
;#compute gap size between packets
puts gap size=$gap_size
traffic_start 100
#set traffic_stop  200
set simulation_stop 210

 debug values
Mac/802_16 set debug_ 1
Mac/802_16 set rtg_ 20
 set ttg_ 20
Mac/802_16 set frame_duration_ 0.004
Mac/802_16 set 
client_timeout_ 110 ;#to avoid BS disconnecting the SS since the traffic
 starts a 10s
Phy/WirelessPhy/OFDM set g_ 0.25

coverage area for base station: 20m coverage 
Phy/WirelessPhy set Pt_
#Phy/WirelessPhy set freq_ 2412e+6
#Phy/WirelessPhy set 
RXThresh_ 2.90781e-09
Phy/WirelessPhy set RXThresh_ 2.025e-12 ;#500m 
Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set 

# Parameter for
 wireless nodes
set opt(chan)   Channel/WirelessChannel    ;#
 channel type
set opt(prop)   Propagation/TwoRayGround   ;# 
radio-propagation model
set opt(netif)  
Phy/WirelessPhy/OFDM   ;# network interface type
opt(mac)    Mac/802_16/BS  ;# MAC type
opt(ifq)    Queue/DropTail/PriQueue    ;# interface queue type
 LL ;# link layer type
opt(ant)    Antenna/OmniAntenna    ;# antenna model
opt(ifqlen) 50         ;# max packet in ifq
opt(adhocRouting)   DSDV   ;# routing protocol

 opt(x)        1100               ;# X dimension of the topography
 opt(y)        1100   
            ;# Y dimension of the topography

Mac/802_11 set 
basicRate_ 11Mb
Mac/802_11 set dataRate_ 11Mb
Mac/802_11 set 
bandwidth_ 11Mb

#defines function for flushing and closing files
 finish {} {
    global ns tf ntf output_dir nb_mn
    close $tf
    close $ntf
    exec nam 
        exit 0

#create the 
set ns [new Simulator]
$ns use-newtrace

the topography
set topo [new Topography]
$topo load_flatgrid 
$opt(x) $opt(y)
#puts Topology created

#open file for trace
 tf [open $output_dir/ w]
$ns trace-all $tf
 Output file configured

#Open file for
 Nam Trace
set ntf [open $output_dir/cubic_4_node_2_bs.nam w]
namtrace-all-wireless $ntf $opt(x) $opt(y)

set winfile1 [open 
cubic_2_bs_WinFile_0_3 w]

# set up for hierarchical routing 
(needed for routing over a basestation)
#puts start hierarchical 
$ns node-config -addressType hierarchical
set domain_num_ 2              ;# domain number
cluster_num 1 1                ;# cluster number for each domain
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 3 
3          ;# number of nodes for each cluster (2 mobile nodes + 1 base 
AddrParams set nodes_num_ $eilastlevel
Configuration of hierarchical addressing

# Create God
create-god [expr ($nb_mn + 2)]            
    ;# nb_mn + 2 (2 base stations and mobile nodes)
#puts God node 

#creates the Access Point (Base station)
node-config -adhocRouting $opt(adhocRouting) \
-llType $opt(ll) \
 -macType Mac/802_16/BS \

 -ifqType $opt(ifq) \
 -ifqLen $opt(ifqlen) \

 -antType $opt(ant)
 -propType $opt(prop)    \
-phyType $opt(netif) \
 -channel [new $opt(chan)] \

 -topoInstance $topo \
 -wiredRouting ON \


[ns] Error in classifier when enforcing the destination of the packets

2011-05-13 Thread Mohamed Ibrahim Salman

Hi everyone,
I'm trying to redirect packets from source to (another destination) in routing 
layer, but this error appear, any one have any idea?

current number of current packet inside (rt_resolve) is  (1)--- 
Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---   _o80: no target 
for slot 0  _o80 type: Classifier/Portcontent dump:classifier _o80  0 
offset0 shift 2147483647 mask 1 slots slot 255: _o82 
(CMUTrace/Recv)-- Finished standard no-slot{} default handler --


2011-05-13 Thread Sandy Haff

Greetings all .
i want to do some sinaro regarding Mobile wimax handover and i don't have a lot 
of experiences in ns-2 and im really in a bad time .
so if there is anyone can help me with that i will be very thankful , 
and i can pay for it too , 
just please help me please 

how ever can help me with this project i can pay for it 

thank you very much 


[ns] error in bcast protocol

2011-05-13 Thread Bodoor Al-fares

hi every one,

I am trying to simulate the bcast protocol orginally it is for ns2.27 but i am 
trying to run it under ns2.34 but I got those error I hope you can help me in 
this issue.

this is the error:
In file included from ./bcast/bcast.h:63,
 from ./bcast/bcast_packet.h:63,
 from trace/
./bcast/bcast_queue.h:49: error: expected ‘)’ before ‘*’ token
trace/ error: expected ‘}’ at end of input
trace/ error: expected unqualified-id at end of input
make: *** [trace/cmu-trace.o] Error 1

this is the ln 49 of bcast_gueue.h:
  BCASTHandler(BCAST *a) : agent(a) {LIST_INIT(pbcasts); no_bcasts=0;}

Thanx in advance,

[ns] Scenario generation in NS-2

2011-05-13 Thread Zilu LIANG

Hello guys,

Does any one knows how to generate scenarios in which the initial positions
of the nodes are the same, only the moving speed is different? Any comment
is welcomed!

Thanks in advance!