What is the data link layer? How is the data link layer working?

**Introduction to the Data Link Layer** The data link layer is the second layer in the OSI reference model, positioned between the physical layer and the network layer. Its primary function is to provide reliable data transfer services to the network layer based on the underlying physical layer. The most fundamental service of this layer is to ensure that data from the network layer is accurately delivered to the adjacent node's network layer. To achieve this, the data link layer must implement several key functions, such as framing data into blocks called frames, which serve as the transport unit for this layer. It also manages frame transmission over the physical channel, including error detection and correction, flow control, and the establishment, maintenance, and release of the data link between two communicating entities.

What is the data link layer? How is the data link layer working?

**Data Link Layer Classification** **1. Logical Link Control (LLC) Sublayer** The LLC sublayer of the data link layer is responsible for managing error control and flow control for a single connection between devices. Unlike the MAC layer, it is not tied to any specific physical medium—whether it’s CSMA/CD (802.3) or Token Ring (802.5). It operates independently of the 802.2 standard used in LANs. The LLC supports both connectionless and connection-oriented services for the network layer above it. LLC communicates with upper-layer protocols through Service Access Points (SAPs). Each SAP acts as an address or protocol ID, allowing multiple high-level protocols to coexist using a single interface within the LLC layer. An LLC Protocol Data Unit (LLCPDU) contains fields such as DSAP (Destination SAP), SSAP (Source SAP), a control field, and an information field carrying the actual data. On the receiving end, the DSAP identifies the protocol to which the frame should be delivered. Typically, DSAP and SSAP are the same, as communication occurs between devices using the same protocol. For example, SAP AA represents SNAP (Subnetwork Access Protocol), a vendor-specific protocol used for accessing higher-layer services. SAP 06 corresponds to IP, while SAP FO represents NetBIOS. SAP FF is used for broadcasting global protocols. **SNAP Mechanism** Since the canonical DSAP only has one byte, it is insufficient to distinguish all possible protocols. This is where SNAP comes into play, allowing vendor-specific protocols to be carried within the LLC frame. A SNAP frame includes three bytes for the manufacturer identifier and two bytes for the protocol type. There are two versions of Ethernet: IEEE (802.2, 802.3) and DIX (DEC, Intel, Xerox), also known as V2 Ethernet. In DIX, the Type field follows the source address, whereas in IEEE Ethernet, the frame length is indicated after the source address. This is followed by the standard LPDU encapsulation, including DSAP, SSAP, control field, and data. Ethernet cards can be configured via jumpers or software to select the appropriate version, with DIX being the most commonly used due to its widespread adoption. **2. Media Access Control (MAC) Sublayer** The MAC sublayer addresses the issue of how to allocate channel access when multiple devices compete for shared resources in a local area network. It ensures that devices can communicate effectively without collisions. A logical link refers to a communication session between two systems, whether over a physical or logical circuit. These links exist above the physical layer in the OSI model and can be established over various media like copper wire or fiber optics. Communication protocols at lower layers may vary, such as LANs, MANs, or packet-switched networks like Frame Relay. Connection-oriented services require the establishment and maintenance of a session between two endpoints. This creates more overhead but ensures reliability. In contrast, connectionless services do not require a session setup, making them simpler but less reliable. The data link layer is divided into two sublayers: the MAC and the LLC. When a packet is received, it is passed up from the MAC sublayer. If multiple networks are connected, the LLC may forward packets to another network. For instance, a NetWare server might use both Ethernet and Token Ring adapters, and the LLC layer would handle the conversion between these formats. **How the Data Link Layer Works** **1. Framing (Frame Synchronization)** To provide services to the network layer, the data link layer relies on the physical layer, which transmits data as a bit stream. However, this bit stream may contain errors, such as missing or extra bits, or incorrect values. To manage this, the data link layer uses frames—data blocks that allow for efficient error control. Framing enables the retransmission of only the corrupted frame rather than the entire bit stream, improving efficiency. However, it introduces challenges such as identifying frame boundaries and distinguishing between new and retransmitted frames. Various frame synchronization techniques help the receiver detect the start and end of each frame and recognize retransmissions.

What is the working principle of the data link layer?
What is the working principle of the data link layer?

**2. Error Control** During data communication, errors can occur due to factors like signal interference or environmental conditions. The data link layer implements error control to ensure accurate transmission. Common methods include Forward Error Correction (FEC), Automatic Repeat Request (ARQ), Hybrid Error Correction (HEC), and Information Return Queue (IRQ). FEC adds redundant bits to the data, allowing the receiver to detect and correct errors automatically. It is ideal for real-time applications. ARQ, on the other hand, detects errors and requests retransmission if necessary. It is widely used in non-real-time communication due to its simplicity and strong error detection capability. **3. Flow Control** Flow control ensures that the sender does not overwhelm the receiver with data. It regulates the transmission rate so that the receiver can process incoming data efficiently. This prevents data loss and maintains orderly communication. **4. Link Control** The data link layer manages the establishment, maintenance, and release of data links. Before communication begins, the sender checks if the receiver is ready. Once the connection is established, it remains active during data transfer and is released once the communication ends. **5. MAC Addressing** The MAC sublayer handles addressing, using MAC addresses—also known as physical or hardware addresses—burned into network interface cards. These addresses ensure that data is correctly routed across a network, especially in multipoint connections. **6. Differentiating Data and Control Information** Since data and control information share the same channel, the data link layer must ensure that the receiver can distinguish between them. This prevents the misinterpretation of control signals as actual data. **7. Transparent Transmission** Transparent transmission allows any combination of bits to be sent without modification. Special techniques are used to prevent data that resembles control information from being misinterpreted, ensuring seamless data transfer. **Common Data Link Layer Protocols** The data link layer supports various protocols depending on the network type. Examples include Ethernet, Token Ring, FDDI, serial lines, X.25, Frame Relay, and ATM. In the early days, different companies developed their own standards, leading to the division of the link layer into LLC and MAC. With the rise of Ethernet, the data link layer primarily focused on the MAC layer, using Ethernet frame formats.

Fusion Splicer Accessories

Guangdong Tumtec Communication Technology Co., Ltd , https://www.gdtumtec.com