Download Packets, Frames and Error Detection - Lecture Slides | EE 432 and more Exams Computer Systems Networking and Telecommunications in PDF only on Docsity!
Packets, Frames, and Error
Detection
Chapter 7
The Concept of Packets
Packets of data are generated by A, B, C, & D.
Packets are placed in a Queue by the shared resource.
Packets are transmitted on a First-In-First-Out basis.
Advantages of Packets
Can detect errors and re-send if necessary.
Bandwidth can be shared fairly and efficiently.
This is sometimes referred to as statistical multiplexing.
The Concept of TDM
TDM shares resources based on a time slot as opposed to First-In-First-Out.
Channel is shared fairly but not efficiently.
If one computer has no data to send it is still allocated it's time slot.
Packets and Hardware Frames Example
soh character indicates the start of the frame.
eot character indicates the end of the frame.
soh and eot are special characters.
For ASCII soh is hex 01, eot is hex 04.
Byte Stuffing
Transmitting printable characters is OK.
Transmitting binary is a problem if the bits representing eot are embedded.
Parity
Even Parity (even number of “ 1 ” bits in the data bits plus the parity bit) - Char = 0100101 Parity bit = 1 - Char = 1011010 Parity bit = 0
Odd Parity (odd number of “ 1 ” bits in the data bits plus the parity bit) - Char = 0100101 Parity bit = 0 - Char = 1011010 Parity bit = 1
Parity Continued
Note that a single bit transition is detected.
Note that two transitions are not detected.
In general an even number of transitions is not detected.
16 Bit Checksum Example
To compute the checksum, the sender treats each pair of characters as a 16-bit integer and computes sum. If the sum grows larger than 16 bits, the carry bits are added into the final sum.
At the receiver, the checksum is computed again to see if there is a match.
How Checksums Fail
Checksums have the disadvantage of not detecting all common errors.
A checksum is not sufficient to detect a transmission error that flips a bit in each data item.
Cyclic Redundancy Checks (CRC)
More Powerful than Checksums
Can be easily implemented in hardware using the following hardware components a shift register and exclusive OR gates.
Hardware to Generate CRC
The operation of the circuit is defined by the polynomial P(X) = X^16 + X^12 + X^5 + X^0
The polynomial represents the generator function G(X) = 1 0001 0000 0010 0001