Hello, everyone and welcome.
Today we are going to learn about what is TCP. And
what is UDP?
So first, we will discuss about versus what is
TCP and then we'll discuss about what is UDP.
After that, we are going to see the difference between TCP
and UDP.
And then we will do the packet breakdown of TCP and
UDP to understand.
What does a packet of TCP contain and what does
a packet of UDP contain?
And then lastly we are going to discuss about TCB 3-way
handshake.
Yeah, so let's start with TCP.
TCP stands for transmission control protocol
generally TCP is connection oriented protocol,
which means it makes a
connection with the
client and server
TCP gives acknowledgment to the client as
well as the server because of this extra function
of giving acknowledgment. It becomes
slower compared to UDP.
The example of a TCP communication is email communication
in which the client and the
sender both acknowledges each other of
successful transmission and receiving
of packets.
So, let's see. What is UDP.
UDP stands for user datagram protocol
it is a connection less protocol.
It doesn't give any acknowledgment.
Because of this specific reason it
is faster than compared to TCP.
The example of UDP is video conferencing or view
IP calls.
So through this difference, we understand that UDP
is used in those types of
applications wherein speed is considered
as one of the primary reason.
So whenever you try to watch.
Live matches or anything that is
live streaming.
Sometimes you may
see that there is some type of glitch which
is coming on into your video feed.
This is because there is no proper acknowledgment while
transferring the live video feed.
this happens because
the important thing is that you are able
to see the Live Match onto your
screen without delays.
You do not want any type of delays. Thus there
occurs some type of glitch or
noise.
Which is generally because of no acknowledgment that
how it is been seen onto your screen.
Perfect.
So, let's see the packet of TCP handshake
and UDP handshake.
As you can see on the left hand side. It is a TCP handshake.
In which the sender sends the
first request that is the send request which stands
for synchronization.
The receiver then acknowledges the sync request
with synac.
Then the center acknowledges that it
has received the acknowledgment and the syn packet
from the receiver.
So this is how a TCP handshake works?
Seeing onto the right side of the screen you can
see there is a UDP packet.
Handshake which has been performed.
in which
the sender sends a request and the
receiver gets the response similarly
again response response response is
being sent which means the sender is
only sending the response to the receiver and receiver is
receiving it there is no type of acknowledgment. It's
been happening over here.
That's why we call this as connection less
protocol.
So let's move on to the TCP UDP
packet breakdown.
So as you can see.
This is the TCP segment header format and
at the bottom it is the UDP datagram header
format.
What are the things in common is the source Port
is available into the TCP packet? So
sport is also available in into the
UDP packet.
Destination Port is present in TCP as
well as UDP packet both header and data
checksum is present between both the packets.
so
there are
three total
similarities between both the packets, but as
you can see into the TCP
Packet there are more number of things like sequence
number.
Acknowledge acknowledgment number which is basically used for
sending acknowledgments.
urgent pointer
Flags options
Data offset Etc, which makes
the size of the packet bigger.
So, let's see the TCP 3-way handshake.
On the left hand side. It is the client and the
right hand side. It is the server. So the client first
sends a synchronization request to
the server.
Because the client wants to get connected to
the server and start the communication.
So the server will be like, okay, you
want to start the communication with me?
Take the acknowledgment from me.
So the server has acknowledged the client by
sending acknowledgment.
Packet now the client sends the
synchronization and acknowledgment to the
server that the client is ready to.
Communicate with the server and finally the server
establishes a connection between both.
So this is how a TCP three-way handshake is
performed.
Thank you.