M C Module 4 - Wi-Fi
M C Module 4 - Wi-Fi
M C Module 4 - Wi-Fi
Advantages --
- very flexible within the transmission area
- ad-hoc networks without previous planning possible
- (almost) no wiring difficulties (e.g. historic buildings, firewalls)
- more robust against disasters like, e.g., earthquakes, fires
- or users pulling a plug...
Disadvantages--
- typically lower user data rates/higher delays and delay jitter compared
to wired networks due to shared medium, lots of interference (it depends
on your neighbors!)
- different/proprietary solutions, especially for higher bit-rates or low-
power, standards take their time, devices have to fall back to
older/standard solutions
- products have to follow many national restrictions if working wireless,
it takes longer time to establish global solutions
- Safety and security: Using radio waves for data transmission might
interfere with other high-tech equipment in, e.g., hospitals.
Design goals for wireless LANs
Station (STA)
- terminal with access mechanisms
to the wireless medium and radio
contact to the access point
Basic Service Set (BSS) - group of
stations using the same radio
frequency
Access Point - station integrated
into the wireless LAN and the
distribution system
Portal - bridge to other (wired)
networks
Distribution System -
interconnection network to form one
logical network
(EES: Extended Service Set)
based on several BSS
Figure shows the components of an infrastructure and a wireless part as
specified for IEEE 802.11. Several nodes, called stations (STAi), are
connected to access points (AP). Stations are terminals with access
mechanisms to the wireless medium and radio contact to the AP. The stations
and the AP which are within the same radio coverage form a basic service set
(BSSi). The example shows two BSSs – BSS1 and BSS2 – which are
connected via a distribution system.
A distribution system connects several BSSs via the AP to form a
single network and thereby extends the wireless coverage area. This
network is now called an extended service set (ESS) and has its
own identifier, the ESSID. The ESSID is the „name‟ of a network and
is used to separate different networks. Without knowing the ESSID
(and assuming no hacking) it should not be possible to participate in
the WLAN. The distribution system connects the wireless networks
via the APs with a portal, which forms the interworking unit to other
LANs.
802.11 - Architecture of an ad-hoc network
- Station (STA):
terminal with access
mechanisms to the wireless
medium
- Independent Basic Service Set
(IBSS):
group of stations using the same
radio frequency
In addition to infrastructure-based networks, IEEE 802.11 allows the
building of ad-hoc networks between stations, thus forming one or
more independent BSSs (IBSS) as shown in Figure . In this case, an
IBSS comprises a group of stations using the same radio frequency.
Stations STA1, STA2, and STA3 are in IBSS1, STA4 and STA5 in
IBSS2. This means for example that STA3 can communicate directly
with STA2 but not with STA5. Several IBSSs can either be formed via
the distance between the IBSSs or by using different carrier
frequencies (then the IBSSs could overlap physically). IEEE 802.11
does not specify any special nodes that support routing, forwarding of
data or exchange of topology information as, e.g., HIPERLAN 1 or
Bluetooth.
IEEE standard 802.11 Protocol architecture
As indicated by the standard number, IEEE 802.11 fits seamlessly into the other
802.x standards for wired LANs. Figure shows the most common scenario: an
IEEE 802.11 wireless LAN connected to a switched IEEE 802.3 Ethernet via a
bridge. Applications should not notice any difference apart from the lower
bandwidth and perhaps higher access time from the wireless LAN. The WLAN
behaves like a slow wired LAN. Consequently, the higher layers (application, TCP,
IP) look the same for wireless nodes as for wired nodes. The upper part of the data
link control layer, the logical link control (LLC), covers the differences of the medium
access control layers needed for the different media.
802.11 - Layers and functions
MAC PHY
● Synchronization: The first 128 bits are not only used for
synchronization, but also gain setting, energy detection and
frequency offset compensation.
● Start frame delimiter (SFD): This 16 bit field is used for
synchronization at the beginning of a frame and consists of the
pattern 1111001110100000.
● Signal: Originally, only two values have been defined for this
field to indicate the data rate of the payload. The value 0x0A
indicates 1 Mbit/s (and thus DBPSK), 0x14 indicates 2 Mbit/s
(and thus DQPSK). Other values have been reserved for future
use, i.e., higher bit rates.
● Service: This field is reserved for future use; however, 0x00
indicates an IEEE 802.11 compliant frame.
● Length: 16 bits are used in this case for length indication of the
payload in microseconds.
● Header error check (HEC): Signal, service, and length fields
are protected by this checksum using the ITU-T CRC-16 standard
polynomial.
Infra red
The PHY layer, which is based on infra red (IR) transmission, uses
near visible light at 850–950 nm. Infra red light is not regulated
apart from safety restrictions (using lasers instead of LEDs). The
standard does not require a line-of-sight between sender and
receiver, but should also work with diffuse light. This allows for
point-to-multipoint communication. The maximum range is about
10 m if no sunlight or heat sources interfere with the transmission.
Typically, such a network will only work in buildings, e.g.,
classrooms, meeting rooms etc.
Frequency reuse is very simple – a wall is more than enough to
shield one IR based IEEE 802.11 network from another.
Today, no products are available that offer infra red
communication based on 802.11. Proprietary products offer, e.g.,
up to 4 Mbit/s using diffuse infra red light
Medium access control layer
The MAC layer has to fulfill several tasks. First of all, it has to
control medium access, but it can also offer support for
roaming, authentication, and power conservation. The
basic services provided by the MAC layer are the mandatory
asynchronous data service and an optional time-bounded
service. While 802.11 only offers the asynchronous service
in ad-hoc network mode, both service types can be offered
using an infrastructure-based network together with the
access point coordinating medium access.
Figure explains the basic access mechanism of IEEE 802.11 for five
stations trying to send a packet at the marked points in time. Station3
has the first request from a higher layer to send a packet (packet arrival
at the MAC SAP). The station senses the medium, waits for DIFS and
accesses the medium, i.e., sends the packet. Station1, station2, and
station5 have to wait at least until the medium is idle for DIFS again
after station3 has stopped sending. Now all three stations choose a
backoff time within the contention window and start counting
down their backoff timers.
802.11 -Competing stations -simple version
Figure shows the random backoff time of station1 as sum of boe (the
elapsed backoff time) and bor (the residual backoff time). The same is
shown for station5. Station2 has a total backoff time of only boe and
gets access to the medium first. No residual backoff time for station2 is
shown. The backoff timers of station1 and station5 stop, and the
stations store their residual backoff times. While a new station has to
choose its backoff time from the whole contention window, the two old
stations have statistically smaller backoff values. The older values are
on average lower than the new ones.
802.11 -Competing stations -simple version
Now station4 wants to send a packet as well, so after DIFS waiting time,
three stations try to get access. It can now happen, as shown in the
figure, that two stations accidentally have the same backoff time, no
matter whether remaining or newly chosen. This results in a collision on
the medium as shown, i.e., the transmitted frames are destroyed.
Station1 stores its residual backoff time again. In the last cycle shown
station1 finally gets access to the medium, while station4 and station5
have to wait. A collision triggers a retransmission with a new random
selection of the backoff time. Retransmissions are not privileged.
The contention window starts with a size of, e.g., CWmin = 7.
Each time a collision occurs, indicating a higher load on the
medium, the contention window doubles up to a maximum of, e.g.,
CWmax = 255 (the window can take on the values 7, 15, 31, 63,
127, and 255). The larger the contention window is, the greater is
the resolution power of the randomized scheme. It is less likely to
choose the same random backoff time using a large CW.
However, under a light load, a small CW ensures shorter access
delays. This algorithm is also called exponential backoff and is
already familiar from IEEE 802.3 CSMA/CD in a similar version.
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 (FCS)
automatic retransmission of data packets in case of transmission
errors, but exponential increase of contention window
802.11 –DCF with RTS/CTS
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 using NAV (Network
allocation vector.)
Fragmentation
MAC Frame format
Types
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
802.11 –MAC Frame format
Acknowledgement
Request To Send
Clear To Send
MAC management
MAC management plays a central role in an IEEE 802.11 station as it
more or less controls all functions related to system integration, i.e.,
integration of a wireless station into a BSS, formation of an ESS,
synchronization of stations etc. The following functional groups have
been identified and will be discussed in more detail in the following
sections:
● Synchronization: Functions to support finding a wireless LAN,
synchronization of internal clocks, generation of beacon signals.
● Power management: Functions to control transmitter activity for
power conservation, e.g., periodic sleep,without missing a frame.
● Roaming: Functions for joining a network (association), changing
access points, scanning for access points.
● Management information base (MIB): All parameters
representing the current state of a wireless station and an access
point are stored within a MIB for internal and external access. A MIB
can be accessed via standardized protocols such as the simple
network management protocol (SNMP).
Synchronization-
Each node of an 802.11 network maintains an internal clock. To
synchronize the clocks of all nodes, IEEE 802.11 specifies a
timing synchronization function (TSF). As we will see in the
following section, synchronized clocks are needed for power
management, but also for coordination of the PCF and for
synchronization of the hopping sequence in an FHSS system.
Using PCF, the local timer of a node can predict the start of a
super frame, i.e., the contention free and contention period. FHSS
physical layers need the same hopping sequences so that all
nodes can communicate within a BSS.
Within a BSS, timing is conveyed by the periodic transmissions of
a beacon frame. A beacon contains a timestamp and other
management information used for power management and
roaming (e.g., identification of the BSS). The timestamp is used by
a node to adjust its local clock. The node is not required to hear
every beacon to stay synchronized; however, from time to time
internal clocks should be adjusted. The transmission of a beacon
frame is not always periodic because the beacon frame is also
deferred if the medium is busy.
Beacon transmission in a busy 802.11 infrastructure network
All stations (in the example, only one is shown) wake up prior to
an expected TIM or DTIM. In the first case, the access point has to
transmit a broadcast frame and the station stays awake to receive
it. After receiving the broadcast frame, the station returns to
sleeping mode. The station wakes up again just before the next
TIM transmission. This time the TIM is delayed due to a busy
medium so, the station stays awake. The access point has nothing
to send and the station goes back to sleep.
Power saving with wake-up patterns (infrastructure)
At the next TIM interval, the access point indicates that the station
is the destination for a buffered frame. The station answers with a
PS (power saving) poll and stays awake to receive data. The
access point then transmits the data for the station, the station
acknowledges the receipt and may also send some data (as
shown in the example). This is acknowledged by the access point
(acknowledgments are not shown in the figure). Afterwards, the
station switches to sleep mode again.
Power saving with wake-up patterns (infrastructure)
Finally, the access point has more broadcast data to send at the
next DTIM interval, which is again deferred by a busy medium.
Depending on internal thresholds, a station may stay awake if the
sleeping period would be too short. This mechanism clearly shows
the trade-off between short delays in station access and saving
battery power. The shorter the TIM interval, the shorter the
delay, but the lower the power-saving effect.
U-APSD –WMM Power Save
Procedure for unicast data delivered to a STA in PS mode
STA triggers release of buffered data from AP
WMM Power Save based on legacy procedures plus optional U-
APSD
Advantages:
No more polling needed
Downlink data frames sent together in a fast sequence
Trigger frame may already contain data –ideal e.g. for VoIP
Applications specify PS behavior, i.e. sleep period
Power management in IEEE 802.11 ad-hoc networks
Reassociation Request
station sends a request to one or several AP(s)
Reassociation Response
success: AP has answered, station can now participate
failure: continue scanning
AP accepts ReassociationRequest
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.
The steps for roaming between access points are:
● A station decides that the current link quality to its access point
AP1 is too poor. The station then starts scanning for another
access point.
● Scanning involves the active search for another BSS and can
also be used for setting up a new BSS in case of ad-hoc
networks. IEEE 802.11 specifies scanning on single or multiple
channels (if available at the physical layer) and
differentiates between passive scanning and active scanning.
Passive scanning simply means listening into the medium to find
other networks, i.e., receiving the beacon of another network
issued by the synchronization function within an access point.
Active scanning comprises sending a probe on each channel
and waiting for a response. Beacon and probe responses contain
the information necessary to join the new BSS.
● The station then selects the best access point for roaming
based on, e.g., signal strength, and sends an association
request to the selected access point AP2.
● The new access point AP2 answers with an association
response. If the response is successful, the station has roamed
to the new access point AP2. Otherwise, the station has to
continue scanning for new access points.
● The access point accepting an association request indicates the
new station in its BSS to the distribution system (DS). The DS
then updates its database, which contains the current location of
the wireless stations. This database is needed for forwarding
frames between different BSSs, i.e. between the different
access points controlling the BSSs, which combine to form an
ESS . Additionally, the DS can inform the old access point AP1
that the station is no longer within its BSS.