Ch04b

Chapter 4
Data Link Layer
Announcements and Outline
Announcements
• Review Assignment Due next Thurs., 9/17
• Assessment #1 – Tues., 9/22
•
•
•
MC
Short Answer
Career Day, Weds. 9/16
•
Register
Outline
4 Data Link Layer
4.1 Media Access Control
4.2 Error Control
4.3 Data Link Protocols
Copyright 2010
John Wiley & Sons, Inc
2
Network Layers
Computer 1
Computer 2
3
Data Link Layer - Introduction
Responsible for moving messages from
one device to another
Network Layer
Controls the way messages are sent on media Data Link Layer
Physical Layer
Organizes physical layer bit streams into
coherent messages for the network layer
Major functions of a data link layer protocol
 Media Access Control
 Error Control
 Message Delineation
4
Recap – Media Access Control and Error Detection
Media Access Control
• Control
• Contention
Error Control
• Source of errors
Error Detection
• Parity Checks
• CRC-16 & CRC-32
5
4.2.3 Error Correction
Once detected, the error must be corrected
Error correction techniques
 Retransmission (or, backward error correction)
 Forward Error Correction
6
4.2.3.1 Automatic Repeat reQuest (ARQ)
Process of requesting a data transmission be resent
Main ARQ protocols
 Stop and Wait ARQ (A half duplex technique)
 Continuous ARQ (A full duplex technique)
7
4.2.3.1 Stop and Wait ARQ
Sender
Receiver
8
4.2.3.1 Stop and Wait ARQ – Timeouts
Sender
Receiver
9
4.2.3.1 Stop and Wait ARQ – Timeouts
Sender
Receiver
10
4.2.3.1 Continuous ARQ
11
4.2.3.1 Flow Control with ARQ
Ensuring that sender is not transmitting too quickly for the
receiver
 Stop-and-wait ARQ
 Continuous ARQ
12
Flow Control Example
13
4.3 Data Link Protocols
Classification
 Asynchronous transmission
 Synchronous transmission
Differ by
frame k-1
frame k
frame k+1
 Message delineation
 Frame length
 Frame field structure
14
4.3.1 Asynchronous File Transfer
Used on:
 Point-to-point asynchronous circuits
 Typically over phone lines via modem
 Computer to computer for transfer of data files
Characteristics of file transfer protocols
 Designed to transmit error-free data
Popular File transfer Protocols
 Xmodem, Zmodem, and Kermit
15
4.3.1 Asynchronous Transmission
Remember the Physical Layer…Bi-Polar Transmission
16
4.3.2 Synchronous Transmission
• Data sent in a large block
• Includes addressing information
• Includes a series of synchronization (SYN) characters
 Used to help the receiver recognize incoming data
• Synchronous transmission protocols categories
 Bit-oriented protocols: SDLC, HDLC
 Byte-count protocols: Ethernet
 Byte-oriented protocols: PPP
17
4.3.2.1 Ethernet (IEEE 802.3ac & II – Ethernet 2)
Most widely used LAN protocol, developed jointly by
Digital, Intel, and Xerox, now an IEEE standard
Uses contention based media access control
Byte-count data link layer protocol
No transparency problem
 uses a field containing the number of bytes (not flags) to
delineate frames
Error correction: optional
18
4.3.2.1 Ethernet II Frame
19
4.3.2.2 Point-to-Point Protocol (PPP)
20
4.3 Data Link Protocol Summary
Protocol
Size
Error Detection
Retransmission
Media Access
Asynchronous Xmission
1
Parity
Continuous ARQ
Full Duplex
XMODEM
132
8-bit Checksum
Stop-and-wait ARQ
Controlled Access
XMODEM-CRC
132
8-bit CRC
Stop-and-wait ARQ
Controlled Access
XMODEM-1K
1028
8-bit CRC
Stop-and-wait ARQ
Controlled Access
ZMODEM
*
32-bit CRC
Continuous ARQ
Controlled Access
KERMIT
*
24-bit CRC
Continuous ARQ
Controlled Access
SDLC
*
16-bit CRC
Continuous ARQ
Controlled Access
HDLC
*
16-bit CRC
Continuous ARQ
Controlled Access
Token Ring
*
32-bit CRC
Stop-and wait ARQ
Controlled Access
Ethernet
*
32-bit CRC
Stop-and wait ARQ
Contention
SLIP
*
None
None
Full Duplex
PPP
*
16-bit CRC
Continuous ARQ
Full Duplex
File Transfer Protocols
Synchronous Protocols
* Varies depending on message length.
21
4.3 Transmission Efficiency
An objective of the network:
 Move as many bits as possible with minimum errors
 higher efficiency and lower cost
Factors affecting network efficiency:
 Characteristics of circuit (error rate, speed)
 Speed of equipment, Error control techniques
 Protocol used
• Information bits (carrying user information)
• Overhead bits ( used for error checking, frame delimiting,
etc.)
22
4.3 Transmission Efficiency
=
Total number of info bits to be transmitted
Total number of bits transmitted
23
4.3 Optimum Packet Size
Trade-off between packet size and throughput
Acceptable range
(less likely to contain errors)
(more costly in terms of circuit
capacity to retransmit if there
is an error)
24
Transmission Efficiency of Protocols
Async Transmission:
Ethernet II Transmission
However, large packets likely to have more errors and are more
likely to require retransmission  wasted capacity
25
Throughput
A more accurate definition of efficiency
Total number of information bits received per second; takes
into account:
 Overhead bits (as in transmission efficiency)
 Need to retransmit packets containing errors
Complex to calculate; depends on:
 Transmission efficiency
 Error rate
 Number of retransmission
Transmission Rate of Information Bits (TRIB)
 Used as a measurement of throughput
26
TRIB =
Number of info bits accepted
Total time required to get the bits
Average number
Info bits per
of non-info
character
characters per
block
TRIB =
Packet
length in
characters
Probability that
a block will
require
retransmission
K (M – C) (1 – P)
(M / R) + T
Time between
blocks (in seconds)
Data
xmission (propagation time +
rate in char turnaround time)
per second (a.k.a., reclocking
time)
Ex:
K=7 bits/character
M = 400 char/block
R= 4.8 Kb/s
C = 10 char/block
P = 1%
T = 25 ms
7(400-10)(1-0.01)
TRIB =
(400/600)+0.025)
= 3.908 Kb/s
27
Implications for Management
Provide a few, widely used data link layer protocols for all
networks





Minimize costly customization
Minimize costly translation among many protocols
Less training, simpler network management
Bigger pool of available experts
Less expensive, off-the-shelf equipment
28
Next Week:
Start Chapter 5 – Network and Transport Layers
29