Adapun saran-saran yang dapat diberikan untuk pengembangan penelitian ini berikutnya adalah :
1. Membandingkan DCCP CCID 2 dengan varian TCP Reno yang memiliki algoritma congestion control yang sama.
2. Melakukan pengujian lebih lanjut pada varian DCCP lain yaitu CCID 3 yang memiliki algoritma congestion control yang berbeda dengan CCID 2.
3. Pengujian menggunakan pola distribusi paket yang berbeda. Contoh: pola distribusi paket random.
39
DAFTAR PSSTAKA
[1] Stalling, W. (2003). Data and Computer Communication, 5th Edition, hal 585. Prentice-Hall
[2] Forouzan, B. A. (2007). Data communications and Networking, 4thEdition. McGraw-hill
[3] Kohler, E., Handley M., & Floyd S. (2006). Designing: Congestion Control Without Reliablility. SIGCOMM ’06, September 11-15. Pisa, Italy.
[4] Kohler, E., Handley M., & Floyd S. (2006). Datagram Congestion Control Protocol (DCCP). [online].
Tersedia: http://tools.ietf.org/html/rfc4340 [18 juni 2015]
[5] Kohler, E., & Floyd, S. Datagram Congestion Control Protocol (DCCP) Overview. ICIR 9 July 2003
[6] Floyd, S., & Kohler, E. (2006). Profile for Datagram Congestion Control Protocol (DCCP) Congestion Control ID 2 : TCP-Like Congestion Control”. [online].
Tersedia: http://tools.ietf.org/html/rfc4341 [18 juni 2015] [7] Floyd, S., & Kohler, E. (2006). Profile for Datagram
Congestion Control Protocol (DCCP) Congestion Control ID 3: TCP-Friendly Rate Control (TFRC). [online].
40 [8] Floyd, S., & Kohler, E. (2007). Profile for Datagram Congestion Control Protocol (DCCP) Congestion ID 4: TCP-Friendly Rate Control for Small Packet (TFRC-SP).
[online].
Tersedia:
https://tools.ietf.org/html/draft-ietf-DCCP-CCID4-05 [18 juni 2015]
[9] Network Simulator 2. [online].
Tersedia: http://www.isi.edu/nsnam/ns/ [18 juni 2015] [10] DCCP Agents. [online].
Tersedia: http://www.isi.edu/nsnam/ns/doc/node496.html
[11] Mattsson, Nils-Erik. 2004. A DCCP modul for ns-2, Sweden
[12] Comer, Douglas E. (2000). Vol I : Internetworking with TCP/IP Principles, Protocols, and Architectures, 4thEdition. Prentice-Hall, Inc
[13] Takeuchi, S., Koga, H., Kadobayashi Y., Yamaghuchi S. (2005). Performance Evaluations of DCCP for Bursty Traffic in Real-time Applications. SAINT 2005, Italy. [14] Bhatti, S., Bateman M., & Miras D. (2008). A Comparative
41
LAMPIRAN
1. Skenario1.tcl
#Skenario percobaan 1 : TCP tanpa gangguan #Declare New Simulator
set ns [new Simulator]
#Setting Procedure Finish proc finish {} { global ns tr nf $ns flush-trace close $nf close $tr exit 0 }
#Setting output file
set tr [open skenario1.tr w] $ns trace-all $tr
set nf [open skenario1.nam w] $ns namtrace-all $nf
#Setting Node set n0 [$ns node] set n1 [$ns node] set n2 [$ns node]
42 set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] # Setting Link $ns duplex-link $n0 $n2 10Mb 10ms DropTail $ns duplex-link $n1 $n2 10Mb 10ms DropTail $ns duplex-link $n2 $n3 5Mb 10ms DropTail $ns duplex-link $n3 $n4 10Mb 10ms DropTail $ns duplex-link $n3 $n5 10Mb 10ms DropTail
# Setting Node Position
$ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down
# Setting Queue Length $ns queue-limit $n2 $n3 30
# Setting TCP1 & TCP2 Agent set tcp1 [new Agent/TCP] $ns attach-agent $n0 $tcp1
43 $ns attach-agent $n4 $tcpsink1 $ns connect $tcp1 $tcpsink1 $tcp1 set window_ 1000 $tcp1 set fid_ 1 $ns color 1 Red #Setting FTP Application set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1
#tcp trace $tcp1 attach $tr $tcp1 tracevar cwnd_
# Setting Time Schedule of Simulation $ns at 0.1 "$ftp1 start"
$ns at 500.0 "$ftp1 stop" $ns at 500.0 "finish"
# Plot Congestion Window
proc plotWindow {tcpSource outfile} { global ns
set cwnd [$tcpSource set cwnd_ ] set now [$ns now]
44 $ns at [expr $now+0.1] "plotWindow $tcpSource $outfile"
}
set outfile [open "cwndTCPS1.xg" w] $ns at 0.0 "plotWindow $tcp1 $outfile"
#run simulasi $ns run
2. Skenario2.tcl
#Skenario percobaan 2 : TCP vs TCP #Declare New Simulator
set ns [new Simulator]
#Setting Procedure Finish proc finish {} { global ns tr nf $ns flush-trace close $nf close $tr exit 0 }
#Setting output file
45 $ns trace-all $tr
set nf [open skenario2.nam w] $ns namtrace-all $nf #Setting Node set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] # Setting Link $ns duplex-link $n0 $n2 10Mb 10ms DropTail $ns duplex-link $n1 $n2 10Mb 10ms DropTail $ns duplex-link $n2 $n3 5Mb 10ms DropTail $ns duplex-link $n3 $n4 10Mb 10ms DropTail $ns duplex-link $n3 $n5 10Mb 10ms DropTail
# Setting Node Position
$ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down
46 # Setting Queue Length
$ns queue-limit $n2 $n3 30
# Setting TCP1 & TCP2 Agent set tcp1 [new Agent/TCP] $ns attach-agent $n0 $tcp1
set tcpsink1 [new Agent/TCPSink] $ns attach-agent $n4 $tcpsink1 $ns connect $tcp1 $tcpsink1 $tcp1 set window_ 1000 $tcp1 set fid_ 1
$ns color 1 Red
set tcp2 [new Agent/TCP] $ns attach-agent $n1 $tcp2
set tcpsink2 [new Agent/TCPSink] $ns attach-agent $n5 $tcpsink2 $ns connect $tcp2 $tcpsink2 $tcp2 set window_ 1000 $tcp2 set fid_ 2 $ns color 2 Blue #Setting FTP Application set ftp1 [new Application/FTP]
47 $ftp1 attach-agent $tcp1
set ftp2 [new Application/FTP] $ftp2 attach-agent $tcp2
#tcp trace $tcp1 attach $tr $tcp1 tracevar cwnd_
# Setting Time Schedule of Simulation $ns at 0.1 "$ftp1 start"
$ns at 100.1 "$ftp2 start" $ns at 500.0 "$ftp1 stop" $ns at 500.0 "$ftp2 stop" $ns at 500.0 "finish"
# Plot Congestion Window
proc plotWindow {tcpSource outfile} { global ns
set cwnd [$tcpSource set cwnd_ ] set now [$ns now]
puts $outfile "$now $cwnd"
$ns at [expr $now+0.1] "plotWindow $tcpSource $outfile" }
48 set outfile2 [open "cwndTCP2S2.xg" w]
$ns at 0.0 "plotWindow $tcp1 $outfile" $ns at 100.0 "plotWindow $tcp2 $outfile2"
#run simulasi $ns run
3. Skenario3.tcl
#Skenario percobaan 3 : TCP vs UDP #Declare New Simulator
set ns [new Simulator]
#Setting Finish Procedure proc finish {} { global ns tr nf $ns flush-trace close $nf close $tr exit 0 }
#Setting output file
set tr [open skenario3.tr w] $ns trace-all $tr
49 $ns namtrace-all $nf #Setting Node set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] # Setting Link $ns duplex-link $n0 $n2 10Mb 10ms DropTail $ns duplex-link $n1 $n2 10Mb 10ms DropTail $ns duplex-link $n2 $n3 5Mb 10ms DropTail $ns duplex-link $n3 $n4 10Mb 10ms DropTail $ns duplex-link $n3 $n5 10Mb 10ms DropTail
# Setting Node Position
$ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down
50 $ns queue-limit $n2 $n3 30
# Setting TCP Agent set tcp1 [new Agent/TCP] $ns attach-agent $n0 $tcp1
set tcpsink1 [new Agent/TCPSink] $ns attach-agent $n4 $tcpsink1 $ns connect $tcp1 $tcpsink1 $tcp1 set window_ 1000 $tcp1 set fid_ 1
$ns color 1 Red
# Setting UDP Agent set udp1 [new Agent/UDP] $ns attach-agent $n1 $udp1 set udpsink1 [new Agent/Null] $ns attach-agent $n5 $udpsink1 $ns connect $udp1 $udpsink1 $udp1 set fid_ 2
$ns color 2 Blue
#Setting FTP Application set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1
51 #Setting CBR Application
set cbr1 [new Application/Traffic/CBR] $cbr1 attach-agent $udp1 $cbr1 set packet_size_ 1000 $cbr1 set rate_ 5Mb #tcp trace $tcp1 attach $tr $tcp1 tracevar cwnd_
# Setting Time Schedule of Simulation $ns at 0.1 "$ftp1 start"
$ns at 100.1 "$cbr1 start" $ns at 500.0 "$ftp1 stop" $ns at 500.0 "$cbr1 stop" $ns at 500.0 "finish"
# Plot Congestion Window
proc plotWindow {tcpSource outfile} { global ns
set cwnd [$tcpSource set cwnd_ ] set now [$ns now]
puts $outfile "$now $cwnd"
$ns at [expr $now+0.1] "plotWindow $tcpSource $outfile" }
52 set outfile [open "cwndTCP1S3.xg" w]
$ns at 0.0 "plotWindow $tcp1 $outfile"
#run simulasi $ns run
4. Skenario4.tcl
#Skenario percobaan 4 : TCP vs DCCP #Declare New Simulator
set ns [new Simulator]
#Setting Procedure Finish proc finish {} { global ns tr nf $ns flush-trace close $nf close $tr exit 0 }
#Setting output file
set tr [open skenario4.tr w] $ns trace-all $tr
set nf [open skenario4.nam w] $ns namtrace-all $nf
53 #Setting Node set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] # Setting Link $ns duplex-link $n0 $n2 10Mb 10ms DropTail $ns duplex-link $n1 $n2 10Mb 10ms DropTail $ns duplex-link $n2 $n3 5Mb 10ms DropTail $ns duplex-link $n3 $n4 10Mb 10ms DropTail $ns duplex-link $n3 $n5 10Mb 10ms DropTail
# Setting Node Position
$ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down
# Setting Queue Length $ns queue-limit $n2 $n3 30
54 # Setting TCP Agent
set tcp1 [new Agent/TCP] $ns attach-agent $n0 $tcp1
set tcpsink1 [new Agent/TCPSink] $ns attach-agent $n4 $tcpsink1 $ns connect $tcp1 $tcpsink1 $tcp1 set window_ 1000 $tcp1 set fid_ 1 $ns color 1 Red # Setting DCCP Agent
set dccp1 [new Agent/DCCP/TCPlike] $ns attach-agent $n1 $dccp1
set dccpsink1 [new Agent/DCCP/TCPlike] $ns attach-agent $n5 $dccpsink1 $ns connect $dccp1 $dccpsink1 $dccp1 set window_ 1000 $dccp1 set fid_ 2 $ns color 2 Blue #Setting FTP Application set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1
55 #Setting CBR Application
set cbr1 [new Application/Traffic/CBR] $cbr1 attach-agent $dccp1 $cbr1 set packet_size_ 1000 $cbr1 set rate_ 5Mb #tcp trace $tcp1 attach $tr $tcp1 tracevar cwnd_
# Setting Time Schedule of Simulation $ns at 0.1 "$ftp1 start" $ns at 100.0 "$dccpsink1 listen" $ns at 100.1 "$cbr1 start" $ns at 500.0 "$ftp1 stop" $ns at 500.0 "$cbr1 stop" $ns at 500.0 "finish"
# Plot Congestion Window
proc plotWindow {tcpSource outfile} { global ns
set cwnd [$tcpSource set cwnd_ ] set now [$ns now]
puts $outfile "$now $cwnd"
56 }
set outfile [open "cwndTCP1S4.xg" w] $ns at 0.0 "plotWindow $tcp1 $outfile" set outfile2 [open "cwndDCCP1S4.xg" w] $ns at 100.0 "plotWindow $dccp1 $outfile2" #run simulasi $ns run 5. Avgbpc.awk BEGIN { countcwnd = 0 sendsize = 0 } { event = $1 time = $2 timecwnd=$1 fromNode = $3 toNode = $4 pkt_type = $5 pkt_size = $6 cwnd = $6
57 cwndvalue = $7
if (timecwnd >= 100.1 && cwndvalue == 1.000 && cwnd == "cwnd_" && toNode == 4) {
countcwnd++ }
if (time >= 100.1 && pkt_type == "tcp" && event == "+" && fromNode == 0) { sendsize += pkt_size } } END {
print" Total cwnd = " (countcwnd)
print" Avg Byte transferred/cwnd = " (sendsize/countcwnd)/1000 "KB/cwnd" } 6. Avgthroughput.awk BEGIN { recvdSize = 0 startTime = 100.1 stopTime = 500.0 } {
58 event = $1 time = $2 fromNode = $3 toNode = $4 pkt_type = $5 pkt_size = $6
if (event == "r" && time >= 100.1 && pkt_type == "tcp" && toNode==4) { recvdSize += pkt_size } } END {
print"Average TCP Throughput = " (recvdSize/1000)/(stopTime-startTime) "kBps" } 7. Avge2edelay.awk BEGIN { num_sample = 0; total_delay = 0; } { event = $1 time = $2
59 fromNode = $3
toNode = $4 pkt_type = $5 f_id = $8
if (event == "+" && time >=100.1 && fromNode == 0 && pkt_type == "tcp" && f_id==1){
p_id==$12
t_dep[$12] = time }
if (event == "r" && time >=100.1 && toNode == 4 && pkt_type == "tcp" && f_id==1){
if (p_id = $12){ t_arr[$12] = time num_sample++
delay = t_arr[$12] - t_dep[$12] total_delay += delay } } } END{ avg_delay = total_delay/num_sample;
print "Average end to end delay = " avg_delay " s"; }
60 8. Avgpacketdrop.awk BEGIN { pkt_drops_tcp1 = 0 } { event = $1 time = $2 pkt_type = $5 pkt_fid = $8
if (event == "d" && time >= 100.1 && pkt_type=="tcp" && pkt_fid==1)
pkt_drops_tcp1++ }
END {
printf("Paket Drop TCP1 =%d\n", pkt_drops_tcp1); }