Two people, one phone line
Two friends try to talk on a single line at the same moment. Both speak and nobody understands. They stop, wait a short random time and try again.
Wired and wireless links solve the same problem. They also need a way to know if a message arrived damaged.
Key words
| Word | What it means |
|---|---|
| Error detection | finding out that a message was damaged |
| Error correction | repairing a damaged message, or asking for it again |
| Parity bit | one extra bit that makes the count of 1s even or odd |
| CRC | a strong check number worked out from the data and sent with it |
| Collision | two devices send at once and the signals clash |
| CSMA/CD | listen, send, and if a collision is detected, stop and wait |
| CSMA/CA | listen, wait, send, and avoid collisions with an acknowledgement |
| Acknowledgement | a short reply that says a frame arrived safely |
| Hub | an old device that repeats every signal to every port |
| Switch | a device that sends each frame only to the right port |
| Network | devices joined so they can share data |
| Bandwidth | how much data a link can carry each second |
| Ethernet | the common way to join wired devices in an office |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can explain how errors are detected and corrected, and how CSMA/CD and CSMA/CA let devices share a link.
Starter: noise and bits
Have a go
Starter: noise and bits
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Detecting errors
The sender works out a small check value from the data and sends it along. The receiver works it out again. If the two differ, the data was damaged.
A parity bit is the simplest check. A checksum adds numbers together. A CRC is stronger and is the check at the end of every Ethernet frame.
Worked example: even parity
| Data bits | Number of 1s | Parity bit sent | All bits sent |
|---|---|---|---|
| 1011001 | 4 | 0 | 10110010 |
| 1011000 | 3 | 1 | 10110001 |
| 0000000 | 0 | 0 | 00000000 |
The cells students fill in are left blank in this preview.
Correcting errors
Detecting is not fixing. There are two ways to fix.
The first is to ask again: the receiver drops the damaged frame and the sender sends it once more. The second is to send extra bits that let the receiver repair a small error alone. Extra bits cost bandwidth, so asking again is the usual choice on cable.
CSMA/CD on a shared cable
On a shared wired link, every device listens first. This is carrier sense. If the cable is quiet, it sends. If two send at once there is a collision. Both stop, wait a random time and try again. This is CSMA/CD, collision detection.
It was needed with hubs and old shared cable. A modern switch gives each device its own link, so there are no collisions.