You are on page 1of 24

CSMA/CD

Carrier Sense Multiple Access with


Collision Detection
By
PRADEEP SINGH (16IS16F)

A Shared Medium
Ethernet

Network to provide
Shared Network
Collision Domain
Medium Access Control(MAC)

Classification of Multiple Access


Protocols
Multiple access protocols
Contention-based
Random access

Conflict-free
Collision resolution

ALOHA,

TREE,

FDMA,

CSMA,

WINDOW, etc

TDMA,

BTMA,

CDMA,

etc

Token Bus,
etc

BTMA: Busy Tone Multiple Access

Example: A LANwith

four computers each with aNetwork


Interface Card (NIC)connected by a common Ethernet
cable.

Contention Protocols

CSMA (Carrier Sense Multiple Access)


Improvement:

CSMA/CD (CSMA with Collision Detection)


Improvement:

Start transmission only if no transmission is ongoing

Stop ongoing transmission if a collision is detected

CSMA/CA (CSMA with Collision Avoidance)


Improvement:

Wait a random time and try again when carrier is


quiet. If still quiet, then transmit
5

Carrier Sense Multiple Access

In many multi access systems--e.g., LANs--ready station


can determine if medium is idle before transmitting

if medium is sensed as busy, ready station defers until it


becomes idle

collisions are still possible if two (or more) ready stations


sense idle at same time
Node 5 sense

Node 1 Packet

Node 2 Packet
Node 3 Packet

3
Delay

Node 4 sense

Delay

5
Collision
6

Time

CSMA

NIC first listens to cable to see if carrier (signal) is being transmitted by


another node.

Data is sent when no carrier (signal) is observed (i.e. no current present) and
physical medium is idle.
Any NIC which doesnt need to transmit listens to see if other NIC have
started to transmit information to it.
What if two NICs simultaneously transmit at same time observing an idle
physical medium? Thus, there is a collision.

Three different CSMA schemes


Based

on how to do when medium is busy:

1-persistent

CSMA

Non-persistent
p-persistent

CSMA

CSMA
8

1-persistent CSMA
sense channel when want to transmit a packet, if
channel is busy, then sense continuously, until the
channel is idle, at this time, transmit the frame
immediately.
If more than one station are sensing, then they will
begin transmission the same time when channel
becomes idle, so collision. At this time, each station
executes a back-off algorithm to wait for a random
time, and
then re-senses the channel again.
Problem with 1-persistent CSMA is high collision rate.
9

Non-persistent CSMA
sense channel when want to transmit a packet, if channel is
idle, then transmit the packet immediately. If busy, run
back-off algorithm immediately to wait a random time and
then re-sense the channel again.
Problem with non-persistent CSMA is that when the channel
becomes idle from busy, there may be no one of waiting
stations beginning the transmission, thus waste channel
bandwidth,

10

p-persistent CSMA
sense channel when want to transmit a packet, if channel is
busy, then persist sensing the channel until the channel
becomes idle. If the channel is idle, transmit the packet
with probability of p, and wait, with probability of 1-p,
additional propagation delay t prop and then re-sense again .

11

Ethernet: CSMA/CD
(Carrier Sense Multiple Access
with Collision Detection)
Access

method: method of controlling how network nodes


access communications channels

CSMA/CD:

Ethernets access method

Ethernet

NICs listen on network

Wait

until no nodes transmitting data over the signal on


the communications channel before transmission

Several

Ethernet nodes can be connected to a network


and can monitor traffic simultaneously

Ethernet: CSMA/CD (continued)


Collision:

two transmissions interfere with each

other
Common on heavy-traffic networks
Can corrupt data or truncate data frames
Jamming: NIC indicates to network nodes that
previous transmission was faulty
Collision domain: network portion in which
collisions occur
Data propagation delay: length of time data takes
to travel between segment points

CSMA/CD (Contd)

Collision detection can take as long as 2 .


14

Ethernet
Ethernet Transmission
Transmission Flowchart
Flowchart
transmit packet
assemble packet

yes

deferring
on?

start
transmission
transmission
done
?

no

collision
detect?

no

send jam signal


yes

increment attempts

yes
yes

too many
attempts
?
no

done
transmit ok

done excessive
collision errors

compute and wait


backoff time

1. The implication: frame time X >= 2tprop, , since X=L/R, which means that
there is a minimum limitation for frame length.

CSMA/CD
1

1-P CSMA

Non-P CSMA

0.8

max

Slotted Aloha

0.6
0.4

Aloha

0.2
0
0.01

a
0.1

= tprop /X

Maximum achievable throughput of random access schemes


16

Figure 6.24

Exponential back-off
The protocol counts the number of retransmission attempts (using a variable N )
and attempts to retransmit the same frame up to 15 times.
For each retransmission, the transmitter constructs a set of numbers:
{0, 1, 2, 3, 4, 5, ... L} where L is ([2 to the power (K)]-1) and
where K=N; K<= 10;
A random value R is picked from this set, and the transmitter waits
(defers) for a period
R x (slot time) i.e. R x 51.2 Micro Seconds.

For example, after two collisions, N=2, therefore K=2, and the set is {0, 1, 2,
3} giving a one in four chance of collision.
This corresponds to a wait selected from {0, 51.2, 102.4, 153.6} micro seconds.
After 3 collisions, N = 3, and the set is {0, 1, 2, 3, 4, 5, 6, 7}, that is a one in
eight chance of collision.
But after 4 collisions, N=4, the set becomes {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15}, that is a one in 16 chance of collision.

This enables CSMA/CD to scale to large number of


NICs even when collisions may occur.
The algorithm includes a threshold of L=1024.
The reason for this is a set of numbers
{0,1,2.,1023} a large enough and there is very little
advantage of increasing the set size even after
collision larger than 10.
A single frame is retransmitted upto 15 times after this
the frame is discarded the transmitter gives up
transmission by logging an error.

Performance of CSMA/CD
CSMA/CD

network attempts one node to transmit at any time.


Performance of Ethernet is less predictable.
A LAN with a higher utilisation will observe a high collision
rate.
Time to detect collision < 2*maximum propagation delay
Thus frames need to be at least 2*RTT long
Why a shared Ethernet LAN should not connect more than
1024 computers?

Ethernet Capture
Drawback of using CSMA/CD : Sharing not necessarily fair when
a computer connected to the LAN sends excessive number of
frame, it may dominate the LAN.
For instance an NICs which act as a source of high quality
packetized video might dominate the LAN, this effect is known as
Ethernet capture.
Visualisation of Ethernet capture by node A :

Ethernet capture also arises when many sources


compete with one source which has much more data to
send.
How to avoid?

Use of higher speed transmission (100 mbps)

Use full duplex cabling

REFERENCES

Arihari Nelakuditi, and Souvik Sen, Carrier Sense


Multiple Access with Collision Notification in proc. IEEE,
2012, pp. 554-556.

"IEEE Std 802.11b-1999",Part 11: Wireless LAN Medium


Access Control (MAC) and Physical Layer (PHY)
SpecificationsHigher-speed Physical Layer Extension in
the 2.4 GHz Band, Nov. 2002.

http://standards.ieee.org/getieee802/

Thank You

You might also like