So guys, we had a good discussion on UDP protocol.
Now let us discuss the big brother of UDP protocol that is transmission control protocol or TCP.
So TCP protocol is a way more complex protocol as compared to UDP and it is a result of a research of
over 20 years.
So now let us understand the properties of TCP protocol.
So you can see in the diagram on the right hand side, we have a sending machine s and the recipient
machine are.
And these two machines are present somewhere in the network in between.
Now there is an application, a which is running on machine as and this application A is listening on
TCP port number 100.
The IP address of the machine is 10.10 .1.1.
Similarly, the recipient machine R is running an application A which is running on TCP port number
ten, and the IP address of the recipient machine is ten .1.1.1.
Right.
Now the very first property of the TCP protocol is that the TCP protocol is a connection oriented protocol.
It simply means that the sender and the receiver have to be mutually agree with each other before carrying
out any application data exchange.
So let us try to understand this point in detail.
So you can see in the below diagram this is the application which is running on the sending machine
as and this application wishes to carry out data exchange with the recipient process running on machine
R.
So the very first thing the application does is to ask the TCP protocol, which is running in the transport
layer, to say hello to the recipient process.
So of course, the application conveyance, the TCP protocol, that TCP protocol, just say hello to
the process A which is running on TCP port number ten on the recipient machine are whose IP address
is ten .1.1.
So the TCP protocol, which is running on the machine as in the transport layer, having received this
helo order from the application, simply sends the connection request to the recipient machine are.
In this connection request the TCP protocol running on the sending machine conveys the recipient process
its own specification.
That is, that is the TCP port number of the sending process and the IP address of the sending machine.
In addition to this, the TCP protocol running on the sending machine also conveys its processing capability
to the recipient.
TCP Protocol.
In this simple example, the TCP protocol on the sending side is telling the TCP protocol on the recipient
machine that, hey, I cannot process the data more than 5000 bytes per second.
So if you want to send data back to me, please do not send it at the rate of more than 5000 bytes per
second.
Now, in response to this connection request, the TCP protocol running on the recipient machine sends
the connection acknowledgement reply to the sending TCP right now.
In this connection acknowledgement reply The recipient TCP conveys its own capability to the sending
TCP.
So in this example, the TCP protocol running on the recipient machine ah is conveying the TCP protocol
running on the sending machine as that.
Hey, I can process the data at a maximum rate of 1000 bytes per second.
So if you want to send data to me, please do not send it more than 1000 bytes per second.
So you can see that in the exchange of this greetings between the sending machine and the recipient
machine, the TCP protocol running on the sending machine and the receiving machine actually exchanged
their capabilities also.
So when the sending TCP receives the connection acknowledgement reply from the receiver TCP then the
connection is set to have established.
Right.
So note that in the connection establishment procedure there is no actual exchange of data, but rather
there is only exchange of connection, request and connection acknowledgement.
It is only after connection establishment that actual data exchange takes place.
So when I say that TCP is a connection oriented protocol, it simply means that sending TCP and recipient
TCP has to mutually agree with each other that they really want to participate in data exchange.
And if they really want to participate in data exchange, then they should exchange their capabilities.
Also here capabilities means that how fast each of them can process the data coming from the other.