1.
What are the main functions of the Data Link Layer, and why is it essential in network
communication?
Main Functions of the Data Link Layer:
1. Framing
o Breaks the raw bitstream from the Physical Layer into manageable data units
called frames.
o Adds headers and trailers for synchronization and error control.
2. Physical Addressing
o Adds MAC (Media Access Control) addresses to the frame header.
o Ensures that frames are delivered to the correct device on a local network.
3. Error Detection and Handling
o Detects errors that occur in the Physical Layer using methods like CRC (Cyclic
Redundancy Check) or checksum.
o Can request retransmission if errors are found (in certain protocols like HDLC).
4. Flow Control
o Ensures that a fast sender does not overwhelm a slow receiver.
o Techniques like stop-and-wait and sliding window are used.
5. Access Control (Media Access Control)
o Controls how devices on the same medium share access.
o Prevents collisions in shared media using protocols like CSMA/CD (Ethernet) or
CSMA/CA (Wi-Fi).
6. Link Establishment and Termination
o Establishes and terminates logical links between nodes.
Why It’s Essential in Network Communication:
Ensures reliable data transfer over the physical medium.
Prevents data corruption through error detection.
Enables multiple devices to share the same physical medium without interfering with
each other.
Provides a structured way to transmit and receive data, forming the foundation for higher-
level protocols.
2. Explain the difference between flow control and error control in data communication.
Feature Flow Control Error Control
Regulates the rate of data transmission to Detects and corrects errors in
Purpose
prevent receiver overload transmitted data
Managing data flow between sender and Ensuring data integrity and
Focus
receiver accuracy
Problem Handles corrupted, lost, or
Prevents buffer overflow at the receiver
Addressed damaged data
Techniques Stop-and-wait, Sliding window protocols Parity check, Checksum, CRC,
Feature Flow Control Error Control
Used ARQ
Reliable and error-free data
Outcome Smooth, controlled data transmission
communication
When transmission errors or
When Applied When sender is faster than receiver
noise occur
3. Explain Selective Repeat ARQ in detail with its advantages over Go Back N
Selective Repeat ARQ sends multiple frames and waits for individual ACKs for each frame. It
retransmits only the frames that are lost or erroneous, not the entire sequence. The receiver
buffers out-of-order frames until missing ones arrive, ensuring in-order delivery.
Advantages of Selective Repeat ARQ over Go-Back-N ARQ:
Feature Selective Repeat ARQ Go-Back-N ARQ
Retransmits the erroneous frame and all subsequent
Retransmits only the erroneous
Retransmission frames regardless of whether they were received
or lost frames
correctly
More efficient; reduces Less efficient due to retransmission of multiple
Efficiency
unnecessary retransmissions frames
Receiver Receiver buffers out-of-order Receiver discards all frames received after an error
Buffering frames until the missing frame is correctly received
Use of
Better bandwidth utilization Bandwidth wastage due to repeated retransmissions
Bandwidth
More complex due to buffering
Complexity Simpler to implement
and individual ACK handling
Performs better in high-error or Performance degrades significantly with higher error
Performance
long-delay networks rates or delays
4. Describe two major design issues faced when implementing the Data Link Layer.
1. Error Control
Issue: Data transmitted over physical media can be corrupted due to noise, interference,
or signal attenuation.
Challenge: The Data Link Layer must detect and correct errors to ensure reliable
communication.
Solution: Implement error detection methods like parity checks, checksums, or CRC
(Cyclic Redundancy Check), and error recovery protocols such as ARQ (Automatic
Repeat Request) to request retransmission of corrupted frames.
2.framing
Problem: The physical layer only delivers a stream of bits. The data link layer must group these
bits into frames so that the receiver knows where a message starts and ends.
Solutions:
Character Count
Flag bytes with Byte StuffingFlag bits with Bit Stuffle
5. Differentiate between Pure and Slotted ALOHA.
Feature Pure ALOHA Slotted ALOHA
Time is divided into equal slots
Time Division Time is continuous (no slots).
(synchronized).
A station can transmit anytime it has A station can transmit only at the
Transmission
data. beginning of a slot.
Collision Higher – collisions can occur if two Lower – collisions only occur if two
Possibility frames overlap partially or fully. frames start in the same slot.
Efficiency
Maximum throughput ≈ 18% (1/2e) Maximum throughput ≈ 37% (1/e)
(Throughput)
Requires synchronization of time
Synchronization No synchronization required.
slots among stations.
Vulnerability 2 × Frame Time (since overlap 1 × Frame Time (only within the
Period before/after can cause collision). same slot).
6. Define CSMA and explain Persistent Methods used in CSMA protocol.
Definition:
CSMA is a random access protocol in which a station listens to the channel (carrier
sense) before transmitting data.
a. If the channel is idle, the station transmits.
b. If the channel is busy, the station waits (follows a certain persistence
method).Goal: To reduce collisions compared to ALOHA, by not sending data if
the channel is already in use.
Persistence Method
What should a station do if the channel is busy or idle?
There are three method to decide what should a station do if
the channel is busy or idle?
I-persistent method,
Non persistent method,
P-persistent method
The 1-persistent method is simple and straightforward. In this
method, after the station finds the line idle, it sends its frame
immediately (with probability 1).
This method has the highest chance of collision because two
or more stations may find the channel idle and send their
frames immediately.
Ethernet uses this method.
7. Explain Go Back N Sliding window protocol and explain its advantages and
disadvantages.
Working of GBN
1. Sender Side:
o The sender can transmit multiple frames (up to N frames = window size) without
waiting for an ACK.
o Frames are numbered sequentially (modulo-n numbering).
o A timer is maintained for the oldest unacknowledged frame.
2. Receiver Side:
o The receiver only accepts frames in order.
oIf a frame is missing or in error, it discards that frame and all following frames
(even if they are correct).
o Receiver sends cumulative ACK (acknowledges the last correctly received in-
order frame).
3. Error Handling:
o If a frame is lost or an error occurs → the receiver discards it.
o The sender, after timeout, goes back and retransmits from the erroneous/lost
frame onward.
o Hence the name Go-Back-N.
The window at any time divides the possible sequencenumbers into four regions.
The first region, from the far left to the left wall of thewindow, defines the sequence numbers belonging
to framesthat are already acknowledged.
Cont..The second region, defines the range of sequence numbersbelonging to the frames that are sent
but not acknowledged.
These are outstanding frames.The third range, defines the range of sequence numbers forframes that
can be sent; however, the corresponding datapackets have not yet been received from the network
layer.Finally, the fourth region defines sequence numbers that cannotbe used until the window slides.
Advantages of GBN
1. Better Utilization of Bandwidth (compared to Stop-and-Wait, since multiple frames are
sent).
2. Simple Receiver Design (just needs to keep track of the next expected frame).
3. Efficient for Low Error Rates – fewer retransmissions if the channel is reliable.
Disadvantages of GBN
1. Wastage of Bandwidth – if one frame is lost, all subsequent frames (even correct ones)
must be retransmitted.
2. High Retransmission Overhead on noisy channels.
3. Inefficient when Errors are Frequent, since many correct frames are discarded.
8.What is the purpose of error detection and error correction in networking?
Error Detection
When data travels through a network, noise or interference can change some bits.
Example: You send 1011001, but receiver gets 1010001.
Error detection methods (like Parity, Checksum, CRC) help the receiver check if
something went wrong.
👉 Purpose: Find out that data is corrupted.
Error Correction
After detecting an error, we also need to fix it so that correct data is received.
Example: Using Hamming Code, the receiver can detect which bit is wrong and correct
it.
Error correction can be done by:
o Automatic correction (Forward Error Correction)
o Or by asking sender to retransmit (ARQ).
👉 Purpose: Deliver correct data despite errors.
Hamming distance
9. Draw the diagram and explain the process of Single Bit Parity Generator and Checker.
It is Linear Block Code. In this code, k-bit dataword is changed
to an n-bit codeword where n = k + 1.
The extra bit, called the parity bit, is selected in such a way
that total number of I’s in the codeword is even.
In some implementations it represents an odd number of I’s.
Simple parity-check code is a single-bit error-detecting code in
which n =k + 1 with dmin = 2.
10. Compare single-bit error and burst error, and state which is more common in practice.
Point Single-Bit Error Burst Error
1. Definition Only one bit changes (0→1 or 1→0). Two or more consecutive bits change.
2. Occurrence Very rare in practice. Common in practice.
Caused by long noise, fading, or
3. Cause Caused by a sudden spike of noise.
interference.
Harder to detect, requires CRC or
4. Detection Easy to detect using simple parity.
checksum.
5. Impact Affects only one bit, less harmful. Affects many bits at once, more
Point Single-Bit Error Burst Error
harmful.
6. Error Simple error detection/correction Needs powerful error detection and
Control methods are enough. correction techniques.
✅ Conclusion:
In real communication systems, burst errors occur more often than single-bit errors.most error
detection and correction methods (like CRC, checksums, Hamming codes) are designed mainly
to handle burst errors, since they are the real-world problem.
11. Draw and explain architecture of Bluetooth.
Bluetooth is a wireless LAN technology designed to connectdevices of different functions such as
telephones, notebooks,computers, cameras, printers, and so on.
A Bluetooth LAN is an ad hoc network. Basic unit of bluetoothis called a piconet.It is small range
network. IEEE has defined 802.15 standard forBluetooth.Bluetooth defines two types of networks:
piconet and scatternet.
12. How does the parity bit method detect errors, and what is its limitation?
Parity Bit Method for Error Detection
How it Detects Errors
A parity bit is added to data before transmission.
Two types:
o Even Parity → Total number of 1s (including parity bit) must be even.
o Odd Parity → Total number of 1s must be odd.
At the receiver:
o All bits (data + parity) are checked.
o If the parity rule is violated → error detected.
Example (Even Parity):
Data: 1011 (3 ones → odd)
Add parity bit = 1 → Sent: 10111 (4 ones → even)
Receiver counts → If not even → error occurred.
Limitation of Parity Bit Method
1. Can only detect single-bit errors.
2. Fails for burst errors where two or more bits change (since parity may still look correct).
Example:
Sent (even parity): 10111
If 2 bits flip → 11101 (still 4 ones → even) → Error not detected.