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 Slidng Window ARQ. |