0% found this document useful (0 votes)
6 views55 pages

Lecture 6 - The Data-Link Layer-1

The document provides an overview of the Data Link Layer in the OSI model, focusing on the Media Access Control (MAC) sub-layer, which manages access to the physical network medium and ensures reliable data transfer. It discusses various MAC methods, including CSMA/CD, CSMA/CA, token passing, and collision-free protocols, highlighting their operations, advantages, and drawbacks. Additionally, it covers frame encapsulation and addressing using MAC addresses, emphasizing their role in facilitating communication and error detection in local networks.

Uploaded by

gafferdesigning
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)
6 views55 pages

Lecture 6 - The Data-Link Layer-1

The document provides an overview of the Data Link Layer in the OSI model, focusing on the Media Access Control (MAC) sub-layer, which manages access to the physical network medium and ensures reliable data transfer. It discusses various MAC methods, including CSMA/CD, CSMA/CA, token passing, and collision-free protocols, highlighting their operations, advantages, and drawbacks. Additionally, it covers frame encapsulation and addressing using MAC addresses, emphasizing their role in facilitating communication and error detection in local networks.

Uploaded by

gafferdesigning
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/ 55

THE DATA-LINK LAYER

Media Access Control (MAC) Sub-Layer


INTRODUCTION
The OSI (Open Systems Interconnection)
model is a conceptual framework that
standardizes the functions of a networking
or telecommunications system into seven
distinct layers.
INTRODUCTION
…These layers help in understanding the
various processes and interactions that
take place when data is transmitted over
a network. The second layer of the OSI
model is the Data Link Layer.
INTRODUCTION
The Data Link Layer is primarily
responsible for providing error detection,
correction, and reliable data transfer
between two directly connected nodes
within a network.
INTRODUCTION
…It ensures the proper communication of
data frames between devices over a
physical link, typically using MAC (Media
Access Control) addresses to identify
devices on the same network segment.
The layer is divided into two sublayers: the
Logical Link Control (LLC) sublayer and
the Media Access Control (MAC)
sublayer.
INTRODUCTION
The MAC (Media Access Control) layer is the
sub-layer of the Data Link Layer (Layer 2) in
the OSI (Open Systems Interconnection)
model.
Responsibilities: The MAC layer is responsible
for managing access to the physical network
medium (e.g., cables, wireless channels) and
ensuring that multiple devices on the same
network can transmit data efficiently without
causing collisions.
INTRODUCTION
Multiple Access Control –
If there is a dedicated link between the
sender and the receiver then data link control
layer is sufficient, however if there is no
dedicated link present then multiple stations
can access the channel simultaneously.
Hence multiple access protocols are required
to decrease collision and avoid crosstalk.
INTRODUCTION
INTRODUCTION
Channelization:
In this, the available bandwidth of the link is
shared in time, frequency and code to multiple
stations to access channel
simultaneously. Frequency Division Multiple
Access (FDMA) – The available bandwidth is
divided into equal bands so that each station
can be allocated its own band. Guard bands
are also added so that no two bands overlap to
avoid crosstalk and noise.
INTRODUCTION
Frequency Division Multiple Access (FDMA) –
INTRODUCTION
Time Division Multiple Access (TDMA) – In
this, the bandwidth is shared between
multiple stations.
To avoid collision time is divided into slots
and stations are allotted these slots to
transmit data.
INTRODUCTION
…However there is a overhead of
synchronization as each station needs to
know its time slot.
This is resolved by adding synchronization
bits to each slot. Another issue with TDMA
is propagation delay which is resolved by
addition of guard bands.
INTRODUCTION
Time division Multiple Access (TDMA)
FRAME ENCAPSULATION (FRAME
FORMATTING)
Frame encapsulation is a fundamental
process within the Data Link Layer of the
OSI model. It involves the packaging of
data received from the upper layers into
frames for transmission across a network
medium.
FRAME ENCAPSULATION (FRAME
FORMATTING)
…These frames include essential control
information that helps facilitate reliable
communication between network
devices. The frame encapsulation
process ensures that the data is correctly
formatted, protected against errors, and
properly identified for transmission and
reception.
FRAME ENCAPSULATION (FRAME
FORMATTING)
Key Components of Frame Encapsulation:
Header: The header is the initial part of the
frame and contains crucial control
information, including source and destination
MAC addresses, frame length, and possibly
additional fields such as a sequence number
or control bits. The source MAC address
identifies the sender of the frame, while the
destination MAC address identifies the
intended recipient.
FRAME ENCAPSULATION (FRAME
FORMATTING)
Data Payload: The data payload includes
the actual data that needs to be
transmitted. This data can come from the
higher layers of the OSI model and could
be packets from the Network Layer. The
length of the data payload can vary
based on the network technology and
the frame's maximum size.
FRAME ENCAPSULATION (FRAME
FORMATTING)
Trailer: The trailer is the final part of the frame
and typically contains a frame check
sequence (FCS) or cyclic redundancy check
(CRC) value. This value is calculated based
on the contents of the frame and serves as a
means of error detection. The recipient
device uses the FCS to verify whether the
frame experienced any corruption during
transmission.
FRAME ENCAPSULATION (FRAME
FORMATTING)
FRAME ENCAPSULATION (FRAME
FORMATTING)
FRAME ENCAPSULATION (FRAME
FORMATTING)
Frame Encapsulation Process:
Data Preparation: Data that originates
from the upper layers (such as the
Network Layer) is segmented into smaller
units called frames. These frames are
sized according to the maximum frame
size supported by the Data Link Layer
technology.
FRAME ENCAPSULATION (FRAME
FORMATTING)
…Header Addition: The sender device
adds a header to the beginning of the
frame. This header contains control
information, such as source and
destination MAC addresses. These
addresses help guide the frame to the
correct destination.
FRAME ENCAPSULATION (FRAME FORMATTING)

Data Payload Inclusion: The actual data


payload, consisting of the segmented
data from the higher layers, follows the
header. This payload might be
accompanied by additional control
information, depending on the specific
requirements of the network technology.
FRAME ENCAPSULATION (FRAME FORMATTING)

Trailer Addition: The trailer is added to the


end of the frame. This includes the FCS or
CRC value, which is calculated based on
the contents of the frame. The FCS value
aids in identifying any errors that might
have occurred during transmission.
FRAME ENCAPSULATION (FRAME FORMATTING)

…Frame Transmission: Once


encapsulated, the frame is transmitted
over the network medium, such as an
Ethernet cable or a wireless channel.
FRAME ENCAPSULATION (FRAME
FORMATTING)
Frame De-capsulation:
At the receiving end, the process of frame
de-capsulation takes place. The recipient
device extracts the header, data payload,
and trailer from the received frame. It then
performs error checking using the FCS
value to ensure the frame's integrity. If errors
are detected, the frame may be discarded
or retransmitted.
FRAME ENCAPSULATION (FRAME
FORMATTING)
In summary, frame encapsulation within the
Data Link Layer involves adding essential
control information, segmenting data into
frames, attaching headers and trailers, and
performing error detection to ensure reliable
communication over a network medium. This
process is vital for maintaining data integrity
and facilitating efficient data transmission
between devices.
ADDRESSING
Addressing within the Data Link Layer of
the OSI model plays a crucial role in
ensuring that data frames are properly
directed and delivered to the intended
recipients on a local network segment.
ADDRESSING
…Data Link Layer addressing involves the
use of Media Access Control (MAC)
addresses, which are unique hardware
addresses assigned to network interface
cards (NICs) on devices.
ADDRESSING
Media Access Control (MAC) Address:
A MAC address, also known as a hardware
address or a physical address, is a globally
unique identifier assigned to a network
interface device.
ADDRESSING
…Organizationally Unique Identifier (OUI):
The first 24 bits of the MAC address
identify the manufacturer or organization
that owns the device's hardware. This part
is assigned by the Institute of Electrical
and Electronics Engineers (IEEE) and is
also known as the vendor prefix.
ADDRESSING
…Device Identifier: The remaining 24 bits
of the MAC address represent the unique
identifier assigned to the specific device
by the manufacturer. This identifier
ensures that no two devices from the
same manufacturer have identical MAC
addresses.
ADDRESSING
Functions of MAC Addresses:
Uniqueness: MAC addresses ensure that
each network interface on the planet has
a unique identifier, preventing address
conflicts within the same network
segment.
ADDRESSING
…Addressing: MAC addresses enable
devices to be uniquely addressed within
a local network. When a device wants to
send data to another device on the same
network, it uses the recipient's MAC
address to indicate the intended
recipient.
ADDRESSING
…Switching: Ethernet switches use MAC
addresses to forward frames to the
correct destination port. By maintaining a
MAC address table, switches can
efficiently direct frames only to the port
associated with the destination MAC
address, reducing unnecessary network
traffic.
ADDRESSING
MAC Address Formats:
MAC addresses are usually represented
in two formats:
Colon-Delimited Format: For example,
00:1A:2B:3C:4D:5E
Hyphen-Delimited Format: For example,
00-1A-2B-3C-4D-5E
ADDRESSING
Address Resolution Protocol (ARP):
In IP networks, the Address Resolution
Protocol (ARP) is used to map IP
addresses to MAC addresses. ARP is
responsible for discovering the MAC
address associated with a given IP
address on the same local network.
ADDRESSING
Address Resolution Protocol (ARP):
In IP networks, the Address Resolution
Protocol (ARP) is used to map IP
addresses to MAC addresses. ARP is
responsible for discovering the MAC
address associated with a given IP
address on the same local network.
ADDRESSING
…When a device needs to send data to
another device on the same network and
knows the recipient's IP address, it uses
ARP to obtain the corresponding MAC
address. ARP broadcasts a request asking
which device has a particular IP address,
and the device with that IP address
responds with its MAC address.
ADDRESSING
In summary, addressing in the Data Link Layer
involves the use of Media Access Control
(MAC) addresses to uniquely identify network
interface devices. MAC addresses play a
critical role in addressing, forwarding frames
within Ethernet switches, and enabling
efficient communication on a local network
segment. The Address Resolution Protocol
(ARP) helps map IP addresses to MAC
addresses in IP networks.
MEDIA ACCESS CONTROL (MAC)
METHODS
The MAC (Media Access Control) layer in the
Data Link Layer of the OSI model is
responsible for controlling access to the
shared network medium. Different MAC
methods are used to regulate how devices on
a network gain access to this medium,
ensuring efficient and conflict-free
communication. Here are some key MAC
methods:
MEDIA ACCESS CONTROL (MAC) METHODS
CSMA/CD (Carrier Sense Multiple Access
with Collision Detection):
Used In: Traditional Ethernet networks
(e.g., 10BASE-T, 100BASE-TX).
Operation:
Devices listen to the network to detect if
it's idle before attempting to transmit
data.
MEDIA ACCESS CONTROL (MAC) METHODS
…If a device senses that the medium is
busy (i.e., another device is transmitting),
it waits and retries after a random backoff
time.
If a collision occurs (two devices transmit
simultaneously), both devices stop
transmitting and initiate a collision
recovery process.
MEDIA ACCESS CONTROL (MAC) METHODS
MEDIA ACCESS CONTROL (MAC) METHODS
Advantages:
Simple and widely used in wired LANs.
Suitable for half-duplex communication.
Drawbacks:
Becomes inefficient as network size and
traffic increase.
Unsuitable for modern full-duplex
Ethernet.
MEDIA ACCESS CONTROL (MAC)
METHODS
CSMA/CA (Carrier Sense Multiple Access
with Collision Avoidance):
Used In: Wi-Fi (802.11) networks.
Operation:
Devices listen to the network to check if
it's busy before transmitting.
MEDIA ACCESS CONTROL (MAC)
METHODS
…To avoid collisions, devices use a more
sophisticated approach:
Send a Request to Send (RTS) signal to the
intended receiver.
If the receiver acknowledges with a Clear to
Send (CTS) signal, the sender transmits the
data.
Other devices wait during this exchange,
preventing collisions.
MEDIA ACCESS CONTROL (MAC)
METHODS
Advantages:
Well-suited for wireless networks with hidden
node and exposed node problems.
Efficient in shared medium environments.
Drawbacks:
Adds overhead due to RTS/CTS exchanges.
Complex compared to CSMA/CD.
MEDIA ACCESS CONTROL (MAC)
METHODS
Token Passing:
Used In: Token Ring networks (less common
today).
Operation:
Devices form a logical ring and pass a special
token sequentially.
Only the device with the token can transmit data.
After transmitting, the device releases the token
for the next device.
Ensures controlled access and avoids collisions.
MEDIA ACCESS CONTROL (MAC) METHODS

Advantages:
Predictable and controlled network
access.
Suitable for deterministic environments.
Drawbacks:
Complexity in token management.
Not well-suited for dynamic or large
networks.
MEDIA ACCESS CONTROL (MAC)
METHODS
Collision-Free Protocols (e.g., Ethernet
Full-Duplex):
Used In: Modern Ethernet networks (e.g.,
1000BASE-T, 10GBASE-T).
Operation:
Devices have separate transmit and receive
channels, allowing full-duplex communication.
No collisions occur because devices transmit and
receive independently.
MEDIA ACCESS CONTROL (MAC)
METHODS
Advantages:
Efficient and suitable for high-speed,
high-traffic networks.
Eliminates the need for collision detection.
Drawbacks:
Requires dedicated, separate channels for
transmitting and receiving.
Not suitable for shared medium networks.
MEDIA ACCESS CONTROL (MAC)
METHODS
Deterministic Protocols (e.g., Time Division
Multiple Access - TDMA):
Used In: Various networks where deterministic
access is required.
Operation:
The transmission medium is divided into time slots.
Devices are assigned specific time slots for
transmission.
Ensures predictable and controlled access.
MEDIA ACCESS CONTROL (MAC)
METHODS
Advantages:
Suitable for applications requiring strict timing and
guaranteed access.
Common in industrial automation and satellite
communication.
Drawbacks:
Complex synchronization and scheduling are
needed.
May be inefficient for sporadic or bursty traffic.
MEDIA ACCESS CONTROL (MAC)
METHODS
In summary, the choice of MAC method
depends on the specific network technology,
its requirements, and the nature of the
communication medium. These methods
ensure that devices can share the network
medium efficiently while avoiding collisions
and contention, which are crucial for reliable
and high-performance networking.

You might also like