
Master TCP from three-way handshake to windowing with in-depth coverage of connection-oriented services, state transitions, flow and congestion control, timers, and advanced features like selective acknowledgment and fast recovery.
Explore how tcp/ip stack layers function together, from physical layer handling electrical signals to link, network, transport, and application layers with protocols like ip, ipv6, tcp, udp, http, and ethernet.
Explain how reliable delivery uses automatic repeat request, with sender and receiver cooperating to retransmit lost packets and deliver data in order over lossy networks.
Let us See what TCP brings to the table as compared to other protocols in TCP/IP Stack
Trace how application data becomes TCP segments with a TCP header, travels through the IP layer as IP datagrams, and is delivered using sequence numbers while avoiding fragmentation.
Explore tcp connection management from first principles, including the finite state machine, the three-way handshake, initial sequence number synchronization, and graceful connection termination for bidirectional data exchange.
Explain how tcp connection closing works: the client sends a fin, the server replies with an ack and fin, then the client sends a final ack to complete four segments.
Learn the TCP sequence number consumption rules for syn, fin, and ack segments, and how application data affects how many sequence numbers are consumed.
Explain how a TCP connection experiences timeout when a server is down, using exponential backoff to double syn retransmission intervals up to five retries.
Explore the retransmission ambiguity problem in TCP, where delayed or lost acks create indistinguishable ack values, producing two possible RTT calculations and false retransmissions; introduce Khan's algorithm as the solution.
Apply Karn's algorithm by ignoring RTT for retransmitted segments in R2 evaluation. Back off retransmission timers with exponential backoff, doubling after each retransmission and resetting only after a successful transmission.
Karn's algorithm illustrates how a TCP sender and receiver manage a retransmission timer R2, backoffs, and reset after a fresh segment is delivered.
Master class introduces fast retransmission, reduces underutilization by using receiver feedback to detect losses rather than waiting for the retransmission timer, with the end goal of retransmitting the lost segment.
Explains how the TCP receiver handles out-of-order segments, fills holes in its circular buffer, and uses acknowledgement number 201 to trigger retransmission of the missing segment after three acks.
Master how the tcp receiver repairs holes in its receiving buffer using duplicate acks and fast retransmission, and learn how selective acks enable fixing multiple holes in one shot.
Explore selective acknowledgements (SAC) that allow a TCP receiver to repair multiple holes in its buffer in one RTT by conveying hole ranges in the TCP header.
Explore cumulative acknowledgment, where the TCP receiver acknowledges multiple data segments with one acknowledgment number to improve efficiency in shipping application data. Understand how delayed acks cut header overhead.
Illustrates how tcp receiver uses delayed ack and cumulative ack to acknowledge multiple received segments, and how piggybacking a data segment with an ack avoids pure acks.
Master the TCP sliding window mechanism to ensure reliable data delivery, congestion and flow control, and synchronized duplex communication through send and receive windows.
Explore the TCP send and receive layout within a sliding window protocol, detailing four send window categories, three receive window categories, and definitions of window size and usable window size.
Explain how TCP sender and receiver exchange their receiving window sizes during a three-way handshake, initially advertising the maximum 65,535 and later adjusting independently.
describes phase one of a tcp window management demonstration, showing client and server send and receive windows sliding after data and ack exchanges.
A slow TCP receiver causes network congestion when a fast sender overwhelms it, and window size reduction slows the sender to prevent drops.
Analyze the silly window syndrome, how tiny data segments cause network underutilization, and how sender and receiver behaviors—with Nagel algorithm for the sender and avoidance rules for the receiver—address it.
Demonstrates how silly window syndrome avoidance prevents declaring tiny receive windows in TCP communication. Illustrates a sender-receiver scenario with acknowledgments, window opening, and maximum segment size constraints.
Learn how TCP relies on sender-side congestion control without explicit network signals, and explore the three parts: detect congestion, slow the sending rate, and cautiously increase it as congestion eases.
Explain how TCP congestion window constrains the sender's data to the minimum of the congestion window and the receiver's advertised window, and how it adapts with network capacity.
Explore slow start, doubling the congestion window on each good ack, defined as the largest ack seen so far. An almost infinite advertised window lets growth continue until loss.
Learn how Using ssthrash Variable, TCP decides to switch from Slow-start to Congestion Avoidance, and from Congestion Avoidance back to slow-start
This lecture introduces fast recovery in TCP, showing how loss detected by three duplicate acks avoids resetting the congestion window, unlike retransmission timeout that triggers slow start and underutilization.
Trigger fast recovery when three duplicate acks arrive, halve the congestion window rather than resetting to one, and resume in congestion avoidance to avoid starting from scratch.
This lecture shows how TCP updates cwnd and thresh during fast recovery after three duplicate acks, including an example where cwnd drops to eight and thresh to five.
This is Master Class course on TCP/IP protocol - Transmission Control Protocol. Since it is Master Class course, this course discusses the internal design and functioning of complex transport layer protocol - TCP.
Almost all traffic on internet today is transported by TCP protocol. TCP, as where it stands today, mature and solid, is the result of over 25 yrs of research by network gurus. TCP is complicated and difficult to understand, therefore i have paid utmost attention to present the concept in most simplest way as possible without any loss of information.
In this course, we unwrap internals of TCP and try to understand how it works and why it is so designed. So, be ready and place yourself in first gear !
TCP is difficult to understand and confusing if not done in the right way. In this course, I shall be covering all aspects of TCP internal functioning STEP BY STEP with beautiful diagrams, Assignments, Questions and exercises. At no point you shall be left with doubts is my promise. There is no programming in this course.
This is a little Advanced Course, if you are absolute beginner in networking, I would recommend you to first enroll in my other course "Networking course - Network Concepts and Programming from Scratch" and cover important sections on L2 routing, L3 routing, and Transport Layer at-least before jumping into this course. If you are already familiar with this much networking basics, then you are all set to sail through this course.
Table Of Contents:
Section 1 : Basics
1. Agenda of the course
2. General overview of OSI model and TCP/IP stack
3. TCP IP Stack layer functions
4. Transport Layer Goals
5. User Datagram Protocol (UDP)
6. Transmission Control Protocol (TCP)
7. UDP Vs TCP
8. Summary
Section 2 : TCP Preliminaries
1. TCP Vs Other Protocols
2. TCP ARQ Challanges
3. TCP Byte Circular Buffers
4. Segments and Sequence Numbers
5. TCP Segments Type
6. TCP Reliable Delivery
7. TCP Retransmission Timer Illustration
8. TCP together with IP Protocol
9. Summary
From here on we shall dive deep into specifics of TCP
Section 3 : TCP Connection Management
1. Who is Client and Who is Server ?
2. TCP - 4-tuples
3. TCP Connection Open - 3-way handshake Explained
4. TCP Connection Closing - 4-way handshake
5. Sequence Numbers Consumption Rules
6. TCP Connection Timeout and Exponential Backoff
Section 4 : TCP Timeout and Retransmission
1. TCP Retransmission
2. TCP RTO Problems if computed Wrongly
3. Expectations from TCP when Segment loss occurs
4. TCP Exponential backoff - When consecutive segment loss occurs
5. TCP RTO Value Estimation
6. TCP Retransmission Ambiguity Problem
7. Karn's Algorithm
8. Karn's Algorithm Illustration
9. Karns Algorithm Analysis
9. Concept of Fast Retransmission
10. TCP handling out of order segments
11. TCP holes Problem and its remedy
12. Redundant Retransmission due to dupACK
13. Fast Re-transmission Vs Timer based Re-transmissions
14. Selective Acknowledgement (SACKs)
15. SACKs Example
16. Cumulative Acknowledgement
Section 5 : TCP Data flow and Window Management
1. TCP Send and Recv Windows
2. TCP Send and Recv Window Layout
3. TCP Flow control
4. TCP Window Advertisement
5. Sliding Window Rules
6. Window Management Example
7. Data Accumulation - TCP Nagle Algorithm
9. TCP Window Size Resizing
10. TCP Zero Window
11. TCP Probe Segments
12. Problem of Silly Window Syndrome (SWS)
13. Silly Window Syndrome Solution (SWS - Solution)
14. SWS - Complete Example
Section 6 : TCP Congestion Control Procedures
1. TCP - Congestion Control Procedures
2. TCP - CCP Goals
3. TCP - 3 Parts of CCP
4. Introducing Congestion Window
5. Congestion Control Algorithms
a. Slow Start
b. Congestion Avoidance
6. Slow Start Algorithm
7. Slow Start Algorithm in Action
8. Slow Start Algorithm Summary and SSthrash
9. Congestion Avoidance Algorithm With Example
10. Congestion Control Algorithm Selection and Switching
11. Typical TCP Graph
12. Concept of Fast Recovery
13. Algorithm Selection Flowchart
Good Luck ! Hope you Enjoy the course.