special course in computer science - Åbo akademi | startsida ·  · 2012-03-16special course in...

Post on 27-May-2018

228 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lecture 2 16.3.2012

Special Course in Computer Science: Local Networks

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

Today Transmission media Error detection methods

Transmission media

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:

Classes of transmission media

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.

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

and contained by the physical limits of the medium

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

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

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)

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

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!

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)

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

distances and higher rates than twisted pair.

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

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

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

Household electrical wiring

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

Refraction and reflection

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

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

Propagation modes Multimode, step-index

Multimode, graded-index

Single mode

Cable composition

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

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

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

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

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

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

Radio frequency allocation

Types of propagation

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

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

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

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

Space propagation Satellite relays take the place of atmospheric

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

satellite) Great distances are thus covered

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

submarine communication Susceptible to atmospheric noise

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

beacons, navigational locators

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

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

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

aircraft navigational aid

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

telephony, paging, microwave links

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

radar communication

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

and experimental communication

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

Illustration of repeaters

Satellite communication

Satellites in geosynchronous orbit

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!

Transmission impairment Transmission media are not perfect =>

impairments in the signal sent through the medium

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

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

Adding decibels

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

medium => its own delay

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

Illustration of noise

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

Illustration of throughput

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

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

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

Error types

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

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

How to detect errors?

Types of redundancy in LANs

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

Illustration of VRC

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 ½

Longitudinal Redundancy Check

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

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

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

Deriving the CRC

CRC generator Uses

modulo-2 division

CRC checker Uses

modulo-2 division in the same way

Polynomials

CRC generator typically represented as an algebraic polynomial

This is useful Short Proves the concept mathematically

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

Standard polynomials

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

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

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

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)

top related