data link layer

I. Overview

1- Data link layer using point-to-point channel
Data link and frame
Three basic questions


2 -Point-to-point protocol PPP
The characteristics of the
PPP protocol The frame format of the
PPP protocol The working state of the PPP protocol


3- Data link layer using broadcast channel
Data link layer
CSMA/CD protocol of local area network


4- Ethernet using broadcast channels
Star topology using hubs
Ethernet's channel utilization
Ethernet's MAC layer


5- Extended Ethernet Extending Ethernet
at the Physical Layer Extending the Ethernet
at the Data Link Layer


6- Fast Ethernet
100BASE-T Ethernet
Gigabit Ethernet
10 Gigabit Ethernet
Broadband Access Using Fast Ethernet


7- Other types of high-speed LAN interfaces

The tasks of the data link layer


1- Assemble the IP datagrams handed over at the network layer into frames


2-Transmit data in frame units on the link between two adjacent nodes


3-Each frame includes data and necessary control information (such as synchronization information, address information, error control and flow control information, etc.).


Synchronization - Control information that enables the receiver to know where a frame begins and where it ends.
Error Control - Control information also enables the receiver to detect errors in the received frame. And error handling can be performed.

3. Channels used by the data link layer

There are mainly two types:


1 - Point-to-point channel.

This channel uses a one-to-one point-to-point communication method.


2- Broadcast channel.

这种信道使用一对多的广播通信方式,因此过程比较复杂。广播信道上连接的主机很多,因此必须使用专用的共享信道协议来协调这些主机的数据发送。

 

四、数据链路与帧

链路(link)是一条无源的点到点的物理线路段,中间没有任何其他的交换结点。
一条链路只是一条通路的一个组成部分。


数据链路(data link) 除了物理线路外,还必须有通信协议来控制这些数据的传输。若把实现这些协议的硬件和软件加到链路上,就构成了数据链路。
       现在最常用的方法是使用适配器(即网卡)来实现这些协议的硬件和软件。
       一般的适配器都包括了数据链路层和物理层这两层的功能。

帧=数据+控制信息

数据链路层传送的是帧

五、三个基本问题
(1) 封装成帧
(2) 透明传输
(3) 差错控制

1

封装成帧(framing)就是在一段数据的前后分别添加首部和尾部,然后就构成了一个帧。
首部和尾部的一个重要作用就是进行帧定界。

透明传输

传输的数据中不允许出现用作帧定界的控制字符,否则会出现帧界定错误。


解决透明传输问题

发送端的数据链路层在数据中出现控制字符“SOH”或“EOT”的前面插入一个转义字符“ESC”。
接收端的数据链路层在将数据送往网络层之前删除插入的转义字符。
这种方法被称为字节填充(byte stuffing)或字符填充(character stuffing)
如果转义字符也出现数据当中,那么应在转义字符前面插入一个转义字符。当接收端收到连续的两个转义字符时,就删除其中前面的一个。

 

3

差错检测


在传输过程中可能会产生比特差错:1 可能会变成 0 而 0 也可能变成 1。
误码率与信噪比有很大的关系。


为了保证数据传输的可靠性,在计算机网络传输数据时,必须采用各种差错检测措施。


在数据链路层传送的帧中,广泛使用了循环冗余检验 CRC 的检错技术(Cyclic Redundancy Check)。


在发送端,先把数据划分为组。假定每组 k 个比特。
假设待传送的一组数据 M = 101001(现在 k = 6)。我们在 M 的后面再添加供差错检测用的 n 位冗余码一起发送。
在数据后面添加上的冗余码称为帧检验序列 FCS (Frame Check Sequence)
接收端对收到的每一帧进行 CRC 检验。

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325065992&siteId=291194637
Recommended