Вы находитесь на странице: 1из 16

Advance Computer

Networks
Lecture# 9
Lecture Slides Prepared by:
Syed Irfan Ullah
Abasyn University Peshawar

3a. Data Link Layer Protocols

1. Introduction
2. DLL Design

3. Elementary Data Link


Protocols

a.

Network Layer Services

b.

Error Control

c.

Flow Control

a.

Stop-and-Wait Protocol

b.

Simplex Protocol for Noisy


Channel; Time-out

c.

Sliding Window Protocols

d.

Sliding-window Flow Control

e.

A One bit Sliding-Window

f.

A Protocol Using Go-Back-N

g.

Selective Reject

High-Level Data Linc Control

a. HDLC Operation

The Internet Protocol

a. PPP-The point-to-point protocol

b. HDLC Protocol
2

1. Data/control exchanged via


protocols
a human protocol and a computer network
protocol:
Hi

TCP connection
req

Hi

TCP connection
response
Get
http://www.awl.com/kurose-ross

Got the
time?

2:00

time

<file>

Data Link Layer

application

Data transfer between


neighboring network elements

transport

Requirements and Objectives:


Maintain and release data Link
Frame synchronization
Error control
Flow control
Addressing
Link management

network
link
physical

DLL functions:
Providing service interface to the network layer.
Data Link Protocols must take circuit errors,
Flow regulating.
4

Link Layer: Introduction


Data link

Some terminology:
Hosts, bridges, switches and
routers are nodes
Communication channels
that connect adjacent nodes
along communication path
are links
wired links
wireless links
LANs

frame, encapsulates
datagram
Data link layer has responsibility of
transferring datagram from one node
to adjacent node over a data link

2. Packet and Frame relationship


Network Layer

Network Layer

Sending machine
Packet

Header Payload fild Trailer

Receiving machine
Frame

Packet

Header Payload field Trailer

In some cases, functions of error control and flow control are


allocated in transport or other upper layer protocols and not in the
DLL, but principles are pretty much the same.
6

Protocol layering and data


Each layer takes data from above
adds header information to create new
data unit
passes new data unit to layer below
source
M
Ht M
Hn Ht M
Hl Hn Ht M

application
transport
network
link
physical

destination
application
Ht
transport
Hn Ht
network
Hl Hn Ht
link
physical

message

segment

M
M

datagram
frame

Data flow-physical communication


data
application
transport
network
link
physical
application
transport
network
link
physical

network
link
physical

application
transport
network
link
physical

data
application
transport
network
link
physical
8

list of the DLL requirements


Frame synchronization. Data are sent in
blocks called frames. The beginning and end
of each frame must be recognized.
Flow control. The sending station must not
send frames at a rate faster then the
receiving station can absorb them.
Error control. Any bit errors introduced by
the transmission system must be checked &
corrected.
Addressing. On a multipoint line, such as a
LAN, the identity of the two stations involved
in a transmission must be specified.
Link management. The initiation,
maintenance, and termination of a data
exchange requires a fair amount of
9
coordination and cooperation among
stations.

Services to the Network Layer (NL)

DLL processes data transfer using a data


link protocol.
The actual services can vary from system to
system.

Three reasonable services to the NL


are:
1. Unacknowledged connectionless
service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented
service.
10

1. Unacknowledged connectionless service


The source machine send frames to the
destination machine without having the
destination machine acknowledged them.
No logical connection is established
beforehand or released afterward.
If a frame is lost due to noise on the line, no
attempt is made to detect the loss or recover
from it in the DLL.
This class of service is appropriate when the
error rate is very low so that recovery task
is left for solution to higher layers.
It is also appropriate for real-time traffic,
such as voice, in which late data are worse
than bad data.
Most LANs use unacknowledged
11
connectionless service in the DLL

2. Acknowledged connectionless service


Is more reliable.
Still no logical connections used, but each
frame sent is individually acknowledged.
The sender knows whether a frame has
arrived correctly.
If it has not arrived within a specific time
interval, it can be sent again.
This service is useful over unreliable
channels, such as wireless system.
If the large packet is broken up into frames, If
individual frames are acknowledged or
retransmitted, entire packets get through
much faster than unbroken frame that is
lost, it may take a very long time for the
packet to get through..
12

3. ACKed connection-oriented service

1.

2.

The service requires established connection


between source/destination machines before data
are transferred.
Any frame sent over the connection is numbered,
and the DLL guarantees that each frame sent, is
received, and are received in the same order.
With connectionless service, in contrast, it is possible
that a lost acknowledgement causes a packet to be
sent several times and thus received several times.
When connection-oriented service is used,
transfers go through 3 distinct phases:
The connection is established and counters needed
to keep
track of which frames have been received and which
ones
have not.
13
One or more frames are transmitted and

Link Layer Job


Framing:
encapsulate datagram into frame, adding header,
trailer
Error Detection:
errors caused by signal attenuation, noise.
receiver detects presence of errors:
signals sender for retransmission or drops frame

two types of errors:


Lost frame
Damaged frame
Error Correction:
receiver identifies and corrects bit errors without
retransmission
14

Example is a WAN subnet


Consisting of routers connected by point-topoint leased telephone lines.
1. When a frame arrives at a router, the
hardware checks it for errors, (Passes the
frame to the DLL software which might be
embedded in a chip on the network interface
board).
2. The DLL software checks to see if it is the
frame expected,
3. If so, gives the packet (contained the payload
field) to the routing software.
4. The routing software then chooses the
appropriate outgoing line and passes the
packet back down to the DLL software,
which
15

Techniques for error control are:


Error detection.
Positive Acknowledgment.
Retransmission after time-out.
Negative acknowledgment and retransmission
These 4 mechanisms are all referred to as Automatic
Report reQuest (ARQ); the effect of ARQ is to turn
an unreliable data link into a reliable one.
Three standardized versions Of ARQ:

Stop-and-wait ARQ
Go-back-N ARQ
Selective-reject ARQ

16

Вам также может понравиться