当前位置:网站首页>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 .
边栏推荐
- Guangzhou Municipal Safety Committee Office issued warnings and reminders on safety precautions in hot weather
- How to balance open utilization and privacy security compliance of public data?
- Are CRM and ERP the same thing? What's the difference?
- Vs2017 opens the project and prompts the solution of migration
- My SQL is OK. Why is it still so slow? MySQL locking rules
- What does it mean to lock financial products regularly? Can financial products be redeemed during the lock-in period?
- ES:Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes
- 【飞控开发基础教程1】疯壳·开源编队无人机-GPIO(LED 航情灯、信号灯控制)
- 广东首例!广州一公司未履行数据安全保护义务被警方处罚
- [basic course of flight control development 1] crazy shell · open source formation UAV GPIO (LED flight information light and signal light control)
猜你喜欢

Difference between C event and delegation

Win11 how to close a shared folder

37.【重载运算符的类别】

Nacos win10 安装配置教程
Final consistency distributed transaction TCC

Digital intelligence transformation, management first | jnpf strives to build a "full life cycle management" platform

Tdengine landed in GCL energy technology, with tens of billions of data compressed to 600gb

FIR filter design

2022 Niuke summer multi school training camp 1 (acdgij)

浅谈云原生边缘计算框架演进
随机推荐
2022软件测试技能 Postman+newman+jenkins 持续集成 实战教程
Tensorflow Lite source code analysis
Marketing guide | several common micro blog marketing methods
[fluent -- advanced] packaging
Thinkphp历史漏洞复现
[basic course of flight control development 2] crazy shell · open source formation UAV - timer (LED flight information light and indicator light flash)
Current limiting comparison: how to choose sentinel vs hystrix?
理财产品锁定期是什么意思?理财产品在锁定期能赎回吗?
How to implement Devops with automation tools | including low code and Devops application practice
【无标题】
It turns out that cappuccino information security association does this. Let's have a look.
Video media video
Stop using xshell and try this more modern terminal connection tool
Nacos win10 installation and configuration tutorial
如何保证缓存和数据库一致性
Nacos win10 安装配置教程
Marxan model, reserve optimization and protection vacancy selection technology, application in invest ecosystem
PyQt5快速开发与实战 3.4 信号与槽关联
限流对比:Sentinel vs Hystrix 到底怎么选?
接口比较器