Communication between two remote networks is an integral part of the internet. When the data is sent from one network to another, some format and rules are to be followed; this is designated as Internet Protocol. It means the computer networks obey some pre-set protocols to successfully send the data from one computer to another.
Earlier, we had a popular OSI (Open Systems Interconnection) model. OSI had seven layers: Application layer, Presentation layer, Session layer, Transport layer, Network layer, Data-Link layer, and Physical layer. But later, TCP/IP model was introduced and initiated.
TCP/IP model is the official rule book, and is commonly used nowadays. It consists of four layers: Application layer, Transport layer, Internet layer, and Network Interface layer.
Application layer: Web browser directly interacts with this layer. It uses HTTP protocol when someone visits the websites, while SMTP is used during checking of the emails. Application layer contains all programs, such as web browsers and web servers that exchange information. It is directly connected to Transport layer, where data is subsequently sent.
Transport Layer: It is also known as host-to-host layer. It identifies the application that makes the request, and the service that receives it, by using port numbers; different port numbers are assigned to different applications. Transport layer breaks the data it gets in to segments, and sends it into Internet layer.
Internet Layer: The Internet layer is analogous to the Network layer in OSI model. Here, the PDU (Protocol Data Units) are called segments. The most popular protocol on this layer is IP. The main functions of the internet layer are transmitting data to and from the Network Access layer, routing data to the specific destination network and device, and handling packet errors and fragmentation.
Network Interface Layer: This layer is the central hub, where all the information in the immediate area passes through. This is the layer where Wi-Fi, Ethernet, and DSL come in to play.