1.流量控制:
它是数据链路层的一个重要函数。它是指一组程序,它告诉发送方在等待接收方确认之前可以传输多少数据。
流量控制的目的:
任何接收设备处理传入数据的速度都是有限的,而且存储传入数据的内存量也有限。如果源以比接收器容量更快的速率发送数据,则接收器可能会被淹没。接收器将不断丢失一些帧,因为它们到达得太快并且缓冲区也被填满了。
这将在网络上产生废帧。因此,接收设备必须有某种机制来通知发送方减少发送帧数或暂时停止传输。通过这种方式,流量控制将帧传输速率控制为接收器可以处理的值。
示例 –停止和等待协议
2.错误控制:
数据链路层的差错控制函数检测传输帧中的错误并重新传输所有错误帧。
错误控制的目的:
数据链路层的错误控制函数的函数有助于在处理被在运输过程中损坏的数据帧,在传输过程中丢失的数据帧,并且被在传输中丢失的确认帧。用于错误控制的方法称为自动重复请求,用于噪声信道。
示例 –停止和等待 ARQ 和滑动窗口 ARQ
流量控制和错误控制的区别:
S.NO. | Flow control | Error control |
---|---|---|
1. | Flow control is meant only for the transmission of data from sender to receiver. | Error control is meant for the transmission of error free data from sender to receiver. |
2. | For Flow control there are two approaches : Feedback-based Flow Control and Rate-based Flow Control. | To detect error in data, the approaches are : Checksum, Cyclic Redundancy Check and Parity Checking. To correct error in data, the approaches are : Hamming code, Binary Convolution codes, Reed-Solomon code, Low-Density Parity Check codes. |
3. | It prevents the loss of data and avoid over running of receive buffers. | It is used to detect and correct the error occurred in the code. |
4. | Example of Flow Control techniques are : Stop&Wait Protocol and Sliding Window Protocol. | Example of Error Control techniques are : Stop&Wait ARQ and Sliding Window ARQ. |