link layer; media access control lec 03 07/03/2010 ecom 6320

52
Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Post on 20-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Link Layer;Media Access Control

Lec 03

07/03/2010

ECOM 6320

Page 2: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

2

Outline

Multipath propagation Multiplexing Modulation GSM IEEE 802.11

Page 3: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

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

signal at sendersignal at receiver

LOS pulsesmultipathpulses

Page 4: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Effects of mobility

Channel characteristics change over time and location signal paths change different delay variations of different signal

parts different phases of signal parts quick changes in the power received (short

term fading)

Additional changes in distance to sender obstacles further away slow changes in the average

power received (long term fading)

short term fading

long termfading

t

power

Page 5: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Multiplexing

Multiplexing in 4 dimensions space (si) time (t) frequency (f) code (c)

Goal: multiple use of a shared medium

Important: guard spaces needed!

s2

s3

s1f

t

c

k2 k3 k4 k5 k6k1

f

t

c

f

t

c

channels ki

Page 6: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Frequency multiplex

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

Disadvantages waste of bandwidth

if the traffic is distributed unevenly

inflexible

k2 k3 k4 k5 k6k1

f

t

c

Page 7: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

f

t

c

k2 k3 k4 k5 k6k1

Time multiplex

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

Disadvantages precise

synchronization necessary

Page 8: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

f

Time and frequency multiplex

Combination of both methods A channel gets a certain frequency band for a certain

amount of time Example: GSM

Advantages better protection against

tapping protection against frequency

selective interference but: precise coordination

required

t

c

k2 k3 k4 k5 k6k1

Page 9: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Code multiplex

Each channel has a unique code

All channels use the same spectrum at the same time

Advantages bandwidth efficient no coordination and synchronization

necessary good protection against interference

and tapping Disadvantages

varying user data rates more complex signal regeneration

Implemented using spread spectrum technology

k2 k3 k4 k5 k6k1

f

t

c

Page 10: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Spread spectrum technology

Problem of radio transmission: frequency dependent fading can wipe out narrow band signals for duration of the interference

Solution: spread the narrow band signal into a broad band signal using a special code protection against narrow band interference

Side effects: coexistence of several signals without dynamic

coordination tap-proof

Alternatives: Direct Sequence, Frequency Hopping

detection atreceiver

interference spread signal signal

spreadinterference

f f

power power

Page 11: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Effects of spreading and interference

dP/df

f

i)

dP/df

f

ii)

sender

dP/df

f

iii)

dP/df

f

iv)

receiverf

v)

user signalbroadband interferencenarrowband interference

dP/df

Page 12: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

DSSS (Direct Sequence Spread Spectrum) I

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

reduces frequency selective fading

in cellular networks • base stations can use the

same frequency range• several base stations can

detect and recover the signal• soft handover

Disadvantages precise power control necessary

user data

chipping sequence

resultingsignal

0 1

0 1 1 0 1 0 1 01 0 0 1 11

XOR

0 1 1 0 0 1 0 11 0 1 0 01

=

tb

tc

tb: bit periodtc: chip period

Page 13: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

DSSS (Direct Sequence Spread Spectrum) II

Xuser data

chippingsequence

modulator

radiocarrier

spreadspectrumsignal

transmitsignal

transmitter

demodulator

receivedsignal

radiocarrier

X

chippingsequence

lowpassfilteredsignal

receiver

integrator

products

decisiondata

sampledsums

correlator

Page 14: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

FHSS (Frequency Hopping Spread Spectrum) I

Discrete changes of carrier frequency sequence of frequency changes determined via

pseudo random number sequence Two versions

Fast Hopping: several frequencies per user bit

Slow Hopping: several user bits per frequency

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

Page 15: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

FHSS (Frequency Hopping Spread Spectrum) II

user data

slowhopping(3 bits/hop)

fasthopping(3 hops/bit)

0 1

tb

0 1 1 t

f

f1

f2

f3

t

td

f

f1

f2

f3

t

td

tb: bit period td: dwell time

Page 16: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

FHSS (Frequency Hopping Spread Spectrum) III

modulatoruser data

hoppingsequence

modulator

narrowbandsignal

spreadtransmitsignal

transmitter

receivedsignal

receiver

demodulatordata

frequencysynthesizer

hoppingsequence

demodulator

frequencysynthesizer

narrowbandsignal

Page 17: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Cell structure

Implements space division multiplex base station covers a certain transmission area (cell)

Mobile stations communicate only via the base station

Advantages of cell structures higher capacity, higher number of users less transmission power needed more robust, decentralized base station deals with interference, transmission area etc.

locally Problems

fixed network needed for the base stations handover (changing from one cell to another) necessary interference with other cells

Cell sizes from some 100 m in cities to, e.g., 35 km on the country side (GSM) - even less for higher frequencies

Page 18: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Frequency planning I

Frequency reuse only with a certain distance between the base stations

Standard model using 7 frequencies:

Fixed frequency assignment: certain frequencies are assigned to a certain cell problem: different traffic load in different cells

Dynamic frequency assignment: base station chooses frequencies depending on the

frequencies already used in neighbor cells more capacity in cells with more traffic assignment can also be based on interference

measurements

f4

f5

f1

f3

f2

f6

f7

f3

f2

f4

f5

f1

Page 19: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Frequency planning II

f1

f2

f3

f2

f1

f1

f2

f3

f2

f3

f1

f2

f1

f3f3

f3f3

f3

f4

f5

f1

f3

f2

f6

f7

f3

f2

f4

f5

f1

f3

f5f6

f7f2

f2

f1f1 f1

f2

f3

f2

f3

f2

f3h1

h2

h3g1

g2

g3

h1

h2

h3g1

g2

g3g1

g2

g3

3 cell cluster

7 cell cluster

3 cell clusterwith 3 sector antennas

Page 20: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Cell breathing

CDM systems: cell size depends on current load

Additional traffic appears as noise to other users

If the noise level is too high users drop out of cells

Page 21: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

media access

Can we apply media access methods from fixed networks?

Example CSMA/CD Carrier Sense Multiple Access with Collision Detection send as soon as the medium is free, listen into the medium

if a collision occurs (legacy method in IEEE 802.3) Problems in wireless networks

signal strength decreases proportional to the square of the distance

the sender would apply CS and CD, but the collisions happen at the receiver

it might be the case that a sender cannot “hear” the collision, i.e., CD does not work

furthermore, CS might not work if, e.g., a terminal is “hidden”

Page 22: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

hidden and exposed terminals

Hidden terminals A sends to B, C cannot receive A C wants to send to B, C senses a “free” medium (CS fails) collision at B, A cannot receive the collision (CD fails) A is “hidden” for C

Exposed terminals B sends to A, C wants to send to another terminal (not A or

B) C has to wait, CS signals a medium in use but A is outside the radio range of C, therefore waiting is not

necessary C is “exposed” to B

BA C

Page 23: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

near and far terminals

Terminals A and B send, C receives signal strength decreases proportional to the square of the

distance the signal of terminal B therefore drowns out A’s signal C cannot receive A

If C for example was an arbiter for sending rights, terminal B would drown out terminal A already on the physical layer

Also severe problem for CDMA-networks - precise power control needed!

A B C

Page 24: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Access methods SDMA/FDMA/TDMA

SDMA (Space Division Multiple Access) segment space into sectors, use directed antennas cell structure

FDMA (Frequency Division Multiple Access) assign a certain frequency to a transmission channel

between a sender and a receiver permanent (e.g., radio broadcast), slow hopping

(e.g., GSM), fast hopping (FHSS, Frequency Hopping Spread Spectrum)

TDMA (Time Division Multiple Access) assign the fixed sending frequency to a transmission

channel between a sender and a receiver for a certain amount of time

Page 25: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

FDD/FDMA - general scheme, example GSM

f

t

124

1

124

1

20 MHz

200 kHz

890.2 MHz

935.2 MHz

915 MHz

960 MHz

Page 26: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

TDD/TDMA - general scheme

1 2 3 11 12 1 2 3 11 12

tdownlink uplink

417 µs

Page 27: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Aloha/slotted aloha

Mechanism random, distributed (no central arbiter), time-multiplex Slotted Aloha additionally uses time-slots, sending must

always start at slot boundaries Aloha

Slotted Aloha

sender A

sender B

sender C

collision

sender A

sender B

sender C

collision

t

t

Page 28: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

DAMA - Demand Assigned Multiple Access

Channel efficiency only 18% for Aloha, 36% for Slotted Aloha (assuming Poisson distribution for packet arrival and packet length)

Reservation can increase efficiency to 80% a sender reserves a future time-slot sending within this reserved time-slot is possible

without collision reservation also causes higher delays typical scheme for satellite links

Examples for reservation algorithms: Explicit Reservation according to Roberts

(Reservation-ALOHA) Implicit Reservation (PRMA) Reservation-TDMA

Page 29: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Access method DAMA: Explicit Reservation

Explicit Reservation (Reservation Aloha): two modes:

• ALOHA mode for reservation:competition for small reservation slots, collisions possible

• reserved mode for data transmission within successful reserved slots (no collisions possible)

it is important for all stations to keep the reservation list consistent at any point in time and, therefore, all stations have to synchronize from time to time

Aloha reserved Aloha reserved Aloha reserved Aloha

collision

t

Page 30: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Access method DAMA: PRMA

Implicit reservation (PRMA - Packet Reservation MA): a certain number of slots form a frame, frames are repeated stations compete for empty slots according to the slotted

aloha principle once a station reserves a slot successfully, this slot is

automatically assigned to this station in all following frames as long as the station has data to send

competition for this slots starts again as soon as the slot was empty in the last frame

frame1

frame2

frame3

frame4

frame5

1 2 3 4 5 6 7 8 time-slot

collision at reservation attempts

A C D A B A F

A C A B A

A B A F

A B A F D

A C E E B A F Dt

ACDABA-F

ACDABA-F

AC-ABAF-

A---BAFD

ACEEBAFD

reservation

Page 31: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Access method DAMA: Reservation-TDMA

Reservation Time Division Multiple Access every frame consists of N mini-slots and x data-slots every station has its own mini-slot and can reserve

up to k data-slots using this mini-slot (i.e. x = N * k). other stations can send data in unused data-slots

according to a round-robin sending scheme (best-effort traffic)

N mini-slots N * k data-slots

reservationsfor data-slots

other stations can use free data-slotsbased on a round-robin scheme

e.g. N=6, k=2

Page 32: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

MACA - collision avoidance

MACA (Multiple Access with Collision Avoidance) uses short signaling packets for collision avoidance RTS (request to send): a sender request the right to send

from a receiver with a short RTS packet before it sends a data packet

CTS (clear to send): the receiver grants the right to send as soon as it is ready to receive

Signaling packets contain sender address receiver address packet size

Variants of this method can be found in IEEE802.11 as DFWMAC (Distributed Foundation Wireless MAC)

Page 33: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

MACA examples

MACA avoids the problem of hidden terminals A and C want to

send to B A sends RTS first C waits after receiving

CTS from B

MACA avoids the problem of exposed terminals B wants to send to A, C

to another terminal now C does not have

to wait for it cannot receive CTS from A

A B C

RTS

CTSCTS

A B C

RTS

CTS

RTS

Page 34: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

MACA variant: DFWMAC in IEEE802.11

idle

wait for the right to send

wait for ACK

sender receiver

packet ready to send; RTS

time-out; RTS

CTS; data

ACK

RxBusy

idle

wait fordata

RTS; RxBusy

RTS; CTS

data; ACK

time-out data; NAK

ACK: positive acknowledgementNAK: negative acknowledgement

RxBusy: receiver busy

time-out NAK;RTS

Page 35: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Polling mechanisms

If one terminal can be heard by all others, this “central” terminal (a.k.a. base station) can poll all other terminals according to a certain scheme now all schemes known from fixed networks can be

used (typical mainframe - terminal scenario) Example: Randomly Addressed Polling

base station signals readiness to all mobile terminals terminals ready to send can now transmit a random

number without collision with the help of CDMA or FDMA (the random number can be seen as dynamic address)

the base station now chooses one address for polling from the list of all random numbers (collision if two terminals choose the same address)

the base station acknowledges correct packets and continues polling the next terminal

this cycle starts again after polling all terminals of the list

Page 36: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

ISMA (Inhibit Sense Multiple Access)

Current state of the medium is signaled via a “busy tone” the base station signals on the downlink (base station to

terminals) if the medium is free or not terminals must not send if the medium is busy terminals can access the medium as soon as the busy tone

stops the base station signals collisions and successful

transmissions via the busy tone and acknowledgements, respectively (media access is not coordinated within this approach)

mechanism used, e.g., for CDPD (USA, integrated into AMPS)

Page 37: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

Access method CDMA

CDMA (Code Division Multiple Access) all terminals send on the same frequency probably at the same

time and can use the whole bandwidth of the transmission channel

each sender has a unique random number, the sender XORs the signal with this random number

the receiver can “tune” into this signal if it knows the pseudo random number, tuning is done via a correlation function

Disadvantages: higher complexity of a receiver (receiver cannot just listen into the

medium and start receiving if there is a signal) all signals should have the same strength at a receiver

Advantages: all terminals can use the same frequency, no planning needed huge code space (e.g. 232) compared to frequency space interferences (e.g. white noise) is not coded forward error correction and encryption can be easily integrated

Page 38: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

38

IEEE 802.11 Requirements

Design for small coverage (e.g. office, home)

Low/no mobility High data-rate applications Ability to integrate real time

applications and non-real-time applications

Use un-licensed spectrum

Page 39: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

39

802.11: Infrastructure Mode

Architecture similar to cellular networks station (STA)

• terminal with access mechanisms to the wireless medium and radio contact to the access point

access point (AP)• station integrated into the

wireless LAN and the distribution system

basic service set (BSS)• group of stations using the same

AP portal

• bridge to other (wired) networks distribution system

• interconnection network to form one logical network (EES: Extended Service Set) based on several BSS

Distribution System

Portal

802.x LAN

Access Point

802.11 LAN

BSS2

802.11 LAN

BSS1

Access Point

STA1

STA2 STA3

ESS

Page 40: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

40

IEEE 802.11 Physical Layer

Family of IEEE 802.11 standards: unlicensed frequency spectrum: 900Mhz, 2.4Ghz, 5.1Ghz,

5.7Ghz

and 802.11b/g 802.11a

300 MHz

5.15-5.35 GHz

5.725-5.825 GHz

Page 41: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

41

802.11a Physical Channels

5150 [MHz]5180 53505200

36 44

center frequency = 5000 + 5*channel number [MHz]

channel#40 48 52 56 60 64

149 153 157 161

5220 5240 5260 5280 5300 5320

5725 [MHz]5745 58255765

channel#

5785 5805

Page 42: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

42

The IEEE 802.11 Family

Protocol

Release Data

Freq. Rate (typical)

Rate (max)

Range (indoor)

Legacy 1997 2.4 GHz 1 Mbps 2Mbps ?

802.11a

1999 5 GHz 25 Mbps 54 Mbps

~30 m

802.11b

1999 2.4 GHz 6.5 Mbps 11 Mbps

~30 m

802.11g

2003 2.4 GHz 25 Mbps 54 Mbps

~30 m

802.11n

2008 2.4/5 GHz

200 Mbps

540 Mbps

~50 m

Page 43: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

43

802.11 - MAC Layer

Traffic services

Asynchronous Data Service (mandatory)• exchange of data packets based on “best-effort”• support of broadcast and multicast

Time-Bounded Service (optional)• exchange of bounded delay service

Page 44: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

44

802.11 MAC Layer: Access Methods DFWMAC-DCF CSMA/CA (mandatory)

collision avoidance via randomized “back-off“ ACK packet for acknowledgements

DFWMAC-DCF w/ RTS/CTS (optional) additional virtual “carrier sensing: to avoid

hidden terminal problem

DFWMAC- PCF (optional) access point polls terminals according to a

list

Page 45: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

45

802.11 CSMA/CA

CSMA: Listen before transmit Collision avoidance

when transmitting a packet, choose a backoff interval in the range [0, CW]

• CW is contention window

Count down the backoff interval when medium is idle count-down is suspended if medium becomes

busy Transmit when backoff interval reaches 0

Page 46: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

46

802.11 Backoff

IEEE 802.11 contention window CW is adapted dynamically depending on collision occurrence after each collision, CW is doubled thus CW varies from CWmin to CWmax

802.11b 802.11a 802.11g

aSlotTime 20 usec 9 usec 20 usec (mixed);

9 usec(g-only)

aCWmin 31 slots 15 slots 15 slots

Page 47: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

47

802.11 – RTS/CTS + ACK

Sender sends RTS with NAV (Network allocation Vector, i.e. reservation parameter that determines amount of time the data packet needs the medium)

Receiver acknowledges via CTS (if ready to receive) CTS reserves channel for sender, notifying possibly hidden stations

Sender can now send data at once, acknowledgement via ACK Other stations store NAV distributed via RTS and CTS

t

SIFS

DIFS

data

ACK

defer access

otherstations

receiver

senderdata

DIFS

new contention

RTS

CTSSIFS SIFS

NAV (RTS)NAV (CTS)

Page 48: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

48

802.11 – Inter Frame Spacing Defined different inter frame spacing SIFS (Short Inter Frame Spacing); 10 us in 802.11b

highest priority, for ACK, CTS, polling response PIFS (PCF IFS); 30 us in 802.11b

medium priority, for time-bounded service using PCF DIFS (DCF, Distributed Coordination Function IFS); 50 us in

802.11b lowest priority, for asynchronous data service

direct access if medium is free DIFS

t

medium busy SIFSPIFS

DIFSDIFS

next framecontention

Page 49: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

49

802.11b 802.11a 802.11g

aSIFSTime 10 usec 16 usec 10 usec

aSlotTime 20 usec 9 usec 20 usec (mixed);9 usec (g

only)

aDIFTime (2xSlot+SIFS)

50 usec 34 usec 50 usec; 28 usec

802.11 – Inter Frame Spacing

Page 50: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

50

802.11: PCF for Polling (Infrastructure Mode)

tNAV

polledwirelessstations

point coordinator

NAV

PIFSD

USIFS

SIFSD

contentionperiod

contention free periodmediumbusy

D: downstream poll, or data from point coordinatorU: data from polled wireless station

Page 51: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

802.11b Frame Format

51

Sync SFD PLCP header CRC

2

Preamble (192 usec; or optional 96 short version) - Sync: alternating 0s and 1s (DSSS 128 bits) - SFD: Start Frame delimiter: 0000 1100 1011 1101

PLCH (Phsical Layer Convergence Procedure) Header - payload length - signaling field: the rate info. - CRC: 16 bit protection of header

MAC Data

preamble

Page 52: Link Layer; Media Access Control Lec 03 07/03/2010 ECOM 6320

52

802.11 – MAC Data Format

Types control frames, management frames, data frames

Sequence numbers important against duplicated frames due to lost ACKs

Addresses receiver, transmitter (physical), BSS identifier, sender (logical)

Miscellaneous sending time, checksum, frame control, data

FrameControl

Duration/ID

Address1

Address2

Address3

Sequencenumber

Address4

Data CRC

2 2 6 6 6 62 40-2312bytes

Protocolversion

Type SubtypeToDS

MoreFrag

RetryPowerMgmt

MoreData

WEP

2 2 4 1

FromDS

1

Order

bits 1 1 1 1 1 1