Computer Network Tutorial

Introduction of Computer Network Types of Computer Network Network Topology Computer Networking Architecture Transmission Modes (Data Flow) Basic Networking Devices Integrate Services Digital Network (ISDN)


OSI Model TCP/IP Model

Physical Layer

Digital Transmission Analog Transmission Transmission Media Switching

Data Link Layer

Error detection and Error correction Data Link Control Multiple Access Aloha

Network Layer

Network Layer - Logical Address Address Mapping Unicast Routing Protocol

Transport Layer

Process to Process Delivery User Datagram Protocol Transmission Control Protocol Stream Control Transmission Protocol Session Layer and Presentation Layer

Application Layer

Domain Name System Application Protocol E-mail Cryptography


Classes of Routing Protocols Classification of Routing Algorithms Controlled Access Protocols in Computer Networks Differences between IPv4 and IPv6 Fixed and Flooding Routing Algorithms Advantages and Disadvantages of Fibre Optics Cable APIPA Difference between Active and Passive FTP Fiber Optics and its Types Method of Joining and Fusion of Fiber Optic Cable Define Framing in Computer Network Disadvantages of Computer Network Mesh Topology Diagram in Computer Network Ring Topology in Computer Network Star Topology in Computer Networks 4G Mobile Communication Technology Advantages and Disadvantages of LAN Advantages and Disadvantages of MAN Advantages and Disadvantages of WAN Application Layer in OSI Model Cyclic Redundancy Check Example Data link layer in OSI model Difference between Transport and Network Layer Hamming Code Example Network Layer in OSI Model Session Layer in OSI Model Transport Layer in OSI Model Two Port Network in Computer Networks Uses of Computer Networks What is Computer Network What is Framing in a Computer Network Advantages and Disadvantages of Bus Topology Difference between Star Topology and Bus Topology Subnetting in Computer Network Subnetting Questions and Answers What is Bus Topology What is Network Topology and Types in Computer Networks Access Control in Networking Basic Characteristics of Computer Network Benefits of SOCKS5 Proxy in Computer Networks Computer Network viva Questions Difference between BOOTP and RARP Difference Between Network Topologies and Network Protocols Difference between NFC and RFID Difference Between Point-to-Point Link and star Topology Network Differences Between MSS and MTU Differences Between Trunk Port and Access Port Different Modes of Communication in Computer Networks MIME Protocol in Computer Networks Modes of Communication in Computer Networks Network Attack in Computer Network Port Address in Networking Simplest Protocol in Computer Network Sliding Window Protocol in Computer Network Stop And Wait Protocol in Computer Networks TCP 3-Way Handshake Process in Computer Networks What is a Proxy Server What is APPN What is ICMP Protocol What is Point-to-Point Protocol What is Port Address in Networking What is the HDLC Protocol What is VRRP Protocol Difference Between Analog and Digital Signals Difference Between Hub and Repeater Difference between Repeater and Switch Difference Between Transparent Bridge and Source Routing Bridge Source Routing Bridge in Computer Networks Transparent Bridge in Computer Networks Transport Protocol in Computer Networks Types of CSMA in Computer Networks What is Wired and Wireless Networking Network Security in Computer Network Disadvantages of Extranet Difference Between TELNET and FTP Define Protocol in Computer Networks Guided Transmission Media in Computer Network What is a Gateway in a Computer Network IGMP in Computer Networks LAN Protocols in Computer Networks MAN Meaning in Computer Modulation Techniques in Computer Networks Switching in DCN TCP/IP Applications What is IGMP? What is Modem in Networking What is Non-Persistent CSMA Difference between Cell Splitting and Cell Sectoring Forouzen Computer Network Open Loop and Closed Loop Congestion Control Types of Cluster Computing WAP-Wireless Access Point What are the elements of the Transport Protocol Difference between Gateway and Switch Flow Control in Data Link Layer Body Area Network Flooding in Computer Network Token Ring in Computer Networks VoIP in Computer Networks What is Infrared Transmission Congestion Control Techniques Forward Error Correction (FEC) Switching Techniques What is Telnet in Computer Network What are the Types of IPv4 Addresses IEEE 802.6 (DQDB) IEEE 802.15.4 Technology What is HDLC (High-level Data Link Control)? What is SMS Hubbing in Telecom? Circuit Switching in Computer Networks Communication Satellites in Computer Networks Features of HTTP Protocol IMAP4 (Internet Message Access Protocol) Internet Services How to Set up a Wireless Router Internetwork Routing in Computer Networks Distributed Computing System Features of GSM The 802.11 MAC Sublayer Protocol What is IEEE 802.3? What are Hubs and Switches in Computer Networks? What is Modem in a Computer Network? What is multicasting in Computer Networks? GSM -The Mobile Station What is Network Server? Slotted Aloha in Computer Network What is Ethernet in Computer Networks What is Arpanet?

TCP 3-Way Handshake Process in Computer Networks

What is TCP 3-Way Handshake Process?

TCP (Transmission Control Protocol) is a widely used protocol for reliable data transfer over the internet. The TCP 3-Way handshake is the process by which a TCP connection is established between two devices, such as a client and a server.

The 3-way handshake involves three steps:

  • SYN (Synchronize): In this step, the client sends a SYN packet to the server to initiate the connection request.
  • SYN-ACK (Synchronize-Acknowledge): in this step, the server responds with a SYN-ACK packet, indicating that it is willing to establish a connection with the client.
  • ACK (Acknowledge): In this step, the client sends an ACK packet to the server, confirming that it received the SYN-ACK packet and is ready to start exchanging data.

Key Features of TCP 3-Way handshake

  • The TCP 3-Way handshake process ensures that both devices are ready to communicate and that the connection is reliable. Once the connection is established, the devices can start sending and receiving data packets.
  • The TCP 3-Way handshake is a fundamental component of TCP and is critical to the reliable transfer of data over the internet.
  • The TCP 3-Way handshake is necessary because it allows both devices to synchronize their sequence numbers, which are used to keep track of the packets being sent and received. The SYN packet contains a randomly generated sequence number, which the server uses to generate its own sequence number and send it back in the SYN-ACK packet. The client then confirms that it has received the SYN-ACK packet and sends an ACK packet with an incremented sequence number.
  • In addition to synchronizing sequence numbers, the 3-way handshake also establishes other parameters, such as the window size, which determines the amount of data that can be sent at once, and the maximum segment size (MSS), which sets the maximum size of each packet.
  • The TCP 3-Way handshake can be vulnerable to certain types of attacks, such as SYN flooding, where an attacker sends a large number of SYN packets to overwhelm the server and prevent legitimate connections from being established. To mitigate this type of attack, TCP includes a mechanism called SYN cookies, which generates a special SYN-ACK packet that includes encoded information about the client's SYN packet, rather than storing this information in a connection queue on the server.

TCP 3-Way Handshake: Troubleshooting and Analysis

While the TCP 3-Way handshake is designed to establish a reliable connection, it is not immune to issues that can arise during the connection process. In this section, we will explore some common issues that can occur during the 3-Way handshake and how to troubleshoot them.

  • Connection Refused: If the server sends a RST (reset) packet instead of a SYN-ACK packet in response to the client's SYN packet, it indicates that the server is not willing to establish a connection. This can occur if the server is overloaded, misconfigured, or has a firewall blocking incoming connections.
  • SYN Timeout: If the client sends a SYN packet but does not receive a response from the server within a certain time frame, it may cause of time out and retry the connection. This can occur if there is network congestion, packet loss, or a misconfigured firewall.
  • SYN-ACK Timeout: If the client receives a SYN-ACK packet from the server but does not send an ACK packet within a certain time frame, the server may assume that the connection has failed and terminate it. This can occur if the ACK packet is lost, the client is overloaded, or the server is misconfigured.

To troubleshoot these issues, network administrators can use various network analysis tools, such as Wireshark or tcpdump, to capture and analyze network traffic during the 3-Way handshake. These tools can help identify the source of the problem, such as a misconfigured firewall or a network bottleneck, and allow for more targeted troubleshooting.

In addition to troubleshooting, network analysis tools can also be used to optimize the performance of the TCP 3-Way handshake. For example, by analyzing the round-trip time (RTT) of packets during the handshake, administrators can adjust the TCP window size or other parameters to improve the efficiency of the connection.

TCP 3-Way Handshake: Security Considerations

While the TCP 3-Way handshake is a critical component of establishing a reliable connection, it can also be vulnerable to various security threats. In this section, we will explore some of the security considerations related to the 3-Way handshake and how to mitigate them.

  • Spoofing: Spoofing is a type of attack where an attacker sends packets with a fake source IP address, making it appear as though they are coming from a legitimate device. This can be used to bypass firewalls or gain unauthorized access to a network. To mitigate this risk, network administrators can use tools such as intrusion detection systems (IDS) or packet filtering to identify and block spoofed packets.
  • Man-in-the-Middle (MitM) attacks: MitM attacks occur when an attacker intercepts and alters network traffic between two devices. In the context of the 3-Way handshake, an attacker could intercept the SYN or SYN-ACK packets and manipulate them to establish a connection with a victim device. To prevent MitM attacks, network administrators can use encryption protocols such as SSL/TLS to secure the connection and ensure that packets cannot be tampered with.
  • Denial-of-Service (DoS) attacks: DoS attacks are designed to overwhelm a network or server with a flood of packets, causing it to become unavailable to legitimate users. In the context of the 3-Way handshake, attackers can use SYN flooding attacks to send a large number of SYN packets to a server, causing it to become overloaded and unable to respond to legitimate connection requests. To mitigate this risk, network administrators can use tools such as SYN cookies or rate limiting to limit the number of incoming connection requests.

In addition to these threats, network administrators should also ensure that their devices are patched and up-to-date with the latest security updates, and that they have strong password policies and access controls in place to prevent unauthorized access.


In conclusion, the TCP 3-Way handshake is a critical component of establishing a reliable and secure connection between two devices. By understanding and mitigating common security threats, network administrators can ensure that their networks are protected against malicious attacks and provide a safe and reliable user experience.