Data Link Layer (Data Communications and Networking)

The Data link layer [also called layer 2] is responsible for moving a message from one computer or network device to the next computer or network device in the overall path from sender or receiver. It controls the way messages are sent on the physical media. Both the sender and receiver have to agree on the rules or protocols that govern how they will communicate with each other. A data link protocol determines who can transmit at what time, where a message begins and ends, and how a receiver recognizes and corrects a transmission error. In this topic, we discuss these processes, as well as several important sources of errors.

OBJECTIVES

■ Understand the role of the data link layer

■ Become familiar with two basic approaches to controlling access to the media

■ Become familiar with common sources of error and their prevention

■ Understand three common error detection and correction methods

■ Become familiar with several commonly used data link protocols

INTRODUCTION

In next topic, we introduced the concept of layers in data communications. The data link layer sits between the physical layer and the network layer.

The data link layer is responsible for sending and receiving messages to and from other computers. Its job is to reliably move a message from one computer over one circuit to the next computer where the message needs to go.


The data link layer performs two main functions, and therefore is often divided into two sublayers. The first sublayer (called the logical link control [LLC] sublayer) is the data link layer’s connection to the network layer above it. At the sending computer, the LLC sublayer software is responsible for communicating with the network layer software (e.g., IP) and for taking the network layer Protocol Data Unit (PDU)—usually an IP packet—and surrounding it with a data link layer PDU—often an Ethernet frame. At the receiving computer, the LLC sublayer software removes the data link layer PDU and passes the message it contains (usually an IP packet) to the network layer software.

The second sublayer (called the media access control [MAC] sublayer) controls the physical hardware. The MAC sublayer software at the sending computer controls how and when the physical layer converts bits into the physical symbols that are sent down the circuit. At the receiving computer, the MAC sublayer software takes the data link layer PDU from the LLC sublayer, converts it into a stream of bits, and controls when the physical layer actually transmits the bits over the circuit. At the receiving computer, the MAC sublayer receives a stream of bits from the physical layer and translates it into a coherent PDU, ensures that no errors have occurred in transmission, and passes the data link layer PDU to the LLC sublayer.

Both the sender and receiver have to agree on the rules or protocols that govern how their data link layers will communicate with each other. A data link protocol performs three functions:

• Controls when computers transmit (media access control)

• Detects and corrects transmission errors (error control)

• Identifies the start and end of a message by using a PDU (message delineation)

Next post:

Previous post: