[ns] Wireless mesh Simulation

2009-07-01 Thread sajeeb saha

Hello Everyone,

I am doing a simulation on wireless mesh
network. I have created a scenario. But  i have few problems. Hope you
will help me.My problems are...

1. In case of wireless to wireless transmission my code is not using
any base stations. So I want to change the transmission range of the
mobile nodes (so that they use the base station for wireless to
wireless transmission.)

2. why my nodes are overlapped. Though i have set the node position??

3. Is the Base station creation have any problem??

4.Finally what is the function of 

Phy/WirelessPhy set CSThresh_ 
Phy/WirelessPhy set RXThresh_
Phy/WirelessPhy set Pt_
 
Phy/WirelessPhy set Pt_ 

these variables?? From where I can change the value of these  variables?

Please answer my questions. I have 10 days left for submitting my project.

My code is given below...


# wireless simulation related parameters   #

set opt(chan)   Channel/WirelessChannel    ;# channel type
set opt(prop)   Propagation/TwoRayGround   ;# radio-propagation model
set opt(netif) 
 Phy/WirelessPhy    ;# network interface type
set opt(mac)    Mac/802_11 ;# 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(nn) 9  ;# number of mobilenodes
set opt(adhocRouting)   DSDV   ;# routing protocol
set opt(x)         670    ;# x coordinate of topology
set opt(y)     
 670    ;# y coordinate of topology

set opt(cp) "" ;# connection pattern file
set opt(sc)     ""                   ;# node movement file. 

set opt(seed)   0.0    ;# seed for random number gen.
set opt(stop)  
 5    ;# time to stop simulation

set opt(ftp1-start)  1.7
set opt(ftp2-start)  3.0
set opt(ftp3-start)  2.0
set opt(ftp4-start)  2.5

set num_wired_nodes  3
set num_bs_nodes 3


# Initialization   #
# 1. create
 simulator  #
# 2. tracing   #
# 3. define topography #

set ns_        [new
 Simulator]

set tracefd [open mesh.tr w]
$ns_ trace-all   $tracefd
set namtracefd    [open mesh.nam w]
$ns_ namtrace-all-wireless $namtracefd $opt(x) $opt(y)

set topo   [new Topography]
$topo load_flatgrid $opt(x) $opt(y)

create-god [expr $opt(nn) + $num_bs_nodes]

# check for boundary parameters and random seed
if { $opt(x) == 0 || $opt(y) == 0 } {
    puts "No X-Y boundary values given for wireless topology\n"
}
if {$opt(seed) > 0} {
    puts "Seeding Random number generator with $opt(seed)\n"
    ns-random $opt(seed)
}


# Define/create/initialize
 nodes   #
# 1. define nodes  #
# 2. create nodes  #
# 3. disable random
 motion #
# 4. coordinates of wilress nodes  #
# 5. nam setting, size and position    #


# set up for hierarchical routing
$ns_ node-config -addressType hierarchical
AddrParams set domain_num_ 4   ;# number of domains
lappend cluster_num 3 1 1
 1    ;# number of clusters in each domain
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 1 1 1 4 4 4    ;# number of nodes in each cluster 
AddrParams set nodes_num_ $eilastlevel ;# of each domain


#create wired nodes
set temp {0.0.0 0.1.0 0.2.0}    ;# hierarchical addresses for wired domain
for {set i 0} {$i < $num_wired_nodes} {incr i} {
    set W($i) [$ns_ node [lindex $temp $i]] 
}

$W(0) set X_ 95.0
$W(0) set Y_ 146.0
$W(0) set Z_ 0.0

$W(1) set X_ 36.0
$W(1) set Y_ 113.0
$W(1) set Z_ 0.0

$W(2) set X_ 24.0
$W(2) set Y_ 62.0
$W(2) set Z_ 0.0

# configure for base-station node
$ns_ node-config -adhocRouting $opt(adhocRouting)
 \
 -llType $opt(ll) \
 -macType $opt(mac) \
 -ifqType $opt(ifq) \
 -ifqLen $opt(ifqlen) \
 -antType $opt(ant) \
 -propType $opt(prop) \
 -phyType $opt(netif) \
 -channelType
 $opt(chan) \

[ns] Wireless mesh Simulation

2009-07-01 Thread sajeeb saha

Hello Everyone,

I am doing a simulation on wireless mesh
network. I have created a scenario. But  i have few problems. Hope you
will help me.My problems are...

1. In case of wireless to wireless transmission my code is not using
any base stations. So I want to change the transmission range of the
mobile nodes (so that they use the base station for wireless to
wireless transmission.)

2. why my nodes are overlapped. Though i have set the node position??

3. Is the Base station creation have any problem??

4.Finally what is the function of 

Phy/WirelessPhy set CSThresh_ 
Phy/WirelessPhy set RXThresh_
Phy/WirelessPhy set Pt_
 
Phy/WirelessPhy set Pt_ 

these variables?? From where I can change the value of these  variables?

Please answer my questions. I have 10 days left for submitting my project.

My code is given below...


# wireless simulation related parameters   #

set opt(chan)   Channel/WirelessChannel    ;# channel type
set opt(prop)   Propagation/TwoRayGround   ;# radio-propagation model
set opt(netif) 
 Phy/WirelessPhy    ;# network interface type
set opt(mac)    Mac/802_11 ;# 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(nn) 9  ;# number of mobilenodes
set opt(adhocRouting)   DSDV   ;# routing protocol
set opt(x)         670    ;# x coordinate of topology
set opt(y)     
 670    ;# y coordinate of topology

set opt(cp) "" ;# connection pattern file
set opt(sc)     ""                   ;# node movement file. 

set opt(seed)   0.0    ;# seed for random number gen.
set opt(stop)  
 5    ;# time to stop simulation

set opt(ftp1-start)  1.7
set opt(ftp2-start)  3.0
set opt(ftp3-start)  2.0
set opt(ftp4-start)  2.5

set num_wired_nodes  3
set num_bs_nodes 3


# Initialization   #
# 1. create
 simulator  #
# 2. tracing   #
# 3. define topography #

set ns_        [new
 Simulator]

set tracefd [open mesh.tr w]
$ns_ trace-all   $tracefd
set namtracefd    [open mesh.nam w]
$ns_ namtrace-all-wireless $namtracefd $opt(x) $opt(y)

set topo   [new Topography]
$topo load_flatgrid $opt(x) $opt(y)

create-god [expr $opt(nn) + $num_bs_nodes]

# check for boundary parameters and random seed
if { $opt(x) == 0 || $opt(y) == 0 } {
    puts "No X-Y boundary values given for wireless topology\n"
}
if {$opt(seed) > 0} {
    puts "Seeding Random number generator with $opt(seed)\n"
    ns-random $opt(seed)
}


# Define/create/initialize
 nodes   #
# 1. define nodes  #
# 2. create nodes  #
# 3. disable random
 motion #
# 4. coordinates of wilress nodes  #
# 5. nam setting, size and position    #


# set up for hierarchical routing
$ns_ node-config -addressType hierarchical
AddrParams set domain_num_ 4   ;# number of domains
lappend cluster_num 3 1 1
 1    ;# number of clusters in each domain
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 1 1 1 4 4 4    ;# number of nodes in each cluster 
AddrParams set nodes_num_ $eilastlevel ;# of each domain


#create wired nodes
set temp {0.0.0 0.1.0 0.2.0}    ;# hierarchical addresses for wired domain
for {set i 0} {$i < $num_wired_nodes} {incr i} {
    set W($i) [$ns_ node [lindex $temp $i]] 
}

$W(0) set X_ 95.0
$W(0) set Y_ 146.0
$W(0) set Z_ 0.0

$W(1) set X_ 36.0
$W(1) set Y_ 113.0
$W(1) set Z_ 0.0

$W(2) set X_ 24.0
$W(2) set Y_ 62.0
$W(2) set Z_ 0.0

# configure for base-station node
$ns_ node-config -adhocRouting $opt(adhocRouting)
 \
 -llType $opt(ll) \
 -macType $opt(mac) \
 -ifqType $opt(ifq) \
 -ifqLen $opt(ifqlen) \
 -antType $opt(ant) \
 -propType $opt(prop) \
 -phyType $opt(netif) \
 -channelType
 $opt(chan) \

[ns] wireless mesh simulation in NS 2

2009-02-15 Thread sajeeb saha

Hi,



I am a student of University of Dhaka,Bangladesh, majoring in CSE.

I
am currently in my final year of graduation. My final year project is
the performance analysis of various routing algorithms on wireless mesh
network and calculating the bandwidth,delay,throughput etc.


I am using NS 2 Simulator for this purpose.



For this
I need some sample programs on wireless mesh network. I searched the
internet  but  didn't find any sample Tcl
script.

So it will be very helpful for me if anyone kindly
provide me some Tcl Scripts on wireless  mesh network simulation so
that I could run and test them.



Thanks in advance..

, Sajeeb Saha
10th Batch,CSEDU
+8801914754181
     


  New Email addresses available on Yahoo!
Get the Email name you've always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/