OSI Data Link Layer
Network Fundamentals – Chapter 7
Version 4.0
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
1
Objectives

Explain the role of Data Link layer protocols in data transmission.

Describe how the Data Link layer prepares data for transmission
on network media.

Describe the different types of media access control methods.

Identify several common logical network topologies and describe
how the logical topology determines the media access control
method for that network.

Explain the purpose of encapsulating packets into frames to
facilitate media access.

Describe the Layer 2 frame structure and identify generic fields.

Explain the role of key frame header and trailer fields including
addressing, QoS, type of protocol and Frame Check Sequence.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
2
Data Link Layer – Accessing the Media
 So far in this class, you have learned about the following layers:
– The application layer provides the interface to the user.
–The transport layer is responsible for dividing and managing
communications between the processes running in the two end
systems.
–The network layer protocols organize communication data so that it
can travel across internetworks from the originating host to a
destination host.
 For network layer packets to be transported from source host to
destination host, they must traverse different physical networks.
 These physical networks can consist of different types of physical
media such as copper wires, microwaves, optical fibers, and
satellite links.
 The services defined by the OSI data link layer prepares network
layer packets for transmission and controls access to the physical
media.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
3
Data Link Layer – Accessing the Media
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
4
Data Link Layer – Accessing the Media
 The data link layer performs two basic services:
–Allows the upper layers to access the media using techniques
such as framing.
–Controls how data is placed onto the media and is received
from the media using techniques such as media access control
(MAC) and error detection
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
5
Data Link Layer – Accessing the Media
 In any given exchange of network layer packets, there
can be numerous data link layer and media transitions.
 That is, the packet can be repackaged into different
frames as it passes across different media.
 At each hop along the path, an intermediary device,
usually a router, processes the frame as follows:
1. Accepting the frame from a medium
2. Decapsulating the frame into a packet
3. Constructing a new frame appropriate for the next media
4. Forwarding the packet inside the new frame across the next
segment of the physical network
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
6
Data Link Layer – Accessing the Media
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
7
Controlling Transfer Across Local Media
 The technique used for getting the frame on and off
media is called the media access method or MAC
method.
 For the data to be transferred across a number of
different media, different MAC methods might be
required during the course of a single communication.
 The media access control methods described by the
data link layer protocols define the processes by which
network devices can access the network media and
transmit frames in diverse network environments.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
8
Controlling Transfer Across Local Media
 An adapter is used to make the connection to the
network. For example, network interface card (NIC) is
used to connect host to the LAN media. The adapter
manages the framing and media access method.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
9
Controlling Transfer Across Local Media
 The packet is received with an encapsulation used by
the LAN technology and reencapsulates the packet into
a frame supported by the protocol used in the WAN
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
10
Creating a Frame
 The data link layer frame includes the following
elements:
• Data: The packet from the network layer
• Header: The control information, such as
addressing, located at the beginning of the PDU
•Trailer: The control information added to the end of
the PDU
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
11
Creating a Frame
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
12
Protocols & Standards
 The functional protocols and services are described by engineering
organizations (such as IEEE, ANSI, and ITU) and communications
companies.
 Engineering organizations set open standards and protocols.
 Communications companies can set and use proprietary.
 Engineering organizations include
■ International Organization for Standardization (ISO,
http://www.iso.org)
■ Institute of Electrical and Electronics Engineers (IEEE,
http://www.ieee.org)
■ American National Standards Institute (ANSI, http://www.ansi.org)
■ International Telecommunication Union (ITU, http://www.itu.org)
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
13
Protocols & Standards
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
14
Media Access Control Techniques
 The method of MAC used depends on
• Media sharing: If and how the nodes share the media
• Topology: How the connection between the nodes appears to
the data link layer
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
15
MAC for Shared Media
 Medium with multiple nodes.
 At any one time, there can be a number of devices
attempting to send and receive data using the network
media.
 The two basic MAC methods for shared media are as
follows:
■ Controlled: Each node has its own time to use the medium.
■ Contention-based: All nodes compete for the use of the
medium
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
16
MAC for Shared Media
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
17
MAC for Shared Media
 Controlled Access for Shared Media
 In controlled access method, network devices take
turns, in sequence, to access the medium =
scheduled access or deterministic.
 Device turn, but does not need to access, the
opportunity passes to the next device in line.
 When one device is placing a frame on the media,
no other device can do so until the frame has
arrived at the destination and has been processed
by the destination.
 Well ordered and provides predictable throughput,
but can be inefficient because of the ‘waiting’.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
18
MAC for Shared Media
 Controlled Access for Shared Media
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
19
MAC for Shared Media
 Contention-Based Access for Shared Media
 Allow any device to try to access the medium
whenever it has data to send = nondeterministic.
 To prevent complete chaos on the media, these
methods use a carrier sense multiple access
(CSMA) process to first detect whether the media is
carrying a signal.
 When the device attempting to transmit sees that
the media is busy, it will wait and try again after a
short time period. If no carrier signal is detected, the
device transmits its data..
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
20
MAC for Shared Media
 Contention-Based Access for Shared Media
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
21
MAC for Shared Media
 Contention-Based Access for Shared Media
 It is possible that the CSMA process will fail and two
devices will transmit at the same time.
 This is called a collision. If a collision occurs, the
data sent by both devices will be corrupted and will
need to be re-sent.
 CSMA is usually implemented in conjunction with a method for
resolving the media contention. The two commonly used
methods are
■ CSMA/collision detect (CSMA/CD)
■ CSMA/collision avoid (CSMA/CA)
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
22
MAC for Shared Media
 CSMA/Collision Detect
 In CSMA/CD, the device monitors the media for the
presence of a data signal.
 If a data signal is absent, indicating that the media is
free, the device transmits the data.
 CSMA/Collision Avoid
 In CSMA/collision avoid (CSMA/CA), the device
examines the media for the presence of a data
signal.
 If the media is free, the device sends a notification
across the media of its intent to use it. The device
then sends the data.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
23
MAC for Nonshared Media
 Require little or no control before placing frames onto the media.
 Have simpler rules and procedures for MAC.
 Such is the case for point-to-point topologies
 In point-to-point connections, the data link layer has to consider
whether the communication is half duplex or full duplex.
 Traffic analogy, half duplex = one lane road, and full duplex = twolane road.
 Half-duplex communication means the devices can both transmit
and receive on the media but cannot do so simultaneously
 In full-duplex communication, both devices can transmit and
receive on the media at the same time. The data link layer
assumes that the media is available for transmission for both
nodes at any time.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
24
MAC for Nonshared Media
 Full Duplex
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
25
Logical Topology Versus Physical Topology
 Network topologies can be viewed at the physical level
and the logical level.
• The physical topology is an arrangement of the nodes and the
physical connections between them. The representation of how
the media is used to interconnect the devices is the physical
topology.
• A logical topology is the way a network transfers frames from
one node to the next. This arrangement consists of virtual
connections between the nodes of a network independent of
their physical layout. These logical signal paths are defined by
data link layer protocols.
 The data link layer “sees” the logical topology of a
network when controlling data access to the media. It is
the logical topology that influences the type of network
framing and MAC used.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
26
Logical Topology Versus Physical Topology
 Logical and physical topologies typically used in
networks are
■ Point-to-point
■ Multiaccess
■ Ring
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
27
Logical Topology Versus Physical Topology
■ Point-to-point
• A point-to-point topology connects two nodes directly
• Instead of being directly attached, the two end nodes
communicating in a point-to-point network can be logically
connected through a number of intermediate devices.
• In some cases, the logical connection between nodes forms
what is called a virtual circuit. A virtual circuit is a logical
connection created within a network between two network
devices.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
28
Logical Topology Versus Physical Topology
■ Multiaccess
• Enables a number of nodes to communicate by using the same
shared media.
• Data from only one node can be placed on the medium at any
one time.
• Requires a data link MAC method to regulate the transmission
of data and thereby reduce collisions between different signals.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
29
Logical Topology Versus Physical Topology
■ Multiaccess
• Enables a number of nodes to communicate by using the same
shared media.
• Data from only one node can be placed on the medium at any
one time.
• Requires a data link MAC method to regulate the transmission
of data and thereby reduce collisions between different signals.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
30
Logical Topology Versus Physical Topology
■ Ring
• Each node in turn receives a frame.
• If the frame is not address to the node, the node passes the
frame to the next node.
• This allows a ring to use a controlled MAC technique called token
passing.
• Nodes in a logical ring topology remove the frame from the ring,
examine the destination address of the frame, and send it on if it
is not addressed for that node.
• All nodes around ring between the source and destination node
examine the frame.
.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
31
Logical Topology Versus Physical Topology
 Ring
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
32
Media Access Control Addressing and Framing Data
 All data link layer protocols encapsulate the Layer 3
PDU within the data field of the frame.
 However, the structure of the frame and the fields
contained in the header and trailer vary according to
the protocol.
 Scenario : For example, we have all types of vehicles
from small automobiles to large trucks. Small vehicles
are easily maneuverable around crowded urban
environments but do not carry many passengers or
much cargo.
 While large trucks or buses are not maneuverable, they
are well suited to carry large payloads on the highway.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
33
Media Access Control Addressing and Framing Data
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
34
Framing: Role of the Header
 The frame header contains the control information
specified by the data link layer protocol for the specific
logical topology and media used.
 Frame control information is unique to each type of
protocol.
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
35
Framing: Role of the Header
 Typical frame header fields include:
■ Start of Frame field: Indicates the beginning of the frame
■ Source and Destination address fields: Indicate the source and
destination nodes on the media
■ Priority/Quality of Service field: Indicates a particular type of
communication service for processing
■ Type field: Indicates the upper-layer service contained in the frame
■ Logical connection control field: Used to establish a logical connection
between nodes
■ Physical link control field: Used to establish the media link
■ Flow control field: Used to start and stop traffic over the media
■ Congestion control field: Indicates congestion in the media
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
36
Media Access Control Addressing and Framing Data
 Cases where addresses are needed and cases where
addresses are not needed
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
37
Summary
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
38
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
39