82
Lecture 2 16.3.2012 Special Course in Computer Science: Local Networks

Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

  • Upload
    hanga

  • View
    229

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Lecture 2 16.3.2012

Special Course in Computer Science: Local Networks

Page 2: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Roadmap of the course Last time LAN and networking introduction Models for data communication Data transmission issues

Today Transmission media Error detection methods

Page 3: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Transmission media

Page 4: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Transmission Media For communication, data is represented with signals Signals are transmitted as electromagnetic energy Electromagnetic energy can travel through vacuum,

air, or other transmission media Electromagnetic spectrum:

Page 5: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Classes of transmission media

Page 6: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Reality Check: Storage media

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

• Send data on tape / disk / DVD for a high bandwidth link Mail one box with 1000 800GB tapes (6400 Tbit) Takes one day to send (86,400 secs) Data rate is 70 Gbps.

• Data rate is faster than long-distance networks! • But, the message delay is very poor.

Page 7: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Guided media Provide a conduit between devices A signal traveling through such media is directed

and contained by the physical limits of the medium

Page 8: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Signals through guided media Twisted pair and coaxial cable Metalic (copper) conductors Signals as electrical current

Optical fiber Glass or plastic cable Signals as light

Page 9: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Unshielded Twisted Pair (UTP) cable Made of 2 wires (copper), each separately insulated The wires are twisted around each other Between 2-12 twists per foot

Cheap and easy to use

Page 10: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

UTP grades Electronics Industries Association (EIA) has standards

to grade UTP cables 5 categories are used and categories 6 and 7 are

coming Category 1: basic, previously used in telephone systems –

fine for voice Category 2: voice and data transmission, up to 4 Mbps Category 3: voice and data transmission, up to 10 Mbps Min 3 twists/foot Standard cable for most telephone systems

Category 4: voice and data transmission, up to 16 Mbps Min 3 twists/foot + other properties

Category 5: data transmission up to 100 Mbps Categories 6 and 7: data transmission (250 and 600 Mbps,

respectively) Cat 6: most installed cable in Finland’s LANs (2002)

Page 11: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Category 5 UTP cable with four twisted pairs

Cat 5: usually 4 UTP grouped together in a plastic sheath 100 Mbps Ethernet: uses just two out of the four pairs 1 Gbps Ethernet uses all four pairs in both directions

simultaneously

Page 12: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Shielded Twisted Pair (STP) cable Has metalic foil that encases the insulated conductors This prevents electromagnetic noise Also prevents crosstalk Introduced by IBM in the 1980s UTP Cat 7 is shielded!

Page 13: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Twisted pair usage Telephone systems Networking Temporary network connections (TP very flexible) Short and medium length connections (UTP) Video applications (security cameras) Bandwidth of UTP improved to match the baseband of

television signals FDDI networks, token rings (STP) Ethernet (10G) (STP)

Page 14: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Coaxial cable (coax) Carries higher-frequency signals than TPs Better shielding and more bandwidth for longer

distances and higher rates than twisted pair.

Page 15: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Coax standards Categorized by RG ratings (radio governments) Each RG number denotes a unique set of physical

specifications Each cable defined by RG ratings is adapted for a

specialized function: RG-8,RG-9, RG-11: Thick Ethernet RG-58: Thin Ethernet RG-59: TV

Page 16: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

More on coax Two kinds 50-ohm cable used for digital transmission 75-ohm cable used analog transmission and cable TV

Better shielding than TP => it can span longer distances at higher speeds

Construction => high bandwidth, excellent noise immunity Bandwidths of up to a few GHz are common

Used widely for long-distance telephone systems in the past (now fiber on long-haul routes)

Still widely used in cable TV and other MANs

Page 17: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Power-line networking Use power lines for data communication Not new, see X10 for instance Now focus on high-rate communication Inside the home as a LAN Outside the home as broadband Internet access

Difficulties Household electrical wire designed to distribute (low-frequency)

power signals 50-60 Hz, wiring attenuates the much higher frequency (Mhz)

signals needed for high-rate data communication Practical to send 100 Mbps With communication schemes that resist impaired frequencies

and bursts of errors May products use proprietary standards International standards actively under development

Page 18: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Household electrical wiring

Page 19: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Optical fiber Made of glass/plastic and transmits signals in the

form of light Light is a form of electromagnetic energy Max speed in vacuum: 300000 km/h Travels in a straight line in a single uniform

substance Refraction: change of direction at border between

substances Speed also changes

Page 20: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Refraction and reflection

Page 21: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Using reflection Optical fiber uses reflection for guiding light

through a channel A glass/plastic core is surrounded by a cladding

of less dense material Difference in density so chosen that reflection

occurs instead of refraction How is information encoded into a beam of light On-off flashes represent 1-0 bits

Page 22: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Fiber – how it works

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

Common for high rates and long distances Long distance ISP links, Fiber-to-the-Home Light carried in very long, thin strand of glass

Light source (LED, laser) Photodetector Light trapped by

total internal reflection

Page 23: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation modes Multimode, step-index

Multimode, graded-index

Single mode

Page 24: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Cable composition

Page 25: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Fiber Cables

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

Single-mode Core so narrow (10um) light

can’t even bounce around Used with lasers for long

distances, e.g., 100km

Multi-mode Other main type of fiber Light can bounce (50um core) Used with LEDs for cheaper,

shorter distance links

Fibers in a cable

Page 26: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Attenuation of light in infrared

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

Fiber has enormous bandwidth (THz) and tiny signal loss – hence high rates over long distances

Page 27: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Transmission of light through Fiber Glass used for optical fiber: exceptionally

transparent Attenuation of light through glass Ratio of input to output signal

Chromatic dispersion Light pulses spread out in length as they propagate Depends on wavelength Solitons research Special pulses

Page 28: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Optical fibers vs. Copper wires Advantages

Much higher bandwidths than copper Repeaters needed only every 50 km, compared to 5 km Not affected by power surges, electromagnetic interference, power

failures, or corrosive chemicals Thin and lightweight:

1000 twisted pairs, 1 km long weigh 8000 kg 2 fibers have more capacity and weigh 100 kg

Lower installation costs

Disadvantages Unfamiliar technology to common engineers Optical transmission is unidirectional => two fibers or two frequency bands

needed for two way communication Fiber interfaces cost more than electrical interfaces

Page 29: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Comparison of the properties of wires and fiber

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

Property Wires Fiber Distance Short (100s of m) Long (tens of km) Bandwidth Moderate Very High Cost Inexpensive Less cheap Convenience Easy to use Less easy Security Easy to tap Hard to tap

Page 30: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Unguided media Provide for wireless communication Transport electromagnetic waves without using a

physical conductor Signals are broadcast through the air => available

to anyone having proper devices to receive them

Page 31: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Radio frequency allocation

Page 32: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Types of propagation

Page 33: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Surface propagation Radio waves travel through the lowest

atmosphere (hug the earth) At lowest frequencies, signals emanate in all

directions and follow the curvature of the planet Distance depends on the signal power Can also take place in seawater

Page 34: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Tropospheric Propagation Can work in 2 ways Line-of-sight: signal is directed in straight line from

antenna to antenna Receiver and transmitter placed in line-of-sight

Broadcast at an angle in upper troposphere and reflected back Allows greater distances to be covered

Page 35: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Ionospheric Propagation Higher-frequency radio waves radiate upward to

the ionosphere where they are reflected back Greater distances are covered with lower input Density difference between “spheres” makes the

waves to bend back to earth

Page 36: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Line-of-sight propagation

Very high frequency signals are transmitted in straight lines from antenna to antenna

Antennas should be directional, facing each other and tall enough or close enough

Page 37: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Space propagation Satellite relays take the place of atmospheric

refraction Basically line-of-sight with an intermediary (the

satellite) Great distances are thus covered

Page 38: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of VLF waves Surface waves, through air or seawater Used in long-range radio navigation and

submarine communication Susceptible to atmospheric noise

Page 39: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of LF waves Surface waves Attenuation greater during daytime Used in long-range radio navigation, radio

beacons, navigational locators

Page 40: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of MF waves In the troposphere, absorbed by ionosphere Most transmissions rely on line-of-sight antennas Used for AM radio, maritime radio, radio direction

finding, emergency frequencies

Page 41: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of HF waves Uses ionosphere Used for amateur radio, citizen’s band radio,

international broadcasting, military communication, long-distance aircraft and ship communication, telephone, telegraph, fax

Page 42: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of VHF waves Is mostly line-of-sight Used for VHF TV, FM radio, aircraft AM radio,

aircraft navigational aid

Page 43: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of UHF waves Is line-of-sight Used for UHF TV, mobile telephony, cellular

telephony, paging, microwave links

Page 44: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of SHF waves Is mostly line-of-sight and sometimes in space Uses: terrestrial and satellite microwave and

radar communication

Page 45: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation of EHF waves Uses the space Uses: predominantly scientific: radar, satellite,

and experimental communication

Page 46: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Terrestrial microwave Require line-of-sight transmission and reception

equipment Microwave signals propagate in one direction at a

time Hence 2 frequencies are required for 2-way

communication (e.g., telephone calls) transceiver (transmitter and receiver)

Repeaters Basis for many telephone systems

Page 47: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Illustration of repeaters

Page 48: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Satellite communication

Page 49: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Satellites in geosynchronous orbit

Page 50: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Satellites versus Fiber Satellites good for rapid deployment Crises, military, disasters

Broadcast is cheaper with satellites Communication in places with hostile terrain or

poorly developed infrastructure Economics!

Page 51: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Transmission impairment Transmission media are not perfect =>

impairments in the signal sent through the medium

Page 52: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Attenuation Means loss of energy => amplifiers needed Decibel: shows if a signal has lost/gained

strength (negative/positive): dB=10log10(P2/P1)

Page 53: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Adding decibels

Page 54: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Distortion Means the signal changes its form Occurs in composite signals Each signal has its own propagation speed through the

medium => its own delay

Page 55: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Noise Can corrupt the signal Thermal: random motion of electrons in a wire =>

extra signal created Induced: comes from sources such as motors,

appliances Crosstalk: effect of an wire over another Impulse: spike coming from power lines, lightning

Page 56: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Illustration of noise

Page 57: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Performance of a medium Measured by throughput, propagation speed,

propagation delay Throughput: how fast data can pass through a

point Propagation speed: the distance a signal or bit

can travel through the medium in one second Depends on medium and frequency of signal

Page 58: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Illustration of throughput

Page 59: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Propagation time Measures the time required for a signal/bit to

travel from one point of the media to another Propagation time = distance / propagation speed

Page 60: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Error Detection and correction Error codes add structured redundancy to data so errors can be either detected, or corrected

Page 61: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Error detection A system that cannot guarantee that the data

received is the data sent is useless Data can be corrupted Quite likely Heat, magnetism, other forms of electricity Noise

Reliable systems must have mechanisms for detecting and correcting errors

Page 62: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Error types

Page 63: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Single-bit errors Only 1 bit of a data unit is changed Least likely to appear in serial transmission Can happen in parallel transmission

Page 64: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Burst errors 2 or more bits in the data unit are changed Length of burst: from 1st to last corrupted bit; in

between uncorrupted bits are possible Likely in serial transmissions

Page 65: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

How to detect errors?

Page 66: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Types of redundancy in LANs

Page 67: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Vertical Redundancy Check Called also parity check A redundant bit (the parity bit) is appended to

every data unit so that the total number of 1s in the unit (including the parity bit) is even

Most common and least expensive Odd number of 1s can also be used

Page 68: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Illustration of VRC

Page 69: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Performance of VRC Detects single-bit errors It can also detect burst errors if total number of

bits changed is odd Exp: 1 error, 11100101; detected, sum is wrong Exp: 3 errors, 11011001; detected sum is wrong Exp: 2 errors, 11101101; not detected, sum is right! Error can also be in the parity bit itself Random errors are detected with probability ½

Page 70: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Longitudinal Redundancy Check

Page 71: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Performance of LRC Better at detecting burst errors than VRC There is one pattern of errors that is still elusive If some bits in one data unit are damaged and the same

number of bits in the same position are damaged in another data unit, then LRC does not detect error

Page 72: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Cyclic Redundancy Check Most powerful, based on binary reduction Predefined binary unit called the divisor The data unit (DU) is appended with a sequence of

redundant bits (CRC remainder) so that the resulted DU is exactly divisible by the divisor

At destination, the received DU is divided by the divisor If remainder is zero, ok

Page 73: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

More on CRC Required qualities of a CRC To have exactly one bit less than the divisor Appending it to the DU must make the resulting bit

sequence divisible by divisor Theory and application of CRC: straightforward The complication: deriving the CRC

Page 74: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Deriving the CRC

Page 75: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

CRC generator Uses

modulo-2 division

Page 76: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

CRC checker Uses

modulo-2 division in the same way

Page 77: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Polynomials

CRC generator typically represented as an algebraic polynomial

This is useful Short Proves the concept mathematically

Page 78: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Polynomial properties Should not be divisible by x All burst errors of length equal to the polynomial’s

degree are detected Should be divisible by x+1 All burst errors affecting an odd number of bits are

detected

Page 79: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Standard polynomials

12,16, 32 size of CRC remainders CRC divisor’s size is hence 13, 17, 33

Page 80: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

CRC performance If CRC respects the rules mentioned then: All burst errors of length equal to the polynomial’s

degree are detected All burst errors affecting an odd number of bits are

detected Burst errors of length greater than the degree of

polynomials are detected with high probability 32-bit CRC used in Ethernet, Token Ring

Page 81: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Error Correction

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

Error correction codes: Hamming codes Binary convolutional codes Reed-Solomon and Low-Density Parity Check

codes Mathematically complex, widely used in real systems

Page 82: Special Course in Computer Science - Åbo Akademi | Startsida ·  · 2012-03-16Special Course in Computer Science: Local Networks. ... CN5E by Tanenbaum & Wetherall, © Pearson EducationPrentice

Error Bounds – Hamming distance

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

Code turns data of n bits into codewords of n+k bits

Hamming distance is the minimum bit flips to turn one valid codeword into any other valid one. Example with 4 codewords of 10 bits (n=2, k=8): 0000000000, 0000011111, 1111100000, and 1111111111 Hamming distance is 5

Bounds for a code with distance: 2d+1 – can correct d errors (e.g., 2 errors above) d+1 – can detect d errors (e.g., 4 errors above)