II. Kịch bản mô phỏng hệ thống wimax
4. Tính lượng băng thơng được sử dụng trên BS
Các thông tin mô phỏng được ghi lại trong file ~.tr bao gồm kiểu sự kiện (send, receive, drop, forward), thời điểm xảy ra sự kiện, nút thực hiện sự kiện, thơng tin gói và kích thước gói, kiểu trace được sử dụng…
Tổng số gói (packet) trong q trình mơ phỏng mà node 0 (BS) đã xử lý: 9259.
Trong đó
• Tổng số gói nhận (r): 2713. • Tổng số gói gửi (s): 6306. • Tổng số gói drop (d): 240.
Tổng dung lượng trong q trình mơ phỏng mà node 0 (BS) đã xử lý: 794347 byte.
Trong đó:
• Dung lượng nhận (r): 274148 byte. • Dung lượng gửi (s): 375404 byte. • Dung lượng drop (d): 144795 byte.
Băng thơng trung bình node 0 (BS) sử dụng trong thời gian mơ phỏng: 794347*8/10/(1000)2 = 0.606 Mbps
NHẬN XÉT
• Băng thơng trung bình node 0 (BS) sử dụng trong suốt q trình mơ phỏng nằm trong giới hạn đề ra (10Mbps).
• Tỷ lệ gói drop (d) chấp nhận được (dưới 5%). • Hệ thống hoạt động tốt.
TÀI LIỆU THAM KHẢO
[1] Seamus O’Leary, Understanding Digital Terrestrial Broadcasting. [2] Gerard O’Driscoll, Next Generation IPTV Services and Technologies,
NXB WILEY.
[3] Alcatel-Lucent Wimax, 9160 Wimax Access Control.
[4] Alcatel-Lucent Wimax, 9116 Compact Wimax Base Station.
[5] Mobile Wimax – Part 1: A Technical Overview and Performance Evaluation, August, 2006.
[6] Jeffrey G. Andrews, Ph.D., Arunabha Ghosh, Ph.D., Rias Muhamed “Fundamentals of WiMAX - Understanding Broadband Wireless Networking” [7] Kitti Wongthavarawat. “IEEE 802.16 WiMAX Security”. July 1, 2005. [8] Michel Barbeau. “WiMAX 802.16 Threat Analysis”. 2006.
[9] NIST, The Network Simulator NS-2 NIST add on IEEE 802.16 model (MAC + PHY), January, 2009. [10] http://www.tapchibcvt.gov.vn/ [11] http://vntelecom.org/ [12] www.wimaxforum.org [13] http://www.cgu.edu.tw [14] http://www.isi.edu/ [15] http://hpds.ee.ncku.edu.tw
PHỤ LỤC
Mã nguồn:
#=================================== # KHAI BAO GIA TRI BAN DAU #===================================
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model set val(netif) Phy/WirelessPhy ;# network interface type
set val(mac) Mac/802_16 ;# MAC 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) 3 ;# number of mobilenodes set val(rp) DSDV ;# routing protocol set val(x) 400 ;# X dimension of topography
set val(y) 400 ;# Y dimension of topography
set val(stop) 10.0 ;# time of simulation end
#=================================== #
#===================================
#GHI RA file trace
set ns [new Simulator]
set tracefd [open UGS-RTPS.tr w] set namtrace [open UGS-RTPS.nam w]
$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)
set topo [new Topography] $topo load_flatgrid $val(x) $val(y)
create-god $val(nn)
#ơỉƠịchannel
set chan0 [new $val(chan)]
#=================================== # CAU HINH MobileNode #===================================
#MobileNode
$ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channel $chan0 \ -topoInstance $topo \ -agentTrace OFF \ -routerTrace OFF \
-macTrace ON \ -movementTrace OFF
#===================================
# CAU HINH CAC TRAM (Node) #===================================
#TRAM BS: Node 0 set node_(0) [$ns node] $node_(0) set X_ 200 $node_(0) set Y_ 200 $node_(0) set Z_ 0.0
$ns initial_node_pos $node_(0) 20
#TRAM SS_1: Node 1 set node_(1) [$ns node] $node_(1) set X_ 100 $node_(1) set Y_ 200 $node_(1) set Z_ 0.0
$ns initial_node_pos $node_(1) 20
#TRAM SS_1: Node 1 set node_(2) [$ns node]
$node_(2) set X_ 300 $node_(2) set Y_ 200 $node_(2) set Z_ 0.0
$ns initial_node_pos $node_(2) 20
#===================================
# MO PHONG HOAT DONG #===================================
#(CBR-UDP)
set udp0 [new Agent/UDP] $ns attach-agent $node_(1) $udp0 set null0 [new Agent/Null]
$ns attach-agent $node_(0) $null0 $ns connect $udp0 $null0
set cbr0 [new Application/Traffic/UGS] $cbr0 attach-agent $udp0
$ns at 0.0 "$cbr0 start" $ns at 10.0 "$cbr0 stop"
#(CBR-UDP)
$ns attach-agent $node_(2) $udp2 set null2 [new Agent/Null]
$ns attach-agent $node_(0) $null2 $ns connect $udp2 $null2
set cbr2 [new Application/Traffic/rtPS] $cbr2 attach-agent $udp2
$ns at 0.0 "$cbr2 start" $ns at 10.0 "$cbr2 stop"
#(CBR-UDP)
set udp8 [new Agent/UDP] $ns attach-agent $node_(0) $udp8 set null8 [new Agent/Null]
$ns attach-agent $node_(1) $null8 $ns connect $udp8 $null8
set cbr8 [new Application/Traffic/rtPS] $cbr8 attach-agent $udp8
$ns at 0.0 "$cbr8 start" $ns at 10.0 "$cbr8 stop"
#(CBR-UDP)
set udp10 [new Agent/UDP] $ns attach-agent $node_(0) $udp10
set null10 [new Agent/Null]
$ns attach-agent $node_(2) $null10 $ns connect $udp10 $null10
set cbr10 [new Application/Traffic/ertPS] $cbr10 attach-agent $udp10 $ns at 0.0 "$cbr10 start" $ns at 10.0 "$cbr10 stop" #=================================== # #=================================== #recv function
Agent/Ping instproc recv {from rtt} { $self instvar node_
puts "node [$node_ id] received ping answer from $from with round-trip-time $rtt ms."
}
#MobileNode
for {set i 0} {$i < $val(nn) } { incr i } { $ns at $val(stop) "$node_($i) reset"; }
#nam
$ns at $val(stop) "$ns nam-end-wireless $val(stop)" $ns at $val(stop) "stop"
$ns at 10.0 "puts \"end simulation\" ; $ns halt"
#stop function proc stop {} {
global ns tracefd namtrace $ns flush-trace
close $tracefd close $namtrace
exec nam UGS-RTPS.nam & exit 0
}