Switching, Packets, Frames, Parity, - PowerPoint PPT Presentation

Loading...

PPT – Switching, Packets, Frames, Parity, PowerPoint presentation | free to download - id: 794fb1-Nzg3Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Switching, Packets, Frames, Parity,

Description:

Chapter 7 Switching, Packets, Frames, Parity, Checksums, and CRCs * * Smallest piece of information When you send a message between two hosts, the smallest piece of ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 26
Provided by: KimK98
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Switching, Packets, Frames, Parity,


1
Chapter 7
  • Switching, Packets, Frames, Parity,
  • Checksums, and CRCs

2
Smallest piece of information
  • When you send a message between two hosts, the
    smallest piece of information may be
  • Bit
  • Character (e.g. RS232)

3
Switching
  • When should this piece of information be sent?
  • As soon as it is available -gt circuit switching
  • When the entire message is ready -gt message
    switching
  • After X number of bits/characters -gt packet
    switching

4
Switching cont.
  • Circuit sw. Message sw. Packet switching

5
Connecting to the Network 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)

6
Solution
  • Network has
  • Shared central core
  • Many attached stations

7
The Problem With Sharing
  • Demand high
  • Some applications have large transfers
  • Some applications cannot wait
  • Need mechanism for fairness

8
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 time-division multiplexing

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

10
Packet Details
  • Depend on underlying network
  • Minimum / maximum size
  • Format
  • Hardware packet called a frame

11
Example Frame Format Used with RS-232
  • RS-232 is character-oriented
  • Special characters
  • Start of header (soh)
  • End of text (eot)

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

13
Illustration of Frame With Byte Stuffing
  • Stuffed frame longer than original
  • Necessary evil

14
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

15
Error Detection And Recovery Techniques
  • Parity bit
  • One additional bit per character
  • Can use
  • Even parity
  • Odd parity
  • Cannot handle error that changes two bits

16
Error Detection And Recovery Techniques
(continued)
  • Checksum
  • Treat data as sequence of integers
  • Compute and send arithmetic sum
  • Handles multiple bit errors
  • Cannot handle all errors

17
Error Detection And Recovery Techniques
(continued)
  • Cyclic Redundancy Check (CRC)
  • Mathematical function for data
  • More complex to compute
  • Handles more errors

18
Example Checksum Computation
  • Checksum computed over data
  • Checksum appended to frame

19
Illustration Of Errors A Checksum Fails to Detect
  • Second bit reversed in each item
  • Checksum is the same

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

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

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

23
Illustration of Frame Using CRC
  • CRC covers data only

24
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

25
Summary (continued)
  • To detect data corruption
  • Sender adds information to packet
  • Receiver checks
  • Techniques
  • Parity bit
  • Checksum
  • Cyclic Redundancy Check (CRC)
  • Provide statistical guarantees
About PowerShow.com