0% found this document useful (0 votes)
15 views60 pages

Mac Layer

The document discusses the medium access control (MAC) sublayer of the data link layer. It provides functions such as interfacing with the network layer, delivering data to peer stations, handling transmission errors, and managing bandwidth. MAC protocols coordinate packet transmission, retransmission of damaged packets, and resolving collisions. They are classified based on whether nodes actively seek access or wait to be polled, and whether access is contention-free, contention-oriented, or uses a hybrid approach. Popular MAC protocols discussed include ALOHA, carrier sense multiple access, and protocols used in wireless networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views60 pages

Mac Layer

The document discusses the medium access control (MAC) sublayer of the data link layer. It provides functions such as interfacing with the network layer, delivering data to peer stations, handling transmission errors, and managing bandwidth. MAC protocols coordinate packet transmission, retransmission of damaged packets, and resolving collisions. They are classified based on whether nodes actively seek access or wait to be polled, and whether access is contention-free, contention-oriented, or uses a hybrid approach. Popular MAC protocols discussed include ALOHA, carrier sense multiple access, and protocols used in wireless networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 60

The Medium Access Control

Sublayer

Copyright 2012 Jim Martin 1


Data Link Functions

• Provide a well-defined service interface to the


network layer
• Handle delivering service data units (SDUs) to peer
link stations
• Deal with transmission errors
• Flow control to handle slow receivers
• Manage bandwidth amongst competing users

Copyright 2012 Jim Martin 2


Data Link Models

• Point-to-point (one-to-one)

• Broadcast (one-to-many)

Copyright 2012 Jim Martin 3


Broadcast Channels

• Also referred to as multiaccess channel, random


access channel
• Tanenbaum : The protocol used to determine who
goes next on a multiaccess channel belongs to a
sublayer of the data link layer called the media
access control (MAC) sublayer

Copyright 2012 Jim Martin 4


MAC Protocols

• From Peyravi : MAC protocols are designed to coordinate


transmission of packets, retransmission of damaged
packets, and resolution of collisions during contention
periods among stations
• Factors that affect performance:
• Propagation delay
• Packet size
• Coordination
• Traffic intensity, characteristics, and dynamics

Copyright 2012 Jim Martin 5


Classification
{Set of Protocols}

Active Passive

•Active nodes: actively seek access to the channel


•Passive nodes: wait to be polled

Copyright 2012 Jim Martin 6


Classification
Active

Contention Contention Limited


free oriented Contention

•Contention free: bandwidth is assigned statically or dynamically


•Contention oriented: transmissions by nodes are unsynchronized
•Limited contention: At low load, favor contention oriented, at higher
load favor contention free

Copyright 2012 Jim Martin 7


Classification
Contention
free

Fixed Demand
Assignment Assignment

•Fixed assignment: bandwidth allocation is statically assigned and


independent of node activity.
•Best known TDMA , FDMA, and CDMA : all guarantee no collisions
•Best for networks with a small number of nodes each with predictable
(known) traffic patterns

Copyright 2012 Jim Martin 8


Classification
Contention
free

Fixed Demand
Assignment Assignment

•Demand assignment
•Also referred to as Demand Assignment Multiple Access (DAMA)
•Nodes request bandwidth or grab a token that circulates around a loop of
nodes
•Nodes request bandwidth implicitly or explicitly
•Explicit: a single reservation slot is assigned to each node
•Implicit: stations use slotted Aloha to compete for reservation slots
•Best for networks where traffic is random and unpredictable

Copyright 2012 Jim Martin 9


Classification
Contention
oriented

Random
Reservation Hybrid
Access

•Random Access:
•Asynchronous: stations not synchronized and send when ready
•Aloha: satellite network from the 1970s
•Synchronous: stations required to synchronize transmissions with fixed-
length time slots
•Slotted Aloha: minor enhancement to pure Aloha
•Sensing: over networks with short prop delays, nodes can sense:
•Carrier (Carrier Sense Multiple Access)
•Carrier with Collision Detect (CSMA/CD) : Ethernet
•Carrier sense with Collision Avoidance (CSMA/CA) : 802.11
Copyright 2012 Jim Martin 10
Classification
Contention
oriented

Random
Reservation Hybrid
Access

•Reservation:
•Objective is to avoid collisions through a reservation subchannel which
allows contention-free data transmission
•Reservation Aloha: distributed contention protocol with implicit
reservations
•Successful transmission of a slot serves as the reservation for
sending in the next slot
•Initial access of a slot is with slotted Aloha

Copyright 2012 Jim Martin 11


Classification
Contention
oriented

Random
Reservation Hybrid
Access

•Hybrid: Rather than Random Access with TDMA (i.e., Reservation), use
reservation with contention
•Aloha Reservation (Aloha-R) is a distributed connection-oriented
reservation protocol (introduces the ‘mini-slot’)
•Explicit reservations done through contention-oriented transmission
of well known reservation slots
•Data slots are allocated to specific users based on reservation
requests

Copyright 2012 Jim Martin 12


The Channel Allocation Problem

• The MAC sublayer determines who sends on a


multiaccess channel with competing users.
• Static Channel Allocation in LANs and
MANs
• Dynamic Channel Allocation in LANs and
MANs

Copyright 2012 Jim Martin 13


Static Channel Allocation

• Telephone trunk channel divided among competing


users via frequency division multiplexing (FDM).
• Problems?

Copyright 2012 Jim Martin 14


Static Channel Allocation

• Telephone trunk channel divided among competing users


via frequency division multiplexing (FDM).
• Problems?
• What if the spectrum is divided into N regions,
but there are < N users?
• What if there are N users but they do not always
have data to send?
• Same problems hold for a static TDM channel allocation
method.
Static models do not work well with bursty traffic!
Copyright 2012 Jim Martin 15
Dynamic Channel Allocation Model
1.Station Model. N independent stations that generate frames
with at a constant rate of . Once a station has a frame to send,
it blocks until the frame is successfully sent.
2.Single Channel Assumption. One channel is available for all
stations to send and receive.
3.Collision Assumption. If two frames sent at the same time,
neither are successfully received. All stations detect collisions.
4.(a) Continuous Time. No predefined burst times.
(b) Slotted Time. Senders restricted to sending in discrete
intervals.
5.(a) Carrier Sense. Stations can tell if the channel is in use
prior to transmitting.
(b) No Carrier Sense. Stations just transmit and check for a
successful transmission.

Copyright 2012 Jim Martin 16


Multiple Access Protocols

• ALOHA
• Carrier Sense Multiple Access Protocols
• Collision-Free Protocols
• Limited-Contention Protocols
• Wireless LAN Protocols (WIFI!!)
• 802.16 (WIMAX!!)
• Cable access
• Wireless sensor networks

Copyright 2012 Jim Martin 17


Copyright 2012 Jim Martin 18
Terminalogy and Concepts
• Contention free protocols:
• Good for high utilization scenarios
• Controls packet delay
• Generally centralized rather than distributed
• Contention-oriented protocols:
• Persistence: behavior of CSMA sender
• 1-persistent: senses clear channel and sends with probability 1. If channel is busy it waits until
clear and then sends.
• P-persistent: senses clear channel and sends with probability p. If the channel is busy it waits a
random time and then tries again.
• Non-persistent : senses clear channel and sends. If channel is busy, it waits a random time and
then tries again.
• Reservation protocols implicitly reserve bandwidth – a successful contention-based
transmission reserves the channel for a future transmission

• Hybrid: uses explicit reservations either with a control channel or through a contention-
request mechanism
• Idea is to use inefficient contention transmission to request a contention-free data transmission in
the future.
• Aloha-R : Ancestor to DOCSIS

Copyright 2012 Jim Martin 19


Pure ALOHA

In pure ALOHA, frames are transmitted at completely arbitrary times.


Copyright 2012 Jim Martin 20
Pure ALOHA (2)

Vulnerable period for the shaded frame.


Copyright 2012 Jim Martin 21
Pure ALOHA (3)

Throughput versus offered traffic for ALOHA systems.


Copyright 2012 Jim Martin 22
Persistent and Nonpersistent CSMA

Comparison of the channel utilization versus load for various


random access protocols.
Copyright 2012 Jim Martin 23
CSMA with Collision Detection

CSMA/CD can be in one of three states: contention,


transmission, or idle.
Copyright 2012 Jim Martin 24
Collision-Free Protocols

The basic bit-map protocol.


Copyright 2012 Jim Martin 25
Collision-Free Protocols (2)

The binary countdown protocol. A dash indicates silence.


Copyright 2012 Jim Martin 26
Limited-Contention Protocols

Acquisition probability for a symmetric contention channel.


Copyright 2012 Jim Martin 27
Adaptive Tree Walk Protocol

The tree for eight stations.


Copyright 2012 Jim Martin 28
Wireless LAN Protocols

A wireless LAN. (a) A transmitting. (b) B transmitting.

Copyright 2012 Jim Martin 29


Wireless LAN Protocols (2)

The MACA protocol. (a) A sending an RTS to B.


(b) B responding with a CTS to A.
Copyright 2012 Jim Martin 30
The 802.11 MAC Sublayer Protocol

(a) The hidden station problem.


(b) The exposed station problem.
Copyright 2012 Jim Martin 31
Glossary of 802.11 Wireless Terms [1]

a) Station (STA): A computer or device with a wireless network interface.


b) Access Point (AP): Device used to bridge the wireless-wired boundary, or to
increase distance as a wireless packet repeater.
c) Ad Hoc Network: A temporary one made up of stations in mutual range.
d) Infrastructure Network: One with one or more Access Points.
e) Channel: A radio frequency band, or Infrared, used for shared communication.
f) Basic Service Set (BSS): A set of stations communicating wirelessly on the
same channel in the same area, Ad Hoc or Infrastructure.
g) Extended Service Set (ESS): A set BSSs and wired LANs with Access Points
that appear as a single logical BSS.

Copyright 2012 Jim Martin 32


Glossary of 802.11 Wireless Terms (cont.)

a) BSSID & ESSID: Data fields identifying a stations BSS & ESS.
b) Clear Channel Assessment (CCA): A station function used to
determine when it is OK to transmit.
c) Association: A function that maps a station to an Access Point.
d) MAC Service Data Unit (MSDU): Data Frame passed between user &
MAC.
e) MAC Protocol Data Unit (MPDU): Data Frame passed between MAC
& PHY.
f) PLCP Packet (PLCP_PDU): Data Packet passed from PHY to PHY
over the Wireless Medium.

Copyright 2012 Jim Martin 33


Overview - 802.11 [1]

a) Multiple Physical Layers


– Frequency Hopping Spread Spectrum
– Direct Sequence Spread Spectrum
– Infrared
b) 2.4GHz Industrial, Scientific & Medical shared unlicensed band
– 2.4 to 2.4835GHz with FCC transmitted power limits
c) 2Mb/s & 1Mb/s data transfer
d) 50 to 200 feet radius wireless coverage

Copyright 2012 Jim Martin 34


IEEE 802.11 Topology

a) Independent Basic Service Set (IBSS) Networks


– Stand-alone BSS that has no backbone infrastructure and consists of at-least two wireless stations
– Often referred to as an ad-hoc network
– Applications include single room, sale floor, hospital wing

Copyright 2012 Jim Martin 35


Overview - 802.11 Architecture [1]

ESS

Existing
Wired LAN
AP AP
STA BSS STA STA BSS STA
Infrastructure
Network

STA STA
Ad Hoc BSS BSS Ad Hoc
Network Network
STA STA

Copyright 2012 Jim Martin 36


802.11 Media Access Control [2]

a) The Distributed Coordination Function (DCF): Fundamental, contention-based access method. Implemented for use with both ad hoc and infrastructure networks.
b) The Point Coordination Function (PCF): Optional, contention-free access method usable only on infrastructure networks.
c) DCF utilizes CSMA/CA.
d) PCF requires one node to function as a polling master. This node is called the point coordinator (PC).

Copyright 2012 Jim Martin 37


802.11 Media Access Control [2]
a) 802.11 has CSMA/CA (Collision Avoidance)
b) Carrier Sense: Listen before talking
– Physical Carrier Sense
– Virtual Carrier Sense
c) Handshaking to infer collisions
– DATA-ACK packets
d) Collision Avoidance
– RTS-CTS-DATA-ACK to request the medium
– Duration information in each packet
– Random Backoff after collision is determined
– Net Allocation Vector (NAV) to reserve bandwidth
– Hidden Nodes use CTS duration information

Copyright 2012 Jim Martin 38


802.11 Media Access Control (contd.)
a) Physical carrier-sense mechanism:
– Time windows specified to prioritize access to channel
– DIFS (Distributed Inter-Frame Space): Minimum
amount of time that any 802.11 node should wait
before initiating a new frame exchange.(used by
ordinary asynchronous traffic)
– SIFS (Short Inter-Frame Space): Minimum amount of
time a node should wait before transmitting any frame
in a pre-existing frame exchange. (Used by ACK,
CTS, poll response)
– PIFS : used by PC when issuing polls.
– In the event of collision, random exponential back off
algorithm is employed at the sender.

Copyright 2012 Jim Martin 39


802.11 Media Access Control (contd.)
a) Virtual carrier-sense mechanism:
– Explicit Request to Send (RTS)/ Clear to Send
(CTS) handshake to mitigate hidden node problem.
– Each such frame carries Duration field which
contains the amount of time (in microseconds) for
which the channel is reserved.
– Accounts for the time that will be required for
subsequent transmission.
– Value used to update the Network Allocation
Vector (NAV) on each node.
– A NAV value of 0 indicates that a node can initiate
transmission.

Copyright 2012 Jim Martin 40


802.11 Virtual Carrier Sense [4]

RTS B CTS
Data
RTS
RTS
CTS CTS
A S R C
Data Data
ACK

a) Receive RTS: Defer until CTS should have been sent


b) Receive CTS: Defer until Data should have been sent
c) If you don’t receive CTS or ACK, back off and try it all over again

Copyright 2012 Jim Martin 41


IFS Relationships [2]

Copyright 2012 Jim Martin 42


Basic Medium Access under the DCF [2]

Copyright 2012 Jim Martin 43


The 802.11 MAC Sublayer Protocol (2)

The use of virtual channel sensing using CSMA/CA.


Copyright 2012 Jim Martin 44
The 802.11 MAC Sublayer Protocol (3)

A fragment burst.
Copyright 2012 Jim Martin 45
The 802.11 MAC Sublayer Protocol (4)

Interframe spacing in 802.11.


Copyright 2012 Jim Martin 46
The 802.11 Frame Structure

The 802.11 data frame.


Copyright 2012 Jim Martin 47
802.11 Services

Distribution Services

• Association
• Disassociation
• Reassociation
• Distribution
• Integration
Copyright 2012 Jim Martin 48
802.11 Services

Intracell Services
• Authentication
• Deauthentication
• Privacy
• Data Delivery

Copyright 2012 Jim Martin 49


Broadband Wireless
• Comparison of 802.11 and 802.16
• The 802.16 Protocol Stack
• The 802.16 Physical Layer
• The 802.16 MAC Sublayer Protocol
• The 802.16 Frame Structure

Copyright 2012 Jim Martin 50


The 802.16 Protocol Stack

The 802.16 Protocol Stack.


Copyright 2012 Jim Martin 51
The 802.16 Physical Layer

The 802.16 transmission environment.


Copyright 2012 Jim Martin 52
The 802.16 Physical Layer (2)

Frames and time slots for time division duplexing.


Copyright 2012 Jim Martin 53
The 802.16 MAC Sublayer Protocol

Service Classes
• Constant bit rate service
• Real-time variable bit rate service
• Non-real-time variable bit rate service
• Best efforts service

Copyright 2012 Jim Martin 54


The 802.16 Frame Structure

(a) A generic frame. (b) A bandwidth request frame.


Copyright 2012 Jim Martin 55
Bluetooth
• Bluetooth Architecture
• Bluetooth Applications
• The Bluetooth Protocol Stack
• The Bluetooth Radio Layer
• The Bluetooth Baseband Layer
• The Bluetooth L2CAP Layer
• The Bluetooth Frame Structure

Copyright 2012 Jim Martin 56


Bluetooth Architecture

Two piconets can be connected to form a scatternet.


Copyright 2012 Jim Martin 57
Bluetooth Applications

The Bluetooth profiles.


Copyright 2012 Jim Martin 58
The Bluetooth Protocol Stack

The 802.15 version of the Bluetooth protocol architecture.


Copyright 2012 Jim Martin 59
The Bluetooth Frame Structure

A typical Bluetooth data frame.


Copyright 2012 Jim Martin 60

You might also like