[Back to Lecture Notes page]

The Data Link Layer (DLL)

Sub-topic Outline:

 

The Data Link Layer (DLL)

We want some protocols to have the most reliable and efficient communication between two adjacent machines taking these factors into account.

 

Functions of the Data Link Layer

 

Framing

  1. Character count

    See Fig 3-3 p180

    • Can’t recover from errors because when error occurs, we don’t know where to start reading for the next frame
  2. Starting and ending characters
    • If the a start or end character happen to be in the data itself, stuff another special escape character to indicate that it is not actually a start/end character.

    Eg. See Fig 3-4 p181

  3. Starting and ending bit flags

    See Fig 3-5 p181

    • As in (2), also requires stuffing in case the start/end sequence appears in the data.
  4. Physical layer coding violations

 

Error Control

 

Flow Control

 

A Note about Error and Flow Control

Some protocols at higher-level layers (Network, Transport, Application) do error and flow control themselves as well. That being the case, the obvious question is: why then should services at the Data Link layer (which the other layers depend on) have to do it too?

The answer goes back to the concept of layered software again. The main reason is that we design services at the Data Link layer to give reliable and efficient adjacent machine communication. Different data link protocols will give different levels and types of reliability and efficiency. It is up to the higher layer services which data link protocol they want to depend on. They may choose to use a low-reliability but efficient data-link protocol and implement their own error-checking (for reliability), or they may use a high-reliability, high-efficiency data link protocol and not worry about reliability and efficiency themselves. It’s up to them.

If we start making too many assumptions about the higher layer protocols, we might as well not have the layers, and just design the whole architecture all at once. As I’ve mentioned in the past, that leads to a very complicated design and analysis process.

Another reason for the Data Link layer doing error control, even though some higher layer protocols might already be doing it, is because Data Link services adds extra bits to the frames handed down from the higher layers. They need to ensure these extra bits are transmitted error-free.

Services to the Network Layer

  1. Unacknowledged connectionless service
  2. Acknowledged connectionless service
  3. Acknowledged connection-oriented service

W e don’t consider the case of unacknowledged connection-oriented service because it is not really realistic to go through the overheads of setting up a connection for reliable communication and not then not have acknowledgments to assist in the reliability.

Unacknowledged Connectionless Service

 

Acknowledged Connectionless Service

 

Acknowledged Connection-Oriented Service

  1. Establish connection between two machines – initialise variables and counters to track which frames have been received, which have not.
  2. Send frames
  3. Release connection – free up the buffers used for the variables

 

[Back to Lecture Notes page]