DEV Community

Cover image for TCP/IP
Ravi Sankar
Ravi Sankar

Posted on

TCP/IP

TCP/IP
TCP stands for transmission control protocol and IP stands for Internet Protocol.
A protocol is a set of rules that define how data is transferred between 2 devices connected in a computer network.One such a popular protocol is TCP/IP.
There are 5 layers in TCP/IP model:

  1. Application layer
  2. Transport layer
  3. Network layer
  4. Data-link layer
  5. Physical layer

1. Application layer
It is the top most layer of TCP/IP protocol.It acts as an interface between the user and the model.It is the only layer which interacts with the user.The protocols defined in the layer are HTTPS,FTP,SMTP.The user applications work on these protocols.

2. Transport layer
The protocols in this layer are TCP and UDP.It provides an end to end connection between 2 devices. TCP is a connection oriented protocol while UDP is a connectionless protocol.UDP is fast but not secure, while TCP is secure but slower.
The transport layer converts the data into smaller layers called segments for easier transfer of data .
Also in TCP there is an acknowledgement process to check whether the data transfer is completed or not.If the transfer is not completed the data is sent again.

3. Network layer
The protocols in the network layer are IP and ARP.
IP stands for Internet Protocol.Each device has an unique IP address by which it is found on the network.It is responsible for delivering packets from the sender to the receiver’s end.Packets refers to small fragments of data that is to be transferred.
The data is converted to packets for easier transfer of data.
The network protocol is also responsible for assigning routing protocols .
Also it determines the paths through the network for these packets to travel.

4. Data-link layer

The data link layer is responsible for encapsulating the packets with MAC address of the nearest router and also a header link which contains a checksum for error detection.
It ensures that data transfer has occurred completely without any errors.
If any errors have occurred it tries to resolve it.

5. Physical Layer
It is the lowest layer in the TCP/IP model.It is responsible for handling host to host connection between the sender and the receiver.
Also it is responsible for converting packets into bits.It also oversees whether the communication occurs through wireless medium or through a wired medium.

TCP/IP is the backbone of the internet .All the data that we send and receive are governed by the TCP/IP protocols .

Top comments (0)