SlideShare a Scribd company logo
1 of 35
TCP Congestion Control
Internet Congestion Collapse
      Akhir tahun 80-an, Internet sering kolaps
       akibat kongesti
         Data + Retransmissions
Host
                                     Congestion!
                                     Packet drops!!
Host
                         Collapse

Host                                 More Drops!!!
TCP congestion control
     penting
   Algoritma kendali kongesti TCP
    merupakan latar belakang utama
    sukesnya Internet dalam
    menghadapi pola akses user yang
    tidak dapat diprediksi
    (unpredictable user access
    patterns) serta keterbatasan
    resource
   Tanpa kendali kongesti TCP,
    Internet sudah menjadi sejarah
Resource Management
        Solutions

   Cara menangani kongesti
       resource allocation
         
             How to effectively and fairly allocate resources among competing
             users?
            resources = bandwidth of links + buffers on the routers
       control congestion if (and when) is occurs
         
             How to react when queues overflow and packets have to be
             dropped?
   Dua tempat implementasi penanganan kongesti
       routers di dalam jaringan (queuing discipline)
       hosts at the edges of the network (transport protocol)
The Cost of Congestion

                                                                packet
                                          knee   cliff
Cost                                                             loss




                             Throughput
 High delay

 Packet loss                                               congestion
                                                             collapse
 Wasted upstream

  bandwidth when a pkt is
  discarded at                                           Load
  downstream                 Delay
 Wasted bandwidth due

  to retransmission (a pkt
  goes through a link
  multiple times)
                                                         Load
Congestion Control vs.
    Congestion Avoidance
   Congestion control goal
       Stay left of cliff
   Congestion avoidance goal
       Stay left of knee                 knee   cliff

                             Throughput
                                                          congestion
                                                           collapse



                                                         Load
Detecting Congestion
     Packet drops yang sering timbul
      mengindikasikan kongesti
                   Packet


Src                                 Dst
          Drop
                            Ack
 Timeout! No Ack
  = Congestion!
Mengendalikan kongesti
   Ukuran window dikurangi jumlah paket
    di jaringan lebih sedikit
   Memperbesar ukuran window  akan
    lebih banyak paket di jaringan
   Konsep congestion window :
       Ukuran window lebih kecil jika kongesti
        terjadi dan membesar bila kongesti
        berkurang
Karakteristik skema congestion
     avoidance yang diinginkan
   Efficiency (high utilization)
   Fairness (resource sharing)
   Distributedness (no central knowledge for
    scalability)
   Convergence and stability (fast convergence
    after disturbance, low oscillation)
       responsiveness (speed to new state, lower or
        higher)
       smoothness
AIMD
Additive Increase/Multiplicative
Decrease

   Setiap terjadi packet drop,
    CongestionWindow (cwnd) dibagi 2
    (multiplicative decrease)
       Multiplicative decrease diperlukan untuk
        mencegah kongesti
   Jika tidak terjadi packet drop, cwnd
    diperbesar secara bertahap /gradually
    (additive increase)
Multiplicative Decrease
   cwnd dinyatakan dalam bytes, tetapi
    literatur kebanyakan membicarakan
    kongesti dalam istilah paket (yaitu
    dalam MSS == Maximum Segment
    Size)
   Ukuran cwnd tidak boleh di bawah
    ukuran sebuah paket
Additive Increase
   Additive Increase merupakan reaksi
    atas “persepsi terhadap kapasitas yang
    ada”
   Ide dasar Linear Increase :
       Untuk setiap paket yang dapat dikirim,
        dinaikkan 1 packet
       cwnd dinaikkan 1 untuk setiap ACK yang
        diterima
AIMD (cont)
                                               Source   Destination
   Algorithm
       cwnd dinaikkan satu (satu paket) per
        RTT (linear increase)
       cwnd dibagi dua jika suatu timeout
        terjadi (multiplicative decrease)




                                                   …
   In practice: increment a little for each ACK
    Increment = (MSS*MSS)/cwnd
       cwnd = cwnd + Increment
AIMD (cont)
             Trace: sawtooth behavior
     70
     60
     50
     40
KB




     30
     20
     10

              1.0   2.0   3.0   4.0      5.0     6.0   7.0   8.0   9.0   10.0
                                Time (seconds)
Problems
   Berapa ukuran window yang seharusnya?
       Initially?
       Bila terjadi packet loss dan timeout?
   Pessimistic window size? (mis. 1)
       Additive increase terlalu lambat – koneksi yang
        pendek tidak akan menggunakan bandwidth yang
        ada secara penuh
   Optimistic window size?
       Pengiriman paket initial yang terlalu besar dapat
        menyebabkan overflow di antrian router
Slow Start
   Objective: menentukan kapasitas yang ada di
    awal dengan cepat
   Idea
       Dimulai dengan CongestionWindow = 1 paket
       CongestionWindow ditambah 1 untuk setiap ACK
   Digunakan dalam dua kondisi
       Pada awal koneksi
       Jika koneksi terputus ketika menunggu sebuah
        timeout
Contoh Slow Start
 cwnd = 1       segment 1

                        ent 1
            ACK for segm

 cwnd = 2       segment 2
                segment 3

                        ents 2
            ACK for segm
                        ents 3
            ACK for segm
 cwnd = 4      segment 4
               segment 5
               segment 6



                        ents 4
            ACK for segm
                         ents 5
            ACK for segm
                         ents 6
            ACK for segm
 cwnd = 7
Sifat slow start

   Ukuran CongestionWindow naik
    dengan cepat
     
       Untuk setiap ACK, CongestionWindow
      selalu dinaikkan 1 tanpa peduli jumlah
      segmen yang telah di-ACK
   TCP melambatkan kenaikkkan
    CongestionWindow dengan kombinasi
    slow start dengan AIMD
Slow Start dan AIMD
   Perubahan dari slow start ke AIMD
       Jika transmisi terputus, TCP mengetahui current
        value dari CongestionWindow (= value sebelum
        loss/2)
       Menggunakan current value di atas sebagai
        “target” window size (= CongestionThreshold)
       Slow start digunakan sampai tercapainya
        CongestionThreshold, lalu digunakan additive
        increase (AIMD)
Fast Retransmit                             Sender   Receiver

                                           Packet 1
   Masalah: TCP timeouts                  Packet 2
                                                             ACK 1
    menyebabkan periode idle
                                           Packet 3
                                           Packet 4          ACK 2
   Fast retransmit:                                         ACK 2
                                           Packet 5
       Ack dikirimkan untuk setiap        Packet 6
        paket yang diterima                                  ACK 2
       Duplikat dari ack sebelumnya                         ACK 2

        dikirimkan jika paket yang       Retransmit
        diterima tidak terurut           packet 3
       Duplikasi ACKs digunakan                             ACK 6
        juga untuk mendorong
        retransmisi
            Ketika menerima 3 ACK
             yang sama, sender akan
             me-retransmits paket yang
             hilang
Fast Recovery

   Fast recovery mencegah slow
    start setelah fast retransmit
   Setelah 3 ACKs yang sama
    (duplikasi) diterima:
       Retransmit “lost packet”
       Congestion threshold
        sshtresh= cwnd/2
       cwnd = cwnd+3
       Enter congestion avoidance
       Increment cwnd by one for
        each additional duplicate
        ACK
   When ACK yang datang
    meng-acknowledges “data
    baru” (digambar:
    AckNo=2028), set:
        cwnd=ssthresh
        enter congestion avoidance
TCP Congestion Control

             Congestion          Congestion occurs
       20    avoidance



       15
Congestion
 window
                            Threshold
       10

                    Slow
                    start
        5


         0

                                  Round-trip times
Self Clocking and Slow Start
     Setiap pengiriman paket di- “clock” oleh
      sebuah ACK – no bursts develop



                                           …




W=1   W=2 W=4     W=5   W=6   W=7
  Slow Start
Self Clocking in Operation
       Setiap pengiriman paket di-“clock” oleh
        sebuah ACK – no bursts develop



…                                            …




               W=32
Self Clocking Interrupted
   Selama timeouts, ACKs tidak muncul (drained). Self clocking
    terputus. Pengiriman berikutnya berupa pengiriman burst
    burst. Slow start kembali digunakan!

                          ACKs
            Lost
                          Drained!!   Ack32
…                                                      …
                                              16 packet burst


                   W=32            Retransmission
                   Timeout         Cut window in 1/2
Self Clocking and Fast
       Retransmit / Fast Recovery
   Ketika fast retransmit digunakan, paket di-
    retransmisi sebelum semua ACKs hilang sehingga
    slow start tidak diperlukan

           Lost
…                                          …
                  Fast
                  Retransmission

         W=32      Cut window in 1/2
Versi TCP
   TCP/Tahoe
   TCP/Reno: banyak Operating System
    menerapkan TCP/Reno type
    congestion control
   TCP/Vegas: not currently used
TCP Tahoe
   Dirancang oleh by Van Jacobson
   Terdiri dari : basic TCP algorithms,
    AIMD, Slow Start, Fast Retransmit
TCP Reno
   Dirancang oleh Van Jacobson pada akhir 80-an
   Masih bekerja dengan baik walaupun bandwidth
    Internet telah meningkat lebih dari 10.000 kali
   Duplicate ACKs:
        
            Fast retransmit
        
            Fast recovery
     Fast Recovery avoids slow start
   Timeout:
        
            Retransmit
        
            Slow Start
   TCP Reno improves upon TCP Tahoe when a single
    packet is dropped in a round-trip time.
TCP Tahoe vs TCP Reno
TCP Tahoe
TCP Reno




  SS       CA




                Fast retransmission/fast recovery
TCP New Reno
   Jika terjadi kehilangan beberapa paket, Reno has problems
   Partial ACK:
     Muncul bila beberapa paket hilang
     Partial ACK hanya meng-acknowledge beberapa paket pada awal
      fast recovery
    Sender harus menunggu sampai timeout terjadi
   New Reno:
      Partial ACK does not take sender out of fast recovery
      Partial ACK causes retransmission of the segment following

       the acknowledged segment
   New Reno can deal with multiple lost segments without going to
    slow start
SACK
   SACK = Selective acknowledgment
   Issue: Reno and New Reno retransmit at most 1 lost packet
    per round trip time
   Selective acknowledgments: The receiver can
    acknowledge non-continuous blocks of data (SACK 0-1023,
    1024-2047)
   Multiple blocks can be sent in a single segment
   TCP SACK:
       Enters fast recovery upon 3 duplicate ACKs
       Sender keeps track of SACKs and infers if segments are lost.
        Sender retransmits the next segment from the list of segments that
        are deemed lost.
TCP Vegas
   Menerapkan congestion avoidance

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

TCPCC

  • 2. Internet Congestion Collapse  Akhir tahun 80-an, Internet sering kolaps akibat kongesti Data + Retransmissions Host Congestion! Packet drops!! Host Collapse Host More Drops!!!
  • 3. TCP congestion control penting  Algoritma kendali kongesti TCP merupakan latar belakang utama sukesnya Internet dalam menghadapi pola akses user yang tidak dapat diprediksi (unpredictable user access patterns) serta keterbatasan resource  Tanpa kendali kongesti TCP, Internet sudah menjadi sejarah
  • 4. Resource Management Solutions  Cara menangani kongesti  resource allocation  How to effectively and fairly allocate resources among competing users?  resources = bandwidth of links + buffers on the routers  control congestion if (and when) is occurs  How to react when queues overflow and packets have to be dropped?  Dua tempat implementasi penanganan kongesti  routers di dalam jaringan (queuing discipline)  hosts at the edges of the network (transport protocol)
  • 5. The Cost of Congestion packet knee cliff Cost loss Throughput  High delay  Packet loss congestion collapse  Wasted upstream bandwidth when a pkt is discarded at Load downstream Delay  Wasted bandwidth due to retransmission (a pkt goes through a link multiple times) Load
  • 6. Congestion Control vs. Congestion Avoidance  Congestion control goal  Stay left of cliff  Congestion avoidance goal  Stay left of knee knee cliff Throughput congestion collapse Load
  • 7. Detecting Congestion  Packet drops yang sering timbul mengindikasikan kongesti Packet Src Dst Drop Ack Timeout! No Ack = Congestion!
  • 8. Mengendalikan kongesti  Ukuran window dikurangi jumlah paket di jaringan lebih sedikit  Memperbesar ukuran window  akan lebih banyak paket di jaringan  Konsep congestion window :  Ukuran window lebih kecil jika kongesti terjadi dan membesar bila kongesti berkurang
  • 9. Karakteristik skema congestion avoidance yang diinginkan  Efficiency (high utilization)  Fairness (resource sharing)  Distributedness (no central knowledge for scalability)  Convergence and stability (fast convergence after disturbance, low oscillation)  responsiveness (speed to new state, lower or higher)  smoothness
  • 10. AIMD Additive Increase/Multiplicative Decrease  Setiap terjadi packet drop, CongestionWindow (cwnd) dibagi 2 (multiplicative decrease)  Multiplicative decrease diperlukan untuk mencegah kongesti  Jika tidak terjadi packet drop, cwnd diperbesar secara bertahap /gradually (additive increase)
  • 11. Multiplicative Decrease  cwnd dinyatakan dalam bytes, tetapi literatur kebanyakan membicarakan kongesti dalam istilah paket (yaitu dalam MSS == Maximum Segment Size)  Ukuran cwnd tidak boleh di bawah ukuran sebuah paket
  • 12. Additive Increase  Additive Increase merupakan reaksi atas “persepsi terhadap kapasitas yang ada”  Ide dasar Linear Increase :  Untuk setiap paket yang dapat dikirim, dinaikkan 1 packet  cwnd dinaikkan 1 untuk setiap ACK yang diterima
  • 13. AIMD (cont) Source Destination  Algorithm  cwnd dinaikkan satu (satu paket) per RTT (linear increase)  cwnd dibagi dua jika suatu timeout terjadi (multiplicative decrease) …  In practice: increment a little for each ACK Increment = (MSS*MSS)/cwnd cwnd = cwnd + Increment
  • 14. AIMD (cont)  Trace: sawtooth behavior 70 60 50 40 KB 30 20 10 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 Time (seconds)
  • 15. Problems  Berapa ukuran window yang seharusnya?  Initially?  Bila terjadi packet loss dan timeout?  Pessimistic window size? (mis. 1)  Additive increase terlalu lambat – koneksi yang pendek tidak akan menggunakan bandwidth yang ada secara penuh  Optimistic window size?  Pengiriman paket initial yang terlalu besar dapat menyebabkan overflow di antrian router
  • 16. Slow Start  Objective: menentukan kapasitas yang ada di awal dengan cepat  Idea  Dimulai dengan CongestionWindow = 1 paket  CongestionWindow ditambah 1 untuk setiap ACK  Digunakan dalam dua kondisi  Pada awal koneksi  Jika koneksi terputus ketika menunggu sebuah timeout
  • 17. Contoh Slow Start cwnd = 1 segment 1 ent 1 ACK for segm cwnd = 2 segment 2 segment 3 ents 2 ACK for segm ents 3 ACK for segm cwnd = 4 segment 4 segment 5 segment 6 ents 4 ACK for segm ents 5 ACK for segm ents 6 ACK for segm cwnd = 7
  • 18. Sifat slow start  Ukuran CongestionWindow naik dengan cepat  Untuk setiap ACK, CongestionWindow selalu dinaikkan 1 tanpa peduli jumlah segmen yang telah di-ACK  TCP melambatkan kenaikkkan CongestionWindow dengan kombinasi slow start dengan AIMD
  • 19. Slow Start dan AIMD  Perubahan dari slow start ke AIMD  Jika transmisi terputus, TCP mengetahui current value dari CongestionWindow (= value sebelum loss/2)  Menggunakan current value di atas sebagai “target” window size (= CongestionThreshold)  Slow start digunakan sampai tercapainya CongestionThreshold, lalu digunakan additive increase (AIMD)
  • 20. Fast Retransmit Sender Receiver Packet 1  Masalah: TCP timeouts Packet 2 ACK 1 menyebabkan periode idle Packet 3 Packet 4 ACK 2  Fast retransmit: ACK 2 Packet 5  Ack dikirimkan untuk setiap Packet 6 paket yang diterima ACK 2  Duplikat dari ack sebelumnya ACK 2 dikirimkan jika paket yang Retransmit diterima tidak terurut packet 3  Duplikasi ACKs digunakan ACK 6 juga untuk mendorong retransmisi  Ketika menerima 3 ACK yang sama, sender akan me-retransmits paket yang hilang
  • 21. Fast Recovery  Fast recovery mencegah slow start setelah fast retransmit  Setelah 3 ACKs yang sama (duplikasi) diterima:  Retransmit “lost packet”  Congestion threshold sshtresh= cwnd/2  cwnd = cwnd+3  Enter congestion avoidance  Increment cwnd by one for each additional duplicate ACK  When ACK yang datang meng-acknowledges “data baru” (digambar: AckNo=2028), set: cwnd=ssthresh enter congestion avoidance
  • 22. TCP Congestion Control Congestion Congestion occurs 20 avoidance 15 Congestion window Threshold 10 Slow start 5 0 Round-trip times
  • 23. Self Clocking and Slow Start  Setiap pengiriman paket di- “clock” oleh sebuah ACK – no bursts develop … W=1 W=2 W=4 W=5 W=6 W=7 Slow Start
  • 24. Self Clocking in Operation  Setiap pengiriman paket di-“clock” oleh sebuah ACK – no bursts develop … … W=32
  • 25. Self Clocking Interrupted  Selama timeouts, ACKs tidak muncul (drained). Self clocking terputus. Pengiriman berikutnya berupa pengiriman burst burst. Slow start kembali digunakan! ACKs Lost Drained!! Ack32 … … 16 packet burst W=32 Retransmission Timeout Cut window in 1/2
  • 26. Self Clocking and Fast Retransmit / Fast Recovery  Ketika fast retransmit digunakan, paket di- retransmisi sebelum semua ACKs hilang sehingga slow start tidak diperlukan Lost … … Fast Retransmission W=32 Cut window in 1/2
  • 27. Versi TCP  TCP/Tahoe  TCP/Reno: banyak Operating System menerapkan TCP/Reno type congestion control  TCP/Vegas: not currently used
  • 28. TCP Tahoe  Dirancang oleh by Van Jacobson  Terdiri dari : basic TCP algorithms, AIMD, Slow Start, Fast Retransmit
  • 29. TCP Reno  Dirancang oleh Van Jacobson pada akhir 80-an  Masih bekerja dengan baik walaupun bandwidth Internet telah meningkat lebih dari 10.000 kali  Duplicate ACKs:  Fast retransmit  Fast recovery  Fast Recovery avoids slow start  Timeout:  Retransmit  Slow Start  TCP Reno improves upon TCP Tahoe when a single packet is dropped in a round-trip time.
  • 30. TCP Tahoe vs TCP Reno
  • 32. TCP Reno SS CA Fast retransmission/fast recovery
  • 33. TCP New Reno  Jika terjadi kehilangan beberapa paket, Reno has problems  Partial ACK:  Muncul bila beberapa paket hilang  Partial ACK hanya meng-acknowledge beberapa paket pada awal fast recovery Sender harus menunggu sampai timeout terjadi  New Reno:  Partial ACK does not take sender out of fast recovery  Partial ACK causes retransmission of the segment following the acknowledged segment  New Reno can deal with multiple lost segments without going to slow start
  • 34. SACK  SACK = Selective acknowledgment  Issue: Reno and New Reno retransmit at most 1 lost packet per round trip time  Selective acknowledgments: The receiver can acknowledge non-continuous blocks of data (SACK 0-1023, 1024-2047)  Multiple blocks can be sent in a single segment  TCP SACK:  Enters fast recovery upon 3 duplicate ACKs  Sender keeps track of SACKs and infers if segments are lost. Sender retransmits the next segment from the list of segments that are deemed lost.
  • 35. TCP Vegas  Menerapkan congestion avoidance