Download Chapter 10 – Wireless LANs - Faculty Personal Homepage

Document related concepts

RS-232 wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Wireless security wikipedia , lookup

Internet protocol suite wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

I²C wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

CAN bus wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

IEEE 1355 wikipedia , lookup

IEEE 802.11 wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Local Area Networks
Chapter 10 – Wireless LANs
Wireless Communication




The proliferation of laptop computers and other mobile devices
(PDAs and cell phones) created an obvious application level
demand for wireless local area networking.
Companies jumped in, quickly developing incompatible wireless
products in the 1990’s.
Industry decided to entrust standardization to the IEEE
committee that dealt with wired LANS – namely, the IEEE 802
committee!!
Wireless communications compelling







Easy, low-cost deployment
Mobility & roaming: Access information anywhere
Supports personal devices
 PDAs, laptops, data-cell-phones
Supports communicating devices
 Cameras, location devices, wireless identification
Signal strength varies in space & time
Signal can be captured by snoopers
Spectrum is limited & usually regulated
Wireless Links

Many end systems use wireless links:
–
–
–

Two standards for wireless networking:
–
–

Portable PCs within a wireless LAN
PDAs that connect to the Internet through wireless telephony
infrastructure
Cameras, automobiles, etc.
IEEE 802.11b standard for wireless LANs (aka Wi-Fi)
Bluetooth standard that allows devices to communicate without
being in line of sight
Wireless devices classified wrt power, range, and data
rate
–
–
IEEE 802.11  high power, medium range, and high rate “access”
technology
Bluetooth  low power, short range, low rate, “cable replacement”
technology
IEEE 802.11 Wireless LAN


Wireless LANs: mobile networking
IEEE 802.11 standard:
MAC protocol
Unlicensed frequency spectrum: 2.4Ghz (802.11b) or 5-6 Ghz (802.11a)
Provides wireless Ethernet access at 11 Mbps or 54 Mbps (802.11a)
–
–
–

Basic Service Set (BSS)
(a.k.a. “cell”) contains:
–
–

wireless hosts
access point (AP): base
station
BSS’s combined to form
distribution system (DS)
IEEE 802.11 Wireless LAN
IEEE 802.11 Wireless LAN
The 802.11 Protocol Stack
The 802.11 Protocol Stack
Wireless Standards
Frequency, Hopping Spread Spectrum (FHSS)
Direct Sequence Spread Spectrum (FHSS) HR: High Rate
Orthogonal Frequency Division Multiplexing (OFDM, VOFDM, COFDM)
Wireless Physical Layer

Physical layer conforms to OSI (five options)
–
–
–

802.11 Infrared
–
–
–

1997: 802.11 infrared, FHSS, DHSS
1999: 802.11a OFDM and 802.11b HR-DSSS
2001: 802.11g OFDM
Two capacities 1 Mbps or 2 Mbps.
Range is 10 to 20 meters and cannot penetrate walls.
Does not work outdoors.
802.11 FHSS (Frequency Hopping Spread Spectrum)
–
–
–
–
The main issue is multipath fading.
79 non-overlapping channels, each 1 Mhz wide at low end of 2.4 GHz ISM band.
Same pseudo-random number generator used by all stations.
Dwell time: min. time on channel before hopping (400msec).
Wireless Physical Layer
Frequency Hopping Spread Spectrum
Wireless Physical Layer

802.11 DSSS (Direct Sequence Spread Spectrum)
–
–
–

Spreads signal over entire spectrum using pseudo-random sequence (similar to CDMA see
Tanenbaum sec. 2.6.2).
Each bit transmitted using an 11 chips Barker sequence, PSK at 1Mbaud.
1 or 2 Mbps.
802.11a OFDM (Orthogonal Frequency Divisional Multiplexing)
–
–
–
–
–
–
Compatible with European HiperLan2.
54Mbps in wider 5.5 GHz band  transmission range is limited.
Uses 52 FDM channels (48 for data; 4 for synchronization).
Encoding is complex ( PSM (Power saving mode) up to 18 Mbps and QAM above this capacity).
E.g., at 54Mbps 216 data bits encoded into into 288-bit symbols.
More difficulty penetrating walls.
Wireless Physical Layer
Direct Sequence Spread Spectrum
Wireless Physical Layer

802.11b HR-DSSS (High Rate Direct Sequence Spread
Spectrum)
–
–
–
–
–
–

11a and 11b shows a split in the standards committee.
11b approved and hit the market before 11a.
Up to 11 Mbps in 2.4 GHz band using 11 million chips/sec.
Note in this bandwidth all these protocols have to deal with interference from
microwave ovens, cordless phones and garage door openers.
Range is 7 times greater than 11a.
11b and 11a are incompatible!!
802.11g OFDM(Orthogonal Frequency Division
Multiplexing)
–
–
–
–
An attempt to combine the best of both 802.11a and 802.11b.
Supports bandwidths up to 54 Mbps.
Uses 2.4 GHz frequency for greater range.
Is backward compatible with 802.11b.
Infrastructure Network
Server
Portal
Distribution System
Gateway to
Portal the Internet
AP1
AP2
A1
BSS A

B1
B2
A2
BSS B
Permanent Access Points provide access to Internet
IEEE 802.11 Wireless LAN
802.11 Definitions

Basic Service Set (BSS)
–
–
–
–

Group of stations that coordinate their access using a given instance of
MAC
Located in a Basic Service Area (BSA)
Stations in BSS can communicate with each other
Distinct collocated BSS’s can coexist
Extended Service Set (ESS)
–
–
–
Multiple BSSs interconnected by Distribution System (DS)
Each BSS is like a cell and stations in BSS communicate with an Access
Point (AP)
Portals attached to DS provide access to Internet
Ad Hoc Networks



Ad hoc network: IEEE 802.11 stations can dynamically
form network without AP
Formed “on the fly” when mobile devices are in proximity
Applications:
–
–
–

“Laptop” meeting in conference room, car
Interconnection of “personal” devices
Battlefield
IETF MANET
(Mobile Ad hoc Networks)
working group
Ad Hoc Networks
Hidden Terminal Problem
(a)
C
A
Data Frame
A transmits data frame
C senses medium,
station A is hidden from C
B
(b)
Data Frame
B
Data Frame
A

New MAC: CSMA with Collision Avoidance
C
C transmits data frame
& collides with A at B
IEEE 802.11 MAC Protocol: CSMA/CA (collision
avoidance)
802.11 CSMA: sender
 if sense channel idle for
Distributed Inter Frame
Space (DIFS) sec.
then transmit entire frame
(no collision detection)
 if sense channel busy
then binary backoff
802.11 CSMA receiver:
 if received OK
return ACK after Short Inter
Frame Spacing (SIFS)
(DIFS = SIFS + 2 × slot time)
Time slot= 20 micro s, SIFS=10
micro s, DIFS=50 micro s.
IEEE 802.11 MAC Protocol
802.11 CSMA Protocol: others
 Other stations wait for a
random backoff period after
DIFS after current
transmission
–
–

Collisions detection is
difficult:
–
–

Avoids collisions
Collisions  uses exponentially
increasing backoff period
Hidden terminal problem
Fading
NAV: Network Allocation
Vector:
–
–
802.11 frame has transmission
duration field
Others (hearing stations) defer
access (to save power) for NAV
time units
IEEE 802.11 MAC Protocol
Hidden Terminal effect

Hidden terminals: A, C cannot hear each other
–
–


Obstacles, signal attenuation
Collisions at B
Goal: avoid collisions at B
CSMA/CA: CSMA with Collision Avoidance
Fading can also result in collisions
Collision Avoidance: RTS-CTS exchange

CSMA/CA: explicit
channel reservation
–
–

sender: send short RTS:
request to send
receiver: reply with
short CTS: clear to send
CTS reserves channel for
sender, notifying
(possibly hidden)
stations
–
Benefit: RTC-CTS avoids
hidden station collisions
Collision Avoidance: RTS-CTS exchange

CA with RTS-CTS:
–
–

Collisions less likely, of
shorter duration
End result similar to
collision detection
IEEE 802.11 allows:
–
–
–
CSMA
CSMA/CA:
reservations
polling from AP
CSMA with Collision Avoidance
(a)
B
RTS
C
A requests to send
(b)
CTS
B
A
CTS
C
B announces A ok to send
(c)
Data Frame
A sends
B
C remains quiet
IEEE 802.11 Wireless LAN

Stimulated by availability of unlicensed spectrum
–
–




U.S. Industrial, Scientific, Medical (ISM) bands
902-928 MHz, 2.400-2.4835 GHz, 5.725-5.850 GHz
Targeted wireless LANs @ 20 Mbps
MAC for high speed wireless LAN
Ad Hoc & Infrastructure networks
Variety of physical layers
Infrastructure Network
Portal
Distribution System
Server
Gateway to
Portal the Internet
AP1
AP2
A1
B1
B2
A2
BSS A
BSS B
Distribution Services


Stations within BSS can communicate directly with each
other
DS provides distribution services:
–
–
–

Transfer MAC SDUs between APs in ESS
Transfer MSDUs between portals & BSSs in ESS
Transfer MSDUs between stations in same BSS
 Multicast, broadcast, or stations’s preference
ESS looks like single BSS to LLC layer
Infrastructure Services

Select AP and establish association with AP
–




Then can send/receive frames via AP & DS
Reassociation service to move from one AP to another AP
Dissociation service to terminate association
Authentication service to establish identity of other
stations
Privacy service to keep contents secret
IEEE 802.11 MAC

MAC sublayer responsibilities
–
–
–

MAC security service options
–

Channel access
PDU addressing, formatting, error checking
Fragmentation & reassembly of MAC SDUs
Authentication & privacy
MAC management services
–
–
Roaming within ESS
Power management
MAC Services



Contention Service: Best effort
Contention-Free Service: time-bounded transfer
MAC can alternate between Contention Periods (CPs) & Contention-Free
Periods (CFPs). MAC Service Data Unit (MSDU)
MSDUs
MSDUs
Contentionfree service
Contention
service
Point coordination
function
MAC
Distribution coordination function (DCF)
(CSMA-CA)
Physical
Distributed Coordination Function (DCF)
DIFS
Contention
window
PIFS
DIFS
SIFS
Busy medium
Defer access

Wait for
reattempt time
DCF provides basic access service
–
–

Next frame
Asynchronous best-effort data transfer
All stations contend for access to medium
CSMA-CA
–
–
Ready stations wait for completion of transmission
All stations must wait Interframe Space (IFS)
Time
Priorities through Interframe Spacing
DIFS
Contention
window
PIFS
DIFS
SIFS
Busy medium
Defer access

–

Wait for
reattempt time
High-Priority frames wait Short IFS (SIFS)
–

Next frame
Typically to complete exchange in progress
ACKs, CTS, data frames of segmented MSDU, etc.
PCF IFS (PIFS) to initiate Contention-Free Periods
DCF IFS (DIFS) to transmit data & MPDUs
Time
Contention & Backoff Behavior


If channel is still idle after DIFS period, ready station can transmit
an initial MPDU
If channel becomes busy before DIFS, then station must schedule
backoff time for reattempt
–
–
–

Backoff period is integer # of idle contention time slots
Waiting station monitors medium & decrements backoff timer each time an idle
contention slot transpires
Station can contend when backoff timer expires
A station that completes a frame transmission is not allowed to
transmit immediately
–
Must first perform a backoff procedure
(a)
B
RTS
A requests to send
(b)
C
CTS
B
CTS
A
C
B announces A ok to send
(c)
Data Frame
B
A sends
(d)
C remains quiet
ACK
B
B sends ACK
ACK
Carrier Sensing in 802.11

Physical Carrier Sensing
–
–

Virtual Carrier Sensing at MAC sublayer
–
–
–

Analyze all detected frames
Monitor relative signal strength from other sources
Source stations informs other stations of transmission time (in msec)
for an MPDU
Carried in Duration field of RTS & CTS
Stations adjust Network Allocation Vector to indicate when channel
will become idle
Channel busy if either sensing is busy
Transmission of MPDU without RTS/CTS
DIFS
Data
Source
SIFS
ACK
Destination
DIFS
Other
NAV
Defer Access
Wait for
Reattempt Time
Transmission of MPDU with RTS/CTS
DIFS
RTS
Data
Source
SIFS
SIFS
SIFS
CTS
Ack
Destination
DIFS
NAV (RTS)
Other
NAV (CTS)
NAV (Data)
Defer access
Collisions, Losses & Errors

Collision Avoidance
–
–
–

When station senses channel busy, it waits until channel becomes idle for DIFS
period & then begins random backoff time (in units of idle slots)
Station transmits frame when backoff timer expires
If collision occurs, recompute backoff over interval that is twice as long
Receiving stations of error-free frames send ACK
–
–
–
Sending station interprets non-arrival of ACK as loss
Executes backoff and then retransmits
Receiving stations use sequence numbers to identify duplicate frames
Point Coordination Function




PCF provides connection-oriented, contention-free service
through polling
Point coordinator (PC) in AP performs PCF
Polling table up to implementor
CFP repetition interval
–
–
–
–
Determines frequency with which CFP occurs
Initiated by beacon frame transmitted by PC in AP
Contains CFP and CP
During CFP stations may only transmit to respond to a poll from PC
or to send ACK
PCF Frame Transfer
TBTT
Contention-free repetition interval
SIFS
B
SIFS
SIFS
SIFS
SIFS
CF
End
D2+Ack+
Poll
D1 +
Poll
Contention period
U2+
ACK
U1+
ACK
PIFS
Reset NAV
NAV
CF_Max_duration
D1, D2 = frame sent by point coordinator
U1, U2 = frame sent by polled station
TBTT = target beacon transmission time
B = beacon frame
DCF, PCF, and Frame Format
Distributed Coordination Function (DCF)




DCF is the access method used to support asynchronous data transfer on a best
effort basis
All stations must support the DCF (DCF operates solely in the ad hoc network)
Operates solely or coexists with the PCF in an infrastructure network
DCF sits directly on top of the physical layer and supports contention services:




The DCF is carrier sense multiple access with collision avoidance (CSMA/CA).




Each station with an MSDU queued for transmission must contend for access to the channel
Once the MSDU is transmitted, must recontend for access to the channel for all subsequent frames
Contention services promote fair access to the channel for all stations.
CSMA/CD is not used because a station is unable to listen to the channel for collisions while transmitting
In IEEE 802.11, carrier sensing is performed at both the air interface, referred to as physical carrier sensing,
and at the MAC sublayer, referred to as virtual carrier sensing
Physical carrier sensing detects the presence of other IEEE 802.11 WLAN users by analyzing all detected
packets, and also detects activity in the channel via relative signal strength from other sources
Virtual carrier sensing
–
–
–
–
–
–
–
Stations include MPDU duration in the header of request to send (RTS), clear to send (CTS), and data frames
An MPDU is a complete data unit that is passed from the MAC sublayer
to the physical layer
The MPDU contains header information, information, payload, and a 32-bit CRC
The duration field indicates the time (in microseconds) after the end of the present frame the channel will be
utilized tocomplete the successful transmission of the data or management frame.
Stations in the BSS use the duration field to adjust their network allocation vector (NAV)
NAV indicates the amount of time that must elapse until the current transmission session is complete
Distributed Coordination Function (DCF)
• DCF operates under the Contention Period (CP)
• Three types of frames: management, control, and data
• Management F: station association dis-association with AP
• Control F: handshaking in CP, ACK data in CP, and end CFP
• Basic DCF Access Method (no RTS-CTS):
• When ST finds chaneel idle, it waits for DIFS and checks it again
• If it is still idle, it transmits MPDU with medium busy time (including SIFS and ACK
times)
• Receiving st computes Checksum, if correct sends an ACK to source
•All other STs in BSS hearing above messages adjust their NAV timers
Distributed Coordination Function (DCF)
• RTS-CTS Data Mode
• Priority Accsess: SIFS, PIFS (SIFS+1), and DIFS (SIFS+2)
• In BSS, STs hearing RTS, CTS, F0, and ACK adjust their NAV
• Sts: Basic mode, RTS/CTS mode if MPDU exceeds L, or
always use RTS/CTS mode
• Fairness: BEB starts with (1,8) and end at some maximum
Distributed Coordination Function (DCF)
• MPDU (2300 bytes): collision lead to bandwidth loss
• RTS is 20 bytes and CTS is 14 bytes
• Fragmentation increases transmission reliability
• Fragment MPDU, transmit Frag, receive ACK to completion
• If no ACK, re-contend for medium and stat al last Frag.
• In RTS-CTS mode, RTS-CTS used only in first frag.
Point Coordination Function (PCF on top of DCF)
• PCF (optional) operates under the Contention-Free Period (CFP)
• Medium access contr. by Point Coordinator PC (AP/BSS, polling)
• Polled Sts can transmit (No CSMA)
• CFP Repetition Interval (Manag duration): (1) PCF, and (2) DCF
Point Coordination Function (PCF on top of DCF)
•Light traffic: shorter CFP if previous DCF traffic is not complete
• PC: PIFS, Beacon, (CF-poll/data/Data+CF-poll), CF-end.
•CF-aware st:
• Gets CF-poll,
•Responds: CF-ACK, Data+CF-ACK,
•Then PC responds by Data+CF-ACK+CF-poll
Point Coordination Function (PCF on top of DCF)
• When ST receives a poll from IP:
• Transmit a F to another ST in the BSS
• When Dest receives F, a DCF-ACK is returned to source
• PC waits for PIFS after ACK before continuation
Frame Types

Management frames
–
–
–

Control frames
–
–

Station association & disassociation with AP
Timing & synchronization
Authentication & deauthentication
Handshaking
ACKs during data transfer
Data frames
–
Data transfer
Frame Structure
2
2
Frame
Control
Duration/
ID



MAC header (bytes)
6
6
Address
1
Address
2
6
2
6
0-2312
4
Address
3
Sequence
control
Address
4
Frame
body
CRC
MAC Header: 30 bytes
Frame Body: 0-2312 bytes
CRC: CCITT-32 4 bytes CRC over MAC header & frame
body
Frame Control (1)
2
2
Frame
Control
Duration/
ID





MAC header (bytes)
6
6
Address
1
Address
2
2
2
4
Protocol
version
Type
Subtype
1
6
2
6
0-2312
4
Address
3
Sequence
control
Address
4
Frame
body
CRC
1
1
1
1
1
1
1
To From More
Pwr More
Retry
WEP Rsvd
DS DS frag
mgt data
Protocol version = 0
Type: Management (00), Control (01), Data (10)
Subtype within frame type
Type=00, subtype=association; Type=01, subtype=ACK
MoreFrag=1 if another fragment of MSDU to follow
Frame Control (2)
2
2
6
6
6
2
6
0-2312
4
Frame
Control
Duration/
ID
Address
1
Address
2
Address
3
Sequence
control
Address
4
Frame
body
CRC
2
2
4
Protocol
version
Type
Subtype
To From
DS DS
Address
1
Destination
address
Destination
address
0
0
0
1
1
0
BSSID
1
1
Receiver
address
Address
2
Source
address
1
1
1
1
1
1
1
To From More
Pwr More
Retry
WEP Rsvd
DS DS frag
mgt data
Address
3
Address
4
BSSID
N/A
Data frame from station to
station within a BSS
N/A
Data frame exiting the DS
N/A
Data frame destined for the
DS
Source
address
WDS frame being distributed
from AP to AP
Source
address
Source Destination
address
address
Transmitter Destination
address
address
BSSID
1
Meaning
To DS = 1 if frame goes to DS; From DS = 1 if frame exiting DS
Frame Control (3)
2
2
Frame
Control
Duration/
ID




MAC header (bytes)
6
6
Address
1
Address
2
2
2
4
Protocol
version
Type
Subtype
1
6
2
6
0-2312
4
Address
3
Sequence
control
Address
4
Frame
body
CRC
1
1
1
1
1
1
1
To From More
Pwr More
Retry
WEP Rsvd
DS DS frag
mgt data
Retry=1 if mgmt/control frame is a retransmission
Power Management used to put station in/out of sleep mode
More Data =1 to tell station in power-save mode more data
buffered for it at AP
WEP=1 if frame body encrypted
Physical Layers
LLC PDU
LLC
MAC
header
MAC SDU
CRC
MAC
layer
Physical layer
convergence
procedure
PLCP PLCP
preamble header

PLCP PDU
802.11 designed to
–
–
Support LLC
Operate over many physical layers
Physical medium
dependent
Physica
layer
IEEE 802.11 Physical Layer Options
Frequency
Band
Bit Rate
Modulation Scheme
802.11
2.4 GHz
1-2 Mbps
Frequency-Hopping Spread
Spectrum, Direct Sequence
Spread Spectrum
802.11b
2.4 GHz
11 Mbps
Complementary Code Keying &
QPSK
802.11g
2.4 GHz
54 Mbps
Orthogonal Frequency Division
Multiplexing
& CCK for backward
compatibility with 802.11b
802.11a
5-6 GHz
54 Mbps
Orthogonal Frequency Division
Multiplexing
802.11 - MAC management

Synchronization
–
–

Power management
–
–

sleep-mode without missing a message
periodic sleep, frame buffering, traffic measurements
Association/Reassociation
–
–
–

try to find a LAN, try to stay within a LAN
timer etc.
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
Synchronization using a Beacon (infrastructure)
beacon interval
access
point
medium
B
B
busy
busy
B
busy
B
busy
t
value of the timestamp
B
beacon frame
Synchronization using a Beacon (ad-hoc)
beacon interval
station1
B1
B1
B2
station2
medium
busy
busy
B2
busy
busy
t
value of the timestamp
B
beacon frame
random delay
Power management



Idea: switch the transceiver off if not needed
States of a station: sleep and awake
Timing Synchronization Function (TSF)
–

Infrastructure
–
–

stations wake up at the same time
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?)
Power saving with wake-up patterns
(infrastructure)
TIM interval
access
point
DTIM interval
D B
T
busy
medium
busy
T
d
D B
busy
busy
p
station
d
t
T
TIM
D
B
broadcast/multicast
DTIM
awake
p PS poll
d data transmission
to/from the station
Power saving with wake-up patterns (ad-hoc)
ATIM
window
station1
beacon interval
B1
station2
A
B2
B2
D
a
B1
d
t
B
beacon frame
awake
random delay
a acknowledge ATIM
A transmit ATIM
D transmit data
d acknowledge data
802.11 - Roaming


No or bad connection? Then perform:
Scanning
–

Reassociation Request
–

station sends a request to one or several AP(s)
Reassociation Response
–
–

scan the environment, i.e., listen into the medium for beacon signals
or send probes into the medium and wait for an answer
success: AP has answered, station can now participate
failure: continue scanning
AP accepts Reassociation Request
–
–
–
signal the new station to the distribution system
the distribution system updates its data base (i.e., location
information)
typically, the distribution system now informs the old AP so it can
release resources
WLAN: IEEE 802.11b
What’s
–
–
new?
Define a new PHY layer. All the MAC schemes, management procedures are
the same
User data rate max. approx. 6 Mbit/s
Frequency
–
On certain frequencies in the free 2.4 GHz ISM-band
Security
–
Limited, WEP insecure, SSID
Cost
–
100€ adapter, 250€ base station, dropping
Availability
–
Many products, many vendors
Special
–
–
Advantages/Disadvantages
Advantage: many installed systems, lot of experience, available worldwide,
free ISM-band, many vendors, integrated in laptops, simple system
Disadvantage: heavy interference on ISM-band, no service guarantees, slow
relative speed only
Bluetooth

Most compelling application addressed by Bluetooth:
–
–

Line-of-sight infrared technology has been used for such
communications
–
–

A convenient, untethered means to interconnect electronic devices
Examples: portable phones, PDAs, laptops, desktops, digital
cameras, fax machines, printers, keyboard, mouse, etc.
Using RF wireless communication, Bluetooth does not require LoS
It can support multipoint as well as point-to-point communication
Bluetooth architecture:
–
–
–
–
–
Mobile devices need short-range transceivers
Transceivers operate in 2.5 Ghz unlicensed frequency band
Provide data rates of up to 721 kbps + 3 voice channels (64 kbps)
Operating range is 10 to 100 meters
Each device is identified by a 12-bit address
Bluetooth (Cont’d)

Frequency hopping
–
–

Error recovery:
–
–

Transceiver minimizes the effect of interference from other signals
Hops to a new frequency after transmitting or receiving a packet
Transceiver forward error correction (FEC)
Automatic Repeat reQuest (ARQ) for retransmission
Bluetooth protocol suite includes:
–
–
–
Baseband protocol
 Enables physical RF wireless connection between devices
 A connection of 2-7 Bluetooth devices forms a small networkpiconet
Link manager protocol
 Handshaking between two devices to establish connection
L2CAP protocol
 During a connection, adapts upper layer protocols for transmission over
the baseband
Bluetooth - Physical Upwards!







79 channels, each 1MHz, using FSK, with 1 bit per
symbol = 1Mbps
Much of the 1Mbps is taken up with protocol overheads –
caused
by frequency hopping (250-260 ms needed to stabilise
radio after
the hop!)
Leaves about 366 bits for actual data – of which 126 bits
are headers
– leaving 240 bits for data per slot!
Bluetooth Frequency Hopping
Point to Point Data Link Control

One sender, one receiver, one link: easier than broadcast
link:
–
–
–

No Media Access Control
No need for explicit MAC addressing
Examples:
 Dialup link phone line  56 Kbps modem connections
 SONET/SDH link
 X.25 connection
 ISDN line
Popular point-to-point DLC protocols:
–
–
PPP (point-to-point protocol)
HDLC: High level data link control (Data link used to be considered
“high layer” in protocol stack!)
PPP Design Requirements [RFC 1547]

Packet framing:
–
–
–

Bit transparency:
–

PPP receiver must be able to detect bit errors
Connection liveness:
–

Must carry any bit pattern in the data field with no constraints
Error detection (no correction)
–

Encapsulation of network-layer datagram in data link frame
Carry network layer data of any network layer protocol (not just IP)
Ability to demultiplex upwards
Detect, signal link failure to network layer
Network layer address negotiation:
–
Endpoint can learn/configure each other’s network address
PPP Non-Requirements


No error correction/recovery
No flow control
–


PPP receiver is expected to receive frames at full physical layer
speed  higher layer could drop packets or throttle sender
Out of order delivery OK
No need to support multipoint links (e.g., polling)
–
–
Other link layer protocols can support multipoint links
E.g., HDLC
Error recovery, flow control, data re-ordering
all relegated to higher layers!|
PPP Data Frame



Flag: delimiter (framing)
Address: does nothing (only one option)
Control: does nothing; in the future possible multiple
control fields
–

PPP sender can allow sender to skip address and control bytes
Protocol: upper layer protocol to which frame delivered
–
–
Examples: PPP-LCP, IP, IPCP, etc
RFC 1700 and RFC 3232 define 16-bit protocol codes for PPP
PPP Data Frame (Cont’d)

Info:
–
–
–

Variable length upper layer data being carried
Default maximum is 1500 bytes
Can be changed when the link is initially configured
Check:
–
–
Uses cyclic redundancy check (CRC) for error detection
Two or 4 bytes CRC
Byte Stuffing

“Data transparency” requirement: data field must be
allowed to include flag pattern <01111110>
–

Sender:
–

Q: is received <01111110> data or flag?
Adds (“stuffs”) an escape byte < 01111101> before each
<01111110> data byte
Receiver:
–
–
–
Discards the escape byte and continues data reception
Single 01111110  flag byte
If two <01111101> bytes in a row  discard the first
escape byte and continue data reception
Byte Stuffing
flag byte
pattern
in data
to send
flag byte pattern plus
stuffed byte in
transmitted data
PPP Link and Network Control Protocols
Before exchanging networklayer data, data link peers
must:
 Configure PPP link (max.
frame length,
authentication)
 Learn/configure network
layer information
–
For IP: carry IP Control
Protocol (IPCP) msgs
(protocol field: 8021) to
configure/learn IP
address
PPP link always begins and
ends in the dead state
PPP Link Control Protocol (LCP)

Link establishment state:
–
–
–
–

Entered on an event that indicates presence of a physical layer, which is ready
to be used: carrier detection, user intervention
One end of the link uses configure-request frame to indicate its
configuration options
 PPP frame with protocol filed set equal to LCP
 Information field contains the specific configuration request
Options:
 Maximum frame size for the link
 Specification of authentication protocol to be used (if any)
 Option to skip the address and control fields in PPP frames
The other side responds with configure-ack, configure-nak, or configurereject frame
Network layer configuration begins after link is established:
–
–
Options negotiation done and authentication performed (if any)
Network layer specific control packets are exchanged with each other
PPP Network Control Protocol (IPCP)

If IP is running over PPP, IP control protocol (IPCP) is used
–
–
–
–

Link goes in open state after network configuration
–
–

IPCP is carried within a PPP frame
 Protocol field will have IPCP  indicated by 0x8021
IPCP allows two IP modules to exchange or configure IP addresses
IPCP also allows two IP modules to negotiate whether or not IP datagrams will
be sent in compressed form
Similar network control protocols for other network protocols:
 Examples: DECnet, AppleTalk, etc.
PPP can start exchanging network layer datagrams
To check the link status, use echo-request and echo-reply LCP frames
Terminating state
–
–
One side sends LCP terminate-request and other responds with LCP
terminate-ack frame
Link goes to the dead state again
Asynchronous Transfer Mode (ATM)

Two types of networks have existed side by side:
–
–

 carry real-time voice
 carry non real-time datagrams
ATM standards were developed in mid-1980’s
–
–

Telephone networks
Data networks
Goal: design a network technology that will be appropriate for both types of
traffic
Standard developed by ATM Forum and ITU for broadband digital services
networks
ATM technology:
–
–
–
–
–
A full suite of communication protocols form application to physical layer
Calls for packet switching within virtual circuits  virtual channels
Deployed in both telephone networks and Internet backbones
High performance ATM switches can deliver terabits per second!
Still could not replace TCP/IP based networks at desktop level
Characteristics of ATM

ATM service models:
–
–
–
–

ATM uses fixed-length
packets  cells
–
–

Constant bit rate (CBR)
Variable bit rate (VBR)
Available bit rate (ABR)
Unspecified bit rate (UBR)

Connection-oriented service
–
–
Header: 5 bytes and payload: 48
bytes
Fixed length cell and simple
header facilitate high speed
switching
–
–
ATM VCs  virtual channels
–
–
Header includes virtual channel
identifier (VCI) field
VCI is used by switches to
forward the cells

Cells always arrive in-order
ATM does not provide acks as
other connection-oriented
protocols do
Effectively, a VC is full duplex
Channel capacity and other
properties may be different in
two directions
Date rates:
–
155 Mbps, 622 Mbps, and higher
Characteristics of ATM (Cont’d)

No link-by-link retransmissions
–
–

Congestion control
–
–

If an ATM switch detects error in a header, it tries to correct it
Simply drops the cell if error cannot be correctedno retransmission
request
Only for ABR service class
Network provides feedback to sender to regulate its rate
ATM protocol stack consists of three layers:
–
–
–
ATM physical layer
ATM layer
ATM adaptation layer (AAL)
 Analogous to transport
layer in TCP/IP stack
 Multiple types of AALs
Cell Header Formats

In both cases, cells consist of:
–
–

5 byte header and 48 byte payloads
Headers are slightly different for two interfaces (GFC field is unused any way)
Header fields
–
–
VPI is a small integer that selects a particular virtual path
VCI selects a particular VC from within the chosen virtual path
Cell Header Formats (Cont’d)

VPI and VCI
–
–

At UNI, 8 bit VPI means that host may
have up to 256 virtual paths, each
containing 65,536 VCs (16 bits)
Actually slightly less as some VCs are
used for control functions
PTI field defines the type of
payload
–
–

E.g., 000 means user data cell with no
congestion and cell type 0 while 010
means user data cell that experienced
congestion
A cell sent by the user as 000 may
arrive as 010
 Types are user supplied but
congestion info is network
supplied
CLP is set by a host to
differentiate between high
and low priority traffic
–

HEC byte provides error
control over the header
–

In case of congestion, switch will
first drop cells with CLP 1 before
dropping cells with CLP 0
All single bit and 90% of multibit
errors can be corrected
A 48 byte payload follows
header
–
Not all 48 bytes available for
payload as some of the AAL
protocols put their headers and
trailers inside the payload
Connection Setup

ATM supports two types of VCs
–
–

Permanent VCs: present at all times like leased lines
Switched VCs: have to be setup for each session
 Connection setup is not part of ATM layer
 Described by ITU protocol Q.2931, which is part of control plane
Connection setup is a two-step process
–
–
First, a VC is acquired for signaling
 To establish such a circuit, cells containing a request are sent to
virtual path 0, VC 5
If first step is successful, a new VC is opened on which connection
setup request and replies are transmitted
Messages for Connection Setup in ATM

Four messages are used for
establishment
–
–
–
–

Host sends a SETUP message on
a special VC
Network responds with CALL
PROCEEDING at each hop
When SETUP arrives at
destination it responds with
CONNECT that propagates back
towards originator
Each switch returns a CONNECT
ACK to originator
Two messages are used for
release of a VC
–
–
Host wishing to release sends a
request
Intermediate switches respond as
request propagates
Connection Setup (Cont’d)

Multicast connection setup
–
–
–

A multicast channel has one sender and multiple receivers
Constructed by first setting up connection to one destination
ADD PARTY messages are sent to add more receivers to the VC
previously returned
ATM addresses
–
–
Setup messages include destination address
ATM addresses come in three forms
 Type 1: 20 bytes long OSI addresses
– First byte indicates which of three formats
– Bytes 2 and 3 specify country; byte 4 gives format for the
rest of address that contains 3-byte authority, 2-byte
domain, 2-byte area, and 6-byte add.
 Type 2: bytes 2 and 3 designate an international organization
and rest is same as in type 1
 Type 3: 15 digit decimal ISDN telephone number
ATM Adaptation Layer

ATM layer does not provide error or flow control to
applications
–
–
–

Only 53 byte cells are output
Not directly useable for applications
ATM Adaptation Layer (AAL) was defined to bridge this gap
AAL protocols:
–
–
Four protocols to handle four classes of service
 AAL1 – AAL4
 Requirements for classes C and D were so similar that AAL3 and AAL4
are combined into AAL ¾
 AAL1 for CBR and AAL2 for VBR
AAL5 proposed by computer industry in contrast to telecommunication
industry that proposed AAL1 – AAL3/4  for IP datagrams
Structure of the AAL
Convergence sublayer (service specific part)
Covergence sublayer (common part)
Segmentation reassembly sublayer
ATM layer
ATM physical layer

AAL has two parts:
–
–
Convergence sublayer
 Interfaces with application for framing and error detection
 Two parts: service-specific part and common part
Segmentation And Reassembly (SAR) sublayer
 Adds headers and trailers to data units given by convergence
layer to form cell payloads
Convergence and SAR Layer Operations




Convergence sublayer adds its header/trailer to the message
Message is broken into 44-48 byte units, which are passed to
SAR
SAR adds its own header/trailer and passes each piece to ATM
layer
Some AAL protocols have null header/trailer
IP over ATM

ATM is widely used as
Internet backbone
–
–
–

Routers have 2 addresses:
–
–

Permanent VCs between each
pair of entry/exit point
Permanent VCs avoid having to
establish dynamic VCs for
transiting cells
Fro n entry points, n(n-1)
permanent VCs are needed
An IP address
An ATM (LAN) address
ATM network needs to transit
datagram to the exit router
–
–
Uses permanent VC
Uses AAL5
Practice Problem # 1

Q:
Consider a CSMA/CD network running at 1 Gbps over a 1
km cable with no repeaters. The signal speed in the cable
is 200,000 km/sec. What is the minimum frame size?

A:
–
–
–
For a 1 km cable, the one-way propagation time is 5 msec or 2t =
10 msec. Shortest frame should take more than this time to
transmit to allow the sender to identify any collisions in the worst
case.
At 1Gbps, the number of bits that should be transmitted during 10
msec = 10,000 bits = 1250 bytes.
Thus, the frame should not be shorter than 1250 bytes.
Practice Problem # 2

Q:
A 4-Mbps token ring has a token holding timer value of 10
msec. What is the longest frame that can be sent on this
ring?

A:
–
–
–
At 4 Mbps, a station can transmit 40,000 bits or 5000 bytes in 10
msec.
This is an upper bound on frame length.
From this amount, some overhead bytes must be subtracted, giving
a slightly lower limit for the data portion.
Practice Problem # 3

Q:
At a transmission rate of 5 Mbps and a propagation speed
of 200 m/msec, to how many meters of cable is the 1-bit
delay in a token ring interface equivalent?

A:
–
–
–
At 5 Mbps, a bit time is 200 nsec.
In 200 ns, the signal travels 40 m.
Thus, insertion of one new station adds as much delay as insertion
of 40 meters of cable.
Practice Problem # 4

Q:
A very heavily loaded 1-km long,
10 Mbps token ring has a
propagation speed of 200
m/msec. There are 50 stations
uniformly spaced along the ring.
Data frames are 256 bits,
including 32 bits of overhead.
Acknowledgements are
piggybacked onto the data
frames are are thus included as
spare bits within the data frames
and are effectively free. The
token is 8 bits. Is the effective
data rate of this ring higher or
lower than the effective data
rate of 10 mbps CSDM/CD
network?

A:
–
–
–
–
Measured from the time of token
capture, it takes 25.6 msec to
transmit a packet.
Additionally, a token must be
transmitted, taking 0.8 msec
Token must propagate 20 meters
taking 0.1 msec.
Thus we have sent 224 bits in
26.5 msec, which results in an
effective data rate of 8.5 Mbps.
This is more than the effective
bandwidth for the Ethernet (4.7
Mbps(why?)) under the same
parameters.
Practice Problem # 5

Q:
Ethernet frame must be at least 64 bytes long to ensure
that the transmitter is still going in the event of a collision
at the far end of the cable. Fast Ethernet has the same 64
byte minimum frame size but can get the bits out ten
times faster. How is it possible to maintain the same
minimum frame size?

A:
The maximum wire length in Fast Ethernet is 1/10 as long
as in the regular Ethernet.
Practice Problem # 6

Q:
A large FDDI ring has 100 stations and a token rotation
time of 40 msec. The token holding time is 10 msec.
What is the maximum achievable efficiency of the ring?

A:
–
–
–
With a rotation time of 40 msec and 100 stations, the time for the
token to move between stations is 40/100=0.4 msec.
A station may transmit for 10 msec, followed by a 0.4 msec gap
while the token moves to the next station.
The best case efficiency is then 10/10.4=96%.
IEEE 802.11 Wireless LAN
Power management



Idea: switch the transceiver off if not needed
States of a station: sleep and awake
Timing Synchronization Function (TSF)
–

Infrastructure
–
–

stations wake up at the same time
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?)
Power saving with wake-up patterns
(infrastructure)
TIM interval
access
point
DTIM interval
D B
T
busy
medium
busy
T
d
D B
busy
busy
p
station
d
t
T
TIM
D
B
broadcast/multicast
DTIM
awake
p PS poll
d data transmission
to/from the station
Power saving with wake-up patterns (ad-hoc)
ATIM
window
station1
beacon interval
B1
station2
A
B2
B2
D
a
B1
d
t
B
beacon frame
awake
random delay
a acknowledge ATIM
A transmit ATIM
D transmit data
d acknowledge data
802.11 - Roaming


No or bad connection? Then perform:
Scanning
–

Reassociation Request
–

station sends a request to one or several AP(s)
Reassociation Response
–
–

scan the environment, i.e., listen into the medium for beacon signals or send
probes into the medium and wait for an answer
success: AP has answered, station can now participate
failure: continue scanning
AP accepts Reassociation Request
–
–
–
signal the new station to the distribution system
the distribution system updates its data base (i.e., location information)
typically, the distribution system now informs the old AP so it can release
resources
WLAN: IEEE 802.11b
Frequency
–
On certain frequencies in the free 2.4 GHz ISM-band
Security
–
Limited, WEP insecure, SSID
Cost
–
100€ adapter, 250€ base station, dropping
Availability
–
Special
–
–
What’s
–
–
Many products, many vendors
Advantages/Disadvantages
Advantage: many installed systems, lot of experience, available worldwide, free ISM-band,
many vendors, integrated in laptops, simple system
Disadvantage: heavy interference on ISM-band, no service guarantees, slow relative speed
only
new?
Define a new PHY layer. All the MAC schemes, management procedures are the same
User data rate max. approx. 6 Mbit/s
Channel selection (non-overlapping)
Europe (ETSI)
channel 1
2400
2412
channel 7
channel 13
2442
2472
22 MHz
2483.5
[MHz]
US (FCC)/Canada (IC)
channel 1
2400
2412
channel 6
channel 11
2437
2462
22 MHz
2483.5
[MHz]
WLAN: IEEE 802.11a
Frequency
–
US 5 GHz: free 5.15-5.25, 5.25-5.35, 5.725-5.825 GHz ISM-band
Connection
–
set-up time
Connectionless/always on
Security
–
Limited, WEP insecure, SSID
Availability
–
Some products, some vendors
Quality
–
Typ. best effort, no guarantees (same as all 802.11 products)
Special
–
–
of Service
Advantages/Disadvantages
Advantage: fits into 802.x standards, free ISM-band, available, simple
system, uses less crowded 5 GHz band
Disadvantage: stronger shading due to higher frequency, no QoS
Operating channels for 802.11a / US U-NII
36
5150
40
44
48
52
56
60
64
5180 5200 5220 5240 5260 5280 5300 5320
channel
5350 [MHz]
16.6 MHz
149
153
157
161
channel
5725 5745 5765 5785 5805 5825 [MHz]
16.6 MHz
center frequency =
5000 + 5*channel number [MHz]
IEEE 802.11 Wireless LAN