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

Detailed explanation of OSI seven-layer model and TCP/IP four-layer model

2025-03-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

OSI seven-layer model and TCP/IP four-layer model

OSI seven-tier model:

① physical layer:

Including physical transmission media, any network must use transmission media to send and receive signals that constitute a physical representation of network communication. The task of the physical layer is to establish, maintain, and disconnect the network. The sender initiates a connection to transmit data over the network media, and the receiver receives or rejects the connection request in response to the request to establish the connection. A simple overview of the physical layer is that it focuses on network hardware and connections that support hardware access to certain network media.

The physical layer manages the communication from the network medium to the protocol stack, converts the out-stack data of the computer into the signal used by the network, and for the incoming message, converts the signal from the network medium into the bits accepted by the computer network card.

The PDU of the physical layer becomes the bit.

② data Link layer:

Its task is to ensure reliable transmission of data at the physical layer at the sender and to verify the reliability of the data received at the receiver. The data link layer also manages point-to-point transmission across network media, from one computer to another, on a single logical or physical cable segment. It identifies each device on the local media by uniquely identifying the private address of each network card. Because the data link layer manages point-to-point communication between network cards, it also handles local area network connections between computers inserted by these network cards. At the same time, it also handles the serialization of data from the sender to the receiver because the bits must be mapped to the corresponding signal, transmitting from the sender to the receiver while the receiver holds the opposite process.

The data link layer can also control the rhythm of data transmission from the sender to the receiver-this process is called media flow control, which responds when local blocking occurs to prevent the network medium from being flooded by the data stream. When the out-of-stack PDU can be transmitted, the data link layer requests to start transmitting data and processes to receive and construct the incoming PDU of the data into the stack.

The PDU of the data link layer becomes a frame or a data frame.

Eg: ATM FDDI....

③ network layer

Where network location tags are handled is also where the complexity of sending PDU from sender to receiver is dealt with. Therefore, the network layer deals with the logical addressing problems associated with each machine on the network. When the source and destination addresses of the data flow are not in the same physical segment on the network, the network layer also uses addressing information to determine how to pass the PDU from the sender to the receiver. The main function of the network layer is to provide a globally unique address for each host on the Internet and to provide a communication path between the hosts.

The network layer also materializes the representation of multiple concurrent connections between different IP addresses, so that multiple applications can maintain network connectivity at the same time. The network layer can identify which process or application a network connection belongs to on the computer, not only can correctly transmit the data stream from the sender to the receiver, but also can pass the data that can be put into the stack to a specific process or application on the receiver's computer.

Using one or more routes, the technology of forwarding or relaying a single PDU from the sender to the receiver is packet switching, which is why the network layer forwards and relays on a per-PDU basis. In fact, the network layer is also sensitive to routing-related delays and can manage the data flow through these routes while forwarding data from the sender to the receiver, a process called congestion control. it is used to avoid overload when there is a lot of activity on the network.

The PDU at the network layer becomes a packet.

Eg: IP IPX.

④ Transport layer:

Its task is to ensure reliable end-to-end transmission of PUD from sender to receiver, so the transport layer usually includes end-to-end error detection and error recovery data. These data are usually packaged as part of the tail of the transport layer PDU, and a special value called checksum is calculated before and after transmission, and then compared. If the checksum sent is consistent with the checksum calculated locally, then the transmission can be considered successful, otherwise, when an error is detected, a protocol in the transport layer will request PDU retransmission.

The amount of data that can be sent from sender to receiver is unlimited in length, but the container that can transmit data from end to end has a fixed maximum length (maximum transmission unit), so the transport layer must also handle segmentation and reorganization operations. Segmentation is to divide a long message into a series of data blocks, called data segments, in which each data block is represented as the most big data load that the network media can transmit between the sender and the receiver. Reorganization is to reorganize the sent data blocks together in their original order, making the transmitted messages look like before they are segmented.

The transport layer has the function of requesting to retransmit all error PDU or missing PDU in the process of reorganization to achieve reliable transmission. The PDU of the transport layer is called segment or data segment.

Eg: TCP UDP....

⑤ session layer:

Is the place where communication between the sender and receiver is created, maintained, terminated, or disconnected, so the session layer allows the sender and receiver to start or stop requesting a reply, and to maintain a conversation when congestion occurs between the two parties. The session layer includes a mechanism called checkpointing to maintain a reliable session.

A checkpoint defines a point closest to successful communication and a point that needs to be rolled back to recover lost or corrupted data when content is lost or corrupted. Similarly, the session layer defines the mechanism that needs to be resynchronized when the session is out of sync.

The main task of the session layer is to be responsible for the communication between two network participants, and the two usually exchange a series of messages or PDU during the communication process. There are various types of PDU in the session layer, collectively referred to as session PDU or SPDU.

Eg: RPC SQL....

⑥ presentation layer:

Manages the representation of data on the network (down to the protocol stack) and on specific machines or applications (from it up to the protocol stack). This enables completely different types of computers, which may represent numeric values and characters in different ways, to communicate with each other across the network.

There is also a special operating system driver in the presentation layer, some called redirector and some called network shell. Whatever it is, its function is to distinguish between requests for network resources and requests for local resources, and redirect such requests to the appropriate local or remote subsystems. In this way, computers can use a single subsystem to access a variety of resources, regardless of whether they are on a local computer or on a remote computer across the network, without identifying the type of resources to be accessed.

The presentation layer can also provide special data processing capabilities for applications, including protocol conversion, data encryption, decryption, data compression or decompression. For this type of service, no matter what the sender's presentation layer does, the receiver's presentation layer must be restored so that both sides of the connection share a similar view of data at some point. There are also various types of PDU in the presentation layer, collectively known as PDU.

Eg: encrypt SACll.

⑦ application layer:

The application layer defines the interface that the application uses to request network services, rather than pointing directly to the application itself. Therefore, the application layer mainly defines several types of services that applications can request from the network, and specifies the format in which the data must be used when receiving messages from or sending messages to applications. The PDU of the application layer is also collectively referred to as PDU.

Eg: HTTP FTP SNMP.

TCP/IP four-layer model

① Network Interface layer:

It monitors the exchange of data between the host and the network. In fact, TCP/IP itself does not define the protocol of this layer, but each network participating in the interconnection uses its own physical layer and data link layer protocol, and then connects with the network access layer of TCP/IP.

The most important protocol in the network interface layer is the PPP protocol (point-to-point protocol), which is used to create a direct connection between two network devices. PPP can provide connection authentication to identify the identities of both parties, apply encryption technology for transmission to achieve secrecy, apply compression technology to reduce the amount of data transmitted (decoding and decompression must be carried out at the receiver), and PPP only provides error detection without error correction.

② Internet layer:

The TCP/IP Internet layer protocol deals with routing between machines across multiple networks. It also manages network names and addresses to help solve routing problems. More specifically, there are three basic tasks for the Internet layer to handle TCP/IP:

(1) MTU partitioning: when routing transports data from one type of network to another, the most MTU that the network can carry may change, and when the data moves from a medium that supports a larger MTU to a medium that supports a smaller MTU, the data must be shrunk to match the smaller MTU. This task requires only one-way conversion, but it must be done in the process of data transfer.

(2) addressing: addressing defines a mechanism that all network cards in a TCP/IP network must correspond to a dedicated, unique bit pattern that identifies no network card, which also identifies the network to which the network card belongs.

(3) routing: routing defines the mechanism for forwarding data from the sender to the receiver, and several intermediate relay processes may be required in the forwarding process from the sender to the receiver. This function is not only included in the process of successful delivery, but also provides a way to track delivery performance and a way to report errors in the event of a delivery failure, otherwise obstacles will occur

Internet layer Protocol: IP ICMP ARP RARP RIP OSPF BGP...

③ Transport layer:

This layer provides data movement from one host to another. The basic functions provided by the transport layer protocol include the reliable transmission of data from the sender to the receiver, the necessary segmentation of battle messages before transmission, and the ability to reorganize the segmentation before delivering the data to the application layer.

Transport layer Protocol: TCP UDP

④ application layer:

Corresponding to the high level of OSI reference model, it provides users with all kinds of services they need, such as FTP, Telnet, DNS, SMTP, etc.

Model comparison:

Similarities:

(1) both OSI reference model and TCP/IP reference model adopt the concept of hierarchical structure.

(2) both connection-oriented and connectionless communication service mechanisms can be provided.

Differences:

(1) the former is a seven-tier model, while the latter is a four-tier structure.

(2) different requirements for reliability (the latter is higher)

(3) OSI model is designed before protocol development and is universal. TCP / IP is a protocol set and then a model, so it is not suitable for non-TCP/IP networks.

(4) the actual market application is different (the OSI model is only a theoretical model and there is no mature product, while TCP/IP has become a "practical international standard")

Attachment: http://down.51cto.com/data/2366493

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

Network Security

Wechat

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

12
Report