Medium Access Control (MAC) in Computer Networks: Random Access vs. Controlled Access, Study notes of Computer Systems Networking and Telecommunications

An overview of medium access control (mac) protocols in computer networks, focusing on random access and controlled access methods. Topics include aloha, csma, csma/cd, and their respective algorithms and performance. The document also discusses the advantages and disadvantages of contention access.

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-3fk-1
koofers-user-3fk-1 šŸ‡ŗšŸ‡ø

10 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1
EEC 189Q
ComputerNetworks
Medium Access Control (MAC)
Random vs. controlled access
Random Access
Aloha, CSMA, CSMA/CD
Reading: Chapter 6.2-6.4
Chuah, Fall 2004 2
Medium Access Sublayer
Medium Access Control (MAC)
Protocols
--- distributed algorithm that arbitrate
access to a common shared channel
among a population of users, i.e.,
determine when a node can
transmit
Physical
Network
Medium Access
Sublayer
Data Link
Chuah, Fall 2004 3
Communication Links
§Point to point link
-One sender, one receiver
-Dedicated channel
§Multi-access broadcast link
-Multiple senders, multiple potential receivers
-Shared media
Chuah, Fall 2004 4
Remarks on MAC Sublayer
§MAC is not important on point-to-point links
§MAC is only used in broadcast or shared channel
networks
-communication about ā€œsharingā€ must use the channel
itself!
§Examples:
-Packet-switched Radio Network (Aloha)
-Ethernet IEEE 802.3 (CSMA/CD)
-Token Ring IEEE 802.5, FDDI (Token Passing)
-Cellular, Satellite, Wireless LAN (MACAW)
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Medium Access Control (MAC) in Computer Networks: Random Access vs. Controlled Access and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity!

EEC 189Q

Computer Networks

Medium Access Control (MAC)

Random vs. controlled access

Random Access

Aloha, CSMA, CSMA/CD

Reading: Chapter 6.2-6.

Chuah, Fall 2004 2

Medium Access Sublayer

Medium Access Control (MAC)

Protocols

--- distributed algorithm that arbitrate

access to a common shared channel

among a population of users, i.e.,

determine when a node can

transmit

Physical

Network

Medium Access Sublayer

Data Link

Chuah, Fall 2004 3

Communication Links

ß Point to point link

  • One sender, one receiver
  • Dedicated channel

ß Multi-access broadcast link

  • Multiple senders, multiple potential receivers
  • Shared media

Chuah, Fall 2004 4

Remarks on MAC Sublayer

ß MAC is not important on point-to-point links

ß MAC is only used in broadcast or shared channel

networks

  • communication about ā€œsharingā€ must use the channel

itself!

ß Examples:

  • Packet-switched Radio Network (Aloha)
  • Ethernet IEEE 802.3 (CSMA/CD)
  • Token Ring IEEE 802.5, FDDI (Token Passing)
  • Cellular, Satellite, Wireless LAN (MACAW)

Chuah, Fall 2004 5

Broadcast Links: Multiple Access

Single shared communication channel

ß Only one can send successfully at a time

ß Two or more simultaneous transmissions

  • Interference

ß How to share a broadcast channel

  • Humans use multi-access protocols all the time

Chuah, Fall 2004 6

Contention Access Protocols

ß General Characteristics

  • Single channel/medium shared by a large number of

hosts

  • No coordination between hosts
  • Control is completely distributed

ß How does it compared to complete control with

switching?

Chuah, Fall 2004 7

Design Goals

ß Fully decentralized

ß Fairness among users

ß High efficiency

ß Low delay

ß Fault tolerance

Chuah, Fall 2004 8

Taxonomy of MAC Protocols

Chuah, Fall 2004 13

Pure Aloha Algorithm (cont’d)

2. Listen to the broadcast

ß Assume the receiver rebroadcasts the received signal, so the

sender can find out if its packet was destroyed just by

listening to downward broadcast one round-trip time after

sending it

3. If packet was destroyed, wait a random amount of

time, and send it again

ß prevent the same packet from colliding over and over again

Chuah, Fall 2004 14

Contention Period in Pure Aloha

ß Just send: no waiting for beginning of slot

ß If first bit of a new packet overlaps with last bit of a packet

almost finished, both packets are destroyed.

t : one packet transmission time ( L/R )

t 0 -t t 0 t 0 +t

Vulnerable period: 2t

Chuah, Fall 2004 15

Slotted Aloha

ß How to reduce vulnerability/contention period?

ß Time is divided into equal size slots

ß Nodes transmit at the beginning of a slot

  • Packets must be transmitted within a slot.

ß If collision, retransmit later

Success (S), Collision (C), Empty (E) slots

Chuah, Fall 2004 16

Contention Period in Slotted Aloha

t : one packet transmission time ( L/R ) = slot duration

Vulnerable period: t

t 0 -t t 0 t 0 +t

Packet could arrive in the

middle of a slot

Potential collision with

packets sent within

the same slot

Chuah, Fall 2004 17

Performance of Aloha Protocols

G = offered load = Np

Pure Aloha

Slotted Aloha

S = throughput = ā€œgoodputā€

(success rate)

Chuah, Fall 2004 18

Slotted vs Pure Aloha

ß Synchronous system

ß Have to wait till start of

next slot

ß Packets overlap

completely or not at all

ß Maximum throughput

0.37 (1/e)

ß Simpler, no

synchronization

ß No waiting for beginning

of slot

ß Packets may overlap

partially

ß Maximum throughput

0.18 (1/2e)

Chuah, Fall 2004 19

Carrier Sense Multiple Access

ß Aloha is inefficient (and rude)

  • Doesn’t listen before talking

ß CSMA: Listen before transmit

  • If channel idle, transmit entire packet
  • If busy, defer transmission
    • How long should we wait?
  • Human analogy: don’t interrupt others

ß Can carrier sense avoid collisions completely?

Chuah, Fall 2004 20

Assumptions with CSMA Networks

ß Constant length packets

ß No errors, except those caused by collisions

ß Each host can sense the transmission of all other

hosts

ß The propagation delay is small compared to the

transmission time.

Chuah, Fall 2004 25

Brain Teaser

ß Can we use 1-Persistent in Satellite Network

ß Satellite system has LONG propagation delay

  • time taken to sense the channel can be as long as 270 ms
  • vulnerability period = 540ms (1/2 a second)

=> CSMA doesn’t make sense here

Chuah, Fall 2004 26

1-Persistent CSMA

ß Even if propagation delay is zero, there will still

be collisions.

ß Why?

  • Nodes are greedy! They send packets as soon as they

ā€œhearā€ that the channel is idle!

Chuah, Fall 2004 27

Persistent and Non- persistent CSMA

ß p-persistent

  • If idle, transmit with probability p
  • If busy, wait till it becomes idle
  • If collision, wait random amount of time

ß Non-persistent

  • If idle, transmit
  • If busy, wait random amount of time

Chuah, Fall 2004 28

CSMA/CD Algorithm

ß Sense the channel

  • If idle, transmit immediately
  • If busy, wait until the channel becomes idle

ß Collision detection

  • Abort a transmission immediately if a collision is

detected

  • Try again later after waiting a random amount of time.

Chuah, Fall 2004 29

CSMA/CD

In CSMA protocols:

ß If two colliding stations will transmit their complete

packet, wasting the channel for the entire packet time.

CSMA with collision detection (CD)

ß Listen while talking

ß Stop transmitting when collision detected

  • Compare transmitted and received signals

ß Human analogy

  • Polite conversationalist

ß Worst case time to detect a collision?

Chuah, Fall 2004 30

Worst Case Collision Detection Time

Chuah, Fall 2004 31

Performance of CSMA/CD

ß Assume time -slotted channel

ß Probability that exactly one node transmits in a

given time slot

max

s

s p p p

N N

when p = 1/N

ß Average number of time slots A wasted before a

packet is transmitted successfully

A = s.0 + (1-s)(1+A)

ß When s = 0.4 , A = 1.

Chuah, Fall 2004 32

Performance of CSMA/CD (cont’d)

ß Relevant parameters

  • cable length, signal speed, frame size, bandwidth

ß More accurately (from simulation), channel

efficiency under heavy load

Efficiency = 1/ (1 + 5.4 a)

framesize

bandwidth

signalspeed

cablelength

TRANS

PROP

a = = Ɨ

Chuah, Fall 2004 37

Ethernet Frame Format

Dest addr

64 48 32

Preamble CRC Src addr

Type Body

48 16

Chuah, Fall 2004 38

Ethernet Addressing

ß 48-bit addresses

ß All adaptors receive all packets

  • Dropped if address do not match

ß Broadcast address

  • All 1’s: received and processed by all stations

ß Multicast addresses

  • First bit is 1

Chuah, Fall 2004 39

IEEE 802.3 Parameters

ß 1 bit time = time to transmit one bit

  • 10 Mbps Ƌ 1 bit time = 0.1 μs

ß Maximum network diameter ≤ 2.5km

  • Maximum 4 repeaters

ß Worst case collision detection time: 51.2 μs

ß Slot time

  • 51.2 μs = 512 bits = 64 bytes

Chuah, Fall 2004 40

Ethernet Summary

ß 1-persistent CSMA/CD

ß 51.2 μs to seize the channel

ß Collision not possible after 51.2 μs

ß Minimum frame size of 64 bytes

ß Binary exponential backoff

ß Works better under light load

ß Delivery time non-deterministic

Chuah, Fall 2004 41

Pros and Cons of Contention Access

Advantages:

ß Short delay for bursty traffic

ß Simple

ß Flexible to fluctuations in the

number of hosts

ß Fairness

Disadvantages:

ß Low channel efficiency

ß Not good for continuous

traffic

ß Cannot support priority traffic

ß High variance in transmission

delays