• Tidak ada hasil yang ditemukan

BAB V KESIMPULAN DAN SARAN

V.2. Saran

Ada saran yang dapat dipertimbangkan untuk pengembangan pengujian pada protokol DSR dengan simulator NS2 yaitu :

1. Melakukan pengujian dan analisis lebih lanjut dengan parameter yang berbeda, misalnya sumber trafik yang berbeda seperti tcp atau parameter berubah yang berbeda misalnya kecepatan node, dll.

2. Menguji lebih lanjut mengenai interval paket dan ukuran paket yang diindikasikan memiliki pengaruh terhadap kinerja protokol DSR.

64

DAFTAR PUSTAKA

[1] Aprillando, A. 2007. Cara Kerja dan Kinerja Protokol Optimized Link State Routing (OLSR) pada Mobile Ad hoc network (MANET), Tugas Akhir. Jakarta: Fakultas Teknik Unika AtmaJaya.

[2] Ahmad, Faza F., Sony Sumaryo., & Yudha Purwanto. 2007. Performansi Dynamic Source Routing (DSR) dengan Sumber Trafik CBR, PARETO dan EXPONENTIAL, Jakarta : Sekolah Tinggi Teknologi Telkom.

[3] Issariyakul, Teerawat., & Ekram Hossain. 2008. Introduction to Network Simulator NS2. TOT Public Company Limited University of Manitoba. [4] Wirawan, A.B., & Indarto, E., 2004, Mudah Membangun Simulasi dengan

Network Simulator-2, Andi Offset, Yogyakarta.

[5] Rendy. 2007. Cara Kerja dan Kinerja Protokol TORA (Temporally-Orderd

Routing Algorithm) pada MANET (Mobile Ad-Hoc Network), Tugas Akhir.

Jakarta: Fakultas Teknik Unika AtmaJaya.

[6] C. K. Toh. 2001. Ad hoc Mobile Wireless Networks Protocol and Systems. Prentice Hall.

[7] Mukhija, Arun. 2001. Reactive Routing Protocol for Mobile Ad-Hoc Networks. Delhi : Department of Mathematics Indian Institute of Technology.

[8] Johnson, D. 2007. Dynamic Source Routing in Ad hoc wireless Network. Computer Science Department, Carnegie Mellon University.

[9] Fitri, Riri Sari., Abdusy Syarif., & Bagio Budiardjo. Analisis Kinerja Protokol Routing Ad hoc On-Demand Distance Vector (AODV) Pada Jaringan Ad hoc Hybrid: Perbandingan Hasil Simulasi dengan NS-2 dan Implementasi pada Testbed dengan PDA.

[10] Suparno, Paul. 2006 Diktat Statistik Untuk Mahasiswa Pendidikan Fisika. Universitas Sanata Dharma, Yogyakarta.

LAMPIRAN

1. Listing Program

set val(chan) Channel/WirelessChannel ;#tipe kanal

set val(prop) Propagation/TwoRayGround ;#model propagasi set val(netif) Phy/WirelessPhy ;#tipe network interface set val(mac) Mac/802_11 ;#Tipe MAC

set val(ifq) Queue/DropTail/CMUPriQueue ;#tipe antrian

set val(ll) LL ;#tipe link layer

set val(ant) Antenna/OmniAntenna ;#model antena set val(ifqlen) 50 ;#max paket di IFQ set val(nn) 64 ;#jumlah node

set val(rp) DSR ;#protokol routing

set val(x) 300 ;#batas X

set val(y) 300 ;#batas Y

set val(stop) 200 ;#lamanya simulasi

if { $val(rp) == "DSR" } {

set val(ifq) CMUPriQueue } else {

set val(ifq) Queue/DropTail/PriQueue }

#inisialisai pemangguilan skenario dari cbrgen dan RW-mobility

set val(nod) "../konek/64node.txt" set val(con) "../konek/10koneksi.txt"

set ns_ [new Simulator]

set tracefd [open traceku.tr w] set namtrace [open namku.nam w] $ns_ use-newtrace

$ns_ trace-all $tracefd

$ns_ namtrace-all-wireless $namtrace $val(x) $val(y) #Membuat objek topografi

set topo [new Topography] $topo load_flatgrid $val(x) $val(y) proc create-god { nodes } {

global ns_ god_ tracefd set god_ [new God] $god_ num_nodes $nodes }

create-god $val(nn) #konfigurasi dari node

$ns_ node-config -adhocRouting $val(rp) \ -llType $val(ll) \

-ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace ON \ -channelType $val(chan)\

for {set i 0} {$i < $val(nn) } { incr i } { set node_($i) [$ns_ node]

}

#Pemanggilan skenario mobile node source $val(nod)

#Pemanggilan skenario koneksi source $val(con)

#menginisialisasi posisi node dalam NAM for {set i 0} {$i < $val(nn)} { incr i } { #ukuran node dalam NAM

$ns_ initial_node_pos $node_($i) 10 }

#Memberitahu node bahwa simulsai telah berakhir for {set i 0} {$i < $val(nn) } { incr i } { $ns_ at $val(stop) "$node_($i) reset"; }

#Mengakhiri simulasi NAM

$ns_ at $val(stop) "$ns_ nam-end-wireless $val(stop)" $ns_ at $val(stop) "stop"

$ns_ at 200.0 "puts \"end simulation\" ; $ns_ halt" proc stop {} {

global ns_ namtrace $ns_ flush-trace close $namtrace

#exec xgraph trace25_1conn_1st.tr exec nam namku.nam &

#exit 0 }

2. Perl throughput $infile = $ARGV[0]; $highest_packet_id[0] = 0; $highest_packet_id[1] = 0; $highest_packet_id[2] = 0; $highest_packet_id[3] = 0; $highest_packet_id[4] = 0; $highest_packet_id[5] = 0; $highest_packet_id[6] = 0; $highest_packet_id[7] = 0; $highest_packet_id[8] = 0; $highest_packet_id[9] = 0; $action = 0; $time = 2; $node_type = 18; $packet_type = 34; $packet_size = 36; $flow_id = 38; $src = 44; $packet_id = 46;

open (data, "<$infile") || die "cant open infile $ !"; while (<data>)

{

@x = split(' '); $z=$x[$packet_id];

for ($flow = 0 ; $flow<=0 ; $flow++) {

if ($x[$flow_id] == $flow and $x[$src] eq 'cbr') { if ($z > $highest_packet_id[$flow]) { $highest_packet_id[$flow] = $z; } if (($start_time[$flow][$z]) == 0) { $start_time[$flow][$z] = $x[$time]; } if ($x[$action] ne "d") { if ($x[$action] eq "r") { $end_time[$flow][$z] = $x[$time];

if ($x[$node_type] eq 'AGT' and $x[$packet_type] eq 'cbr') {

$size[$flow][$z] = $x[$packet_size]; $num_rcvd[$flow][$z] = 1;

} }

} else { $end_time[$flow][$z] = -1; } } } }

#print STDOUT "$highest_packet_id"; for ($flow = 0 ; $flow<=0 ; $flow++) {

print STDOUT "START TIME \t\tTHROUGHPUT [$flow]\n"; print STDOUT "\n";

for ($z = 0 ; $z<=$highest_packet_id[$flow] ; $z++) {

$start = $start_time[$flow][$z]; $end = $end_time[$flow][$z]; $packet_duration = $end - $start; $sized = $size[$flow][$z]; if ($sized > 0) { $th = $sized / $packet_duration; } $rcvd = $rcvd + $num_rcvd[$flow][$z]; if ($start < $end) {

print STDOUT "$start \t$th\n"; $total_th = $total_th + $th; }

}

print STDOUT "\n"; print STDOUT "\n";

#print STDOUT "$total_th\n"; $avg_th = $total_th / $rcvd }

#print STDOUT "$rcvd\n";

print STDOUT "Average Throughput = $avg_th\n"; close data; exit(0); 3. Perl delay $infile = $ARGV[0]; $highest_packet_id[0] = 0; $action = 0; $time = 2;

$node_type = 18;

$packet_type = 34;

$flow_id = 38;

$src = 44;

$packet_id = 46;

open (data, "<$infile") || die "cant open infile $ !"; while (<data>)

{

@x = split(' '); $z=$x[$packet_id];

for ($flow = 0 ; $flow<=0 ; $flow++) {

if ($x[$flow_id] == $flow and $x[$src] eq 'cbr') { if ($z > $highest_packet_id[$flow]) { $highest_packet_id[$flow] = $z; } if (($start_time[$flow][$z]) == 0) { start_time[$flow][$z] = $x[$time]; } if ($x[$action] ne "d") { if ($x[$action] eq "r") { $end_time[$flow][$z] = $x[$time];

if ($x[$node_type] eq 'AGT' and $x[$packet_type] eq 'cbr') { $num_rcvd[$flow][$z] = 1; } } } else { $end_time[$flow][$z] = -1; } } } }

#print STDOUT "$highest_packet_id"; for ($flow = 0 ; $flow<=0 ; $flow++) {

print STDOUT "START TIME \t\tDELAY\n"; print STDOUT "\n";

{

$start = $start_time[$flow][$z]; $end = $end_time[$flow][$z]; $packet_duration = $end - $start; $rcvd = $rcvd + $num_rcvd[$flow][$z]; if ($start < $end)

{

print STDOUT "$start \t$packet_duration\n"; $total_delay = $total_delay + $packet_duration; }

}

print STDOUT "\n"; print STDOUT "\n";

#print STDOUT "$total_delay\n"; $avg_delay = $total_delay / $rcvd }

#print STDOUT "$rcvd\n";

print STDOUT "Average Delay = $avg_delay\n"; close data;

exit(0);

4. Perl packet delivery ratio $infile = $ARGV[0]; $highest_packet_id[0] = 0; $action = 0; $node_type = 18; $packet_type = 34; $flow_id = 38; $src = 44; $packet_id = 46;

open (data, "<$infile") || die "cant open infile $ !"; while (<data>)

{

@x = split(' '); z=$x[$packet_id];

for ($flow = 0 ; $flow<=0 ; $flow++) {

if ($x[$flow_id] == $flow and $x[$src] eq 'tcp') {

if ($z > $highest_packet_id[$flow]) {

$highest_packet_id[$flow] = $z; }

if ($x[$action] eq 's' and $x[$node_type] eq 'AGT' and $x[$packet_type] eq 'tcp')

{

$snt[$flow][$z] = 1; }

if ($x[$action] eq 'r' and $x[$node_type] eq 'AGT' and $x[$packet_type] eq 'tcp')

{ $rcvd[$flow][$z] = 1; } } } }

for ($flow = 0 ; $flow<=0 ; $flow++) {

for ($z = 0 ; $z<=$highest_packet_id[$flow] ; $z++) {

$sent = $sent + $snt[$flow][$z];

$received = $received + $rcvd[$flow][$z]; $packet_del = ($received / $sent) * 100; }

}

print STDOUT "Packet Sent = $sent\n";

print STDOUT "Packet Received = $received\n"; print STDOUT "Packet Delivery = $packet_del %\n"; close data;

Dokumen terkait