0% found this document useful (0 votes)
2 views

Topic 3-Data Link Layer Midterm Notes

Media Access Control (MAC) regulates data transmission in networks to prevent conflicts, with contention-based and controlled access methods. Ethernet employs error detection through Cyclic Redundancy Check (CRC) and does not automatically correct errors, relying on higher layers for retransmission. The Ethernet frame structure includes essential fields for synchronization and error detection, achieving a transmission efficiency of 97.8%.

Uploaded by

2zfkmb88y2
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Topic 3-Data Link Layer Midterm Notes

Media Access Control (MAC) regulates data transmission in networks to prevent conflicts, with contention-based and controlled access methods. Ethernet employs error detection through Cyclic Redundancy Check (CRC) and does not automatically correct errors, relying on higher layers for retransmission. The Ethernet frame structure includes essential fields for synchronization and error detection, achieving a transmission efficiency of 97.8%.

Uploaded by

2zfkmb88y2
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Media Access Control (MAC) – Who Gets to Talk and When?

Media Access Control (MAC) decides which computer can transmit data and
when to avoid conflicts. It ensures smooth communication over a network,
especially when multiple devices share the same connection.

Two Situations in Today’s Networks


1️Multi-Point (Shared) Circuits – Control Needed
 Devices share the same access medium (e.g., Wi-Fi access points,
hubs).
 Only one device can transmit at a time to avoid data collisions.
 MAC control is required to regulate access (via contention or controlled
access).
2️Full-Duplex Point-to-Point Circuits – No Control Needed
 Each device has a dedicated connection (e.g., switches, routers).
 Simultaneous transmission is allowed since there’s no sharing.
 No MAC control is required since devices communicate directly.

Best Practice: Full-Duplex Point-to-Point Circuits


Why?
 More efficient: No need to wait for permission to send data.
 Faster communication: Devices can transmit simultaneously without
interference.
 Fewer collisions: No need for extra collision-handling mechanisms.
When is Shared Access Still Used?
 Wi-Fi networks (Access Points)
 Older Ethernet hubs (now mostly replaced by switches)

Two Approaches to Media Access Control


1. Contention-Based Access (Decentralized, No Control Center)
 Devices transmit whenever the circuit is free (like a group chat with no
talking rules).
 Collisions occur if two devices send data at the same time.
 Example: CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) in Ethernet hubs.
Pros:
✔ Works well in light traffic conditions.
✔ Simple and cost-effective.
Cons:
✖ Becomes inefficient in high-traffic networks (collisions slow things down).

2. Controlled Access (Centralized Control by an Access Point - AP)


 A central device (AP) manages transmissions in wireless networks.
 Two main methods:
a) Access Request (RTS/CTS – Request to Send / Clear to Send)
o Device asks for permission before sending data.
o AP grants permission based on priority or fairness.
o Used in high-traffic WLANs to avoid interference.
b) Polling (AP Checks with Each Device Before Sending)
o AP asks each device if it needs to transmit.
o If a device needs to send, it transmits when polled.
o Used in some older or specialized networks.
Pros:
✔ Reduces collisions in shared media networks.
✔ Ensures fair access to network resources.
Cons:
✖ Slightly slower than contention-based access.
✖ More complex (requires AP coordination).

Ethernet Error Control – Keeping Data Clean


Error control in Ethernet ensures data integrity by preventing, detecting, and
correcting errors that occur during transmission.

What Causes Network Errors?


Errors (both corruptions and lost data) are not caused by humans but by:
✔ Electrical interference
✔ Signal attenuation (weakening over distance)
✔ Network congestion
✔ Hardware issues
Since errors can't be fully avoided, Ethernet relies on error detection and
retransmission instead of automatic correction.

Ethernet’s Error Detection: Cyclic Redundancy Check (CRC-32)


How It Works
1️Sender:
 Treats the data as a single large binary number.
 Divides it by a preset divisor (polynomial).
 The remainder becomes the CRC checksum (sent with the frame).
2️Receiver:
 Performs the same CRC calculation on received data.
 If the remainder matches, data is correct.
 If the remainder doesn’t match, an error is detected.
Detection Accuracy: Over 99.99999% with 32-bit CRC (CRC-32) in Ethernet.

Error Correction in Ethernet? Not Really!


 No automatic correction in Ethernet.
 Corrupted frames are simply discarded.
 The Transport Layer (TCP) handles retransmission if data is lost.
Why No Error Correction?
✔ Saves processing time.
✔ More efficient for high-speed networks.
✔ TCP already ensures reliable delivery.
Parity Checking – Catching Transmission Errors
Parity checking is a simple error detection method used in digital
communication. It ensures that small errors (like a single flipped bit) are
caught.

1. Single-Bit Parity (Basic Error Detection)


✔ Adds one extra bit (parity bit) to the data before transmission.
✔ Can detect single-bit errors, but not fix them.
✔ Two types:
 Even parity: The total number of 1s (including parity bit) must be even.
 Odd parity: The total number of 1s (including parity bit) must be odd.
Example (Even Parity)
Dat Parity Bit Sent Received Error
a (Even) Data Data Detected?
101
0 10100 10101 Yes! (Extra 1)
0
110
1 11011 11011 No Error
1
011
1 01101 01101 No Error
0
Limitations:
Detects only single-bit errors.
Cannot correct errors or detect multiple bit flips.

2. Two-Dimensional Parity (Error Detection + Correction)


✔ Organizes bits into a matrix (rows and columns).
✔ Parity bits are added for both rows and columns.
✔ Can detect and correct single-bit errors.
Example (3×3 Data Block + Parity Bits)
Data Row
Bits Parity
101 0
110 1
011 0
Col
100
Parity
Error Detection & Correction:
 If one bit flips, both row and column parity checks fail, pinpointing the
exact error location.
 The flipped bit can then be corrected by reversing its value.
Advantage: Can both detect and correct single-bit errors.
Limitation: Cannot fix multiple errors in the same row/column.
Cyclic Redundancy Check (CRC) – Error Detection
CRC is a strong error detection method used in networking (e.g., Ethernet) to
detect data corruption during transmission. It works by dividing the data by a
preset divisor (a generator polynomial) and sending the remainder along
with the data. The receiver then performs the same division to check for
errors.

Steps to Compute CRC


Let’s break down your example:
1️Given Data: 101110
2️Preset Divisor (Generator Polynomial): 1001 (4 bits → r+1 bits)
3️Append r Zeros to the Data (Since 1001 has 4 bits, r = 3):
 New Data: 101110000 (Appended 3 zeros)
4️Perform Binary Division (Mod-2 Division)
 Divide 101110000 by 1001
 Binary division follows XOR instead of standard subtraction
5️Remainder: 011 (r bits)
 This remainder is the CRC Checksum
 Final Transmitted Data: 101110011 (Data + Remainder)

Receiver Side (Error Checking)


1. Receiver divides received data 101110011 by 1001 again.
2. If remainder = 000, no errors.
3. If remainder ≠ 000, error detected.

Ethernet Data Link Protocol – Frame Structure & Efficiency


Ethernet (IEEE 802.3ac) is the most widely used data link protocol in modern
networks. It ensures reliable data transmission by organizing data into
frames, adding essential information (overhead), and performing error
detection via CRC.

Ethernet Frame Structure (802.3ac)


Each Ethernet frame consists of the following key fields:
Size
Field Purpose
(Bytes)
Synchronizes sender & receiver clocks
Preamble 7
(Overhead)
Start of Frame (SOF) 1 Indicates frame start (Overhead)
Destination MAC 6 Identifies recipient (Overhead)
Source MAC 6 Identifies sender (Overhead)
Indicates payload type or length
EtherType / Length 2
(Overhead)
46 – Contains actual data (IP packet + header)
Frame Data
1500 (Information)
Size
Field Purpose
(Bytes)
Frame Check Sequence Contains CRC checksum for error detection
4
(FCS) (Overhead)

Transmission Efficiency Calculation


Transmission efficiency measures how much of the total transmitted data is
actual information vs. overhead.
Efficiency=∑Information bits∑(Information bits+Overhead bits)\
text{Efficiency} = \frac{\sum \text{Information bits}}{\sum (\
text{Information bits} + \text{Overhead
bits})}Efficiency=∑(Information bits+Overhead bits)∑Information bits
Given:
 Frame Size = 1500 Bytes
 Overhead = 33 Bytes (7+1+6+6+2+4+7 padding)
 Information Bits = 1500 Bytes × 8 bits/Byte = 12000 bits
 Total Bits Sent = (1500 + 33) Bytes × 8 = 12264 bits
Efficiency=1200012264=97.8%\text{Efficiency} = \frac{12000}{12264} =
97.8\%Efficiency=1226412000=97.8%

You might also like