ch6

54
1 Chapter 6 Errors, Error Detection, and Error Control Data Communications and Computer Networks: A Business User’s Approach

Upload: jay-mishra

Post on 18-Nov-2015

213 views

Category:

Documents


0 download

DESCRIPTION

sixth ai

TRANSCRIPT

  • Chapter 6

    Errors, Error Detection, and Error ControlData Communications andComputer Networks: A Business Users Approach

  • Last timeMultiplexingAgain at data link levelThis time - errors and error detection and error control

  • Transmission Error

  • OSI vs Internet ModelErrordetectionand controlErrordetectionand control

  • Error detection in different layersSome error detection in other layersTransport layer in OSINetwork layer in Internet modelFocus on the data link layerIndependent of the medium or physical layer

  • Data Link LayerResponsible for taking the data and transforming it into a frame with header, control and address information.Physical path communicationError detectionError correctionResolve competing requests

  • Overview

    Errors HappenNoise and ErrorsError PreventionError Detection TechniquesError Control 1) Do nothing2) Return a message3) Correct the error

  • Data Communications and Computer Networks Chapter 6

    IntroductionNoise is always present.If a communications line experiences too much noise, the signal will be lost or corrupted.Communication systems should check for transmission errors.Once an error is detected, a system may perform some action.Some systems perform no error control, but simply let the data in error be discarded.

  • Data Communications and Computer Networks Chapter 6

    Noise and Errors White NoiseAlso known as thermal or Gaussian noiseRelatively constant and can be reduced.If white noise gets to strong, it can completely disrupt the signal.

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

    Noise and Errors Impulse NoiseOne of the most disruptive forms of noise.Random spikes of power that can destroy one or more bits of information.Difficult to remove from an analog signal because it may be hard to distinguish from the original signal.Impulse noise can damage more bits if the bits are closer together (transmitted at a faster rate).

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

    The bottom figure should show much more distortion, completely blowing out one or two bits of information.

  • Data Communications and Computer Networks Chapter 6

    Noise and Errors - CrosstalkUnwanted coupling between two different signal paths.For example, hearing another conversation while talking on the telephone.Relatively constant and can be reduced with proper measures.

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

    Noise and Errors - EchoThe reflective feedback of a transmitted signal as the signal moves through a medium.Most often occurs on coaxial cable.If echo bad enough, it could interfere with original signal.Relatively constant, and can be significantly reduced.

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

    Noise and Errors - JitterThe result of small timing irregularities during the transmission of digital signals.Occurs when a digital signal is repeater over and over.If serious enough, jitter forces systems to slow down their transmission.Reduce jitter - shielding

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

    Noise and Errors Delay DistortionOccurs because the velocity of propagation of a signal through a medium varies with the frequency of the signal. Can be reduced using equalizersAttenuationThe continuous loss of a signals strength as it travels through a medium.Use less lossy mediumUse amplifiers

  • AttenuationWhen signal travels, it gets weaker.If too weak, cannot tell 1s and 0s.

    Distance

  • DistortionAs signal travels, it become distorted.Changes shapeSuccessive bits may merge, making reception difficult

    Distance

  • InterferenceUnwanted signal from outside sourcesOften intermittent, difficult to diagnose

    SignalStrengthSignalInterference

  • Data Communications and Computer Networks Chapter 6

    Error PreventionTo prevent errors from happening, several techniques may be applied:- Proper shielding of cables to reduce interference- Telephone line conditioning or equalization - Replacing older media and equipment with new, possibly digital components- Proper use of digital repeaters and analog amplifiers- Observe the stated capacities of the media

  • Data Communications and Computer Networks Chapter 6

    Error Detection Data LevelDespite the best prevention techniques, errors may still happen.To detect an error, something extra has to be added to the data/signal. This extra is an error detection code.Lets examine two basic techniques for detecting errors: parity checkingcyclic redundancy checksum (CRC).

  • ParityValue of parity bit is such that character has even (even parity) or odd (odd parity) number of onesEven number of bit errors goes undetectedSimple ParityLongitudinal Redundancy Check/Vertical Redundancy Check (LRC/VRC)

  • Parity Examples - Using Even ParityEven Parity of 1sLRC/VRC

  • Data Communications and Computer Networks Chapter 6

    Parity ChecksSimple parity - If performing even parity, add a parity bit such that an even number of 1s are maintained.If performing odd parity, add a parity bit such that an odd number of 1s are maintained.For example, if the character 1001010 is to be sent, using even parity, a parity bit = 1 would be added to the character.If the character 1001011 is to be sent, using even parity, a parity bit = 0 would be added to the character.

  • Data Communications and Computer Networks Chapter 6

    Parity ChecksWhat happens if the character 10010101 (parity bit is the last bit) and the first two 0s accidentally become two 1s?Thus, the following character is received: 11110101.Will there be a parity error?Problem: Simple parity only detects odd numbers of bits in error (50%)

  • Data Communications and Computer Networks Chapter 6

    Parity ChecksLongitudinal parity adds a parity bit to each character then adds a row of parity bits after a block of characters.The row of parity bits is actually a parity bit for each column of characters.The row parity bits plus the column parity bits add a great amount of redundancy to a block of characters.

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

  • Parity ChecksBoth simple parity and longitudinal parity do not catch all errors.Simple parity only catches odd numbers of bit errors (50% of all errors)Longitudinal parity is better at catching errors but requires too many check bits added to a block of data.As such, these methods are not that often used. However, a parity bit exists in 1 byte of data.We need a better error detection method. What about cyclic redundancy checksum?

  • Data Communications and Computer Networks Chapter 6

    Cyclic Redundancy Checksum (CRC)The CRC error detection method treats the packet of data to be transmitted as a large polynomial.The transmitter takes the message polynomial and using polynomial arithmetic, divides it by a given generating polynomial.The quotient is discarded but the remainder is attached to the end of the message (remainder (mod) arithmetic)

  • Data Communications and Computer Networks Chapter 6

    Cyclic Redundancy ChecksumThe message (with the remainder) is transmitted to the receiver.The receiver divides the message and remainder by the same generating polynomial.If a remainder not equal to zero results, there was an error during transmission.If a remainder of zero results, there was no error during transmission.

  • Data Communications and Computer Networks Chapter 6

    r is the degree of the generating polynomial

  • Data Communications and Computer Networks Chapter 6

    Error ControlOnce an error is detected, what is the receiver going to do?1. Do nothing2. Return an error message to the transmitter3. Fix the error with no further help from the transmitter

  • Flow ControlFlow Control refers to mechanisms that make sure that the sending station cannot overwhelm the receiving station with data.Preventing buffer overflowTransmission timeTime taken to emit all bits into mediumPropagation timeTime for a bit to traverse the link

  • Stop-and-Wait Flow ControlThe simplest form of flow control is Stop and Wait Flow Control.Stop and Wait Flow Control works like this:The sending station sends a frame of data and then waits for an acknowledgement from the other station before sending further dataThe other party can stop the flow of data by simply withholding an acknowledgement

  • Stop-and-Wait Flow ControlSource may not send new frame until receiver acknowledges the frame already sentVery inefficient, especially when a single message is broken into separate frames

  • Stop-and-Wait Flow ControlStop and Wait Flow control works great if data is sent as a few large frames.However large frames are undesirable for the following reasons:Large frame means one station occupies the link for a longer time (undesirable on a multipoint link)There is more chance of error in a large frame resulting in more lost data and more retransmission

  • Stop and Wait ControlSource transmits single frameWait for ACK (Acknowledgement)If received frame damaged, discard itTransmitter has timeoutIf no ACK within timeout, retransmitIf ACK damaged,transmitter will not recognize itTransmitter will retransmitReceive gets two copies of frameUse ACK0 and ACK1

  • Error Control StepsError Control consists of the following steps (not all are necessary):Error detection (Parity, CRC, etc. are used)Positive Acknowledgment (ACK) means no detected errorRetransmission after time-out -- because a frame or an ACK might have been lostNegative acknowledgment (NAK) and retransmissionCollectively all these mechanisms are called Automatic Repeat reQuest ARQ

  • Data Communications and Computer Networks Chapter 6

    Error ControlDo nothingSeems like a strange way to control errors but some newer systems such as frame relay perform this type of error control.Assumption is higher mechanism will detect and handle frame errors.

  • Data Communications and Computer Networks Chapter 6

    Error ControlReturn a message has three basic ARQ formats:1. Stop-and-wait ARQ2. Go-back-N ARQ3. Selective-reject ARQ

  • Data Communications and Computer Networks Chapter 6

    Error ControlStop-and-wait ARQ is the simplest of the error control protocols.A transmitter sends a frame then stops and waits for an acknowledgment.If a positive acknowledgment (ACK) is received, the next frame is sent.If a negative acknowledgment (NAK) is received, the same frame is transmitted again.

  • Data Communications and Computer Networks Chapter 6

  • Data Communications and Computer Networks Chapter 6

    Error ControlGo-back-N ARQ and selective reject are more efficient protocols.They assume that multiple frames are in transmission at one time (sliding window).A sliding window protocol allows the transmitter to send up to the window size frames before receiving any acknowledgments.When a receiver does acknowledge receipt, the returned ack contains the number of the frame expected next.

  • Data Communications and Computer Networks Chapter 6

    Error ControlFor a receiver to correct the error with no further help from the transmitter requires a large amount of redundant information accompany the original data.This redundant information allows the receiver to determine the error and make corrections.This type of error control is often called forward error correction.

  • Data Communications and Computer Networks Chapter 6

    Error Control redundancy011001 becomes 000 111 111 000 000 111If 001 110 111 000 000 111 is transmitted, what do weconclude?Applications?Space, valuable dataWastes BW

  • Data Communications and Computer Networks Chapter 6

    Error Detection and Error Control in ActionAsynchronous transfer mode (ATM) incorporates many types of error detection and error control.ATM inserts a CRC into the data frame (the cell), which checks only the header and not the data.This CRC is also powerful enough to perform simple error correction on the header.A second layer of ATM applies a CRC to the data, with varying degrees of error control.

  • What we coveredTypes of errors and their preventionError detectionParity 50%CRC can detect nearly all errorsError correction1. Do nothing2. Return an error message to the transmitter3. Fix the error with no further help from the transmitter

    The bottom figure should show much more distortion, completely blowing out one or two bits of information.