0% found this document useful (0 votes)
12 views3 pages

Chapter 06 - Link Layer (Home Reading)

The document discusses three common techniques for detecting errors in transmitted data: parity checks, checksumming methods, and cyclic redundancy checks. Parity checks use an extra parity bit to detect errors but may miss some errors. Checksumming methods sum data bytes and compare the sums but provide weaker protection than cyclic redundancy checks. Cyclic redundancy checks generate a redundancy code by dividing the data and an agreed-upon generator pattern, and are better able to detect errors than the other methods.

Uploaded by

bscs23034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views3 pages

Chapter 06 - Link Layer (Home Reading)

The document discusses three common techniques for detecting errors in transmitted data: parity checks, checksumming methods, and cyclic redundancy checks. Parity checks use an extra parity bit to detect errors but may miss some errors. Checksumming methods sum data bytes and compare the sums but provide weaker protection than cyclic redundancy checks. Cyclic redundancy checks generate a redundancy code by dividing the data and an agreed-upon generator pattern, and are better able to detect errors than the other methods.

Uploaded by

bscs23034
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Link-Layer Error Checking and Error Detection

Let’s now examine three techniques for detecting errors in the transmitted data parity checks (to
illustrate the basic ideas behind error detection and correction), check summing methods (which
are more typically used in the transport layer), and cyclic redundancy checks (which are more
typically used in the link layer in an adapter).

Parity Checks
Perhaps the simplest form of error detection is the use of a single parity bit. Suppose that the
information to be sent, D in Figure 6.4, has d bits. In an even parity scheme, the sender simply
includes one additional bit and chooses its value such that the total number of 1s in the d + 1 bits
(the original information plus a parity bit) is even. For odd parity schemes, the parity bit value is
chosen such that there is an odd number of 1s. Figure 6.4 illustrates an even parity scheme, with
the single parity bit being stored in a separate field.
Receiver operation is also simple with a single parity bit. The receiver need only count the
number of 1s in the received d + 1 bits. If an odd number of 1-valued bits are found with an even
parity scheme, the receiver knows that at least one bit error has occurred. More precisely, it
knows that some odd number of bit errors have occurred.
But what happens if an even number of bit errors occur?
You should convince yourself that this would result in an undetected error. If the probability of
bit errors is small and errors can be assumed to occur independently from one bit to the next, the
probability of multiple bit errors in a packet would be extremely small. In this case, a single
parity bit might suffice. However, measurements have shown that, rather than occurring
independently, errors are often clustered together in “bursts.” Under burst error conditions, the
probability of undetected errors in a frame protected by single-bit parity can approach 50 percent
[Spragins 1991]. Clearly, a more robust error-detection scheme is needed (and, fortunately, is
used in practice!).
Checksumming Methods
In checksumming techniques, the d bits of data in Figure 6.4 are treated as a sequence of k-bit
integers. One simple checksumming method is to simply sum these k-bit integers and use the
resulting sum as the error-detection bits. The Internet checksum is based on this approach—bytes
of data are treated as 16-bit integers and summed. The 1s complement of this sum then forms the
Internet checksum that is carried in the segment header. The receiver checks the checksum by
taking the 1s complement of the sum of the received data (including the checksum) and checking
whether the result is all 0 bits. If any of the bits are 1, an error is indicated. In the TCP and UDP
protocols, the Internet checksum is computed over all fields (header and data fields included). In
IP, the checksum is computed over the IP header (since the UDP or TCP segment has its own
checksum).
Checksumming methods require relatively little packet overhead. For example, the checksums in
TCP and UDP use only 16 bits. However, they provide relatively weak protection against errors
as compared with cyclic redundancy check, which is discussed next and which is often used in
the link layer.
Q. Why is checksumming used at the transport layer and cyclic redundancy check used at
the link layer?
Recall that the transport layer is typically implemented in software in a host as part of the host’s
operating system. Because transport-layer error detection is implemented in software, it is
important to have a simple and fast error-detection scheme such as checksumming. On the other
hand, error detection at the link layer is implemented in dedicated hardware in adapters, which
can rapidly perform the more complex CRC operations.

Cyclic Redundancy Check


An error-detection technique used widely in today’s computer networks is based on cyclic
redundancy check (CRC) codes. CRC codes are also known as polynomial codes, since it is
possible to view the bit string to be sent as a polynomial whose coefficients are the 0 and 1
values in the bit string, with operations on the bit string interpreted as polynomial arithmetic.
CRC codes operate as follows. Consider the d-bit piece of data, D, that the sending node wants to
send to the receiving node. The sender and receiver must first agree on an r + 1 bit pattern,
known as a generator, which we will denote as G. We will require that the most significant
(leftmost) bit of G be a 1. The key idea behind CRC codes is shown in Figure 6.6. For a given
piece of data, D, the sender will choose r additional bits, R, and append them to D such that the
resulting d + r bit pattern (interpreted as a binary number) is exactly divisible by G (i.e., has no
remainder) using modulo-2 arithmetic. The process of error checking with CRCs is thus simple:
The receiver divides the d + r received bits by G. If the remainder is nonzero, the receiver knows
that an error has occurred; otherwise, the data is accepted as being correct.
All CRC calculations are done in modulo-2 arithmetic without carries in addition or borrows in
subtraction. This means that addition and subtraction are identical, and both are equivalent to the
bitwise exclusive-or (XOR) of the operands. Multiplication and division are the same as in base-
2 arithmetic, except that any required addition or subtraction is done without carries or borrows.
As in regular binary arithmetic, multiplication by 2k left shifts a bit pattern by k places. Thus,
given D and R, the quantity D . 2r XOR R yields the d + r bit pattern shown in Figure 6.6.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy