Data Link Layer - PowerPoint PPT Presentation

1 / 60
About This Presentation
Title:

Data Link Layer

Description:

Describe the role of the data link layer in data transmission ... KERMIT - CRC-24 error checking, flexible, can be adjusted to support a variety ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 61
Provided by: charletta
Category:
Tags: data | kermit | layer | link

less

Transcript and Presenter's Notes

Title: Data Link Layer


1
Data Link Layer
  • After studying this Chapter you should
  • Describe the role of the data link layer in data
    transmission
  • List the common sources of error in data
    transmission
  • Discuss how to prevent data transmission errors
  • Explain the three most common error detection and
    correction methods
  • Discuss commonly used data link protocols
  • Explain how to control access to the media

2
Data Link Layer Introduction
  • The data link layer sits between the physical
    layer and the network layer.
  • The data link layer accepts messages from the
    network layer and controls the hardware that
    actually transmits them.
  • Both the sender and receiver have to agree on the
    rules or protocols that govern how their data
    link layers will communicate with each other.

3
Data Link Layer (OSI Model)
  • Manages the basic transmission circuit
    established in layer 1 and transforms it into a
    circuit that is free of transmission errors
  • Frames the information
  • Performs error detection, correction and
    retransmission of data
  • Divided into two sublayers
  • MAC - Media access control
  • LLC - Logical link control

4
Data Link Protocol
  • A data link protocol provides three functions
  • Controls when computers transmit (media access
    control)
  • Detects and corrects transmission errors (error
    control)
  • Identifies the start and end of a message
    (message delineation)

5
Data Link Functions
  • Media access control
  • .. who can transmit at a given time
  • Error control
  • .. how the receiver determines if a transmission
    error has occurred and corrects it
  • Message delineation
  • .. how the receiver knows where a character or
    message begins or ends

6
Media Access Control
  • The need to control when devices transmit
  • Needed when several devices share the same
    communication circuit
  • Point-to-point configuration with half-duplex
    transmission, requiring devices to take turns
  • Multi-point configurations with several devices
    sharing the same line
  • Critical function in local area networks
  • Two types Controlled access and Contention

7
Media Access Control - Controlled Access
  • Mainframe networks use controlled access
  • front-end processor
  • controls the circuit
  • determines which devices can access the media
  • controls when the devices can access the media
  • X-ON/X-OFF
  • one of the oldest protocols for media access
    control
  • dates back to the teletype
  • used for the transmission of text messages only
  • mostly used in communications between a computer
    and its printer

8
Media Access Control - Controlled Access
X-ON/X-OFF Communication with a printer
Time
Send X-ON
Send X-OFF
Buffer Utilization
0
100
Low Limit
High Limit
9
Media Access Control - Polling
  • polling - the process of
  • sending a signal to a terminal that either
  • gives it permission to transmit
  • or asks it to receive a transmission
  • FEP or host polls the client terminal/PC
  • store and forward
  • clients store the messages until polled
  • responds with the message or with a pass

10
Media Access Control - Polling
  • Roll call polling
  • front-end processor polls consecutively through
    the list of clients
  • can be modified for some terminals to have
    priority
  • loses time because of wait - some terminals
    off/no messages to send
  • must have a time-out period set

1, 2, 3, 1, 4, 5, 1, 6, 7, 1, 8, 9, ...
Roll call list
11
Media Access Control - Polling
  • Hub go-ahead polling
  • used in multi-point configurations
  • either a front-end processor passes the poll to
    the most remote device on the circuit which sends
    its message and passes the poll to the next
    device or one computer starts the process and
    passes it to the next computer
  • token passing
  • requires intelligent workstations

12
Media Access Control - Contention
  • opposite of controlled access
  • devices wait until the circuit is free
  • requires collision protection or recovery
  • works better on small networks with low usage
  • commonly used in Ethernet LANs

13
Media Access Control - Relative Performance
  • Number of messages transmitted affects
    performance depending on the MAC Protocol used
  • Controlled access
  • large networks
  • high usage
  • response time increases slowly
  • Contention
  • small networks
  • low usage
  • collisions are costly in terms of throughput
  • wasted circuit capacity
  • Find the crossover point

Contention
long
Response Time
Controlled access
short
low
high
Traffic
Figure 4-1
14
Network Errors
  • Human Errors
  • controlled by application programs
  • Transmission Errors
  • controlled by network hardware and software
  • Networks should be designed to
  • prevent
  • detect
  • correct

15
Network Errors
  • Corrupted data
  • data that has been altered or changed
  • Lost data
  • data that is misdirected or dropped from the
    transmission circuit
  • Burst errors
  • many bits changed or lost during one occurrence

16
What Causes Errors?
  • Line noise and Distortion cause errors.

Source of Error What Causes It How
to Prevent It. Line Outages White Noise
Impulse Noise Cross-Talk Echo Attenuation
Intermodulation Noise Jitter Harmonic
Distortion
Storms, Accidents Movement of electrons Sudden
increases in electricity (e.g. lightening,
voltage changes) Multiplexer guardbands too
small, or wires too close together Poor
connections Gradual decrease in signal
over distance Signals from several circuits
combine Analog signals change phase Amplifier
changes phase
Unable to prevent it Increase signal
strength Shield or move the wires Increase the
guardbands, or move or shield the wires Fix
the connections, or tune equipment Use
repeaters or amplifiers or reduce frequency
or Increase signal strength Move or shield
the wires or adjust the equipment Tune
equipment Tune equipment
Figure 4-2
17
Error Prevention
  • shielding
  • moving cables
  • changing multiplexing techniques
  • improving connection quality
  • adding amplifiers and repeaters
  • conditioning (equalization)

18
Error Prevention - Digital Repeaters
Regenerative Digital Repeater
0 1 0 1 1 0
0 1 0 1 1 0
0 1 0 1 1 0
19
Error Detection
  • To detect/correct errors, it is necessary to send
    extra bits along with the data
  • The more extra bits sent, the greater the error
    protection

Efficiency of data throughput
Error detection/correction
20
Error Detection
  • There are three common error detection methods.
  • parity checking
  • longitudinal redundancy checking
  • polynomial checking
  • checksum
  • cyclic redundancy checking

21
Error Detection
  • Parity checking
  • one extra bit is added to each byte in the
    message
  • value is bases on the number of 1s in the byte
  • set to make the total number of 1s even or odd
  • only specifies an error has occurred
  • 50 error detection rate

22
Parity Checking
  • Assume we are using even parity with 7-bit ASCII.
  • The letter V in 7-bit ASCII is encoded as
    0110101.
  • Because there are four 1s (an even number),
    parity is set to zero.
  • This would be transmitted as 01101010.
  • Assume we are using odd parity with 7-bit ASCII.
  • The letter V in 7-bit ASCII is encoded as
    0110101.
  • Because there are four 1s (an even number),
    parity is set to one.
  • This would be transmitted as 01101011.
  • Assume we are using even parity with 7-bit ASCII.
  • The letter W in 7-bit ASCII is encoded as
    0001101.
  • Because there are three 1s (an odd number),
    parity is set to one.
  • This would be transmitted as 00011011.

23
Parity Checking
Transmitter
Receiver
odd parity
(W) 0 0 0 1 1 0 1 0
(W) 0 0 0 0 1 0 1 0
A 0 was appended as the parity because the total
number of 1s were odd.
A transmission error changed this bit to a 0,
making the total number of 1s even.
Retransmission is requested.
24
Error Detection
  • Longitudinal Redundancy Checking (LRC)
  • used with parity - creates 98 error detection
  • adds one additional byte to the end of the
    message - Block Check Character (BCC)

Network with Odd Parity 7-bit ASCII
Longitudinal Redundancy Checking Sending the
message DATA
(D) 1 0 0 0 1 0 0 1
(A) 1 0 0 0 0 0 1 1
(T) 1 0 1 0 1 0 0 0
(A) 1 0 0 0 0 0 1 1
(BCC) 1 1 0 1 1 1 1 1
Determined Horizontally
Parity Bit Row Determined Vertically
Figure 4-4
25
Error Detection
  • Polynomial Checking
  • adds a character or series of characters to the
    end of the message based on one of several
    mathematical algorithms
  • done on blocks of data
  • CHECKSUM
  • CYCLICAL REDUNDANCY CHECK (CRC)

26
Polynomial Checking
  • CHECKSUM
  • one byte is added to the end of the message
  • calculated by adding the decimal value of each
    character in the message and dividing the sum by
    255, the remainder is the checksum
  • remainder is transmitted along with the message
  • this remainder is checked on both sides
  • 95 error detection rate for multiple-bit burst
    errors

27
Polynomial Checking
  • CYCLICAL REDUNDANCY CHECK (CRC)
  • adds 8, 16, 24 or 32 bits to the message
  • message us treated as one long binary polynomial
    number (P) divided by a fixed binary number (G)
  • the remainder is attached to the message
  • 99 error detection rate

P R Q G G
where
P the message to be send G polynomial agreed
upon by both parties as the divisor chosen so
R is multiple of 8 bits Q quotient (whole
number P/G) R remainder of P/G
28
Parity Checking
Base 10 Example of Polynomial Checking
Data to be sent P 247 Mutually Agreed Upon
Divisor G 5
3. Receiver obtains data calculates the
remainder R 2 then no
action R 2 then requests
retransmission of data
2. Transmitter sends data and
remainder 2 247
1. Transmitter calculates the
remainder 49 R2 5) 247 20 47
45 2
29
Error Correction
  • Retransmission
  • simplest, most effective
  • least expensive, most common
  • Automatic Repeat reQuest (ARQ)
  • Stop and Wait ARQ
  • Continuous ARQ

30
Error Correction
  • Stop and Wait ARQ - sender stops and waits for a
    response from the receiver
  • ACK - acknowledgment - no errors detected
  • NAK - negative acknowledgment - message contained
    an error

Figure 4-5
31
Error Correction
  • Continuous ARQ - sender continues with
    transmission and examines return acknowledgments
    at the same time
  • called sliding window
  • LAP-M retransmit only those packets with errors
  • Go-Back-N ARQ - retransmit from point of error

32
Continuous ARQ (sliding window)
Transmitter
Receiver
Go-Back-N ARQ
MSG0
MSG3
MSG2
MSG1
NAK2
MSG4
MSG3
MSG2
MSG5
LAP-M ARQ (Link Access Protocol for Modems
MSG0
MSG3
MSG2
MSG1
NAK2
MSG5
MSG6
MSG2
MSG4
33
Forward Error Correction
  • Uses codes containing sufficient redundancy to
    prevent errors without retransmission
  • Essential for satellite transmissions, where
    propagation delay is significant
  • V.34 modem standard includes forward error
    checking
  • Hagelbarger code - corrects up to six consecutive
    bit errors provided at least 19 valid bits follow
  • Bose-Chaudhuri code - capable of correcting
    double errors and detecting up to four errors
  • Hamming code - associates even parity bits with
    unique combinations of data bits
  • Reed-Solomon code - nonbinary, multisymbol block
    code, capable of correcting 12 errors

34
Forward Error Correction
  • Used with CD/ROM disk and audio compact disk
    technology
  • Data is encoded as a series of microscopic pits
    and flat spaces that are read by laser
  • This medium is very prone to errors - once data
    is stored, there is no way to correct it
  • Forward error correction is used to correct the
    stored errors when reading the CD

35
Forward Error Correction
  • Used in main RAM memory
  • Alpha particles in the plastic encasement of
    memory chips cause soft errors
  • RAM memory actually contains more than the
    advertised amount
  • provide extra bits for forward error checking
  • Without this capability, PCs would not be
    reliable enough for general acceptance

1 MB 220 bytes 8,388,608 bits 16 MB
134,217,728 bits The MTBF, due to soft error,
for such RAM memory, would be 1 million
years 2.7 days 134,217,728
36
Data Link Layer Protocols
  • focused on message delineation
  • indicates where the message starts and stops
  • and the parts of the message transmitted
  • needed to determine which part of the message is
    the error control portion

37
Data Link Protocols
  • Asynchronous Transmission
  • start-stop transmission
  • the sending device can transmit a character
    whenever convenient
  • a start and stop bit are appended to each
    character sent
  • typically used on point-to-point full duplex
    circuits

Figure 4-9
38
Data Link Protocols
  • Asynchronous File Transmission Protocol
  • XMODEM - takes the data being transmitted and
    divides it into blocks - uses stop and wait ARQ
  • YMODEM - CRC-16 error checking - multiple file
    transfer capability
  • ZMODEM - CRC-32 error checking - dynamically
    adjusts its packet size according to
    communication circuit conditions
  • KERMIT - CRC-24 error checking, flexible, can be
    adjusted to support a variety of different packet
    sizes

39
Asynchronous File Transfer Protocols
XMODEM FORMAT
SOH STX Checksum 1 byte
1 byte 1 byte
Message 128 bytes
Figure 4-10
Packet (block) 1 byte
40
Asynchronous File Transfer Protocols
  • KERMIT
  • popular protocol developed by Columbia University
  • flexible - can be adjusted during transmission
  • 1000 byte packets with CRC-24
  • uses either stop-and-wait or continuous ARQ

41
Data Link Protocols
  • Synchronous Transmission
  • used for high-speed transmission of a block of
    data (frame or packet)
  • start/stop bits are NOT required
  • synchronization established by sending a group of
    SYN characters (1-8 SYN characters)
  • used in point-to-point and multipoint
  • for multipoint requires destination and source
    addresses

42
Synchronous Transmission
  • There are many protocols for synchronous
    transmission that fall into three broad
    categories
  • Byte-oriented
  • Bit-oriented
  • Byte-count

43
Data Link Protocols
  • Synchronous Transmission
  • Binary Synchronous Communication (BSC)
  • mainframe protocol developed by IBM in 1967
  • byte-oriented protocol
  • Synchronous Data Link Control (SDLC)
  • mainframe protocol developed by IBM in 1972
  • bit-oriented protocol
  • control fields and data do not have to be in
    8-bit bytes

Start Flag 01111110 8 bits
Control 8 bits
Frame check SEQ
16 or 32 bits
End Flag 01111110 8 bits
Address 8 bits
Message (variable length)
Figure 4-11
44
Synchronous Transmission
  • High-level Data Link Control (HDLC)
  • developed by the International Organization for
    Standardization (ISO)
  • similar to SDLC except the address and control
    fields are longer
  • LAP-B (Link Access Procedure-Balanced)
  • a scaled down version of HDLC
  • uses the same structure as HDLC
  • additional benefits of both are beyond the scope
    of this class

45
Synchronous Transmission
  • Token Ring (IEEE 802.5)
  • developed by IBM in early 1980s
  • LAN protocol
  • supports transparency automatically
  • byte-orientated protocol
  • controlled media access
  • frame - starts and ends with a special electrical
    signal

46
Synchronous Transmission
  • Ethernet (IEEE 802.3)
  • developed by Digital, Intel, and Xerox in 1970s
  • LAN protocol
  • byte-count protocol
  • supports transparency automatically
  • includes a field that specifies the length of the
    message portion of the packet
  • uses a contention media access protocol

47
Synchronous Transmission
Token Ring format
Start Frame Destination
Source Message End
delimiter control address
address variable
delimiter 1 byte 1 byte 6
bytes 6 bytes max of 4500
1 byte
Access Frame control check
sequence1 byte 4 bytes
Ethernet format
Destination Source Length SNAP
Message CRC-32 address
address 2 bytes control variable
4 bytes 6 bytes 6 bytes
5 bytes max of 1492
LLC Control 3-bytes
48
Synchronous Transmission
  • Serial Line Internet Protocol (SLIP)
  • byte-oriented protocol developed in 1980s
  • one of two widely used protocols to connect a
    client computer to an ISP
  • uses TCP/IP
  • designed for point-to-point telephone connections
  • Problems
  • no error control
  • transparency is an issue

Begin 11000000 1 byte
End 11000000 1 byte
Message (variable)
49
Synchronous Transmission
  • Point-to-Point Protocol (PPP)
  • byte-oriented protocol developed in the early
    1990s to replace SLIP
  • better because it includes error control
  • supports network protocols beyond the Internet
    protocols
  • transparency is still a problem

Flag 01111110 1 byte
Flag 01111110 1 byte
Control 1 byte
Message (variable) max 1500 bytes
Address 1 byte
Protocol 2 bytes
CRC-16 2 bytes
Figure 4-13
50
Data Link Protocol
  • Isochronous Transmission
  • combines the elements of both synchronous and
    asynchronous data transmission
  • required to have a start and stop bit
  • sender and receiver are synchronized
  • data can be transmitted at higher speeds

51
Transmission Efficiency
  • The number of bits of user information divided by
    the total bits sent
  • BI
  • EC
  • BT
  • where
  • EC efficiency of the code
  • BI number of bits of user information
  • BT number of total bits transmitted
  • (user information overhead)

52
Transmission Efficiency
  • Asynchronous Transmission
  • 7-bit ASCII characters
  • assuming 1 parity bit
  • 1 start bit and 1 stop bit
  • BI 7 7
  • EC (70)
  • BT 7 1 2 10

53
Transmission Efficiency
  • Synchronous Transmission
  • 8-bit EBCDIC characters
  • assuming 100 character frame of information
  • 32-bit frame check sequence
  • 8-bits start and end flag
  • 8-bits address
  • 8-bits control
  • BI 800 800
  • EC (92.6)
  • BT 800 64 864

54
Transmission Efficiency
What is the best packet size for transmission?
  • Why is the efficiency low for very small
    packets?
  • Why is the efficiency low for very large
    packets?

55
Transmission Efficiency
  • Throughput - the total number of information bits
    received per second, after taking into account
    the overhead bits and the need to retransmit
    packets containing errors
  • Transmission Rate of Information Bits (TRIB) -
    the effective rate of data transfer or the actual
    throughput of the circuit

56
Throughput (TRIB)
  • Measures the effective rate at which information
    is transmitted over a link per unit of time
  • ANSI provides the basic definition for
    calculating TRIB
  • Divide the number of information bits transferred
    by the total time required for the transfer
  • number of information bits transferred
  • TRIB
  • total transfer time

57
Throughput (TRIB)
TRIB number of information bits accepted
total transfer time TRIB K(M - C)(1 - P)
M R where K information bits per
character M packet length in characters R
data transmission rate in characters per
second C average of non-information bits
per block P probability that a block will
require retrans because of error T time
between blocks in seconds
T
58
Throughput (TRIB)
  • The following TRIB example shows the calculation
    of throughput assuming a 4800 bits per second
    half-duplex circuit.
  • 7(400-10)(1-0.01)
  • (400/600) 0.025
  • where K 7 bits per character (information)
  • M 400 characters per block
  • R 600 characters per second (derived from
    4800 bps
  • divided by 8 bits/character)
  • C 10 control characters per block
  • P 0.01 (10-2) or one retransmission out of
    100 blocks
  • transmitted 1
  • T 25 milliseconds (0.025) turnaround time

TRIB 3908 bits per second
59
Throughput (TRIB)
  • 7(400-10)(1-0.01)
  • (400/600) 0
  • If all factors in the calculation remain constant
    except for the circuit, which is changed into
    full duplex (no turnaround time delays, T0) then
    the TRIB increases to 4054 bps.
  • Look at the equation where the turnaround value
    (T) is 0.025. If there is a further propagation
    delay time of 475 milliseconds (0.475), this
    figure changes to 0.500. For demonstrating how a
    satellite channel affects TRIB, the total delay
    time is now 500 milliseconds. Still using the
    figures above (except for the new 0.500 delay
    time), we reduce the TRIB for our half-duplex,
    satellite link to 2317 bps, which is almost
    one-half for the full-duplex (no turnaround time)
    4054 bps.

TRIB 4054 bits per second
60
Throughput (TRIB)
  • 7(200-15)(1-0.02)
  • (200/1200) 0.030
  • Consider a 9600 bps half-duplex circuit in which
    ASCII characters are sent with one parity bit for
    each character. Assume 200 characters per block
    of which 15 are for control, there is a 2 error
    probability, and a 30 millisecond turnaround
    time.

TRIB 6440 bits per second
Write a Comment
User Comments (0)
About PowerShow.com