1 / 28

Packet Transmission (Part I)

Packet Transmission (Part I). Packets, Frames, and Error Detection. The Problem. Cannot afford individual network connection per pair of computers Reasons Installing wires consumes time and money Maintaining wires consumes money (especially long-distance connections). Solution.

raquel
Télécharger la présentation

Packet Transmission (Part I)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Packet Transmission (Part I) Packets, Frames, and Error Detection

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

  3. Solution • Network has • shared central core • many attached stations • only one source can transmit data at a time

  4. The Problem With Sharing • Demand high • Some applications have large transfer • Some applications cannot wait • Need mechanism for fairness

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

  6. Illustration Of Packet Switching • Packets from different sources are interleaved • Send one packet, allow other stations opportunity to send before sending again • Efficient use of resources (since they are used on a demand). Nobody reserves a lane on a freeway • Can accommodate bursty traffic (as opposed to circuit-switching where transmission is at constant rate in telephone network).

  7. Features Of Packet-Switching • Store-and-forward: intermediate nodes (e.g., routers) store (buffer) incoming packets, process them and forward them to the appropriate outgoing link. • Allows for flexibility and robustness. Packets can travel through alternative paths (adaptive routing). • Undesired situations such congestion, long delays may occur.

  8. Packet Details • Depend on underlying network • minimum/maximum size • format • Hardware packet called a frame

  9. Example Frame Format Used With RS-232 • RS-232 is character-oriented • Special characters • start of header (soh) • end of text (eot)

  10. When Data Contains Special Characters • Translate to alternative form • Called byte stuffing • Example

  11. Illustration Of Frame With Byte Stuffing • Stuffed frame longer than original

  12. Bit-Oriented Frames • Delineate frame with a special bit pattern: 01111110 • If bit pattern occurs at the data, use bit-stuffing • sender: insert bit 0 after five consecutive 1’s • receiver: if receive five consecutive 1’s, check next bit • if it is 0, remove it • if they are 10, mark the end of the frame • if they are 11, error

  13. Transmission Errors • Data can be corrupted during transmission • Bit loss • Bit values changed • Frame includes additional information to detect/correct error • Set by sender • Checked by receiver • Statistical guarantee

  14. Common Approaches • Forward error control • each transmitted frame contains information to detect and correct errors • high overhead, used only if retransmission is impractical, such as simplex transmission, long delay, high error rate • Backward error control • transmitted frame only contains information to detect errors • retransmission used to recover from errors • low error rate in data communication

  15. Common Approaches (cont’d) • No error control • real time traffic • not requires a 100% error rate • example: real time voice and video

  16. Error Detection And Recovery • Parity bit • One additional bit per character • Can use • Even parity • Odd parity • Can not handle error that changes two bits • Block sum check • one parity bit for each row and each column of a block of bits • Can detect any single, double and triple bit errors, but may not detect some combination of errors

  17. Error Detection And Recovery • Checksum • Treat data as a sequence of integers • Compute and send arithmetic sum • Handles multiple bit errors • Cannot handle all errors

  18. Error Detection And Recovery • Cyclic Redundancy Check (CRC) • Mathematical function for data • More complex to compute • Handles more errors – can detect 99.98% errors

  19. Example Checksum Computation • Checksum computed over data • Checksum appended to frame • See example in class

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

  21. Cyclic Redundancy Check (CRC) • Idea: given a k-bit frame, the transmitter generates an n-bit sequence known as the Cyclic Redundancy Check (CRC), so that the resulting (k+n)-bit frame is exactly divisible (modulo-2) by some predetermined number called a generator. • Example in class • Commonly used polynomial generators: • CRC-12: • CRC-16: • CRC-CCITT:

  22. CRC (cont’d) • Assume the degree of the generator is n • n zero bits appended to the end of the frame • Modulo-2 operations used to determine the remainder CRC • Sender sends the data plus CRC • Receiver performs the modulo-2 operations on (k+n)-bit frame (original data plus CRC) using the same generator • If the remainder is zeros, assuming NO error. Otherwise, discard the frame.

  23. Building Blocks For CRC • Exclusive or • Shift register • a shows status before shift • b shows status after shift • output same as top bit

  24. Example Of CRC Hardware • Computes 16-bit CRC • Registers initialized to zero • Bits of message shifted in • CRC found in registers

  25. Illustration Of Frame Using CRC • CRC cover data only

  26. 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 character delimit beginning and end of frame • Bye-stuffing needed when special characters appear in data

  27. Summary (cont’d) • To detect data corruption • Sender adds information to packet • Receiver checks • Techniques • Parity bit • Block sum check • Checksum • Cyclic Redundancy Check (CRC) • Provide statistical guarantees

  28. Reading Materials • Chapter 7: All Sections

More Related