1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Nghiên cứu các thuật toán lập lịch tối ưu cho UGS trong WIMAX luận văn ths công nghệ thông tin 60 48 15

94 17 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

ĐẠI HỌC QUỐC GIA HÀ NỘI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ PHẠM VĂN THUẬN NGHIÊN CỨU CÁC THUẬT TOÁN LẬP LỊCH TỐI ƯU CHO UGS TRONG WIMAX LUẬN VĂN THẠC SỸ CÔNG NGHỆ THÔNG TIN Hà Nội – 2015 ĐẠI HỌC QUỐC GIA HÀ NỘI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ PHẠM VĂN THUẬN NGHIÊN CỨU CÁC THUẬT TOÁN LẬP LỊCH TỐI ƯU CHO UGS TRONG WIMAX Ngành: Công nghệ thông tin Chuyên ngành: Truyền liệu Mạng máy tính Mã số: LUẬN VĂN THẠC SỸ CƠNG NGHỆ THƠNG TIN NGƯỜI HƯỚNG DẪN KHOA HỌC: TS DƯƠNG LÊ MINH Hà Nội – 2015 LỜI CẢM ƠN Trước hết, xin bày tỏ lòng biết ơn sâu sắc đến cha mẹ gia đình ni dưỡng, giáo dục tạo điều kiện tốt thực đề tài Tơi xin bày tỏ lịng biết ơn sâu sắc gửi lời cảm ơn đặc biệt tới Thầy TS Dương Lê Minh, người định hướng đề tài, cung cấp cho kiến thức, tài liệu tận tình hướng dẫn bảo tơi suốt q trình thực đề tài luận văn cao học này, từ ý tưởng đề cương nghiên cứu, phương pháp nghiên cứu, phương pháp giải vấn đề lần kiểm tra cuối để hồn thành luận văn Tơi xin bày tỏ lịng biết ơn chân thành tới Thầy, Cơ giáo mơn Truyền liệu Mạng máy tính, Khoa Cơng nghệ thơng tin, người mang trí tuệ, công sức truyền đạt giúp mở rộng kiến thức Cơng nghệ thơng tin nói chung Mạng máy tính nói riêng, kiến thức q báu có ích với tơi giai đoạn tương lai Tôi xin gửi lời cảm ơn chân thành tới Ban Giám hiệu Nhà trường, Phịng Đào tạo sau đại học, Đại học Cơng nghệ - Đại học Quốc gia Hà Nội tạo điều kiện tốt giúp tơi suốt q trình học tập Cuối xin gửi lời cảm ơn đến người thân, bạn bè, đồng nghiệp người động viên khuyến khích tơi suốt q trình học tập thực đề tài luận văn Hà Nội, ngày … tháng … năm 2015 Học viên Phạm Văn Thuận LỜI CAM ĐOAN Tôi xin cam đoan nội dung trình bày luận văn tơi tự nghiên cứu tìm hiểu dựa tài liệu tơi trình bày theo ý hiểu thân hướng dẫn trực tiếp Thầy TS Dương Lê Minh Các nội dung nghiên cứu, tìm hiểu kết thực nghiệm hồn tồn trung thực Luận văn chưa cơng bố cơng trình Trong q trình thực luận văn tơi tham khảo đến tài liệu số tác giả, ghi rõ tên tài liệu, nguồn gốc tài liệu, tên tác giả liệt kê mục “DANH MỤC TÀI LIỆU THAM KHẢO” cuối luận văn Học viên Phạm Văn Thuận MỤC LỤC MỤC LỤC DANH MỤC TỪ VIẾT TẮT…………………………………………………… DANH MỤC HÌNH VẼ DANH MỤC BẢNG MỞ ĐẦU CHƯƠNG I GIỚI THIỆU CHUNG VỀ WIMAX VÀ ỨNG DỤNG 1.1Tổng quan 1.2Các phiên WiMAX 1.3Đặc điểm WiMAX cố định WiMAX di động 1.3.1 WiMAX cố định (Fixed WiMAX): 1.3.2 WiMAX di động (Mobile WiMAX) 1.4Các ứng dụng WiMAX 1.4.1 Ứng dụng WiMAX cho mạng truy nhập 1.4.2 Ứng dụng WiMAX cho mạng đường trục 1.4.3 Ứng dụng WiMAX kết hợp Wi-Fi 1.5 So sánh công nghệ WiMAX công nghệ khác 1.5.1 WiMAX WiFi 1.5.2 WiMAX 3G 1.5.3 WiMAX LTE CHƯƠNG II LỚP ĐIỀU KHIỂN TRUY NHẬP MAC TRONG WIMAX 2.1Tổng quan 2.2Lớp điều khiển truy cập môi trường MAC 2.3Lớp hội tụ CS 2.3.1 Chức nhiệm vụ 2.3.2 Kết nối, định danh kết nối CID luồng dịch vụ SF 2.3.3 Phân loại 2.4 Lớp phần chung MAC CPS 2.4.1 Địa MAC kết nối 2.4.2 Định dạng MAC PDU 2.4.2.1 MAC PDU chung 2.4.2.2 Tiêu đề MAC PDU khơng có payload (PDU yêu c 2.5Lớp bảo mật PS 2.6 Quản lý chất lượng dịch vụ QoS: 2.7Cấu trúc khung TDD chế độ PMP CHƯƠNG III CƠ CHẾ LẬP LỊCH HỖTRỢ QoS TRONG WiMAX 3.1Tổng quan 3.2Hỗ trợ QoS chuẩn 802.16 3.3 Cơ chế yêu cầu cấp phát băng thông 3.4 Các thông số hỗ trợ QoS 3.4.1 Băng thông 3.4.2 Độ trễ Lacency (Delay) 3.4.3 Jitter 3.4.4 Tỷ số tin Packet loss 3.4.5 Thông lượng 3.5 Phân lớp QoS 3.5.1 Dịch vụ cấp phát không yêu cầu (UGS) 3.5.2 Dịch vụ thăm dò thời gia 3.5.3 Dịch vụ thăm dò phi thờ 3.5.4 Dịch vụ thăm dò thời gia 3.5.5 Dịch vụ nỗ lực tối đa (BE 3.6 Kiến trúc QoS giao thức MAC 802.16 3.7 Các thuật toán phổ biến cho lập lịch lớp MAC ch 3.7.1 Thuật toán Round Robin 3.7.2 First-In-First-Out (FIFO 3.7.3 Priority queue (PQ) 3.7.4 Hàng đợi cân có trọ 3.7.5 Deficit Round Robin (DR 3.7.6 Hàng đợi xoay vòng theo CHƯƠNG IV MỘT SỐ KỸ THUẬT LẬP LỊCH ĐỀ XUẤT CHO WIMAX 56 4.1 Tổng quan: 4.2 Thuật toán lập lịch Round Robin 4.3 Cài đặt thử nghiệm mô 4.3.1 Cấu trúc trạm BS 4.3.2 Cấu trúc trạm MS 4.3.3 Bộ lập lịch UL/DL 4.4 Kịch mô 4.5 Kết luận 4.6 Thuật toán DRR 4.7 Kết luận đánh giá KẾT LUẬN DANH MỤC TÀI LIỆU THAM KHẢO DANH MỤC CÁC TỪ VIẾT TẮT STT Ký hiệu 3G AC AES Airlink ARQ ATM Backhaul BE BS 10 BWA 11 12 13 14 BWR CBR CID CP 15 CPE 16 17 18 19 20 21 CPS CS DC DL DRR DSL 22 EAP 23 ertPS 24 25 26 FCFS FCH FDD 27 FIFO 28 FSH 29 FTP 30 Grant 31 HTTP 32 ICI 33 IEEE 34 IP 35 ISDN 36 ISI 37 LAN 38 LOS 39 LTE 40 MAC 41 MIMO 42 MPDU 43 MPEG 44 MS 45 NLOS 46 nrtPS 47 OFDM 48 OFDMA 72 mà để mở cho nhà cung cấp thiết bị giải quyết, nhằm tạo cạnh tranh để có sản phẩm tốt cho thị trường Do lực thân hạn chế thời gian nghiên cứu có hạn, luận văn chắn khơng tránh khỏi thiếu sót Tơi mong nhận ý kiến đóng góp Thầy, Cơ bạn đồng nghiệp quan tâm cá nhân để nội dung luận văn hoàn thành đảm bảo chất lượng tốt 73 DANH MỤC TÀI LIỆU THAM KHO [1] Seok-Yee Tang, Peter Măuller, Hamid R Sharif, “WiMAX security and quality of service an end to end perspective”, A John Wiley and Sons, Ltd., Publication, 2010 [2] Ayman Khalil and Adlen Ksentini, “Classification of the Uplink Scheduling Algorithms in IEEE 802.16” [3] Vandana Singh Vinod Sharma, “Efficient and Fair Scheduling of Uplink and Downlink in IEEE 802.16 OFDMA Networks” Sanida Omerovic, “WiMax Overview”, Faculty of Electrical Engineering, University of Ljubljana, Slovenia [5] Prepared by Senza Fili Consulting on behalf of the WIMAX Forum, “Fixed, [4] nomadic, portable and mobile applications for 802.16-2004 and 802.16e WiMAX networks”, 2005 [6] G.S Paschos, I Papapanagiotou, C.G Argyropoulos and S.A Kotsopoulos, “A Heuristic Strategy for IEEE 802.16 WiMAX scheduler for Quality of Service” [7] Phạm Cơng Hùng, Nguyễn Hồng Hải, Tạ Vũ Hằng, Vũ Thị Minh Tú, Đỗ Trọng Tuấn, Vũ Đức Thọ, Nguyễn Văn Đức, “Giáo trình thơng tin di động”, Nhà Xuất Bản Khoa Học Kỹ Thuật, 2007 [8] Nongjun Li ,“Overview of WiMax Technical and Application Analysis”, TURKU UNIVERSITY OF APPLIED SCIENCES, 18/05/2011 [9] Senza Fili (2005), Fixed, nomadic, portable and mobile applications for 802.16- 2004 and 802.16e WiMAX networks, WIMAX Forum [10] WiMAX Forum (2006), WiMAX Forum Mobile Certification Profile v1.0 [11] Vadaliya Savan Rameshbhai, Appana Manikanta Sitaram, “ OVERVIEW OF WiMAX TECHNOLOGY Broad Band Access to the Last Mile”, Nov-Dec 2012 [12] Ramjee Prasad, Fernando J Velez, “WiMAX Networks Techno-Economic Vision and Challenges”, 2010 [13] Professor Thong Nguyen, “802.16 MAC Layer Scheduling and its Effect on TCP performance”, University of Technology Sydney (UTS) AUSTRALIA [14] Tarik ANOUARI, Abdelkrim HAQIQ, “Performance Analysis of VoIP Traffic in WiMAX using various Service Classes”, Computer, Networks, Mobility and Modeling laboratory Department of Mathematics and Computer FST, Hassan 1st University, Settat, Morocco 74 [15] Ehsan Asadzadeh Aghdaee, “Quality of Service Support in IEEE 802.16 Broadband Wireless Access Networks”, Department of Electrical & Computer System Engineering Monash University, 2006 [16] ALI HEIDARI KHOEI, GHASEM MIRJALILY AND MEHDI AGHA SARRAM, “IMPROVING THE QUALITY OF SERVICES BY SCHEDULING ALGORITHMS IN WIMAX NETWORKS”, Faculty of Electrical and Computer Engineering, Yazd University, Yazd, Iran, 2014 [17] Chuck Semeria, “Supporting Differentiated Service Classes: Queue Scheduling Disciplines”, Juniper Networks, 2001 [18] M.Shreedhar, G.Varghese, “Efficient fair queueing using deficit round-robin”, IEEE/ACM Transactions on Networking, Vol.4, No.3, 375-385, 1996 [19] Ali Nawaz Naqvi, Ash Mohammad Abbas, Tofik Ali Chouhan, “Performance Evaluation of Fixed and Mobile WiMAX Networks for UDP Traffic”, International Journal of Advanced Research in Computer and Communication Engineering, October 2012 [20] Davide Astuti, “Packet Handling Seminar on Transport of Multimedia Streams in Wireless Internet”, Department of Computer Science University of Helsinki, Helsinki, Finland [21] AWG, WIMAX Forum, In Collaboration with NIST, WiMAX Forum System Level Simulator NS-2 MAC+PHY Add-On for WiMAX (IEEE 802.16), March 2009 [22] Rohit Talwalkar, “Analysis of Quality of Service (QoS) in WiMAX Networks”, Florida Atlantic University, 2008 [23] C Ravichandiran, Dr C Pethuru Raj, Dr V Vaidhyanathan, “Analysis, Modification, and Implementation(AMI) of Scheduling Algorithm for the IEEE 802.116e (Mobile WiMAX)”, International Journal of Computer Science and Information Security, 2010 [24] http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.31.tar.gz [25] https://github.com/barun-saha/ns2-wimax-bluetooth-wsn/blob/master/ns-2.34/ns- 2.31-WiMAX_AATG_R2.6.patch.3 [26] IEEE Standard for Local and metropolitan area networks - Part 16: Air Interface for Fixed Broadband Wireless Access Systems,IEEE STD 802.16-2004 75 PHỤ LỤC Kịch đầu vào cho ns-2 sử dụng phân tích cho dịch vụ BE UGS # Scenario: Communication between MN and Sink Node with MN attached to BS # Topology scenario: # # | -| # | MN0 | ; 1.0.1 # | -| # # # # # # # # # # (^) | | | | | | | | -| | Sink node | | -| ; 0.0.0 # #check input parameters if {$argc != 5} { puts "" puts "Wrong Number of Arguments! No arguments in this topology" puts "Syntax: ns test_arq_be_ugs.tcl dl/ul block_size window_size data_loss_rate arq_enable" puts "" exit (1) } # set global variables #set nb_mn [lindex $argv 0] set nb_mn set direction [lindex $argv 0] set ARQ_b_size [lindex $argv 1] set ARQ_window_size [lindex $argv 2] set ARQ_data_loss_rate [lindex $argv 3] set ARQ_Enable_flag [lindex $argv 4] ;# max number of mobile node 76 #set packet_size 1500 #set packet_size 300 set output_dir ;# packet size in bytes at CBR applications set gap_size 0.05 ;#compute gap size between packets puts "gap size=$gap_size" set traffic_start 20 set traffic_stop 25 set simulation_stop 80 set diuc ;#modulation for MNs set arq_max_window_size $ARQ_window_size #define debug values Mac/802_16 set debug_ Mac/802_16 set rtg_ Mac/802_16 set ttg_ Mac/802_16 set ITU_PDP_ Mac/802_16/BS set dlratio_ Mac/802_16/SS set dlratio_ Mac/802_16 set queue_length_ Phy/WirelessPhy/OFDMA set g_ 0.25 #define coverage area for base station Phy/WirelessPhy set Pt_ 0.2 Phy/WirelessPhy set RXThresh_ 1.90546e-16 Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]] Phy/WirelessPhy set OFDMA_ # Parameter for wireless nodes set opt(chan) set opt(prop) set opt(netif) set opt(mac) set opt(ifq) set opt(ll) set opt(ant) set opt(ifqlen) set opt(adhocRouting) NOAH set opt(x) set opt(y) #defines function for flushing and closing files proc finish {} { global ns tf output_dir nb_mn $ns flush-trace close $tf exit } #create the simulator set ns [new Simulator] $ns use-newtrace #Open the NAM trace file set nf [open out.nam w] $ns namtrace-all $nf $defaultRNG seed #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/traffic.res w] $ns trace-all $tf #puts "Output file configured" # set up for hierarchical routing (needed for routing over a basestation) #puts "start hierarchical addressing" $ns node-config -addressType hierarchical 78 AddrParams set domain_num_ ;# domain number lappend cluster_num 1 ;# cluster number for each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel [expr ($nb_mn+1)] ;# number of nodes for each cluster (1 for sink and one for mobile nodes + base station AddrParams set nodes_num_ $eilastlevel puts "Configuration of hierarchical addressing done" # Create God create-god [expr ($nb_mn + 2)] ;# nb_mn + (base station and sink node) #puts "God node created" #creates the sink node in first addressing space set sinkNode [$ns node 0.0.0] #provide some co-ord (fixed) to base station node $sinkNode set X_ 50.0 $sinkNode set Y_ 50.0 $sinkNode set Z_ 0.0 #puts "sink 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 \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF #puts "Configuration of base station" #setup channel model 79 set prop_inst [$ns set propInstance_] $prop_inst ITU_PDP PED_A puts "after set pPDP" set bstation [$ns node 1.0.0] $bstation random-motion #puts "Base-Station node created" #provide some co-ord (fixed) to base station node $bstation set X_ 550.0 $bstation set Y_ 550.0 $bstation set Z_ 0.0 [$bstation set mac_(0)] set-channel # creation of the mobile nodes $ns node-config -macType Mac/802_16/SS \ -wiredRouting OFF \ ;# Mobile nodes cannot routing -macTrace ON set wl_node_0 [$ns node 1.0.1] $wl_node_0 random-motion ;# disable random motion $wl_node_0 base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation #compute position of the node $wl_node_0 set X_ 500.0 $wl_node_0 set Y_ 550.0 $wl_node_0 set Z_ 0.0 $ns at "$wl_node_0 setdest 1060.0 550.0 1.0" puts "wireless node created " ;# debug info [$wl_node_0 set mac_(0)] set-channel [$wl_node_0 set mac_(0)] set-diuc $diuc [$wl_node_0 set mac_(0)] setflow UL 10000 UGS 700 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 [$wl_node_0 set mac_(0)] setflow DL 10000 UGS 700 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 #create source traffic #Create a UDP agent and attach it to node n0 set udp_0 [new Agent/UDP] #set packet_size 300 80 #$udp_($i) set packetSize_ 1500 $udp_0 set packetSize_ 60 $udp_0 set fid_ # -If if { $direction == "ul" } { $ns attach-agent $wl_node_0 $udp_0 } else { $ns attach-agent $sinkNode $udp_0 } # Create a CBR traffic source and attach it to udp0 set cbr_0 [new Application/Traffic/CBR] $cbr_0 set packetSize_ 60 $cbr_0 set interval_ $gap_size $cbr_0 attach-agent $udp_0 #create an sink into the sink node # Create the Null agent to sink traffic set null_0 [new Agent/Null] if { $direction == "ul" } { $ns attach-agent $sinkNode $null_0 } else { $ns attach-agent $wl_node_0 $null_0 } # Attach the agents $ns connect $udp_0 $null_0 #} set wl_node_1 [$ns node 1.0.2] $wl_node_1 random-motion ;# disable random motion $wl_node_1 base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation #compute position of the node $wl_node_1 set X_ 500.0+500.0 $wl_node_1 set Y_ 550.0 $wl_node_1 set Z_ 0.0 81 $ns at "$wl_node_1 setdest 1060.0 550.0 1.0" ;# debug info puts "wireless node created " [$wl_node_1 set mac_(0)] set-channel [$wl_node_1 set mac_(0)] set-diuc $diuc [$wl_node_1 set mac_(0)] setflow UL 10000 UGS 700 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 [$wl_node_0 set mac_(0)] setflow DL 10000 UGS 700 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 #create source traffic #Create a UDP agent and attach it to node n0 set udp_1 [new Agent/UDP] #set packet_size 300 #$udp_($i) set packetSize_ 1500 $udp_1 set packetSize_ 150 $udp_1 set fid_ # -If if { $direction == "ul" } { $ns attach-agent $wl_node_1 $udp_1 } else { $ns attach-agent $sinkNode $udp_1 } # Create a CBR traffic source and attach it to udp0 set cbr_1 [new Application/Traffic/CBR] $cbr_1 set packetSize_ 150 $cbr_1 set interval_ $gap_size $cbr_1 attach-agent $udp_1 #create an sink into the sink node # Create the Null agent to sink traffic set null_1 [new Agent/Null] if { $direction == "ul" } { $ns attach-agent $sinkNode $null_1 } else { 82 $ns attach-agent $wl_node_1 $null_1 } # Attach the agents $ns connect $udp_1 $null_1 #} set wl_node_2 [$ns node 1.0.3] $wl_node_2 random-motion ;# disable random motion $wl_node_2 base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation #compute position of the node $wl_node_2 set X_ 500.0+250.0 $wl_node_2 set Y_ 550.0 $wl_node_2 set Z_ 0.0 $ns at "$wl_node_2 setdest 1060.0 550.0 1.0" puts "wireless node created " ;# debug info [$wl_node_2 set mac_(0)] set-channel [$wl_node_2 set mac_(0)] set-diuc $diuc [$wl_node_2 set mac_(0)] setflow UL 10000 UGS 700 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 [$wl_node_0 set mac_(0)] setflow DL 10000 UGS 700 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 #create source traffic #Create a UDP agent and attach it to node n0 set udp_2 [new Agent/UDP] #set packet_size 300 #$udp_($i) set packetSize_ 1500 $udp_2 set packetSize_ 1500 $udp_2 set fid_ # -If if { $direction == "ul" } { $ns attach-agent $wl_node_2 $udp_2 } else { $ns attach-agent $sinkNode $udp_2 } 83 # Create a CBR traffic source and attach it to udp0 set cbr_2 [new Application/Traffic/CBR] $cbr_2 set packetSize_ 1500 $cbr_2 set interval_ $gap_size $cbr_2 attach-agent $udp_2 #create an sink into the sink node # Create the Null agent to sink traffic set null_2 [new Agent/Null] if { $direction == "ul" } { $ns attach-agent $sinkNode $null_2 } else { $ns attach-agent $wl_node_1 $null_2 } # Attach the agents $ns connect $udp_2 $null_2 #} set wl_node_3 [$ns node 1.0.4] $wl_node_3 random-motion ;# disable random motion $wl_node_3 base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation #compute position of the node $wl_node_3 set X_ 500.0+100.0 $wl_node_3 set Y_ 550.0 $wl_node_3 set Z_ 0.0 $ns at "$wl_node_3 setdest 1060.0 550.0 1.0" puts "wireless node created " ;# debug info [$wl_node_3 set mac_(0)] set-channel [$wl_node_3 set mac_(0)] set-diuc $diuc [$wl_node_3 set mac_(0)] setflow UL 10000 BE 275 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 [$wl_node_3 set mac_(0)] setflow DL 10000 BE 275 $ARQ_Enable_flag 0.05 $ARQ_window_size 0 0 0 0 0 84 #} #create source traffic #Create a UDP agent and attach it to node n0 set udp_3 [new Agent/UDP] #set packet_size 300 #$udp_($i) set packetSize_ 1500 $udp_3 set packetSize_ 1500 $udp_3 set fid_ # -If if { $direction == "ul" } { $ns attach-agent $wl_node_3 $udp_3 } else { $ns attach-agent $sinkNode $udp_3 } # Create a CBR traffic source and attach it to udp0 set cbr_3 [new Application/Traffic/CBR] $cbr_3 set packetSize_ 1500 $cbr_3 set interval_ $gap_size $cbr_3 attach-agent $udp_3 #create an sink into the sink node # Create the Null agent to sink traffic set null_3 [new Agent/Null] if { $direction == "ul" } { $ns attach-agent $sinkNode $null_3 } else { $ns attach-agent $wl_node_1 $null_3 } # Attach the agents $ns connect $udp_3 $null_3 #} # create the link between sink node and base station $ns duplex-link $sinkNode $bstation 100Mb 1ms DropTail 85 # Traffic scenario: if all the nodes start talking at the same # time, we may see packet loss due to bandwidth request collision set diff 0.02 #for {set i 0} {$i < $nb_mn} {incr i} { $ns at $traffic_start "$cbr_0 start" $ns at $traffic_stop "$cbr_0 stop" #} $ns at $traffic_start "$cbr_1 start" $ns at $traffic_stop "$cbr_1 stop" $ns at $traffic_start "$cbr_2 start" $ns at $traffic_stop "$cbr_2 stop" $ns at $traffic_start "$cbr_3 start" $ns at $traffic_stop "$cbr_3 stop" $ns at $simulation_stop "finish" #$ns at $simulation_stop "$ns halt" # Run the simulation puts "Running simulation for $nb_mn mobile nodes " $ns run puts "Simulation done." Sau kịch PERL sử dụng phân tích vết tập tin (trace file) để trích xuất thơng số QoS Tính thơng lượng: # Type: perl avg_throughput_during_sim_time.pl $infile=$ARGV[0]; $flow_id=$ARGV[1]; $tonode=$ARGV[2]; $start_time=0; $end_time=0; # -# -$sum=0; open (DATA,"

Ngày đăng: 11/11/2020, 21:44

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w