ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalCC-313Connection Establishme…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    CC-313

    Computer Networks

    Progress0 / 24 done
    Topics24
    1Introduction and Protocols Architecture2Basic Concepts of Networking3Network Topologies4Layered Architecture5Physical Layer Functionality6Data Link Layer Functionality7Multiple Access Techniques8Circuit Switching and Packet Switching9LAN Technologies10Wireless Networks11MAC Addressing12Networking Devices13Network Layer Protocols14IPv4 and IPv615IP Addressing16Sub Netting17CIDR18Routing Protocols19Transport Layer Protocols20Ports and Sockets21Connection Establishment22Flow and Congestion Control23Application Layer Protocols24Latest Trends in Computer Networks
    3 min read
    Topic 21 of 24
    Topic Study Note Illustration
    21

    Connection Establishment

    Connection establishment is a crucial process in networking, particularly for connection-oriented protocols like TCP (Transmission Control Protocol). This process ensures that a reliable communication channel is established...

    Connection establishment is a crucial process in networking, particularly for connection-oriented protocols like TCP (Transmission Control Protocol). This process ensures that a reliable communication channel is established between two devices (hosts) before any data is transmitted. Here’s an overview of how connection establishment works, focusing on TCP, including the key steps and concepts involved.

    TCP Connection Establishment

    The Three-Way Handshake

    Handshake (computing)
    Visual ReferenceHandshake (Computing)
    Wikipedia

    TCP uses a method called the three-way handshake to establish a connection. This process involves three main steps:

    1. SYN (Synchronize):

      • The client sends a SYN packet to the server to initiate a connection. This packet includes:
        • The client’s initial sequence number, which is used for tracking data segments.
      • Purpose: To signal the server that the client wants to establish a connection.
    2. SYN-ACK (Synchronize-Acknowledge):

      • The server responds with a SYN-ACK packet. This packet includes:
        • The server’s own initial sequence number.
        • An acknowledgment of the client’s SYN (the server acknowledges the received SYN by incrementing the client’s sequence number by 1).
      • Purpose: To confirm receipt of the client's request and to indicate that the server is ready to establish a connection.
    3. ACK (Acknowledge):

      • The client sends an ACK packet back to the server, acknowledging the server’s SYN-ACK.
      • This packet increments the server's sequence number by 1.
      • Purpose: To confirm that the client received the server’s response and complete the connection establishment.

    Diagram of the Three-Way Handshake

    Client                      Server
       |  SYN (Seq = x)         |
       | ----------------------> |
       |                         |
       |  SYN-ACK (Seq = y, Ack = x+1) |
       | <---------------------- |
       |                         |
       |  ACK (Seq = x+1, Ack = y+1) |
       | ----------------------> |
    

    Key Concepts

    • Sequence Numbers: These numbers are used by TCP to ensure data is delivered in the correct order and to manage the flow of data. Each byte of data is assigned a sequence number, allowing the receiver to reorder segments as necessary.

    • Acknowledgments (ACKs): TCP uses acknowledgments to confirm the successful receipt of data. If the sender does not receive an ACK within a certain time frame, it assumes the data was lost and retransmits it.

    • Reliability: The three-way handshake ensures that both the client and server are ready to communicate, providing a reliable connection before data transmission begins.

    Importance of Connection Establishment

    1. Reliability: Ensures that both ends are synchronized and prepared for data transfer, which is critical for applications that require guaranteed delivery (like web browsing and file transfers).

    2. Flow Control: Allows for the negotiation of parameters such as window size, which helps manage the flow of data and prevents network congestion.

    3. Error Handling: The establishment phase helps in setting up mechanisms for error detection and correction throughout the session.

    Conclusion

    Connection establishment through the three-way handshake is a fundamental aspect of TCP, ensuring reliable and ordered delivery of data between devices. Understanding this process is essential for anyone involved in networking, application development, or troubleshooting network issues. If you have more questions or would like to explore related topics, feel free to ask!

    ← Previous topic 20
    Ports and Sockets
    Next topic 22 →
    Flow and Congestion Control

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    3mremaining
    506words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Computer Networks