The data link layer is the protocol layer in a program that handles how data moves in and out of a physical link in a network. The data link layer is Layer 2 in the Open Systems Interconnection (OSI) architecture model for a set of telecommunication protocols.
The data link layer encodes, decodes and organizes data bits in the data link layer before it transports the data bits as frames between two adjacent nodes on the same local area network (LAN) or wide area network. The data link layer also determines how devices recover from collisions that might occur when nodes attempt to send frames at the same time.Data Link Layer
Read
Courses
Jobs
The data link layer is the second layer from the bottom in the OSI (Open System Interconnection) network architecture model. It is responsible for the node-to-node delivery of data. Its major role is to ensure error-free transmission of information. DLL is also responsible for encoding, decode and organizing the outgoing and incoming data. This is considered the most complex layer of the OSI model as it hides all the underlying complexities of the hardware from the other above layers.
Sub-layers of the Data Link Layer
The data link layer is further divided into two sub-layers, which are as follows:
Logical Link Control (LLC)
This sublayer of the data link layer deals with multiplexing, the flow of data among applications and other services, and LLC is responsible for providing error messages and acknowledgments as well.
Media Access Control (MAC)
MAC sublayer manages the device’s interaction, responsible for addressing frames, and also controls physical media access.
The data link layer receives the information in the form of packets from the Network layer, it divides packets into frames and sends those frames bit-by-bit to the underlying physical layer.
Functions of the Data-link Layer
There are various benefits of data link layer s let’s look into it.
Data Link Layer
Framing
The packet received from the Network layer is known as a frame in the Data link layer. At the sender’s side, DLL receives packets from the Network layer and divides them into small frames, then, sends each frame bit-by-bit to the physical layer. It also attaches some special bits (for error control and addressing) at the header and end of the frame. At the receiver’s end, DLL takes bits from the Physical layer organizes them into the frame, and sends them to the Network layer.
Addressing
The data link layer encapsulates the source and destination’s MAC address/ physical address in the header of each frame to ensure node-to-node delivery. MAC address is the unique hardware address that is assigned to the device while manufacturing.
Error Control
Data can get corrupted due to various reasons like noise, attenuation, etc. So, it is the responsibility of the data link layer, to detect the error in the transmitted data and correct it using error detection and correction techniques respectively. DLL adds error detection bits i
2. CSC 450/550
Summary
Part A Functions
(1) Functions of the data link layer
(2) Framing
(3) Error control
(3.1) Error detection
(3.2) Error correction
(4) Flow control
Part B Protocols
(1) Definitions
(2) Elementary data link protocols
(3) Sliding window protocols
(4) Example data link protocol - PPP
4. CSC 450/550
(1) Functions of the Data Link Layer
•Provide service interface to the network layer
•Dealing with transmission errors
•Regulating data flow
•Slow receivers not swamped by fast senders
6. CSC 450/550
(2.2) Framing
(a) A frame delimited by flag bytes.
(b) Four examples of byte sequences before and after
stuffing.
7. CSC 450/550
(2.3) Framing
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receiver’s memory after destuffing.
8. CSC 450/550
(2.4) Framing
Physical Layer Coding Violations:
Used only when physical medium contains some redundancy
1: high-low
0: low-high
high-high and low-low are used for delimiting frames
15. CSC 450/550
(2) Elementary Data Link Protocols
• An Unrestricted Simplex Protocol
• A Simplex Stop-and-Wait Protocol
• A Simplex Protocol for a Noisy Channel
18. CSC 450/550
(2.3.1)A Simplex Protocol for a Noisy Channel
A positive
acknowledgement
with retransmission
protocol.
Continued
19. CSC 450/550
(2.3.2) A Simplex Protocol for a Noisy Channel (ctd.)
A positive acknowledgement with retransmission protocol.
20. CSC 450/550
(3) Sliding Window Protocols
A One-Bit Sliding Window Protocol
A Protocol Using Go Back N
A Protocol Using Selective Repeat
21. CSC 450/550
(3) Sliding Window Protocols (2)
A sliding window of size 1, with a 3-bit sequence number.
(a) Initially.
(b) After the first frame has been sent.
(c) After the first frame has been received.
(d) After the first acknowledgement has been received.
24. CSC 450/550
(3.1.3) A One-Bit Sliding Window Protocol
Two scenarios for protocol 4. (a) Normal case. (b) Abnormal case.
The notation is (seq, ack, packet number). An asterisk indicates where
a network layer accepts a packet.
25. CSC 450/550
(3.2.1) A Protocol Using Go Back N
Pipelining and error recovery. Effect on an error when
(a) Receiver’s window size is 1.
(b) Receiver’s window size is large.
35. CSC 450/550
(3.3.5) A Sliding Window Protocol Using Selective Repeat
(a) Initial situation with a window size seven.
(b) After seven frames sent and received, but not acknowledged.
(c) Initial situation with a window size of four.
(d) After four frames sent and received, but not acknowledged.