Professional Documents
Culture Documents
13 MAC Part3 Feb 6
13 MAC Part3 Feb 6
Gaurav S. Kasbekar
Dept. of Electrical Engineering
IIT Bombay
1-1
Reference
These are a modified version of slides by
Kurose and Ross available at:
http://ctas.poly.asu.edu/millard/CET459/lectno/K%
20-%20R%20stuff/index.html
1-2
Example 1
𝑁 nodes use Slotted ALOHA; each always has a
packet to send
Attempt probability: 𝑝
Want average number of slots required for
successful transmission of a fixed node 𝑖’s packet
Probability of successful transmission by node
𝑖 in a given slot:
𝑝(1 − 𝑝)𝑁−1
Average number of slots required for successful
transmission:
1
𝑝(1−𝑝)𝑁−1
5-3
Example 2
Above scenario with following changes
Nodes 1, … , 𝐾 have delay-sensitive traffic (e.g., voice)
attempt probability 𝑝1
Nodes 𝐾 + 1, … , 𝑁 have elastic traffic (e.g., file
transfer)
attempt probability 𝑝2 < 𝑝1
Want average number of slots required for successful
transmission of a fixed node 𝑖’s packet
Case (i): 𝑖 ∈ {1, … , 𝐾}
1
𝑝1 (1−𝑝1 )𝐾−1 (1−𝑝2 )𝑁−𝐾
Case (ii): 𝑖 ∈ {𝐾 + 1, … , 𝑁}
1
𝑝2 (1−𝑝1 )𝐾 (1−𝑝2 )𝑁−𝐾−1
Collision Detection
Nodes sense the medium while transmitting packets
Abort transmission if collision detected
Reduces time spent in colliding
5-5
Example
5-6
MAC Protocol in Traditional
Ethernet
Both CSMA and Collision Detection used
MAC Protocol called “CSMA/ CD”
5-7
Ethernet CSMA/CD Algorithm
When node gets new packet: 3. If node detects another
1. It senses channel. If transmission while
channel idle, node starts transmitting, aborts
to transmit packet. If transmission.
channel busy, waits until 4. After aborting, node waits
channel idle and then for a random amount of
transmits. time and returns to step 1
2. Node senses channel while
transmitting. If node
transmits entire packet
without detecting another
transmission, it is done
with packet.
5-8
Ethernet CSMA/CD Algorithm
Notice that a node sends
a new packet immediately after channel found
idle
a packet involved in one or more collisions after
waiting for a random amt of time
Why not send every packet after a random
amount of time?
To ensure that when only one node has
packets to send, it can get throughput R
Similar to Slotted ALOHA and ALOHA
5-9
Random Backoff
In step 4, node waits for a random amount of time
“random backoff”
5-15
Minimum Packet Length
Minimum length of an Ethernet packet is
number of bits that can be transmitted in a
slot duration
R . ts
if packet is smaller than this, padded with
dummy bits
With appropriate choice of ts, this
prevents a node from completely
transmitting a small packet before it
detects collision
5-16
Slot Duration
ts is chosen such that if a node starts transmitting and a
collision occurs, then it always detects collision by end of
the slot
What is the min. value of ts that ensures this?
2 τ, where τ is max. prop. delay between any two nodes
5-18
Example: 10 Mbps Ethernet
Max. length of single cable 500 m
Multiple cables can be combined using repeaters
At most 4 repeaters on cable
So total cable length 2500 m
τ = prop. time for 2500 m + 4 repeater delays
2τ found to be approx. 50 microseconds
Slot duration ts : 51.2 microseconds
Min packet length:
512 bits (64 bytes)
5-19
Example: 10 Mbps Ethernet (contd.)
5-20