local area networks - worcester polytechnic institute

45
LANs LANs Studying Local Area Networks via the Media Access Control (MAC) SubLayer Networks: Local Area Networks Networks: Local Area Networks 1 1

Upload: others

Post on 03-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Local Area Networks - Worcester Polytechnic Institute

LANsLANsStudying

Local Area Networksvia the

Media Access Control (MAC) SubLayer

Networks: Local Area NetworksNetworks: Local Area Networks 11

Page 2: Local Area Networks - Worcester Polytechnic Institute

Local Area NetworksLocal Area Networks• Aloha• Slotted Aloha• CSMA (non-persistent, 1-persistent,

p-persistent)• CSMA/CD• Ethernet• Token Ring

Networks: Local Area NetworksNetworks: Local Area Networks 22

Page 3: Local Area Networks - Worcester Polytechnic Institute

802.3CSMA-CD

802.5Token Ring

802.2 Logical Link Control

PhysicalLayer

MAC

LLC

802.11Wireless

LAN

Network Layer

Data LinkLayer

Network Layer

PhysicalLayerVarious Physical Layers

OtherLANs

Networks: Local Area NetworksNetworks: Local Area Networks 33

Copyright ©2000 The McGraw Hill CompaniesIEEE 802 OSI

Figure 6.11

Page 4: Local Area Networks - Worcester Polytechnic Institute

Networks: Local Area NetworksNetworks: Local Area Networks 44

12

34

5M

Shared MultipleAccess Medium

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.1

Page 5: Local Area Networks - Worcester Polytechnic Institute

Static Channel Allocation ProblemStatic Channel Allocation Problem

The history of broadcast networks includes satellite and packet radio networks.

Let us view a satellite as a repeateramplifying and rebroadcasting everything that comes in.

To generalize this problem, consider networks where every frame sent is automaticallyreceived by every site (node).

Networks: Local Area NetworksNetworks: Local Area Networks 55

Page 6: Local Area Networks - Worcester Polytechnic Institute

= finSatellite Channel= fout

Networks: Local Area NetworksNetworks: Local Area Networks 66

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.3

Page 7: Local Area Networks - Worcester Polytechnic Institute

Static Channel Allocation Static Channel Allocation ProblemProblem

We model this situation as n independent users (one per node), each wanting to communicate with another user and they have no other form of communication.

The Channel Allocation Problem

To manage a single broadcast channel which must be sharedefficiently and fairly among n uncoordinated users.

Networks: Local Area NetworksNetworks: Local Area Networks 77

Page 8: Local Area Networks - Worcester Polytechnic Institute

Ring networks

Multitapped Bus

Networks: Local Area NetworksNetworks: Local Area Networks 88

Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 6.5

Page 9: Local Area Networks - Worcester Polytechnic Institute

Possible Model Assumptions for Possible Model Assumptions for the Channel Allocation Problemthe Channel Allocation Problem

0. Listen property :: (applies to satellites)The sender is able to listen to sent frame one round-trip after sending it.

no need for explicit ACKs.1. The model consists of n independent stations.2. A single channel is available for communications.

Networks: Local Area NetworksNetworks: Local Area Networks 99

Page 10: Local Area Networks - Worcester Polytechnic Institute

Possible Model Assumptions for Possible Model Assumptions for the Channel Allocation Problemthe Channel Allocation Problem3. Collision Assumption :: If two frames are

transmitted simultaneously, they overlap in time and the resulting signal is garbled. This event is a collision.

4a. Continuous Time Assumption :: frame transmissions can begin at any time instant.

4b. Slotted Time Assumption :: time is divided into discrete intervals (slots). Frame transmissions always begin at the start of a time slot.

Networks: Local Area NetworksNetworks: Local Area Networks 1010

Page 11: Local Area Networks - Worcester Polytechnic Institute

Possible Model Assumptions for Possible Model Assumptions for the Channel Allocation Problemthe Channel Allocation Problem

5a. Carrier Sense Assumption (CS) ::Stations can tell if the channel is busy (in use) before trying to use it. If the channel is busy, no station will attempt to use the channel until it is idle.

5b. No Carrier Sense Assumption ::Stations are unable to sense channel before attempting to send a frame. They just go ahead and transmit a frame.

Networks: Local Area NetworksNetworks: Local Area Networks 1111

Page 12: Local Area Networks - Worcester Polytechnic Institute

a :: Relative Propagation Timea :: Relative Propagation Time

Networks: Local Area NetworksNetworks: Local Area Networks 1212

length of the data path (in bits)a = --------------------------------------------------

length of a standard frame (in bits)-OR-

propagation time ( in seconds)a = ------------------------------------------------

transmission time (in seconds)

-OR-

delay-bandwidth product*a = ----------------------------------------- [ LG&W def p.346]

average frame size

* Delay-bandwidth product :: the product of the capacity (bit rate) and the delay.

Page 13: Local Area Networks - Worcester Polytechnic Institute

Networks: Local Area NetworksNetworks: Local Area Networks 1313

Page 14: Local Area Networks - Worcester Polytechnic Institute

Relative Propagation TimeRelative Propagation TimeR = capacity (data rate)d = maximum distance of communications pathv = propagation velocity (Assume v = 2/3 speed of light 2 x

108 meters/second)

L = frame length

d / v Rda = ------- = ------

L/R vL

Networks: Local Area NetworksNetworks: Local Area Networks 1414

Page 15: Local Area Networks - Worcester Polytechnic Institute

Upper Bound on Utilization for Upper Bound on Utilization for Shared Media LANShared Media LAN

Assume a perfect, efficient access that allows one transmission at a time where there are no collisions, no retransmissions, no delays between transmissions and no bits wasted on overhead. {These are best-case assumptions}

Tput LUtil = --------------- = ------------------------------------------------

Capacity propagation time + transmission time--------------------------------------------------------

R

Networks: Local Area NetworksNetworks: Local Area Networks 1515

Page 16: Local Area Networks - Worcester Polytechnic Institute

Maximum Utilization for LANsMaximum Utilization for LANsL

---------------d L L 1

max. Util = ---- + ---- = --------------- = ------------v R Rd a + 1

------------------- ---- + LR v

1max. Util = ---------

1 + a

Networks: Local Area NetworksNetworks: Local Area Networks 1616

Page 17: Local Area Networks - Worcester Polytechnic Institute

A transmits at t = 0

Distance d meterstprop = d / ν seconds

A BB transmits before t = tprop and detectscollision shortlythereafter

A B

A BA detectscollision at t = 2 tprop

Figure 6.7

Networks: Local Area NetworksNetworks: Local Area Networks 1717

Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks

Page 18: Local Area Networks - Worcester Polytechnic Institute

LAN Design PerformanceLAN Design PerformanceFor broadcast LANs what are the factors under the

designer’s control that affect LAN performance?• Capacity {function of media}• Propagation delay {function of media, distance}• Bits /frame (frame size)• MAC protocol• Offered load – depends on how retransmissions

are handled• Number of stations• Bit error rate

Networks: Local Area NetworksNetworks: Local Area Networks 1818

Page 19: Local Area Networks - Worcester Polytechnic Institute

Typical frame delay versus throughput performance

E[T]/E[X]

1

Tran

sfer

Del

ay

ρρmax 1

Load

Networks: Local Area NetworksNetworks: Local Area Networks 1919

Figure 6.8Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies

Page 20: Local Area Networks - Worcester Polytechnic Institute

Delay-Throughput Performance Dependence on aE[T]/E[X]

1

aa′

a′ > aTr

ansf

er D

elay

ρρ′max ρmax 1

Networks: Local Area NetworksNetworks: Local Area Networks 2020

LoadCopyright ©2000 The McGraw Hill CompaniesFigure 6.9Leon-Garcia & Widjaja: Communication Networks

Page 21: Local Area Networks - Worcester Polytechnic Institute

Multiple Access ProtocolsMultiple Access Protocols

Networks: Local Area NetworksNetworks: Local Area Networks 2121

Page 22: Local Area Networks - Worcester Polytechnic Institute

Historic LAN Performance NotationHistoric LAN Performance NotationI :: input load - the total (normalized) rate of data

generated by all n stationsG :: offered load – the total (normalized) data rate

presented to the network including retransmissionsS :: throughput of LAN - the total (normalized) data

rate transferred between stationsD :: average frame delay – the time from when a

frame is ready for transmission until completion of a successful transmission.

Networks: Local Area NetworksNetworks: Local Area Networks 2222

Page 23: Local Area Networks - Worcester Polytechnic Institute

Normalizing Throughput (S)Normalizing Throughput (S)[[assuming one packet = one frameassuming one packet = one frame]]

Networks: Local Area NetworksNetworks: Local Area Networks 2323

Throughput (S) is normalized using packets/packet time where

packet time :: the time to transmit a standard fixed-length packet

i.e., packet lengthpacket time = -----------------

bit rate

NOTE: Since the channel capacity is one packet /packet time, S can be viewed as throughput as a fraction of capacity.

Represented in LG&W by in later graphs.ρ

Page 24: Local Area Networks - Worcester Polytechnic Institute

Historic LAN Performance Notation

1

2

3

n

retransmissions

SIXXX

G

D

Networks: Local Area NetworksNetworks: Local Area Networks 2424

Page 25: Local Area Networks - Worcester Polytechnic Institute

ALOHAALOHA• Abramson solved the channel allocation problem

for ground radio at University of Hawaii in 1970’s.

Aloha Transmission Strategy

Stations transmit whenever they have data to send.

• Collisions will occur and colliding frames are destroyed.

Networks: Local Area NetworksNetworks: Local Area Networks 2525

Aloha Retransmission Strategy

Station waits a random amount of time before sending again.

Page 26: Local Area Networks - Worcester Polytechnic Institute

Pure ALOHAPure ALOHA

Figure 4-2. Vulnerable period for the shaded frame.

Networks: Local Area NetworksNetworks: Local Area Networks 2626

Page 27: Local Area Networks - Worcester Polytechnic Institute

ALOHA

First transmission Retransmission

tt0t0-X t0+X t0+X+2tprop

t0+X+2tprop+Β

Vulnerableperiod

Time-out Backoffperiod

Retransmissionif necessary

random backoff period B

Networks: Local Area NetworksNetworks: Local Area Networks 2727

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.16

Page 28: Local Area Networks - Worcester Polytechnic Institute

ALOHA

Vulnerable period :: t0 – X to t0 + X two frame transmission timesAssume: Poisson Arrivals with average number of arrivals of2G arrivals/ 2 X

Networks: Local Area NetworksNetworks: Local Area Networks 2828

S = G e-2 (1+a) G

Page 29: Local Area Networks - Worcester Polytechnic Institute

Slotted ALOHA Slotted ALOHA (Roberts 1972)(Roberts 1972)• uses discrete time intervals as slots (i.e., slot = one

packet transmission time) and synchronize the send time (e.g., use “pip” from a satellite).

Slotted Aloha Strategy

Station transmits ONLY at the beginning of a time slot.

Networks: Local Area NetworksNetworks: Local Area Networks 2929

• Collisions will occur and colliding frames are destroyed.

Slotted Aloha Retransmission Strategy

Station waits a random amount of time before sending again.

Page 30: Local Area Networks - Worcester Polytechnic Institute

Slotted ALOHA

Networks: Local Area NetworksNetworks: Local Area Networks 3030

(k+1)XkX t0 +X+2tprop+Βt0 +X+2tprop

t

Vulnerableperiod

Time-out Backoffperiod

Retransmissionif necessary

random backoff period B slots

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.18

Page 31: Local Area Networks - Worcester Polytechnic Institute

Slotted ALOHA

Vulnerable period :: t0 – X to t0 one frame transmission timeAssume: Poisson Arrivals with average number of arrivals ofG arrivals/ X

P0 = P[k=0, t=1] = e –G

S = G P0S = G e –G

and an adjustment for a yields

Networks: Local Area NetworksNetworks: Local Area Networks 3131

S = G e- (1+a) G

Page 32: Local Area Networks - Worcester Polytechnic Institute

ALOHA and Slotted ALOHAThroughput versus Load

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.01

563

0.03

125

0.06

25

0.12

5

0.25 0.5 1 2 4 8

Ge-G

Ge-2G

G

S0.184

0.368

Aloha

Slotted Aloha

Networks: Local Area NetworksNetworks: Local Area Networks 3232

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.17

Page 33: Local Area Networks - Worcester Polytechnic Institute

Carrier Sense with Multiple Access (CSMA)Carrier Sense with Multiple Access (CSMA)

1-persistent CSMA Transmission Strategy“the greedy algorithm”

1. Sense the channel.2. IF the channel is idle, THEN transmit.3. IF the channel is busy, THEN continue to

listen until channel is idle and transmit immediately.

Networks: Local Area NetworksNetworks: Local Area Networks 3333

Page 34: Local Area Networks - Worcester Polytechnic Institute

nonpersistentnonpersistent CSMA Transmission StrategyCSMA Transmission Strategy

“the less-greedy algorithm”

• Sense the channel.

• IF the channel is idle, THEN transmit.

1. IF the channel is busy, THEN wait a random amount of time and repeat the algorithm.

Networks: Local Area NetworksNetworks: Local Area Networks 3434

Page 35: Local Area Networks - Worcester Polytechnic Institute

p p -- persistent CSMA persistent CSMA Transmission StrategyTransmission Strategy

“a slotted approximation”1. Sense the channel.

2. IF the channel is idle, THEN with probability ptransmit and with probability (1-p) delay one time slot and repeat the algorithm..

3. IF the channel is busy, THEN delay one time slotand repeat the algorithm.

Networks: Local Area NetworksNetworks: Local Area Networks 3535

Page 36: Local Area Networks - Worcester Polytechnic Institute

P P –– Persistent CSMA Persistent CSMA detailsdetails

• the time slot is usually set to the maximum propagation delay.

• as p decreases, stations wait longer to transmit but the number of collisions decreases.

• Consideration for the choice of p : – (n x p) must be < 1 for stability, where n is

maximum number of stations, i.e.,p < 1/n

Networks: Local Area NetworksNetworks: Local Area Networks 3636

Page 37: Local Area Networks - Worcester Polytechnic Institute

CSMA CollisionsCSMA Collisions

• In all three cases a collision is possible.

• CSMA determines collisions by the lack of an ACK which results in a TIMEOUT. {This is extremely expensive with respect to performance.}

• If a collision occurs, THEN wait a random amount of time and retransmit.

Networks: Local Area NetworksNetworks: Local Area Networks 3737

Page 38: Local Area Networks - Worcester Polytechnic Institute

CSMA/CDCSMA/CDCSMA CSMA with with Collision DetectionCollision Detection• If a collision is detected during transmission,

THEN immediately cease transmitting the frame.• The first station to detect a collision sends a jam

signal to all stations to indicate that there has been a collision.

• After receiving a jam signal, a station that was attempting to transmit waits a random amount of time before attempting to retransmit.

• The maximum time needed to detect a collision is 2 x propagation delay.

Networks: Local Area NetworksNetworks: Local Area Networks 3838

Page 39: Local Area Networks - Worcester Polytechnic Institute

CSMA CSMA vsvs CSMA/CDCSMA/CD• CSMA is essentially a historical technology until we

include Wireless LANs.• If propagation time is short compared to transmission

time, station can be listening before sending with CSMA.

• Collision detection (CD) is accomplished by detecting voltage levels outside acceptable range. Thus attenuation limits distance without a repeater.

• If the collision time is short compared to packet time (i.e., small a), performance will increase due to CD.

Networks: Local Area NetworksNetworks: Local Area Networks 3939

Page 40: Local Area Networks - Worcester Polytechnic Institute

Figure 6.23

frame contention frame

Probability of 1 successful transmission:

Ps u c c e s s = n p (1 − p )n −1

Networks: Local Area NetworksNetworks: Local Area Networks 4040

00.10.20.30.40.50.6

2 4 6 8 10 12 14 16

n

Pmax

Psuccess is maximized at p=1/n:

Ps u c c e s s

max = n (1 − 1n

)n −1 →1e

Page 41: Local Area Networks - Worcester Polytechnic Institute

Persistent and NonPersistent and Non--persistent persistent CSMACSMA

Figure 4-4.Comparison of the channel utilization versus load for various random access protocols.

Networks: Local Area NetworksNetworks: Local Area Networks 4141

Page 42: Local Area Networks - Worcester Polytechnic Institute

0

0.1

0.2

0.3

0.4

0.5

0.6

0.02

0.03

0.06

0.13

0.25 0.5 1 2 4 8 16 32 64

1-PersistentCSMA

0.53

0.45

0.16

G

S

Throughput vs Load with varying a

a = 1

a = 0.01

a = 0.1

Networks: Local Area NetworksNetworks: Local Area Networks 4242

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.21 - Part 2

Page 43: Local Area Networks - Worcester Polytechnic Institute

Throughput vs LoadWith varying a

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.02

0.03

0.06

0.13

0.25 0.5 1 2 4 8 16 32 64

Non-PersistentCSMA

0.81

0.51

0.14

G

S

a = 0.01

a = 0.1

a = 1

Networks: Local Area NetworksNetworks: Local Area Networks 4343

Leon-Garcia & Widjaja: Communication NetworksCopyright ©2000 The McGraw Hill Companies Figure 6.21 - Part 1

Page 44: Local Area Networks - Worcester Polytechnic Institute

Maximum Achievable Throughputs

0

0.2

0.4

0.6

0.8

1

0.01 0.1 1

Aloha

Slotted Aloha

1-P CSMANon-P CSMA

CSMA/CD

a

ρmax

Networks: Local Area NetworksNetworks: Local Area Networks 4444

Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 6.24

Page 45: Local Area Networks - Worcester Polytechnic Institute

Frame Delay with varying a

CSMA-CD

0

5

10

15

20

25

30

0

0.06

0.12

0.18

0.24 0.3

0.36

0.42

0.48

0.54 0.6

0.66

0.72

0.78

0.84 0.9

0.96

Load

Avg

. Tra

nsfe

r Del

ay

a = 0.01a = 0.1a = 0.2

Networks: Local Area NetworksNetworks: Local Area Networks 4545

Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks Figure 6.51