[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!

Cheers!

Pandita


[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/cmu-trace.cc:55:
./bcast/bcast_queue.h:49: error: expected ‘)’ before ‘*’ token
trace/cmu-trace.cc:1631: error: expected ‘}’ at end of input
trace/cmu-trace.cc:1631: 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,
Bodoor
  

[ns] NS-2 WIMAX HANDOVER PROJECYT

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 

regrades 


[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 --


[ns] Wiamx Simulation Script Problem

2011-05-13 Thread sajeeb saha

Hello everyone,

I need some help regarding wimax simulation.

I
 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 
advance..

My code is below:


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


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

#check
 input parameters
if {$argc != 0} {
    puts ""
    puts "Wrong
 Number of Arguments! No arguments in this topology"
    puts ""
   
 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"
#set 
traffic_start 100
#set traffic_stop  200
set simulation_stop 210

#define
 debug values
Mac/802_16 set debug_ 1
Mac/802_16 set rtg_ 20
Mac/802_16
 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

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

# 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
set 
opt(mac)    Mac/802_16/BS  ;# MAC type
set 
opt(ifq)    Queue/DropTail/PriQueue    ;# interface queue type
set
 opt(ll)
 LL ;# link layer type
set 
opt(ant)    Antenna/OmniAntenna    ;# antenna model
set 
opt(ifqlen) 50         ;# max packet in ifq
set 
opt(adhocRouting)   DSDV   ;# routing protocol

set
 opt(x)        1100               ;# X dimension of the topography
set
 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
proc
 finish {} {
    global ns tf ntf output_dir nb_mn
    $ns
 flush-trace
    close $tf
    close $ntf
    exec nam 
cubic_4_node_2_bs.nam &
        exit 0
}

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

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

#open file for trace
set
 tf [open $output_dir/cubic_4_node_2_bs.tr w]
$ns trace-all $tf
#puts
 "Output file configured"

#Open file for
 Nam Trace
set ntf [open $output_dir/cubic_4_node_2_bs.nam w]
$ns 
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 
addressing"
$ns node-config -addressType hierarchical
AddrParams 
set domain_num_ 2              ;# domain number
lappend 
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 
station)
AddrParams set nodes_num_ $eilastlevel
puts 
"Configuration of hierarchical addressing
 done"

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

#creates the Access Point (Base station)
$ns 
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 \