Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Cracking of wireless networks wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Wireless security wikipedia , lookup
Internet protocol suite wikipedia , lookup
Policies promoting wireless broadband in the United States wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Mobile and Wireless Networks Summer 2005 Wichita State University Computer Science Chin-Chih Chang http://www.cs.wichita.edu/~chang [email protected] 1 Overview of the Course Lecture • • • • • • • Introduction (06/06, 06/07, 06/08) Wireless LANS and PANS (06/09, 06/10, 06/13) Wireless WANS AND MANS (06/14, 06/15, 06/16) Wireless Internet (06/17, 06/20, 06/21) Ad Hoc Wireless Networks (06/22, 06/23, 06/24) MAC Protocols for Ad Hoc Wireless Networks (07/06, 07/07, 07/08) Transport Layer and Security Protocols for Ad Hoc Wireless Networks (07/11, 07/12, 07/13) • Hybrid Wireless Networks (07/14, 07/15, 07/18) • Recent Advances in Wireless Networks (07/19, 07/20, 07/21) Lab • J2ME • Mobile Web Service 2 Chapter 1: Introduction Fundamentals Electromagnetic spectrum Radio propagation mechanisms Characteristics of the wireless channel Modulation techniques Multiple access techniques Voice coding Error control Computer networks IEEE 802 Networking Standard Wireless networks and book overview 3 Fundamentals A computer network is an interconnected collection of autonomous computers. Networking Goals: • Resource sharing - e.g., shared printer, shared files. • Increased reliability - e.g., one failure does not cause system failure. • Economics - e.g., better price/performance ratio. • Communication - e.g., e-mail. 4 Mobile communication Two aspects of mobility: • User mobility: users communicate (wireless) “anytime, anywhere, with anyone” • Device portability: devices can be connected anytime, anywhere to the network Wireless vs. mobile Examples stationary (wired and fixed) computer notebook in a hotel wireless LANs in historic buildings Personal Digital Assistant (PDA) The demand for mobile communication creates the need for integration of wireless networks into existing fixed networks: • Local area networks: standardization of IEEE 802.11, ETSI (European Telecommunications Standards Institute) (HIPERLAN combined technology for broadband cellular short-range communications and wireless Local Area Networks (LANs) ) • Internet: Mobile IP extension of the Internet Protocol IP • Wide area networks: e.g., internetworking of GSM and ISDN The Electromagnetic Spectrum The electromagnetic spectrum and its uses for communication. 6 Electromagnetic spectrum twisted pair 1 Mm 300 Hz ELF coax cable 10 km 30 kHz VF VLF LF optical transmission 100 m 3 MHz MF HF 1m 300 MHz VHF UHF ELF = Extremely Low Frequency (30 ~ 300 Hz) VF = Voice Frequency (300 ~ 3000 Hz) VLF = Very Low Frequency (3 ~ 30 KHz) LF = Low Frequency (30 ~ 300 KHz) MF = Medium Frequency (300 ~ 3000 KHz) HF = High Frequency (3 ~ 30 MHz) VHF = Very High Frequency (30 ~ 3000 MHz) 10 mm 30 GHz SHF EHF 100 m 3 THz 1 m 300 THz infrared visible light UV UHF = Ultra High Frequency (300 MHz ~ 3GHz) SHF = Super High Frequency (3 ~ 30 GHz) EHF = Extremely High Frequency (30 ~ 300GHz) Infrared (300 GHz ~ 400 THz) Visible Light (400 THz ~ 900 THz) UV = Ultraviolet Light (900 THz ~ 1016 Hz) X-ray (1016 ~ 1022 Hz) Gamma ray (1022 Hz ~) Frequency and wave length: = c/f wave length , speed of light c 3x108m/s, frequency f 7 Electromagnetic spectrum The Electromagnetic spectrum is used for information transmission by modulating the amplitude, frequency, or phase of the waves. VLF, LF, and MF are called as ground waves. • Transmission range up to a hundred kilometers • Used for AM radio broadcasting HF and VHF • The sky wave may get reflected several times between the Earth and the ionosphere. • Used by amateur ham radio operators and for military communication. VHF-/UHF-ranges for mobile radio • simple, small antenna for cars • deterministic propagation characteristics, reliable connections 8 Radio Transmission (a) In the VLF, LF, and MF bands, radio waves follow the curvature of the earth. (b) In the HF band, they bounce off the ionosphere. 9 Electromagnetic spectrum SHF and higher for directed radio links, satellite communication • • • • • small antenna, focusing Microwave transmissions travel in straight lines. High signal-to-noise ratio (SNR) Line-of-sight alignment is required. large bandwidth available Wireless LANs use frequencies in UHF to SHF spectrum • some systems planned up to EHF • limitations due to absorption by water and oxygen molecules (resonance frequencies) – weather dependent fading, signal loss caused by heavy rainfall etc. Infrared waves and waves in the EHF band are used for short-range communication. • Widely used in television, VCR, stereo remote controls Visible light • Used in the optical fiber • Laser can be used to connect LANs on two buildings but can travel limited distance and cannot penetrate through rain or thick fog. 10 Spectrum Allocation Spectrum allocation methods: • Comparative binding (beauty contest) requires each carrier to explain why its proposal serves the public interest best. • Lottery system • Auction The other option of allocating frequencies is not to allocate them. ITU (International Union Radiocommunication) has designated ISM (industrial, scientific, medical) bands as open bands: • Frequencies are not allocated but restrained in a short range. • These bands usually used by wireless LANs and PANs are around the 2.4 GHz band. • Parts of the 900 MHz and 5 GHz bands are also available for unlicensed usage. 11 Spectrum Allocation Cellular Phones Cordless Phones Wireless LANs Others Europe USA Japan GSM 450-457, 479486/460-467,489496, 890-915/935960, 1710-1785/18051880 UMTS (FDD) 19201980, 2110-2190 UMTS (TDD) 19001920, 2020-2025 CT1+ 885-887, 930932 CT2 864-868 DECT 1880-1900 IEEE 802.11 2400-2483 HIPERLAN 2 5150-5350, 54705725 RF-Control 27, 128, 418, 433, 868 AMPS, TDMA, CDMA 824-849, 869-894 TDMA, CDMA, GSM 1850-1910, 1930-1990 PDC 810-826, 940-956, 1429-1465, 1477-1513 PACS 1850-1910, 19301990 PACS-UB 1910-1930 PHS 1895-1918 JCT 254-380 902-928 IEEE 802.11 2400-2483 5150-5350, 5725-5825 IEEE 802.11 2471-2497 5150-5250 RF-Control 315, 915 RF-Control 426, 868 ITU-R holds auctions for new frequencies, manages frequency bands 12 worldwide (WRC, World Radio Conferences) Signals physical representation of data function of time and location signal parameters: parameters representing the value of data classification • continuous time/discrete time • continuous values/discrete values • analog signal = continuous time and continuous values • digital signal = discrete time and discrete values signal parameters of periodic signals: period T, frequency f=1/T, amplitude A, phase shift • sine wave as special periodic signal for a carrier: s(t) = At sin(2 ft t + t) 13 Fourier representation of periodic signals Periodic signals can be represented by Fourier series. 1 g (t ) c an sin( 2nft) bn cos( 2nft) 2 n 1 n 1 1 1 0 0 t ideal periodic signal t real composition (based on harmonics) 14 Signals Different representations of signals • amplitude (amplitude domain) • frequency spectrum (frequency domain) • phase state diagram (amplitude M and phase in polar coordinates) Composed (multiple frequencies) signals transferred into frequency domain using Fourier transformation Digital signals need • infinite frequencies for perfect transmission (Fourier equation) • modulation with a carrier frequency for transmission (analog signal!) Q = M sin A [V] A [V] t[s] I= M cos f [Hz] 15 Antennas: isotropic radiator Radiation and reception of electromagnetic waves, coupling of wires to space for radio transmission Isotropic radiator: equal radiation in all directions (three dimensional) - only a theoretical reference antenna Real antennas always have directive effects (vertically and/or horizontally) Radiation pattern: measurement of radiation around an antenna y z z y x x ideal isotropic radiator 16 Antennas: simple dipoles Real antennas are not isotropic radiators but, e.g., dipoles with lengths /4 on car roofs or /2 as Hertzian dipole shape of antenna proportional to wavelength Example: Radiation pattern of a simple Hertzian dipole Gain: maximum power in the direction of the main lobe compared to the power of an isotropic radiator (with the same average power) /4 y /2 y x side view (xy-plane) z z side view (yz-plane) simple dipole x top view (xz-plane) 17 Antennas: directed and sectorized Often used for microwave connections or base stations for mobile phones (e.g., radio coverage of a valley) y y z x z side view (xy-plane) x side view (yz-plane) top view (xz-plane) z z x x top view, 3 sector directed antenna top view, 6 sector sectorized antenna 18 Antennas: diversity Grouping of 2 or more antennas: multi-element antenna arrays Antenna diversity • switched diversity, selection diversity • receiver chooses antenna with largest output • diversity combining • combine output power to produce gain • cophasing needed to avoid cancellation /2 /4 /2 + /4 /2 /2 + ground plane 19 Signal propagation ranges Transmission range • communication possible • low error rate Detection range • detection of the signal possible • no communication possible Interference range • signal may not be detected • signal adds to the background noise sender transmission distance detection interference 20 Radio propagation Radio waves can be propagated and receiving power is influenced in different ways: • • • • • • Direct transmission (path loss, fading dependent on frequency) Reflection at large obstacles Refraction through different media Scattering at small obstacles Diffraction at edges shadowing Propagation in free space is always like light (straight line). Receiving power proportional to 1/d² (d = distance between sender and receiver) shadowing reflection refraction scattering diffraction 21 Radio propagation - example 22 Characteristics of the Wireless Channel Path loss: the ratio of the power of the transmitted signal to the power of the same signal received by the receiver. • Free space model: Assume there is only a direct-path between the transmitter and the receiver. • Two-way model: Assume there is a light-of-sight path and the other path through reflection, refraction, or scattering between the transmitter and the receiver • Isotropic antennas (in which the power of the transmitted signal is the same in all direction): The receiving power varies inversely to the distance of power of 2 to 5. Fading: fluctuations in signal strength when received at the receiver. • Fast fading/small-scale fading: rapid fluctuations in the amplitude, phase, or multipath delays. • Slow fading/large-scale fading (shadow fading): objects that absorb the 23 transmissions lie between the transmitter and receiver. Characteristics of the Wireless Channel Measures used for countering the effects of fading are diversity and adaptive modulation. • Diversity modulation: • Time diversity: spread the data over time. • Frequency diversity: spread the transmission over frequencies. Example: the direct sequence spread spectrum and the frequency hopping spread spectrum. • Space diversity: use different physical transmission paths. An antenna array could be used. • Adaptive modulation: the transmitter adjusts the transmission based on the feedback from the receiver. • Complex to implement 24 Characteristics of the Wireless Channel Interference • Adjacent channel interference: interfered by signals in nearby frequencies. Solved by the guard bands. • Co-channel interference: narrow-band interference due to other systems using the same frequency. Solved by multiuser detection machenisms, directional antennas, and dynamic channel allocation methods. • Inter-symbol interference: distortion in the received signal caused by the temporal spreading and the consequent (neighbor) overlapping of individual pulses in the signal. Solved by adaptive equalization that involves mechanisms for gathering the dispersed symbol energy into its original time interval. Doppler Shift • The change/shift in the frequency of the received signal when the transmitter and the receiver are mobile to each other. • Moving towards each other, the frequency will be higher; two moving away, the frequency will be lower. 25 Multipath propagation Signal can take many different paths between sender and receiver due to reflection, scattering, diffraction. Time dispersion: signal is dispersed over time interference with “neighbor” symbols, Inter Symbol Interference (ISI) The signal reaches a receiver directly and phase shifted distorted signal depending on the phases of the different parts multipath LOS pulses pulses signal at sender signal at receiver 26 Characteristics of the Wireless Channel Transmission Rate Constraints • The number of times of signal changes is called the baud rate. Bit rate = baud rate x bits per signal • Nyquist’s Theorem for noiseless channel: • If the signal has L discrete levels over a transmission medium of bandwidth B , the maximum data rate C = 2B log2 L bits/sec • Example: a noiseless 3-kHz channel cannot transmit binary signals at a rate exceeding 6000 bps (= 2 x 3000 log2 2). • Shannon’s Theorem for noisy Channel • maximum data rate C = B log2 (1 + S/N) bits/sec B: bandwdith, S: signal power, N: noise power • S/N (Signal-to-noise ratio, SNR), usually measured as 10 log10S/N in db = decibels, is called thermal noise ratio. • Example: SNR = 20 db, 2 KHz bandwidth. The maximum data rate is 2000 x log2 (1 + 100) = 9230.241 bps 27 Modulation Techniques Analog modulation • Used for transmitting analog data. • shifts center frequency of baseband signal up to the radio carrier • Analog modulation techniques • Amplitude Modulation (AM): Not efficient. Example: Broadcast radio • Frequency Modulation (FM): Example: Broadcast radio • Phase Modulation (PM) Digital modulation • digital data (0 and 1) is translated into an analog signal (baseband) • Required if digital data has to be transmitted over a media that only allows for analog transmission - old analog telephone system and wireless networks Analog modulation techniques • Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), Phase Shift Keying (PSK) • differences in spectral efficiency, power efficiency, robustness 28 Modulation Techniques An example of amplitude modulation (AM): • The top diagram shows the modulating signal superimposed on the carrier wave. • The bottom diagram shows the resulting amplitudemodulated signal. Notice how the peaks of the modulated output follow the contour of the original, modulating signal. 29 Modulation Techniques An example of frequency modulation (FM). • The top diagram shows the modulating signal superimposed on the carrier wave. • The bottom diagram shows the resulting frequencymodulated signal. 30 Modulation and demodulation digital data 101101001 digital modulation analog baseband signal analog modulation radio transmitter radio carrier analog demodulation analog baseband signal synchronization decision digital data 101101001 radio receiver radio carrier 31 Digital modulation Modulation of digital signals known as Shift Keying Amplitude Shift Keying (ASK): • very simple • low bandwidth requirements • very susceptible to interference Frequency Shift Keying (FSK): • needs larger bandwidth • Binary FSK (BFSK): 1 is represented by fc + k and 0 by fc – k. Phase Shift Keying (PSK): • more complex • robust against interference 1 0 1 t 1 0 1 t 1 0 1 t 32 Advanced Frequency Shift Keying bandwidth needed for FSK depends on the distance between the carrier frequencies special pre-computation avoids sudden phase shifts MSK (Minimum Shift Keying) bit separated into even and odd bits, the duration of each bit is doubled depending on the bit values (even, odd) the higher or lower frequency, original or inverted is chosen the frequency of one carrier is twice the frequency of the other even higher bandwidth efficiency using a Gaussian low-pass filter filtering out the unwanted signals GMSK (Gaussian MSK), used in GSM 33 Example of MSK 1 0 1 1 0 1 0 bit data even 0101 even bits odd 0011 odd bits signal value h l lh - - ++ low frequency h: high frequency n: low frequency +: original signal -: inverted signal high frequency MSK signal t No phase shifts! 34 Advanced Phase Shift Keying BPSK (Binary Phase Shift Keying): • bit value 0: sine wave • bit value 1: inverted sine wave • very simple PSK • low spectral efficiency • robust, used e.g. in satellite systems QPSK (Quadrature Phase Shift Keying): • 2 bits coded as one symbol • symbol determines shift of sine wave • needs less bandwidth compared to BPSK • more complex Often also transmission of relative, not absolute phase shift: DQPSK - Differential QPSK (IS-136, PHS) Q 1 10 I 0 Q 11 I 00 01 A t 11 10 00 01 35 Advanced Phase Shift Keying Quadrature Amplitude Modulation (QAM): combines amplitude and phase modulation • it is possible to code n bits using one symbol • 2n discrete levels, n=2 identical to QPSK • bit error rate increases with n, but less errors compared to comparable PSK schemes Example: 16-QAM (4 bits = 1 symbol) Q Symbols 0011 and 0001 have the same phase φ, but different amplitude a. 0000 and 1000 have different phase, but same amplitude. used in standard 9600 bit/s modems 0010 0011 0001 0000 φ I a 1000 36 Multiple Access Techniques Multiplexing in 4 dimensions • • • • frequency (f) time (t) code (c) space (si) channels ki k1 k2 k3 k4 k5 k6 c t c t Goal: multiple use of a shared medium s1 f f s2 c Important: guard spaces needed! t s3 f 37 Frequency Multiplexing Separation of the whole spectrum into smaller frequency bands A channel gets a certain band of the spectrum for the whole time Advantages: • no dynamic coordination necessary • works also for analog signals k1 k2 k3 k4 k5 k6 c f Disadvantages: • waste of bandwidth if the traffic is distributed unevenly • inflexible • guard spaces t 38 Time Multiplexing A channel gets the whole spectrum for a certain amount of time Advantages: • only one carrier in the medium at any time • throughput high even for many users k1 k2 k3 k4 k5 k6 c Disadvantages: f • precise synchronization necessary t 39 Time and Frequency Multiplexing Combination of both methods A channel gets a certain frequency band for a certain amount of time Example: GSM Advantages: k1 k2 k3 k4 k5 • better protection against tapping • protection against frequency selective interference • higher data rates compared to code multiplex but: precise coordination t required k6 c f 40 Code Multiplexing Each channel has a unique code k1 k2 All channels use the same spectrum at the same time Advantages: k3 k4 k5 k6 c • bandwidth efficient • no coordination and synchronization necessary • good protection against interference and tapping f Disadvantages: • lower user data rates • more complex signal regeneration Implemented using spread spectrum technology t 41 FHSS (Frequency Hopping Spread Spectrum) Frequency Hopping Spread Spectrum (FHSS) is a transmission technology used in wireless transmissions where the data signal is modulated with a narrowband carrier signal that "hops" in a random but predictable sequence from frequency to frequency as a function of time over a wide band of frequencies. Discrete changes of carrier frequency • The total bandwidth is split into many channels of smaller bandwidth. Transmitter and receiver stay on one of these channels for a certain time and hop to another channel. • This system implements FDM and TDM. • The pattern of channel usage is called the hopping sequence, the time spent on a channel with a certain frequency is called the dwell time. • sequence of frequency changes determined via pseudo random number sequence 42 FHSS (Frequency Hopping Spread Spectrum) Two versions • Fast Hopping: several frequencies per user bit • Slow Hopping: several user bits per frequency (not immune to narrowband interference) Advantages • frequency selective fading and interference limited to short period • simple implementation • uses only small portion of spectrum at any time Disadvantages • not as robust as DSSS • simpler to detect 43 FHSS (Frequency Hopping Spread Spectrum) tb user data 0 1 f 0 1 1 t td f3 slow hopping (3 bits/hop) f2 f1 f t td f3 fast hopping (3 hops/bit) f2 f1 t tb: bit period td: dwell time 44 FHSS (Frequency Hopping Spread Spectrum) user data modulator modulator frequency synthesizer transmitter hopping sequence narrowband signal received signal data demodulator hopping sequence spread transmit signal narrowband signal frequency synthesizer demodulator receiver 45 DSSS (Direct Sequence Spread Spectrum) Direct Sequence Spread Spectrum (DSSS) is a transmission technology used in wireless transmissions where a data signal at the sending station is combined with a higher data rate bit sequence, or chipping code. The chipping code which increases the signal's resistance to interference. XOR of the signal with pseudo-random number (chipping sequence) • many chips per bit (e.g., 128) result in higher bandwidth of the signal Advantages tb • reduces frequency selective user data fading 0 1 XOR • in cellular networks tc • base stations can use the chipping same frequency range sequence • several base stations can 01101010110101 = detect and recover the signal resulting • soft handover signal Disadvantages 01101011001010 • precise power control necessary tb: bit period 46 (synchronization) tc: chip period DSSS (Direct Sequence Spread Spectrum) spread spectrum signal user data X transmit signal modulator chipping sequence radio carrier transmitter correlator lowpass filtered signal received signal demodulator radio carrier products sampled sums data X integrator decision chipping sequence receiver 47 Space Division Multiple Access Space division multiple access (SDMA) uses directional transmitters/antennas to cover angular regions. Different areas/regions can be served using the same frequency channel. This method is suited to • Satellite system: a narrowly focused beam to prevent the signal from spreading too widely. • Cellular phone system: base station covers a certain transmission area (cell). Mobile devices communicate only via the base station 48 Comparison SDMA/TDMA/FDMA/CDMA Approach Idea SDMA segment space into cells/sectors Terminals only one terminal can be active in one cell/one sector Signal separation cell structure, directed antennas TDMA segment sending time into disjoint time-slots, demand driven or fixed patterns all terminals are active for short periods of time on the same frequency synchronization in the time domain FDMA segment the frequency band into disjoint sub-bands CDMA spread the spectrum using orthogonal codes every terminal has its all terminals can be active own frequency, at the same place at the uninterrupted same moment, uninterrupted filtering in the code plus special frequency domain receivers Advantages very simple, increases established, fully simple, established, robust inflexible, antennas Disadvantages typically fixed inflexible, frequencies are a scarce resource flexible, less frequency planning needed, soft handover complex receivers, needs more complicated power control for senders typically combined with TDMA (frequency hopping patterns) and SDMA (frequency reuse) still faces some problems, higher complexity, lowered expectations; will be integrated with TDMA/FDMA capacity per km² Comment only in combination with TDMA, FDMA or CDMA useful digital, flexible guard space needed (multipath propagation), synchronization difficult standard in fixed networks, together with FDMA/SDMA used in many mobile networks 49 Voice Coding The voice coding process converts the analog signal into its equivalent digital representation without any noticeable distortion. The devices that perform the analog to digital conversion (at the sender) and the reverse digital to analog signal conversion (at the receiver) are known as codecs (coder/decoder). The Pulse position modulation (PPM) is a technique used for converting an analog signal into its digital representation. • The position of a pulse relative to its unmodulated time of occurrence is varied in accordance with the message signal. • Disadvantage: Perfect synchronization is required. Pulse Code Modulation (PCM) is a technique of converting an analog signal to a digital signal. • The audio signal is converted in samples according to the frequency of the signal. • Every sample is then written in the stream without using any compression techniques. 50 Voice Coding PCM consists of three stages: sampling of the analog signal, quantization, and binary encoding. • Sampling • The codec converts the analog speech signal to its digital representation by sampling the signal at regular intervals of time. • The series of pulses produced after sampling the analogy signal is known as pulse amplitude modulation (PAM) pluses whose amplitudes are proportional to that of the original signal. • Quantization: A fixed number of amplitude laves are used to represent the amplitudes of the PAM pulses. The distortion could occur. It is called quantization. • Binary encoding: The sequence of quantized PAM pulses are represented by bit streams. PCM are not suitable for wireless networks because of limited bandwidth. Vocoders are devices that makes use of knowledge (distinct features/characteristics) of the actual structure and operation of human speech production organs. Only those characteristics are encoded, transmitted, and decoded so that it can achieve voice 51 transfer at low bit rates. Error Control Error-correcting codes/forward error correction • include enough redundant information to enable the receiver to deduce the correct transmitted data. • Used in unreliable channel such as wireless links Error-detecting codes • include only enough redundancy to allow the receiver to request a retransmission. • Used in reliable channel such as fiber N-bit codeword = m-bit data + r-bit check The number of bit positions in which two codewords differ is called the Hamming distance. Example: Hamming distance is 3. 10001001 xor 10110001 00111000 3 bit difference 52 Error Control If two codewords are a Hamming distance d apart, it will require d single-bit errors to convert one into the other. To detect d errors, we need a distance d+1 code (because there is no way to convert a valid codeword into another valid codeword with d changes. The detail needs mathematical analysis). Example: A simple error - detection code: (check bit) A parity bit is chosen so that the number of 1 bits in the codeword is even or odd. 000(0) - check bit 001 1 010 1 That is Hamming distance of parity bit code is 2 = d + 1 can detect d = 1 error 53 Error Control - Error Correction Codes To correct d errors, we need a distance 2d+1 code. (because d changes is not enough to recover the original valid codeword but only to convert to other valid codeword The detail needs mathematical analysis). Examples: Consider a code with four valid codewords: • • • • • 0000000000, 0000011111, 1111100000, 1111111111 Hamming distance is 5. It can correct double errors. If 0000000111 is received, the receiver knows the original is 00000011111. But if a triple errors change 0000000000 to 0000000111, the error will not be corrected properly. Correct round off to the nearest codeword. 54 Error Control m data bits 2m legal messages = codewords Examples: Consider a code with four valid codewords: • 000000, 000111, 111000, 111111 differ by 3 • 011000, 101000, 110000, 111001, 111010, and 111100 are six invalid code words a distance 1 from 111000. • each valid codeword has n invalid codewords within hamming distance 1. To correct these n invalid codewords with 1 bit error, n + 1 bit patterns are required. • Since there are a total of 2n bit patterns (n + 1) x 2m ≤ 2n (m + r + 1) x 2m ≤ 2m+r m + r + 1 ≤ 2r • Given m, this puts a lower limit on the number of check bits needed to correct 1 error. m = 7 7 + r + 1 ≤ 2r, 8 ≤ 2r - r r = 4 55 Hamming Codes Bits are numbered from the left. Checkbits are bits numbered powers of 2. {1,2,4,8, ...}. Each check bit forces the parity of some collection of bits, including itself, to be even or odd. To see which check bits the data in position k contributes to, write k as a sum of powers of 2. Data bits Check bits Check bits Data bits 3 5 1+2 1+4 1 6 7 2+4 1+2+4 2 9 10 11 1+8 2+8 1+2+8 4 8 3 + 5 + 7 + 9 + 11 3 + 6 + 7 + 10 + 11 5 + 6 + 7 9 + 10 + 11 56 Constructing Hamming Codes Consider an ASCII code H (1001000). Use even parity: H 1001000 _ _ 1 _ 001 _ 000 Bit Calculation Result 1 (1 + 0 + 1 + 0 + 0) mod 2 = 0 0 2 (1 + 0 + 1 + 0 + 0) mod 2 = 0 0 4 (0 + 0 + 1) mod 2 = 1 1 8 (0 + 0 + 0 mod 2 = 0 0 The codeword is 00110010000. 57 Error Control - Hamming Codes When a codeword arrives, counter = 0. If a check bit k does not have the correct parity, it adds k to the counter. Supposed there is only one bit error. If counter = 0 no error If counter = 11 bit 11 in error. ASCII codeword H 1001000 0 0 1 1 001 0 000 G 1100001 1 0 1 1 100 1 001 If G is received as (0) 0 1 1 100 1 001, 1st bit is incorrect. If G is received as (1)(0){0} 1 100 1 001 1st and 2nd has errors. 3rd bit is incorrect. 58 Error Control - Cyclic Redundancy Check A major goal in designing error detection algorithms is to maximize the probability of detecting errors using only a small number of redundant bits. In general, correcting is more expensive than detecting and re-transmitting. Add k bits of redundant data to an n-bit message • want to use k << n to detect errors • e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree polynomial • e.g., MSG=10011010 as M(x) = x7 + x4 + x3 + x1 Let k be the degree of some divisor/generator polynomial • e.g., G(x) = x3 + x2 + 1 Polynomial arithmetic is performed modulo 2. 10011011 11001010 01010001 EX-OR result. Sender & receiver agree upon a generator polynomial G(x). 59 Cyclic Redundancy Check Algorithm for computing the checksum 1. shift left r bits (append r zero bits to low order end of the frame), i.e., M(x)xr 2. divide the bit string corresponding to G(x) into (xr)M(x). 3. subtract (or add) remainder of M(x)xr / G(x) from M(x)xr using XOR, call the result T(x). Transmit T(x). Suppose that a transmission error E(x) has occured and T(x)+E(x) arrives instead of T(x). Received polynomial T(x) + E(x) = (T(x)+E(x))/G(x) = T(x)/G(x) + E(x)/G(x) = E(x)/G(x) • E(x) = 0 implies no errors Divide (T(x) + E(x)) by G(x); remainder zero if: • E(x) was zero (no error), or • E(x) is exactly divisible by C(x) 60 CRC Example M(x)=1101011011 C(x)=10011 k=4 1100001010 -------------10011 /11010110110000 10011 ----10011 10011 ----10110 10011 ----10100 10011 ----1110 P(x) = 1101011011 1110 61 Selecting G(x) Selecting G(x) • All single-bit errors, as long as the xk and x0 terms have non-zero coefficients. • All double-bit errors, as long as G(x) contains a factor with at least three terms • Any odd number of errors, as long as G(x) contains the factor (x + 1) • Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. • Most burst errors of larger than k bits can also be detected International standards for G(x): CRC-12 = x12+x11+x3+x2+x1+1 CRC-16 = x16+x15+x2+1 16 bit check sum. catches all single, double,odd errors. catches all burst errors of length < 16 A simple shift register circuit can be constructed to compute and verify the checksums in hardware. 62 Error Control Convolution Coding • Used for long bit streams in noisy channels. • Two mechanisms: Sequential decoding and viterbi decoding Turbo codes are a class of recently-developed high-performance error correction codes finding use in deep-space satellite communications and other applications where designers seek to achieve maximal information transfer over a limited-bandwidth communication link in the presence of data-corrupting noise. 63 Computer Networks Internetworks • Different networks are connected by means of machines called gateways. • A collection of interconnected networks is called an internetwork or internet. • A common form of internet is a collection of LANs connected by a WAN. Network Software • • • • • Protocol Hierarchies Design Issues for the Layers Connection-Oriented and Connectionless Services Service Primitives The Relationship of Services to Protocols 64 Protocol Hierarchies Protocol Hierarchies • The reduce design complexity, most networks are organized as a stack of layers or levels. • A protocol is an agreement between the communication parties. • The entities comprising the corresponding layers on different machines are called peers. • The physical medium is the place through which actual communication occurs. • Between each pair of adjacent layers is an interface. It defines which primitive operations and services the lower layer makes available to the upper one. Network Architecture • A network architecture is a set of layers and protocols used to reduce network design complexity. • A protocol stack is a list of protocols used by a certain system, one protocol per layer. 65 Network Software Protocol Hierarchies Layers, protocols, and interfaces. 66 Protocol Hierarchies The philosopher-translator-secretary architecture. 67 Protocol Hierarchies Example information flow supporting virtual communication in layer 5. 68 Design Issues for the Layers Addressing: a specific destination needs to be specified. Error Control: errors need to be detected and corrected. Flow Control: A fast sender is kept from swamping a slow receiver with data. Multiplexing: the same connection is used for multiple, unrelated conversations. Routing: a route must be chosen for a packet to transmit. 69 Connection-Oriented and Connectionless Services Connection-oriented: connection needs to be established before communication: telephone Connectionless (datagram): connection needs not to be established before communication: postal system Each service can be characterized by a Quality of Service (QoS). Request-reply: the sender transmits a request; the reply contains the answer. Reliable communication is communication where messages are guaranteed to reach their destination complete and uncorrupted and in the order they were sent. Why is unreliable communication used? • Reliable communication is not available. • The delay in a reliable service might not be acceptable such as real-time applications. 70 Connection-Oriented and Connectionless Services Six different types of service. 71 Service Primitives A service is specified by a set of primitives (operations) available to a user process to access the service. Five service primitives for implementing a simple connection72 oriented service. Service Primitives Packets sent in a simple client-server interaction on a 73 connection-oriented network. Services to Protocols Relationship • Services relate to the interfaces between layers. Protocol relate to the packets sent between peer entities. The relationship between a service and a protocol. 74 Reference Models The OSI Reference Model The TCP/IP Reference Model A Comparison of OSI and TCP/IP A Critique of the OSI Model and Protocols A Critique of the TCP/IP Reference Model The OSI (Open Systems Interconnection) 7-Layer Reference Model [ISO,1984] is a guide that specifies what each layer should do, but not how each layer is implemented. The TCP/IP Reference Model is not of much use but the protocols associated with it are widely used. 75 Reference Model • OSI Reference Model 1. Physical Layer - transmission of raw bits over a physical channel. 2. Data Link Layer - provide an error-free point-to-point link to transmit data and control frames (sequencing frames, retransmission) between two directly connected nodes. 3. Network Layer - provide a point-to-point link between any two switching nodes (routing, congestion control). 4. Transport Layer - provide a link between any two processes in two hosts (connection-oriented or connectionless). 5. Session Layer - manage conversation between two peer session entities. 6. Presentation Layer - present data in a meaningful format (compress, encode, and convert data). 7. Application Layer - a variety of user applications (e-mail, ftp, etc.). 76 ISO 7-Layer Reference Model End host End host Application Application Various applications (FTP,HTTP,…) Presentation Presentation Present data in a meaningful format Session Session Provide session semantics (RPC) Transport Transport Reliable, end-to-end byte stream (TCP) Network Network Network Network Unreliable end-to-end tx of packets Data link Physical Data link Data link Data link Reliable transmission (tx) of frames Physical Physical Physical Unreliable transmission (tx) of raw bits One or more nodes 77 within the network Reference Models The OSI reference model. 78 TCP/IP Reference Model TCP/IP Reference Model • The internet layer defines an official packet format and protocol called IP (Internet Protocol) and specifies how IP packets are routed from the source to the destination. • The transport layer is designed to allow peer entities to talk. • TCP (Transmission Control Protocol) is a reliable connection-oriented protocol that allows a byte stream to be delivered. • UDP (User Datagram Protocol) is an unreliable, connectionless protocol for applications. • The application layer contains all the higher-level protocols. • The host-to-network layer points out that the host has to connect to the network. 79 Reference Models The TCP/IP reference model. 80 Reference Models Protocols and networks in the TCP/IP model initially. 81 Connection-Oriented Networks The X.25 protocol, adopted as a standard by the Consultative Committee for International Telegraph and Telephone (CCITT), is a connection-oriented network protocol. Frame relay is connection-oriented network with no error control and no flow control. ATM (asynchronous transfer mode) is a dedicatedconnection switching technology that organizes digital data into 53-byte cell units and transmits them over a physical medium using digital signal technology. 82 ATM Virtual Circuits A virtual circuit. An ATM cell. 83 ATM Reference Model The physical layer deals with the physical medium. • The PMD (Physical Medium Dependent) sublayer interfaces to the actual cable. • The TC (Transmission Convergence) sublayer converts back forth a bit stream to a cell stream. The ATM layer deals with cells and cell transport. The ATM adaptation layer deals with segmentation and re-assembly. • The SAR (Segmentation And Reassembly) sublayer breaks up packets into cells and put them back. • The CS (Convergence Sublayer) is used to offer different kind of services to the upper layers. 84 The ATM Reference Model The ATM reference model. 85 The ATM Reference Model The ATM layers and sublayers and their functions. 86 Shortcomings of the ATM Reference Model Each 53-byte cell has a 5-byte header. This constitutes a significant control overhead. Complex mechanisms are required for ensuring fairness among connections and provisioning quality of service. Complex packets scheduling is required due to the varying Ea delays. The high cost and complexity of dvices. Lack of scalability 87 IEEE 802 Standards IEEE 802 standards defines the physical and data link layer for LANs. The important ones are marked with *. The ones marked with 88 are hibernating. The one marked with † gave up. IEEE 802 Standard The physical layer in a LAN deals with the actual physical transmission medium used for communication. • Some commonly used physical media: twisted pair, coaxial cable, optical fiber, and radio waves. In IEEE 802 Logical Link Control (LLC) forms the upper half of the data link layer. Medium access control (MAC) forms the lower sublayer. • error-controlled, flow-controlled • Adds an LCC header, containing sequence and acknowledgement numbers. LLC provides three service options: • Unreliable datagram service • Acknowledged datagram service • Reliable connection-oriented service 89 IEEE 802.2: Logical Link Control (a) Position of LLC. (b) Protocol formats. 90 IEEE 802 Standard The medium access control sublayer (MAC) • It directly interfaces with the physical layer. • It provides services such as addressing, framing, and medium access control. The Pure Aloha Protocol (by Abramson in 1970s) is one of oldest MAC protocol in which a station transmits the data whenever it is available. Then, the station listens to the channel to see if a collision occurred. If the frame was destroyed, the station waits for a random length of time and tries again. In slotted Aloha (by Roberts in 1972) a computer is not permitted to send whenever a carriage return is typed but wait for a time slot. 91 Carrier Sense Multiple Access (CSMA) Protocols in which stations listen for a carrier and act accordingly are called carrier sense protocols. 1-persistent CSMA Channel Busy Continue sensing until free and then grab. Channel Idle Transmit with probability 1. Collision Wait for a random length of time and try again. Nonpersisten CSMA: Channel Busy Wait for a random length of time and try again. Channel Idle Transmit. Collision Wait for a random length of time and try again. p-persistent CSMA: Channel Busy Continue sensing until free (same as idle). Channel Idle Transmit with probability p, and defer transmitting until the next slot with probability q = 1-p. Collision Wait for a random length of time and try again. 92 Persistent and Nonpersistent CSMA Comparison of the channel utilization versus load for various 93 random access protocols. CSMA/CD Carrier Sense Multiple Access/Collision Detect (CSMA/CD) is a protocol for carrier transmission access in Ethernet networks. • In CSMA/CD, any device can try to send a frame at any time. Each device senses whether the line is idle and therefore available to be used. • If it is available, the device begins to transmit its first frame. If another device has tried to send at the same time, a collision is said to occur and the frames are discarded. Each device then waits a random amount of time and retries until successful in getting its transmission sent. • When there is collision, the station wait some time between 0 to 2n - 1 slotted time at the n's trial. This is called back-off algorithm. Usually, after 16 trials the station gives up. 94 IEEE 802.3 Standard IEEE 802.3 is standard using Carrier Sense Multiple Access/Collision Detection (CSMA/CD). It is commonly referred to as the Ethernet standard. IEEE 802.3 supports data transfer rate up to 10 Mbps. Fast Ethernet (IEEE 802.3u) specifies data transfer rate up to 100 Mbps. The 802.3 committee decided to keep 802.3 for the fast Ethernet (802.3u). • Backward compatible • A new protocol might have problems. • Get job done before the technology changed. Gigabit Ethernet (IEEE 802.3z) specifies data transfer rate up to 1 Gbps. 95 IEEE 802.3 Physical Layer 10Base2 means that is operates at 10 Mbps, uses baseband signaling, and support segments up to 200 meters. 10Base-T became dominant due to its use of existing wiring and the ease of maintenance . The most common kinds of Ethernet cabling. 96 Fast/Gigabit Ethernet 100Base-T4 – 4 twisted pairs achieve 100 Mbps. The original fast Ethernet cabling. Gigabit Ethernet cabling. 97 Ethernet MAC Sublayer Protocol Preamble – used for sender and receiver to synchronize their clock. Addresses • • • • unique, 48-bit unicast address assigned to each adapter example: 8:0:e4:b1:2 broadcast: all 1s, the set of all recipient nodes Multicast: first bit is 1,a group of recipient nodes Frame formats. (a) DIX Ethernet, (b) IEEE 802.3. 98 Wireless LAN: 802.11 A wireless LAN is one in which a mobile user can connect to a local area network (LAN) through a wireless (radio) connection. A standard, IEEE 802.11, specifies the technologies for wireless LANs. It is designed to work in two modes: • In the presence of a base station: access point • In the absence of a base station: ad hoc networking Physical Layer • It supports three different physical layers: • Frequency hopping spread spectrum (FHSS) • Direct sequence spread spectrum (DSSS) • Infrared • Clear channel assessment (CCA): It provides mechanisms for sensing the wireless channel and determine whether or not it is idle. MAC Sublayer follows carrier sense multiple access with collision avoidance (CSMA/CA). 99 Wireless LANs (a) Wireless networking with a base station. (b) Ad hoc networking. 100 IEEE 802.11 Standard The 802.11 task group has the object to develop MAC layer and physical layer specifications for wireless connectivity. The 802.11a task group created a standard for wireless LAN operations in the 5 GHz frequency baud, where data rates of up to 54 Mbps are possible. The 802.11b task group created a standard for wireless LAN operations in the 2.4 GHz Industrial, Scientific, and Medical (ISM) band, which is freely available for use throughout the world. The 802.11c task group devised standards for bridging operations. The 802.11d task group published the definitions and requirements for enabling the operation of the 802.11 standard in countries where the 802.11 standard is not adopted yet. The 802.11e task group defined an extension of the 802.11 standard for quality of service (QoS). 101 IEEE 802.11 Standard The 802.11f developed specifications for implementing access points and distribution systems. The 802.11g task groups extended the 802.11b standard to support high-speed transmissions of up to 54 Mbps in the 2.4 GHz frequency. The 802.11h task groups developed the MAC layer standard that comply with European regulations for 5 GHz wireless LAN. The 802.11i group is working on mechanisms for enhancing security in the 802.11 standard. The 802.11j task group is working on mechanisms for enhancing security in the 802.11 MAC physical layer protocols to additionally operate in the newly available Japanese 4.9 GHz and 5 GHz bands. The 802.11n defines standardized modifications to the 802.11 102 MAC and physical layers to allows at least 100 Mbps. Wireless Networks Wireless networks are computer networks that use radio frequency channels as their physical medium for communication. The first wireless radio communication system was invented by Guglielmo Marconi in 1897. Radio and television broadcasting are common applications of wireless communications techniques. The wireless communications industry includes cellular telephony, wireless LANs, and satellite-based communication networks. In cellular networks a fixed based station serving all mobile phones in its coverage area is called a cell. The first-generation (1G) cellular networks used analogy signal technology. • They used frequency modulation. • Voice communication • Example: advanced mobile phone system (AMPS) 103 Cellular Systems The second-generation (2G) cellular systems used digital transmission mechanisms such as TDMA and CDMA. • Voice communication • Example: global system for mobile communication (GSM) in Europe, IS136 in States, Personal Digital System (PDS) in Japan. The present system is called 2.5 G. General packet Radio Services (GPRS) has been deployed for data communication. The third-generation (3G) systems provides services such as enhanced multimedia, bandwidth up to 2 Mbps. • Standards: wideband code division multiple access (W-CDMA), universal mobile telecommunications system (UMTS) The fourth-generation (4G) systems provides further improvements such as higher bandwidth, enhanced multimedia, universal access, and portability across all types of devices. 104 Wireless Local Area Network (WLAN) The wireless Local Area Network (WLAN) is a type of local-area network that uses radio waves to communicate between nodes. A stationary node called an access point (AP) coordinates the communication between nodes. The two main standards for WLANs are the IEEE 802.11 standard and European Telecommunications Standards Instititue (ETSI) HIPERLAN standard. Wireless personal area networks (WPANs) are short-distance wireless networks. Bluetooth is a popular WPAN specification. • Work within 10 m. • Bluetooth Special Interest Group (SIG) including Ericsson, Intel, IBM, Nokia, and Toshiba is the driving force for Bluetooth. The IEEE 802.15 is a standard for WPAN. 105 Ad Hoc/Hybrid Wireless Network An ad hoc wireless network is an autonomous system of mobile nodes connected through wireless links. It doesn’t have any fixed infrastructure. Hybrid networking combines the advantages of infrastructurebased and less networks. • Example: multi-hop cellular network (MCN), integrated cellular and ad hoc relaying system (iCAR), multi-power architecture for cellular networks (MuPAC). 106 Network Standardization Who’s Who in the Telecommunications World: ITU Who’s Who in the International Standards World: ISO, ANSI, NIST, IEEE Who’s Who in the Internet Standards World • • • • IAB (Internet Architecture Board) A Request for Comments (RFC) is a formal document from the Internet. IRTF (Internet Research Task Force) IETF (Internet Engineering Task Force) Main sectors: Radiocommunications (ITU-R), Telecommunications Standardization (ITU-T), Development (ITU-D) Classes of Members: National governments, Sector members, Associate members, Regulatory agencies 107 Wireless systems: overview of the development cellular phones satellites 1983: AMPS 1982: Inmarsat-A 1984: CT1 1986: NMT 900 1987: CT1+ 1988: Inmarsat-C 1991: CDMA 1991: D-AMPS 1989: CT 2 1992: Inmarsat-B Inmarsat-M 1993: PDC 1994: DCS 1800 analogue wireless LAN 1980: CT0 1981: NMT 450 1992: GSM cordless phones 1991: DECT 1998: Iridium 2000: GPRS 1997: IEEE 802.11 1999: 802.11b, Bluetooth 2000: IEEE 802.11a 2001: IMT-2000 2003: IEEE 802.11g digital 4G – fourth generation: when and how? 199x: proprietary 200?: Fourth Generation (Internet based) Areas of research in mobile communication Wireless Communication • • • • transmission quality (bandwidth, error rate, delay) modulation, coding, interference media access, regulations ... Mobility • • • • location dependent services location transparency quality of service support (delay, jitter, security) ... Portability • power consumption • limited computing power, sizes of display, ... • usability 109 Simple reference model used here Application Application Transport Transport Network Network Data Link Physical Radio Network Network Data Link Data Link Data Link Physical Physical Physical Medium 110 Influence of mobile communication to the layer model Application layer Transport layer Network layer Data link layer Physical layer • • • • • • • • • • • • • • • • service location new applications, multimedia adaptive applications congestion and flow control quality of service addressing, routing, device location hand-over authentication media access multiplexing media access control encryption modulation interference attenuation frequency 111 Metric Units The metric prefixes are typically abbreviated by their first letters, with the units greater than 1 capitalized. m is for milli and µ is for micro. For storage, Kilo means 210. For communication, 1Kbps means 1000 bits per second. 112