You are on page 1of 55

Chapter 6

Medium Access Control


Protocols and
Local Area Networks

Chapter Figures
Communication networks may be classified into two as,

1. Switched networks
They consist of transmission lines, multiplexers and switches. They use routing in
transferring information from source to destination. They use hierarchical addressing to
help routing.

2. Broadcast networks
In this type of networks, transmission medium is shared by a number of users. All
users hear the transmitted information. There is no need for routing and simple flat
addressing is sufficient. This type of networks is also known as multiple access networks.
This type of networks requires medium access control (MAC) protocol to coordinate
access to the medium.
3
2 4
1

Shared multiple
access medium

M 5

Leon-Garcia/Widjaja Communication Networks Figure 6.1


Medium sharing techniques

Static Dynamic medium


channelization access control

Scheduling Random access

Leon-Garcia/Widjaja Communication Networks Figure 6.2


Satellite = fin

channel = fout

Leon-Garcia/Widjaja Communication Networks Figure 6.3


Inbound line

Outbound line
Host
computer

Stations

Leon-Garcia/Widjaja Communication Networks Figure 6.4


(a)

(b)

Leon-Garcia/Widjaja Communication Networks Figure 6.5


Leon-Garcia/Widjaja Communication Networks Figure 6.6
First transmission Retransmission

t
t0-X t0 t0+X t0+X+2tprop t0+X+2tprop + B

Vulnerable Time-out Backoff period Retransmission


period B
if necessary

Leon-Garcia/Widjaja Communication Networks Figure 6.10


X= transmission time of a packet in seconds

new packets successful packets

collided packets

Aloha channel

t-X t t+X
Collision

t-X t t+X

Collision
X = packet transmission time

G=total (new+collided) frame arrival rate per X sec.

"! =Prob(k transmissions in 2X seconds)

(#$)! & "#$


"! = !!
, k=0,1,2,…

"( =Prob(successful packet transmission)= Prob(no collision)

"( = ") = $ *#$

S = throughput

% = &"+

% = &$ *#$ (Aloha throughput)

Slotted Aloha

S C
($)! & "$
"! = !!
, k=0,1,2,…

"( = ") = $ *$

% = &"+

% = &$ *$ (Slotted Aloha throughput)


0.4
0.368
0.35

0.3

S 0.25 Ge-G
0.2 0.184
0.15

0.1

0.05 Ge-2G
0
0.01563

0.03125

0.0625

0.125

0.25

0.5

8
G

Leon-Garcia/Widjaja Communication Networks Figure 6.11


Station A
begins
transmission
at t=0 A

Station A
captures
channel
at t=tprop A

Leon-Garcia/Widjaja Communication Networks Figure 6.13


CSMA

If the channel is sensed idle transmit the packet, on the other hand if the channel is sensed
busy there are three variations,

1. 1-persistent CSMA

!!
Channel is busy

Successful Transmission

!!
Channel is busy

Collision

2. Nonpersistent CSMA

Backoff resense
Channel is busy
3. p-persistent CSMA

"!
Channel is busy
S 0.6
0.53
0.5

1-Persistent 0.4
0.01
CSMA 0.45
0.3

0.2 0.16
0.1
0.1

0
0.02
0.03
0.06
0.13
0.25
0.5
1
2
4
8
16
32
64
G
1

Leon-Garcia/Widjaja Communication Networks Figure 6.15 – part 1


S 0.9 0.81
0.8
0.7
Non-Persistent 0.6 0.01
CSMA 0.5 0.51
0.4
0.3
0.2 0.14
0.1
0.1
0
G
0.02

0.03

0.06

0.13

0.25

0.5

16

32

64
1

Leon-Garcia/Widjaja Communication Networks Figure 6.15 – part 2


A begins to
transmit at A B B begins to
t=0 transmit at
A B t = tprop- ;
B detects
collision at
A detects
t = tprop
collision at A B
t= 2 tprop-

Leon-Garcia/Widjaja Communication Networks Figure 6.16


(a)
Busy Contention Busy Idle Contention Busy

Time

(b)

Pmax 0.6

0.4

0.2

0
2 4 6 8 10 12 14 16

Leon-Garcia/Widjaja Communication Networks Figure 6.17


CSMA-CD

L = frame length in bits.


R = transmission rate (bits/sec)
! = #$%%& () *+% #,-./0 (meters/sec)
d = length of the bus (meters)
*!"#! = end-to-end propagation delay of the bus
X = frame transmission time.
n = number of stations with a frame to transmit

$ & (!"#!
1= , *!"#! = , /=
% ' )

2* = 23(4( 6 )3/7% *3/.#7,##,(.# &83,.- / 7,.,#0(*)

2* = :+*;$* (< − $)+,* , k=0..n

2-.//0-- = Prob(a frame transmission during a minislot will be successful)

2-.//0-- =Prob( no collision)

2-.//0-- = 21 = .$(< − $)+,1

&2$%&&'$$ 1
&!
=> => $ = +

1 1
2345
-.//0-- = (< − +)
+,1 →
0

@* = 23(4(0%.-*+ () / A(.*%.*,(. ,.*%3B/0 ,# 6 7,.,#0(*#)


C = /B%3/-% 0%.-*+ ()/ A(.*%.*,(. ,.*%3B/0 ,. .874%3 () 7,.,#0(*#
@

@* = 2345 345
-.//0-- (< − 2-.//0-- )
+,1 , k=1…
1
C = ()*
@ = % = D. F<G 7,.,#0(*#
2 $%&&'$$

Cycle is defined as a contention interval followed by a successful frame


transmission.

AH = /B%3/-% AIA0% &83/*,(. = 1 + *!"#! + @


C(D*!"#! )

) )
K345 = /6
= )7 (
!"#! 70(:(!"#! )

1
K345 = 17(:071)4
CSMA/CD
1 1-P CSMA

0.8 Non-P CSMA


max
0.6
Slotted ALOHA
0.4
ALOHA
0.2

0 a
0.01 0.1 1

Leon-Garcia/Widjaja Communication Networks Figure 6.18


Reservation Data
interval transmissions

r d d d r d d d Time
Cycle n Cycle (n + 1)

r = 1 2 3 M

Leon-Garcia/Widjaja Communication Networks Figure 6.19


(a)
r 3 5 r 3 5 r 3 5 8 r 3 5 8 r 3
t

(b) 8

r 3 5 r 3 5 r 3 5 8 r 3 5 8 r 3
t

Leon-Garcia/Widjaja Communication Networks Figure 6.20


Assume that the transmission time of each packet is 1 unit of time and duration
of a reservation minislot is ! units, ! ≪ <.
<
K345 =
<7<'

Assuming we use slotted Aloha for reservation,


(a) Shared inbound line
Outbound line
Central
controller

(b) (c)

Central
controller

Leon-Garcia/Widjaja Communication Networks Figure 6.21


Polling messages

1 2 3 4 5 … M 1 2
t

Packet transmissions

Leon-Garcia/Widjaja Communication Networks Figure 6.22


M = .874%3 () #*/*,(.#
N/M= arrival rate of frames per stations
*′= walk time per station
Q= = *(*/0 R/06 *,7%
X = packet transmission time.
S[U/ ]
= /B%3/-% .874%3 () )3/7% /33,B/0# *( / #*/*,(. &83,.- / AIA0%.
S[W/ ] = /B%3/-% AIA0% &83/*,(.

>
S[U/ ] = < S[W/ ]

>
S[W/ ] = M{S[U/ ]1 + *′} = M Z< S[W/ ]1 + *′[

Solving the above equation for S[W/ ],

<(+ ?+
S[W/ ] = 1,>) = 1,@
Listen mode Transmit mode

Input Output
from Delay to Delay
ring ring

To device From device

Leon-Garcia/Widjaja Communication Networks Figure 6.23


d
a) b) c) d
d
d
dd d d
d d
d
d d
d d

Busy token Free token

Leon-Garcia/Widjaja Communication Networks Figure 6.24


1

M 2

M-1
3
M = number of stations.
) = number of bits in a token
b = number of bit delays at a station
QA =propagation delay from station i to station i+1.
Q= total propagation delay around the ring
L = frame length in number of bits
X = transmission time of a frame
R = transmission rate
Q= = ring latency

$
1=%

Q = ∑<
AB1 QA

<C
Q= = Q +
%
W+3(8-+$8* = ]0DD = %))%A*,B% *3/.#7,##,(. 3/*%
/B%3/-% .874%3 () 8#%)80 ,.)(37/*,(. 4,*# ,. / AIA0%
=
/B%3/-% &83/*,(. () / AIA0%

<$
Maximum W+3(8-+$8* = ,-
<()7?+ )7 7?+
.

0DD0/(AE0 ("4+-3A--A#+ "4(0 %'--


U(37/0,^%& *+3(8-+$8* = K = ("4+-3A--A#+ "4(0
= %

<)
K345 = ,-
<()7?+ )7 7?+
.
Wireless LANs

In wireless LANs collision detection is not possible because of,

1. Transmission errors in the channel is high

2. Hidden terminal problem

In the network below, let say A would like to transmit to B. At this


time, C may be transmitting to B and A willnot be aware of this
transmission.
Contention-free service Contention service

Point coordination
function
MAC
Distribution coordination function
(CSMA-CA)

Physical

Leon-Garcia/Widjaja Communication Networks Figure 6.68


Carrier Sense Multiple Access with Collision Avoidance ( CSMA/CA)

1. If channel is idle source transmits an RTS packet to the destination. If it


receives a CTS packet from the destination, source starts transmitting
the data packet.

2. If channel is busy or RTS collides, then source backoffs a random


amount of time. Contention intervals are divided into minislots.
During each minislot a station decrements its backoff counter by one.
If during count down channel becomes busy, then it freezes the
decrement of the counter. After channel becomes idle it resumes
decrementing of the backoff counter from where it left. When backoff
counter reaches to zero it transmits its RTS packet.

minislot

Busy Contention period Busy

3. The destination transmits an ACK after receiving a data packet.


DIFS Contention
window

PIFS
DIFS
Busy SIFS Next
medium frame

Time

Wait for reattempt


Defer access
time

Leon-Garcia/Widjaja Communication Networks Figure 6.69


(a)
B
RTS

A requests to send C

(b) CTS B CTS

A C

B announces A ok to send

(c)
B
Data Frame

A sends C remains quiet


Leon-Garcia/Widjaja Communication Networks Figure 6.70
DIFS
Data

Source

SIFS
ACK

Destination

DIFS

Other NAV

Wait for
Defer Access Reattempt Time

Leon-Garcia/Widjaja Communication Networks Figure 6.71


DIFS
RTS Data

Source

SIFS SIFS SIFS


CTS Ack

Destination

DIFS
NAV (RTS)

Other NAV (CTS)

NAV (Data)

Defer access

Leon-Garcia/Widjaja Communication Networks Figure 6.72


S1 S2 S3

LAN1

Bridge

LAN2

S4 S5 S6
Leon-Garcia/Widjaja Communication Networks Figure 6.79
Network Network

Bridge LLC
LLC

MAC MAC MAC MAC

Physical Physical Physical Physical

Leon-Garcia/Widjaja Communication Networks Figure 6.80


S1 S2 S3 S4 S5

LAN1 LAN2 LAN3


B1 B2
Port 1 Port 2 Port 1 Port 2

Address Port Address Port

Leon-Garcia/Widjaja Communication Networks Figure 6.81


S1 S2 S3 S4 S5

S1 S5

LAN1 LAN2 LAN3


B1 B2
Port 1 Port 2 Port 1 Port 2

Address Port Address Port


S1 1 S1 1

Leon-Garcia/Widjaja Communication Networks Figure 6.82


S1 S2 S3 S4 S5

S3 S2

LAN1 LAN2 LAN3


B1 B2
Port 1 Port 2 Port 1 Port 2

Address Port Address Port


S1 1 S1 1
S3 1 S3 1

Leon-Garcia/Widjaja Communication Networks Figure 6.83


S1 S2 S3 S4 S5

S4 S3

LAN1 LAN2 LAN3


B1 B2
Port 1 Port 2 Port 1 Port 2

Address Port Address Port


S1 1 S1 1
S3 2 S3 1
S4 2 S4 2

Leon-Garcia/Widjaja Communication Networks Figure 6.84


S1 S2 S3 S4 S5

S2 S1

LAN1 LAN2 LAN3


B1 B2
Port 1 Port 2 Port 1 Port 2

Address Port Address Port


S1 1 S1 1
S3 2 S3 1
S4 2 S4 2
S2 1

Leon-Garcia/Widjaja Communication Networks Figure 6.85


LAN1
(1) (1)

B1 B2
(1)
(2) (2) (3)
B3
LAN2 (1) (2)

B4
(2)
LAN3 (1)
B5
(2)
LAN4

Leon-Garcia/Widjaja Communication Networks Figure 6.86


Spanning Tree Algorithm
Routing Route 1 Route 2 Route m
control designator designator designator
2 bytes 2 bytes 2 bytes 2 bytes

Destination Source Routing Data FCS


address address information

Leon-Garcia/Widjaja Communication Networks Figure 6.88


LAN B4 LAN
S1 2 4
B1 S2

LAN
1 B3 B5 B7

B2 S3
LAN B6 LAN
3 5

Leon-Garcia/Widjaja Communication Networks Figure 6.89


Bridges that are turned on in spanning tree: B1, B3, B4, B6

Single route broadcasting:


All routes broadcasting :
VLAN 1 VLAN 2 VLAN 3

S3 S6 S9

Floor n+1

Physical
S2 S5 S8 partition

Floor n

1 2 3 4 5 6
7 S1 S4 S7
Bridge
or 8

switch 9 Floor n-1

Logical partition
Leon-Garcia/Widjaja Communication Networks Figure 6.92

You might also like