CHAPTER 8
DATA LINK LAYER
DATA LINK LAYER
Module Title: Data Link Layer
Module Objective: Explain how media access control in the data link layer supports
communication across networks.
Topic Title Topic Objective
Purpose of the Data Link Layer Describe the purpose and function of the data link layer
in preparing communication for transmission on specific
Module Objectives
media.
Topologies Compare the characteristics of media access control
methods on WAN and LAN topologies.
Data Link Frame Describe the characteristics and functions of the data
link frame.
4
The Data Link Layer Purpose of the Data Link Layer
5
The Data Link Layer Purpose of the Data Link Layer
6
• The Data Link layer is responsible
for communications between end-
device network interface cards.
• It allows upper layer protocols to
access the physical layer media and
Purpose of the Data Link Layer
encapsulates Layer 3 packets (IPv4)
into Layer 2 Frames.
• It also performs error detection
and rejects corrupts frames.
The Data Link Layer
7
8
IEEE 802 LAN/MAN Data Link Sublayers
Purpose of the Data Link Layer
Purpose of the Data Link Layer
IEEE 802 LAN/MAN standards are specific
to the type of network (Ethernet, WLAN,
WPAN, etc).
IEEE 802 LAN/MAN Data Link Sublayers
The Data Link Layer consists of two
sublayers. Logical Link Control (LLC)
and Media Access Control (MAC).
• The LLC sublayer communicates
between the networking software at
the upper layers and the device
hardware at the lower layers.
• The MAC sublayer is responsible
for data encapsulation and media
access control.
9
As packets travel from the
source host to the destination
host, they travel over different
physical networks.
Purpose of the Data Link Layer
Physical networks can consist
Providing Access to Media
of different types of physical
media such as copper wires,
optical fibers, and wireless
consisting of electromagnetic
signals, radio and microwave
frequencies, and satellite links.
10
Providing Access to Media Purpose of the Data Link Layer
11
Purpose of the Data Link Layer
Providing Access to Media
At each hop along the path, a router:
• Accepts a frame from a medium
• De-encapsulates the frame
• Re-encapsulates the packet into a new frame
12 • Forwards the new frame appropriate to the medium of that segment
Purpose of the Data Link Layer
Data link layer protocols
are defined by
engineering
organizations:
• Institute for Electrical and
Data Link Layer Standards
Electronic
Engineers (IEEE).
• International
Telecommunications Union
(ITU).
• International Organizations
for Standardization (ISO).
• American National
13 Standards Institute (ANSI).
8.2 TOPOLOGIES
Topologies
The topology of a network is the arrangement and relationship of the network
devices and the interconnections between them.
Physical and Logical Topologies
There are two types of topologies used when describing networks:
• Physical topology – shows physical connections and how devices are
interconnected.
• Logical topology – identifies the virtual connections between devices
using device interfaces and IP addressing schemes.
15
Physical topology - Refers
to the physical connections
and identifies how end
Physical and Logical Topologies
devices and infrastructure
devices such as routers,
switches, and wireless
access points are
interconnected.
Topologies
16
Logical Topology: Refers to
the way a network transfers
Physical and Logical Topologies (Cont.)
frames from one node to the
next. These logical signal
paths are defined by data
link layer protocols.
Topologies
17
Topologies
Media access control is the equivalent of
traffic rules that regulate the entrance of
motor vehicles onto a roadway.
The absence of any media access
control would be the equivalent of
Controlling Access to the Media
vehicles ignoring all other traffic and
entering the road without regard to the
other vehicles.
However, not all roads and entrances
are the same. Traffic can enter the road
by merging, by waiting for its turn at a
stop sign, or by obeying signal lights. A
driver follows a different set of rules for
each type of entrance.
Sharing the Media
18
Topologies
Contention-based access
All nodes operating in half-duplex, competing for use of the medium. Examples are:
• Carrier sense multiple access with collision detection (CSMA/CD) as used on legacy
bus-topology Ethernet.
• Carrier sense multiple access with collision avoidance (CSMA/CA) as used on
Wireless LANs.
Access Control Methods
Controlled access
• Deterministic access where each node has its own time on the medium.
• Used on legacy networks such as Token Ring and ARCNET.
19
LAN Topologies
Contention-Based
Access
Media Access Control Methods
• Nodes operate in half-
duplex.
• Compete for the use of
the medium.
• Only one device can
send at a time.
20
LAN Topologies
Media Access Control Methods (Cont.)
Controlled Access
• Each node has its own
time to use the
medium.
• Legacy Token Ring
LANs are an example
21
Topologies
CSMA/CD
Carrier sense multiple access with collision
• Contention-Based Access
• Used by Ethernet LANs.
• Operates in half-duplex mode where only one device sends or receives at a time.
• Uses a collision detection process to govern when a device can send and what
happens if multiple devices send at the same time.
detection (CSMA/CD)
CSMA/CD collision detection process:
• Devices transmitting simultaneously will result in a signal collision on the shared
media.
• Devices detect the collision.
• Devices wait a random period of time and retransmit data.
22
LAN Topologies
Carrier Sense Multiple Access/Collision Detection
Carrier sense multiple access with collision
(CSMA/CD) process is used in half-duplex
Ethernet LANs.
• If two devices transmit at the same time, a collision
will occur.
1 • Both devices will detect the collision on the network.
• Data sent by both devices will be corrupted and will
need to be resent.
detection (CSMA/CD)
2 3
23
Topologies
CSMA/CA
Carrier sense multiple access with
• Contention-Based Access
collision avoidance (CSMA/CA)
• Used by IEEE 802.11 WLANs.
• Operates in half-duplex mode where only one device sends or receives at a time.
• Uses a collision avoidance process to govern when a device can send and what
happens if multiple devices send at the same time.
CSMA/CA collision avoidance process:
• When transmitting, devices also include the time duration needed for the
transmission.
• Other devices on the shared medium receive the time duration information and know
how long the medium will be unavailable.
24
Carrier sense multiple access with collision avoidance
CSMA/CA
• Uses a method to detect if the
media is clear.
• Does not detect collisions but
attempts to avoid them by
waiting before transmitting.
Note: Ethernet LANs using
LAN Topologies
switches do not use a contention-
based system because the switch
(CSMA/CA)
and the host NIC operate in full-
duplex mode.
25
8.3 DATA LINK FRAME
Data Link Frame
Data is encapsulated by the data link layer with a header and a trailer to form a
frame.
A data link frame has three parts:
• Header
• Data
• Trailer
The fields of the header and trailer vary according to data link layer protocol.
The amount of control information carried with in the frame varies according to
access
The Frame
control information and logical topology.
27
Data Link Frame
Field Description
Frame Start and Stop Identifies beginning and end of frame
Addressing Indicates source and destination nodes
Frame Fields
Type Identifies encapsulated Layer 3 protocol
Control Identifies flow control services
Data Contains the frame payload
Error Detection Used for determine transmission errors
28
Data Link Frame
• Also referred to as a physical address (or MAC
address).
• Contained in the frame header.
• Used only for local delivery of a frame on the link.
• Updated by each device that forwards the frame.
Layer 2 Addresses
29
Data Link Frame
Layer 2 protocol used for a
topology is determined by the
technology.
Data link layer protocols include:
LAN and WAN Frames
• Ethernet
• 802.11 Wireless
• Point-to-Point Protocol (PPP)
• HDLC
• Frame Relay
30
Summary
• The data link layer of the OSI model (Layer 2) prepares network data for the physical network.
• The data link layer is responsible for network interface card (NIC) to network interface card
communications.
• The IEEE 802 LAN/MAN data link layer consists of the following two sublayers: LLC and MAC.
• The two types of topologies used in LAN and WAN networks are physical and logical.
• Three common types of physical WAN topologies are: point-to-point, hub and spoke, and mesh.
What did I learn in this module?
• Half-duplex communications exchange data in one direction at a time. Full-duplex sends
and receives data simultaneously.
• In contention-based multi-access networks, all nodes are operating in half-duplex.
• Examples of contention-based access methods include: CSMA/CD for bus-topology Ethernet
LANs and CSMA/CA for WLANs.
• The data link frame has three basic parts: header, data, and trailer.
• Frame fields include: frame start and stop indicator flags, addressing, type, control, data, and
error detection.
• Data link addresses are also known as physical addresses.
• Data link addresses are only used for link local delivery of frames.
31
END OF THE CHAPTER