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

[network principle] Chapter IV data Link layer (1)

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

I. definition of the data link layer and its main functions

1. Why design the data link layer?

Why design a data link layer when the physical layer transmits the binary bit stream transparently? In the binary transmission of the physical layer, some problems are difficult to solve. For example, in the process of transmission, due to signal interference, it will inevitably lead to binary bit stream errors (with a certain bit error rate). There is no way for the physical layer to recover these errors, so a mechanism is needed to strengthen the function of the physical layer to ensure that the physical layer can present an error-free point-to-point transmission that meets certain service requirements to the upper layer. to provide a more reliable guarantee for the following levels. For the upper layer (such as the network layer), the data link layer can solve many problems of point-to-point transmission, such as error detection, addressing, access control to physical links (in broadcast communication, how to solve the problem of channel use right).

To put it simply, the purpose of the data link layer is to find and solve the problem of data errors in the physical layer, and to ensure error-free transmission on the error-free links.

2. How does the data link layer ensure that the data can be transmitted without errors?

In order to ensure the error-free transmission of data, the basic work of the data link layer is to add additional information (protocol control information).

3. What is the content of the data link layer protocol?

The essence of the control method developed for error-free transmission is the data link layer protocol (in the early days, it was also called the data link control protocol).

The most basic functions provided by the protocol are:

(1) normal transmission of data over the data link (establishment, maintenance and release)

(2) addressing: a node needs to know whether the data is sent to itself.

(3) flow control: the sender sends data according to the processing capacity of the receiver.

(4) frame demarcation (frame synchronization)

(5) error control

Because the first two problems are implemented differently in different data link layers, we will not focus on them.

4. The data flow direction of the actual network transmission (the process by which the communication node forwards the data)

For any router, each port corresponds to the physical layer and the data link layer.

The process by which a communication node forwards data:

(1) Port A receives a set of binary bitstreams

(2) the entity that sends the binary bitstream to the data link layer (software process or physical hardware unit)

(3) synchronization of frames (dividing the boundaries of frames and dealing with them in units of frames. Once you divide the frame, you will know the destination address and decide whether to send the frame or discard it.)

(4) error detection (if there is an error, it will be discarded; if there is no error, the transmission will continue)

(5) the process of extracting valid data (packets) from a frame and sending it to the network layer

(6) routing according to the ip address carried by the packet (determine the exit of the data)

5. Services provided by the data link layer to the upper layer

There are connection-oriented and connectionless services provided by any layer to its senior layer.

Connectionless service:

(1) No acknowledgment connectionless service: no connection needs to be established before the data is sent, and after the sender sends the data, the receiver does not need to respond. Because this method does not need to reply, its transmission efficiency is high, but the reliability is poor. It is suitable for situations with low bit error rate and high real-time performance, such as most wired local area networks.

(2) confirmation connectionless service: there is no need to establish a connection before the data is sent, but after the sender sends the data, the receiver needs to confirm that the data has been received correctly and respond, and the process will not stop until the receiver confirms that the data has been received correctly. Its transmission efficiency is low, so it is suitable for low reliability network environment, such as wireless local area network.

Connection-oriented services:

Before sending, it is necessary to establish a connection to ensure that the data can be transmitted normally (still need to be confirmed), which is suitable for situations that require high connection quality, such as the wide area network.

6. How does the confirmation (response) mechanism work?

In both the confirmation connectionless service and the connection-oriented service, the reception of data needs to be acknowledged. How do they implement it? In the process of data transmission, there will be three cases: the data arrives correctly, the data arrives incorrectly, and the data does not arrive. For the sender, once the correct delivery of the data is confirmed, the process of sending the data stops, and if the data is not delivered correctly, the data needs to be retransmitted. There are three ways to respond to data:

Positive response: answer only the correct information

Negative response: only the wrong message is answered (the mail system receives a bounce)

Two-way reply: all correct and wrong messages are answered

Think about it: which reply method is most commonly used in the data link layer?

A little knowledge:

Iso (Open Systems Interconnection reference Model) definition of the data link layer: the purpose of the data link layer is to provide functional and procedural methods to establish, maintain, and release data links between network entities.

Data link: the transmission path from the data sending point to the data receiving point (point-to-point point to point).

Reference: [1] Han Ligang, computer Network principle Innovation course [M], Water Conservancy and Hydropower Press, 2017.1

[2] Chen Yan, computer network principle [M]. Xi'an Jiaotong University, 2012.6

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