Data Link Layer Protocols and Switching Fundamentals
1. Elementary Data Link Protocols
Elementary Data Link Protocols are basic communication protocols used at the Data Link Layer of the OSI Model. They explain how data is transmitted between two devices and introduce concepts like flow control and error control in a simple way.
Types of Elementary Data Link Protocols
1. Unrestricted Simplex Protocol
- Communication is one-way (simplex).
- Sender continuously sends frames without waiting.
- No error control or flow control.
- Assumes receiver can handle all incoming data.
- Advantage: Very simple and fast.
- Disadvantage: Not reliable.
2. Simplex Stop-and-Wait Protocol
- Sender sends one frame at a time.
- Waits for ACK (acknowledgment) before sending the next frame.
- Provides flow control.
- Advantage: Prevents receiver overload.
- Disadvantage: Low efficiency due to waiting time.
3. Simplex Protocol for Noisy Channels
- Designed for error-prone (noisy) channels.
- Uses ACK/NAK for feedback.
- Frames are retransmitted if errors occur.
- Introduces error detection techniques (e.g., checksum, CRC).
- Advantage: Reliable communication.
- Disadvantage: Increased delay due to retransmissions.
Key Features
- Operate at the Data Link Layer.
- Provide flow control and error control.
- Serve as the foundation for advanced protocols like Sliding Window.
2. Sliding Window Protocol
The Sliding Window Protocol is a data link layer protocol used for efficient and reliable data transmission. It allows the sender to transmit multiple frames before needing an acknowledgment, unlike the Stop-and-Wait protocol.
Concept
- The sender maintains a window size, which is the number of frames it can send without waiting for acknowledgment.
- The receiver also maintains a window to accept frames.
- As acknowledgments (ACKs) are received, the window slides forward, allowing new frames to be sent.
- Each frame is assigned a sequence number for tracking.
Working
- Sender sends multiple frames within the window size.
- Receiver sends acknowledgments for received frames.
- When ACK is received, the sender shifts (slides) the window forward.
- Lost or damaged frames are retransmitted.
Types of Sliding Window Protocols
1. Go-Back-N Protocol
- Sender can send several frames continuously.
- If one frame is lost or damaged, all subsequent frames are retransmitted.
- Simple but less efficient.
2. Selective Repeat Protocol
- Only the specific lost or corrupted frames are retransmitted.
- More efficient but complex.
3. Multiple Access Protocols
A Multiple Access Protocol is a set of rules that allows multiple devices to share a common communication channel without conflicts. It operates at the Data Link Layer of the OSI Model and is mainly used in broadcast networks.
Need for Multiple Access Protocols
- Many devices use the same communication medium.
- If two devices transmit at the same time, a collision occurs.
- These protocols help in avoiding or handling collisions.
- Ensure efficient and fair use of the channel.
Types of Multiple Access Protocols
1. Random Access Protocols
- Devices transmit data randomly.
- Collisions may occur but are detected and resolved.
- Examples:
- ALOHA: Simple protocol; devices send data anytime.
- Slotted ALOHA: Time is divided into slots to reduce collisions.
- CSMA: Device checks channel before sending.
- CSMA/CD: Detects collisions (used in Ethernet).
- CSMA/CA: Avoids collisions (used in Wi-Fi).
2. Controlled Access Protocols
- Devices transmit data in a controlled manner to avoid collisions.
- Examples:
- Polling: One device controls who can transmit.
- Token Passing: A token circulates; only the holder can send data.
3. Channelization Protocols
- Channel is divided into parts for multiple users.
- Examples:
- FDMA: Frequency Division Multiple Access.
- TDMA: Time Division Multiple Access.
- CDMA: Code Division Multiple Access.
Collision-Free Protocols
A Collision-Free Protocol is a type of multiple access protocol designed to ensure that no two devices transmit data at the same time, thereby avoiding collisions completely.
Types of Collision-Free Protocols
1. Bit-Map Protocol
- Each device is assigned a time slot (bit position).
- Devices indicate their intention to transmit using a bit map.
- Advantage: No collisions.
- Disadvantage: Delay increases with the number of devices.
2. Token Passing Protocol
- A special control frame called a token is passed among devices.
- Only the device holding the token can transmit data.
- Advantage: Fair and collision-free.
3. Binary Countdown Protocol
- Devices transmit their binary addresses bit by bit.
- The device with the highest priority (largest address) wins.
- Advantage: Efficient priority handling.
Wireless LANs (WLANs)
A Wireless Local Area Network (WLAN) is a network that allows devices to connect and communicate without physical cables, using radio waves. WLANs are commonly based on the IEEE 802.11 standard.
Components of WLAN
- Access Point (AP): Central device that connects wireless devices.
- Wireless Stations: Devices such as mobiles, laptops, and tablets.
- Wireless Medium: Uses radio frequency signals for communication.
Types of WLAN
- Infrastructure Mode: Devices communicate through an Access Point.
- Ad-hoc Mode: Devices communicate directly with each other.
Data Link Layer Switching
Data Link Layer Switching refers to the process of forwarding frames between devices within the same network using Layer 2 devices (switches). It uses MAC addresses for communication.
Switching Methods
- Store-and-Forward: Entire frame is received before forwarding; error checking is performed.
- Cut-Through: Frame is forwarded as soon as the destination address is read.
- Fragment-Free: Checks the first 64 bytes before forwarding.
