hi all,
I am using ns-2.28 with EDCA extension. i have the follow problem:
when i start the simulation using DSDV as routing protocol
warning: Route to base_stn not known: dropping pkt
and i have very small thoughput.
if i use DumbAgent as routing protocol
the throughput is 0, and all Paktes are dropping.
1. Why?
2. what is the advantage of DumbAgent, is it only for wireless scenario?
3.did any one see other error in the scenario?
the script i use:
-------------------------------------------------------
#Global flags
set cbr_Interval 0.0005 ;# packet generation interval
set cbr_PacketSize 1234 ;# packet size for cbr
set num_mobile_nodes 1 ;# number of mobile nodes
# Options
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_11e ;# MAC type
set opt(ifq) Queue/DTail/PriQ ;# 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) $num_mobile_nodes ;# number of mobilenodes
set opt(adhocRouting) DSDV ;# routing protocol
#set opt(adhocRouting) DumbAgent ;# routing protocol
set opt(RTSThreshold) 0
set opt(cp) "" ;# connection pattern file
set opt(sc) "" ;# node movement file.
set opt(x) 500 ;# x coordinate of topology
set opt(y) 500 ;# y coordinate of topology
set opt(stop) 3 ;# time to stop simulation
set num_wired_nodes 1
set num_bs_nodes 1
# Seed the random generator
ns-random 54.33
# Some outputs
puts ""
puts "Simulation parameters:"
puts "topology: $num_mobile_nodes mobile nodes send cbr traffic to wirednode
via AP"
puts "cbr_Interval = $cbr_Interval"
puts "cbr_PacketSize = $cbr_PacketSize "
puts ""
# create simulator instance
set ns_ [new Simulator]
# set up for hierarchical routing
$ns_ node-config -addressType hierarchical
AddrParams set domain_num_ 2 ;# number of domains
lappend cluster_num 1 1 ;# number of clusters in each domain
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 1 2 ;# number of nodes in each cluster
# trace file format
#$ns_ use-newtrace
# More trace stuff
set tracefd [open max_ext.tr w]
set namtrace [open max_ext.nam w]
$ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y)
$ns_ trace-all $tracefd
# Create topography object
set topo [new Topography]
# define topology
$topo load_flatgrid $opt(x) $opt(y)
create-god [expr $opt(nn) + $num_bs_nodes]
#set this variables to
#make my simulation more pratical
Mac/802_11e set basicRate_ 6Mb ;# set this to 0 if want to use bandwidth_ for
Mac/802_11e set dataRate_ 24Mb ;# both control and data pkts
Mac/802_11e set cfb_ 0 ;# disables CFB
#setting for 802.11a
Mac/802_11e set SlotTime_ 0.000009 ;# 9us
Mac/802_11e set SIFS_ 0.000016 ;# 16us
Mac/802_11e set PreambleLength_ 96 ;# 96 bit
Mac/802_11e set PLCPHeaderLength_ 40 ;# 40 bits
Mac/802_11e set PLCPDataRate_ 6.0e6 ;# 1Mbps
Mac/802_11e set RTSThreshold_ 3000 ;# [bytes] disables RTC/CTS
Mac/802_11e set ShortRetryLimit_ 7 ;# retransmittions
Mac/802_11e set LongRetryLimit_ 4 ;# retransmissions
#create wired nodes
set W(0) [$ns_ node 0.0.0]
set chan_1_ [new $opt(chan)]
set chan_2_ [new $opt(chan)]
# configure for base-station node
# only trace end2end -> agentTrace OFF
$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) \
-channel $chan_1_ \
-topoInstance $topo \
-wiredRouting ON \
-agentTrace ON \
-routerTrace OFF \
-macTrace ON
# Addresses for the wireless domain...
set waddr {1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19
1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.29
1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 1.0.39
1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 1.0.47 1.0.48 1.0.49
1.0.50 1.0.51 0.0.52}
# Create the base station
set BS(0) [$ns_ node [lindex $waddr 0]]
$BS(0) label "BS"
$BS(0) random-motion 0 ;# disable movements
# Coordinates for the base station
$BS(0) set X_ 250.0
$BS(0) set Y_ 250.0
$BS(0) set Z_ 0.0
#create links between wired and BS nodes
$ns_ duplex-link $W(0) $BS(0) 5Mb 2ms DropTail
$ns_ duplex-link-op $W(0) $BS(0) orient left-down
#
#$ns_ node-config -adhocRouting DumbAgent
# Create wireless nodes
$ns_ node-config -wiredRouting OFF
for {set j 0} {$j < $num_mobile_nodes} {incr j} {
set node_($j) [ $ns_ node [lindex $waddr \
[expr $j+1]] ]
$node_($j) base-station [AddrParams addr2id \
[$BS(0) node-addr]]
}
# Create mobile nodes with udp/cbr traffic to BS
for {set i 0} {$i < $num_mobile_nodes} {incr i} {
set udp_($i) [new Agent/UDP]
$udp_($i) set class_ 0
$udp_($i) set prio_ 0
$udp_($i) set packetSize_ $cbr_PacketSize
set udp_sink_($i) [new Agent/Null]
$ns_ attach-agent $node_($i) $udp_($i)
set cbr_($i) [new Application/Traffic/CBR]
$cbr_($i) set packetSize_ $cbr_PacketSize
$cbr_($i) set interval_ $cbr_Interval
$cbr_($i) attach-agent $udp_($i)
$ns_ attach-agent $W(0) $udp_sink_($i)
$ns_ connect $udp_($i) $udp_sink_($i)
$ns_ at [expr 0+0.0210003*$i] "$cbr_($i) start"
$ns_ at $opt(stop) "$cbr_($i) stop"
}
# Initial node positions
for {set i 0} {$i < $num_mobile_nodes} {incr i} {
$node_($i) set X_ [expr 100];# - 4*$i]
$node_($i) set Y_ [expr 100];# + 4*$i]
$ns_ initial_node_pos $node_($i) [expr 20 + 0.12*$i]
}
# Tell all nodes when the simulation ends
for {set i 0} {$i < $opt(nn) } {incr i} {
$ns_ at $opt(stop).0 "$node_($i) reset";
}
$ns_ at $opt(stop).0 "$BS(0) reset";
$ns_ at $opt(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt"
$ns_ at $opt(stop).0001 "stop"
proc stop {} {
global ns_ tracefd namtrace num_cbr
$ns_ flush-trace
close $tracefd
#close $namtrace
# dump_.tr.ip pcftest$num_cbr ;# only needed for wired-cum-wireless
}
puts "Starting Simulation..."
$ns_ run
-------------------------------------------------------
thanks in advance
---------------------------------
Yahoo! Messenger - kostenlos* mit Familie und Freunden von PC zu PC
telefonieren.