wireless networks: wifi
Post on 27-Jan-2022
9 Views
Preview:
TRANSCRIPT
1
Wireless Networks: WiFi Prof. Rami Langar LIGM/UPEM Rami.Langar@u-pem.fr http://perso.u-pem.fr/~langar
2
What is Wireless Networking? o The use of infra-red (IR) or radio frequency (RF) signals to share
information and resources between devices o Promises anytime, anywhere connectivity
n Laptops, PDAs, Internet-enabled phone n To make the connection of itinerant users easy, specially in collective spaces n Used to have a temporary connection (conference, meetings)
o Wireless is not intended to fully replace the hardwired cable (reliability, flow) : Not used to connect servers!
o Two important (but different) challenges n communication over wireless link n handling mobile user who changes point of attachment to network
3
History of Wireless communications o 1958 : Analog transmission systems were developed ( Ex in Germany:
160MHz for a mobile station, No handover 1971 : 11 000 clients )
o 1982 : Beginning of the GSM specification (mobile telephone systems with roaming)
o 1983 : Beginning of the American AMPS system (Advanced Mobile Phone System, analog)
o 1984: European norm (standard) CT-1 for home wireless phones o 1991 DECT specification
n Digital European Cordless Telephone (today: Digital Enhanced Cordless Telecommunications)
o 1996 HiperLAN (High Performance Radio Local Area Network) n ETSI, Type 1 standardisation : Bands 5.15 - 5.30GHz, 23.5Mbit/s
o 1997 Wireless LAN – IEEE 802.11 n IEEE norm, 2.4 - 2.5GHz and Infra Red at 2Mbit/s
4
o 1998 Specification of the GSM successors n UMTS (Universal Mobile Telecommunication System) as an European
proposition for the IMT-2000 o 1999 Standardisation of the new wireless LANs
n IEEE standard 802.11b, 2.4-2.5GHz, 11Mbit/s n Bluetooth for pico cells, 2.4Ghz, <1Mbit/s n Decision regarding the IMT-2000
o 1999 beginning of WAP (Wireless Application Protocol) and i-mode in France n First step towards a unified mobile communication system
o 2000 GSM higher data rates n First trials in GPRS up to 50 Kbit/s (packet oriented) n UMTS
o 2001 beginning of 3G systems: Cdma2000 in Korea, UMTS in Europe, Foma (almost UMTS) in Japan
History of Wireless communications
5
Reference Model o Influence of the mobile communications on the layer
hierarchical model n Application layer: localization service, new applications,
multimedia. n Transport layer: flow congestion control. n Network Layer : quality of service, addressing, routing,
handover n Link Layer : authentication, media access, multiplexing n Physical Layer: encryption, modulation, interferences,
attenuation. o FHSS (Frequency Hopping Spread Spectrum) o DSSS (Direct Sequence Spread Spectrum) o IR (Infrarouge) o OFDM (Orthogonal Frequency Division Multiplexing).
6
Elements of a wireless network
network infrastructure
wireless hosts o laptop, PDA, IP phone o run applications o may be stationary (non-
mobile) or mobile n wireless does not
always mean mobility
7
Elements of a wireless network
network infrastructure
base station o typically connected to
wired network o relay - responsible for
sending packets between wired network and wireless host(s) in its “area” n e.g., cell towers
802.11 access points
8
Elements of a wireless network
network infrastructure
wireless link o typically used to
connect mobile(s) to base station
o also used as backbone link
o multiple access protocol coordinates link access
o various data rates, transmission distance
9
Wireless Link Characteristics Differences from wired link ….
n Decreasing signal strength: radio signal attenuates as it propagates through matter (path loss)
n Interference from other sources: standardized wireless network frequencies (e.g., 2.4 GHz) shared by other devices (e.g., microwave ovens use 2.43 GHz); cellular phones interfere as well
n Multi-path propagation: radio signal reflects off objects ground, arriving at destination at slightly different times
…. make communication across wireless link much more “difficult”
10
Wireless networks types
11
Two Popular 2.4 GHz, ISM band (Industrial, Scientific, Medicine), Standards :
o IEEE 802.11 n Fast (.11b) n High Power n Long range n Ethernet replacement n No exploitation license n Easily Available
o Apple Airport, iBook o Cisco Aironet 350
o Bluetooth (802.15) n Slow n Low Power n Short range n Flexible n Cable replacement n No exploitation
license
12
802.11 Normalization o « Wi-Fi » an interoperability label delivered by the Wi-Fi
alliance : group of constructors that publish lists of certified products (http://www.wi-fi.org/)
o 802.11 (1997) : up to 2 Mb/s o 802.11 (1999) : Wireless LAN Medium Access Control (MAC)
and Physical Layer (PHY) Specifications o 802.11b (1999) : up to 11 Mb/s in the 2,4 GHz band o 802.11a (1999) : up to 54 Mb/s in the 5 GHz band o 802.11g (2003) : up to 54 Mb/s in the 2,4 GHz band
n compatible with 802.11b
o 802.11f (2003) : Inter Access Point Protocol (IAPP) Mobility management
13
802.11 Normalization o 802.11h (2003) : for the use of 802.11a in Europe: dynamic
channel selection and transmission power management o 802.11i (2004) : security o 802.11e (2005) : quality of service o 802.11r (2008) : fast transition between access points by
redefining the security key negotiation protocol o 802.11n (2009) : rate up to 600 Mb/s in 2,4 and 5 GHz bands o 802.11ac (2012) : rate 2 Gb/s o 802.11af (2014) : rate 10 Gb/s o 802.11ah (2015) : long distance o All use CSMA/CA for multiple access o All have base-station and ad-hoc network versions
14
Infrastructure Mode (Access Point)
network infrastructure
infrastructure mode o base station connects
mobiles into wired network via a Distributed System (e.g. Ethernet).
o handoff: mobile changes base station providing connection into wired network
15
Ad hoc Mode Ad hoc mode o no base stations o nodes can only transmit
to other nodes within link coverage
o nodes organize themselves into a network: n Need for a routing
protocol within the nodes to route among themselves
16
802.11 LAN architecture o wireless host communicates
with base station n base station = access point
(AP) send beacon frame periodically including the AP’s Service Set Identifier (BSSID)
o Basic Service Set (BSS) in infrastructure mode contains: n wireless hosts n access point (AP): base
station n ad hoc mode: hosts only
BSS 1
BSS 2
Internet
hub, switch or router AP
AP
ESS: Extended Service Set
17
o 802.11b has 11 channels. The 2.4 GHz spectrum is divided into 11 channels at different frequencies. n Channels 1, 6, and 11 are
orthogonal n AP admin chooses frequency
for AP n interference possible: channel
can be same as that chosen by neighboring AP!
o Each AP coverage area is called a “cell”
o Wireless nodes can roam between cells
AP
AP
AP AP
AP AP
Channel 1
Channel 6
Channel 1 Channel 11
Channel 6
Channel 1
o host: must associate with an AP n scans channels, listening for beacon frames containing AP’s MAC@ (BSSID) n selects AP to associate with (may perform authentication) n will typically run DHCP to get IP address in AP’s subnet
IEEE 802.11: Channels, association
RTEL 18
IEEE 802.11: data rate Outdoor Range (m) Indoor Range (m)
1 Mbps DSSS 550 50 2 Mbps DSSS 388 40 5.5 Mbps CCK 235 30 11 Mbps CCK 166 24
5.5 Mbps PBCC 351 38 11 Mbps PBCC 248 31 6 Mbps OFDM 300 35 12 Mbps OFDM 211 28 18 Mbps OFDM 155 23 24 Mbps OFDM 103 18 36 Mbps OFDM 72 15 48 Mbps OFDM 45 11 54 Mbps OFDM 36 10
19
IEEE 802.11: multiple access
o Medium Access Control divided into two parts n Distributed Coordination Function (DCF)
o Symmetric, all stations (including APs) behave the same way o Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) o Stations contend for access to medium
n Optional Point Coordination Function (PCF) o Built on top of DCF o Allows periods of contention-free operation interleaved with periods
of contention o One station (typically AP) polls others to control who transmits o Permits more efficient operation under heavy loads
20
IEEE 802.11: MAC protocol design o Different stations perceive events differently
n Include explicit information about MAC state in transmitted frames o E.g., duration of the next frame to be transmitted o Beacon frames inform stations about operational parameters
o 802.11: CSMA - sense before transmitting n don’t collide with ongoing transmission by other node
o 802.11: no collision detection! n difficult to receive (sense collisions) when transmitting due to weak
received signals (fading) n If a collision happens, the station continues to transmit the whole frame:
network performance loss n can’t sense all collisions in any case: hidden terminal, fading n goal: avoid collisions: CSMA/C(ollision)A(voidance) n Stations choose a random backoff interval before colliding! (Compare to
CSMA/CD: backoff only after colliding)
21
o Reliable data delivery using a frame exchange protocols at the MAC level: use of ACK frames n ACK sent by the destination station to confirm the reception of the data
o Avoids collisions using IFS (Inter-Frame Spacing) n Time interval between the transmission of 2 frames n IFS Intervals = periods of inactivity on the transmission medium n There are several types of IFS n 3 Timer types:
o SIFS: used to separate transmissions in the same dialog (e.g., fragment – ACK). Value: 28 µs.
o PIFS: used by the AP to gain access to the medium before any other station. This value is SIFS + TimeSlot = 78 µs.
o DIFS: Inter-frame space used when the station wants to start a new transmission. Value: PIFS + TimeSlot = 128 µs.
IEEE 802.11: Basic DCF MAC Protocol
22
Medium Listening o Terminal of a same BSS can listen to the activity of all the
stations in that same BSS thanks to the other stations’ signal relative power.
o When a station sends a frame n The remaining stations update their NAV (Network Allocation
Vector) timer n NAV allows to delay all scheduled transmissions n NAV is calculated based on the information of the duration field in
the sent frames.
23
IEEE 802.11 DCF MAC Protocol: CSMA/CA 802.11 sender 1 if sense channel idle for DIFS then
transmit entire frame 2 if sense channel busy then
Listen until it is free (thanks to NAV) When medium free for DIFS, start random backoff time Timer counts down while channel idle Transmit when timer expires
3 if no ACK, increase random backoff interval, repeat 2 802.11 receiver - if frame received OK (verification of the frame CRC) return ACK after SIFS (ACK needed due to hidden
terminal problem) - if the ACK is not detected, or DATA is corrupted collision is happened, retransmission of the frame
sender receiver
DIFS
data
SIFS
ACK
24
Backoff algorithm o Allow to solve the medium accessing problem when several stations intend to
transmit data at the same time o Time is divided into TimeSlots (TS = 50 µs). It is used to define the IFS
intervals. o Principle:
n Initially, a station calculates the timer value = timer backoff, included between 0 and 7 (i.e., a certain number of timeslots)
n When the medium is free, stations decrement their timers until the medium is busy or that the timer reaches 0
n If the timer did not reach 0 and that the medium is busy again, the station blocs (freezes) the timer
n When the timer reaches 0, the station transmits its frame n If 2 or several stations reach 0 at the same time, a collision happens and each station
has to regenerate a new timer, included between 0 and 15 n For each retransmission attempt, the timer increases as follows : [22+i * randf()] * TS
o i corresponds to the number of successive attempts, randf() is a uniform random variable that returns values between 0 and 1.
o The size of the Contention Window (CW) starts with CWmin = 8 and is doubled with each collision up to CWmax = 256.
25
25
Backoff algorithm
26
Backoff algorithm o Stations have the same probability to access the
medium because each station, after each retransmission, has to reuse the same algorithm
o Disadvantage: no guarantee on the minimum delay n Make the integration of real time applications, such as voice
and video, more complicated
27
Avoiding collisions (more) idea: allow sender to “reserve” channel rather than random access of data frames:
avoid collisions of long data frames o sender first transmits small request-to-send (RTS) packets to base station (BS)
using CSMA n RTSs may still collide with each other (but they’re short)
o BS broadcasts clear-to-send CTS in response to RTS o CTS heard by all nodes
n sender transmits data frame n other stations defer transmissions by reading the CTS duration field and
update their NAV
Avoid data frame collisions completely using small reservation packets!
28
Hidden station problem
AP A B
29
Hidden station problem solving: RTS-CTS exchange
AP A B
time
RTS(A) RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
30
Collision Avoidance: reservation mechanism
Waiting time
31
Collision Avoidance: fragmentation o Fragmenting data can decrease the damage caused by transfer errors o First fragment: normal reservation with RTS/CTS o Fragments and ACKs (except the last) contain reservation durations
32
frame control duration address
1 address
2 address
4 address
3 payload CRC
2 2 6 6 6 2 6 0 - 2312 4 seq
control
Type From DS Subtype To
DS More frag WEP More
data Power
mgt Retry Rsvd Protocol version
2 2 4 1 1 1 1 1 1 1 1
802.11 Frame structure
Type Value
Type Description
Subtype Value
Subtype Description
01 Control 1011 RTS
01 Control 1100 CTS
01 Control 1101 ACK
10 Data 0000 DATA
Current version: Value = 0
frame type (RTS, CTS, ACK, data)
0 = last frag. of packet 1 = another frame follows immediately
33
frame control duration address
1 address
2 address
4 address
3 payload CRC
2 2 6 6 6 2 6 0 - 2312 4 seq
control
802.11 Frame structure
@2: MAC address of wireless host or AP transmitting this frame
@ 3: Remaining missing addresses
@ 4: used only in Wireless DS (mesh mode)
Duration of reserved transmission time in microsecs. - data w/ More Frags = 1: duration of next frag. - data w/ More Frags = 0: duration of ACK + SIFS.
frame seq # used for Fragmentation/Reassembly
@1: MAC address of wireless host or AP to receive this frame
To DS From DS Address 1 Address 2 Address 3 Address 4 0 0 Dest Src IBSSID N/A 0 1 Dest BSSID Src N/A 1 0 BSSID Src Dest N/A 1 1 Receiver Xmitter Dest Src
34
Internet router
AP
H1 R1
AP MAC addr H1 MAC addr R1 MAC addr address 1 address 2 address 3
802.11 frame
R1 MAC addr AP MAC addr dest. address source address
802.3 frame
802.11 Frame: Example of address usage
35
802.11 Frame: Example of address usage
36
RTS Frame
o Before sending a long data frame, send RTS n "long" = length greater than RTSThreshold parameter n RTSThreshold configurable per-station, range 0-2344+
o RA: Intended immediate recipient o TA: The station transmitting this frame o Duration: (in µs) the time required to transmit the next (data) frame + CTS
frame + ACK frame + 3 SIFSs
Frame Control Duration RA TA CRC
MAC Header
2 2 6 6 4 Octets
37
CTS Frame
o Recipient of RTS responds immediately with CTS. Upon receiving CTS, immediately transmit Data.
o RA: The TA field of the RTS message o Duration: (in µs) the duration value of the previous RTS frame – CTS time –
SIFS (i.e., data frame + ACK + 2 SIFS).
Frame Control Duration RA CRC
MAC Header
2 2 6 4 Octets
38
ACK Frame
o Upon receiving a frame addressed to it with a correct FCS, a station immediately transmits an ACK frame (after SIFS).
o If a station fails to receive a correct ACK frame within a timeout, it retransmits (setting retry flag).
o RA: is copied from the Address-2 field (respectively Address-3 field) of the previous frame (data frame) in the case of ad-hoc mode (respectively infrastructure mode).
o Duration: set to 0 if More Fragment bit was 0, otherwise the duration of the previous frame – ACK time – SIFS.
Frame Control Duration RA CRC
MAC Header
2 2 6 4 Octets
top related