0% found this document useful (0 votes)
18 views13 pages

Lec-67 TCP Data Transfer Piggybacking & Pure Acknowledgement - en

The video explains TCP data transfer following the establishment of a connection through the 3-way handshaking method. It covers key concepts such as duplex communication, resource reservation, and the importance of sequence and acknowledgment numbers in data transfer. Additionally, it discusses the method of piggybacking for sending acknowledgments alongside data.

Uploaded by

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

Lec-67 TCP Data Transfer Piggybacking & Pure Acknowledgement - en

The video explains TCP data transfer following the establishment of a connection through the 3-way handshaking method. It covers key concepts such as duplex communication, resource reservation, and the importance of sequence and acknowledgment numbers in data transfer. Additionally, it discusses the method of piggybacking for sending acknowledgments alongside data.

Uploaded by

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

WEBVTT

Kind: captions
Language: en

00:00:07.404 --> 00:00:08.374


Hello friends !

00:00:08.414 --> 00:00:10.081


I welcome you in Gate Smashers

00:00:10.121 --> 00:00:13.119


In this video , I'm going to explain TCP data transfer

00:00:13.159 --> 00:00:17.159


I have explained in the last video, the TCP connection establishment

00:00:17.289 --> 00:00:19.998


in which we have discussed a very important term

00:00:20.038 --> 00:00:21.590


3-way handshaking

00:00:21.630 --> 00:00:23.492


So, the 3-way handshaking method is very important

00:00:23.532 --> 00:00:27.532


For your university exam and even your competitive exam.

00:00:28.005 --> 00:00:30.488


So, through that method

00:00:30.528 --> 00:00:34.274


Client and Server establish a connection

00:00:34.314 --> 00:00:37.151


through 3-way handshaking theorem

00:00:37.191 --> 00:00:40.539


After establishment of connection,

00:00:40.579 --> 00:00:42.954


we have to do Data Transfer

00:00:42.994 --> 00:00:45.708


How a TCP do data transfer ?

00:00:45.748 --> 00:00:47.601


What are the important point in this?

00:00:47.641 --> 00:00:49.980


I am going to explain it in this video

00:00:50.020 --> 00:00:53.400


Which will be very beneficial for your

00:00:53.424 --> 00:00:55.728


competitive exams and for your college or university level exams.

00:00:55.768 --> 00:00:57.457


So please guys like this video fast

00:00:57.497 --> 00:01:00.177


If you haven't subscribed to channel please subscribe to it and

00:01:00.217 --> 00:01:03.539


press the bell button to get all the notifications

00:01:03.579 --> 00:01:04.801


So let's start!

00:01:04.841 --> 00:01:06.102


Data Transfer

00:01:06.142 --> 00:01:08.792


Before data transfer I have to tell you that

00:01:08.800 --> 00:01:10.644


When TCP establish a connection

00:01:10.684 --> 00:01:12.476


so what happens through it is

00:01:12.516 --> 00:01:16.516


both client and server reserves their resources

00:01:16.556 --> 00:01:19.715


What is meant by reserving the resources?

00:01:19.755 --> 00:01:23.378


Is that they have already established their buffers.

00:01:23.418 --> 00:01:25.892


Means it has kept its buffer, and other kept its

00:01:25.932 --> 00:01:30.790


the bandwidth, they have reserved their resources

00:01:30.830 --> 00:01:36.650


They are waiting for the data to come to them

00:01:36.690 --> 00:01:40.178


The first important point of TCP data transfer is

00:01:40.218 --> 00:01:42.094


It is a Duplex Mode

00:01:42.134 --> 00:01:43.270


What is meant by duplex?

00:01:43.310 --> 00:01:46.094


is that data transfer will take place from client to server

00:01:46.134 --> 00:01:49.076


and also from server to client.

00:01:49.116 --> 00:01:50.620


means this connection is like this.
00:01:50.660 --> 00:01:54.025
From client to server and from server to client also.

00:01:54.065 --> 00:01:55.987


This means client can send data to server and

00:01:56.027 --> 00:02:00.027


at the same time server can also send data to client

00:02:00.342 --> 00:02:01.580


That is called a Full Duplex

00:02:01.620 --> 00:02:05.620


This means both client and server can communicate

00:02:05.660 --> 00:02:08.410


with each other and do data transfer

00:02:08.450 --> 00:02:10.598


So if we talk here first,

00:02:10.638 --> 00:02:14.020


Make sure to check connection establishment video.

00:02:14.060 --> 00:02:16.122


Because the terms I am telling you in starting

00:02:16.162 --> 00:02:18.842


I have explained them with examples in that video.

00:02:18.882 --> 00:02:20.928


So after reserving resources,

00:02:20.968 --> 00:02:27.011


both client and server have negotiated the size of the window.

00:02:27.051 --> 00:02:31.051


Let's suppose I have negotiated the size of window to 10 Bytes.

00:02:31.460 --> 00:02:34.025


It had said I will send 10 Bytes and

00:02:34.065 --> 00:02:36.581


other one had also said I will also send 10 Bytes

00:02:36.621 --> 00:02:38.526


Although, the size of window can be upto 16 bit.

00:02:38.566 --> 00:02:43.960


Obviously you can send the 2 : 16, a huge segment number

00:02:44.000 --> 00:02:46.497


But only for sake of simplicity, I have used

00:02:46.537 --> 00:02:53.513


only 10 Bytes here so you can understand easily.
When it send 10 Bytes other will send 10 bytes also

00:02:53.785 --> 00:02:55.198


Just for making you understand.

00:02:55.238 --> 00:02:58.882


Otherwise the size of the window and all these

00:02:58.922 --> 00:03:00.307


I have explained it in TCP header video.

00:03:00.347 --> 00:03:03.693


So, that all these point are linked with each other

00:03:03.733 --> 00:03:07.443


Now, let's suppose it's sequence number

00:03:07.483 --> 00:03:09.818


Means if first client had send the data

00:03:09.858 --> 00:03:13.858


So client has send 21 to 30

00:03:14.401 --> 00:03:16.068


means here are 10 bytes.

00:03:16.108 --> 00:03:19.434


So, client is sending 10 bytes.

00:03:19.474 --> 00:03:23.474


And 21 to 30 means the starting sequence is 21 and

00:03:23.514 --> 00:03:25.878


last sequence number is 30.

00:03:25.918 --> 00:03:27.989


But we only send the starting sequence number.

00:03:28.029 --> 00:03:30.274


So, see what am I doing here?

00:03:30.314 --> 00:03:32.268


what client had send first?

00:03:32.308 --> 00:03:38.350


client has send data with sequence number 21.

00:03:38.390 --> 00:03:42.390


Means the data I am sending to you, the segment I am sending to you

00:03:42.430 --> 00:03:45.994


The starting sequence number of that segment is 21

00:03:46.114 --> 00:03:47.515


Now after 21.

00:03:47.555 --> 00:03:50.369


what else can be here other than this?

00:03:50.409 --> 00:03:55.150


If before that connection was established obviously.
00:03:55.190 --> 00:03:59.003
if we suppose that before that server has also send data

00:03:59.043 --> 00:04:02.281


So, it will obviously send the acknowledgment also.

00:04:02.321 --> 00:04:06.321


Flag of acknowldgement. Flag value has turned to 1.

00:04:06.372 --> 00:04:10.372


I have also explained Flag in TCP header video.

00:04:10.412 --> 00:04:15.000


Flag has been set means flag has been turned to 1

00:04:15.004 --> 00:04:19.004


and also send acknowledgment number also.

00:04:19.044 --> 00:04:21.175


What is acknowledgement number actually?

00:04:21.215 --> 00:04:27.550


Acknowledgement is client is now expecting this data from server

00:04:27.590 --> 00:04:28.782


I want this segment.

00:04:29.174 --> 00:04:32.294


LEtet's say it has sent nominal number 71.

00:04:32.334 --> 00:04:34.908


We're assuming here that earlier than this server has sent

00:04:34.948 --> 00:04:38.142


between 60 to 70

00:04:38.182 --> 00:04:41.002


Obviously we have to start from somewhere

00:04:41.042 --> 00:04:43.022


So, it has send number 71.

00:04:43.062 --> 00:04:47.062


As soon as this whole packet in which has data in it.

00:04:47.313 --> 00:04:50.619


An alongwith we have inserted header value in header field

00:04:50.659 --> 00:04:52.240


Now this data has reached to the server.

00:04:52.280 --> 00:04:57.586


Server has now understood that I have data from 21 to 30

00:04:57.626 --> 00:05:03.940


Further server has to accept this data and send it to its appication layer

00:05:03.980 --> 00:05:07.980


Alongwith the acknowledgement has also send which is of value 1
00:05:08.060 --> 00:05:11.106
and acknowledgement number is 71.

00:05:11.146 --> 00:05:12.309


Now 71 means,

00:05:12.349 --> 00:05:14.839


what server will do?

00:05:14.879 --> 00:05:17.166


server will now send data

00:05:17.206 --> 00:05:20.817


Now server has transfered the data.

00:05:20.857 --> 00:05:25.710


When server is transfering data it has sequence no 71.

00:05:25.750 --> 00:05:27.838


because it was expecting 71.

00:05:27.878 --> 00:05:31.510


So, let's suppose server has data from 71 to 80.

00:05:31.510 --> 00:05:32.166


10 bytes

00:05:32.206 --> 00:05:35.386


I have already fixed it that window size for both is 10 bytes.

00:05:35.426 --> 00:05:36.805


So it has send the data of 10 bytes

00:05:36.845 --> 00:05:38.582


Sequence number 71

00:05:38.622 --> 00:05:41.021


We have to give acknowledgement to this also.

00:05:41.061 --> 00:05:41.912


Why will we do so?

00:05:41.952 --> 00:05:44.087


Because it has previously accepted data.

00:05:44.127 --> 00:05:47.082


How will client know that its data has been accepted?

00:05:47.122 --> 00:05:48.272


Through acknowldgement.

00:05:48.312 --> 00:05:50.164


So the flag of acknowledgement is 1.

00:05:50.204 --> 00:05:53.418


So what will be the acknowldgement number?

00:05:53.458 --> 00:05:56.307


So, see from 21 to 30 has been accepted.

00:05:56.347 --> 00:06:00.030


So obviously next sequence number is 31.

00:06:00.070 --> 00:06:04.070


So, it is expecting data starting from 31

00:06:04.244 --> 00:06:07.184


Point are simple, you only have to remember these.

00:06:07.224 --> 00:06:10.484


So see, here data transfer will take place here like this only.

00:06:10.524 --> 00:06:12.040


It will send 31 to 40

00:06:12.080 --> 00:06:14.552


It will send next 81 to 90

00:06:14.592 --> 00:06:16.281


Like this data transfer will further take place

00:06:16.321 --> 00:06:17.991


But what are the important points?

00:06:18.031 --> 00:06:21.266


means what can be asked in competitive and college/university exams

00:06:21.306 --> 00:06:22.981


FIrst point is

00:06:23.021 --> 00:06:25.359


When we send acknowledgement

00:06:25.399 --> 00:06:27.163


We can send it by two methods

00:06:27.203 --> 00:06:29.765


First one is Piggy Backing

00:06:29.805 --> 00:06:31.633


What is meant by piggybacking?

00:06:31.673 --> 00:06:33.902


When we are sending data,

00:06:33.942 --> 00:06:37.273


with data we are sending acklowdgement also

00:06:37.313 --> 00:06:40.616


See, we've send the data of 10 bytes

00:06:40.656 --> 00:06:42.939


with that we have sent the acknowledgement also.

00:06:42.979 --> 00:06:46.385


That I have accepted your data, now I am sending data.
00:06:46.425 --> 00:06:47.588
Like this only, before that

00:06:47.628 --> 00:06:50.247


Client said that take this data from my side

00:06:50.287 --> 00:06:53.486


and this is the acknowledgement of last data you have sent

00:06:53.526 --> 00:06:57.264


Here server get to know that its data has been reached

00:06:57.304 --> 00:07:00.744


In the next packet client get to know its data has reached.

00:07:00.784 --> 00:07:02.890


and data has came from the server also

00:07:02.930 --> 00:07:06.766


So when we send data and acknowledgement together

00:07:06.806 --> 00:07:08.429


That is called a Piggybacked package

00:07:08.469 --> 00:07:11.449


So, why we use this piggybacking?

00:07:11.489 --> 00:07:14.278


Obviously for reducing the traffic of network

00:07:14.318 --> 00:07:15.346


Otherwise what will happen,

00:07:15.386 --> 00:07:17.603


You have send data and then acknowledgement.

00:07:17.643 --> 00:07:18.358


Then, data

00:07:18.398 --> 00:07:19.197


Acknowledgement

00:07:19.237 --> 00:07:22.050


So, obviously your traffic, your network

00:07:22.090 --> 00:07:26.090


You are sending data and acknowledgement in network

00:07:26.130 --> 00:07:27.652


In different packets

00:07:27.692 --> 00:07:31.692


So the network in data will have many packets.

00:07:31.732 --> 00:07:35.732


For reducing that we are using piggybacking

00:07:35.772 --> 00:07:39.144


In which we send data and acknowledgement together.
00:07:39.184 --> 00:07:41.654
Other than this, there is another method.

00:07:41.694 --> 00:07:43.076


Pure acknowledgement

00:07:43.116 --> 00:07:47.116


Pure acknowledgement means we can send akcnowledgement alone

00:07:47.156 --> 00:07:50.253


Let's see this with an example.

00:07:50.293 --> 00:07:52.378


Client

00:07:52.418 --> 00:07:53.633


Why we will do this?

00:07:53.673 --> 00:07:56.094


When we have piggyback

00:07:56.134 --> 00:07:58.600


In which we're sending data and acknowledgement together

00:07:58.640 --> 00:08:02.462


Due to which I will not get unnecessary packets in network

00:08:02.502 --> 00:08:03.603


Conjetion will also be low.

00:08:03.643 --> 00:08:06.609


So why will I send pure acknowledgement alone?

00:08:06.649 --> 00:08:08.776


This can be the situation that

00:08:08.816 --> 00:08:11.483


someone does not have any data to be send.

00:08:11.523 --> 00:08:15.523


either I will wait for data, that data will come

00:08:15.533 --> 00:08:19.696


When data will come, I will send it then
Because of that there can be time out.

00:08:19.736 --> 00:08:21.246


Because of time out

00:08:21.286 --> 00:08:24.196


The person who have send the data first

00:08:24.236 --> 00:08:27.859


he is waiting, when will his acknowledgement will come

00:08:27.899 --> 00:08:28.967


when will I get to know that my data has been reached or not
00:08:29.007 --> 00:08:34.500
Normally when you do any third party payment.

00:08:34.540 --> 00:08:35.837


Paytm or Amazon

00:08:35.877 --> 00:08:37.068


Any one we use,

00:08:37.108 --> 00:08:39.598


When you have all details and OTP

00:08:39.638 --> 00:08:41.876


At last we wait for acknowledgement

00:08:41.916 --> 00:08:43.411


We get transaction number

00:08:43.451 --> 00:08:46.109


If you only wait for that, it keeps buffering

00:08:46.149 --> 00:08:47.133


what happen till then?

00:08:47.173 --> 00:08:51.173


Till then, you some where be anxious that

00:08:51.213 --> 00:08:53.695


When will my transaction will be completed,

00:08:53.735 --> 00:08:54.848


when it will be complete?

00:08:54.888 --> 00:08:57.127


When it says Your transaction completed

00:08:57.167 --> 00:08:58.964


your transaction number is this

00:08:59.004 --> 00:09:04.780


Some where we feel easiness that transaction has completed

00:09:04.815 --> 00:09:06.558


So that is acknowledgement.

00:09:06.598 --> 00:09:08.718


So if I do not have any data to send

00:09:08.758 --> 00:09:10.364


So I have to send acknowledgement

00:09:10.404 --> 00:09:12.274


So that person does not wait for it.

00:09:12.314 --> 00:09:14.707


Let's say client does not have data to send

00:09:14.747 --> 00:09:17.430


but it has recieved data from the server
00:09:17.470 --> 00:09:19.182
So, you have to send acknowledgement

00:09:19.222 --> 00:09:21.294


When we send acknowledgement alone

00:09:21.334 --> 00:09:22.644


it is called pure acknowledgement

00:09:22.684 --> 00:09:23.567


See, what it is sending?

00:09:23.607 --> 00:09:25.500


Sequence number

00:09:25.540 --> 00:09:28.440


when we send pure acknowledgement

00:09:28.480 --> 00:09:30.992


Sequence number is not used

00:09:31.032 --> 00:09:33.512


means what it has expect sequence number here

00:09:33.552 --> 00:09:34.824


31

00:09:34.864 --> 00:09:38.864


We are sending 31, but we can use it next time also.

00:09:39.242 --> 00:09:40.570


It has not been consumed

00:09:40.610 --> 00:09:41.636


It has not been used

00:09:41.676 --> 00:09:45.451


It is just for informing that you have asked for 31, I'm sending 31.

00:09:45.491 --> 00:09:48.875


But it not has been used, it is only attached to it.

00:09:48.915 --> 00:09:50.649


means it does not have any data with it

00:09:50.689 --> 00:09:51.445


only 31

00:09:51.485 --> 00:09:53.847


acknowledge flag is 1

00:09:53.887 --> 00:09:56.900


Now see what acknowledgement number is?

00:09:56.940 --> 00:09:59.989


it has send from 71 to 80

00:10:00.029 --> 00:10:02.649


Now, it is expecting next to be 81

00:10:02.689 --> 00:10:04.692


As this packet reaches here

00:10:04.732 --> 00:10:07.930


Server get to know that its package has been recieved

00:10:07.970 --> 00:10:12.700


Now let's say after sometime client got some 10 bytes of data

00:10:12.740 --> 00:10:16.332


he will send it , what's the problem?

00:10:16.372 --> 00:10:17.325


he has sent it

00:10:17.365 --> 00:10:18.194


Now what he will do ?

00:10:18.234 --> 00:10:21.656


He will send sequence numer 31.

00:10:21.696 --> 00:10:27.230


Now here data and with that data of 31 to 40

00:10:27.270 --> 00:10:30.769


Alongwith if he want to send acknowledgement again, he can do it

00:10:30.809 --> 00:10:34.809


Otherswise he can send data alone also.

00:10:35.284 --> 00:10:36.131


What does it mean?

00:10:36.171 --> 00:10:37.815


It is Pure acknowledgement

00:10:37.855 --> 00:10:40.337


And this is your data transfer

00:10:40.377 --> 00:10:42.480


So these points can be asked to you somewhere.

00:10:42.520 --> 00:10:43.981


What is Pure Acknowledgement?

00:10:44.021 --> 00:10:46.088


What is piggybacking?

00:10:46.128 --> 00:10:50.128


So that's how both do data transfer with each other.

00:10:50.168 --> 00:10:50.929


And other than these

00:10:50.969 --> 00:10:53.004


Small points can be asked to you
00:10:53.044 --> 00:10:54.108
First is

00:10:54.148 --> 00:10:56.171


We have further Flags in it

00:10:56.211 --> 00:10:57.431


Like push flag

00:10:57.471 --> 00:11:00.050


and urgent pointer, urgent flag

00:11:00.090 --> 00:11:01.586


What is the usage of that?

00:11:01.626 --> 00:11:03.208


That we will discuss in next video

00:11:03.248 --> 00:11:05.662


So this is the simple way of data transfer

00:11:05.702 --> 00:11:08.053


Client and server transfer data in full duplex

00:11:08.093 --> 00:11:11.306


And what is the use of Piggybacking and Pure acknowledgement

00:11:11.388 --> 00:11:14.110


Like this data transfer between each other

00:11:14.150 --> 00:11:16.188


After client to server and server to client

00:11:16.228 --> 00:11:17.681


and after this there will occur termination

00:11:17.721 --> 00:11:19.556


How we terminate the connection?

00:11:19.596 --> 00:11:21.829


That we will discuss in next video

00:11:21.869 --> 00:11:25.869


Thank You!

You might also like