《网络通信》Chapter 7 Data Link Control

Bilingual Course Network Communications 网络通信 (For Master Students in the Department of Electronic Engineering) Chapter 7 Data Link Control Instructor: Dr. Tianshuang Qiu School of the Electronic and Information Engineering Fall of 2004
1 Bilingual Course Network Communications 网络通信 (For Master Students in the Department of Electronic Engineering) Chapter 7 Data Link Control Instructor: Dr. Tianshuang Qiu School of the Electronic and Information Engineering Fall of 2004

Background 在分层协议(特别是OSI协议)体系中,包含一个数据 链路层 为什么需要数据链路层 Because of the possibility of transmission errors, and because the receiver of data may need to regulate the rate at which data arrives It is necessary to impose(fE JA) a layer of control in each communicating device that provides functions such as flow control error detection, and error control. This layer of control is know as a data link control protocol 数据链路层:实现实体之间链路的建立,维护和拆除, 形成可用的连接。 数据链路:在使用数据链路控制协议时,系统之间的 传输媒体称为数据链路
2 Background • 在分层协议(特别是OSI协议)体系中,包含一个数据 链路层。 • 为什么需要数据链路层 – Because of the possibility of transmission errors, and because the receiver of data may need to regulate the rate at which data arrives. It is necessary to impose(施加)a layer of control in each communicating device that provides functions such as flow control, error detection, and error control. This layer of control is know as a data link control protocol. • 数据链路层:实现实体之间链路的建立,维护和拆除, 形成可用的连接。 • 数据链路:在使用数据链路控制协议时,系统之间的 传输媒体称为数据链路

数据链路控制的主要功能 线路规程 解决现在时刻该谁发送的问题 流量控制 负责调整某个时间间隙中可以发送多少数据。使接收方能够调整来 自发送方的数据流,以防止接收方出现溢出 差错控制 检测和纠正传输错误。 差错检测的实现:依靠差错检测码的计算实现,它是传输比特的 个函数。差错检测码通常附加在传输的数据位之后。接收方根据接 收到的比特计算出差错检测码,然后将其与收到的差错检测码比较 以检查是否有差错 差错控制的实现:通过重传损坏帧来实现
3 数据链路控制的主要功能 • 线路规程 – 解决现在时刻该谁发送的问题 • 流量控制 – 负责调整某个时间间隙中可以发送多少数据。使接收方能够调整来 自发送方的数据流,以防止接收方出现溢出。 • 差错控制 – 检测和纠正传输错误。 – 差错检测的实现:依靠差错检测码的计算实现,它是传输比特的一 个函数。差错检测码通常附加在传输的数据位之后。接收方根据接 收到的比特计算出差错检测码,然后将其与收到的差错检测码比较, 以检查是否有差错。 – 差错控制的实现:通过重传损坏帧来实现

数据链路控制的要求和目标 Frame synchronization: Data are sent in blocks called frames. The beginning and end of each frame must be recognizable Flow control: The sending station must not send frames at a rate faster than the receiving station can absorb them Error control: Bit errors introduced by the transmission system should be corrected Addressing: On a multipoint line, such as a local area network (LAN), the identity of the two stations involved in a transmission must be specified Control and data on same link: It is usually not desirable to have a physically separate communications path for control information. Accordingly the receiver must be able to distinguish control information from the data being transmitted Link management. The initiation maintenance and termination of a sustained (持续的) data exchange requires a fair amount of coordination and cooperation among stations. Procedures for the management of this exchange are required
4 数据链路控制的要求和目标 • Frame synchronization: Data are sent in blocks called frames. The beginning and end of each frame must be recognizable. • Flow control: The sending station must not send frames at a rate faster than the receiving station can absorb them. • Error control: Bit errors introduced by the transmission system should be corrected. • Addressing: On a multipoint line, such as a local area network (LAN), the identity of the two stations involved in a transmission must be specified. • Control and data on same link: It is usually not desirable to have a physically separate communications path for control information. Accordingly, the receiver must be able to distinguish control information from the data being transmitted. • Link management: The initiation, maintenance and termination of a sustained (持续的)data exchange requires a fair amount of coordination and cooperation among stations. Procedures for the management of this exchange are required

§7-1线路规程 种方式 询问应答模式( Enquiry/ Acknowledge 常在专用链路中使用 负责协调哪个设备可以开始传输 工作方式: (1)启动方发一个询问帧(ENQ),问接收方是否可以接收数据 (2)若接收方准备好,回答一个确认帧(ACK),若未准备好, 则回答一个否定帧(NAK) (3)若未收到回答(等待一定时间),则再发一次(一般发三 次) (4)若回答为否定,或三次都无回答,则断开连接。在另一时刻 再重新开始 5)若回答肯定,启动方就可以随时发送数据了; (6)发完时,发方传一个结束帧(EOT)
5 §7-1 线路规程 • 三种方式 1. 询问/应答模式(Enquiry/ Acknowledge) - 常在专用链路中使用; - 负责协调哪个设备可以开始传输 - 工作方式: (1)启动方发一个询问帧(ENQ),问接收方是否可以接收数据; (2)若接收方准备好,回答一个确认帧(ACK),若未准备好, 则回答一个否定帧(NAK); (3)若未收到回答(等待一定时间),则再发一次(一般发三 次); (4)若回答为否定,或三次都无回答,则断开连接。在另一时刻 再重新开始; (5)若回答肯定,启动方就可以随时发送数据了; (6)发完时,发方传一个结束帧(EOT)

询问/应答方式的流程图 A站 B站 ENQ=Enquiry ACQ ACQ=Acknowledge 数据 数据 传输结束 时间
6 询问/应答方式的流程图 ENQ ENQ=Enquiry ACQ ACQ=Acknowledge 数据 应答 数据 应答 传输结束 时间 时间 A站 B站

轮询/选择模式 这种模式用于多点设备结构,但其中某一个为主设备,其余的 为从设备 主设备:控制链路,总是会话的发起者; 从设备:遵从住设备的指令; 工作方式: 1)选择方式一主设备有数据发送,告知从设备准备好接收 (2)轮询方式—主设备希望接收数据,询问从设备有无数据待发。 A B 主设备 地址: 链路上每个设备有自己的名字或地址; 每次传输,数据帧中会建立地址部分(称为地址域或称为报 头)
7 2. 轮询/选择模式 - 这种模式用于多点设备结构,但其中某一个为主设备,其余的 为从设备。 - 主设备:控制链路,总是会话的发起者; - 从设备:遵从住设备的指令; - 工作方式: (1)选择方式—主设备有数据发送,告知从设备准备好接收; (2)轮询方式—主设备希望接收数据,询问从设备有无数据待发。 - 地址: · 链路上每个设备有自己的名字或地址; · 每次传输,数据帧中会建立地址部分(称为地址域或称为报 头) A B C 主设备

(1)选择模式 主设备有数据要发送时: 通知从设备准备好接收; 等待从设备的回答 发送数据之前,主设备产生 个选择祯(SEL),其中包 B 含一个地址域,填入要发送的 主设备 从设备的地址; 数据沿着链路发送时,任 何一个从设备均有可能接收到 此数据。各个从设备都校验数 据中的地址域 数据 若与自己的一致,则读入 应答 若不一致,则放弃 时间 时间 选择C
8 ( 1 ) 选择模式 当主设备有数据要发送时: - 通知从设备准备好接收; - 等待从设备的回答; - 发送数据之前,主设备产生 一个选择祯(SEL),其中包 含一个地址域,填入要发送的 从设备的地址; - 当数据沿着链路发送时,任 何一个从设备均有可能接收到 此数据。各个从设备都校验数 据中的地址域; - 若与自己的一致,则读入; - 若不一致,则放弃 A B C 主设备 SEL ACK 数据 应答 时间 时间 选择C

(2)轮询模式 主设备请求从设备发送数据。 B 主设备 轮询 否定应答 ENQ 数据 应答帧 ENQ 否定应答 时间 时间
9 (2) 轮询模式 主设备请求从设备发送数据。 A B C 主设备 时间 时间 轮询 否定应答 ENQ 数据 应答帧 ENQ 否定应答

§7-2流量控制 为什么要进行流量控制 Flow control is a technique for assuring that a transmitting entity does not overwhelm a receiving entity with data. The receiving entity typically allocates a data buffer of some maximum length for a transfer When data are received. the receiver must do a certain amount of processing before passing the data to the higher level software. In the absence of flow control, the receiver's buffer may fill up and overflow while it is processing old data ·流量控制的方法 (1)停止等待流量控制(Stop-and- Wait Flow Control) (2)滑动窗流量控制( Sliding Window Flow Control)
10 §7-2 流量控制 • 为什么要进行流量控制 – Flow control is a technique for assuring that a transmitting entity does not overwhelm a receiving entity with data. The receiving entity typically allocates a data buffer of some maximum length for a transfer. When data are received, the receiver must do a certain amount of processing before passing the data to the higher level software. In the absence of flow control, the receiver’s buffer may fill up and overflow while it is processing old data. • 流量控制的方法 (1)停止等待流量控制(Stop-and-Wait Flow Control) (2)滑动窗流量控制(Sliding Window Flow Control)
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《网络通信》Chapter 6 The Data Communications Interface.ppt
- 《网络通信》Chapter 5 Signal Encoding.ppt
- 《网络通信》Chapter 4 Transmission Media.ppt
- 《网络通信》Chapter 3 Data Transmission.ppt
- 《网络通信》Chapter 1 Introduction.ppt
- 《网络通信》绪论.ppt
- 《网络通信》进展.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第12章 数据库研究和应用的新领域.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第13章 安全管理.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第9章 存储过程与触发器.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第8章 SQL Server的编程结构.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)附2:第11章B/S应用程序开发.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)附1:第11章C/S应用程序开发.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第11章 数据库应用系统开发 11.4 应用程序设计 11.5 发布、运行与维护.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第11章 数据库应用系统开发 11.3 数据库设计与实施.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第11章 数据库应用系统开发 11.1 概述 11.2 系统需求分析.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第12章 数据库保护.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第7章 表的操作.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第六章 设计数据完整性.ppt
- 云南大学:《数据库系统及应用》课程教学资源(PPT课件讲稿)第5章 表的管理.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第10章 分布式数据库系统的发展趋势.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第11章 数据仓库和数据挖掘.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第2章 分布式数据库系统的设计.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第3章 分布式数据库中的查询处理和优化.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第4章 分布式数据库中的事务管理和恢复.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第5章 分布式数据库中的并发控制.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第6章 分布式数据库中的可靠性.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第7章 分布式数据库的安全性与目录管理.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第8章 分布式数据库与客户机服务器模式.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第9章 分布式数据库与WWW数据库和移动数据库.ppt
- 河南财经政法大学(河南财经学院):《分布式数据库系统及其应用》课程教学资源(PPT课件)第1章 分布式数据库系统概述(主讲:崔明义).ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第1章 C++概述.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第02章 C++程序设计基础.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第03章 函数.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第04章 数组.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第05章 结构体和共用体.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第06章 指针和引用.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第07章 类与数据抽象.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第08章 运算符重载.ppt
- 人民邮电出版社:《C++语言程序设计》课程教学资源(PPT课件讲稿)第09章 继承性.ppt