To properly learn something, we have to start at the beginning. We will be learning one concept at a time, process it, and move to the next.
The goal is consistent learning and absorbing information while feeling engaged and not overwhelmed.
I have divided the data link layer articles in five parts.
- Introduction to Data link layer
- Error Detection and Correction in Data link layer
- Flow and Error Control in Data link layer
- Protocols used in Data link layer
- Switches in Data link layer
Goal of this article
I will be giving the introduction of the data link layer of the TCP/IP Five-layer network model.
The Data Link Layer
The second layer of the TCP/IP Five-layer model is the data link layer.
The data link layer contains information in the form of frames.
The data link layer hides the details of the underlying hardware and represents itself to the upper layer as the medium to communicate.
Sender side: The data link layer is responsible for converting data stream to signals bit by bit and sending that over the underlying hardware.
Receiver Side: The data link layer picks up data from hardware that are in the form of electrical signals, assembles them in a recognizable frame format, and hands them over to the upper layer.
Data link layer is sub-divided in two layers:
- Logical Link Control: It deals with protocols, flow-control, and error control
- Media Access Control: It deals with actual control of media
Functions of Data Link Layer
Receiver side: The data link layer picks up signals from hardware and assembles them into frames.
Sender Side: The data link layer takes packets from the network layer and encapsulates them into Frames. Then, it sends each frame bit-by-bit on the hardware.
A-frame consists of a data field, in which the network-layer
datagram is inserted, and several header fields. The structure of the frame is specified by the data link layer protocol.
The data link layer is implemented in a network adapter.
Network adapter is a single, special-purpose chip that implements many of the data link layer services (framing, link access, error detection, and so on). Thus, much of a link-layer controller’s functionality is implemented in hardware.
The data link layer provides layer-2 hardware addressing mechanism.
The hardware address is assumed to be unique on the link. It is encoded into hardware at the time of manufacturing.
Sometimes signals may have encountered problems in transition and the bits are flipped. These errors are detected and attempted to recover actual data bits.
The data link layer also provides an error reporting mechanism to the sender.
- The Data-link layer ensures flow control that enables machines to exchange data at the same speed.
A medium access control (MAC) protocol specifies the rules by which a frame is transmitted onto the link.
For point-to-point links that have a single sender at one end of the link and a single receiver at the other end of the link, the MAC protocol is simple (or nonexistent)—the sender can send a frame whenever the link is idle.
When a host on the shared link tries to transfer the data, it has a high probability of collision(multiple access problem). The Data-link layer provides mechanisms to equip the capability of accessing a shared media among multiple Systems. Here, the MAC protocol serves to coordinate the frame transmissions of the many nodes.
Did you find this post useful?
I would be grateful if you let me know by sharing it on Twitter!
Follow me @ParthS0007 for more tech and blogging content :)