0% found this document useful (0 votes)
9 views6 pages

TCP Client Server Communication

The TCP/IP Protocol Suite is a collection of communication protocols essential for internet connectivity, structured into four layers: Application, Transport, Internet, and Network Access. It facilitates client-server communication, where clients request resources from servers, and employs protocols like TCP for reliable data transmission and UDP for faster, connectionless communication. Additionally, multiple access control protocols manage how devices share communication channels, with techniques like ALOHA and CSMA ensuring efficient data transmission while minimizing collisions.

Uploaded by

21020920-184
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

TCP Client Server Communication

The TCP/IP Protocol Suite is a collection of communication protocols essential for internet connectivity, structured into four layers: Application, Transport, Internet, and Network Access. It facilitates client-server communication, where clients request resources from servers, and employs protocols like TCP for reliable data transmission and UDP for faster, connectionless communication. Additionally, multiple access control protocols manage how devices share communication channels, with techniques like ALOHA and CSMA ensuring efficient data transmission while minimizing collisions.

Uploaded by

21020920-184
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

TCP/IP Protocol Suite

The TCP/IP Protocol Suite is a set of communication protocols used to


connect network devices on the internet. It is named after its two core
protocols: Transmission Control Protocol (TCP) and Internet
Protocol (IP).

The TCP/IP model has four layers, each responsible for specific tasks:

1. Application Layer

o Provides services directly to users or applications.

o Examples: HTTP (for web browsing), FTP (for file transfer),


SMTP (for email).

2. Transport Layer

o Provides end-to-end communication between devices.

o TCP ensures reliable, ordered delivery of data.

o UDP offers faster but unreliable communication.

3. Internet Layer

o Handles the logical addressing and routing of data.

o The IP protocol defines how devices are identified using IP


addresses and how data packets are routed.

4. Network Access Layer

o Deals with the physical transmission of data over the network.

o Includes protocols related to Ethernet, Wi-Fi, etc.

Protocol Layering

Protocol Layering means organizing network functions into separate


layers. Each layer performs a specific role and interacts only with the
layers directly above or below it.

Why use layering?

 Simplifies network design.

 Each layer can be developed independently.

 Promotes interoperability (the ability of computer systems or


software to exchange and make use of information.) among different
devices and technologies.
 Makes troubleshooting (Troubleshooting is a systematic process of
problem-solving, often used to identify and fix issues with products,
machines, or systems. It involves a logical, methodical approach to
locate the root cause of a problem and implement a solution) and
updating systems easier.

Example:
When you send an email:

 The Application Layer (SMTP) formats the email.

 The Transport Layer (TCP) breaks it into segments.

 The Internet Layer (IP) addresses and routes it.

 The Network Access Layer sends it over the physical medium (like
Wi-Fi).

Each layer adds its own header (control information) to the data before
passing it down to the next layer — this is called encapsulation.

Client-Server Communication

Client-Server Communication is a model where:

 A Client requests services or resources.

 A Server provides those services or resources.

How it works:

 The client initiates the communication by sending a request.

 The server processes the request and sends back a response.

This communication model is asymmetric: the client depends on the


server for services, and the server is usually available continuously to
respond.

Examples:

 A web browser (client) requesting a webpage from a web server


(server).

 An email app (client) retrieving emails from an email server.

Key Points:

 Communication usually happens over TCP/IP protocols.

 Servers are often powerful machines with high uptime.


 Clients are usually personal devices like laptops, phones, or PCs.

TCP (Transmission Control Protocol)

 Type: Connection-oriented protocol.

 Purpose: Ensures reliable communication between two devices.

 How it works:

o Before sending data, a connection is established between


sender and receiver (called a three-way handshake).

o Data is sent in order and checked for errors.

o If any data is lost or damaged, TCP retransmits it.

o It manages flow control to avoid overwhelming the receiver.

 Key Features:

o Reliable: Guarantees data delivery.

o Ordered: Data arrives in the same order it was sent.

o Error checking: Includes mechanisms like checksums and


acknowledgments (ACK).

o Slow compared to UDP because of all the extra checks and


retransmissions.

 Common Applications:

o Web browsing (HTTP/HTTPS)

o Email (SMTP, IMAP, POP3)

o File transfers (FTP)

UDP (User Datagram Protocol)

 Type: Connectionless protocol.

 Purpose: Allows fast transmission of data without guaranteeing


delivery.

 How it works:

o No need to establish a connection first.

o Data (called datagrams) is sent directly without checking if it


was received.
o No error correction, no retransmissions.

 Key Features:

o Unreliable: No guarantee of data delivery or order.

o Fast: Less overhead because there is no connection setup and


fewer checks.

o Lightweight: Suitable for applications where speed is more


important than reliability.

 Common Applications:

o Live video or audio streaming

o Online gaming

o Voice over IP (VoIP)

TCP = Telephone Call (both sides connect first, then talk reliably)
UDP = Postcard (you just send it; it may or may not arrive)

Multiple Access Control Protocols

Multiple Access Control Protocols are used in computer networks to


control how multiple devices share the same communication
channel.
They ensure that when many devices want to send data, they don't
interfere with each other (avoid collisions) and communicate efficiently.

These protocols can be broadly classified into:

 Random Access Protocols

 Controlled Access Protocols

 Channelization Protocols

We'll focus on Random Access Techniques here.

Random Access Techniques

In Random Access, any device can transmit at any time, without prior
coordination.
But because devices transmit freely, collisions (overlapping data) can
happen, so methods are needed to detect and handle them.

Main Random Access Protocols:

 ALOHA
 CSMA

 CSMA/CD

 CSMA/CA

ALOHA

ALOHA was developed at the University of Hawaii for wireless


communication.

There are two types:

1. Pure ALOHA

o Devices send data whenever they want.

o If two transmissions overlap, a collision happens, and the


sender waits a random amount of time before trying again.

o Efficiency is low because chances of collision are high.

2. Slotted ALOHA

o Time is divided into slots.

o Devices must send data at the beginning of a time slot.

o Reduces collisions compared to pure ALOHA.

o Efficiency is better than pure ALOHA.

Summary:

 Pure ALOHA: Send anytime → Higher collision chances.

 Slotted ALOHA: Send at time slots → Lower collision chances.

CSMA (Carrier Sense Multiple Access)

Carrier Sense Multiple Access is smarter than ALOHA.

Before sending data:

 A device listens to (senses) the channel.

 If the channel is idle, it sends.

 If the channel is busy, it waits.

Types of CSMA:
 1-persistent CSMA: Continuously senses and sends as soon as
idle.

 Non-persistent CSMA: Waits random time after sensing busy


channel.

 p-persistent CSMA: Sends with probability p after sensing idle.

CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

Used in traditional Ethernet (wired LANs).

Steps:

1. Sense the channel.

2. If idle, start sending data.

3. If a collision happens (two devices sent at once), the devices:

o Stop transmitting immediately.

o Send a jamming signal to inform others about collision.

o Wait random time before trying again (this is called


backoff).

Main idea: Detect collision during transmission and react quickly.

CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance)

Used in Wi-Fi (Wireless LANs) because detecting collisions is hard in


wireless.

Steps:

1. Sense the channel.

2. If idle, wait for a short time (Inter-Frame Space - IFS).

3. Send a small control message (Request to Send - RTS).

4. Receiver replies with Clear to Send - CTS if channel is free.

5. Then the sender transmits data.

Main idea: Avoid collisions before sending large data by using small
control messages.

You might also like