Lect 7 Ccs 312 CCT 306
Lect 7 Ccs 312 CCT 306
• Physical Layer:
– The wireless NIC takes frames of data from the link layer, scrambles the data in a
predetermined way, then uses the modified data stream to modulate a radio carrier signal.
infrastructure
network
access point
application application
TCP TCP
IP IP
LLC LLC LLC
802.11 MAC 802.11 MAC 802.3 MAC 802.3 MAC
802.11 PHY 802.11 PHY 802.3 PHY 802.3 PHY
Comparison: Infrastructure vs. ad-hoc networks
infrastructure
network
AP: Access Point
AP
AP wired network
AP
ad-hoc network
WLAN Architecture
802.11 frames
exchanges
802.3 (Ethernet)
frames exchanged
• Designed for limited area
• AP’s (Access Points) set to specific channel
• Broadcast beacon messages with SSID (Service Set Identifier) and MAC
Address periodically
• Hosts scan all the channels to discover the AP’s
– Host associates with AP (actively or passively)
Elements of a Wireless Network
Wireless Hosts
laptop, PDA, IP phone
run applications
may be stationary (non-
mobile) or mobile
network wireless does not always
infrastructure mean mobility
Elements of a Wireless Network
Base Station
typically connected to
wired network
relay - responsible for
sending packets between
wired network and
network wireless host(s) in its
infrastructure “area”
e.g., 802.11 Access
Points
Elements of a Wireless Network
Wireless Link
typically used to
connect mobile(s) to
base station
also can be used as a
backbone link
network multiple access
infrastructure protocol coordinates
link access
various data rates,
transmission distance
Infrastructure WLAN
Wireless host communicates with a base station.
Base station = access point (AP)
Basic Service Set (BSS) (similar to a “cell”) contains:
Wireless hosts.
An access point (AP), the base station, typically connected to a DS
Each BSS has a unique ID (BSSID)
BSS’s can be combined using a backbone Distribution System (DS) to form
an Extended Service Set (ESS), which appears as a single logical LAN.
ESS DS
CS457/546a
Ad Hoc or Infrastructure-less WLAN
• No AP (i.e., base station).
• Wireless hosts communicate with each other.
– To get packet from wireless host A to B may
need to route through wireless hosts X,Y,Z.
• Applications:
– “Laptop” meeting in conference room, car.
– Interconnection of “personal” devices.
• IETF MANET
(Mobile Ad hoc Networks)
working group.
Service Set Identifier (SSID)
• The SSID is used by WLAN as a network name.
– Unique
– Case sensitive
– Alphanumeric value
– 2-32 characters
• The SSID is used for
– Segmenting networks
– Rudimentary security measure
– Joining a network.
• The SSID is used in:
– Beacons
– Probe Requests
– Probe Responses, etc.
WLAN Association Service
• Before the distribution service can deliver data to or
accept data from a wireless station, that station must
first be associated.
– It must be registered with an AP in a BSS, so that its identity
and location is known to the network.
• Association service:
– Establishes an initial association between a wireless station
and an AP.
• Reassociation service:
– Enables transfer of association from one AP to another,
allowing a wireless station to move from one BSS to another.
• Disassociation service:
– Association termination notice from a
wireless station or AP.
The Association Process
• Again, each host must associate with an AP
to be part of the wireless network.
– The host scans channels, listening for beacon
frames containing AP’s name (SSID) and MAC
address.
– It then selects the AP to associate with, based
on what it finds.
– It may perform authentication, depending on
the configuration of the AP and its network.
– Typically, the host will run DHCP to get an IP
address in AP’s subnet.
Associations: Passive/Active Scanning
BBS 1 BBS 2 BBS 1 BBS 2
AP 1 AP 2 AP 1 1 AP 2
1 1 2 2
2 3
3 4
H1 H1
200 802.11n
Station Management
LLC
DLC
PHY Management
PMD
802.11 - Physical layer (legacy)
• 3 versions: 2 radio (typ. 2.4 GHz), 1 IR (Infra Red)
– data rates 1 or 2 Mbit/s
• FHSS (Frequency Hopping Spread Spectrum)
– spreading, despreading, signal strength, typ. 1 Mbit/s
– min. 2.5 frequency hops/s (USA), two-level GFSK modulation
• DSSS (Direct Sequence Spread Spectrum)
– 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
• Infrared
– 850-950 nm, diffuse light, typ. 10 m range
– carrier detection, energy detection, synchronization
2.4-GHz Channel Use
• WLAN clients have the ability to shift data rates while moving
• This rate shifting happens without losing the connection and without any interaction
from the user.
• Rate shifting also happens on a transmission-by-transmission basis; therefore, the
access point has the ability to support multiple clients at multiple speeds depending
upon the location of each client.
• This approach provides the highest total throughput within the wireless cell.
802.11g
• 802.11g is a high-speed extension to 802.11b
– Compatible with 802.11b
– High speed up to 54 Mbps
– 2.4 GHz (vs. 802.11a, 5 GHz)
– Using ODFM for backward compatibility
– Adaptive Rate Shifting
• Advantages:
– Provides higher speeds and higher capacity requirements for
applications
• Wireless Public Access
– Compatible with existing 802.11b standard
– Leverages Worldwide spectrum availability
in 2.4 GHz
– Likely to be less costly than 5 GHz alternatives
– Provides easy migration for current users of 802.11b WLANs
• Delivers backward support for existing 802.11b products
– Provides path to even higher speeds in the future
WLAN: IEEE 802.11a
• Data rate • Connection set-up time
– 6, 9, 12, 18, 24, 36, 48, 54 Mbit/s, – Connectionless/always on
depending on SNR
– User throughput (1500 byte packets): 5.3
• Quality of Service
(6), 18 (24), 24 (36), 32 (54) – Typ. best effort, no guarantees (same as
– 6, 12, 24 Mbit/s mandatory all 802.11 products)
• Transmission range • Manageability
– 100m outdoor, 10m indoor – Limited (no automated key distribution,
• E.g., 54 Mbit/s up to 5 m, 48 up to 12 m, sym. Encryption)
36 up to 25 m, 24 up to 30m, 18 up to 40
m, 12 up to 60 m • Special Advantages/Disadvantages
• Frequency – Advantage: fits into 802.x standards, free
– Free 5.15-5.25, 5.25-5.35, 5.725-5.825 ISM-band, available, simple system, uses
GHz ISM-band less crowded 5 GHz band
• Security – Disadvantage: stronger shading due to
– Limited, WEP insecure, SSID higher frequency, no QoS
• Availability
– Some products, some vendors
Section Three
MEDIUM ACCESS
MAC Layers in 802.11
IEEE802.11 MAC
• Two mechanisms for the MAC sublayer: DCF and
PCF
– Distributed Coordination Function (DCF)
• Uses CSMA/CA to share channel in a “fair way”:
• Guarantees long-term channel access probability to be equal
among all hosts
– Point Coordination Function (PCF): Provides un-
contended access via arbitration by a Point Coordinator
which resides at the AP
• Guarantees a time-bounded service
• Cyclically polls all stations which are assigned to the network
and added to the PC polling table
• Assign a time slot to them in which they are exclusively
allowed to send data
• Resides in Aps
• Correction for reducing overhead for polling idle stations
• Embedded Round Robin: dynamic classification of stations as busy or clear
• Drawbacks: Higher bandwidth waste under normal load
DCF in 802.11
• The wireless 802.11 standard uses CSMA/CA or "collision
avoidance."
– The method is used because the wireless stations have no way
to detect collisions WHILE sending.
– Procedure:
• When a node receives a packet that is to be sent, it checks to be
sure the channel is clear (no other node is transmitting at the
time).
• If the channel is clear, then the packet is sent.
• If the channel is not clear, the node waits for a randomly chosen
period of time, and then checks again to see if the channel is clear.
– This period of time is called the backoff factor, and is counted down by a
backoff counter.
• If the channel is clear when the backoff counter reaches zero, the
node transmits the packet.
• If the channel is not clear when the backoff counter reaches zero,
the backoff factor is set again, and the process is repeated.
• If no ACK is received, the message is re-transmitted.
• Typical sequence
DIFS
RTS data
sender
SIFS SIFS
CTS SIFS ACK
receiver
CSMA/CA Flowchart
Access Control
• With ACK messages
– For each frame sent
an ACK message is
required
– If no ACK message is
received,
retransmission is
done
• With the RTC/CTS
mechanism
Exponential Backoff
• If the medium is sensed to be free for a DCF inter-frame space (DIFS)
time interval the transmission will proceed
• If the medium is busy the node defers its transmission until the end of
the current transmission
– Then it will wait an additional DIFS interval and generate a random backoff delay
uniformly chosen in the range [0, W − 1] where W is called the backoff window or
contention window (CW)
• The backoff timer is decreased as long as the medium is sensed to be
idle for a DIFS, and frozen when a transmission is detected on the
medium, and resumed when the channel is detected as idle again for a
DIFS interval
• When the backoff reaches 0, the station transmits it packet
• For IEEE 802.11 time is slotted in a basic time unit which is the time
needed to detect the transmission of a packet from any other station
• The initial CW is set to W = 1, if two or more nodes decrease their
backoff timer to 0 at the same time a collision occur, at this situation the
CW is doubled for each retransmission until it reaches a maximum value
Contention Window Size
Initial Previous DIFS 31 slots
Attempt Frame Slot time:20s
1st retransmission
Previous DIFS 63 slots
Frame
2nd retransmission
Previous DIFS 127 slots
Frame
3rd retransmission
255 slots
Previous DIFS
Frame
• The contention window is reset to its minimum size when frames are
transmitted successfully, or the associated retry counter is reached and the
frame is discarded
Infrastructure mode:
Power Management
• Whenever a wireless node has noting to send or receive it should fall asleep: turn
off the MAC processor, the base-band processor, and RF amplifier to save energy
– Easy in an infrastructure wireless network
– APs responsible for timing synchronization (through beacons)