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)