CS716
Advanced Computer Networks
By Dr. Amir Qayyum
1
1
Lecture No. 13
2
802.11 MAC: CSMA/CA
• Similar to Ethernet …
– Defer the transmission until the link
becomes idle
– Take back off if collision occurs
• Is it sufficient ?
• All nodes are not always within
reach of (to hear) each other
3
Hidden and Exposed Nodes
• Hidden nodes
– Sender thinks its OK to send when its not (false +ve)
– AC and BD are hidden nodes in the figure below
• Exposed nodes
– Sender does not send when its OK to send (false –ve)
– B and C are exposed nodes in the figure below
A
B
C
D
4
Multiple Access with Collision
Avoidance (MACA)
• Sender transmits RequestToSend
(RTS) frame
– contains intended time to hold the
medium
• Receiver replies with
ClearToSend (CTS) frame
5
Multiple Access with Collision
Avoidance (MACA)
• Neighbors of the receiver …
– hear CTS: keep quiet for the
intended duration (or till the
ACK is heard)
• Neighbors of only the sender
– hear RTS but not CTS: OK to
6
transmit
MACA for Wireless (MACAW)
• Receiver sends an ACK
when it receives a frame
–Signal for neighbors to start
their transmission
–Its neighbors are silent until
they hear ACK
7
MACA for Wireless (MACAW)
• Collision detection
– No active collision detection
– Known only if CTS or ACK is
not received
– Binary exponential back off
(BEB) is used in case of
collision, like in Ethernet8
802.11 Supporting Mobility
• Suitable for an ad hoc
configuration of nodes
– May or may not be able to
communicate with all other
nodes
– Depends upon how far apart
the nodes are
9
802.11 Supporting Mobility
• Nodes are free to move
around
– Set of directly reachable
nodes may change over time
(partial connectivity)
– Topology changes over time
10
802.11 Distribution System
• Nodes roam freely but operate
within a structure
– Tethered by wired network
infrastructure (Ethernet ?)
– Each Access Point (AP) services
nodes in some region
– Each mobile node associates itself
with an AP
11
802.11 Distribution System
Distribution system
AP-1
AP-3
F
AP-2
A
B
G
H
C
E
D
12
Managing Connectivity/Roaming
• How wireless nodes select Access Point ?
• Scanning (active search for an AP)
– node sends Probe frame
– all AP’s within reach reply with Probe
Response frame
– node selects one AP; sends it Associate
Request frame
– AP replies with Association Response
– new AP informs old AP via wired backbone
13
Managing Mobility
• Scanning is used only when node
has no AP
• Consider
– Node moves out of range of it’s AP
and initiates scanning for new AP
– Scanning takes 2+ roundtrip times
– No service until new AP found
14
Managing Mobility
• However
– Node was probably in range of
new AP before leaving range of
old AP
– Scanning too expensive to use
continuously
• How handoff between APs
managed as users move? 15
Managing Connectivity
• Active scanning: when a node join or move
• Passive scanning: AP periodically sends
Beacon frame, advertising its capabilities
Distribution system
AP-1
AP-3
F
AP-2
A
B
G
H
C
C
E
D
16
Managing Mobility
• Solution to handoff: AP’s send
periodic beacon frames
• Node may switch AP in response
to beacon
– if signal strength better from new AP
– using geographical information
– any other reason …
17
Managing Mobility
• 802.11 frames contain four
addresses
– actual sender and receiver
(source and dest.)
– AP for sender and receiver
(routing in backbone)
18
Frame Format
• Control field contains three subfields:
– 6bit Type field (data, RTS, CTS, scanning);
– 1bit ToDS; and
– 1bit FromDS
• A single frame contains up to 2312 bytes of data
16
16
48
48
48
16
48
Control
Duration
Addr1
Addr2
Addr3
SeqCtrl
Addr4
ToDS=0, FromDS=0
C A
ToDS=1, FromDS=1
E AP3 AP1 A
0– 18,496
Payload
19
32
CRC
Network Adaptors
20
Now you know …
• How direct link networks functions
• You know what the design issues are
• Most of the issues of direct link
networks are handled by the
network adaptors
• Lets have a quick look on design
issues of these pieces of hardware
21
Overview
• Also called network interface card (NIC)
• Components (highlevel overview)
• Options for use
– Data motion
– Event notification
• Potential performance bottlenecks
• Programming device drivers
22
Typical Workstation Architecture
communication ?
CPU
Cache $
Network
adaptor
memory
bus
Memory
to network
to network
I/O bus
Typically where data link
functionality is implemented
23
Components of a Network Adaptor
• Bus interface communicates with a specific host
– Bus defines protocol for CPUadaptor communication
• Link interface speaks correct protocol on network
– Implemented by a chip set, in software or on FPGA
Host I/O bus
• Buffering between different speed bus and link
Link
Interface
Bus
Interface
network
network
Network Adaptor
24
Host Perspective
• Adaptor is ultimately
programmed by CPU
• Adaptor exports a Control
Status Register (CSR)
• CSR is readable and writable
from CPU at some memory
25
address