The Medium Access Control (MAC) Sublayer - PowerPoint PPT Presentation

1 / 68
About This Presentation
Title:

The Medium Access Control (MAC) Sublayer

Description:

First (j-1) slots had collisions, jth slot success; qj = A(1-A)j-1 ... Service Classes. Constant bit rate service. Real-time variable bit rate service ... – PowerPoint PPT presentation

Number of Views:424
Avg rating:3.0/5.0
Slides: 69
Provided by: steve1893
Category:

less

Transcript and Presenter's Notes

Title: The Medium Access Control (MAC) Sublayer


1
The Medium Access Control (MAC)Sublayer
  • Chapter 4

2
The Channel Allocation Problem
  • Static Channel Allocation in LANs and MANs
  • Example FDM, where each link may be assigned a
    different frequency.
  • Works ok for only a small number of links
  • Performance is poor
  • Dynamic Channel Allocation in LANs and MANs
  • A common physical channel is to be shared
  • How to support effective sharing, e.g., which
    link should use the channel when and for how
    long, etc.

3
Performance
4
Dynamic Channel Allocation in LANs and MANs
  1. Station Model.
  2. Single Channel Assumption.
  3. Collision Assumption.
  4. (a) Continuous Time.(b) Slotted Time.
  5. (a) Carrier Sense.(b) No Carrier Sense.

5
Multiple Access Protocols
  • ALOHA
  • Carrier Sense Multiple Access Protocols
  • Collision-Free Protocols
  • Limited-Contention Protocols
  • Wavelength Division Multiple Access Protocols
  • Wireless LAN Protocols

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

7
Pure ALOHA (2)
  • Analysis background
  • Poisson arrivals
  • Frames arrive at random times
  • Random ? probabilistic behavior
  • N frames arriving in time t?
  • N is random (Poisson distribution)
  • Problem probability of no arrival in a time
    interval 2 frames ?
  • No collisions ? no arrivals in this interval
  • Time interval between two successive arrivals is
    Exponentially distributed
  • Vulnerable period for the shaded frame.

8
Pure ALOHA (3)
  • Slotted Aloha Channel is divided into time
    slots.
  • Any sender can access the channel at the
    beginning of a time slot
  • Collision window t G
  • Throughput versus offered traffic for ALOHA
    systems.

t
t
2t
3t
4t
9
Carrier Sense Multiple Access (CSMA)
  • Slotted Aloha can achieve a maximum of 37
    channel utilization
  • Why poor utilization? Senders do not bother to
    monitor the channel
  • This leads to higher collision probability
  • All senders monitor the channel to find out any
    one is already using the channel ? Carrier sense
  • If someone is using the channel what to do
  • Sender keeps itself busy in listening to the
    channel all the time (Persistent CSMA)
  • Sender backs off (sleeps) for random time before
    trying again (non-persistent CSMA)
  • Try again with probability p (lt 1) (p-persistent
    CSMA)

10
Persistent and Nonpersistent CSMA
  • Comparison of the channel utilization versus load
    for various random access protocols.

11
CSMA with Collision Detection
  • CSMA/CD can be in one of three states
    contention, transmission, or idle.

12
Collision-Free Protocols
t0
t1
t2
t6
t7
  • The basic bit-map protocol.
  • Low numbered stations are at a disadvantage (they
    have less time to react)
  • Overhead d/(Nd) (d frame size, N contention
    bits)
  • Low load overhead is higher
  • High load overhead Nd/(NNd) d/(d1)
  • Does not scale well i.e., as N becomes large.

13
Collision-Free Protocols (2)
  • N stations can be coded by log2N bits (instead of
    N)
  • Channel efficiency d/(d log2N)
  • The binary countdown protocol. A dash indicates
    silence.

14
Limited-Contention Protocols
  • Broadly, two methods for shared access
  • CSMA
  • Collision Free (CF)
  • Performance small delay at low load, high
    channel utilization at high loads
  • Low load ALOHA or CSMA have low delay CF high
    delay
  • High load ALOHA, CSMA too many collisions
  • High load collision free, but at the expense of
    increased overhead
  • Mix the two Limited contention protocols
  • Acquisition probability for a symmetric
    contention channel.

15
Adaptive Tree Walk Protocol
  • The tree for eight stations.
  • Assume previous frame was sent successfully. In
    the following contention slot 0
  • All stations are permitted to contend (I.e., we
    are node 1, level 0)
  • If only one (of 8) is ready, it acquires the
    channel.
  • Else, there was a contention and slot 1 is
    offered to stations under node 2
  • If stations under node 2 incur a collision,
    offer slot 3 to stations under 4 etc.
  • If none of the stations under 2 want the
    channel, next slot (3) is offered to node 3
  • Essentially, depth first traversal of the binary
    tree.

16
Wavelength Division Multiple Access Protocols
  • Wavelength division multiple access.

17
Wireless LAN Protocols
  • A wireless LAN. (a) A transmitting. (b) B
    transmitting.
  • Essentially, CSMA approach
  • What really matters is the interference at the
    receiver.
  • (a) node C may not hear node A, even though
    B can (hidden node problem)
  • (b) node B talking to A which can be heard
    by C, thus preventing C from talking to D,
    even though, C can not be heard by A (Exposed
    node problem)

18
Wireless LAN Protocols (2)
  • The MACA protocol. (a) A sending an RTS to B.
  • (b) B responding with a CTS to A.

19
Ethernet
  • Ethernet Cabling
  • Manchester Encoding
  • The Ethernet MAC Sublayer Protocol
  • The Binary Exponential Backoff Algorithm
  • Ethernet Performance
  • Switched Ethernet
  • Fast Ethernet
  • Gigabit Ethernet
  • IEEE 802.2 Logical Link Control
  • Retrospective on Ethernet

20
Ethernet Cabling
  • The most common kinds of Ethernet cabling.

21
Ethernet Cabling (2)
  • Three kinds of Ethernet cabling.
  • (a) 10Base5, (b) 10Base2, (c) 10Base-T.

22
Ethernet Cabling (3)
  • Cable topologies. (a) Linear, (b) Spine, (c)
    Tree, (d) Segmented.

23
Manchester Coding (Clock Embedding)
  • (a) Binary encoding, (b) Manchester encoding,
    (c) Differential Manchester encoding.
  • Each bit needs to be sampled in the middle
  • Because and noise and clock drift, middle point
    is difficult do establish
  • Manchester coding embeds clock within the data
    itself
  • Clock can be recovered from the data (strong
    signal at 2f)
  • Effective bandwidth is halved.

24
IEEE 802.2 Logical Link Control
  • (a) Position of LLC. (b) Protocol formats.

25
Ethernet MAC Sublayer Protocol
(a)
  • Frame formats
  • (a) DIX Ethernet, (b) IEEE 802.3.

(b)
  • Ethernet Address 6 bytes or 48 bits long
    (b0..b47)
  • Point to point address
  • Broadcast address FFFFFFFFFFFF
  • Multicast address range starting from 01005e
    b470

26
Ethernet MAC Sublayer Protocol (2)
  • Collision detection can Take as long as 2t
  • Minimum packet size considerations
  • Collision (if occurring) must be detected while
    sender is in the transmission state
  • That is, frame duration should be gt 2t
  • Minimum frame t/bit rate
  • Bit rate 10Mbps, Max. cable length 2500m 4
    repeaters, 2t ? 50 µsec
  • Min. frame size 500 bits or 512 bits 64 bytes
    (hence the need for padding)
  • Collision ? binary exponential back off algorith
  • After collision, time is discretized into slots
    of duration 2t 51.2 µsec
  • 1st collision wait 0 or 1 slot time 2nd
    collision wait 0, 1,2,3 3rd 0..7 x 51.2 µsec
  • Max 1023 slots

27
Ethernet Performance
  • p prob. that a station contends
  • A prob. that some station is successful
  • Assume that ith station is successful
  • only the ith station wants to transmit (p)
  • none of the other (k-1) stations xmit
  • prob. that contention interval j slots?
  • First (j-1) slots had collisions, jth slot
    success qj A(1-A)j-1
  • Mean of collisions before success
  • Efficiency of Ethernet at 10 Mbps with 512-bit
    slot times.
  • For optimal p, mean contention interval

28
Switched Ethernet
  • A simple example of switched Ethernet.

29
Fast Ethernet
  • The original fast Ethernet cabling.

30
Gigabit Ethernet
  • (a) A two-station Ethernet. (b) A multistation
    Ethernet.

31
Gigabit Ethernet (2)
  • Gigabit Ethernet cabling.

32
Wireless LANs
  • The 802.11 Protocol Stack
  • The 802.11 Physical Layer
  • The 802.11 MAC Sublayer Protocol
  • The 802.11 Frame Structure
  • Services

33
The 802.11 Protocol Stack
  • Part of the 802.11 protocol stack.

34
The 802.11 MAC Sublayer Protocol
  • (a) The hidden node problem.
  • (b) The exposed node problem.
  • Wireless technology inherently can not support
    CSMA/CD
  • The CD part is not possible (receiver will get
    saturated with its stations transmitter)
  • 802.11 instead uses CSMA/CA (collision avoidance)
  • Collision avoidance use of DCF(mandatory) and
    PCF (optional uses WAP)

35
802.11 Operation Modes
Ad-hoc mode
Infrastructure mode
36
Coordination Modes
  • DCF Distributed coordination function stations
    communicate among themselves
  • PCF Point coordination function controlled by
    AP used as a base station
  • AP polls all stations that want to communicate
  • AP stores and forwards frames
  • Reservation is implied via polling, hence
    collision free
  • PCF is optional

37
The 802.11 MAC DCF
  • The use of virtual channel sensing using CSMA/CA.

38
802.11 MAC Frame Fragmentation
  • Need to fragment a frame wireless channel
    exhibits high BER, Perr p 10-4
  • Ethernet frame 1518 bytes ? n12,144 bits
  • Prob. Of entire frame incurring no error (1-p)n
    lt 0.30
  • Why not make n smaller ? entire is broken down
    into smaller fragments
  • Each fragment is individually ACKed
  • Higher probability of fragment being received
    correctly
  • Less time overhead to re-transmit fragments.
  • A fragment burst.

39
802.11 MAC Inter-frame Timings
  • Interframe spacing in 802.11.

40
The 802.11 Frame Structure
12-bit frame, 4-bit fragement
Re-xmitted fragment (lost ACK?)
WEP in use
Data Control Mgmt
POLL RTS CTS ACK etc.
A1 A2 A3 A4
DA, SA, BSSID, N/A DA,
BSSID SA N/A BSSID SA
DA N/A RAAP TAAP DA
SA
  • 0 0
  • 0 1
  • 0
  • 1 1

More fragments of this frame are remaining
Used only by AP to inform that it has more
frames (buffered) for the dest. station
  • The 802.11 data frame.

41
802.11 Services
Services 5 distribution service 4 station
services
  • Distribution service
  • Association
  • Disassociation
  • Re-association
  • Distribution (wireless, routing..)
  • Integration (Bridging)

42
802.11 Services
  • Intracell (station) Services
  • Authentication
  • Deauthentication (on leaving)
  • Privacy (must be encrypted)
  • Data Delivery

43
Broadband Wireless
  • 802.16 is being discussed by the IEEE
  • Connecting building using broadband wireless
  • 802.11 concerned with connecting mobile stations
  • Higher bandwidth (16-55 Ghz)
  • Security
  • Various traffic classes

44
The 802.16 Protocol Stack
  • The 802.16 Protocol Stack.

45
The 802.16 Physical Layer
  • The 802.16 transmission environment.

46
The 802.16 Physical Layer (2)
  • Frames and time slots for time division duplexing.

47
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

48
The 802.16 Frame Structure
  • (a) A generic frame. (b) A bandwidth request
    frame.

49
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

50
Bluetooth Architecture
  • Two piconets can be connected to form a
    scatternet.

51
Bluetooth Applications
  • The Bluetooth profiles.

52
The Bluetooth Protocol Stack
  • The 802.15 version of the Bluetooth protocol
    architecture.

53
The Bluetooth Frame Structure
  • A typical Bluetooth data frame.

54
Data Link Layer Switching
  • Bridges from 802.x to 802.y
  • Local Internetworking
  • Spanning Tree Bridges
  • Remote Bridges
  • Repeaters, Hubs, Bridges, Switches, Routers,
    Gateways
  • Virtual LANs

55
Data Link Layer Bridging
  • Multiple LANs connected by a backbone to handle a
    total load higher than the capacity of a single
    LAN.

56
Bridges from 802.x to 802.y
  • Transparent bridging stations should be
    oblivious of segmentation
  • Different segments may using different MAC/LLC
  • Operation of a LAN bridge from 802.11 to 802.3.

57
Bridges from 802.x to 802.y (2)
  • The IEEE 802 frame formats. The drawing is not
    to scale.

58
Local Internetworking
  • A configuration with four LANs and two bridges.

59
Spanning Tree Bridges
  • Two parallel transparent bridges.

60
Spanning Tree Bridges (2)
  • (a) Interconnected LANs. (b) A spanning tree
    covering the LANs. The dotted lines are not part
    of the spanning tree.

61
Remote Bridges
  • Remote bridges can be used to interconnect
    distant LANs.

62
Repeaters, Hubs, Bridges, Switches, Routers and
Gateways
  • (a) Which device is in which layer.
  • (b) Frames, packets, and headers.

63
Repeaters, Hubs, Bridges, Switches, Routers and
Gateways (2)
  • (a) A hub. (b) A bridge. (c) a switch.

64
Virtual LANs
  • A building with centralized wiring using hubs and
    a switch.

65
Virtual LANs (2)
  • (a) Four physical LANs organized into two
    VLANs, gray and white, by two bridges. (b) The
    same 15 machines organized into two VLANs by
    switches.

66
The IEEE 802.1Q Standard
  • Transition from legacy Ethernet to VLAN-aware
    Ethernet. The shaded symbols are VLAN aware.
    The empty ones are not.

67
The IEEE 802.1Q Standard (2)
  • The 802.3 (legacy) and 802.1Q Ethernet frame
    formats.

68
Summary
  • Channel allocation methods and systems for a
    common channel.
Write a Comment
User Comments (0)
About PowerShow.com