当前位置:网站首页>How does the data link layer transmit data
How does the data link layer transmit data
2022-07-26 17:07:00 【TABE_】
Here's the catalog title
Data link layer function Overview
The main function of the data link layer is to strengthen the function of the physical layer to transmit the original bit stream . It is responsible for the physical connection provided by the physical layer that may go wrong , Transformed into a logically error free data link , Make it an error free link to the network layer .
The data link layer includes three basic problems : Package into frames 、 Transparent transmission 、 Error control .
Package into frames
The signal sent in the physical layer itself has no start and end marks , At the same time, the data link layer needs to IP Datagrams are also added to the frame , To sum up, this problem is the problem of packaging into frames .
take IP It's easy to encapsulate datagrams into frames , Just add a frame start character in front of the data part SOH, And add a frame end character after the data part EOT. When receiving data, if you encounter the frame start character, it means that you need to start receiving data , If you don't encounter it, it means that the previous received may be noise, so you don't need to deal with it . Then, the end of the frame indicates the end of the data transmission , Some of the later data are processed differently , The schematic diagram of data encapsulation is as follows :
Transparent transmission
Transparent transmission means that no matter what kind of bit combination the transmitted data is , Should be able to transmit on the link . When the network layer protocol is encapsulated into frames at the data link layer , Will be added in the head and tail respectively SOH as well as EOT These two special characters , The receiver determines the beginning and end of the frame according to these two characters ( There is ambiguity ), If the data sent by the upper layer protocol ( That is, the data part of the link layer ) contain EOT, Then the receiver will mistakenly think that the data has ended when parsing this frame , In this case, data transmission will cause problems . therefore , If the link layer has no special treatment for this situation , Then we can understand that the link layer is non transparent transmission ( Because it cannot be transferred EOT This character ).
Usually, this problem can be solved in the data part SOH、EOT Add an escape character before the character ESC, If you receive directly during transmission SOH、EOT The character is still represented as the start and end marks of the frame , But if you receive ESC And then received SOH、EOT, It means that these two characters are not the start and end marks of the frame , Is part of the frame data . This completes the problem of transparent transmission .
Error control
Real communication links are not ideal . That is to say , There may be errors in the transmission of bits :1 Could become 0, and 0 It could become 1.
In order to detect such errors , The data link layer adopts the check code . The data link layer generates the check code and sends it together with the data before transmission , After acceptance, check whether the data is correct through the check code , If the check is wrong, the frame will be discarded directly , If there is no error, save it directly , analysis , And submit the data part to the network layer . The most widely used in use is CRC Cyclic redundancy check .
边栏推荐
- [express receives get, post, and route request parameters]
- IDEA 阿里云多模块部署
- Why is digital transformation so difficult?!
- 匿名方法和lambda表达式使用的区别
- How to implement Devops with automation tools | including low code and Devops application practice
- Win11 how to close a shared folder
- How to balance open utilization and privacy security compliance of public data?
- Interface comparator
- About the idea plug-in I wrote that can generate service and mapper with one click (with source code)
- Are CRM and ERP the same thing? What's the difference?
猜你喜欢

40个高质量信息管理专业毕设项目分享【源码+论文】(六)

限流对比:Sentinel vs Hystrix 到底怎么选?

Alibaba Cloud Toolkit —— 项目一键部署工具

【飞控开发基础教程3】疯壳·开源编队无人机-串口(基础收发)

Marxan model, reserve optimization and protection vacancy selection technology, application in invest ecosystem
![[Development Tutorial 9] crazy shell arm function mobile phone-i2c tutorial](/img/9d/2a1deca934e6d56d729922b1d9e515.png)
[Development Tutorial 9] crazy shell arm function mobile phone-i2c tutorial

PyQt5快速开发与实战 3.2 布局管理入门 and 3.3 Qt Designer实战应用

Win11 auto delete file setting method

Wechat applet - network data request

Relationship between standardization, normalization and regularization
随机推荐
How does win11 automatically clean the recycle bin?
【飞控开发基础教程3】疯壳·开源编队无人机-串口(基础收发)
【开发教程7】疯壳·开源蓝牙心率防水运动手环-电容触摸
Chapter 1 Overview - Section 1 - 1.3 composition of the Internet
40个高质量信息管理专业毕设项目分享【源码+论文】(六)
Response对象-响应字符数据
Stop using xshell and try this more modern terminal connection tool
NUC 11 build esxi 7.0.3f install network card driver-v2 (upgraded version in July 2022)
Pack tricks
[untitled]
Idea Alibaba cloud multi module deployment
Quickly build a development platform for enterprise applications
[classification] vgg16 training record
Guetzli simple to use
Pyqt5 rapid development and practice 3.2 introduction to layout management and 3.3 practical application of QT Designer
PXE efficient batch network installation
极大似然估计
OA项目之我的会议(会议排座&送审)
Who is safe to open the VIP account of CICC securities?
How to use C language nested linked list to realize student achievement management system