Data Communications and Networking Forouzan Fourth Edition Chapter 11 Data Link Control 数据链路控制 11.1
11.1 Chapter 11 Data Link Control 数据链路控制
数据链路层两个主要功能是: 数据链路控制,用来处理两个相邻节点之间的通信; 介质访问控制,如何共享媒介进行访问控制。下章介 绍) 数据链路控制的功能包括成帧,流量控制和差错控制。 关于差错检测已经在第十章介绍了。 本章主要介绍5个链路控制协议,两个用于无噪声信道, 三个用于有噪声信道。 11.2
11.2 数据链路层两个主要功能是: 数据链路控制,用来处理两个相邻节点之间的通信; 介质访问控制, 如何共享媒介进行访问控制。(下章介 绍) 数据链路控制的功能包括成帧,流量控制和差错控制。 关于差错检测已经在第十章介绍了。 本章主要介绍5个链路控制协议,两个用于无噪声信道, 三个用于有噪声信道
11-1 FRAMING成帧 The data link layer needs to pack bits into frames,so that each frame is distinguishable from another.Our postal system practices a type of framing.The simple act of inserting a letter into an envelope separates one piece of information from another;the envelope serves as the delimiter. 数据链路层需要将一组比特位组成帧,以便帧和帧之间 是可以识别的。邮局系统就实现了成帧方式,信封就是 一种分隔符。 Topics discussed in this section: Fixed-Size Framing固定长度成帧例如第18章的ATM信元 Variable-Size Framing可变长度成帧面向字符和面向比特位 11.3
11.3 11-1 FRAMING 成帧 The data link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter. 数据链路层需要将一组比特位组成帧,以便帧和帧之间 是可以识别的。邮局系统就实现了成帧方式,信封就是 一种分隔符。 Fixed-Size Framing 固定长度成帧 例如第18章的 ATM信元 Variable-Size Framing 可变长度成帧 面向字符和面向比特位 Topics discussed in this section:
Figure1l.1 A frame in a character-oriented protocol面向字符的帧 Data from upper layer Variable number of characters Flag Header Trailer Flag 11.4
11.4 Figure 11.1 A frame in a character-oriented protocol 面向字符的帧
Figure1l.2 Byte stuffing and unstuffing字节填充和移除 Data from upper layer Flag ESC Frame sent Stuffed Flag Header ESC Flag ESC ESC Trailer Flag Extra 2 bytes Frame received Flag Header ESC Flag ESC ESC Trailer Flag Unstuffed Flag ESC Data to upper layer 11.5
11.5 Figure 11.2 Byte stuffing and unstuffing 字节填充和移除
Note Byte stuffing is the process of adding 1 extra byte whenever there is a flag j or escape character in the text. 字节填充是当文本中存在一个标记字符或者 转移字符时,添加一个额外字节的过程。 11.6
11.6 Byte stuffing is the process of adding 1 extra byte whenever there is a flag or escape character in the text. 字节填充是当文本中存在一个标记字符或者 转移字符时,添加一个额外字节的过程。 Note
Figure 11.3 A frame in a bit-oriented protocol面向比特位的帧 Data from upper layer Variable number of bits 01111110 Header 01111010110··11011110 Trailer 01111110 Flag Flag 11.7
11.7 Figure 11.3 A frame in a bit-oriented protocol 面向比特位的帧
Note Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data,so that the receiver does not mistake the pattern 0111110 for a flag. 比特位填充是每五连1时,插入一个比特0的 过程,以便接收方不会误认为是帧的标记。 11.8
11.8 Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag. 比特位填充是每五连1时,插入一个比特0的 过程,以便接收方不会误认为是帧的标记。 Note
Figure11.4 Bit stt4 fing and unstuffing透明的比特位填充和移除达 Data from upper layer 0001111111001111101000 Stuffed Frame sent Flag Header 000111110110011111001000 Trailer Flag Extra 2 bits Frame received Flag Header 000111110110011111001000 Trailer Flag Unstuffed 0001111111001111101000 Data to upper layer 11.9
11.9 Figure 11.4 Bit stuffing and unstuffing 透明的比特位填充和移除过程
11-2 FLOW AND ERROR CONTROL 流量控制和差错控制 The most important responsibilities of the data link layer are flow control and error control.Collectively, these functions are known as data link control. 数据链路层最重要的职能就是流量控制和差错控制。 通常一起称为数据链路控制。 Topics discussed in this section: Flow Control 流量控制 Error Control 差错控制 11.10
11.10 11-2 FLOW AND ERROR CONTROL 流量控制和差错控制 The most important responsibilities of the data link layer are flow control and error control. Collectively, these functions are known as data link control. 数据链路层最重要的职能就是流量控制和差错控制。 通常一起称为数据链路控制。 Flow Control 流量控制 Error Control 差错控制 Topics discussed in this section: