Presentation is loading. Please wait.

Presentation is loading. Please wait.

5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields.

Similar presentations


Presentation on theme: "5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields."— Presentation transcript:

1 5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction

2 5: DataLink Layer5-2 Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors 0 0

3 5: DataLink Layer5-3 Internet checksum Sender: r treat segment contents as sequence of 16-bit integers r checksum: addition (1’s complement sum) of segment contents r sender puts checksum value into UDP checksum field Receiver: r compute checksum of received segment r check if computed checksum equals checksum field value: m NO - error detected m YES - no error detected. But maybe errors nonetheless? More later …. Goal: detect “errors” (e.g., flipped bits) in transmitted segment (note: used at transport layer only)

4 5: DataLink Layer5-4 Checksumming: Cyclic Redundancy Check r view data bits, D, as a binary number r choose r+1 bit pattern (generator), G r goal: choose r CRC bits, R, such that m exactly divisible by G (modulo 2) m receiver knows G, divides by G. If non-zero remainder: error detected! m can detect all burst errors less than r+1 bits r widely used in practice (ATM, HDCL)

5 5: DataLink Layer5-5 CRC Example Want: D. 2 r XOR R = nG equivalently: D. 2 r = nG XOR R equivalently: if we divide D. 2 r by G, want remainder R R = remainder[ ] D.2rGD.2rG

6 5: DataLink Layer5-6 Code Division Multiple Access (CDMA) r used in several wireless broadcast channels (cellular, satellite, etc) standards r unique “code” assigned to each user; i.e., code set partitioning r all users share same frequency, but each user has own “chipping” sequence (i.e., code) to encode data r encoded signal = (original data) X (chipping sequence) r decoding: inner-product of encoded signal and chipping sequence r allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”)

7 5: DataLink Layer5-7 CDMA Encode/Decode slot 1 slot 0 d 1 = -1 111 1 1 - 1 - 1 -1 - Z i,m = d i. c m d 0 = 1 111 1 1 - 1 - 1 - 1 - 111 1 1 - 1 - 1 -1 - 111 1 1 - 1 - 1 -1 - slot 0 channel output slot 1 channel output channel output Z i,m sender code data bits slot 1 slot 0 d 1 = -1 d 0 = 1 111 1 1 - 1 - 1 -1 - 111 1 1 - 1 - 1 - 1 - 111 1 1 - 1 - 1 -1 - 111 1 1 - 1 - 1 -1 - slot 0 channel output slot 1 channel output receiver code received input D i =  Z i,m. c m m=1 M M

8 5: DataLink Layer5-8 CDMA: two-sender interference


Download ppt "5: DataLink Layer5-1 Error Detection EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking, may include header fields."

Similar presentations


Ads by Google