0% found this document useful (0 votes)
14 views

Lecture 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Lecture 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

EC 521

Communication Networks
Lecture 4
Data Link Layer
Data Link Layer

Outlines:
Data Link Layer Services
 Framing
 Flow Control
 Error Control
Data Link Layer Design Issues

• Physical layer delivers bits of information to and


from data link layer.

• The functions of Data Link Layer are:


1. Providing a well-defined service interface to
the network layer.
2. Dealing with transmission errors.
3. Regulating the flow of data so that slow
receivers are not swamped by fast senders.
Data Link Layer Design Issues

Data Link Layer Services


 Framing
 Flow Control
 Error Control
1- FRAMING

 The the first service provided by the data-


link layer is framing.
 The data-link layer at each node needs to
encapsulate the datagram (packet received
from the network layer) in a frame before
sending it to the next node.
 The node also needs to decapsulate the
datagram from the frame received on the
logical channel.
FRAMING

Each frame has a


 frame header – a field for holding the packet,
and frame trailer.

11.8
Packets and Frames

Relationship between packets and frames.


2- FLOW CONTROL

Flow control refers to a set of procedures used to


restrict the amount of data
that the sender can send before
waiting for acknowledgment.

11.10
FLOW CONTROL

 Whenever we have a producer and a consumer, we


need to think about flow control. If the producer
produces items that cannot be consumed, accumulation
of items occurs.
 The sending data-link layer at the end of a link is a
producer of frames; the receiving data-link layer at the
other end of a link is a consumer.
 If the rate of produced frames is higher than the rate of
consumed frames, frames at the receiving end need to
be buffered while waiting to be consumed (processed).
FLOW CONTROL

 Definitely, we cannot have an unlimited buffer size at


the receiving side. We have two choices.
The first choice is to let the receiving data-link layer
drop the frames if its buffer is full.
The second choice is to let the receiving data-link
layer send a feedback to the sending data-link layer
to ask it to stop or slow down.
 Different data-link-layer protocols use different
strategies for flow control.
3- ERROR CONTROL

Error control in the data link layer is based on


automatic repeat request, which is the
retransmission of data.

11.13
ERROR CONTROL

 At the sending node, a frame in a data-link layer needs to


be changed to bits, transformed to signals, and transmitted
through the transmission media.
 At the receiving node, electromagnetic signals are
received, transformed to bits, and put together to create a
frame.
 Since electromagnetic signals are susceptible to error, a
frame is susceptible to error.
 The error needs first to be detected.
 After detection, it needs to be either corrected at the
receiver node or discarded and retransmitted by the
sending node.
Data-Link Layer terminologies
Nodes and Links

 Communication at the data-link layer is node-to-node.


 A data unit from one point in the Internet needs to
pass through many networks (LANs and WANs) to
reach another point.
 Theses LANs and WANs are connected by routers.
 It is customary to refer to the two end hosts and the
routers as nodes and the networks in between as links.
 The following Figure is a simple representation of
links and nodes when the path of the data unit is only
six nodes.
Nodes and Links

9.17
Two Categories of Links

 Although two nodes are physically connected by a


transmission medium such as cable or air, we need
to remember that the data-link layer controls how
the medium is used.
 We can have a data-link layer that uses the whole
capacity of the medium; we can also have a data-
link layer that uses only part of the capacity of the
link.
 In other words, we can have a point-to-point link
or a broadcast link.
9.18
Two Sublayers

To better understand the functionality of


and the services provided by the link
layer, we can divide the data-link layer
into two sublayers: data link control
(DLC) and media access control (MAC).

9.19
Dividing the data-link layer into two sublayers

9.20

You might also like