0% found this document useful (0 votes)
8 views23 pages

Lesson 04

The document discusses the Data Link Layer's role in packet transport, error detection, and flow control in network communications. It details various error detection methods such as Checksum, CRC, Parity Check, and Hamming Code, as well as MAC protocols like CSMA/CD and CSMA/CA. The document also covers framing techniques for Ethernet and wireless networks, emphasizing the importance of synchronization and error handling mechanisms.

Uploaded by

dreamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views23 pages

Lesson 04

The document discusses the Data Link Layer's role in packet transport, error detection, and flow control in network communications. It details various error detection methods such as Checksum, CRC, Parity Check, and Hamming Code, as well as MAC protocols like CSMA/CD and CSMA/CA. The document also covers framing techniques for Ethernet and wireless networks, emphasizing the importance of synchronization and error handling mechanisms.

Uploaded by

dreamy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Lesson 04

Data link control

W.C.Deshapriya
Data Link Layer
● Responsible for transport of packets received from the
network layer.

● Controlling the access to physical media


● To allow many nodes to share a common transmission
medium

● Framing of data bits


● Synchronizes the sender and receiver
● Helps for producing error control mechanisms
● Efficient switching of transmitted data to the destination in
the immediate local network
Data Link Layer
● Detection of errors in frame transmission
● Detection of errors that occur while bits are in transit over the link
● Different mechanisms can detect different number of bit errors

● Control the flow of frames


● Address the problem of fast sender overloading a busy receiver
● Uses a feedback mechanism to let sender know that it is sending too
much and therefore requesting to hold back
Detection of errors in frame transmission
Several methods and protocols are used to detect errors in transmitted
frames:

▪ Checksum
▪ Cyclic Redundancy Check (CRC)
▪ Parity Check
▪ Hamming Code
Detection of errors in frame transmission
▪ Checksum
i. Before transmission, the sender divides the data into fixed-size
blocks (e.g., 16 or 32 bits).
ii. Calculate the block’s sum and total sum of the frame.
iii. The sum is complemented (inverted) - complemented value is the
checksum.
iv. Transmit checksum with original frame.
Detection of errors in frame transmission
▪ Cyclic Redundancy Check (CRC)
i. Before transmission, the sender adds a sequence of zeros to the
data in the frame.
ii. The number of zeros is equal to the length of the CRC code (e.g., 32
bits for CRC-32).
Detection of errors in frame transmission
▪ Parity Check
i. Even Parity: The number of 1s in the data (including the parity bit)
should be even.
ii. Odd Parity: The number of 1s in the data (including the parity bit)
should be odd.

iii. The parity bit is added to the data to ensure the total number of 1s
matches the chosen parity (even or odd).
▪ Parity bit calculation

1 2 3 4
Detection of errors in frame transmission
▪ Hamming Code
i. Hamming Code is an error-detection and correction method used
to detect and correct single-bit errors and detect two-bit errors in
frame transmission.
Control the flow of frames
● Broadcast vs. Point-to-Point
● Normally original Ethernet LAN’s were broadcast
● WAN’s were P2P

● Broadcast media is shared


● Media Access Control (MAC)
MAC protocols: CSMA
● CS: Carrier Sense → Is there anyone transmitting?
● MA: Multiple Access → Not only me others are also accessing the
media, I can hear what others can hear.
MAC protocols: CSMA/CD
● When transmit data, it depends on collisions.

CSMA/CD: Carrier Sense Multiple Access/Collision Detection.


• Transmitting data when the channel is clear.
• If two devices transmit data
simultaneously, a collision
occurs.
• Each device detects this
collision and waits a random
period before retrying.
MAC protocols: CSMA/CA
● CSMA/CA: Carrier Sense Multiple Access/Collision avoidance.
• Used in Wireless LAN’s
• Initially transmits the intent to send the data. Once an
acknowledgment is received, the sender sends the data.

• It was developed to
minimize the no of
collisions occurring when
two or more stations send
their signals over a data link
layer.
CSMA/CD vs. CSMA/CA
● Both protocols for transmission that operate in the Medium Access Control Layer.

● CSMA/CA is used in wireless networks.


● used for half-duplex
● when collision detected, the transmission will stopped
● a jam signal is sent by the stations.
● reduces the recovery time.
● used 802.3 standard.

● CSMA/CD is used in wired networks.


● used for full-duplex
● minimizes the possibility of collisions.
● used 802.11 standard.
Framing
● At the Sender: the packets converted to frames and
send reliably over the unreliable physical media.

● At the Receiver: Identify where the frame starts and


where it ends in order to pass the data contained to
the upper layers

● Requires some special bit sequence to indicate


the start and the end
● Synchronizing sender and receiver for frame
transmission.
Framing: Approaches
● Fixed frame length
● Send a special character at the beginning and end of the frame
● Send a special flag sequence at the beginning and end of the frame.

• The maximum frame


length is 1518 bytes
for standard Ethernet
frames
• 9000 bytes for jumbo
frames
Handling of errors
● Error Detection & Correction mechanism use for the frame.

● Can use either:


● Error-Correcting Codes (ECC)
● Not all errors can be corrected
● Usage: Many wireless networks
or
● Error-Detecting Codes (EDC)
● Just detect errors and deal with them (reject them)
● Usage: Most wired networks.
Error Detection
● Used some additional bits/bytes into the frame header

● Mechanisms
▪ Checksum
▪ Cyclic Redundancy Check (CRC)
▪ Parity Check
▪ Hamming Code
Error Correction
● Mechanisms
●FEC: Forward Error Correction
● FEC is used when it is important to mitigate latency variation than to
avoid errors
● Ex: Voice, video transmission
Framing for Ethernet network - IEEE 802.3

▪ Preamble - used to obtain clock synchronization (7 byte)


▪ Addressing- 6-byte world
▪ Unicast, multicast, broadcast
▪ Length of data field - between 46 Bytes – 1500 Bytes
▪ Error control: 32-bit CRC [FCS]
Framing for WIFI network - IEEE 802.11
Framing for VLAN network - IEEE 802.1Q
Thanks!

You might also like