In this article, I will explain the general concept of the TCP/IP five-layer model.
- A little background of TCP/IP model
- A little background of TCP/IP model
- What does each layer do?
A little background of TCP/IP model
The TCP/IP model was developed in the 1970s by the US Department of Defense and precedes the development of the OSI model. TCP/IP is named after two important protocols within it, the Transmission Control Protocol and the Internet Protocol. It is pretty surprising to see that TCP/IP, the networking model created almost entirely by a bunch of volunteers, has become the most prolific network model ever.
What is the TCP/IP model?
When a host such as a PC or a smartphone wants to communicate to other devices, there must be a way to send and receive data. While many logics and concepts are used for computer communication, one of the crucial things in Computer Network is a communication protocol.
A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchronization of communication and possible error recovery methods.
TCP/IP model is the most famous layer structure for exchanging data between entities, using protocols. It is used by almost all networks. TCP/IP model makes use of many protocols including TCP(transmission control protocol) and IP (Internet protocol).
What does each layer do?
Application Layer — TCP/IP application layer protocols provide services to the application software running on a computer, services like user log in, formatting messages, and e-mails, transfer of files etc. So the data in the application layer is usually what user sees on the screen. Common protocol in this layer is HTTP, SMTP and so on. the data in this layer is commonly called a message.
Transport Layer —Transport layer protocols provide services to the application layer protocols such as error recovery, verification and flow control. You can think of this layer as a worker or helper for Application layer. Common protocols are TCP and UDP and the data in this layer is commonly called a segment.
Network Layer —The network layer provides the means of transferring network packets (a packet is simply the data in the network layer) from a source to a destination host. This layer receives a segment from the transport layer, set the header to the segment and gives the packet to the data-link layer. The protocol in this layer is IP(Internet Protocol).
Data-Link Layer — This layer wraps the packet with the header and trailer. This data is called a Frame. The frame then is forwarded to the destination mac address (can be router, switch or host) to eventually reach the destination host. Common protocols are ethernet, Point-to-Point Protocol(PPP) and Wi-Fi.
Physical Layer — This layer physically transmits bits in frame to the destination mac address.
You might wonder why do we need a protocol per layer. Isn’t the IP protocol enough to send data to the destination?
The purpose of this is mainly for the same-layer interaction between two hosts. Each layer has its own job and they need to know what they should do based on the received data. A protocol is like a language. each layer needs a language to speak and understand what the same layer says the other side. the protocol allows each layer to talk to same layer.
Don’t be confused with the protocol examples in the diagram. each layer use many different protocols. For example, the application layer use HTTP, POP3 and many more.
Don’t forget that protocol is basically a promise between computers to understand mutually.
If you liked this story. please share and clap :)
Thanks!