Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Packets, Frames, and Error Detection. 2 The Problem Cannot afford individual network connection per pair of computers Reasons –Installing wires consumes.

Similar presentations


Presentation on theme: "1 Packets, Frames, and Error Detection. 2 The Problem Cannot afford individual network connection per pair of computers Reasons –Installing wires consumes."— Presentation transcript:

1 1 Packets, Frames, and Error Detection

2 2 The Problem Cannot afford individual network connection per pair of computers Reasons –Installing wires consumes time and money –Maintaining wires consumes money (esp. long- distance connections)

3 3 Solution Network has –Shared central core –Many attached stations

4 4 The Problem with Sharing Demand high Some applications have large transfer Some applications cannot wait Need mechanisms for fairness

5 5 Packet Switching Principle Solution for fairness –Divide data into small units called packets –All each station opportunity to send packet before any station sends another Form of time-division multiplexing

6 6 Illustration of Packet Switching Acquire shared medium Send one packet Allow other stations opportunity to send before sending again

7 7 Packet Details Depend on underlying networks –Minimum/maximum size –Format Hardware packet called a frame

8 8 Example Frame Format used with RS-232 RS-232 is character-oriented Special character –Start of header (soh) –End of text (eot)

9 9 When data contains special Characters Translate to alternative form Called byte stuffing Example

10 10 Illustration of Frame with Byte Stuffing Stuffed frame longer than original Necessary evil

11 11 Handling Errors Data can be corrupted during transmission –Bits lost –Bit values changed Frame includes additional information to detect/correct error –Set by sender –Checked by receiver Statistical guarantee

12 12 Error Detection And Recovery Technique Parity bit –One additional bit per character –Can use Even parity Odd parity –Cannot handle error that changes two bits

13 13 Error Detection And Recovery Technique – Con’t Checksum –Treat data as sequence of integers –Compute and send arithmetic sum –Handles multiple bit errors –Cannot handle all errors

14 14 Error Detection And Recovery Technique – Con’t Cyclic Redundancy Check (CRC) –Mathematical function for data –More complex to compute –Handles more errors

15 15 Example Checksum Computation Checksum computed over data Checksum appended to frame

16 16 Illustration Of Errors A Checksum Fails To Detect Second bit reversed in each item Checksum is the same

17 17 Building blocks for CRC Exclusive or Shift register –a shows status before shift –b shows status after shift

18 18 Example of CRC Hardware Compute 16-bit CRC Registers initialized to zero Bits of messages shifted in CRC found in registers

19 19 Example CRC Computation Input data is all 1 bits CRC shown after 15, 16, and 17 bits shifted Feedback introduces zeros in CRC

20 20 Illustration of Frame using CRC CRC covers data only

21 21 Summary Packet technology –Invented to provide fair access in shared network –Sender divides data into small packets Hardware packets called frames Can use packet-switching with RS-232 –Special characters delimit beginning and end of frame –Byte-stuffing needed when special characters appear in data

22 22 Summary – Con’t To detect data corruption –Sender adds information to packet –Receiver checks Techniques –Parity bit –Checksum –Cyclic Redundancy Check (CRC) –Provide statistical guarantees


Download ppt "1 Packets, Frames, and Error Detection. 2 The Problem Cannot afford individual network connection per pair of computers Reasons –Installing wires consumes."

Similar presentations


Ads by Google