Three-way handshake in TCP

len Alfred Ajibola - 18th October, 2021 @ 09:20 AM

Topics in ICT

Functions of the network layer of the OSI model Network layer of the OSI model Transport layer of the OSI model and its characteristics Session layer of the OSI model: Functions of session layer What is presentation layer of the OSI model? Functions of presentation layer Application layer of the OSI model and its functions Three-way handshake in TCP Stateless connection in UDP explained with examples Transport Layer: Functions of layer 4 in networking Transport layer: Layer 4 of the OSI model

Academic Questions in ICT

Please check out our Questions and Answers here

What is the first step towards disabling automatic image download on WhatsApp?

  • A. Click on the three dots on the top right hand corner

  • B. Click on the WhatsApp logo

  • C. Click on the settings icon on the top right corner

  • D. Click on the settings icon located on the to top-center of the app

  • E. Click directly on the storage and data icon located on the top right corner

  • F. Click on the mobile data usage icon located on the top right corner

The followings are ways to conserve data on android phones except _____.

  • A. Turning on data saving mode

  • B. Activating background apps

  • C. Use of Wi-Fi to update apps

  • D. Disable automatic image download on WhatsApp

  • E. Watch low resolution videos on youtube

  • F. Utilizing a reputable data saving app on google playstore

Twitter was launched in _____.

  • A. 2003

  • B. 2004

  • C. 2005

  • D. 2006

  • E. 2007

  • F. 2008

The Transmission Control Protocol (TCP) is responsible for connection oriented communication between two devices.

In a connection oriented protocol, There is an initial three-way handshake between both computers before the communication (data transfer) proceeds.

For now, think of a 'three-way handshake' as an agreement or negotiation of the communication parameters between two or more computers before information or data exchange can proceed.

The three-way handshake may simply be referred to as handshaking or connection establishment or connection set up.

Importantly, sequence numbers, acknowledgement numbers and flow control are all associated with the TCP’s connection oriented communication. It is shown in the image below:

Three-way handshake - Lenacad

Please read an introduction to the transport layer of the OSI model here.


In order to accomplish the three-way handshake between two computers (client and server respectively), a port connection between the server and client must first be established. This implies that the target server must always have its TCP ports open. If this is the case, the client node sends a data segment called the Synchronization Sequence Number (SYN) over a network to an appropriate server. Understand that the server may be located on the same network or over the internet.

Regardless the location of the server, understand that the server is always listening and anticipating a connection on its open TCP ports while a client computer initiates such connection by sending a SYN segment.


If we were to look inside this SYN segment, it would be discovered that it is only a random sequence number that the client intends to use for initiating a communication: (for instance, A). The only aim of this first SYN segment sent is to check or ask or infer or know if the server is open for new connections. If the server replies to this SYN segment from the client, then it's open for connection, otherwise, it's closed.

Please read the functions of transport layer (layer 4) here.

Assuming the server is open, it will receive the SYN segment from the client node. Immediately, it responds to the client's message (SYN) by sending a confirmation receipt. This confirmation by the server to the client's SYN segment is termed the Acknowledgement Sequence Number (ACK) or SYN/ACK.


The SYN/ACK segments includes two sequence numbers. These are:

  1. ACK: This is the first packet sent by the server in acknowledgement to the client's connection. The ACK is set by the server to a value of one more than the SYN number it initially received from the client; that is, 'A+1'.

  2. SYN: This is the second segment sent by the server to the client. The aim of this segment is to check or confirm whether the client's port is open towards a communication set-up. Understand that the value in this SYN segment is set to a random sequence number: (let's say Z in this instance).


After the client node receives the SYN/ACK segments from the server, it immediately responds with an acknowledgement (ACK) to the server. The client's ACK contains the sequence number in the server's SYN segment plus one; that is 'Z+1'.

Note that both computers (client and server) must acknowledge the sequence (SYN) segments received from each other by incrementing it by one.

Upon completion of the above process, that is, three-way handshake or handshaking, the connection is set up and the client and server can now communicate, while also tracking the sent segments with SYN and acknowledge ACK numbers respectively. This is the concept of the three-way handshake and it ensures that dropped or broken segments are resent appropriately via a process termed error detection and correction.

You can read an stateless (connectionless) communication in UDP here.


Understand that these steps in handshaking whereby SYN and ACK segments are sent and received is necessary to correctly verify the serial numbers originated by both sides, thus guaranteeing the connection's correctness.

The Protocol Data Unit (PDU) at the transport layer are called segments.

Kindly share this article via the links below:


Alfred Ajibola is a Medical Biochemist, a passionate Academician with over 7 years of experience, a Versatile Writer, a Web Developer, a Cisco Certified Network Associate and a Cisco CyberOps Associate.

Amazing facts in ICT

YouTube is a video-sharing platform which commenced operations on February 14, 2005 (Valentine's day). Three former PayPal employees -> Chad Hurley, Steve Chen and Jawed Karim created the YouTube service (as a dating app) until Google bought it in November 2006 for US$1.65 billion

Smoking near a Mac device - Len Academy

Smoking near an Apple (Mac) computer voids the warranty.

When you add /4 to the end of Facebook's URL, it will take you to Mark Zuckerberg.

You can try it on you own; or better still, try the link below:

Apple iPad retina - Len Academy

Apple iPad retina display is actually manufactured by Samsung


Computer hardware is the collection of physical parts of a computer system.

Physical parts of a computer are those parts that you can see and touch. It may also be referred to as the 'equipment of the computer'.

When the computer case is opened (with a screwdriver), one would see the different hardware components inside of it. It's important to state that some other hardware components are present outside the computer case; and these are termed peripherals.

Below are hardware components seen inside the computer case:

  • Motherboard

  • Central Processing Unit (CPU)

  • Graphics Processing Unit (GPU)

  • Power supply Unit (PSU)

  • Northbridge

  • Southbridge

  • Peripheral Component Interconnect (PCI) slots

  • Network Interface Card (NIC)

  • Random Access Memory (RAM)

  • Ventilation fans

  • Heat sink

  • Hard Disc Drive (external present)
  • Solid State Drive (SSD)

  • CMOS battery

  • Optical Disc Drives (external present)

  • USB port, PS2 port, Ethernet port and other ports

  • Expansion Ports / Slots

Please read more on computer hardware here

Hardware components seen outside the computer case are called peripherals. The peripherals are grouped into the following:

  1. Input devices: They provide information to the computer.

  2. Output devices: Brings out information from the computer.

  3. Storage devices: They store information or data.

Below are examples of some peripherals:

  • Keyboard (input)

  • Monitor (output)

  • Mouse (input)

  • Webcam (input)

  • Touch Pad (input)

  • Universal Serial Bus (USB) flash drive or memory card (storage)

  • Hard disc drive (storage)

  • Stylus (input)

  • Joystick(input)

  • Printer (output)

  • Speaker (output)

  • Headphones (output)