The first question that many people as in first place is What is TCP? and that is what I want to talk about first. It stands for Transmission Control Protocol. Just like humans, Computers also require language to communicate with each other. TCP/IP is a common language which most of the modern computers share to communicate to each other. TCP/IP is the secure way of transferring the data over a network. It establishes a connection before sending the original data. TCP/IP follows all the layers in OSI Reference Model. You can read more about them by clicking here. TCP’s layers might look different to you if you Google it, but trust me they are the same. In TCP “Session Layer”, “Presentation Layer”, and “Application Layer” are merged into a single layer “Application Layer”. There are many websites that say that TCP has only four layer but according to Oracle.com the TCP has five layer in total.
- Application Layer
- Transport Layer
- Network Layer
- Data-Link Layer
- Physical Layer
OSI REF: Layer Number | TCP/IP Layer Name | Example |
5,6,7 | Application | DNS, RIP, FTP, RSH, SNMP and other |
4 | Transport | TCP, UDP |
3 | Network/Internet | IP, ARP, ICMP |
2 | Data-Link Layer | PPP, IEEE 802.2, Frames |
1 | Physical | Ethernet, Physical Signals |
How does the TCP IP Works?
Since TCP/IP is the secure way of transferring the data. It makes sure that the data it sent has been reached
to its destination without any loss. First it establishes a connection to the host and then it starts to send data.
To establish the connection Three-Way Handshake is used. You can read more about Three-Way Handshake
here. After it successfully establish the connection it then start to send the data. After the complete data is
sent, it then request to finish that connection so that it can free the resources if reserved while establishing
the connection. To finish the connection Four-Way Handshake is used. You can read more about how the
Four-Way Handshake work by clicking here.
Sneak peek into What is TCP Handshakes
You can read more in details about TCP Handshakes here.
You can read more about flags here.
3-Way Handshake in TCP IP
To establish the connection between server and client, client uses 3-Way Handshake. The client sends a \”SYN\” flag to the server and wait for the acknowledgement \”SYN-ACK Flag\”, then finally client sends the \”ACK\” flag then the client starts to send the original data.
4-Way Handshake in TCP IP
When the data is transferred successfully, the sender sends a \”FIN\” flag at the end of the data and if everything went smooth then the receiver sends acknowledgement and sends back \”FIN\” flag to the sender. After receiving the \”FIN\” flag back from the receiver, the sender device send acknowledgment to successfully finish the connection from both sides.
If you find any mistakes in this article please let me know by filling out a small “Contact Us” form here.
All the Pictures used in this article are from Pexels.com