0% found this document useful (0 votes)
36 views

Module-2 PPT

The document discusses functions of the data link layer, including using flag bytes with byte stuffing to frame data. Flag bytes mark the start and end of each frame, while an escape byte is inserted before accidental flag bytes in the data to distinguish framing flags. The receiver removes escape bytes before passing data to the network layer in a process called byte stuffing.

Uploaded by

vinutha k
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Module-2 PPT

The document discusses functions of the data link layer, including using flag bytes with byte stuffing to frame data. Flag bytes mark the start and end of each frame, while an escape byte is inserted before accidental flag bytes in the data to distinguish framing flags. The receiver removes escape bytes before passing data to the network layer in a process called byte stuffing.

Uploaded by

vinutha k
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 102

Module-2

The Data Link Layer


Functions of the Data Link Layer
Flag bytes with byte stuffing

• The second framing method gets around the problem of


resynchronization after an error by having each frame start and
end with special bytes.
• Often the same byte, called a flag byte, is used as both the
starting and ending Delimiter.
• Two consecutive flag bytes indicate the end of one frame and
the start of the next.
• Thus, if the receiver ever loses syn- chronization it can just
search for two flag bytes to find the end of the current frame
and the start of the next frame.
Cont..
• It may happen that the flag byte occurs in the data, especially
when binary data such as photographs or songs are being
transmitted.
• This situation would interfere with the framing.
• One way to solve this problem is to have the sender’s data link
layer insert a special escape byte (ESC) just before each
‘‘accidental’’ flag byte in the data.
• Thus, a framing flag byte can be distinguished from one in the
data by the absence or presence of an escape byte before it.
• The data link layer on the receiving end re- moves the escape
bytes before giving the data to the network layer. This techni-
que is called byte stuffing.
Bit

You might also like