SlideShare a Scribd company logo
1 of 58
CS 352
Medium Access Control
CS 352, Lecture 23.1
http://www.cs.rutgers.edu/~sn624/352
Srinivas Narayana
1
Link layer
Application
Transport
Network
Link
…
FTP HTTP SMTP DNS
TCP UDP
IP
802.11 802.3 ATM
HTTPS
The main function of the link layer is link-local delivery:
getting packets from one side of the link to the other.
Ethernet
Two kinds of link layers
• point-to-point
• Switched Ethernet link between switch and host
• PPP for dial-up Internet access
• broadcast (shared medium)
• Shared Ethernet
• 802.11 wireless LAN
shared RF
(satellite)
humans at a
cocktail party
(shared air, acoustical)
shared RF
(e.g., 802.11 WiFi)
shared wire (e.g.,
cabled Ethernet)
Multiple access protocols
• When there is a single shared broadcast channel, two or
more simultaneous transmissions by nodes causes
interference
• We say there is a collision if a node receives two or more
signals at the same time
• A multiple access protocol is a distributed algorithm that
determines how nodes share channel
• i.e., who can transmit?
• Communication about channel sharing must use channel
• no separate (out-of-band) channel for coordination
Sharing resources: sound familiar?
Medium access control
• Q: how to share a link over
~packet transmission time
(microseconds)?
• Link is attached to the
endpoints
• Link (usually) cannot support
simultaneous transmissions;
collision results
• Collision can be usually
detected within a packet
transmission period
Congestion control
• Q: how to share a bottleneck link
over ~RTT (10-100
milliseconds)?
• Link is (usually) remote from the
endpoint
• Router buffer can hold
simultaneous transmissions for a
short period
• Detecting congestion is indirect
(i.e., through loss, delay, etc.)
and takes a round-trip time
An ideal multiple access protocol
Given a broadcast channel of rate R, goals:
1. when one node wants to transmit, it can send at rate R.
2. when M nodes want to transmit, each can send at average
rate R/M
3. fully decentralized:
• no special node to coordinate transmissions
• no synchronization of clocks or transmission slots
4. “simple”
6
MAC protocols: Taxonomy
Three broad classes:
• channel partitioning
• divide channel into smaller pieces (time slots, frequency, code)
• allocate piece to node for exclusive use
• turn taking
• nodes with more to send can take more or longer turns
• random access
• channel not divided, allow collisions
• use methods to recover from collisions
MAC protocols: Taxonomy
Three broad classes:
• channel partitioning
• divide channel into smaller pieces (time slots, frequency, code)
• allocate piece to node for exclusive use
• turn taking
• nodes with more to send can take more or longer turns
• random access
• channel not divided, allow collisions
• use methods to recover from collisions
This module
Next module
Channel Partitioning
Dividing time
Time-division multiple access (TDMA)
• access the channel in rounds
• Simplest scheme: each node gets fixed length slot
• length of the slot = packet transmission time
• unused slots go idle
• example: 6-node link, 1,3,4 have packets to send, slots 2,5,6
idle
1 3 4 1 3 4
6-slot
round
6-slot
round
Dividing time
• If channel is partitioned statically, users with higher
demand cannot use idle slots. Inefficient
• Example: Nodes 1, 3, or 4 may have more data to send,
yet cannot use the slots of nodes 2, 5, or 6.
1 3 4 1 3 4
6-slot
round
6-slot
round
Dividing frequency
FDMA: frequency division multiple access
• Channel divided into frequency bands
• Simple scheme: each node assigned a fixed frequency band
• Unused transmission time in frequency bands go idle
• Example: 6-node link, 1,3,4 have packets to send, frequency
bands 2,5,6 idle
frequency
bands
FDMA cable
High frequency
Low frequency
Dividing code
Code Division Multiple Access (CDMA)
• A unique code is assigned to each pair of nodes
• Also called chipping sequence
• Users can share frequency bands and can transmit at the same
time
• Encoded signal = data signal * chipping sequence
• Decoded signal = received signal X chipping sequence
• Here “X” denotes the inner product of two vectors
• Example: [1, 2, 3] X [4, 5, 6] = [1*4, 2*5, 3*6]/3 = [4/3, 10/3, 18/3]
slot 1 slot 0
d1 = -1
1 1 1 1
1
- 1
- 1
- 1
-
Zi,m= di
.cm
d0 = 1
1 1 1 1
1
- 1
- 1
- 1
-
1 1 1 1
1
- 1
- 1
- 1
-
1 1 1
1
1
-
1
- 1
- 1
-
slot 0
channel
output
slot 1
channel
output
channel output Zi,m
sender
code
data
bits
slot 1 slot 0
d1 = -1
d0 = 1
1 1 1 1
1
- 1
- 1
- 1
-
1 1 1 1
1
- 1
- 1
- 1
-
1 1 1 1
1
- 1
- 1
- 1
-
1 1 1
1
1
-
1
- 1
- 1
-
slot 0
channel
output
slot 1
channel
output
receiver
code
received
input
Di = SZi,m
.cm
m=1
M
M
Example of CDMA encode/decode
CDMA trade-offs
• In the place of transmitting 2 (data) bits, we’re sending 2 * 8 = 16
bits on the channel. Seems wasteful?
• Real benefit: when multiple users transmit
• Suppose resulting signal levels just add up in the channel and the
sum is received by each receiver
• With CDMA, each receiver can independently decode its
corresponding sender’s transmission using the (respective) code!
CDMA with two senders
using same code as
sender 1, receiver
recovers sender 1’s
transmission from
summed channel data!
Sender 1
Sender 2
channel sums together
transmissions by
sender 1 and 2
When receiver 2
uses sender 2
code on the
same signal, it
decodes sender
2’s signal
(try it out!)
Turn-taking protocols
Nodes taking turns
Polling
• Orchestrator node “invites” sender nodes to transmit in
turn
• Concerns:
• polling overhead
• latency
• single point of failure
• The orchestrator
orchestrator
senders
poll
data
data
Nodes taking turns
Token passing
• control token passed from one node to
next sequentially
• Node with token can transmit
• Else, pass it on to the next node in the
“ring”
• Concerns:
• latency
• single point of failure (node holding the
token)
T
data
(nothing
to send)
T
Summary
• Medium access control: a distributed algorithm to transmit over a
shared link
• Channel partitioning: TDMA, FDMA, CDMA
• Turn-taking: polling, token passing
• TDMA, FDMA, & CDMA are widely used in cellular communication
• TDMA, FDMA: GSM
• CDMA: Qualcomm/Verizon
CS 352
Random Access Protocols
CS 352, Lecture 23.2
http://www.cs.rutgers.edu/~sn624/352
Srinivas Narayana
22
Review
Medium access control
A distributed algorithm running at nodes to determine
who should transmit over a shared link
Channel Partitioning
Turn taking
Random access
Random access protocols
• What if nodes decide to transmit randomly?
• When node has packet to send
• Transmit at full channel data rate R
• No a priori coordination among nodes
• Collision possible when two or more transmitting nodes choose
to send simultaneously
Random access protocols
• A random-access MAC protocol specifies:
• (1) How to detect collisions
• (2) How to recover from collisions
• … Usually by retransmitting after a while
• Examples of random-access MAC protocols:
• Slotted ALOHA
• ALOHA
• CSMA
• CSMA/CD
• CSMA/CA
Rest of this lecture
Next lecture
Slotted ALOHA
Slotted ALOHA
Assumptions:
• All frames same size
• Time divided into equal size
slots (time to transmit 1
frame)
• Nodes start to transmit only
slot beginning
• Node clocks are synchronized
• If 2 or more nodes transmit in
slot, all nodes detect collision
Operation:
• when node obtains fresh
frame, transmits in next slot
• if no collision: node can
send new frame in next
slot
• if collision: node
retransmits frame in each
subsequent slot with prob.
p until success
Slotted ALOHA: example
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C C
S S S
I I I
All nodes have data to
transmit
C = collision
I = idle
S = successful xmit
All nodes choose
not to transmit
Node 2 lucky: it transmitted,
others didn’t
Slotted ALOHA
Advantages
• Single active node can
continuously transmit at full
rate of channel
• Simple, decentralized
protocol
Disadvantages
• Clock synchronization: nodes
must sync on slot start times
• Collisions waste slots
• Idle slots possible even if
demand exists
• Must ensure that collision is
detected within a frame duration
• Even if detection is fast, whole
frame time still wasted
Slotted ALOHA: efficiency
• Q: What fraction of slots are likely to be successful?
• i.e., exactly one node transmits
• Assume N nodes, all have frames to send
• Steady state: all have detected collision the last time the frame
was attempted to be transmitted
• Success: one node must choose to transmit (probability p), all
other nodes choose not to transmit (probability 1-p)
Slotted ALOHA: efficiency
• Prob that given node has success in a slot = p(1-p)N-1
• Prob that any node has a success = Np(1-p)N-1
• max efficiency: find p* that maximizes
Np(1-p)N-1
• for many nodes, take limit of Np*(1-p*)N-1 as N goes to infinity,
gives:
Max efficiency = 1/e = .37
• at best: channel used for useful transmissions 37% of the time!
Pure ALOHA
Pure (unslotted) ALOHA
• Even simpler algorithm than ALOHA: No
synchronization
• When a frame first arrives, transmit immediately
• No need to wait for the start of a transmission slot
• However, the collision probability increases:
• Frame sent at t collides with other frames sent in [t-T,t+T]
• Here T is the frame transmission time
Collisions in pure ALOHA
Node j transmits
t
t - T t + T
Will collide with the
beginning of j’s frame
Will collide with the
end of j’s frame
T T
Probability p
Avoided with
probability (1-p)N-1
Avoided with
probability (1-p)N-1
Pr(success) = Np(1-p)2(N-1)
Take limit with optimal p as N  ♾
Successful 18% of the time!
Worse than slotted ALOHA.
Are there better strategies to transmit rather
than independently and randomly?
Carrier Sensing Multiple
Access (CSMA)
Carrier Sense Multiple Access (CSMA)
Key idea: listen to the channel before transmission
• If the channel sensed idle, then transmit entire frame
• If the channel sensed busy, then defer transmission
• Human analogy: don’t interrupt others!
CSMA collisions
• Collisions can still occur.
Due to propagation delay,
two nodes may not hear
each other’s transmissions
right away
• If there is a collision, the
entire packet transmission
time is wasted
spatial layout of nodes
CSMA collisions
• Collisions can still occur.
Due to propagation delay,
two nodes may not hear
each other’s transmissions
right away
• If there is a collision, the
entire packet transmission
time is wasted
• Propagation delay
between the nodes plays
a key role in determining
the collision probability
spatial layout of nodes
Carrier Sensing with Collision
Detection (CSMA/CD)
Carrier sensing + collision detection
• On certain types of link technologies (e.g., wired Ethernet),
continuous carrier sensing can enable detecting collisions very
quickly
• Not always possible, e.g., wireless LANs (next lecture)
• Suppose it is possible to detect collisions as soon as signal
from one node reaches another (transmitting) node
• Measure received signal, compare with transmitted signal
• CSMA/CD: Stop transmitting when a collision is detected
• Reduce wastage of channel capacity
• Improve the chances of retransmitting earlier
• Analogy: “polite speaker”: stop speaking when interrupted
CSMA/CD
spatial layout of nodes
• Collisions can still occur. Due
to propagation delay, two
nodes may not hear each
other’s transmissions right
away
• However, upon detecting a
collision, node stops
transmitting
CSMA/CD
spatial layout of nodes
• Collisions can still occur. Due
to propagation delay, two
nodes may not hear each
other’s transmissions right
away
• However, upon detecting a
collision, node stops
transmitting
• CSMA/CD reduces time spent
in collided frames relative to
just CSMA
Impact of random access protocols
• The ALOHA protocols were part of ALOHANet, one of the first
packet radio networks to be deployed. Connected the islands of
Hawaii
• Simple protocols, simple node design, no requirement of
centralized control or synchronization
• Highly influential ideas contributing to the mainstream today
• Shared ethernet uses CSMA/CD
• Wireless Ethernet (WiFi) MAC protocol on these ideas
CS 352
CSMA/CD in Shared Ethernet
CS 352, Lecture 23.3
http://www.cs.rutgers.edu/~sn624/352
Srinivas Narayana
46
Review
Medium access control
A distributed algorithm running at nodes to determine
who should transmit over a shared link
Channel Partitioning
Turn taking
Random access
Slotted ALOHA
ALOHA
CSMA
CSMA/CD
Review of CSMA/CD
• Sense the medium for existing transmissions
• If the medium is idle, transmit
• If a collision is detected during transmission, abort the
transmission
• Retry transmission “later”
• Retransmission in the ALOHA protocols:
• Transmit with some probability during the next frame time
CSMA/CD in Shared Ethernet
Switched Ethernet vs. Shared Ethernet
• Nodes connected over
dedicated link to a switch
(previous lecture)
• Multiple nodes connected to
the same Ethernet cable
• Classic method: limited
geographic coverage, easy to
add nodes by adding a tap
• Every node can hear every
other node
A
A’
B
B’ C
C’
1 2
3
4
5
6
tap tap tap tap
MAC in shared Ethernet
• Since the cable is a broadcast medium, it is important to decide
which node can transmit at any time.
• Shared Ethernet uses CSMA/CD MAC, with a twist
Shared Ethernet: CSMA/CD
1. NIC receives data to send
(e.g., from network layer),
creates a frame
2. If NIC senses channel idle,
starts frame transmission. If
NIC senses channel busy,
waits until channel idle, then
transmits (CSMA)
3. If NIC transmits entire frame
without detecting another
transmission, NIC is done
with frame.
4. If NIC detects another
transmission while transmitting,
the NIC aborts the transmission
and sends a “jam signal” (CD)
5. The NIC waits for some period
and attempts to retransmit the
frame.
(Note: in ALOHA, retransmission
is probabilistic)
Q: how long should the NIC
wait?
Ethernet binary exponential backoff
• After a frame has experienced a collision, the NIC enters a
backoff phase
• after m’th collision, NIC chooses K at random from {0,1,2, …,
2m-1}.
• NIC waits K·512 “bit times” (time to transmit a single bit)
• NIC returns to Step 2 (carrier sensing) after the wait
Ethernet binary exponential backoff
• Waiting longer to transmit is a way of responding to higher load
• More collisions on the same frame  more transmitting nodes on link
• Increasing backoff period exponentially is a way to respond to the
number of other transmitting nodes without knowing a priori how
many!
• Still, each node chooses a random interval to wait (from range)
• Only the upper bound of the interval increases exponentially
• Randomness avoids synchronization (and repeated collisions)
between nodes
CSMA/CD efficiency
• Tprop = max prop delay between 2 nodes in LAN
• ttrans = time to transmit max-size frame
• efficiency goes to 1
• as tprop goes to 0 (closer the nodes, the more efficient)
• as ttrans goes to infinity (longer the frames, the more likely that
carrier sensing prevents collisions)
• All from a simple, cheap, decentralized protocol!
trans
prop/t
t
efficiency
5
1
1


Impact of Ethernet CSMA/CD
• Basis for the design of wireless medium access control: widely
implemented and deployed today in WiFi
• We’ll do a deeper dive next lecture
• Birth of a powerful idea in Computer Science: exponential backoff
• TCP multiplicative decrease was inspired by exponential backoff
• A general method to react to load without a priori global information
Comparison of MAC protocols
Channel partitioning
(typically) static
allocation of channel
Efficient and fair at
high loads (1/N’th)
Inefficient at low loads
Turn-taking
Adapts to node
demands by design
May increase delay to
transmit (at low load)
Suffers from a single
point of failure
Random access
Node with access
transmits at full rate
Responsive to load
(e.g., exp backoff)
Capacity may be
wasted: collision, idle
link-medium-access-control.pptx

More Related Content

Similar to link-medium-access-control.pptx

Unit-2 Media Access Protocols.pdf
Unit-2 Media Access Protocols.pdfUnit-2 Media Access Protocols.pdf
Unit-2 Media Access Protocols.pdfSmtPArunaKumari
 
Ethernet Data link layer Local area network
Ethernet Data link layer Local area networkEthernet Data link layer Local area network
Ethernet Data link layer Local area networkRiteshKumar630578
 
Multiple access protocols in data communication networks
Multiple access protocols in data communication networksMultiple access protocols in data communication networks
Multiple access protocols in data communication networksNt Arvind
 
Multiple Access Methods
Multiple Access MethodsMultiple Access Methods
Multiple Access MethodsPrateek Soni
 
MEDIUM-ACCESS CONTROL SUB LAYER.ppt
MEDIUM-ACCESS CONTROL SUB LAYER.pptMEDIUM-ACCESS CONTROL SUB LAYER.ppt
MEDIUM-ACCESS CONTROL SUB LAYER.pptDrTThendralCompSci
 
lecture06-link-layer.pdf
lecture06-link-layer.pdflecture06-link-layer.pdf
lecture06-link-layer.pdfEnics
 
MacProtocols2.ppt
MacProtocols2.pptMacProtocols2.ppt
MacProtocols2.ppt15AnasKhan
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTANirfan sami
 
Mediumaccesscontrol
MediumaccesscontrolMediumaccesscontrol
MediumaccesscontrolVk Sreedhar
 
UNIT-V Wireless Communication.pdf
UNIT-V Wireless Communication.pdfUNIT-V Wireless Communication.pdf
UNIT-V Wireless Communication.pdfvadasairaju143
 

Similar to link-medium-access-control.pptx (20)

Unit-2 Media Access Protocols.pdf
Unit-2 Media Access Protocols.pdfUnit-2 Media Access Protocols.pdf
Unit-2 Media Access Protocols.pdf
 
Ethernet Data link layer Local area network
Ethernet Data link layer Local area networkEthernet Data link layer Local area network
Ethernet Data link layer Local area network
 
Multiple access protocols in data communication networks
Multiple access protocols in data communication networksMultiple access protocols in data communication networks
Multiple access protocols in data communication networks
 
Multiple Access Methods
Multiple Access MethodsMultiple Access Methods
Multiple Access Methods
 
MEDIUM-ACCESS CONTROL SUB LAYER.ppt
MEDIUM-ACCESS CONTROL SUB LAYER.pptMEDIUM-ACCESS CONTROL SUB LAYER.ppt
MEDIUM-ACCESS CONTROL SUB LAYER.ppt
 
lecture06-link-layer.pdf
lecture06-link-layer.pdflecture06-link-layer.pdf
lecture06-link-layer.pdf
 
Week15 lec1
Week15 lec1Week15 lec1
Week15 lec1
 
note9.ppt
note9.pptnote9.ppt
note9.ppt
 
note_vc.ppt
note_vc.pptnote_vc.ppt
note_vc.ppt
 
wireless.ppt
wireless.pptwireless.ppt
wireless.ppt
 
MacProtocols2.ppt
MacProtocols2.pptMacProtocols2.ppt
MacProtocols2.ppt
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
 
Mediumaccesscontrol
MediumaccesscontrolMediumaccesscontrol
Mediumaccesscontrol
 
UNIT-V Wireless Communication.pdf
UNIT-V Wireless Communication.pdfUNIT-V Wireless Communication.pdf
UNIT-V Wireless Communication.pdf
 
ethernet.ppt
ethernet.pptethernet.ppt
ethernet.ppt
 
ethernet.ppt
ethernet.pptethernet.ppt
ethernet.ppt
 
5 sharing-app
5 sharing-app5 sharing-app
5 sharing-app
 
Switching
SwitchingSwitching
Switching
 
Ethernet copy
Ethernet   copyEthernet   copy
Ethernet copy
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
 

More from patrickwang85

CAN communicatoin stack,it take me a long time to found it, hope it help
CAN communicatoin stack,it take me a long time to found it, hope it helpCAN communicatoin stack,it take me a long time to found it, hope it help
CAN communicatoin stack,it take me a long time to found it, hope it helppatrickwang85
 
GB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPT
GB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPTGB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPT
GB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPTpatrickwang85
 
以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt
以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt
以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.pptpatrickwang85
 
Introduction of china C-V2X Industry and standards
Introduction of china C-V2X Industry and standardsIntroduction of china C-V2X Industry and standards
Introduction of china C-V2X Industry and standardspatrickwang85
 
SIP协议及IMS信令流程.ppt
SIP协议及IMS信令流程.pptSIP协议及IMS信令流程.ppt
SIP协议及IMS信令流程.pptpatrickwang85
 
第五章 5G信令流程.pdf
第五章 5G信令流程.pdf第五章 5G信令流程.pdf
第五章 5G信令流程.pdfpatrickwang85
 
FIELD TESTING of 2G 3G Devices.ppt
FIELD TESTING  of 2G 3G Devices.pptFIELD TESTING  of 2G 3G Devices.ppt
FIELD TESTING of 2G 3G Devices.pptpatrickwang85
 
GPS技术问题.pptx
GPS技术问题.pptxGPS技术问题.pptx
GPS技术问题.pptxpatrickwang85
 
PPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdfPPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdfpatrickwang85
 

More from patrickwang85 (9)

CAN communicatoin stack,it take me a long time to found it, hope it help
CAN communicatoin stack,it take me a long time to found it, hope it helpCAN communicatoin stack,it take me a long time to found it, hope it help
CAN communicatoin stack,it take me a long time to found it, hope it help
 
GB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPT
GB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPTGB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPT
GB-T-32960-2016 新能源标准解读,中国要求,强制标准,不错的PPT
 
以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt
以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt
以太网标准寄存器和计数器详解-100MBPS Register and 1000BASE-T1.ppt
 
Introduction of china C-V2X Industry and standards
Introduction of china C-V2X Industry and standardsIntroduction of china C-V2X Industry and standards
Introduction of china C-V2X Industry and standards
 
SIP协议及IMS信令流程.ppt
SIP协议及IMS信令流程.pptSIP协议及IMS信令流程.ppt
SIP协议及IMS信令流程.ppt
 
第五章 5G信令流程.pdf
第五章 5G信令流程.pdf第五章 5G信令流程.pdf
第五章 5G信令流程.pdf
 
FIELD TESTING of 2G 3G Devices.ppt
FIELD TESTING  of 2G 3G Devices.pptFIELD TESTING  of 2G 3G Devices.ppt
FIELD TESTING of 2G 3G Devices.ppt
 
GPS技术问题.pptx
GPS技术问题.pptxGPS技术问题.pptx
GPS技术问题.pptx
 
PPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdfPPP-RTK技术面临的机遇与挑战.pdf
PPP-RTK技术面临的机遇与挑战.pdf
 

Recently uploaded

IPCR-Individual-Performance-Commitment-and-Review.doc
IPCR-Individual-Performance-Commitment-and-Review.docIPCR-Individual-Performance-Commitment-and-Review.doc
IPCR-Individual-Performance-Commitment-and-Review.docTykebernardo
 
907MTAMount Coventry University Bachelor's Diploma in Engineering
907MTAMount Coventry University Bachelor's Diploma in Engineering907MTAMount Coventry University Bachelor's Diploma in Engineering
907MTAMount Coventry University Bachelor's Diploma in EngineeringFi sss
 
(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样
(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样
(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样whjjkkk
 
Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...
Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...
Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...kexey39068
 
Dubai Call Girls Services Call 09900000000
Dubai Call Girls Services Call 09900000000Dubai Call Girls Services Call 09900000000
Dubai Call Girls Services Call 09900000000Komal Khan
 
如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一
如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一
如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一ga6c6bdl
 
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一hnfusn
 
GREEN VEHICLES the kids picture show 2024
GREEN VEHICLES the kids picture show 2024GREEN VEHICLES the kids picture show 2024
GREEN VEHICLES the kids picture show 2024AHOhOops1
 
Call Girls Vastrapur 7397865700 Ridhima Hire Me Full Night
Call Girls Vastrapur 7397865700 Ridhima Hire Me Full NightCall Girls Vastrapur 7397865700 Ridhima Hire Me Full Night
Call Girls Vastrapur 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
What Causes DPF Failure In VW Golf Cars & How Can They Be Prevented
What Causes DPF Failure In VW Golf Cars & How Can They Be PreventedWhat Causes DPF Failure In VW Golf Cars & How Can They Be Prevented
What Causes DPF Failure In VW Golf Cars & How Can They Be PreventedAutobahn Automotive Service
 
Digamma / CertiCon Company Presentation
Digamma / CertiCon Company  PresentationDigamma / CertiCon Company  Presentation
Digamma / CertiCon Company PresentationMihajloManjak
 
原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHERUNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHERunosafeads
 
原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档208367051
 
办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一
办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一
办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一F La
 
定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一
定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一
定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一fjjhfuubb
 
定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一
定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一
定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一fhhkjh
 
UNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.pptUNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.pptDineshKumar4165
 

Recently uploaded (20)

IPCR-Individual-Performance-Commitment-and-Review.doc
IPCR-Individual-Performance-Commitment-and-Review.docIPCR-Individual-Performance-Commitment-and-Review.doc
IPCR-Individual-Performance-Commitment-and-Review.doc
 
907MTAMount Coventry University Bachelor's Diploma in Engineering
907MTAMount Coventry University Bachelor's Diploma in Engineering907MTAMount Coventry University Bachelor's Diploma in Engineering
907MTAMount Coventry University Bachelor's Diploma in Engineering
 
(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样
(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样
(办理学位证)墨尔本大学毕业证(Unimelb毕业证书)成绩单留信学历认证原版一模一样
 
Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...
Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...
Call Girl Service Global Village Dubai +971509430017 Independent Call Girls G...
 
Dubai Call Girls Services Call 09900000000
Dubai Call Girls Services Call 09900000000Dubai Call Girls Services Call 09900000000
Dubai Call Girls Services Call 09900000000
 
如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一
如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一
如何办理迈阿密大学毕业证(UM毕业证)成绩单留信学历认证原版一比一
 
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
如何办理(UQ毕业证书)昆士兰大学毕业证毕业证成绩单原版一比一
 
GREEN VEHICLES the kids picture show 2024
GREEN VEHICLES the kids picture show 2024GREEN VEHICLES the kids picture show 2024
GREEN VEHICLES the kids picture show 2024
 
Call Girls Vastrapur 7397865700 Ridhima Hire Me Full Night
Call Girls Vastrapur 7397865700 Ridhima Hire Me Full NightCall Girls Vastrapur 7397865700 Ridhima Hire Me Full Night
Call Girls Vastrapur 7397865700 Ridhima Hire Me Full Night
 
Hot Sexy call girls in Pira Garhi🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Pira Garhi🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Pira Garhi🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Pira Garhi🔝 9953056974 🔝 escort Service
 
What Causes DPF Failure In VW Golf Cars & How Can They Be Prevented
What Causes DPF Failure In VW Golf Cars & How Can They Be PreventedWhat Causes DPF Failure In VW Golf Cars & How Can They Be Prevented
What Causes DPF Failure In VW Golf Cars & How Can They Be Prevented
 
Digamma / CertiCon Company Presentation
Digamma / CertiCon Company  PresentationDigamma / CertiCon Company  Presentation
Digamma / CertiCon Company Presentation
 
原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制中央昆士兰大学毕业证(CQU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
sauth delhi call girls in Connaught Place🔝 9953056974 🔝 escort Service
sauth delhi call girls in  Connaught Place🔝 9953056974 🔝 escort Servicesauth delhi call girls in  Connaught Place🔝 9953056974 🔝 escort Service
sauth delhi call girls in Connaught Place🔝 9953056974 🔝 escort Service
 
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHERUNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
UNOSAFE ELEVATOR PRIVATE LTD BANGALORE BROUCHER
 
原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档
原版1:1定制宾州州立大学毕业证(PSU毕业证)#文凭成绩单#真实留信学历认证永久存档
 
办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一
办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一
办理(PITT毕业证书)美国匹兹堡大学毕业证成绩单原版一比一
 
定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一
定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一
定制昆士兰大学毕业证(本硕)UQ学位证书原版一比一
 
定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一
定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一
定制(Plymouth文凭证书)普利茅斯大学毕业证毕业证成绩单学历认证原版一比一
 
UNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.pptUNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
UNIT-1-VEHICLE STRUCTURE AND ENGINES.ppt
 

link-medium-access-control.pptx

  • 1. CS 352 Medium Access Control CS 352, Lecture 23.1 http://www.cs.rutgers.edu/~sn624/352 Srinivas Narayana 1
  • 2. Link layer Application Transport Network Link … FTP HTTP SMTP DNS TCP UDP IP 802.11 802.3 ATM HTTPS The main function of the link layer is link-local delivery: getting packets from one side of the link to the other. Ethernet
  • 3. Two kinds of link layers • point-to-point • Switched Ethernet link between switch and host • PPP for dial-up Internet access • broadcast (shared medium) • Shared Ethernet • 802.11 wireless LAN shared RF (satellite) humans at a cocktail party (shared air, acoustical) shared RF (e.g., 802.11 WiFi) shared wire (e.g., cabled Ethernet)
  • 4. Multiple access protocols • When there is a single shared broadcast channel, two or more simultaneous transmissions by nodes causes interference • We say there is a collision if a node receives two or more signals at the same time • A multiple access protocol is a distributed algorithm that determines how nodes share channel • i.e., who can transmit? • Communication about channel sharing must use channel • no separate (out-of-band) channel for coordination
  • 5. Sharing resources: sound familiar? Medium access control • Q: how to share a link over ~packet transmission time (microseconds)? • Link is attached to the endpoints • Link (usually) cannot support simultaneous transmissions; collision results • Collision can be usually detected within a packet transmission period Congestion control • Q: how to share a bottleneck link over ~RTT (10-100 milliseconds)? • Link is (usually) remote from the endpoint • Router buffer can hold simultaneous transmissions for a short period • Detecting congestion is indirect (i.e., through loss, delay, etc.) and takes a round-trip time
  • 6. An ideal multiple access protocol Given a broadcast channel of rate R, goals: 1. when one node wants to transmit, it can send at rate R. 2. when M nodes want to transmit, each can send at average rate R/M 3. fully decentralized: • no special node to coordinate transmissions • no synchronization of clocks or transmission slots 4. “simple” 6
  • 7. MAC protocols: Taxonomy Three broad classes: • channel partitioning • divide channel into smaller pieces (time slots, frequency, code) • allocate piece to node for exclusive use • turn taking • nodes with more to send can take more or longer turns • random access • channel not divided, allow collisions • use methods to recover from collisions
  • 8. MAC protocols: Taxonomy Three broad classes: • channel partitioning • divide channel into smaller pieces (time slots, frequency, code) • allocate piece to node for exclusive use • turn taking • nodes with more to send can take more or longer turns • random access • channel not divided, allow collisions • use methods to recover from collisions This module Next module
  • 10. Dividing time Time-division multiple access (TDMA) • access the channel in rounds • Simplest scheme: each node gets fixed length slot • length of the slot = packet transmission time • unused slots go idle • example: 6-node link, 1,3,4 have packets to send, slots 2,5,6 idle 1 3 4 1 3 4 6-slot round 6-slot round
  • 11. Dividing time • If channel is partitioned statically, users with higher demand cannot use idle slots. Inefficient • Example: Nodes 1, 3, or 4 may have more data to send, yet cannot use the slots of nodes 2, 5, or 6. 1 3 4 1 3 4 6-slot round 6-slot round
  • 12. Dividing frequency FDMA: frequency division multiple access • Channel divided into frequency bands • Simple scheme: each node assigned a fixed frequency band • Unused transmission time in frequency bands go idle • Example: 6-node link, 1,3,4 have packets to send, frequency bands 2,5,6 idle frequency bands FDMA cable High frequency Low frequency
  • 13. Dividing code Code Division Multiple Access (CDMA) • A unique code is assigned to each pair of nodes • Also called chipping sequence • Users can share frequency bands and can transmit at the same time • Encoded signal = data signal * chipping sequence • Decoded signal = received signal X chipping sequence • Here “X” denotes the inner product of two vectors • Example: [1, 2, 3] X [4, 5, 6] = [1*4, 2*5, 3*6]/3 = [4/3, 10/3, 18/3]
  • 14. slot 1 slot 0 d1 = -1 1 1 1 1 1 - 1 - 1 - 1 - Zi,m= di .cm d0 = 1 1 1 1 1 1 - 1 - 1 - 1 - 1 1 1 1 1 - 1 - 1 - 1 - 1 1 1 1 1 - 1 - 1 - 1 - slot 0 channel output slot 1 channel output channel output Zi,m sender code data bits slot 1 slot 0 d1 = -1 d0 = 1 1 1 1 1 1 - 1 - 1 - 1 - 1 1 1 1 1 - 1 - 1 - 1 - 1 1 1 1 1 - 1 - 1 - 1 - 1 1 1 1 1 - 1 - 1 - 1 - slot 0 channel output slot 1 channel output receiver code received input Di = SZi,m .cm m=1 M M Example of CDMA encode/decode
  • 15. CDMA trade-offs • In the place of transmitting 2 (data) bits, we’re sending 2 * 8 = 16 bits on the channel. Seems wasteful? • Real benefit: when multiple users transmit • Suppose resulting signal levels just add up in the channel and the sum is received by each receiver • With CDMA, each receiver can independently decode its corresponding sender’s transmission using the (respective) code!
  • 16. CDMA with two senders using same code as sender 1, receiver recovers sender 1’s transmission from summed channel data! Sender 1 Sender 2 channel sums together transmissions by sender 1 and 2 When receiver 2 uses sender 2 code on the same signal, it decodes sender 2’s signal (try it out!)
  • 18. Nodes taking turns Polling • Orchestrator node “invites” sender nodes to transmit in turn • Concerns: • polling overhead • latency • single point of failure • The orchestrator orchestrator senders poll data data
  • 19. Nodes taking turns Token passing • control token passed from one node to next sequentially • Node with token can transmit • Else, pass it on to the next node in the “ring” • Concerns: • latency • single point of failure (node holding the token) T data (nothing to send) T
  • 20. Summary • Medium access control: a distributed algorithm to transmit over a shared link • Channel partitioning: TDMA, FDMA, CDMA • Turn-taking: polling, token passing • TDMA, FDMA, & CDMA are widely used in cellular communication • TDMA, FDMA: GSM • CDMA: Qualcomm/Verizon
  • 21.
  • 22. CS 352 Random Access Protocols CS 352, Lecture 23.2 http://www.cs.rutgers.edu/~sn624/352 Srinivas Narayana 22
  • 23. Review Medium access control A distributed algorithm running at nodes to determine who should transmit over a shared link Channel Partitioning Turn taking Random access
  • 24. Random access protocols • What if nodes decide to transmit randomly? • When node has packet to send • Transmit at full channel data rate R • No a priori coordination among nodes • Collision possible when two or more transmitting nodes choose to send simultaneously
  • 25. Random access protocols • A random-access MAC protocol specifies: • (1) How to detect collisions • (2) How to recover from collisions • … Usually by retransmitting after a while • Examples of random-access MAC protocols: • Slotted ALOHA • ALOHA • CSMA • CSMA/CD • CSMA/CA Rest of this lecture Next lecture
  • 27. Slotted ALOHA Assumptions: • All frames same size • Time divided into equal size slots (time to transmit 1 frame) • Nodes start to transmit only slot beginning • Node clocks are synchronized • If 2 or more nodes transmit in slot, all nodes detect collision Operation: • when node obtains fresh frame, transmits in next slot • if no collision: node can send new frame in next slot • if collision: node retransmits frame in each subsequent slot with prob. p until success
  • 28. Slotted ALOHA: example 1 1 1 1 2 3 2 2 3 3 node 1 node 2 node 3 C C C S S S I I I All nodes have data to transmit C = collision I = idle S = successful xmit All nodes choose not to transmit Node 2 lucky: it transmitted, others didn’t
  • 29. Slotted ALOHA Advantages • Single active node can continuously transmit at full rate of channel • Simple, decentralized protocol Disadvantages • Clock synchronization: nodes must sync on slot start times • Collisions waste slots • Idle slots possible even if demand exists • Must ensure that collision is detected within a frame duration • Even if detection is fast, whole frame time still wasted
  • 30. Slotted ALOHA: efficiency • Q: What fraction of slots are likely to be successful? • i.e., exactly one node transmits • Assume N nodes, all have frames to send • Steady state: all have detected collision the last time the frame was attempted to be transmitted • Success: one node must choose to transmit (probability p), all other nodes choose not to transmit (probability 1-p)
  • 31. Slotted ALOHA: efficiency • Prob that given node has success in a slot = p(1-p)N-1 • Prob that any node has a success = Np(1-p)N-1 • max efficiency: find p* that maximizes Np(1-p)N-1 • for many nodes, take limit of Np*(1-p*)N-1 as N goes to infinity, gives: Max efficiency = 1/e = .37 • at best: channel used for useful transmissions 37% of the time!
  • 33. Pure (unslotted) ALOHA • Even simpler algorithm than ALOHA: No synchronization • When a frame first arrives, transmit immediately • No need to wait for the start of a transmission slot • However, the collision probability increases: • Frame sent at t collides with other frames sent in [t-T,t+T] • Here T is the frame transmission time
  • 34. Collisions in pure ALOHA Node j transmits t t - T t + T Will collide with the beginning of j’s frame Will collide with the end of j’s frame T T Probability p Avoided with probability (1-p)N-1 Avoided with probability (1-p)N-1 Pr(success) = Np(1-p)2(N-1) Take limit with optimal p as N  ♾ Successful 18% of the time! Worse than slotted ALOHA.
  • 35. Are there better strategies to transmit rather than independently and randomly?
  • 37. Carrier Sense Multiple Access (CSMA) Key idea: listen to the channel before transmission • If the channel sensed idle, then transmit entire frame • If the channel sensed busy, then defer transmission • Human analogy: don’t interrupt others!
  • 38. CSMA collisions • Collisions can still occur. Due to propagation delay, two nodes may not hear each other’s transmissions right away • If there is a collision, the entire packet transmission time is wasted spatial layout of nodes
  • 39. CSMA collisions • Collisions can still occur. Due to propagation delay, two nodes may not hear each other’s transmissions right away • If there is a collision, the entire packet transmission time is wasted • Propagation delay between the nodes plays a key role in determining the collision probability spatial layout of nodes
  • 40. Carrier Sensing with Collision Detection (CSMA/CD)
  • 41. Carrier sensing + collision detection • On certain types of link technologies (e.g., wired Ethernet), continuous carrier sensing can enable detecting collisions very quickly • Not always possible, e.g., wireless LANs (next lecture) • Suppose it is possible to detect collisions as soon as signal from one node reaches another (transmitting) node • Measure received signal, compare with transmitted signal • CSMA/CD: Stop transmitting when a collision is detected • Reduce wastage of channel capacity • Improve the chances of retransmitting earlier • Analogy: “polite speaker”: stop speaking when interrupted
  • 42. CSMA/CD spatial layout of nodes • Collisions can still occur. Due to propagation delay, two nodes may not hear each other’s transmissions right away • However, upon detecting a collision, node stops transmitting
  • 43. CSMA/CD spatial layout of nodes • Collisions can still occur. Due to propagation delay, two nodes may not hear each other’s transmissions right away • However, upon detecting a collision, node stops transmitting • CSMA/CD reduces time spent in collided frames relative to just CSMA
  • 44. Impact of random access protocols • The ALOHA protocols were part of ALOHANet, one of the first packet radio networks to be deployed. Connected the islands of Hawaii • Simple protocols, simple node design, no requirement of centralized control or synchronization • Highly influential ideas contributing to the mainstream today • Shared ethernet uses CSMA/CD • Wireless Ethernet (WiFi) MAC protocol on these ideas
  • 45.
  • 46. CS 352 CSMA/CD in Shared Ethernet CS 352, Lecture 23.3 http://www.cs.rutgers.edu/~sn624/352 Srinivas Narayana 46
  • 47. Review Medium access control A distributed algorithm running at nodes to determine who should transmit over a shared link Channel Partitioning Turn taking Random access Slotted ALOHA ALOHA CSMA CSMA/CD
  • 48. Review of CSMA/CD • Sense the medium for existing transmissions • If the medium is idle, transmit • If a collision is detected during transmission, abort the transmission • Retry transmission “later” • Retransmission in the ALOHA protocols: • Transmit with some probability during the next frame time
  • 49. CSMA/CD in Shared Ethernet
  • 50. Switched Ethernet vs. Shared Ethernet • Nodes connected over dedicated link to a switch (previous lecture) • Multiple nodes connected to the same Ethernet cable • Classic method: limited geographic coverage, easy to add nodes by adding a tap • Every node can hear every other node A A’ B B’ C C’ 1 2 3 4 5 6 tap tap tap tap
  • 51. MAC in shared Ethernet • Since the cable is a broadcast medium, it is important to decide which node can transmit at any time. • Shared Ethernet uses CSMA/CD MAC, with a twist
  • 52. Shared Ethernet: CSMA/CD 1. NIC receives data to send (e.g., from network layer), creates a frame 2. If NIC senses channel idle, starts frame transmission. If NIC senses channel busy, waits until channel idle, then transmits (CSMA) 3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame. 4. If NIC detects another transmission while transmitting, the NIC aborts the transmission and sends a “jam signal” (CD) 5. The NIC waits for some period and attempts to retransmit the frame. (Note: in ALOHA, retransmission is probabilistic) Q: how long should the NIC wait?
  • 53. Ethernet binary exponential backoff • After a frame has experienced a collision, the NIC enters a backoff phase • after m’th collision, NIC chooses K at random from {0,1,2, …, 2m-1}. • NIC waits K·512 “bit times” (time to transmit a single bit) • NIC returns to Step 2 (carrier sensing) after the wait
  • 54. Ethernet binary exponential backoff • Waiting longer to transmit is a way of responding to higher load • More collisions on the same frame  more transmitting nodes on link • Increasing backoff period exponentially is a way to respond to the number of other transmitting nodes without knowing a priori how many! • Still, each node chooses a random interval to wait (from range) • Only the upper bound of the interval increases exponentially • Randomness avoids synchronization (and repeated collisions) between nodes
  • 55. CSMA/CD efficiency • Tprop = max prop delay between 2 nodes in LAN • ttrans = time to transmit max-size frame • efficiency goes to 1 • as tprop goes to 0 (closer the nodes, the more efficient) • as ttrans goes to infinity (longer the frames, the more likely that carrier sensing prevents collisions) • All from a simple, cheap, decentralized protocol! trans prop/t t efficiency 5 1 1  
  • 56. Impact of Ethernet CSMA/CD • Basis for the design of wireless medium access control: widely implemented and deployed today in WiFi • We’ll do a deeper dive next lecture • Birth of a powerful idea in Computer Science: exponential backoff • TCP multiplicative decrease was inspired by exponential backoff • A general method to react to load without a priori global information
  • 57. Comparison of MAC protocols Channel partitioning (typically) static allocation of channel Efficient and fair at high loads (1/N’th) Inefficient at low loads Turn-taking Adapts to node demands by design May increase delay to transmit (at low load) Suffers from a single point of failure Random access Node with access transmits at full rate Responsive to load (e.g., exp backoff) Capacity may be wasted: collision, idle