3.4.1 Menghitung packet loss router
Packet loss router didapat dengan menghitung jumlah paket yang di-drop di
router dibagi jumlah paket yang diterima oleh router dikali 100.Satuan packet
lossrouter adalah . Penghitungan packet loss router menggunakan program .awk
yang akan dibuat. Flowchatpacket loss router dapat dilihat pada gambar 3.3.
start jml_drop = 0
jml_terima = 0 action = 1;
time = 2; node_1 = 3;
node_2 = 4; src = 5;
flow_id = 8; node_1_address = 9;
node_2_address = 10; seq_no = 11;
packet_id = 12; action = d
node_1 = 4 node_2 = 5
jml_drop = jml_drop + 1 yes
action = d
action = r node_1 = 4
src = ack jml_terima = jml_terima + 1
Print : jml_drop
jml_terima PAKET LOSS
ANTRIAN PAKET LOSS ANTRIAN =
jml_drop jml_terima 100 break
break no
no yes
yes
finish break
no
Gambar 3.3 Flowchat packet loss router
3.4.2 Menghitung average delay router
Average delay router didapat dengan menghitung total delay antrian di router
dibagi jumlah paket yang diterima oleh router. Satuan average delay routeradalah ms. Penghitungan average delay router menggunakan program .awk yang akan
dibuat. Flowchataverage delay router dapat dilihat pada gambar 3.4.
start highest_packet_id = 0;
total_duration = 0; num_out = 0;
action = 1; time = 2;
node_1 = 3; node_2 = 4;
src = 5; flow_id = 8;
node_1_address = 9; node_2_address = 10;
seq_no = 11; packet_id = 12;
start_time[packet_id] == 0 action == +
node_2==4 start_time[packet_id] =
time yes
action = d action = r
action == - node_1==4
node_2==5 num_out = num_out + 1
end_time[packet_id] = time;
Print : Total Delay
Total Packet out R AVERAGE DELAY
start = start_time[packet_id]; end = end_time[packet_id];
packet_duration = end - start; break
end_time[packet_id] = -1; no
no yes
yes
finish break
no packet_id
highest_packet_id highest_packet_id =
packet_id
acket_id = highest_packet_id
start end total_duration = total_duration +
packet_duration; i++
AVERAGE DELAY = total_durationnum_out
Gambar 3.4 Flowchataverage delay router
3.4.3 Menghitung throughput
Throughput didapat dengan menghitung total paket yang keluar dari router
dibagi delay rata-rata yang terjadi pada antrian router. Satuan throughput adalah packet per second
ps.penghitunganthroughputmenggunakan program .awk yang
akan dibuat. Flowchatthroughputdapat dilihat pada gambar 3.5.
start highest_packet_id = 0;
total_duration = 0; num_received = 0;
paket_1st=0; action = 1;
time = 2; node_1 = 3;
node_2 = 4; src = 5;
flow_id = 8; node_1_address = 9;
node_2_address = 10; seq_no = 11;
packet_id = 12; start_time[packet_id
] == 0 start_time[packet_id] =
time yes
action = d action = r
action == r node_2 ==5
num_out = num_out + 1; end_time[packet_id] = time;
Print : Average Delay R
Total Packet out R THROUGHPUT
start = start_time[packet_id]; end = end_time[packet_id];
packet_duration = end - start; break
end_time[packet_id] = -1; no
no yes
yes
finish break
no packet_id
highest_packet_id highest_packet_id =
packet_id
acket_id = highest_packet_id
start end total_duration = total_duration +
packet_duration; i++
num_outtotal_duration num_out
packet_id==0 paket_1st=
start_time[packet_id]
Gambar 3.5 Flowchatthroughput
35
BAB IV PENGUJIAN DAN ANALISIS