Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the four layers of TCP/IP protocol architecture

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article is about the four layers of the TCP/IP protocol architecture. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

The four layers of TCP/IP protocol architecture are: 1, the data link layer, and the network driver that implements the network card interface to deal with the data transmission on the physical media. 2. Network layer; realize the routing and forwarding of data packets. 3. Transport layer; provides end-to-end communication for applications on two hosts. 4. The application layer is responsible for dealing with the logic of the application.

Before we talk about the TCP/IP protocol architecture, let's take a look at the earliest

OSI seven-layer model: physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer from bottom to top.

The following figure shows the process from the OSI seven-tier reference model to the TCP/IP four-tier architecture:

Advantages of the TCP/IP architecture:

The main results are as follows: (1) the structure of the computer network is simplified, and the current four layers are directed by the original seven layers, but its function has not been reduced.

(2) each layer is independent and connected, independent because if there is a problem in that layer, it will not affect the work of other layers, and the connection is because the upper layer protocol uses the services provided by the lower layer protocol.

From above, we can see that TCP/IP protocol family is a four-layer protocol system, which is data link layer, network layer, transport layer and application layer from bottom to top. Each layer performs different functions through several protocols, and the upper layer protocols use the services provided by the lower layer protocols. Next I will talk about the functions and common protocols of each layer.

1. Data link layer

Function: the network driver of the network card interface is realized to handle the transmission of data on the physical media (such as Ethernet, token ring, etc.).

Corresponding equipment: network cable, bridge, hub, switch

Common protocols:

(1) ARP (address Resolution Protocol): it converts the IP address to the physical address (usually the MAC address, which is commonly understood as the address of the network card).

(2) RARP (inverse address Resolution Protocol): as the name implies, it is the opposite of ARP. It implements the translation from physical address to IP address.

Then some people will ask what is their use?

ARP purpose: the network layer uses IP addresses to find a machine, while the data link layer uses physical addresses to find a machine, so the network layer must first convert the IP address of the target machine to a physical address before it can use the services provided by the data link layer.

RARP purpose: RARP protocol is only used for some diskless workstations on the network. Due to the lack of storage devices, diskless workstations can not record their IP addresses. However, the mapping from physical addresses to IP addresses can be seen through RARP.

2. Network layer

Function: to achieve packet routing and forwarding.

Corresponding device: router

Common protocols:

(1) the IP protocol (Internet protocol) determines how to send a packet to the target host based on its destination IP address. If the packet cannot be sent directly to the target host, then the IP protocol finds a suitable next-hop router for it and gives the packet to the router for forwarding. After many times, the packet will arrive at the destination host or be discarded due to transmission failure.

(2) ICMP protocol is another important protocol in the network layer, and it is an important supplement to IP protocol, which is mainly used to detect network connections.

8-bit type: ICMP messages are divided into two categories: one is error messages, such as target unreachable (type value 3) and redirection (type value 5); the other is query message, which is used to query network information.

Some ICMP messages also use 8-bit code fields to subdivide different conditions. For example, a code value of 0 indicates a network redirection, and a code value of 1 indicates a host redirection.

16-bit checksum: a cyclic redundancy check (CRC) is performed on the entire message (including header and content parts).

Note: the ICMP protocol is not strictly a network layer protocol because it uses the services provided by the IP protocol at the same layer, while generally speaking, the upper layer protocol uses the services provided by the lower layer protocol.

3. Transport layer

Function: provides end-to-end communication for applications on two hosts. Different from the hop-by-hop communication used in the network layer, the transport layer only cares about the beginning and destination of the communication, and does not care about the transit process of the packet.

Main agreements:

(1) TCP (Transmission Control Protocol): provides reliable, connection-oriented and streaming services for the application layer.

(2) UDP protocol (user Datagram Protocol): provides unreliable, connectionless and Datagram services for the application layer. (details and differences between TCP and UDP protocols will be discussed in the next article.)

(3) SCTP protocol (Stream Control Transmission Protocol), which is designed to transmit telephone signals over the Internet, is not discussed in detail here.

4. Application layer

Function: responsible for handling the logic of the application, such as file transfer, name query and network management.

Note: the data link layer, network layer, and transport layer replicate the details of network communication, so these parts must be stable and efficient, so they are all implemented in kernel space (figure 2 above), while the application layer is implemented in user space. Because it is responsible for a lot of logic, if implemented in the kernel, the kernel will become very large. There are also a few server programs implemented in the kernel so that the code does not have to switch back and forth between user space and kernel space (mainly data replication) to improve productivity.

Common protocols:

(1) OSPF (Open shortest path first) protocol: a dynamic routing update protocol used for communication between routers to inform each other of their routing information.

(2) DNS (Domain name Service) protocol: provides the translation of machine domain name to IP address. (if you convert www.baidu.com into Baidu IP, you can enter the domain name directly. Because the IP address is too troublesome to remember, just like everyone is uniquely identified by an ID card, but a name is given to make it easier to remember. DNS is a process of matching a name to an ID card)

(3) telnet protocol is a remote login protocol, which enables us to complete remote tasks locally.

(4) HTTP protocol (Hypertext transfer Protocol) is a stateless, application-layer protocol based on request and response mode, often based on TCP connection mode.

Thank you for reading! About which four layers of the TCP/IP protocol architecture are shared here, I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report