Lec-21: Data link layer in computer Networks and its Responsibilities
Introduction to Data Link Layer
In this section, the speaker introduces the topic of the data link layer in the OSI model and explains its position between the network layer and physical layer. The responsibilities and functionalities of the data link layer are discussed.
Data Link Layer Responsibilities
- Hop to hop delivery is one of the main responsibilities of the data link layer. It ensures that data is delivered from one node to another within a network.
- The data link layer facilitates communication within a network by using MAC addresses or physical addresses.
- It is responsible for moving data from source to destination through routers or nodes, ensuring proper delivery along the way.
- The primary function of the data link layer is node-to-node or hop-to-hop delivery.
Flow Control
- Flow control is another important responsibility of the data link layer.
- Flow control involves controlling the speed at which messages are sent from a source to a destination or hop.
- Proper flow control prevents message overload and ensures efficient communication.
Other Functionalities of Data Link Layer
This section explores additional functionalities and responsibilities of the data link layer.
Error Control
- Error control is an essential functionality provided by the data link layer.
- It detects and corrects errors that may occur during transmission, ensuring reliable delivery of data.
Access Control
- Access control is another responsibility of the data link layer.
- It manages access to shared resources, such as media or channels, preventing collisions and ensuring fair usage among connected devices.
Framing
- Framing refers to dividing a stream of bits into manageable frames at the sender's end.
- Frames include necessary information like start and stop flags, addressing information, error detection codes, etc., facilitating proper transmission and reception.
Media Access Control (MAC)
- MAC is a sublayer of the data link layer responsible for controlling access to the physical medium.
- It determines how devices share and transmit data over a shared medium, such as Ethernet.
Logical Link Control (LLC)
- LLC is another sublayer of the data link layer that provides services to the network layer.
- It handles flow control, error control, and framing for communication between network entities.
Conclusion
The speaker concludes by summarizing the responsibilities and functionalities of the data link layer in the OSI model.
Summary
- The data link layer plays a crucial role in facilitating communication within a network.
- Its responsibilities include hop-to-hop delivery, flow control, error control, access control, framing, MAC, and LLC.
- By ensuring reliable transmission and reception of data, the data link layer contributes to efficient network communication.
Flow Control in Data Link Layer
This section discusses the flow control algorithms used in the data link layer and the role of flow control in the transport layer.
Stop and Wait Protocol
- Stop and wait protocol is one of the flow control algorithms used in the data link layer.
- It ensures that only one message is sent at a time, and the sender waits for an acknowledgment before sending the next message.
Go-back-N
- Go-back-N is another flow control algorithm used in the data link layer.
- It allows multiple messages to be sent without waiting for acknowledgments, but if an error occurs, all subsequent messages are retransmitted.
Selective Repeat
- Selective repeat is a third flow control algorithm used in the data link layer.
- It allows individual messages to be retransmitted if errors occur, rather than resending all subsequent messages.
Flow Control Functionality
- Flow control determines how much data can be sent from source to destination.
- In the transport layer, flow control ensures that the destination machine can handle incoming messages.
- The size of window at B1 (destination) determines how many messages it can accept.
Hop-to-Hop Delivery
- Messages travel from source to destination through intermediate nodes (hops).
- Data link layer's flow control helps regulate message transmission from node to node, not directly from source to destination.
Redundancy of Error Control
- Error control is another responsibility of the data link layer.
- Error detection and correction methods like CRC (Cyclic Redundancy Check) and checksum are used.
- Error checking is done both in the data link layer (hop-to-hop) and transport layer (source-to-destination).
Efficiency Considerations
- Detecting errors earlier would improve performance by avoiding unnecessary retransmissions.
- However, detecting errors at intermediate nodes would require resending the message, resulting in time-consuming retransmissions.
- Therefore, error detection is primarily done at the destination to minimize delays.
Access Control
- Access control is another functionality of the data link layer.
- Methods like CSMA/CD (Carrier Sense Multiple Access with Collision Detection), Aloha, slotted Aloha, token ring, and token bus are used for access control.
Error Control in Data Link Layer
This section focuses on error control in the data link layer and the importance of detecting and correcting errors during message transmission.
Error Control Responsibility
- The data link layer is responsible for error control.
- It detects errors during message transmission from hop to hop.
Types of Errors
- Errors can occur when bits change during transmission.
- Single bit errors or burst errors (multiple bits changed) can occur.
Error Detection
- Error detection methods are used to identify errors in transmitted messages.
- CRC (Cyclic Redundancy Check) and checksum are commonly used methods for error detection in the data link layer.
Resending Messages
- When an error is detected at a node, an acknowledgment is sent back to the sender indicating that there was an error.
- The sender then resends the message to ensure its successful delivery.
Efficiency Considerations in Error Control
This section discusses efficiency considerations in error control and why it is more efficient to detect errors at intermediate nodes rather than waiting until the destination.
Detecting Errors Earlier
- Detecting errors earlier would improve performance by minimizing delays caused by retransmissions.
- If errors were detected at intermediate nodes (R1 or R2), they could inform the sender (A4) to resend the message sooner.
Hop-to-Hop Error Detection
- By performing error detection at intermediate nodes, it becomes more efficient to resend messages in case of errors.
- This approach reduces the time-consuming process of resending messages after they have reached the destination (B1).
Access Control in Data Link Layer
This section focuses on access control, which is another functionality of the data link layer.
Access Control Methods
- CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is a commonly used method for access control in the data link layer.
- Other methods include Aloha, slotted Aloha, token ring, and token bus.
Purpose of Access Control
- Access control ensures that multiple devices can share a common communication medium without causing collisions or conflicts.
Conclusion
The transcript covers various aspects of the data link layer, including flow control, error control, and access control. It emphasizes the importance of detecting and correcting errors during message transmission and discusses efficiency considerations in error control. Additionally, it highlights different methods used for access control in the data link layer.
Access Control and Channel Usage
This section discusses the problem of message collisions when multiple devices try to send messages through a shared channel. It introduces the concept of access control in the data link layer to ensure that only one device sends a message at a time.
Access Control and Message Collisions
- When multiple devices are connected through a shared channel, such as a thick wire with high bandwidth, there is a problem of message collisions.
- If two or more devices start sending messages simultaneously, the messages will collide and lose their value.
- The data link layer is responsible for access control, ensuring that only one device can send a message at a time.
- Different methods are used to achieve access control in the data link layer.
Physical Address and MAC Address
- The data link layer also handles the functionality of physical addresses or MAC addresses.
- A physical address is a fixed 48-bit address that is constant within a network.
- MAC address can be used for communication within the same network but not across different networks.
Framing and Reliability
- In the data link layer, packets from the network layer are divided into fixed-size frames.
- Frames include headers and tails added by the data link layer to ensure reliable transmission of messages.
- Frames act like coaches in a train, with headers in front and tails at the end, ensuring proper delivery.
Responsibility of Data Link Layer
- The responsibilities of the data link layer include access control, handling physical addresses (MAC addresses), framing packets into frames, and ensuring reliable transmission from hop to hop (station to station).
Responsibilities of Data Link Layer
This section emphasizes that the responsibility of the data link layer is to ensure proper transmission from hop to hop (station to station) rather than from source to destination. It highlights the importance of data link layer in routing messages between different stations.
Hop-to-Hop Transmission
- The data link layer is responsible for transmitting messages from one station (hop) to another in a network.
- It ensures that messages reach their next hop properly, enabling communication between different stations.
Importance of Data Link Layer
- Using the analogy of a train journey, the data link layer's responsibility is similar to how a train reaches its intermediate stations before reaching the final destination.
- The data link layer handles routing from one hop to another, ensuring proper transmission and delivery of messages.
Conclusion
The transcript discusses access control in the data link layer to prevent message collisions and ensure reliable transmission. It also highlights the role of physical addresses (MAC addresses), framing packets into frames, and the responsibility of the data link layer in hop-to-hop transmission. Understanding these concepts is crucial for studying network protocols and communication mechanisms.