SlideShare une entreprise Scribd logo
1  sur  22
Direct Link Networks:
   Error Detection

      Sections 2.4




                        1
Outline
• Error Detection
  – Cyclic Redundancy Check (2.4.3)
  – Internet Checksum Algorithm (2.4.2)


• Reliable Transmission
  – Stop-and Wait (2.5.1)
  – Sliding Window Algorithm (2.5.2)
  – (will not cover implementation pp. (109-115)

                                          2
Error Detection
• Errors are unavoidable
  – Electrical interference, thermal noise, etc.


• Techniques for detecting errors
  – Cyclic Redundancy Check (CRC)
  – Checksum
  – Parity checking ( Section 2.4.1: will not cover in class)




                                              3
Cyclic Redundancy Check
(CRC)


• Generation of CRC and using it to detect errors
  makes use of Polynomial Arithmetic Modulo 2




                                      4
Polynomial Arithmetic
• A polynomial is an expression of the form
     anxn + an-1xn-1 + ...... + a1x + a0x0
  where the coefficients a0, a1, ...., an are drawn
  from some designated set S. S is called the
  coefficient set.
• When an an ≠ 0, we have a polynomial of degree
  n.
• Polynomial arithmetic deals with the addition,
  subtraction, multiplication, and division of
  polynomials.                             5
Polynomial Arithmetic Modulo 2:
Overview
• A special class of polynomial arithmetic
• Coefficient set ={1, 0}
• Operations on coefficients performed using
  modulo 2 arithmetic
• Key properties (accept on faith)
  1. Any polynomial B(x) can be divided by a divisor
     polynomial C(x) if B(x) is of higher degree than
     C(x)
  2. Any polynomial B(x) can be divided once by a
     divisor polynomial C(x) if B(x) is of the same
     degree as C(x)
                                           6
Polynomial Arithmetic Modulo 2,
Properties (cont.)


3. The remainder obtained when B(x) is divided by
   C(x) is obtained by subtracting C(x) from B(x)


4. To subtract C(x) from B(x) perform XOR on each
   pair of matching coefficients




                                       7
Polynomial Arithmetic Modulo 2,
Example
•   B(x) = x3 + 1 can be divided by
    C(x) = x3 + x2 + 1
    because they are both of degree 3
    •   remainder:
         subtract C(x) from B(x) {XOR each pair of
           matching coefficients}
         0 × x3 + 1 × x2 + 0 × x1 + 0 × x0 = x2
•   Phrased differently: 1001 can be divided by
    1101 and leaves a remainder of 0100

                                            8
Cyclic Redundancy Check

•   Add k redundant bits to an n-bit message
    – want k << n
    – e.g. on an Ethernet a CRC-32 code is used
      • k = 32 and n = 12,000 (1500 bytes); ( .27%
         overhead )
•   Represent n-bit message as n-1 degree
    polynomial
    – e.g., 8-bit message, MSG=1001 1010 as M(x) = x7 + x4
      + x3 + x1
•   Using polynomial arithmetic modulo 2, let k be
    the degree of some divisor polynomial
    – e.g., C(x) = x3 + x2 + 1; i.e. 1101   9
CRC (cont)
• Transmit polynomial P(x) that is evenly divisible by C(x)
   – Shift left message k bits, i.e., T(x) = M(x)xk {T(x) is called the zero
     extended message}
   – Divide T(x) by C(x) and find remainder
   – Subtract remainder from T(x)          P(x)
       • P(x) is divisible exactly by C(x)
       • P(x) is M(x) followed by remainder
• Think of the received polynomial as P(x) + E(x)
   – E(x) = 0 implies no errors
   – Divide (received polynomial, P(x) + E(x)) by C(x);
     remainder zero if:
       • E(x) was zero (no error), or
       • E(x) is exactly divisible by C(x)
           • Pick C(x) so that this is very unlikely for common types of
             errors                                       10
                                                ??
Figure 2.20 CRC calculation using polynomial long division


 •   MSG= 1001 1010 ; M(x) = x7 + x4 + x3 + x1
 •   C(x) = x3 + x2 + 1; 1101
 •   k = the degree of the divisor , C(X) = 3
 •   T(x) = 1001 1010 000           11111001  Zero Extended
                   Generator   1101 10011010000   Message
                                    1101
                                     1001
                                     1101
                                     1000
                                     1101
                                      1011
                                      1101
                                       1100
                                       1101
                                          1000
                                          1101
                                           101    Remainder


 • CRC = Remainder = 101
                                                        11
 • Transmit P(x) = 1001 1010 101
CRC – Example Decoding – No
Errors
 MSG = 1001 1010
 C(x) = x3 + x2 + 1                 = 1101          Generator
 P(x) = x10 + x7 + x6 + x4 + x2 + 1 = 10011010101   Received Message

           1101     10011010101            Received
                    1101                  message, no
  k + 1 bit check    1001                   errors
   sequence c,       1101
  equivalent to a     1000
     degree-k         1101               Result:
    polynomial         1011
                       1101              CRC test is passed
                         1100
                         1101
                              1101
         Remainder            1101

          m mod c                 0
                                                        12
CRC – Example Decoding –
with Errors
 MSG = 1001 1010
 C(x) = x3 + x2 + 1                 = 1101                 Generator
 P(x) = x10 + x7 + x5 + x4 + x2 + 1 = 10010110101          Received Message

           1101     10010110101                      Received
                    1101                             message
  k + 1 bit check    1000           Two bit errors
   sequence c,       1101
  equivalent to a     1011
     degree-k         1101                     Result:
    polynomial         1101
                       1101                    CRC test failed
                             0101


         Remainder
          m mod c
                                                                13
Selecting C(x)
Sender and receiver agree on a divisor polynomial, C(x)
• In practice, look C(x) up in a book

• Choice of C(x) has a significant impact on what types of
  errors can be detected

• A handful of divisor polynomials are very good choices
  for various environments

• Exact choice: part of the protocol design

• Ethernet standard uses a well-known polynomial of
  degree 32                                14
Common Polynomials for C(x)
CRC         C(x)

CRC-8       x8 + x2 + x1 + 1


CRC-10      x10 + x9 + x5 + x4 + x1 + 1


CRC-12      x12 + x11 + x3 + x2 + x1 + 1


CRC-16      x16 + x15 + x2 + 1


CRC-CCITT   x16 + x12 + x5 + 1


CRC-32      x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x1 + 1
                                                                 15
Selecting C(x) (cont.)
• The following types of errors can be detected by a
  C(x) with the stated properties:
  – All single-bit errors, as long as the xk and x0 terms have
    non-zero coefficients {proof p. 99).
  – All double-bit errors, as long as C(x) contains a factor with
    at least three terms
  – Any odd number of errors, as long as C(x) contains the
    factor (x + 1)
  – Any ‘burst’ error (i.e., sequence of consecutive error bits)
    for which the length of the burst is less than k bits.
  – Most burst errors of larger than k bits can also be
    detected                                    16
Zero Extended
            Message

                            x0               x 1 XOR gate            x2



 Figure 2.21 CRC algorithm implemented in hardware using a 3-bit shift register and
 XOR gates
 (This figure is for for the generator x3 + x2 + x0 )

•# bits = k = 3
•bits in register labeled 0 through k-1, left to right
•XOR in front of bit n if there is a term xn in the generator polynomial
•zero extended message shifted in from the left, beginning with most
significant bit
•register will contain the CRC ( most significant bit on the right)
                                                              17
Internet Checksum Algorithm
  (used in IP, UDP and TCP)
• View message as a sequence of 16-bit integers
  (words)
• Compute a sum of all the 16-bit words, with no
  carries, produce the sum
• Transmit the data & the sum (checksum)
• Receiver performs calculation on received data
• Compares result with received checksum
• If transmitted data (or transmitted checksum) is
  corrupted
  – result of receiver calculation will not match received
    checksum                                   18
     • error
Internet Checksum Example
• Internet Checksum
  – Use 1’s complement addition on 16bit codewords
  – Example
     • Codewords:               -5     -3
     • 1’s complement binary:   1010   1100
     • 1’s complement sum       1000


• Comments
  – Small number of redundant bits
  – Easy to implement
  – Not very robust



                                              19
Internet Checksum Algorithm
  • produce the sum using 16-bit ones-complement
    arithmetic; take ones-complement of the result to get
    the checksum.

                             u_short
                             cksum(u_short *buf, int count)
                             {
                                register u_long sum = 0;
                                while (count--)
•routine assumes buf            {
already padded with 0s to          sum += *buf++;
                                   if (sum & 0xFFFF0000)
a 16-bit boundary                  {
                                      /* carry occurred, so wrap around */

•count = the length of buf             sum &= 0xFFFF;
                                       sum++;
( in 16-bit units )                }
                                 }
                                 return ~(sum & 0xFFFF);
                             }                          20
Error Correction
• Some error codes can be used to detect and
  correct most errors
  – Overhead is too high


• Some errors can not be corrected




                                     21
Error Detection vs. Error
Correction
• Detection
  – Pro: Overhead (i.e. retransmission) only on messages
    with errors
  – Con: Cost in bandwidth and latency for
    retransmissions

• Correction
  – Pro: Quick recovery
  – Con: Overhead on all messages

• What should we use?
  – Correction if retransmission is too expensive
  – Correction if probability of errors is high 22

Contenu connexe

Tendances

Real Time Systems
Real Time SystemsReal Time Systems
Real Time SystemsDeepak John
 
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...Simplilearn
 
Introduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-SIntroduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-SKnoldus Inc.
 
20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared ver20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared verHsing-chuan Hsieh
 
Fishers linear discriminant for dimensionality reduction.
Fishers linear discriminant for dimensionality reduction.Fishers linear discriminant for dimensionality reduction.
Fishers linear discriminant for dimensionality reduction.Nurul Amin Choudhury
 
1531 fourier series- integrals and trans
1531 fourier series- integrals and trans1531 fourier series- integrals and trans
1531 fourier series- integrals and transDr Fereidoun Dejahang
 
Independent Component Analysis
Independent Component AnalysisIndependent Component Analysis
Independent Component AnalysisTatsuya Yokota
 
DataEngConf: Feature Extraction: Modern Questions and Challenges at Google
DataEngConf: Feature Extraction: Modern Questions and Challenges at GoogleDataEngConf: Feature Extraction: Modern Questions and Challenges at Google
DataEngConf: Feature Extraction: Modern Questions and Challenges at GoogleHakka Labs
 
Machine Learning With Logistic Regression
Machine Learning  With Logistic RegressionMachine Learning  With Logistic Regression
Machine Learning With Logistic RegressionKnoldus Inc.
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representationgavhays
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language ProcessingPranav Gupta
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded SystemsHimanshu Ghetia
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standardanuragjagetiya
 

Tendances (20)

Perceptron
PerceptronPerceptron
Perceptron
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
Deep Learning Frameworks 2019 | Which Deep Learning Framework To Use | Deep L...
 
Hardware-Software Codesign
Hardware-Software CodesignHardware-Software Codesign
Hardware-Software Codesign
 
Data Mining _ Weka
Data Mining _ WekaData Mining _ Weka
Data Mining _ Weka
 
Introduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-SIntroduction to Machine Learning with Find-S
Introduction to Machine Learning with Find-S
 
20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared ver20211019 When does label smoothing help_shared ver
20211019 When does label smoothing help_shared ver
 
Fishers linear discriminant for dimensionality reduction.
Fishers linear discriminant for dimensionality reduction.Fishers linear discriminant for dimensionality reduction.
Fishers linear discriminant for dimensionality reduction.
 
1531 fourier series- integrals and trans
1531 fourier series- integrals and trans1531 fourier series- integrals and trans
1531 fourier series- integrals and trans
 
Binary Number System and Codes
Binary Number System and CodesBinary Number System and Codes
Binary Number System and Codes
 
Independent Component Analysis
Independent Component AnalysisIndependent Component Analysis
Independent Component Analysis
 
DataEngConf: Feature Extraction: Modern Questions and Challenges at Google
DataEngConf: Feature Extraction: Modern Questions and Challenges at GoogleDataEngConf: Feature Extraction: Modern Questions and Challenges at Google
DataEngConf: Feature Extraction: Modern Questions and Challenges at Google
 
Lstm
LstmLstm
Lstm
 
Cnn
CnnCnn
Cnn
 
Machine Learning With Logistic Regression
Machine Learning  With Logistic RegressionMachine Learning  With Logistic Regression
Machine Learning With Logistic Regression
 
Integer Representation
Integer RepresentationInteger Representation
Integer Representation
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
 
Chap 4 markov chains
Chap 4   markov chainsChap 4   markov chains
Chap 4 markov chains
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
 

Similaire à 05 directnets errors

Cyclic Redundancy Check
Cyclic Redundancy CheckCyclic Redundancy Check
Cyclic Redundancy CheckRajan Shah
 
Oth1
Oth1Oth1
Oth1b137
 
CRC implementation
CRC implementation CRC implementation
CRC implementation ajay singh
 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE ShivangiSingh241
 
CRC Error coding technique
CRC Error coding techniqueCRC Error coding technique
CRC Error coding techniqueMantra VLSI
 
Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Ammar Shafiq
 
fix point 16 Qam demapper-Presentation_Linked_in
fix point 16 Qam demapper-Presentation_Linked_infix point 16 Qam demapper-Presentation_Linked_in
fix point 16 Qam demapper-Presentation_Linked_inEngineer Adeel Akhtar
 
Data link layar
Data link layarData link layar
Data link layarjaysans
 
V Communication Error Detection And Correction
V  Communication Error Detection And CorrectionV  Communication Error Detection And Correction
V Communication Error Detection And CorrectionDon Bosco BSIT
 
第四次课程 Chap8
第四次课程 Chap8第四次课程 Chap8
第四次课程 Chap8Emma2013
 
Error Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksError Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksNt Arvind
 

Similaire à 05 directnets errors (20)

Cyclic Redundancy Check
Cyclic Redundancy CheckCyclic Redundancy Check
Cyclic Redundancy Check
 
Lecture08
Lecture08Lecture08
Lecture08
 
5. Error Coding
5. Error Coding5. Error Coding
5. Error Coding
 
Oth1
Oth1Oth1
Oth1
 
Data linklayer
Data linklayerData linklayer
Data linklayer
 
CRC implementation
CRC implementation CRC implementation
CRC implementation
 
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
 
Crc
CrcCrc
Crc
 
Ch3 datalink
Ch3 datalinkCh3 datalink
Ch3 datalink
 
CRC Error coding technique
CRC Error coding techniqueCRC Error coding technique
CRC Error coding technique
 
Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)Skr+3200+chapter+3+(kweh)
Skr+3200+chapter+3+(kweh)
 
CRC JAVA CODE
CRC JAVA CODECRC JAVA CODE
CRC JAVA CODE
 
fix point 16 Qam demapper-Presentation_Linked_in
fix point 16 Qam demapper-Presentation_Linked_infix point 16 Qam demapper-Presentation_Linked_in
fix point 16 Qam demapper-Presentation_Linked_in
 
Data link layar
Data link layarData link layar
Data link layar
 
V Communication Error Detection And Correction
V  Communication Error Detection And CorrectionV  Communication Error Detection And Correction
V Communication Error Detection And Correction
 
第四次课程 Chap8
第四次课程 Chap8第四次课程 Chap8
第四次课程 Chap8
 
digitalelectronics.ppt
digitalelectronics.pptdigitalelectronics.ppt
digitalelectronics.ppt
 
Data link layar
Data link layarData link layar
Data link layar
 
Data link layar
Data link layarData link layar
Data link layar
 
Error Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networksError Detection and correction concepts in Data communication and networks
Error Detection and correction concepts in Data communication and networks
 

Dernier

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Dernier (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

05 directnets errors

  • 1. Direct Link Networks: Error Detection Sections 2.4 1
  • 2. Outline • Error Detection – Cyclic Redundancy Check (2.4.3) – Internet Checksum Algorithm (2.4.2) • Reliable Transmission – Stop-and Wait (2.5.1) – Sliding Window Algorithm (2.5.2) – (will not cover implementation pp. (109-115) 2
  • 3. Error Detection • Errors are unavoidable – Electrical interference, thermal noise, etc. • Techniques for detecting errors – Cyclic Redundancy Check (CRC) – Checksum – Parity checking ( Section 2.4.1: will not cover in class) 3
  • 4. Cyclic Redundancy Check (CRC) • Generation of CRC and using it to detect errors makes use of Polynomial Arithmetic Modulo 2 4
  • 5. Polynomial Arithmetic • A polynomial is an expression of the form anxn + an-1xn-1 + ...... + a1x + a0x0 where the coefficients a0, a1, ...., an are drawn from some designated set S. S is called the coefficient set. • When an an ≠ 0, we have a polynomial of degree n. • Polynomial arithmetic deals with the addition, subtraction, multiplication, and division of polynomials. 5
  • 6. Polynomial Arithmetic Modulo 2: Overview • A special class of polynomial arithmetic • Coefficient set ={1, 0} • Operations on coefficients performed using modulo 2 arithmetic • Key properties (accept on faith) 1. Any polynomial B(x) can be divided by a divisor polynomial C(x) if B(x) is of higher degree than C(x) 2. Any polynomial B(x) can be divided once by a divisor polynomial C(x) if B(x) is of the same degree as C(x) 6
  • 7. Polynomial Arithmetic Modulo 2, Properties (cont.) 3. The remainder obtained when B(x) is divided by C(x) is obtained by subtracting C(x) from B(x) 4. To subtract C(x) from B(x) perform XOR on each pair of matching coefficients 7
  • 8. Polynomial Arithmetic Modulo 2, Example • B(x) = x3 + 1 can be divided by C(x) = x3 + x2 + 1 because they are both of degree 3 • remainder:  subtract C(x) from B(x) {XOR each pair of matching coefficients}  0 × x3 + 1 × x2 + 0 × x1 + 0 × x0 = x2 • Phrased differently: 1001 can be divided by 1101 and leaves a remainder of 0100 8
  • 9. Cyclic Redundancy Check • Add k redundant bits to an n-bit message – want k << n – e.g. on an Ethernet a CRC-32 code is used • k = 32 and n = 12,000 (1500 bytes); ( .27% overhead ) • Represent n-bit message as n-1 degree polynomial – e.g., 8-bit message, MSG=1001 1010 as M(x) = x7 + x4 + x3 + x1 • Using polynomial arithmetic modulo 2, let k be the degree of some divisor polynomial – e.g., C(x) = x3 + x2 + 1; i.e. 1101 9
  • 10. CRC (cont) • Transmit polynomial P(x) that is evenly divisible by C(x) – Shift left message k bits, i.e., T(x) = M(x)xk {T(x) is called the zero extended message} – Divide T(x) by C(x) and find remainder – Subtract remainder from T(x) P(x) • P(x) is divisible exactly by C(x) • P(x) is M(x) followed by remainder • Think of the received polynomial as P(x) + E(x) – E(x) = 0 implies no errors – Divide (received polynomial, P(x) + E(x)) by C(x); remainder zero if: • E(x) was zero (no error), or • E(x) is exactly divisible by C(x) • Pick C(x) so that this is very unlikely for common types of errors 10 ??
  • 11. Figure 2.20 CRC calculation using polynomial long division • MSG= 1001 1010 ; M(x) = x7 + x4 + x3 + x1 • C(x) = x3 + x2 + 1; 1101 • k = the degree of the divisor , C(X) = 3 • T(x) = 1001 1010 000 11111001 Zero Extended Generator 1101 10011010000 Message 1101 1001 1101 1000 1101 1011 1101 1100 1101 1000 1101 101 Remainder • CRC = Remainder = 101 11 • Transmit P(x) = 1001 1010 101
  • 12. CRC – Example Decoding – No Errors MSG = 1001 1010 C(x) = x3 + x2 + 1 = 1101 Generator P(x) = x10 + x7 + x6 + x4 + x2 + 1 = 10011010101 Received Message 1101 10011010101 Received 1101 message, no k + 1 bit check 1001 errors sequence c, 1101 equivalent to a 1000 degree-k 1101 Result: polynomial 1011 1101 CRC test is passed 1100 1101 1101 Remainder 1101 m mod c 0 12
  • 13. CRC – Example Decoding – with Errors MSG = 1001 1010 C(x) = x3 + x2 + 1 = 1101 Generator P(x) = x10 + x7 + x5 + x4 + x2 + 1 = 10010110101 Received Message 1101 10010110101 Received 1101 message k + 1 bit check 1000 Two bit errors sequence c, 1101 equivalent to a 1011 degree-k 1101 Result: polynomial 1101 1101 CRC test failed 0101 Remainder m mod c 13
  • 14. Selecting C(x) Sender and receiver agree on a divisor polynomial, C(x) • In practice, look C(x) up in a book • Choice of C(x) has a significant impact on what types of errors can be detected • A handful of divisor polynomials are very good choices for various environments • Exact choice: part of the protocol design • Ethernet standard uses a well-known polynomial of degree 32 14
  • 15. Common Polynomials for C(x) CRC C(x) CRC-8 x8 + x2 + x1 + 1 CRC-10 x10 + x9 + x5 + x4 + x1 + 1 CRC-12 x12 + x11 + x3 + x2 + x1 + 1 CRC-16 x16 + x15 + x2 + 1 CRC-CCITT x16 + x12 + x5 + 1 CRC-32 x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x1 + 1 15
  • 16. Selecting C(x) (cont.) • The following types of errors can be detected by a C(x) with the stated properties: – All single-bit errors, as long as the xk and x0 terms have non-zero coefficients {proof p. 99). – All double-bit errors, as long as C(x) contains a factor with at least three terms – Any odd number of errors, as long as C(x) contains the factor (x + 1) – Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. – Most burst errors of larger than k bits can also be detected 16
  • 17. Zero Extended Message x0 x 1 XOR gate x2 Figure 2.21 CRC algorithm implemented in hardware using a 3-bit shift register and XOR gates (This figure is for for the generator x3 + x2 + x0 ) •# bits = k = 3 •bits in register labeled 0 through k-1, left to right •XOR in front of bit n if there is a term xn in the generator polynomial •zero extended message shifted in from the left, beginning with most significant bit •register will contain the CRC ( most significant bit on the right) 17
  • 18. Internet Checksum Algorithm (used in IP, UDP and TCP) • View message as a sequence of 16-bit integers (words) • Compute a sum of all the 16-bit words, with no carries, produce the sum • Transmit the data & the sum (checksum) • Receiver performs calculation on received data • Compares result with received checksum • If transmitted data (or transmitted checksum) is corrupted – result of receiver calculation will not match received checksum 18 • error
  • 19. Internet Checksum Example • Internet Checksum – Use 1’s complement addition on 16bit codewords – Example • Codewords: -5 -3 • 1’s complement binary: 1010 1100 • 1’s complement sum 1000 • Comments – Small number of redundant bits – Easy to implement – Not very robust 19
  • 20. Internet Checksum Algorithm • produce the sum using 16-bit ones-complement arithmetic; take ones-complement of the result to get the checksum. u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--) •routine assumes buf { already padded with 0s to sum += *buf++; if (sum & 0xFFFF0000) a 16-bit boundary { /* carry occurred, so wrap around */ •count = the length of buf sum &= 0xFFFF; sum++; ( in 16-bit units ) } } return ~(sum & 0xFFFF); } 20
  • 21. Error Correction • Some error codes can be used to detect and correct most errors – Overhead is too high • Some errors can not be corrected 21
  • 22. Error Detection vs. Error Correction • Detection – Pro: Overhead (i.e. retransmission) only on messages with errors – Con: Cost in bandwidth and latency for retransmissions • Correction – Pro: Quick recovery – Con: Overhead on all messages • What should we use? – Correction if retransmission is too expensive – Correction if probability of errors is high 22

Notes de l'éditeur

  1. to transmit a message M(x) that is n bits long, P(x) is sent n -bit message plus k redundant bits make P(x) exactly divisible by C(x) If no errors during transmission receiver should be able to divide P(x) by C(x) exactly, leaving a remainder of zero if error received polynomial will no longer be exactly divisible by C(x) Implication: an error has occurred.
  2. this algorithm scores well for using a small number of redundant bits—only 16 for a message of any length—but it does not score extremely well for strength of error detection. For example, a pair of single-bit errors, one of which increments a word, one of which decrements another word by the same amount, will go undetected. The reason for using an algorithm like this in spite of its relatively weak protection against errors (compared to a CRC, for example) is simple: This algorithm is much easier to implement in software. Experience in the ARPANET suggested that a checksum of this form was adequate. One reason it is adequate is that this checksum is the last line of defense in an end-to-end protocol; the majority of errors are picked up by stronger error detection algorithms, such as CRCs, at the link level.