Beruflich Dokumente
Kultur Dokumente
4-3 4-4
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
1
24/07/2018
4-5 4-6
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
4-7 4-8
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
2
24/07/2018
• Receivers need to know when the data transmitted is not • Both sender and receiver calculate check value
correct • Sender tests whether the check values match
• Add “check value” (error detection value) to message
Sender Receiver
Check
Message Value
Check Check
Message Message
Value Value
Mathematical Mathematical
Calculations Calculations
4-11 4-12
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
3
24/07/2018
Error Detection
Error Detection Techniques
4 - 13
4-13 4-14
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Error Detection
Examples of Using Parity
To be sent: Letter V in 7-bit ASCII: 0110101
• Checksum
– 1-byte (typically) check value
EVEN parity sender receiver
– Checksum algorithms vary in the creation of check
01101010 values
number of all
transmitted 1’s – Detects 95% of errors
remains EVEN parity
• Method:
sender receiver • Add decimal values of each character in the message
ODD parity
01101011 • Divide the sum by 255
• The remainder is the checksum value
number of all transmitted
1’s remains ODD parity
4 - 15
4-15 4-16
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
4
24/07/2018
Error Detection
Cyclic Redundancy Check (CRC)
Example:
P = 58
• Cyclic redundancy check (CRC) P/G=Q+R/G G=8
Q=7
– Treats message as a single binary number R =2
– Divides by a preset number Message Quotient Remainder:
(treated as (whole –added to the
– Uses remainder as the check value one long number) message as EDV
• Preset number is chosen so that remainder is the correct binary A fixed number –could be 8 bits, 16
number of bits number) (determines the bits, 24 bits, or 32
length of the R) bits long
• Modes: –CRC16 has R of 16
– CRC-16 (~99.998% error detection rate) bits
– Most powerful and most common
– CRC-32 (>99.99999% error detection rate)
– Detects 100% of errors (if number of errors <= size of R)
–Otherwise: CRC-16 (99.998%) and CRC-32 (99.9999%)
4-17 4 - 18
4-18
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
4-19 4-20
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
5
24/07/2018
No errors
Frame 2
3. If no ACK or NAK, – Sender does not wait for detected
Frame 3 ACK 1
Sender retransmits ACKs before sending
Errors
frame after Frame 3 more data Frame 3 detected
4-21 4-22
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Error Correction
Flow Control Example
window size =4 sender receiver
...3 2 1 0 • Forward error correction
0123456789
ACK 0... – Includes a certain level of redundancy in transmitted
(slide window) data so that receiving device can correct errors
...4
0123456789 – Does not require retransmission
ACK 4...
(slide window) – Used only when retransmission is impossible, very
…8 7 6 5
0123456789 costly, or time consuming (e.g., satellite connections)
ACK 7.. set window
(slide window) size to 2
..9
0123456789
(timeout)
...9 8
0123456789
4 - 23
4-23 4-24
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
6
24/07/2018
Error Correction
Error Correction - Hamming Code
4-27 4-28
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
7
24/07/2018
4-29 4 - 30
4-30
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
• SDLC
• Synchronous transmission
• HDLC
– Data sent in a large block called a frame
• Ethernet
– Includes addressing information
• PPP
• Especially useful in multipoint circuits
– Includes synchronization characters to let the receiver
know when data transmission begins
– Example protocols: SDLC, HDLC, Ethernet, PPP
4-31 4-32
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
8
24/07/2018
Destination
Address (8 Identifies frame type;
or 16 bits) • Information (for transferring of user data)
• Supervisory (for error and flow control)
4-33 4-34
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
4 - 35
4-35 4 - 36
4-36
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
9
24/07/2018
4 - 39
4-39 4 - 40
4-40
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
10
24/07/2018
Transmission Efficiency
Throughput
• Protocol design contributes to network efficiency • More complicated than simple protocol efficiency because
• Transmission Efficiency it depends on the retransmission rate, transmission rate,
#
and delay
= • Transmission Rate of Information Bits (TRIB) is a
#
+ ℎ
(
)
measure of the effective # of bits transmitted in a unit of
• Async Effiency = 8/(8+3) = 0.73 = 73% time
• How can we increase efficiency?
– Increase Data bits
– Decrease Overhead bits
• What is the efficiency if you send 342 bytes over Ethernet II?
• What is the efficiency if you send 722 bytes over Ethernet II?
4-43 4-44
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
11
24/07/2018
4-45 4-46
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved. Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
Read chapter 4
4-47
Copyright © 2015 John Wiley & Sons, Inc. All rights reserved.
12