# CSMACD Carrier Sense Multiple Access Collision Detection

Document Sample

```					Background 1: More Media Access protocols

CSMA/CD: Carrier Sense Multiple Access/ Collision
Detection

Listen while talking! If another transmission is sensed,
discontinue the transmission. Send a jamming signal …

Back-off for a random period of time.

Ethernet

Station A    Station B   Station C    Station D

Twisted pair or
Baseband cable

Typical cable types:

A. Category 3 Twisted pair
B. Category 5 Twisted pair (with insulation between
wires for less crosstalk)
C. Baseband 50 ohms Coax cables: Thin coax (10base2)
D. Baseband 50 ohms Coax cables: Thik coax (10base5)
E. Fiber Optics
Cable performance data

Type      Cable   Max. segment Nodes/segment Quality
10base5   Coax      500m           100       sturdy
10base2   Coax      200m            30       Thin
10baseT   Twisted   100m           1024      ETW
10baseF   Fiber     2000m          1024      Not easy

ETW : Easy to Work
Not easy: Engineering is tough

10baseT: Normally a hub only. Max. cable distance to and
from hub is 100m.

Typically a hub is a multiport junction.

HUB
HUB
Cable topologies:

Repeater

Ribbed
Backbone

Repeater
Segmented

No path between any two stations may traverse more than 4
repeaters.

A conceptual model.

Try to get this with
probability p

Time   Time   Time   Time   Time    ….    Time
Slot   Slot   Slot   Slot   Slot          Slot

Assume k active stations ready to transmit. Time is split
into  width contention slots. Any station wanting to
transmit must grab a slot first. Probability that a station
wants to transmit is p.

A = probability that some station gets the channel

 kp(1  p) k  1

Maximum A is realized when kp = 1 . Maximally fair
system offering each station equal opportunity to transmit.

1 k 1 1
Note that lim it Amax  ( 1      )   
k                 k       e

Probability that a station may waste (k-1) contention slots
and then succeeds on the next attempt is (A is the
probability to attempt to grab a slot)

A( 1  A )k  1 .

Therefore, the expected number of contention slot is going
to be
                    1
k 1
 kA( 1  A )      
k 1                  A

Since each contention slot is of width 2 , the total length
of the contention period (including a success) is
2
.
A
Channel efficiency: Assume mean frame time is P secs
(one frame is transmitted per P unit of time). Then

P
efficiency 
2
P
A

If F = frame length, B = bandwidth, L = largest distance
separating two stations, c = light’s speed, then

P       cF             1
efficiency                     
P  2e cF  2 LeB 1  2 BLe / cF

propagation _ time 2 L / c
Let us denote a                           
transmission _ time F / B

2 BL
a        . And in terms of it
cF

1
efficiency 
1  ae

Note that For a high-speed cable, BL is large, making a
large. Larger the value of a, less efficient the LAN is.

If the frame size is small, a becomes large. Therefore, a
larger frame is desired.

Efficiency curve looks like
Efficiency

a

Some contention-free LAN architectures.

Contention can be removed using

A. Time-division multiple access:

Time is slotted. A station gets the slot on a round robin
fashion. A type of polling scheme (Hub polling as
opposed to roll-call polling).

If station doesn’t use its slot, it goes idle.

Highly efficient in heavy traffic, poor in low traffic.
1          2          3         4

The slot reservation scheme: 1 2 3 4 1 2 3 4 1 2 3 4 …

B. Frequency-division multiple access:

Same as Time-division, but this time on a broadband cable
allocating its frequency-bands to different stations on a rent
or a lease basis.

Poor efficiency if not used.

C. Bit-Map protocol.

Time is slotted and these slots are to be grabbed. Stations
indicate their willingness to grab a slot on a contention-
slot train in the order of their ID. After that, they get the
time slots in the order of their appearance on the train
slot.
0   0   0   4   0   6   Frame: 4   Frame: 6   0   2

Reservation                Followed by
slot train                 Frame train

An example of reservation protocol. With N stations, a
frame size of d bits if a frame gets transmitted.

d
N d
Nd     d
At high load: efficiency =       
N  Nd d  1

Mean delay: Assume k active nodes on the average at
any time. Then the delay for the node just arrived for
service (joined the queue):
K frames
Awaiting to be
dispatched

SERVER

Frames from
Stations

D. Mini-slotted alternating priorities

A typical MSAP process. Contention slot train. Once a slot
gets marked by the appropriate station, the latter transmits
its frame.

Time

I   Frame       I   Frame           I     Frame

0   1   2               3           4   5   6                7

Each frame is M slots long
Either a concentration slot gets marked and the station
transmit immediately, or it is left fallow.

 k busy stations trying to access the channel
 k stations are always busy in at least one combined
M/C cycle.
 Stations are allowed to transmit only one frame at a
time of size M minislots.
 N = total number of stations.

kM
Therefore, the efficiency e MSAP 
kM  N

Possible improvement. Hybrid design.

Can we get a protocol that works as follows:

lim it        protocol  contention _ free
traffic  heavy
lim it         protocol  contention _ based
traffic  light

Probably a design that would work as follows.

MC/1: Mini-slotted + CSMA/CD

■ A CSMA/CD transmission attempt takes place after a
vacant slot is seen in an MSAP cycle. Every one is free to
grab it.
■ (N-k) CSMA/CD events in any one MC/1 cycle.
Time

Frame       I     Frame    Frame   I

Contention period            Marked slot      MC/1
Followed by an idle          followed by a
slot.                        MSAP train

Unbounded contention
Period.

In one MC/1 cycle

● Exactly (N-k)M minislots are used on CSMA/CD mode.
● On the average ( N  k ) javg  ( N  k ) / A minislots
are wasted on contention.
● k MSAP frames = kM minislots get transmitted on an
MSAP portion of a cycle.
● (N-k) slots are lost for going idle.

Therefore, channel efficiency,

NM
e MC / 1 
N k
NM  ( N  k ) 
A
Improvement. MC/2 Protocol. Contention length is
bounded by length l. After wasting l minislots on a
contention, system switches to a normal MSAP.

Note.
Probability of one success after wasting (j-1) minislots is

p j  A( 1  A ) j  1 j  l
 0, j  l

Therefore, probability of having one success in the full
contention interval is

l
ps   A( 1  A ) j  1  1  ( 1  A )l
j1

Probability of failure in this interval is then

p f  1  p s  ( 1  A )l

For each CSMA/CD period, we would have

Total number of successful minislots n s where
ns  Mps  M ( 1  ( 1  A )l )     and

Total number of lost minislots (failures) n f where
l 1
n f   ( 1  A ) jp j  lp f
j1

( 1  A )  ( 1  A )l  1

A

Thus, the channel efficiency of MC/2 protocol would
appear as

( N  k )ns  kM
e MC / 2 
( N  k )ns  kM  ( N  k )n f  ( N  k )

Delay analysis:

 Di
i
Average delay =       minislot
where
N succ

Di  waiting time for the ith station and
N succislot  number of successful transmission per cycle
min

Now, minislots used in any MC/2 cycle belong to one of
these groups.

● (kM) MSAP minislots
● (N-k) n s CSMA/CD transmission frames
● (N-k) idle minislots
● (N-k) n f wasted collided slots
There will be (k-1) stations waiting for the first two events
and k stations waiting for the last two events.

Therefore,

 Di  ( k  1 ){ kM  ( N  k )ns }  k {( N  k )  ( N  k )n f }

Thus, the average delay,

k
 Dk
i 1
Davg / 2 
MC
ns
k(N k )
M

Typical performance profile:

MC/2/l=7
efficiency

MC/1

MC/2/l=3

Stations, k
IEEE 802.4 Standard: Token-Bus

Conflict free. IBM Design. A LAN with a bus/tree
configuration. The stations are connected to the bus and a
token is passed on the bus. A station receiving the token
may transmit data and then pass the token on to the next
station . A logical ring.

Major parameters.

a.

Token

3          1       4          5       2
Currently, station number 4 has the token. It would be
passed on to the station number 5 next and then to station
number 1.

Most beautiful thing here is that delay is bounded.
Essential features:

● Each station knows its logical predecessor and its logical
successor.
● No station can transmit unless holds the token.
● Stations are incrementally added or deleted from the bus.
Protocol must handle this properly.
● The cable is 75 ohm broadband bus. Both single or dual
cable system could be used with or without head-ends.
● Typical speed: 1, 5, 10 Mbps.

Token holder

Send

Solicit     My address = a    Successor’s

Potential Successor :
My address is between a and b.
Assume for an active station A, its successor and
predecessor are:

A pred             A               Asucc

For each station A on the logical ring is the pair

A : ( A  pred , A  succ )

■Token holder periodically issues Solicit_Successor call to
stations in the neighborhood wishing to join the system
within a response time-window of duration 2 .

■ Set_successor call from a departing station X to its
predecessor is

● Make my successor your successor!

■ Claim_Token call to initiate a ring when it’s first started.
If no response, then the ring closes on itself.

A: (A, A)
On a positive Solicit_Successor response from B

A : ( A, A )  ( A, B )

■ Who_Follows call is initiated when a station finds its
successor crashed.
If B sees a frame from A, then B informs A that B is its
logical successor from now on.

IEEE 802.5.
Almost like IBM’s Token Ring architecture. Very similar.

Basically same as Token bus.

Circulatory token. Whichever station grabs it can change
the token to a junk packet and then transmit its own frame.
After this, the transmitting station inserts a new token into
the ring for the next station.

FDDI (Fiber Distributed Data Interconnect) is an improved
token ring specification based on fiber as the physical
medium. As opposed to Token Ring's single ring, FDDI,
uses two to achieve better results. CDDI, yet another
standard, resembles FDDI, but uses a copper wire for its
ring.
■ The ring must offer sufficient delay to a frame in order to
contain it.

e.g. Ring length = 1 km
propagation speed = 200 m /  sec
Bandwidth = 10 Mbps

In 5  sec the ring would be traversed by a transmitted bit if
not delayed. Within this time, 50 bits will be transmitted.
Therefore, without any extra delay imposed at a passing
station, each bit will occupy a length of 20 m on the ring.

■ Each active station monitors the ring to discover a free
token. If it finds one, it’d change token’s last bit. To do this
it must provide a 1-bit delay at the interface to data stream.

Interface

Must introduce a
minimum 1-bit delay

■ Each station is either in a listen mode or in a transmit
mode. In a listen mode it just introduces 1-bit delay to the
byte stream; in the transmit mode, it appends its own frame
after the “token” …

1-bit delay
at Interface

Listen Mode
Station

Interface

To Station                    From Station

Transmit Mode

Performance. Ring networks offering no contention are
popular for bounded-delay performance. Ideal for real-time
works.

Suppose, N active stations. w = Walk-time for the ring
(i.e. the time it takes for a token to come back to a specific
station if the ring were idle).

Let q = average number of frames to be transmitted from a
given station.

Each frame is of size F bytes. Bandwidth is B bytes/sec.
F
Thus, the transmission time for each frame is     sec .
B
qF
Therefore, delay due to transmission at a station is    sec ,
B
NqF
and over N stations it cumulates to       .
B

NqF
Thus, the total delay seen at a station is D  w              .
B

However, during this time, a station collects q frames in its
incoming buffer.

D
Therefore, q        where  = frame arrival rate over all
N
stations. Thus,

DF                         w                  Bw
D w             Hence, D                       
B                              F           B  F
(1        )
B

w
D
qF
Throughput per station =
B
w
Efficiency, e  1 
D

Notice that F  B otherwise it will explode! The delay
curve looks like
Delay

w



```
DOCUMENT INFO
Shared By:
Categories:
Stats:
 views: 14 posted: 2/2/2010 language: English pages: 22