Sei sulla pagina 1di 67

MAC & PHYSICAL LAYER

Standar WLAN

SM241013 - Pengantar Sistem Telekomunikasi Semester genap 2006-2007

802.11 LAN architecture


wireless host communicates

Internet

AP BSS 1

hub, switch or router

AP

with base station base station = access point (AP) Basic Service Set (BSS) (aka cell) in infrastructure mode contains: wireless hosts access point (AP): base station ad hoc mode: hosts only

BSS 2

6: Wireless and Mobile Networks

6-3

IEEE 802.11: multiple access


avoid collisions: 2+ nodes transmitting at same time 802.11: CSMA - sense before transmitting
dont collide with ongoing transmission by other node

802.11: no collision detection!


difficult to receive (sense collisions) when transmitting due to weak received signals (fading) cant sense all collisions in any case: hidden terminal, fading goal: avoid collisions: CSMA/C(ollision)A(voidance)
A C B
As signal strength

C
Cs signal strength

space 6: Wireless and Mobile Networks 6-4

IEEE 802.11 MAC Protocol: CSMA/CA


802.11 sender 1 if sense channel idle for DIFS then
transmit entire frame (no CD) 2 if sense channel busy then start random backoff time timer counts down while channel idle transmit when timer expires if no ACK, increase random backoff interval, repeat 2
sender
DIFS

receiver

data

SIFS

802.11 receiver - if frame received OK


return ACK after SIFS (ACK needed due to hidden terminal problem)
6: Wireless and Mobile Networks

ACK

6-5

Avoiding collisions (more)


idea: allow sender to reserve channel rather than random access of
data frames: avoid collisions of long data frames sender first transmits small request-to-send (RTS) packets to BS using CSMA RTSs may still collide with each other (but theyre short) BS broadcasts clear-to-send CTS in response to RTS CTS heard by all nodes sender transmits data frame other stations defer transmissions
avoid data frame collisions completely using small reservation packets!

6: Wireless and Mobile Networks

6-6

Collision Avoidance: RTS-CTS exchange


A AP B

reservation collision

DATA (A)

defer

time

6: Wireless and Mobile Networks

6-7

802.11 frame: addressing


2 2 6 6 6 2
6

0 - 2312
payload

4
CRC

frame address address address duration control 1 2 3

seq address 4 control

Address 1: MAC address of wireless host or AP to receive this frame Address 2: MAC address of wireless host or AP transmitting this frame

Address 4: used only in ad hoc mode Address 3: MAC address of router interface to which AP is attached

6: Wireless and Mobile Networks

6-8

802.11 frame: addressing


Internet

H1

R1 router

AP

R1 MAC addr H1 MAC addr


dest. address source address

802.3 frame
AP MAC addr
address 1

H1 MAC addr R1 MAC addr


address 2 address 3

802.11 frame
6: Wireless and Mobile Networks 6-9

802.11 frame: more


duration of reserved transmission time (RTS/CTS) 2
frame control

frame seq # (for RDT) 6


address 4

2
duration

6
address 1

6
address 2

6
address 3

2
seq control

0 - 2312
payload

4
CRC

2
Protocol version

2
Type

4
Subtype

1
To AP

1
From AP

1
More frag

1
Retry

1
Power mgt

1
More data

1
WEP

1
Rsvd

frame type (RTS, CTS, ACK, data)


6: Wireless and Mobile Networks 6-10

802.11: mobility within same subnet


H1 remains in same IP subnet: IP address can remain same switch: which AP is associated with H1?
self-learning (Ch. 5): switch will see frame from H1 and remember which switch port can be used to reach H1
BBS 1 AP 1 AP 2 H1

router
hub or switch

BBS 2

6: Wireless and Mobile Networks

6-11

802.11: advanced capabilities


Rate Adaptation

Base station, mobile dynamically change transmission rate (physical layer modulation technique) as mobile moves, SNR varies
10-1 10-2 10-3

1. 2.

10-4 10-5 10-6 10-7 10 20

SNR decreases, BER increase as node moves away from base station When BER becomes too high, switch to lower transmission rate but with lower BER

BER

30

40

QAM256 (8 Mbps) QAM16 (4 Mbps) BPSK (1 Mbps) operating point

SNR(dB)

6: Wireless and Mobile Networks

6-12

802.11: advanced capabilities


Power Management node-to-AP: I am going to sleep until next beacon frame AP knows not to transmit frames to this node node wakes up before next beacon frame beacon frame: contains list of mobiles with AP-to-mobile frames waiting to be sent node will stay awake if AP-to-mobile frames to be sent; otherwise sleep again until next beacon frame

6: Wireless and Mobile Networks

6-13

IEEE 802.11 Media Access Control (MAC)

Carrier-sense multiple access protocol with collision avoidance (CSMA/CS)

DIFS: Distributed Inter-Frame Spacing SIFS: Short Inter-Frame Spacing ack: Acknowledgement

Figure 14.4 CSMA/CA flowchart

14.15

Figure 14.5 CSMA/CA and NAV

14.16

Figure 14.6 Example of repetition interval

14.17

Figure 14.7 Frame format

14.18

Table 14.1 Subfields in FC field

14.19

Figure 14.8 Control frames

14.20

Table 14.2 Values of subfields in control frames

14.21

Table 14.3 Addresses

14.22

Figure 14.9 Addressing mechanisms

14.23

Figure 14.10 Hidden station problem

14.24

Note
The CTS frame in CSMA/CA handshake can prevent collision from a hidden station.

14.25

Figure 14.11 Use of handshaking to prevent hidden station problem

14.26

Figure 14.12 Exposed station problem

14.27

Figure 14.13 Use of handshaking in exposed station problem

14.28

Table 14.4 Physical layers

14.29

Figure 14.14 Industrial, scientific, and medical (ISM) band

14.30

Figure 14.15 Physical layer of IEEE 802.11 FHSS

14.31

Figure 14.16 Physical layer of IEEE 802.11 DSSS

14.32

Figure 14.17 Physical layer of IEEE 802.11 infrared

14.33

Figure 14.18 Physical layer of IEEE 802.11b

14.34

Logical Link Control Layer (LLC)


Specified by ISO/IEC 8802-2 (ANSI/IEEE 802.2) purpose: exchange data between users across LAN using 802-based MAC controlled link provides addressing and data link control, independent of topology, medium, and chosen MAC access method Data to higher level protocols
Info: carries user data Supervisory: carries flow/error control Unnumbered: carries protocol control data

Source SAP

LLCs functionalities

LLCs protocol data unit (PDU) SAP: service address point

Logical Link Control Layer Services


A Unacknowledged connectionless service
no error or flow control - no ack-signal usage unicast (individual), multicast, broadcast addressing higher levels take care or reliability - thus fast for instance for TCP

B Connection oriented service


supports unicast only error and flow control for lost/damaged data packets by cyclic redundancy check (CRC)

C Acknowledged connectionless service


ack-signal used error and flow control by stop-and-wait ARQ faster setup than for B

A TCP/IP packet in 802.11


TPC/IP send data packet
Control header

LLC constructs PDU by adding a control header SAP (service access point)

MAC frame with new control fields

MAC lines up packets using carrier sense multiple access (CSMA) PHY layer transmits packet using a modulation method (DSSS, OFDM, IR, FHSS)

Traffic to the target BSS / ESS

*BDU: protocol data unit

IEEE standard 802.11


mobile terminal server

fixed terminal

infrastructure network
access point

application
TCP IP LLC LLC

application
TCP IP LLC

802.11 MAC
802.11 PHY

802.11 MAC 802.3 MAC


802.11 PHY 802.3 PHY

802.3 MAC
802.3 PHY

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.39

802.11 Layers and functions PLCP MAC


Physical Layer Convergence Protocol

access mechanisms, fragmentation, encryption

clear channel assessment signal (carrier sense)

MAC Management
synchronization, roaming, MIB, power management

PMD Physical Medium Dependent


modulation, coding

PHY Management
channel selection, MIB

Station Management
coordination of all management functions

DLC

LLC MAC PLCP MAC Management PHY Management

PMD

Winter 2001

ICS 243E - Ch 5 Wireless Lans

Station Management

PHY

5.40

802.11 - Physical layer


3 versions: 2 radio (typ. 2.4 GHz), 1 IR FHSS (Frequency Hopping Spread Spectrum) DSSS (Direct Sequence Spread Spectrum)
data rates 1 or 2 Mbit/s

spreading, despreading, signal strength, typ. 1 Mbit/s min. 2.5 frequency hops/s (USA), two-level GFSK modulation
DBPSK modulation for 1 Mbit/s (Differential Binary Phase Shift Keying), DQPSK for 2 Mbit/s (Differential Quadrature PSK) preamble and header of a frame is always transmitted with 1 Mbit/s, rest of transmission 1 or 2 Mbit/s chipping sequence: +1, -1, +1, +1, -1, +1, +1, +1, -1, -1, -1 (Barker code) max. radiated power 1 W (USA), 100 mW (EU), min. 1mW 850-950 nm, diffuse light, typ. 10 m range carrier detection, energy detection, synchonization

Infrared

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.41

Synchronization

FHSS PHY packet format

synch with 010101... pattern

SFD (Start Frame Delimiter)


0000110010111101 start pattern

PLW (PLCP_PDU Length Word)


length of payload incl. 32 bit CRC of payload, PLW < 4096

PSF (PLCP Signaling Field)


data of payload (1 or 2 Mbit/s)

HEC (Header Error Check)


CRC with x16+x12+x5+1
80 synchronization PLCP preamble
Winter 2001

16 SFD

12 PLW

4 PSF

16 HEC

variable payload

bits

PLCP header
ICS 243E - Ch 5 Wireless Lans 5.42

DSSS PHY packet format


Synchronization
synch., gain setting, energy detection, frequency offset compensation

SFD (Start Frame Delimiter)


1111001110100000

Signal
data rate of the payload (0A: 1 Mbit/s DBPSK; 14: 2 Mbit/s DQPSK)

Service
future use, 00: 802.11 compliant

Length
length of the payload

HEC (Header Error Check)


protection of signal, service and length, x16+x12+x5+1
128 synchronization PLCP preamble
Winter 2001

16 SFD

8 8 16 16 signal service length HEC PLCP header


ICS 243E - Ch 5 Wireless Lans

variable payload

bits

5.43

802.11 - MAC layer I - DFWMAC


Traffic services
Asynchronous Data Service (mandatory)
exchange of data packets based on best-effort support of broadcast and multicast

Time-Bounded Service (optional)


implemented using PCF (Point Coordination Function)

Access methods
DFWMAC-DCF CSMA/CA (mandatory)
collision avoidance via randomized back-off mechanism minimum distance between consecutive packets ACK packet for acknowledgements (not for broadcasts)

DFWMAC-DCF w/ RTS/CTS (optional)


Distributed Foundation Wireless MAC avoids hidden terminal problem

DFWMAC- PCF (optional)


access point polls terminals according to a list
Winter 2001 ICS 243E - Ch 5 Wireless Lans 5.44

802.11 MAC layer II Priorities


PIFS (PCF IFS)
highest priority, for ACK, CTS, polling response

defined through different inter frame spaces no guaranteed, hard priorities SIFS (Short Inter Frame Spacing)
medium priority, for time-bounded service using PCF

DIFS (DCF, Distributed Coordination Function IFS)


lowest priority, for asynchronous data service
DIFS PIFS SIFS

DIFS

medium busy

contention

next frame
t

direct access if medium is free DIFS


Winter 2001 ICS 243E - Ch 5 Wireless Lans

5.45

802.11 - CSMA/CA access method I contention window


DIFS medium busy direct access if medium is free DIFS DIFS (randomized back-off mechanism) next frame t slot time

station ready to send starts sensing the medium (Carrier Sense based on CCA, Clear Channel Assessment) if the medium is free for the duration of an Inter-Frame Space (IFS), the station can start sending (IFS depends on service type) if the medium is busy, the station has to wait for a free IFS, then the station must additionally wait a random back-off time (collision avoidance, multiple of slot-time) if another station occupies the medium during the back-off time of the station, the back-off timer stops (fairness)
Winter 2001 ICS 243E - Ch 5 Wireless Lans 5.46

802.11 - competing stations - simple version


DIFS station1 station2 station3 station4 station5 busy boe bor busy DIFS boe bor DIFS boe bor DIFS boe busy

boe busy

boe busy
boe busy

boe bor
boe bor t

medium not idle (frame, ack etc.)


packet arrival at MAC

boe elapsed backoff time bor residual backoff time


5.47

Winter 2001

ICS 243E - Ch 5 Wireless Lans

802.11 - CSMA/CA access method II


Sending unicast packets
station has to wait for DIFS before sending data receivers acknowledge at once (after waiting for SIFS) if the packet was received correctly (CRC) automatic retransmission of data packets in case of transmission errors
DIFS sender receiver other stations

data
SIFS ACK DIFS waiting time contention data t

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.48

802.11 DFWMAC Sending unicast packets


station can send RTS with reservation parameter after waiting for DIFS (reservation determines amount of time the data packet needs the medium) acknowledgement via CTS after SIFS by receiver (if ready to receive) sender can now send data at once, acknowledgement via ACK other stations store medium reservations distributed via RTS and CTS

DIFS

sender
receiver

RTS SIFS CTS SIFS

data SIFS ACK

other stations

NAV (RTS) NAV (CTS) defer access

DIFS contention

data
t

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.49

Fragmentation
DIFS
sender receiver RTS SIFS CTS SIFS frag1 SIFS ACK1 SIFS frag2 SIFS ACK2

NAV (RTS) NAV (CTS)


other stations NAV (frag1) NAV (ACK1)

DIFS contention

data t

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.50

DFWMAC-PCF I
t0 t1
medium busy PIFS point coordinator wireless stations stations NAV SuperFrame D1 SIFS SIFS D2 SIFS SIFS

U1
NAV

U2

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.51

DFWMAC-PCF II
t2 t3 D3 PIFS D4 SIFS U4 NAV contention free period SIFS CFend t4

point coordinator wireless stations stations NAV

contention t period

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.52

Types

802.11 - Frame format

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
bytes 2 2 6 6 6 2 6 Frame Duration Address Address Address Sequence Address Control ID 1 2 3 Control 4 version, type, fragmentation, security, ... 0-2312 Data 4 CRC

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.53

MAC address format


scenario ad-hoc network infrastructure network, from AP infrastructure network, to AP infrastructure network, within DS to DS from DS 0 0 0 1 1 1 0 1 address 1 address 2 address 3 address 4 DA DA BSSID RA SA BSSID SA TA BSSID SA DA DA SA

DS: Distribution System AP: Access Point DA: Destination Address SA: Source Address BSSID: Basic Service Set Identifier RA: Receiver Address TA: Transmitter Address

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.54

Synchronization

802.11 - MAC management

try to find a LAN, try to stay within a LAN timer etc.

Power management
sleep-mode without missing a message periodic sleep, frame buffering, traffic measurements

Association/Reassociation
integration into a LAN roaming, i.e. change networks by changing access points scanning, i.e. active search for a network

MIB - Management Information Base


managing, read, write
Winter 2001 ICS 243E - Ch 5 Wireless Lans 5.55

Synchronization using a Beacon (infrastructure)


beacon interval B busy busy B busy B beacon frame B busy t value of the timestamp B

Access Point medium

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.56

Synchronization using a Beacon (adhoc)


beacon interval

station1 station2 medium

B1 B2 busy busy busy B2 busy

B1

value of the timestamp

B beacon frame

t random delay

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.57

Power management
Idea: switch the transceiver off if not needed States of a station: sleep and awake Timing Synchronization Function (TSF)
stations wake up at the same time

Infrastructure
Traffic Indication Map (TIM)
list of unicast receivers transmitted by AP

Delivery Traffic Indication Map (DTIM)


list of broadcast/multicast receivers transmitted by AP

Ad-hoc
Ad-hoc Traffic Indication Map (ATIM)
announcement of receivers by stations buffering frames more complicated - no central AP collision of ATIMs possible (scalability?)

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.58

Power saving with wake-up patterns (infrastructure)


TIM interval D B busy busy DTIM interval T busy p T TIM D DTIM awake d t T d busy D B access point medium station

B broadcast/multicast p PS poll

d data transmission to/from the station

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.59

Power saving with wake-up patterns (ad-hoc) ATIM


window B1 B2 B2 beacon interval A a D d B1 station1 station2

B beacon frame awake

random delay

t A transmit ATIM D transmit data

a acknowledge ATIM d acknowledge data

Winter 2001

ICS 243E - Ch 5 Wireless Lans

5.60

Spread Spectrum
Unlicensed usage (ISM band - 915 MHz, 2.4 GHz, 5.8 GHz)) No line of sight requirement (indoor) High link reliability

Built-in transmission
security Two techniques used:
Direct Sequence Frequency Hopping

Multiple Access Methods


TIME

Each user assigned a different frequency like ordinary radio

TIME

User 3 User 2
FREQUENCY

Multiple users share the same frequency channel sequentially Time slot sequence repeats over and over
FREQUENCY

FDMA

User 1

TDMA
CODE TIME

Channel is spread over wide frequency band User 3 User 2 User 1


FREQUENCY

Many users share the same frequency band at the same time Each user is assigned a unique code to identify and separate them

CDMA also known as Spread Spectrum

Spread Spectrum Concept

Frequency Hopping Spread Spectrum

A narrowband carrier is shifted in discrete increments of frequency The frequency remains constant for a specified time duration, then signal changes or hops to a different frequency

Direct Sequence Spread Spectrum (DSSS

Each bit is represented by multiple bits using the spreading code Spreading code spreads signal across wider frequency band Performance similar to FHSS

Spread Spectrum Direct Sequence Transmitter


Digital Signal (Bits) Source and Channel Coding Multiplier X Frequency Spectrum f Code Bits (Chips) Code Generator Spread Frequency Spectrum RF Modulator

Spreading: Information signal (i.e. a symbol) is multiplied by a unique, high rate digital code before transmission. Code bits are called Chips. Sequence is called Barker Code

Potrebbero piacerti anche