Wireless NetworksWireless Networks
802.11 Standard802.11 Standard
Wireless Networks (+)Wireless Networks (+)
• Mobility• Installation (easiness, time, cost)• Flexibility• Convenience• Productivity• Geographic expansion (+/-)• Machine increase (+/-)• Access (+/-)
Wireless Networks (-)Wireless Networks (-)
• Reach• Aditional cost of APs
• Interference• Noise of external devices, microwaves, wireless phones,
bluetooth
• Speed• Slow compared to wired networks (+/-)• Congestion
• Power compsumtion• More distance → Mor power• Laptops
• Security
Security in wireless networksSecurity in wireless networks
• Easy of access– One of the advantages– Main disadvantage security wise
• Wardriving– External spies– Bandwidth consumption
• Rogue Access Points– Unauthorized– Not monitored by administrators
AlohaNetAlohaNet
• University of Hawaii• June of 1971• Norman Abramson• 7 campus in 4 islands
– Access to the mainframe– IBM 360/65 con 750 Kbytes de RAM
• UHF radio channels– 100 Khz channels– 407.350 MHz. and 413.475 MHz.
The Aloha SystemThe Aloha System
MENEHUNEMENEHUNE
• Hawaiian version of the IMP– Interface Message Processor
• English– Imp: little devil, daemon
• Hawaii– Menehune: Legendary dwarf
Terminal Control UnitTerminal Control Unit
• Terminal ↔ TCU interfaz RS-232
• 704 bits packets– 32 bits identification
– 32 bits for parity
– 80 characters of information
• Transmission– 24,000 bauds
– 24 miliseconds per packet
Aloha operationAloha operation
Aloha operationAloha operation
• Stations transmit in the 405.35 MHz. band– Random access to the medium– No synchrony
• Menehune transmits on the 413.475 MHz. band– The transmission is broadcast
• After finishing transmission the station waits a time to receive an acknowledgment– Retransmission in case it does not receive the ACK
Why the traditional telephone dial-up Why the traditional telephone dial-up system or leased lines were not used?system or leased lines were not used?
Leased lineLeased line
Dial upDial up
Why the traditional telephone dial-up Why the traditional telephone dial-up system or leased lines were not used?system or leased lines were not used?
• Too expensive for long distances• Set up time (connection establishment) for dial-
up was too big for the amount of traffic– Big overhead– Burst traffic with big idle times
• Asymmetric communication• Line quality not good in that time
AlohaAloha
• The major innovation of the Aloha network is randomized multiple access to a broadcast channel– It wasn't the wireless feature, although it was need it
• No se usó lo tradicional FDMA o TDMA• Mechanism
– If an acknowledgment is not outstanding, transmit immediately
– If no acknowledgment is received, repeat after a random delay
• No carrier sense
OperaciónOperación
• Stations connected to a shared medium
• No central controller
• No signaling band– Just one communication band
• Random Access
• Collisions
• CSMA/CD
Alternatives to Ethernet (token bus)Alternatives to Ethernet (token bus)
Alternatives to Ethernet (token ring)Alternatives to Ethernet (token ring)
SharedMedium
Transmission in a busTransmission in a bus
CollisionsCollisions
Persistence and Non persistencePersistence and Non persistence
Persistent pPersistent p
Persistence methodPersistence method
• ¿Which one is best?• ¿Which one was selected by Metcalfe?
CSMA/CDCSMA/CD
Station readyfor transmission
Station readyfor transmission
Transmitlistening
Transmitlistening
End oftransmission
End oftransmission
Sense thechannel
Sense thechannel
Stop transmissionand
Start jam signal
Stop transmissionand
Start jam signal
Wait a randomtime (BEB)
Wait a randomtime (BEB)
Busy
Free
Collision
CSMA/CD in wirelessCSMA/CD in wireless
• Problems– Collision Detection:
• Expensive• Hard (Energy differential)• Not detected (Hidden Station)
• Improvements– Less aggressive to access the medium– Even if the medium is idle, wait an aditional time
• Random backoff procedure– Use ACKs, no CD
CSMA/CACSMA/CA
• Carrier Sense– Ability to detect if the medium is busy/idle
• Multiple Access– Every station can transmit to the medium– With the same right
• Collision Avoidance– Only one station can transmit at the same time– 802.11 stations CAN NOT transmit and receive at the same
time, they are Half-Duplex– They can not detect colissions during transmission
CSMA/CACSMA/CA
• If a station is not transmitting, it is listening– CCA (Clear Channel Assessment)
• CSMA/CA minimize risk of collisions– Without much overhead
• Collision Detection vs Collision Avoidance– Collision Detection is more efficient– It takes more time
• CSMA/CA has less throughput than CSMA/CD– Throughput/Data Rate
IEEE 802.11IEEE 802.11
CSMA/CACSMA/CA
• DCF: Distributed Coordination Function– Without QoS
• PCF: Point Coordination Function– Optional– AP takes control and assigns turns to the stations
• HFC: Hybrid Coordination Function– For QoS– EDCA (Enhanced Distributed Channel Access)
CSMA/CACSMA/CA
• Station must complete an arbitration process before transmitting a frame
• Every station involved must be in “silence” for a variable time
• The station finsishing this process first is the one which transmits first
CSMA/CACSMA/CA
• IFS: InterFrame Space– 6 different
– It can be used to define priorities
• Contention Window uses BEB– Binary Exponential Backoff
• Slot time in the contention window– 9 µsec 802.11a/n at 5 GHz
– 20 µsec 802.11b/g/n at 2.4 GHz
Random
Listening…....Go to start ifa transmission is detected
Start
Backoff 802.11Backoff 802.11
Interframe Space (IFS)Interframe Space (IFS)
• RIFS: Reduced Interframe Space– 2 µsec
• SIFS: Short Interframe Space– 10 µsec for 802.11b/g/n at 2.4 GHz
– 16 µsec for 802.11a/n at 5 GHz
• PIFS: PCF Interframe Space
• DIFS: DCF Interframe Space– SIFS + 2 slot times
• AIFS: Arbitration Interframe Space
• EIFS: Extended Interframe Space
CSMA/CACSMA/CAStationready
Stationready
Listen tothe channel
Listen tothe channel
free
Wait a DIFSWait a DIFS
busy
Wait R slots.Listening
Wait R slots.Listening
Send frameSend frame
Start TimerStart Timer
ACKreceived?
ACKreceived?
No
Successfultransmission
Successfultransmission
Yes
• Carrier Sense Multiple Access / Collision AvoidanceAvoidance
• K initial value
– 4 for OFDM (~5 GHz)
– 5 for DSSS (~2.4 GHz)
• Stop at k > 10
– Depends on manufacturer
• R is random between 0 and 2k-1
• Collisions are not detected
• ACKs are used• Timer = SIFS+SlotTime+RxPHYStartDelay
Transmission detected
Hidden stationHidden station
B
AP
• B does not detect A transmitting
• If B transmits, colission in AP with A signal
• Solution ..........
A
RTS/CTS (RTS/CTS (Request To Send/Clear To SendRequest To Send/Clear To Send))
Range of A Range of B
• A wants to transmit to B
• A transmits a RTS to B
– B, C and E listen (range of A)
– D does not listen
• B transmits a CTS in response to A RTS
– Now D listens (range of B)
– C does not listents, but it already listened the RTS, so …. no problem
CSMA/CA and NAVCSMA/CA and NAVSender Receiver Other stations
Frame (Data)
time time time time
Nobody senses the medium
• Collisions are avoided
• DIFS: Distributed InterFrame Space
• SIFS: Short InterFrame Space
• RTS and CTS carry the duration of the transmission
RTS/CTSRTS/CTS
• RTS/CTS consumes capacity,
– High speed environments
– Many users
• Hidden station is not a problem in:
– Small environments (SOHO)
– Enterprises if the coverage is dense enough (many APs)
• RTS Threshold determines the length of frames that will use RTS/CTS
• NAV is a virtual carrier sense established by the duration field (in ?secs)
• Why a virtual ACK is not used, as in Ethernet?
DCF (CSMA/CA)DCF (CSMA/CA)
Channels DSSSChannels DSSS
IEEE 802.11IEEE 802.11
Channels 802.11Channels 802.11
Enterprise coverageEnterprise coverage
Enterprise coverageEnterprise coverage
Frequency Hopping Spread SpectrumFrequency Hopping Spread Spectrum
Dwell Time: 400 mseg Banda de 2.4 Ghz (ISM)
79 sub-bandas de 1 MHz FSK: 1 ó 2 bits por baud
Tiempo
f1
f0
f3
f2
f5
f4
f7
f6
f9
f8
Frec.(Hz)
Direct Sequence Spread SpectrumDirect Sequence Spread Spectrum
Chip code para 1: 100110 Chip code para 0: 011001
100110
1 0 0 1 1 0
100110 100110 011001011001011001
0 1 1 0 0 1 1 0 0 1 1 0
0 1
Direct Sequence Spread SpectrumDirect Sequence Spread Spectrum
• Chip codes también se llaman PN codes (Pseudorandom Noise codes)
• Consume más potencia por la frecuencia que se necesita en la transmisión y recepción de los códigos PN, que es mucho mayor que la frecuencia de los datos
• 802.11 usa la secuencia de Barker 1011011100010110111000– 0 → 10110111000
– 1 → 01001000111
802.11a802.11a
• October 1999
• 5 GHz
• 54 Mbps (max)/ 23 Mbps (tip)
• 35 mts (int), 115 mts (ext)
• OFDM
802.11b802.11b
• October 1999
• 2.4 GHz
• 11 Mbps
• 35 mts (int), 115 mts (ext)
• DSSS
802.11g802.11g
• June 2003
• 2.4 GHz
• 54 Mbps (max), 20 Mbps (tip)
• 38 mts (int), 125 mts (ext)
• OFDM
802.11n802.11n
• October 2009 (Draft 2007)
• 2.4 Ghz/5 GHz
• 600 Mbps (max), 120 Mbps (tip)
• 70 mts (int), 250 mts (ext)
• MIMO– Multiple Input Multiple Output
802.11ac802.11ac
• December 2013
• 5 GHz
• 600 Mbps (2.4GHz)
• 2.6 Gbps (5GHz)
• 35 mts (int), 115 mts (ext)
• OFDM
IEEE 802.11IEEE 802.11
Independent BSS (IBSS)
IEEE 802.11IEEE 802.11
802.11 MPDU802.11 MPDU
802.11 Header802.11 Header
• MPDU: MAC Protocol Data Unit• 32 bytes maximum
– 802.11n adds HT field (4 bytes)
• The header size is not fixed– QoS is used only for Data frames– The four addresses are not always used– Most frames use only three addresses– ACK frames use only one address
Control FieldControl Field
• 11 subfields• Protocol Version
– 2 bits– Always 0, compatibility
• Type and Subtype– Identify frame function– Management, Control and Data
ValidValidcombinationscombinations
Frame 802.11Frame 802.11
Transmitter Transmitter (AP)(AP)
SourceSource
Transmitter Transmitter (AP)(AP)
SourceSource
AddressAddress22
Estación Estación DestinoDestino
Estación Estación DestinoDestino
Estación Estación OrigenOrigen
BSS IDBSS ID
AddressAddress33
Estación Estación OrigenOrigen
N/AN/A
N/AN/A
N/AN/A
AddressAddress44
Receiver (AP)Receiver (AP)
Receiver (AP)Receiver (AP)
DestinationDestination
DestinationDestination
AddressAddress11
11
00
11
00
fromfromDSDS
11
11
00
00
totoDSDS
AddressingAddressing
AddressingAddressing
AddressingAddressing
AddressingAddressing
More FragmentsMore Fragments
• Fragmentation service to divide MSDUs in smaller elements
• 1 if another fragment follows, 0 if it is the last or it is not fragmented
• Only for frames with unicast address in the receiver (Address 1)
• If the MPDU exceedes Fragmentation Threshold the MSDU is fragmented
• Each fragment has header, body and FCS (MPDU)
• Each fragment has a fragment number
• Each fragment is sent independently and requires ACK
• The receiving station assembles all the fragments
– Secuence number y Fragment number
RetryRetry
• 0: Original transmission (first) of a frame• 1: Retransmission of a frame• FCS is wrong → No ACK → Retransmission• Multicast and Broadcast do not require ACK• Almost all unicast frames require ACK
– RTS does not, CTS is an implicit ACK
Power ManagementPower Management
• 1: STA tells AP it will use power saving
• AP will store every frame directed to STA
• STA will “shut down” its receiver to save energy
More DataMore Data
• When STA associates with AP, it receives an AID (Association Identifier)
• If AP is storing frames for a STA (because Power Save). AID of STA will be present in the TIM (Traffic Indication Map) field
• TIM is a list of all the STAs which have pending frames
• A STA is awake or doze
• When awake it will read the Beacon frame to see if it is in TIM
• The More Data field indicates that the AP has more frames stored to send to STA
More DataMore Data
• STA in the awake state– Verify if its AID is in TIM– If it is in TIM send PS_Poll to the AP– AP sends a frame to STA– If More is in 1, STA continues asking for frames
Protected FrameProtected Frame
• MSDU payload is encrypted• WEP → TKIP → CCMP• It does not indicate the type of encryption
OrderOrder
• 1 indicates frames have to processed in order• Rarely used
DurationDuration• 16 bits
• Virtual Carrier Sense
• Main purpouse is for the STAs to start NAV with this value
• Time is in µseconds
• In a data frame– Duration = 1 SIFS + ACK
• ACK– Duration = 0
Sequence ControlSequence Control
• 16 bits• 4 bits Fragment Number
– Gets incremented with every fragment of an MSDU
• 12 bits Sequence Number– Gets incremented with every MSDU (by 1)– 4095 and restart from 0– To reassemble the fragments
Frames de administraciónFrames de administración
• Authentication y Deauthentication– Autenticación– Terminar comunicación segura
• Association (Request, response)– Asociación– Para que el AP dedique recursos y se sincronice con
la tarjeta– Velocidades de transmisión posibles, SSID
Frames de administraciónFrames de administración
• Reassociation (Request, response)– En caso de que una estación se mueva a otra zona
con un AP de señal más potente– El nuevo AP se comunica con el AP antiguo para
que le envie frames pendientes
• Disassociation– Para “darse de baja” en forma correcta– El AP libera recursos (memoria, tabla de
asociación)
Frames de administraciónFrames de administración
• Beacon– Broadcast del AP, dando a conocer su presencia– SSID, hora
• Probe (request, response)– Verificar presencia de Aps– Contestar con velocidad de transmisiones
Frames de controlFrames de control
• Request To Send (RTS)– Duración
• Clear To Send (CTS)– Duración
• Acknowledgement (ACK)– Verificación del frame que llega– En caso de no recibir ACK se retransmite el frame
correspndiente
Conexión a la redConexión a la red
estación AP