I'm using the NDSL WiMAX module (http://ndsl.csie.cgu.edu.tw/wimax_ns2.php) and 
I must admit that I don't have that much experience with ns-2.

Running a WiMAX simulation (both ns-2.31 and ns-2.29) and sending UGS traffic 
from a base station to a subscriber station, there don't seem to be any 
realistic bandwidth limits - which means that in my last simulation more than 8 
Gbit/s were transferred at a distance of 1000m (shadowing model).

Please see my tcl script below. I hope we get this working! And of course I'd 
like to exchange tips and so on when I have gained experience.

Best regards,

set val(chan)   Channel/WirelessChannel    ;# channel type
set val(netif)  Phy/WirelessPhy            ;# network interface type
set val(mac)    Mac/802_16                 ;# MAC type
set val(ifq)    Queue/DropTail/PriQueue    ;# interface queue type
set val(ll)     LL                         ;# link layer type
set val(ant)    Antenna/OmniAntenna        ;# antenna model
set val(ifqlen) 50                         ;# max packet in ifq
set val(nn)     2                          ;# number of mobilenodes
set val(rp)     DSDV                       ;# routing protocol
set val(x)      20000                      ;# X dimension of topography
set val(y)      20000                      ;# Y dimension of topography
set val(stop)   [lindex $argv 4]           ;# time of simulation end

set ugs_start [lindex $argv 5]      ;# Start UGS traffic
set ugs_stop  [lindex $argv 6]      ;#Stop UGS traffic

set dist        [lindex $argv 0]                       ;# distance
set val(prop)   [lindex $argv 2]                       ;# radio-propagation 
set power       [lindex $argv 1]      ;# Transmitted Power
set rxtresh     [lindex $argv 3]                       ;# RXThresh_

# Neue Simulator-Instanz, Tracefiles

set ns            [new Simulator]       
set tracefd       [open out.tr w]       
#set namtrace       [open out.nam w]

$ns use-newtrace

$ns trace-all $tracefd
#$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# Topographie, Erzeugen der Mobilstationen

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

create-god $val(nn)

# Kanal

set chan0 [new $val(chan)]


Phy/WirelessPhy set Pt_ $power
Phy/WirelessPhy set RXThresh_ $rxtresh

# node-config1

$ns node-config -adhocRouting $val(rp) \
                -llType $val(ll) \
                -macType $val(mac) \
                -ifqType $val(ifq) \
                -ifqLen $val(ifqlen) \
                -propType $val(prop) \
                -antType $val(ant) \
                -phyType $val(netif) \
                -channel $chan0 \
                -topoInstance $topo \
                -agentTrace ON \
                -routerTrace OFF \
                -macTrace OFF \
                -movementTrace OFF

# Setzen der Mobilstationen

set node_(0) [$ns node]
$node_(0) set X_ 200
$node_(0) set Y_ 0
$node_(0) set Z_ 0.0

set node_(1) [$ns node]
$node_(1) set X_ 200
$node_(1) set Y_ $dist
$node_(1) set Z_ 0.0

# Verkehr 0->1

set udp1 [new Agent/UDP]
$ns attach-agent $node_(0) $udp1
set null1 [new Agent/Null]
$ns attach-agent $node_(1) $null1
$ns connect $udp1 $null1

set cbr1 [new Application/Traffic/UGS]
$cbr1 set rate_ 3000000000
$cbr1 set size_ 200
$cbr1 attach-agent $udp1

$ns at $ugs_start "$cbr1 start"


proc stop {} {
    global ns tracefd namtrace
    $ns flush-trace
    close $tracefd
    #close $namtrace

$ns at $val(stop) "stop"
$ns at $val(stop) "$ns halt"

$ns run

Reply via email to