Data Link Layer Design Issues
Purpose: Data Link Layer (DLL) ka kaam data ko reliable
way me ek node se dusre node tak pohchana hai.
Design Issues:
1. Framing: Data ko small chunks (frames) me divide
karna.
2. Error Control: Errors ko detect aur correct karna
(jisme CRC, Hamming code use hota hai).
3. Flow Control: Data bhejne aur receive karne ke
speed ko sync karna, taki data loss na ho.
4. Access Control: Jab multiple devices same link use
karte hain, to kaun kab data bhejega, ye decide
karna.
Elementary Data Link Protocols
Simplest Protocols:
1. Stop and Wait: Ek frame send karo, phir
acknowledgement ka wait karo.
2. Sliding Window: Ek time me multiple frames
bhejne ka system, zyada efficient hota hai.
Error Detection and Correction
Hamming Code:
o Use: Error ko detect aur correct karne ke liye use
hota hai.
o How: Ye extra bits add karta hai data me, jisse
errors ko fix kiya ja sakta hai.
CRC (Cyclic Redundancy Check):
o Use: Errors detect karne ke liye. Mathematical
division jaisa hota hai.
o Why Important: Bahot accurate error detection
karta hai.
Parity Bit:
o Use: Odd ya Even bits count karne ke liye, jisse ek
basic error check hota hai.
o Why: Simple aur fast method hai.
Checksum:
o Use: Data ka sum calculate karke check karta hai,
data theek se aaya ya nahi.
Switch Working
Switch:
o Function: Ye network me devices ko connect karta
hai aur data frames ko right destination pe bhejta
hai.
o Why Use: Efficiency aur performance badhata hai
kyunki direct communication allow karta hai.
Flow Control (Data Link Layer me):
Use: Sender aur receiver ke beech me data transfer
speed ko manage karna, taki receiver overload na ho
jaye.
Methods:
1. Stop and Wait: Ek frame bhejne ke baad wait karna,
jab tak acknowledgment na mil jaye.
2. Sliding Window Protocol: Multiple frames ko
bhejna bina wait kiye, acknowledgment ke liye ek
window set hota hai. Efficient hai kyunki zyada
frames ek time me bheje ja sakte hain.
Error Detection vs. Error Correction:
Error Detection: Errors ko sirf detect karta hai (jaise CRC,
Checksum).
Error Correction: Errors ko detect karke sahi bhi karta
hai (jaise Hamming Code).
Frame Structure (DLL me):
Ek typical frame ke parts:
1. Header: Control information (like source,
destination addresses).
2. Payload/Data: Actual data jo send kiya ja raha hai.
3. Trailer: Error detection ke liye (jaise CRC code).
MAC Sublayer (Medium Access Control)
Multiple Access Protocols: Ye protocols decide karte
hain ki multiple devices kab aur kaise same
communication channel ko share karenge.
1. ALOHA:
o Use: Jab koi bhi device kabhi bhi data bhej sakta
hai, simple but collisions hote hain.
o Why: Easy implementation, par efficiency kam hai.
o Types:
Pure ALOHA: Directly send karte hain data,
collisions zyada hoti hain.
Slotted ALOHA: Fixed time slots, jisme collision
chances kam hoti hain.
2. CSMA (Carrier Sense Multiple Access):
o Use: Data send karne se pehle channel ko check
karte hain ki free hai ya nahi.
o Why: Collisions ko avoid karna, efficient
communication.
o CSMA/CD (Collision Detection): Data bhejne ke
baad agar collision detect hota hai to transmission
rok dete hain.
Collision Handling in MAC Sublayer:
1. CSMA/CD (Carrier Sense Multiple Access with Collision
Detection):
o Jab 2 devices ek hi time pe data bhejne ki koshish
karte hain, to collision hota hai. CSMA/CD collision
ko detect karta hai aur data ko resend karne ka
mechanism initiate karta hai.
2. CSMA/CA (Collision Avoidance):
o Use: Mostly wireless networks me use hota hai (like
Wi-Fi).
o Why: Wireless communication me collision ko avoid
karne ke liye.
Random Access:
What: Devices randomly channel ko access karte hain
bina kisi fixed schedule ke.
Why: Jab network traffic unpredictable ho.
Controlled Access:
What: Ek control system devices ko permission deta hai
kab data bhejna hai.
Why: Collision avoid karne ke liye.
Ethernet Protocol
Use: Ye widely used LAN (Local Area Network) protocol
hai.
How: Ye CSMA/CD ka use karta hai to manage data
transfer.
Why Important: Reliable aur fast data transmission ke
liye.
Ethernet Types:
1. 10Base-T: Oldest Ethernet standard, 10 Mbps speed.
2. 100Base-T (Fast Ethernet): 100 Mbps speed.
3. Gigabit Ethernet: 1000 Mbps (1 Gbps) speed.
Switch Modes:
1. Store-and-Forward: Pura frame receive hone ke baad
data forward karta hai, jisse errors detect ho jati hain.
2. Cut-Through: Frame ka sirf initial part read kar ke
immediately forward karta hai, faster hota hai but error
detection nahi hoti.
Advanced Error Detection Techniques:
Burst Error Detection: Ye technique ek time me multiple
bits ki errors ko detect karne me madad karti hai. CRC
aur Hamming code jaisi techniques isko detect karne me
kaam aati hain.
Ethernet Frame Format:
1. Preamble: Sync ke liye 7 bytes hoti hain.
2. Destination Address: Jis device ko data bhejna hai, uska
MAC address.
3. Source Address: Sender ka MAC address.
4. Data: Actual data jo bheja ja raha hai.
5. CRC: Error detection ke liye.
Difference Between ALOHA and CSMA/CD:
1. ALOHA: Simple hai, koi channel sensing nahi hoti, isme
collisions zyada hote hain.
2. CSMA/CD: Channel ko sense karta hai aur agar collision
hoti hai to data resend karta hai, isliye zyada efficient
hota hai.
Multiple Access Protocols - Comparison:
1. ALOHA: Simple, collisions ka risk zyada.
2. CSMA: Channel sensing karta hai pehle, collisions ka risk
kam karta hai.
3. CSMA/CD: Collisions detect karke usko handle karta hai.
4. Controlled Access: Permission based access, zyada
organized hai, par slower ho sakta hai.