0% found this document useful (0 votes)
32 views12 pages

CIR 209 (Lecture 4c) OSI - Model

This document discusses the data link layer and its functions. It covers network architecture and protocol hierarchies, with layers communicating through defined interfaces. The key functions of the data link layer are to frame data, provide physical addressing between nodes on a network, implement flow and error control, and control access to shared links. The data link layer is divided into two sublayers - the logical link control layer which interfaces with higher layers, and the media access control layer which interfaces with the physical layer.

Uploaded by

dancanongori9
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)
32 views12 pages

CIR 209 (Lecture 4c) OSI - Model

This document discusses the data link layer and its functions. It covers network architecture and protocol hierarchies, with layers communicating through defined interfaces. The key functions of the data link layer are to frame data, provide physical addressing between nodes on a network, implement flow and error control, and control access to shared links. The data link layer is divided into two sublayers - the logical link control layer which interfaces with higher layers, and the media access control layer which interfaces with the physical layer.

Uploaded by

dancanongori9
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/ 12

MASENO UNIVERSITY

DEPARTMENT OF INFOTMATION TECHNOLOGY


DATA LINK LAYER

Coverage:
i. Design Issues: Network Architecture & Communication
ii. Data link layer
iii. Data link protocols
iv. Data link layer design issues

1.1 Network Architecture: Protocol hierarchies


 To reduce their design complexity, most networks are organized as a stack of layers or levels,
each one built upon the one below it. The number of layers, the name of each layer, the
contents of each layer, and the function of each layer differ from network to network
(LAN/WAN).
 The purpose of each layer is to offer certain services to the higher layers, shielding those
layers from the details of how the offered services are actually implemented. In a sense, each
layer is a kind of virtual machine, offering certain services to the layer above it.
 This concept is actually a familiar one and used throughout information technology and
computer science, where it is variously known as information hiding, abstract data types,
data encapsulation, and object-oriented programming. The fundamental idea is that a
particular piece of software (or hardware) provides a service to its users but keeps the details
of its internal state and algorithms hidden from them.
 Layer n on one machine carries on a conversation with layer n on another machine. The
rules and conventions used in this conversation are collectively known as the layer n
protocol.

 Just as an example, a five-layer network is illustrated in Figure 1.0 below. The entities
comprising the corresponding layers on different machines are called peers. The peers may
be processes, hardware devices, or even human beings. In other words, it is the peers that
communicate by using the protocol.

Page 1 of 12
Figure 1.0: Layers, protocols, and interfaces.

 In reality, no data are directly transferred from layer n on one machine to layer n on another
machine. Instead, each layer passes data and control information to the layer immediately
below it, until the lowest layer is reached. Below layer 1 is the physical medium through
which actual communication occurs. In Figure 5.1, virtual communication is shown by
dotted lines and physical communication by solid lines.

 Between each pair of adjacent layers is an interface. The interface defines which primitive
operations and services the lower layer makes available to the upper one. When network
designers decide how many layers to include in a network and what each one should do, one
of the most important considerations is defining clean interfaces between the layers. Doing
so, in turn, requires that each layer perform a specific collection of well-understood
functions. In addition to minimizing the amount of information that must be passed

Page 2 of 12
between layers, clear-cut interfaces also make it simpler to replace the implementation of one
layer with a completely different implementation (e.g., all the telephone lines are replaced by
satellite channels) because all that is required of the new implementation is that it offer
exactly the same set of services to its upstairs neighbor as the old implementation did. In
fact, it is common that different hosts use different implementations.

 A set of layers and protocols is called a network architecture. The specification of an


architecture must contain enough information to allow an implementer to write the program
or build the hardware for each layer so that it will correctly obey the appropriate protocol.
Neither the details of the implementation nor the specification of the interfaces is part of the
architecture because these are hidden away inside the machines and not visible from the
outside. It is not even necessary that the interfaces on all machines in a network be the same,
provided that each machine can correctly use all the protocols. A list of protocols used by a
certain system, one protocol per layer, is called a protocol stack.

1.2 Design Issues in Network Architecture and Communication


 Some of the key design issues that occur in computer networks can be presented in several
layers. Where each layer carries out define set of tasks that contribute to the overall
preparation of data for transfer from one device to another, across the network.
 Every layer needs a mechanism for identifying senders and receivers. Since a network normally has
many computers, some of which have multiple processes, a means is needed for a process
on one machine to specify with whom it wants to talk. As a consequence of having multiple
destinations, some form of addressing is needed in order to specify a specific destination.
 Another set of design decisions concerns the rules for data transfer. In some systems, data only travel in
one direction; in others, data can go both ways. The protocol must also determine how many
logical channels the connection corresponds to and what their priorities are. Many networks
provide at least two logical channels per connection, one for normal data and one for urgent
data.
 Error control is an important issue because physical communication circuits are not perfect. Many error-
detecting and error-correcting codes are known, but both ends of the connection must agree
on which one is being used. In addition, the receiver must have some way of telling the
sender which messages have been correctly received and which have not.

Page 3 of 12
 Not all communication channels preserve the order of messages sent on them. To deal with a possible loss
of sequencing, the protocol must make explicit provision for the receiver to allow the pieces
to be reassembled properly. An obvious solution is to number the pieces, but this solution
still leaves open the question of what should be done with pieces that arrive out of order.
 An issue that occurs at every level is how to keep a fast sender from swamping a slow receiver with data.
Various solutions have been proposed. Some of them involve some kind of feedback from
the receiver to the sender, either directly or indirectly, about the receiver's current situation.
Others limit the sender to an agreed-on transmission rate. This subject is called flow control.
 Another problem that must be solved at several levels is the inability of all processes to accept arbitrarily long
messages. This property leads to mechanisms for disassembling, transmitting, and then
reassembling messages. A related issue is the problem of what to do when processes insist
on transmitting data in units that are so small that sending each one separately is inefficient.
Here the solution is to gather several small messages heading toward a common destination
into a single large message and dismember the large message at the other side.
 When there are multiple paths between source and destination, a route must be chosen. Sometimes this
decision must be split over two or more layers. For example, to send data from London to
Rome, a high-level decision might have to be made to transit France or Germany based on
their respective privacy laws. Then a low-level decision might have to made to select one of
the available circuits based on the current traffic load.

1.3 Data Link Layer: Primary Functions


Generally, the functions of data link layer include;
1) The data link layer is responsible for moving frames from one hop (node) to the next.
2) Framing: - The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.
3) Physical addressing: - If frames are to be distributed to different systems on the network,
the data link layer adds a header to the frame to define the sender and/or receiver of the
frame. If the frame is intended for a system outside the sender's network, the receiver
address is the address of the device that connects the network to the next one.
4) Flow control: - If the rate at which the data are absorbed by the receiver is less than the rate
at which data are produced in the sender, the data link layer imposes a flow control
mechanism to avoid overwhelming the receiver.

Page 4 of 12
5) Error control: - The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to
recognize duplicate frames. Error control is normally achieved through a trailer added to the
end of the frame.
6) Access control: - When two or more devices are connected to the same link, data link layer
protocols are necessary to determine which device has control over the link at any given
time.

1.4 Structure of the Data Link Layer


The IEEE has subdivided the data link layer into two sub-layers: Logical Link Control (LLC) and
Media Access Control (MAC).

a) Logical Link Control (LLC)

 Logical link control is implemented in software.


 The data link layer uses LLC to communicate with the upper layers of the protocol suite.
 Adds Layer 2 control information to network protocol data; LLC prepares the frame
from the network layer PDU (the PDU might be for IPv4 or IPv6) into a format that
conforms to the requirements of the network interface and media..
 Places information in the frame that identifies which network layer protocol is being
used for the frame.
 Enables IPv4 and IPv6 to utilize the same network interface and media.

b) Media Access Control (MAC).


 The Media Access Control (MAC) sublayer is responsible for the placement and retrieval
of frames on and off the media; controls the NIC responsible for sending and receiving
data on the physical medium, by defining the media access processes performed by the
hardware.
 The MAC sublayer is also responsible for adding a header and a trailer to the network
layer protocol data unit (PDU); implements a trailer to detect transmission errors.

Page 5 of 12
 Implements CSMA/CD over legacy shared half-duplex media – this is done to control
possible data collision that may occur in half-duplexed network e.g. in bus topology
implementations of where network hubs are used.
 Data link layer protocols define the rules for access to different media.
 Integrates Layer 2 flows between 10 Gigabit Ethernet over fiber and 1 Gigabit Ethernet
over copper
 Places information in the Ethernet frame that identifies which network layer protocol is
being encapsulated by the frame.
 It manages the frame access to the network media according to the physical signalling
requirements (copper cable, fiber optic, wireless, etc.)
 Applies source and destination MAC addresses to Ethernet frame before placing sending
the frame to the physical layer. It also de-capsulates (on receiving devices) the frames
before sending it to the network layer.

Data Link Layer: Relationship with Network and Physical Layers


The data link layer transforms the physical layer, a raw transmission facility, to a reliable link. It
makes the physical layer appear error-free to the upper layer (network layer). Figure 1.2 below shows
the relationship of the data link layer to the network and physical layers.

Figure 1.2: Relationship Between Data Link & Network/Physical layers

Page 6 of 12
1.5 OSI and the IEEE Standard: LLC and MAC Sub-layers
Figure 1.3 below shows the relationship between the OSI reference model and the IEEE 802
reference model; the Data link layer is divided into two sub-layers – LLC and MAC. The link of the
LLC to the network layer is through the LLC Service Access Point (LSAP).

Figure 1.3: OSI and IEEE 802 Reference Models


As earlier stated, the IEEE has subdivided the data link layer into two sub-layers: logical link control
(LLC) and media access control (MAC) and has also created several physical layer standards for
different LAN protocols.
Note:
 Generally, Data Link Control handles framing, flow control, and error control.
 In IEEE Project 802, flow control, error control, and part of the framing duties are collected into one
sub-layer called the logical link control.
 Framing is handled in both the LLC sub-layer and the MAC sub-layer.
A. Logical Link Control Sub-Layer
The LLC provides one single data link control protocol for all IEEE LANs. In this way, the LLC is
different from the media access control sub-layer, which provides different protocols for different

Page 7 of 12
LANs. A single LLC protocol can provide interconnectivity between different LANs because it
makes the MAC sub-layer transparent. Figure 1.3 shows one single LLC protocol serving several
MAC protocols.

Figure 1.3: Physical layer standards


Framing Function of LLC
Framing LLC defines a protocol data unit (PDU) that is somewhat similar to that of HDLC (A
WAN Data Link Layer Protocol).

Figure 1.4: Framing Function of LLC

Page 8 of 12
Figure 1.5: Expanded LLC framing
 The header contains a control field used for flow and error control.
Recall: The purpose of the LLC is to provide flow and error control for the upper-layer protocols
that actually demand these services. For example, if a LAN or several LANs are used in an
isolated system, LLC may be needed to provide flow and error control for the application layer
protocols. However, most upper-layer protocols
 The two other header fields define the upper-layer protocol at the source and destination
that uses LLC. These fields are called the destination service access point (DSAP) and the
source service access point (SSAP).
 The DSAP (Destination Service Access Point) and SSAP (Source Service Access Point)
fields each contain a 7-bit address, which specify the destination and source users of LLC.
One bit of the DSAP indicates whether the DSAP is an individual or group address. One bit
of the SSAP indicates whether the PDU is a command or response PDU.
o For type 1 operation, which supports the unacknowledged connectionless service,
the unnumbered information (UI) PDU is used to transfer user data. There is no
acknowledgment, flow control, or error control. However, there is error detection
and discard at the MAC level.

Page 9 of 12
o With type 2 operation, a data link connection is established between two LLC SAPs
prior to data exchange. Connection establishment is attempted by the type 2
protocol in response to a request from a user. The LLC entity issues a SABME
PDU3 to request a logical connection with the other LLC entity. If the connection is
accepted by the LLC user designated by the DSAP, then the destination LLC entity
returns an unnumbered acknowledgment (UA) PDU. The connection is henceforth
uniquely identified by the pair of user SAPs. If the destination LLC user rejects the
connection request, its LLC entity returns a disconnected mode (DM) PDU.

B. Media Access Control (MAC)


 IEEE Project 802 has created a sublayer called media access control that defines the specific
access method for each LAN. Multiple access methods include random access, controlled access,
and channelization (Figure 1.6)

Figure 1.6: Media Access Approaches

Page 10 of 12
 For example, it defines CSMA/CD as the media access method for Ethernet LANs and the
token-passing method for Token Ring and Token Bus LANs.
 It also frames data received from the upper layer and passes them to the physical layer.
 The Ethernet frame contains seven fields: preamble, SFD, DA, SA, length or type of protocol
data unit (PDU), upper-layer data, and the CRC.
 Ethernet does not provide any mechanism for acknowledging received frames, making it what is
known as an unreliable medium. Acknowledgments must be implemented at the higher layers.
The format of the MAC frame is shown in Figure 1.6.

Figure 1.6: MAC Frame

Preamble
 The first field of the 802.3 frame contains 7 bytes (56 bits) of alternating Os and Is that
alerts the receiving system to the coming frame and enables it to synchronize its input
timing.
 The pattern provides only an alert and a timing pulse.
 The 56-bit pattern allows the stations to miss some bits at the beginning of the frame.
 The preamble is actually added at the physical layer and is not (formally) part of the frame.
Start frame delimiter (SFD).
 The second field (l byte: 10101011) signals the beginning of the frame.
 The SFD warns the station or stations that this is the last chance for synchronization.
 The last 2 bits is 11 and alerts the receiver that the next field is the destination address.

Page 11 of 12
Destination address (DA)
 The DA field is 6 bytes and contains the physical address of the destination station or
stations to receive the packet.
Source address (SA)
 The SA field is also 6 bytes and contains the physical address of the sender of the packet.
Length or type
 This field is defined as a type field or length field.
 The original Ethernet used this field as the type field to define the upper-layer protocol using
the MAC frame.
 The IEEE standard used it as the length field to define the number of bytes in the data field.
 Both uses are common today.
Data
 This field carries data encapsulated from the upper-layer protocols.
 It is a minimum of 46 and a maximum of 1500 bytes, as we will see later.
CRC
 The last field contains error detection information, in this case a CRC-32 Frame

1.6 Media Access Method:


Assignment (Reading on CSMA/CD and Token Passing
A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation time
(including the delays in the devices and ignoring the time needed to send a jamming signal is
25.611S, what is the minimum size of the frame?

Page 12 of 12

You might also like