data link layer
The task of the data link layer is to convert the raw bit stream
offered by the physical layer into a stream of frames for use by the network
layer. Various framing methods are used, including character count, byte
stuffing, and bit stuffing. Data link protocols can provide error control to
retransmit damaged or lost frames. To prevent a fast sender from overrunning a
slow receiver, the data link protocol can also provide flow control. The
sliding window mechanism is widely used to integrate error control and flow
control in a convenient way.
Sliding window protocols can be categorized by the size of the
sender's window and the size of the receiver's window. When both are equal to
1, the protocol is stop-and-wait. When the sender's window is greater than 1,
for example, to prevent the sender from blocking on a circuit with a long
propagation delay, the receiver can be programmed either to discard all frames
other than the next one in sequence or to buffer out-of-order frames until they
are needed.
Protocol 1 is designed
for an error-free environment in which the receiver can handle any flow sent to
it. Protocol 2 still assumes an error-free environment but introduces flow
control. Protocol 3 handles errors by introducing sequence numbers and using
the stop-and-wait algorithm. Protocol 4 allows bidirectional communication and
introduces the concept of piggybacking. Protocol 5 uses a sliding window
protocol with go back n. Finally, protocol 6 uses selective repeat and negative
acknowledgements.
Protocols can be modeled using various techniques to help
demonstrate their correctness (or lack thereof). Finite state machine models
and Petri net models are commonly used for this purpose.
Many networks use one of the bit-oriented protocols—SDLC,
HDLC, ADCCP, or LAPB—at the data link level. All of these protocols use flag
bytes to delimit frames, and bit stuffing to prevent flag bytes from occurring
in the data. All of them also use a sliding window for flow control. The
Internet uses PPP as the primary data link protocol over point-to-point lines.
No comments:
Post a Comment
silahkan membaca dan berkomentar