0% found this document useful (0 votes)
86 views

CS716 Advanced Computer Networks: by Dr. Amir Qayyum

This document discusses 802.11 MAC protocols and wireless network management. It covers CSMA/CA and its limitations with hidden and exposed nodes. It then describes the MACA and MACAW protocols which use RTS/CTS frames to avoid collisions from hidden nodes. The document also discusses managing connectivity and mobility in 802.11 networks using scanning, beacon frames, and associating with access points. It provides details on 802.11 frame formats and how network adapters transfer data and notify the host of events.

Uploaded by

Mr Haseeb
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

CS716 Advanced Computer Networks: by Dr. Amir Qayyum

This document discusses 802.11 MAC protocols and wireless network management. It covers CSMA/CA and its limitations with hidden and exposed nodes. It then describes the MACA and MACAW protocols which use RTS/CTS frames to avoid collisions from hidden nodes. The document also discusses managing connectivity and mobility in 802.11 networks using scanning, beacon frames, and associating with access points. It provides details on 802.11 frame formats and how network adapters transfer data and notify the host of events.

Uploaded by

Mr Haseeb
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 40

CS716

Advanced Computer Networks

By Dr. Amir Qayyum

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)
A-C and B-D 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
transmit 6
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 Ethernet 8
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
AP-2 F
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 APs 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 its AP
and initiates scanning for new AP
Scanning takes 2+ round-trip 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
AP-2 F
A B G
H
C
C E
D

16
Managing Mobility
Solution to handoff: APs 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:
6-bit Type field (data, RTS, CTS, scanning);
1-bit ToDS; and
1-bit FromDS
A single frame contains up to 2312 bytes of data
16 16 48 48 48 16 48 0 18,496 32

Control Duration Addr1 Addr2 Addr3 SeqCtrl Addr4 Payload CRC

ToDS=0, FromDS=0 C A
ToDS=1, FromDS=1 E AP-3 AP-1 A
19
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 (high-level overview)
Options for use
Data motion
Event notification
Potential performance bottlenecks
Programming device drivers 22
Typical Workstation Architecture

communication ?
CPU

Cache $
Network
memory adaptor to network
bus

I/O bus
Memory
Typically where data link
functionality is implemented
23
Components of a Network Adaptor
Bus interface communicates with a specific host
Bus defines protocol for CPU-adaptor communication
Link interface speaks correct protocol on network
Implemented by a chip set, in software or on FPGA
Buffering between different speed bus and link
Host I/O bus

Bus Link
network
Interface Interface

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
Host Perspective
CSR write: CPU instructs Adaptor
(e.g., transmit)
CSR read: Adaptor informs CPU (e.g.,
receive error)
Host CPU either poll CSR or
interrupted by OS
Interrupt handler routine disables
interrupts and is short 26
Data Motion Options for Network
Adaptor Use
Transfer frames between adaptor
and host memory
Programmed input/output (PIO)
Processor manages itself each
access (loads/stores)
Faster than DMA for small amounts
of data
27
Data Motion Options for Network
Adaptor Use
Direct memory access (DMA)
Adaptor gets buffer descriptor lists
by host for read/write
Processor is not involved: free to do
other things
Can be faster than memory copy
through CPU
Start-up cost 28
Data Motion - DMA
100

1400

1500

1500

1500

Buffer Memory buffers


descriptor
list

29
DMA: Scatter Read, Gather Write

Adaptor memory Host memory

Host memory Adaptor memory

Scatter Read Gather Write


30
Data Motion - PIO
Frames are buffered at adaptor
until CPU transfers them
CPU

Memory

Adaptor Memory

Adaptors have 128-512 KB of Host


expensive dual-port memory
31
Data Motion

Data movement
CPU
path using PIO

Cache $
Network
memory adaptor to network
bus

I/O bus
Memory Data movement
path using DMA
32
Network Adaptor: Event Notification

Hardware interrupts
Processor free to do other things
Events delivered immediately
State (register) save/restore
expensive
Context switches more
expensive 33
Network Adaptor: Event Notification

Event polling
Processor must periodically
check
Events wait until next check
No extra state changes
34
Device Drivers

Operating system routines anchoring


protocol stack to network hardware
Initialize device, transmit frames,
field interrupts
Code contains device specific details
Difficult to read but simple in logic
35
Device Drivers

Translates hosts message


into format expected by the
device
Sets CSR (e.g., to instruct
device to transmit)
36
Programming Device Drivers

Sample device driver in P&D sec 2.9.3


Better device driver(s) in Linux source
Key features
Memory-mapped control registers
Interrupt-driven
Handler code must execute quickly
Logically concurrent with other processes
37
Performance Bottlenecks

Link capacity
Processor computing power
I/O bus bandwidth
Overhead involved in each bus
transfer
38
Performance Bottlenecks

Memory bus bandwidth


Memory hierarchy with cache
levels
Memory accesses results in
multiple memory copies in
different buffers
39
Memory Bandwidth on an Alpha

I/O bus
956 Mbps
Main
800
memory
4.48 Gbps Mbps

CPU
16 Gbps L2
L1 cache
cache crossbar

40

You might also like