I recently read about CRC, a checksum to detect package corruption and drop corrupted packages. But how does a packet in an IP-based network get corrupted in the first place?
-
6Your question basically boils down to "Why are systems imperfect?" There's implementation mistakes, environmental conditions... Systems don't run in perfect isolation. No matter how good a system you make, it will still be affected by random noise from the environment - cosmic rays, EM interference, "that faulty device on the network/power supply"... Even your computer's RAM/HDD has error-detection and correction mechanisms, and that's right there in your computer's box - would you expect communication over thousands of kilometers to be less faulty?– LuaanMay 16, 2017 at 13:49
1 Answer
Packets are long streams of binary numbers (zeros
and ones
).
The zeros
and ones
are usually changes of an electric signal, specifically voltage changes.
To simplify, suppose that 0
is 0 volts and 1
is represented alternatively as 5 volts and -5 volts.
Then a long string of zeros and ones will look like this in terms of voltage variations in the cable:
As you can see, the first 1
is 5 volts, but the next 1
is -5 volts. This is neccesary to avoid that a long string of 1
s energizes the communication line.
If the cable is exposed to electromagnetic interference, then the voltage levels can be altered. If a -5 volts value becomes -2 volts then the receiver can't identify it precisely as a zero
or a one
.
If your data cable runs for a long stretch parallel to power cables, then the power cable can cause interference to the data cable and induce errors.
-
3This gets worse for multi level PAM encodings, like 5 level 1000BASE-T or 10GBASE-T with 16 levels. Just look at one of their eye diagrams: 0397dc3.netsolhost.com/images/wp_ChooseCAT5/wp_ChooseCAT5_2.jpg– PlasmaHHMay 16, 2017 at 14:25
-
1WiFi interference is maybe more obvious/likely. Most wireless systems include some level of FEC because there is often some interference and the parity overhead is worth it to avoid the massive time hit that giving a bad packet to higher layers might make as they need to retry.– Nick TMay 16, 2017 at 22:06