You are on page 1of 67

ELK455E

Computer Networks for Power Systems


Chapter 5: Data link Layer

ITU, ELECTRICAL ENGINEERING 1


Data Link Layer (2)

OBJECTIVES of the Chapter 5


•Understand the role of the data link layer
•Become familiar with two basic approaches to controlling
access to the media: Controlled Access, Contention
•Become familiar with common sources of error and their
prevention
•Understand three common error detection and
correction methods
•Become familiar with several commonly used data link
protocols

ITU, ELECTRICAL ENGINEERING 2


Data Link Layer
THE DATA link layer (layer 2) is responsible for moving a
message from one computer/IED device to the next
computer/IED device in the overall path from sender or
receiver. It controls the way messages are sent on the
physical media.
Both the sender and receiver have to agree on the rules, or
protocols, that govern how they will communicate with each
other.

A data link protocol determines:


-who can transmit at what time,
-where a message begins and ends,
-and how a receiver recognizes and corrects a transmission
error.

ITU, ELECTRICAL ENGINEERING 3


Data Link Layer
The data link layer performs two main functions, and
therefore is often divided into two sub-layers.

Network Layer Network Layer

Data Link Layer LLC


MAC
Physical Layer
Physical Layer
The logical link control (LLC) sublayer is the data link
layer's connection to the network layer above it. At the
sending computer, the LLC sublayer software is
responsible for communicating with the network layer
software (e.g., IP) and for taking the network layer
Protocol Data Unit (PDU)—usually an IP packet—and
surrounding it with a data link layer PDU—often an
Ethernet frame.
ITU, ELECTRICAL ENGINEERING 4
Data Link Layer
At the receiving computer, the LLC sublayer software
removes the data link layer PDU and passes the message
it contains (usually an IP packet) to the network layer
software.
The media access control (MAC) sublayer controls the
physical hardware. The MAC software at the sending
computer controls how and when the physical layer
converts bits into the physical symbols that are sent
down the circuit.
At the receiving computer, the MAC software takes the
data link layer PDU from the LLC sublayer, converts it
into a stream of bits, and controls when the physical
layer actually transmits the bits over the circuit.

ITU, ELECTRICAL ENGINEERING 5


Data Link Layer
At the receiving computer, the MAC sublayer receives a
stream of bits from the physical layer and translates it
into a coherent PDU, ensures that no errors have
occurred in transmission, and passes the data link layer
PDU to the LLC sublayer.
Both the sender and receiver computers have to agree
on the rules or protocols that govern how their data link
layers will communicate with each other.
A data link protocol performs three functions:
• Controls when computers transmit (media access
control)
• Detects and corrects transmission errors (error
control)
• Identifies the start and end of a message by using a
PDU (message delineation)
ITU, ELECTRICAL ENGINEERING 6
Media Eccess Control

Media access control refers to the need to control


when computers transmit. With point-to-point full-
duplex configurations, media access control is
unnecessary because there are only two computers on
the circuit and full duplex permits either computer to
transmit at any time.
Media access control becomes important when several
computers share the same communication circuit, such
as a point-to-point configuration with a half-duplex
configuration that requires computers to take turns, or a
multipoint configuration in which several computers
share the same circuit.

ITU, ELECTRICAL ENGINEERING 7


Media Eccess Control
Here, it is critical to ensure that no two computers
attempt to transmit data at the same time—but if they
do, there must be a way to recover from the problem.

ITU, ELECTRICAL ENGINEERING 8


Media Eccess Control
There are two fundamental approaches to media
access control: Contention and Controlled Access.

Contention based access:With contention computers


wait until the circuit is free (i.e., no other computers
are transmitting) and then transmit whenever they
have data to send. Contention is commonly used in
Ethernet LANs.
As an analogy, suppose that you are talking with some
friends. People listen and if no one is talking they can
talk.
Sometimes two people attempt to talk at the same
time, so there must be some technique to continue the
conversation after such a verbal collision occurs.

ITU, ELECTRICAL ENGINEERING 9


Media Eccess Control
Controlled Access: Most wireless LANS use controlled
access. In this case, the wireless access point controls
the circuit and determines which clients (terminals)
can transmit at what time.
There are two commonly used controlled access
techniques: Access requests and Polling.
With the access request technique, client
computers that want to transmit send a request to
transmit to the device that is controlling the circuit
(e.g., the wireless access point).
The controlling device grants permission for one
computer at a time to transmit. When one computer
has permission to transmit, all other computers wait
until that computer has finished, and then, if they
have something to transmit, they use a contention
technique to send an access request.
ITU, ELECTRICAL ENGINEERING 10
Media Eccess Control

The access request technique (X-ON / X-OFF) is like


a classroom situation in which the instructor calls on
the students who raise their hands.

The instructor acts like the controlling access point.


When they want to talk, students raise their hands and
the instructor recognizes them so they can contribute.

When they have finished, the instructor again takes


charge and allows someone else to talk. And of course,
just like in a classroom, the wireless access point can
choose to transmit whenever it likes.

ITU, ELECTRICAL ENGINEERING 11


A B
Request to Transmit
X-ON not busy
transmitting data
data
Pausing
(periodically done)
X-OFF busy
X-ON
not busy
transmitting data
data

It is an older controlled access protocol. Still used


between a computer and a printer and on some half
duplex communications circuits.
ITU, ELECTRICAL ENGINEERING 12
Media Eccess Control
Polling is the process of sending a signal to a
client/terminal computer that gives it permission to
transmit. With polling, the clients store all messages
that need to be transmitted. Periodically, the controlling
device (e.g., a wireless access point) polls the client to
see if it has data to send.
If the terminal has data to send, it does so. If the
terminal has no data to send, it responds negatively,
and the controller asks another client if it has data to
send.
There are several types of polling. With roll-call
polling, the controller works consecutively through a
list of terminals, first polling terminal 1, then terminal
2, and so on, until all are polled. Roll-call polling can
be modified to select terminals in priority so that some
get polled more ITU,
often than
ELECTRICAL others.
ENGINEERING 13
Media Eccess Control
Typically, roll-call polling involves some waiting because the
controller has to poll a terminal and then wait for a response.
The response might be an incoming message that was waiting
to be sent, a negative response indicating nothing is to be
sent, or the full “time-out period” may expire because the
client is temporarily out of service).
Usually, a timer “times out” the client after waiting several
seconds without getting a response. If some sort of fail-safe
time-out is not used, the circuit poll might lock up indefinitely
on an out-of-service terminal.
With hub polling (often called token passing), one device
starts the poll and passes it to the next computer on the
multipoint circuit, which sends its message and passes the poll
to the next. That computer then passes the poll to the next,
and so on, until it reaches the first computer, which restarts
the process again.
ITU, ELECTRICAL ENGINEERING 14
Polling (Summary)

 Process of transmitting to a client only if asked


and/or permitted
 Client stores the info to be transmitted
 Server (periodically) polls the client if it has data
to send
 Client, if it has any, sends the data
 If no data to send, client responds negatively,
and server asks the next client
 Types of polling
 Roll call polling
 Hub polling (also called token passing)

ITU, ELECTRICAL ENGINEERING 15


Hub Polling (Token Passing)

E
One computer starts the D
poll:
A
•sends message (if any) token C
then
B
•passes the token on to the
next computer

Continues in sequence until the token reaches the


first computer, which starts the polling cycle all over
again

ITU, ELECTRICAL ENGINEERING 16


Roll Call Polling
Check each client
(consecutively and Clients
periodically) to see if it D
wants to transmit : A, B, C,
D, E, A, B, … C
E
B

Server A
Clients can also be
prioritized so that they are  Involves waiting: Poll and wait
for a response
polled more frequently:
 Needs a timer to prevent lock-up
A, B, A, C, A, D, A, E, A, B,
(by client not answering)
..

ITU, ELECTRICAL ENGINEERING 17


Relative Performance
Depends on network conditions When volume
is high,
performance
Work better for deteriorates
networks with high (too many
traffic volumes collisions)

Cross-over
Network more
point: About
efficiently used
Work better for 20
smaller networks computers
with low usage

ITU, ELECTRICAL ENGINEERING 18


Error Control
 Handling of network errors caused by problems in
transmission.
 Network errors
 e.g., changing a bit value during transmission

 Controlled by network hardware and software

 Human errors:
 e.g., mistake in typing a number

 Controlled by application programs

 Categories of Network Errors


 Corrupted (data changed)
 Lost data
No network can eliminate all errors, but most of the
corrupted data and the lost data can be prevented,
detected, and corrected. by proper network design

ITU, ELECTRICAL ENGINEERING 19


Error Control (Cont.)
There are statistical measures specifying typical bit
error rates and the pattern of errors. Bit error rate
signifies 1 bit error in n bits transmitted.
 Bit Error Rate (BER)
 1 bit error in n bits transmitted, e.g., 1 in 500,000
 Burst error
 Many bits are corrupted at the same time
 Errors not uniformly distributed
 e.g., 100 in 50,000,000  1 in 500,000
 Major functions
 Preventing errors
 Detecting errors
 Correcting errors
ITU, ELECTRICAL ENGINEERING 20
Sources of Errors

 Line noise and distortion are major causes of data


communications errors.
 More likely on electrical media
 Undesirable electrical signal
 Introduced by equipment and natural
disturbances
 Degrades performance of a circuit
Noise is undesirable electrical/optical signals and it
degrades the performance of a communication
circuit. Noise manifests itself as extra bits, missing
bits.

ITU, ELECTRICAL ENGINEERING 21


Summary: Sources of Errors and Prevention
Source of Error What causes it How to prevent it

Line Outages Faulty equipment, Storms,


Accidents (circuit fails)
White Noise (hiss) Movement of electrons (thermal Increase signal strength
More important

(Gaussian Noise) energy) (increase SNR)


Impulse Noise Sudden increases in electricity Shield or move the wires
(Spikes) (e.g., lightning, power surges)

Cross-talk Multiplexer guard bands are too Increase the guard bands, or
small or wires too close together move or shield the wires
Echo Poor connections (causing signal to Fix the connections, or
be reflected back to the source) tune equipment
Attenuation Gradual decrease in signal over Use repeaters or
distance (weakening of a signal) amplifiers
mostly on analog

Intermodulation Signals from several circuits Move or shield the wires


Noise combine
Jitter Analog signals change (small Tune equipment
changes in amp., freq., and phase)
Harmonic Amplifier changes phase (does not Tune equipment
Distortion correctly amplify its input signal)

ITU, ELECTRICAL ENGINEERING 22


Error Detection

Sender calculates an
Receiver recalculates
Error Detection Value
EDV and checks it
(EDV) and transmits
against the received EDV
it along with data

Mathematical Mathematical
calculations calculations
?
=
Data to be EDV
transmitted
– If the same  No
errors in transmission
Larger the size, better
error detection (but – If different  Error(s)
lower efficiency) in transmission

ITU, ELECTRICAL ENGINEERING 23


Error Detection Techniques
 In general, the larger the amount of error-detection
data sent, the greater the ability to detect an error.
However, as the amount of error-detection data is
increased, the throughput of useful data (efficiency) is
reduced.
 Therefore, the efficiency of data throughput varies
inversely as the desired amount of error detection is
increased.
Three well-known error-detection methods are:
 Parity checks
 Longitudinal Redundancy Checking (LRC)
 Polynomial checking
 Checksum
 Cyclic Redundancy Check (CRC)
ITU, ELECTRICAL ENGINEERING 24
Parity Checking
 One of the oldest and simplest way of error detection.
 A single bit added to each character
 Even parity: number of 1’s remains even
 Odd parity: number of 1’s remains odd

 Receiving end recalculates parity bit


 If one bit has been transmitted in error the received
parity bit will differ from the recalculated one
 Simple, but doesn’t catch all errors
 If two (or an even number of) bits have been
transmitted in error at the same time, the parity
check appears to be correct
 Detects about 50% of errors
When parity is used, protocols are described as
having odd parity or even parity.
ITU, ELECTRICAL ENGINEERING 25
Examples of Using Parity

To be sent: Letter V in 7-bit ASCII: 0110101

1’s even
EVEN parity sender receiver
01101010
number of all
transmitted 1’s
remains EVEN parity

1’s odd
ODD parity sender receiver
01101011
number of all transmitted
1’s remains ODD parity

ITU, ELECTRICAL ENGINEERING 26


Longitudinal Redundancy Checking (LRC)

Longitudinal Redundancy Checking (LRC) adds an


additional character (instead of a bit)
• Block Check Character (BCC) to each block of data
• Determined like parity but counting longitudinally
through the message (as well as vertically)
• Calculations are based on the 1st bit, 2nd bit, etc.
(of all characters) in the block
1st bit of BCC: number of 1’s in the 1st bit of
characters
2nd bit of BCC: number of 1’s in the 2ndt bit of
characters
Major improvement over parity checking
98% error detection rate for burst errors ( > 10 bits)
Less capable of detecting single bit errors
ITU, ELECTRICAL ENGINEERING 27
Longitudinal Redundancy Checking (LRC)

Example: Send the message “DATA” using ODD parity and LRC

Letter ASCII Parity bit


D 10001001
A 10000011
T 10101000
A 10000011
BCC 11011111

Note that the BCC’s parity bit


is also determined by parity

28
Longitudinal Redundancy Checking (LRC)

11100111 11011101 00111001 10101001

11100111
11011101
00111001
10101001
10101010

11100111 11011101 00111001 10101001 10101010

Original Data LRC

ITU, ELECTRICAL ENGINEERING 29


Error Detection – Polynomial Checking

 Adds 1 or more characters to the end of message. These are


two types of polynomial checking: Checksum and Cyclic
Redundancy Check (CRC)
 In checksum technique, a checksum (typically one byte) is
added to the end of the message.
 The checksum is calculated by adding the decimal value of
each character in the message, dividing the sum by 255, and
using the remainder (1 byte value) as the checksum.
 The receiver calculates its own checksum in the same way
and compares it with the transmitted checksum. If the two
values are equal, the message is presumed to contain no
errors. Use of checksum detects close to 95 percent of the
errors for multiple-bit burst errors.
30
Error Detection – Polynomial Checking

 Cyclical Redundancy (CRC) is one of the most popular error-


checking schemes. It adds 8, 16, 24, or 32 bits to the message.
With CRC, a message is treated as one long binary number, P.
P is divided by a fixed binary number, G, resulting in a whole
number, Q, and a remainder, R/G. So, P/G = Q +R/G. For
example, if P = 58 and G = 8, then Q = 7 and R = 2. G is
chosen so that the remainder, R, will be either 8 bits, 16 bits,
24 bits, or 32 bits. The remainder, R, is appended to the
message as the error-checking characters.
The receiving hardware divides the received message by the
same G, which generates an R. The receiving hardware checks
to ascertain whether the received R agrees with the locally
generated R. If it does not, the message is assumed to be in
error.
31
Error Detection – Polynomial Checking

Cyclical Redundancy (CRC)


Example:
P = 58
P/G=Q+R/G G=8
Q=7
R =2

Message Quotient Remainder:


(treated as (whole –added to the
one long number) message as EDD
binary A fixed number –could be 8 bits, 16
number) (determines the bits, 24 bits, or 32
length of the R) bits long

– Most powerful and most common


– Detects 100% of errors (if number of errors <= size of R)
–Otherwise: CRC-16 (99.998%) and CRC-32 (99.9999%)

32
Error Detection – Polynomial Checking

Cyclical redundancy check performs quite well. The most


commonly used CRC codes are CRC-16 (a 16-bit version),
CRC-CCITT (another 16-bit version), and CRC-32 (a 32-bit
version). The probability of detecting an error is 100% for all
errors of the same length as the CRC or less. For example,
CRC-16 is guaranteed to detect errors if 16 or fewer bits are
affected. If the burst error is longer than the CRC, then CRC is
not perfect but is close to it. CRC-16 will detect about 99.998
percent of all burst errors longer than 16 bits, whereas CRC-32
will detect about 99.99999998 percent of all burst errors longer
than 32 bits.

33
Error Correction via Retransmission

 Once error has been detected, it must be


corrected. The simplest, most effective, least
expensive, and most commonly used method for
error correction is retransmission (Backward error
correction). Forward Error Correction is also
possible.
With retransmission, a receiver that detects an
error simply asks the sender to retransmit the
message until it is received without error.
This is often called Automatic Repeat reQuest
(ARQ).
There are two types of ARQ: stop-and-wait
and continuous.
ITU, ELECTRICAL ENGINEERING 34
Stop and Wait ARQ

Sender Receiver
Sends the packet,
then waits to hear
from receiver. Sends ACK

Sends the
next packet
Sends NAK

Resends the
packet again
Sends ACK

35
Error Correction via Retransmission-
Continuous ARQ
With continuous ARQ, the sender continues sending packets
without waiting for the receiver to acknowledge. The receiver
continues receiving messages without acknowledging them right
away. Although the messages are being transmitted, the sender
examines the stream of returning acknowledgments. If it receives an
NAK, the sender retransmits the needed messages.
The packets that are retransmitted may be only those containing
an error (called Link Access Protocol for Modems [LAP-M]) or
may be the first packet with an error and all those that followed it
(called Go-Back-N ARQ). LAP-M is better because it is more
efficient.

ITU, ELECTRICAL ENGINEERING 36


Continuous ARQ

Sender sends packets


continuously without
waiting for receiver to
acknowledge

Notice that
acknowledgments now
identify the packet
being acknowledged.

Receiver sends back


a NAK for a specific
packet to be resent.

37
Error Correction via Retransmission

 Continuous ARQ is a full-duplex transmission technique, since


both the sender and the receiver are transmitting
simultaneously. Continuous ARQ is sometimes called sliding
window.
 Continuous ARQ is also important in providing flow control,
which means ensuring that the computer sending the message
is not transmitting too quickly for the receiver. By using ACKs
and NAKs, the receiver can control the rate at which it receives
information. The sender and receiver usually agree on the size
of the sliding window.
 Once the sender has transmitted the maximum number of
packets permitted in the sliding window, it cannot send any
more packets until the receiver sends an ACK.
38
Error Correction via Retransmission

Flow Control Example


window size =4 sender receiver
...3 2 1 0
0123456789
ACK 0...
(slide window)
...4
0123456789
ACK 4...
(slide window)
…8 7 6 5
0123456789
ACK 7.. set window
(slide window) size to 2
..9
0123456789
(timeout)
...9 8
0123456789 39
Transmission modes

A character code determines what bits we will send


between a terminal and host. But how will those bits
be sent:
• Parallel vs. Serial Transmission/Data can be sent
either in serial or in parallel.
• Serial Transmission Timing
• Direction of Transmission Path
• Others
 Speed/data rate
 organization of data (protocol)
 transmission media

ITU, ELECTRICAL ENGINEERING 40


2.3 Transmission modes
Parallel Transmission Mode: uses several wires, each
wire sending one bit at the same time as the others.
 A parallel printer cable sends 8 bits together.
 Your computers processor and motherboard also
use a parallel bus to move data around.

Parallel communications
ITU, ELECTRICAL ENGINEERING 41
Serial Transmission Mode: sends bit by bit over a single
line. Serial mode is slower than parallel, but can be
used over longer distances because the bits stay in the
order they were sent, while bits sent in parallel mode
tend to spread out over long distances.

Serial Communications
ITU, ELECTRICAL ENGINEERING 42
Data Link Protocols

 Data link layer protocols can be classified as


 Asynchronous transmission and
 Synchronous transmission
They Differ by frame k-1 frame k frame k+1
 Message delineation
 Frame length and
 Frame field structure

Message delineation:message start Stop

43
Serial Transmission Timing
Asynchronous Communications
 Digital transmission formats must have the following
elements:
 Standard voltage ranges
 Standard clock speeds
 Transmitter and receiver clocks must be
synchronized
 Framing is necessary to determine the first bit of a
character.
 Asynchronous systems use free-running clocks on the
transmitting and receiving sides
 A start bit is transmitted at the beginning of each
character and at least one stop bit at the end of the
character.

ITU, ELECTRICAL ENGINEERING 44


Asynchronous Communications

• Bits comprising a character are transmitted


independent of timing of any other character
• Asynchronous information bits are preceded by
a start bit and followed by a stop bit
• Start bit is always a 0 (space)
• Stop bit is always a 1 (mark)
• Start and Stop bits along with a parity bit result
in 30% overhead in data transmission using
ASCII codes
• Also known as start-stop transmission
• Used with dumb terminals and “character at a
time” applications

ITU, ELECTRICAL ENGINEERING 45


Asynchronous Communications

The UART accepts one or more bytes of data from the


processor, loads the data into a shift register, adds the
start bit, parity bit, stop bit, and proceeds to shift out
the data one it at a time.
The UART on the receiving end looks for the start bit
on which it will time the rest of the received bit.
ITU, ELECTRICAL ENGINEERING 46
Serial Transmission Timing.
Synchronous Transmission
 In synchronous systems, the receive and transmitter
clocks are synchronized to the same clock frequency.
 Synchronous communication is more efficient than
asynchronous because start and stop bits are not
necessary.
 Data is sent in blocks of specific data segments and have
an initial identifying sequence that allows proper framing
and often identifies the content of the block as well.
 Efficient for large block of data transmission.
 Frequently used with smart/intelligent terminals
 User inputs data which is held in the terminal
 After input is complete, user presses the “send” or “enter” key
and all data is transmitted in a single block.
ITU, ELECTRICAL ENGINEERING 47
Synchronous Transmission

ITU, ELECTRICAL ENGINEERING 48


Synchronous Transmission
 In summary, asynchronous data transmission means each
character is transmitted as a totally independent entity with its
own start and stop bits to inform the receiving computer that
the character is beginning and ending.
 Synchronous transmission means whole blocks of data are
transmitted as frames after the sender and the receiver have
been synchronized.
 There are many protocols for synchronous transmission. Four
commonly used synchronous data link protocols.
Synchronous Data Link Control (SDLC)
High-level data link control (HDLC)
Ethernet
Point-to-Point Protocol (PPP)

49
 Synchronous Data Link Control (SDLC) is a bit-oriented protocol
developed by IBM in 1972 that is still in use today. It uses a
controlled-access media access protocol.
Beginning Ending
(01111110) (01111110)

data CRC-32

Destination Identifies frame type;


Address (8 • Information (for transferring of user data)
or 16 bits) • Supervisory (for error and flow control)

50
Data Link Protocol Summary
Protocol Size Error Detection Retransmission Media Access
Asynchronous Xmission 1 Parity Continuous ARQ Full Duplex

File Transfer Protocols

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

Synchronous Protocols

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
Transmission Efficiency

 One objective of a data communication network is to transfer


the highest possible volume of accurate information (move as
many as information bits possible with minimum errors) to
lower the cost.
 Network efficiency is affected by;
 characteristics of the circuit (error rate and maximum
transmission speed),
 Speed of transmitting and receiving equipment,
 Error-detection and control methodology, and
 Protocol used by the data link layer. (information bits
carrying user information and overhead bits used for error
checking, frame delimiting etc.)

52
Transmission Efficiency

Transmission Efficiency =
Total number of info bits to be transmitted
Total number of bits transmitted
Async Transmission:
7-bit ASCII (info bits), 1 parity bit, 1 stop bit, 1 start bit
Transmission Efficiency = 7 / 10  70%
e.g., V.92 modem with 56 Kbps  39.2 Kbps effective rate
SDLC Transmission
Assume 100 info characters (800 bits), 2 flags (16 bits)
Address (8 bits), Control (8 bits), CRC (32 bits)
Transmission Efficiency = 800 / 64  92.6%
e.g., V.92 modem with 56 Kbps  51.9 Kbps effective rate

CRC
32-bits

53
Transmission Efficiency

 We can improve efficiency by reducing the number of


overhead bits in each message or by increasing the number of
information bits. For example, if we remove the stop bits from
asynchronous transmission, efficiency increases to 7/9, or
77.8%.
 This example shows that synchronous networks usually are
more efficient than asynchronous networks and some protocols
are more efficient than others.
 The longer the message, the more efficient the protocol. For
example, suppose the message in the SDLC example were
1,000 bytes. The efficiency here would be 99.2%, giving an
effective data rate of about 55.6 Kbps. Bigger the message
length, better the efficiency.

54
Transmission Efficiency

 The general rule is that the larger the message field, the more
efficient the protocol. So why not have 10,000-byte or even
100,000-byte packets to really increase efficiency? The answer
is that anytime a frame is received containing an error, the
entire frame must be retransmitted.
 Thus, if an entire file is sent as one large packet and 1 bit is
received in error, all 100,000 bytes must be sent again. Clearly,
this is a waste of capacity. Furthermore, the probability that a
frame contains an error increases with the size of the frame.
 Thus, in designing a protocol, there is a trade-off between large
and small frames. Small frames are less efficient but are less
likely to contain errors and cost less (in terms of circuit
capacity) to retransmit if there is an error.

55
Transmission Efficiency

 Throughput is a more accurate definition of efficiency. It is the


total number of bits received per second; takes into account
 Overhead bits (as in transmission efficiency)
 Need to retransmit packets containing errors
Calculating the actual throughput of a data communications
network is complex because it depends not only on the
efficiency of the data link protocol but also on the error rate
and number of retransmissions that occur.
 Transmission rate of information bits (TRIB) is a measure of
the effective number of information bits that is transmitted over
a communication circuit per unit of time. The basic TRIB
equation from ANSI is shown below.

56
Transmission Efficiency

Trade-off between packet size and throughput

Acceptable range

(more costly in terms of circuit


capacity to retransmit if there
(less likely to contain errors) is an error)

57
Transmission Efficiency

 Generally speaking, small frames provide better throughput for


circuits with more errors, whereas larger frames provide better
throughput in less-error-prone networks.
 Fortunately, in most real networks, the curve shown in the
figüre is very flat on top, meaning that there is a range of frame
sizes that provide almost optimum performance. Frame sizes
vary greatly among different networks, but the ideal frame size
tends to be between 2,000 and 10,000 bytes.
 So why are the standard sizes of Ethernet frames about 1,500
bytes? Because Ethernet was standardized many years ago
when errors were more common. Jumbo and super jumbo
frame sizes emerged from higher speed, highly error free fiber-
optic networks.

58
Transmission Efficiency

Transmission rate of information bits (TRIB) is a


measure of the effective number of information bits
that is transmitted over a communication circuit per
unit of time. The basic TRIB equation from ANSI is
shown below.

ITU, ELECTRICAL ENGINEERING 59


Transmission Efficiency

TRIB = Number of info bits accepted / total time required to get the bits

(number of info bits) (Prob. Of successful xmission)


time it takes to transmit these bits + propagation delay
Ex:
Average number Probability that K=7 bits/character
Info bits per of non-info a block will M = 400 char/block
character characters per R= 4.8 Kb/s
require
block retransmission C = 10 char/block
P = 1%
K (M – C) (1 – P) T = 25 ms
TRIB = 7(400-10)(1-0.01)
(M / R) + T TRIB =
(400/600)+0.025)
Packet Time between blocks (in = 3.908 Kb/s
length in Data seconds) (propagation
xmission
characters rate in char time + turnaround time)
per second (a.k.a., reclocking time)

4 - 60
Transmission Efficiency

61
SYNCHRONOUS AND ASYNCHRONOUS TRANSMISSION EFFICIENCY

ITU, ELECTRICAL ENGINEERING 62


SUMMARY
 Errors occur in all networks. Errors tend to occur in groups (or
bursts) rather than 1 bit at a time.
 The primary sources of errors are impulse noises, cross-talk,
echo, and attenuation.
 Errors can be prevented or at least reduced by shielding the
cables; moving cables away from sources of noise and power
sources; using repeaters (and, to a lesser extent, amplifiers);
and improving the quality of the equipment, media, and their
connections.

63
SUMMARY
 All error-detection schemes attach additional error-detection
data, based on a mathematical calculation, to the user's message.
 The receiver performs the same calculation on incoming
messages, and if the results of this calculation do not match the
error-detection data on the incoming message, an error has
occurred.
 Parity, checksum, and CRC are the most common error-
detection schemes.
 The most common error-correction technique is simply to ask
the sender to retransmit the message until it is received without
error.
 A different approach, forward error correction, includes
sufficient information to allow the receiver to correct the error in
most cases without asking for a retransmission.
64
SUMMARY
 Message delineation means to indicate the start and end of a
message. Asynchronous transmission uses start and stop bits on
each letter to mark where they begin and end. Synchronous
techniques (e.g., SDLC, HDLC, Ethernet, PPP) group blocks
of data together into frames that use special characters or bit
patterns to mark the start and end of entire messages.

65
SUMMARY
 Transmission Efficiency and Throughput: Every protocol adds
additional bits to the user's message before sending it (e.g., for
error detection). These bits are called overhead bits because they
add no value to the user; they simply ensure correct data transfer.
 The efficiency of a transmission protocol is the number of
information bits sent by the user divided by the total number of
bits transferred (information bits plus overhead bits). Synchronous
transmission provides greater efficiency than does asynchronous
transmission.
 In general, protocols with larger frame sizes provide greater
efficiency than do those with small frame sizes. The drawback to
large frame sizes is that they are more likely to be affected by
errors and thus require more retransmission. Small frame sizes are
therefore better suited to error-prone circuits, and large frames, to
error-free circuits.
66
REFERENCES
[1] Business Data Communications and Networking by
Fitzgerald and Dennis, 7th Edition, John Wiley & Sons, Inc.
20012
[2] Basic Data Communications by W J Beyda, Prentic Hall,
1989.

ITU, ELECTRICAL ENGINEERING 67

You might also like