Chapter 3: TCP vs UDPTwo main types of Transport Layer protocols
TCP Service Model
TCP Header (Major Fields)
3-way Handshake (makes TCP connection-oriented)
During the start of the connection, a 3-way handshake happens in TCP
This handshake is 3-way because TCP establishes 2 streams of communication: from client to server and from server to client.
To establish first stream, client sends a synchronize signal to server.
Server responds back by sending acknowledgement and synchronize signal back to client.
Client responds back by sending acknowledgement to server.
At the end of the communication, both client and server send finish signals to each other to signal the end of their respective streams. Both send an acknowledgement in return to this.
UDP Service Model
UDP Header (Major Fields)
ICMP (Internet Control Message Protocol) Service Model
ICMP was designed to be used as a diagnostic for the Internet but it serves a wider purpose.
Several applications use ICMP in interesting ways to gather network information. It sits above network layer and hence comes in parallel to TCP, UDP protocols (i.e. it comes in the Transport layer).
ICMP Types are defined as follows:
As can be seen from the above, these messages help to provide a control to the basic unreliable nature of the Internet transmission.
Some of the applications which make use of these ICMP messages are:
The application ‘ping’ is used to test whether a server is alive or not.
‘Ping’ sends an ICMP message with type ‘echo’
A server on receiving this request responds back with an ICMP message of type ‘echo response’.
Hence, if a server responds, then sender knows that the server is alive.
Trace-route is an application to trace the route from sender to receiver.
It works by sending a datagram first with a TTL of 1, then 2 and so on.
When datagram of TTL 1 expires, sender knows the information about first router.
When datagram of TTL 2 expires, information about second router is known and so on.
For the final receiver, sender puts in a destination port such that the receiver is bound to send an ‘Unrecognised port’ response.
|Email:||(Your email is not shared with anybody)|