So going forward, let us discuss the TCP goals.
TCP has lots of research behind it and it is a result of research spanning over 20 years to make TCP
protocol stand where it is today.
So dear friends, implementing a TCP protocol from scratch is no joke.
Just like implementing a operating system from scratch is no joke.
TCP has been designed for reliable data delivery in a lossy network.
Now, when I say that a network is a lossy network, it means that network is prone to error or packet
loss.
So when it comes to the techniques that deal with the data loss in communication, each layer of the
TCP IP stack has its own tool to deal with the data loss in communication.
For example, Ethernet layer uses cyclic redundancy check.
With the help of which the Ethernet layer detects the malformed or compromised frames.
So if you look at the Ethernet layer header, you will find that there is a four byte field in the Ethernet
layer header which is used as CRC.
Right.
Similarly.
iPlayer has its own tool called checksum using which the iPlayer detects the malformed IP packets.
So if you take a look at the IPv4 header, you will find that there is a 16 bit field called checksum.
Similarly, the application layer can also use its own error correcting codes.
Right?
Now, if you analyze all of these three techniques, require to add an additional info in the packet
itself, you need to have a dedicated space in the particular header of a particular layer of TCP IP
stack in order to implement this repairing techniques.
And one limitation of these technique is that that these techniques are only used.
By the receiver to detect malformed packet and when the receiver detects that the packet.
Has been malformed, the receiver discards the packet.
So each of these techniques helps to actually discard the malformed packet, but any of these techniques
do not deal with the loss of packet.
That is when the packet is on its journey from the source machine to the destination machine.
And if the packet gets lost then none of these techniques will come to the rescue.
And it makes sense that when the packet gets lost and when the receiver machine do not receive the packet,
then there is no cushion for CRC checksum or error correcting codes to do any help.
Now let us see what TCP brings to the table.
The TCP protocol has its own checksum field in the TCP header, using which the TCP protocol detects
the malformed packet.
What is malformed packet?
A packet is said to be malformed if it is corrupted.
It means that somebody has changed the expected content of the packet and the content of the packet
are not the same as it was sent by the sender.
So TCP use checksum in order to detect the malformed or corrupted packet, but in case if the packet
is lost somewhere in the network.
Right.
In that case TCP uses retransmission of the packet.
So retransmitting the packet when the packet gets lost is called automatic repeat request.
This is the procedure which TCP brings to the table and none of the protocol in the ethernet layer,
IP layer or application layer implements ARQ.
It is only TCP protocol which implements the automatic repeat request feature.
So Arc is a feature which completely deals with the loss of a packet in the network.
In fact, when the receiving TCP receives the packet and finds that the packet has been malformed because
its checksum do not matches the TCP protocol on the receiving side, again, exercise a procedure and
ask the TCP sender to retransmit the packet again.
You.