Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Networks
CMPE 150
Fall 2005
Lecture 16
CMPE150IntroductiontoComputerNetworks
Announcements
Midterm on 11.04.
In class, closed books/notes.
Homework 3 is up.
Due on 11,07.05.
CMPE150IntroductiontoComputerNetworks
Today
MAC (contd).
CMPE150IntroductiontoComputerNetworks
CMPE150IntroductiontoComputerNetworks
Multiplexing
Static:
FDM.
TDM.
Dynamic:
Statistical TDM.
CMPE150IntroductiontoComputerNetworks
Dynamic Multiplexing
Dynamic allocation.
In particular, statistical TDM.
Dynamically allocates time slots on
demand.
CMPE150IntroductiontoComputerNetworks
Types of MAC
Control:
Distributed.
Centralized.
CMPE150IntroductiontoComputerNetworks
Round-Robin MAC
Centralized: polling.
Distributed: token passing.
CMPE150IntroductiontoComputerNetworks
CMPE150IntroductiontoComputerNetworks
Contention-Based MAC
No control.
Stations try to acquire the medium.
Distributed in nature.
CMPE150IntroductiontoComputerNetworks
10
MAC Protocols
Contention-based
ALOHA and Slotted ALOHA.
CSMA.
CSMA/CD.
CMPE150IntroductiontoComputerNetworks
11
Contention-Based MACs
ALOHA family.
CSMA family.
CMPE150IntroductiontoComputerNetworks
12
CMPE150IntroductiontoComputerNetworks
13
Pure ALOHA
In pure ALOHA, frames are transmitted at
completely arbitrary times.
CMPE150IntroductiontoComputerNetworks
14
Collisions
Invalid frames may be caused by channel
noise or
Because other station(s) transmitted at the
same time: collision.
Collision happens even when the last bit of a
frame overlaps with the first bit of the next
frame.
CMPE150IntroductiontoComputerNetworks
15
CMPE150IntroductiontoComputerNetworks
16
CMPE150IntroductiontoComputerNetworks
17
Slotted Aloha
Doubles performance of ALOHA.
Frames can only be transmitted at beginning
of slot: discrete ALOHA.
Vulnerable period is halved.
S = G e-G.
S = Smax = 1/e = 0.368 for G = 1.
CMPE150IntroductiontoComputerNetworks
18
CMPE150IntroductiontoComputerNetworks
19
CMPE150IntroductiontoComputerNetworks
20
CSMA Protocols
CMPE150IntroductiontoComputerNetworks
21
CMPE150IntroductiontoComputerNetworks
22
CSMA
Station that wants to transmit first listens to
check if another transmission is in progress
(carrier sense).
If medium is in use, station waits; else, it
transmits.
Collisions can still occur.
Transmitter waits for ACK; if no ACKs,
retransmits.
CMPE150IntroductiontoComputerNetworks
23
CSMA Protocol
Packet
ready
Channel
Busy?
no
yes
transmit
delay packet
transmission
k times
wait for a
round-trip time
yes
positive
ack?
CMPE150IntroductiontoComputerNetworks
no
compute random
backoff integer k
24
CSMA (contd)
Collisions can occur only when 2 or more
stations begin transmitting within short time.
If station transmits and no collisions during the
time leading edge of frame propagates to
farthest station, then NO collisions.
CMPE150IntroductiontoComputerNetworks
25
CSMA Flavors
After detecting carrier, a station can persist trying to
transmit after the channel is idle again.
1-persistent CSMA (IEEE 802.3)
CMPE150IntroductiontoComputerNetworks
26
27
CSMA/CD
CSMA with collision detection.
Problem: when frames collide, medium is
unusable for duration of both (damaged)
frames.
For long frames (when compared to
propagation time), considerable waste.
What if station listens while transmitting?
CMPE150IntroductiontoComputerNetworks
28
CSMA/CD Protocol
1. If medium idle, transmit; otherwise 2.
2. If medium busy, wait until idle, then transmit
with p=1.
3. If collision detected, transmit brief jamming
signal and abort transmission.
4. After aborting, wait random time, try again.
CMPE150IntroductiontoComputerNetworks
29
CSMA/CD Performance
Wasted capacity restricted to time to detect
collision.
Time to detect collision < 2*maximum
propagation delay.
Rule in CSMA/CD protocols: frames long
enough to allow collision detection prior to end
of transmission.
CMPE150IntroductiontoComputerNetworks
30
31
Ethernet
CMPE150IntroductiontoComputerNetworks
32
Ethernet
IEEE 802. family.
CMPE150IntroductiontoComputerNetworks
33
34
Ethernet MAC
CSMA/CD.
Binary exponential back-off.
CMPE150IntroductiontoComputerNetworks
35
Ethernet Frame
CMPE150IntroductiontoComputerNetworks
36