1 chapter 5 the medium access sublayer. 2 the medium access layer 5.1 channel allocation problem -...

134
1 Chapter 5 The Medium Access Sub layer

Upload: dwight-morgan

Post on 12-Jan-2016

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

1

Chapter 5

The Medium Access Sublayer

Page 2: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

2

The Medium Access Layer

• 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

• 5.2 Multiple Access Protocols - ALOHA, CSMA, CSMA/CD, Collision-free protocols, Limited-c

ontention protocols, Wireless LAN protocols

• 5.3 Ethernet - Cabling, MAC sublayer protocol, Backoff algorithm, Performance,

Gigabit Ethernet, 802.2 Logical Link Control

• 5.4 Wireless LANs - 802.11 protocol stack, physical layer, MAC sublayer protocol, fra

me structure

Page 3: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

3

• 5.5 Broadband Wireless

- Comparison of 802.11 with 802.16, protocol stack, frame structure

• 5.6 Bluetooth

- Bluetooth architecture, Application, Protocol stack, Frame structure

• 5.7 Data Link Layer Switching

- Bridges from 802.x to 802.y, Local internetworking, Spanning tree bridges, Remote bridges

Page 4: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

4

What is MAC• Network assumption: Broadcast channel

– One channel, many stations

– Competition, interference among stations.

• MAC: Medium Access Control– Also known as Multiple-Access Control

– The protocol used to determine who goes next on a shared physical media

• Classification of MAC protocols– Channel allocation (centralized)

– Contention based protocols (distributed)

– Contention – free protocols (distributed)

Page 5: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

5

Medium Access Sublayer Key issue for broadcast network

– who can use the channel when there is competition for it

Medium Access Control: – a sublayer of data link layer that controls the access of no

des to the medium.

Broadcast channels are also referred as multiaccess channels or random access channels

Allocation of a single broadcast channel among competing users:– Static – Dynamic

Page 6: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

6

Static Channel Allocation

FDMA

– The whole spectrum is divided into sub-frequency. TDMA

– Each user has its own time slot. CDMA

– Simultaneous transmission, Orthogonal code

– Analogy:

5.1 The Channel Allocation problem

Page 7: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

7

The M/M/1 Queue• Average number of customers

• Applying Little’s Theorem, we have

• Similarly, the average waiting time and number of customers in the queue is given by

1

0 0 0

2

(1 ) (1 )

1(1 )

(1 ) 1

n nn

n n n

N np n n

N

11LT

1 and

1 2

qqq WNTW

L

E[ ] = L

Page 8: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

8

Example: Slowing Down

M/M/1 system: slow down the arrival and service rates by the same factor m

Utilization factors are the same stationary distributions ⇒the same, average number in the system the same

Delay in the slower system is m times higherAverage number in queue is the same, but in the 1st system

the customers move out faster

/

1 1 /

/

( / )

/ /

N N

N mT mT

m

mW mW

m m

/ m/ m

/

1 1 /

1

/

N

NT

W

Page 9: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

9

Example: Statistical MUX-ing vs. TDM or FDM

• m identical Poisson streams with rate λ/m; link with capacity 1; packet lengths iid, exponential with mean 1/μ

• Alternative: split the link to m channels with capacity 1/m each, and dedicate one channel to each traffic stream

• Delay in each “queue” becomes m times higher

Statistical multiplexing vs. TDM or FDM

When is TDM or FDM preferred over statistical multiplexing?

mT mT

/ m/ m

/ m/ m

m

1T

Page 10: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

10

The Channel Allocation problem5.1.1 Static channel Allocation in LANs and WANs

Frequency Division Multiplexing (FDM)

Page 11: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

11

Page 12: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

12

Both FDM and TDM are not good when traffic is bursty!

Page 13: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

13

5.1.2 Dynamic Channel Allocation in LANs and WANs

Five Assumptions

1. Station Model. The model consists of N independent stations, each generates the frame with probability in an interval . Once a frame is generated, the station is blocked.

2. Single Channel Assumption. A single channel is available for all communication.

3. Collision Assumption. If two frames are transmitted simultaneously, they are destroyed and must be retransmitted again later. There are no other errors.

t t

Page 14: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

14

4a. Continuous Time. Frame transmission can begin at any instant.

4b. Slotted Time. Time is divided into slots. Frame transmission always begin at the start of a slot.

5a. Carrier Sense. Stations can tell if the channel is in use before trying to use it. (ex. LANs)

5b. No Carrier Sense. Stations cannot sense the channel before trying to use it. (ex. satellite network due to long propagation delay)

Page 15: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

15

5.2 Multiple Access Protocols

ALOHA

Carrier Sense Multiple Access Protocols

Collision-Free Protocols

Limited-Contention Protocols

Wavelength Division Multiple Access Protocols

Wireless LAN Protocols

Page 16: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

16

ALOHA Users send whenever they want to send. If it fails, w

ait random time and resend it.

Independent stations

Single channel assumption

Collision occurs

Types of ALOHA– Pure ALOHA: stations transmit at any time (Continuous t

ime)

– Slotted ALOHA: Transmission can only occur at certain time instances

– carrier sense vs no carrier senses

Page 17: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

17

Pure ALOHA• Users transmit whenever they have data to be sent.• The colliding frames are destroyed.• The sender waits a random amount of time and sends it again.

1970s from University of HawaiiPure ALOHA (infinite population)

In pure ALOHA, frames are transmitted at completely arbitrary times.

Page 18: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

18

Pure ALOHA (2)

Vulnerable period for the shaded frame.

Page 19: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

19

Poisson pmf (1) Suppose we are observing the arrival of jobs to a large co

mputation center for the time interval (0, t] Assume that for each small interval of time t, the probabi

lity of a new job arrival is t, where l is the average arrival rate..

If t is sufficiently small, the probability of two or more jobs arriving in the interval of duration t may be neglected.

Divide (0, t] into n subintervals of length t/n, and suppose the arrival of a job in any given interval is independent of the arrival of a job in any other interval.

n very large => the n intervals constitutes a sequence of Bernoulli trials with the probability of success p = t / n

Bernoulli trials: P(X = 0) = p, with P(X = 1) = 1p

Page 20: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

20

Poisson pmf (2)

The Probability of k arrivals in a total of n intervals each with a duration t/n is approximately given by

As n -> infinity =>

Let t be a frame time => t = G

knk ppk

nntnk

1)/,;(b

!/)( ket tk

Page 21: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

21

Page 22: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

22

– efficiency: 18.4 % for channel utilization at best Assume that infinite population of users generates new frames according to

a Poisson distribution with mean S frames per frame time, where 0 < S < 1. Assume that the probability of k transmission attempts per frame time, old a

nd new combined, is also poisson, with mean G per frame time. P0: probability that a frame does not suffer a collision

throughput S = G * P0 (Offered load times transmission succeeding prob.)

vulnerable interval: t0 ~ t0+2t (See Fig. 5-2)

probability that k frames are generated during a given frame time is given b

y the Poisson distribution Probability of no other traffic during the vulnerable period, P0 = e -2G , 2G: mean of two frame time. S = Ge -2G (See Fig. 5-3)

Pure ALOHA (2)

!/][ keGkP Gkr

02 222 GGG GeeGedG

d

184.02/1 ,5.0 max eSG

Page 23: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

23

Throughput versus offered traffic for ALOHA systems.

0.184

0.368

Page 24: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

24

Slotted ALOHA

Page 25: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

25

Page 26: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

26

Page 27: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

27

Page 28: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

28

Page 29: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

29

Page 30: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

30

Page 31: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

31

Page 32: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

32

Page 33: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

33

Page 34: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

34

Page 35: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

35

Page 36: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

36

5.2.2 Carrier Sense Multiple Access Protocols

Page 37: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

37

Page 38: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

38

Page 39: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

39

Persistent and Nonpersistent CSMA

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

Page 40: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

40

Page 41: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

41

CSMA/CD• Abort transmission as soon as they detect a collision

– saves time and bandwidth– waits a random time and tries again

• Fig. 5-5– minimum time to detect collision: the signal propagates from one statio

n to the other– worst case: 2t (t : propagation time between two farthest stations)– model the contention interval as a slotted ALOHA system with slot =

2t– special signal encoding: to detect a collision of two 0-volt signals

• No MAC sublayer protocol guarantees reliable delivery. Packets may be lost due to– collision– lack of buffer space– missed interrupt

Page 42: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

42

CSMA with Collision Detection

CSMA/CD can be in one of three states: contention, transmission, or idle.

Page 43: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

43

5.2.3 Collision-Free Protocols

• Collision is serious (affects performance) as.– large t: long cable

– short frames: high bandwidth (propagation dominate the delivering time.

• Bit-Map Protocol (See Fig. 5-6)– A cycle consists of a contention period and a data transmission

period.

– Contention period contains N slots, one bit for a station

– a station inserts 1 at its slot when has data. After the contention period, stations transmit data in the sequence in the contention period.

– problem: overhead is 1 bit per station

Page 44: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

44

5.2.3 Collision-Free Protocols

4-6.

The basic bit-map protocol.

Page 45: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

45

• Binary Countdown– Give priority to higher address by OR bit-by-bit

addresses of the stations waiting for transmission.

– virtual station number: to change priority

Collision-Free Protocols (2)

The binary countdown protocol. A dash indicates silence.

Page 46: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

46

Page 47: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

47

5.2.4 Limited-contention Protocols

Page 48: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

48

Limited-Contention Protocols

Page 49: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

49

Page 50: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

50

Page 51: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

51

Page 52: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

52

5.8

5.8.

5.8.

Success prob. decreases as readystation number increases.

Page 53: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

53

Adaptive Tree Walk Protocol(Method for testing soldiers for syphilis)

Fig. 5-9 The tree for eight stations.

Light loadlevel 0; 8/20 below it.

Depth first search

Collision #

Heavy loadlevel 3

Page 54: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

54

Page 55: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

55

i

i

i

i2

iq 2

qi2

Page 56: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

56

WDMA Protocols (1)

Channel allocation schemes:– divide the channel into subchannels using FDM,

TDM, or both, and dynamically allocate them as needed

– commonly used in fiber optic LANs: different conversations to use different wavelengths (frequencies) at the same time

Page 57: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

57

WDMA (2)

Each station is assigned two channels : control channel (narrow) and data channel (broad)

m slots in control channel and n+1 slots in data channel.

Support three classes of traffic• constant data rate connection-oriented traffic

• variable data rate connection-oriented traffic

• datagram traffic: UDP packets

Page 58: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

58

WDMA Protocols (3) Each station has

– fixed-wavelength receiver for its own control channel

– tuneable transmitter to other station’s control channel

– fixed-wavelength transmitter to output data frames

– tuneable receiver: selecting a data transmitter to listen to

Communication from A to B– A inserts a Connection Request in a free slot on B’s con

trol channel.

– If B accepts, A sends its data on its data channel.

Page 59: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

59

Wavelength Division Multiple Access Protocols

Fig. 5-10 Wavelength division multiple access.

Page 60: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

60

5.2.6 Wireless LAN Protocols

Page 61: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

61

5-11.

Page 62: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

62

5-11

5-11

Page 63: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

63

5-12.

5-12

5-12

5-12,

Page 64: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

64

5-12.

Page 65: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

65

Page 66: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

66

Page 67: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

67

5.3 Ethernet Ethernet Cabling Manchester Encoding The Ethernet MAC Sublayer Protocol The Binary Exponential Backoff Algorithm Ethernet Performance Switched Ethernet Fast Ethernet Gigabit Ethernet IEEE 802.2: Logical Link Control Retrospective on Ethernets

Page 68: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

68

Ethernet Cabling

The most common kinds of Ethernet cabling.

Page 69: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

69

Ethernet Cabling (2)

Three kinds of Ethernet cabling.

(a) 10Base5, (b) 10Base2, (c) 10Base-T.

Three kinds of Ethernet cabling.

(a) 10Base5, (b) 10Base2, (c) 10Base-T

Page 70: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

70

Ethernet Cabling (3)

Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.

Page 71: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

71

Manchester Coding• Encoding (See Fig. 5-16)

– Binary encoding: can not be used– Manchester encoding

• synchronous in the middle

• requires double bandwidth

• used by all 802.3 baseband systems: + - 0.85v

– Differential Manchester encoding• better noise immunity

• more complex

Page 72: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

72

Ethernet Cabling (4)

(a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.

Page 73: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

73

802.3 MAC Sublayer Protocol Frame format (See Fig. 5-17)

– high order bit of destination address• 0: ordinary address

• 1: group address for multicasting

– broadcasting: all 1 bits Valid frame must be 64 bytes long

– from destination address to checksum– pad field– all frames must take > 2 to send (See Fig. 5-18)

Checksum

Page 74: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

74

Ethernet MAC Sublayer Protocol

Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.

SOF: Start of frame

DIX (DEC, Intel, Xerox)

7 1

0101010148 bits

Page 75: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

75

Ethernet MAC Sublayer Protocol (2)

Collision detection can take as long as 2 .

Page 76: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

76

Binary Exponential Backoff• After i collisions, random number 0 ~ 2i - 1 1023

– time slot = 2 (51.2 us)– after 16 collisions: failure, recovery by higher layers

• Acknowledgement– destination verifies checksum (for fear of noise)– ACK frame (not include in the protocol)– the 1st contention slot following successful

transmission

Page 77: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

77

5.3 Ethernet Performance

Assumptions

a. Heavy and constant load, that is, stations always ready to transmit

b. Each station transmits during a contention slot with probability

The probability A that some station acquires the channel in that slot is

A is maximized when ,

with as

p

k

1)1( kpkpA

kp 1

eA 1 k

Page 78: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

78

The probability that the contention interval has exactly slots in

it is

so the mean number of slots per contention is given by

Since each slot has a duration , the mean contention interval

Assuming optimal , i.e.

as

If the mean frame takes seconds to transmit then

channel efficiency =

where B: bandwidth

F: frame length

L: cable length

C: propagation speed

j,)1( 1 jAA

AAjA

j

j 1)1(

0

1

2Aw 2

pkp 1

eA

1

k eA

1 4.52 ew

p

Ap

p

2

CF

BLeeCL

BF

BF

21

1

)(2

Page 79: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

79

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times.

Page 80: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

80

Switched 802.3 LANs System

– high speed backplane: over 1 Gbps– plug-in line cards

• several connectors– 100/10 BaseT single host

– hub (Fig. 5-20)

– traffic: on the same card or via backplane Collision domain

– each card: all ports on the same card are wired together to form a local on-card LAN

– each port: each port is buffered, all ports receive or transmit in parallel

Page 81: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

81

Switched Ethernet

A simple example of switched Ethernet.

100/

Page 82: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

82

Fast Ethernet

The original fast Ethernet cabling.

The reasons for fast Ethernet

1. The need to be backward compatible with existing Ethernet LANs

2. The fear that a new protocol might have unforeseen problems

3. The desire to get the job done before the technology changed

All fast Ethernet systems use hubs and switches

100 Base-T4 uses 8B/6T coding and 100 Base-TX uses 4B/5B coding

Page 83: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

83

Gigabit Ethernet

(a) A two-station Ethernet. (b) A multistation Ethernet.

• All configurations of gigabit Ethernet are point-to-point

• Gigabit Ethernet supports full-duplex mode (with switch) and half-duplex-mode (with hub)

• CSMA/CD protocol is required for half- duplex mode operation (maximum distance is 25 meters)

• When carrier extension (512 bytes frame) and frame bursting are used the distance can be 200meters

Page 84: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

84

Gigabit Ethernet (2)

Gigabit Ethernet cabling.

•Gigabit Ethernet supports both copper and fiber cabling

•Two wavelengths are permitted = 0.85μm and 1.3μm

•Three fiber core diameters are permitted = 10, 50, and 62.5μm

Page 85: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

85

IEEE 802.2: LLC Logical Link Control

– all 802 LANs and MAN: best-effort datagram services

– on top of all 802 LANs and MAN: Fig. 4.33– a single format and interface to the Network

Layer Three service options of LLC

– unreliable datagram service– acknowledged datagram service– reliable connection-oriented service

Page 86: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

86

IEEE 802.2: Logical Link Control

(a) Position of LLC. (b) Protocol formats.

Page 87: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

87

Retrospective on Ethernet

1. Ethernet is simple and flexible

- reliable, cheap, easy to maintain, easy

to install

2. Ethernet interworks easily with TCP/IP

3. Ethernet has been able to evolve in certain crucial ways

- speeds gone up

- hub and switches introduced

Page 88: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

88

Wireless LANs

The 802.11 Protocol Stack The 802.11 Physical Layer The 802.11 MAC Sublayer Protocol The 802.11 Frame Structure Services

Page 89: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

89

802.11 Protocol Stack

Part of the 802.11 protocol stack.

FHSS: Frequency Hopping Spread Spectrum (dwell time < 400ms)

DSSS: Direct Sequence Spread Spectrum (up to 2 Mb/s)

OFDM: Orthogonal Frequency Division Multiplexing ( up to 54 Mb/s)

HR-DSSS: High Rate Direct Sequence Spread Spectrum (11Mb/s)

Page 90: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

90

802.11 MAC Sublayer Protocol

(a) The hidden station problem.(b) The exposed station problem.

Page 91: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

91

The 802.11 MAC Sublayer Protocol (2)

The use of virtual channel sensing using CSMA/CA.

NAV: Network Allocation Vector

Page 92: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

92

802.11 MAC Sublayer Protocol802.11 supports two modes of operation: DCF and PCF

A. Distributed Coordination Function (DCF)

uses CSMA/CA (CSMA / with Collision Avoidance) (a) The first mode supported by CSMA/CA

(1) When a station wants to transmit, it senses the channel

(2) If it idle, it just starts transmitting (The sender does not sense the channel while transmitting)

(3) If the channel is busy, the sender defers until it goes idle and then starts transmitting

(4) If a collision occurs, it wait a random amount of time (exponential back off) and then try again later

Page 93: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

93

(b) The second mode of CSMA/CA is based on MACAW

(Multiple Access with Collision Avoidance for Wireless)

(1) When a station wants to transmit, it senses the channel

(2) If the channel is idle longer than SIFS interval it transmits an

RTS (Request to Send, 30 bytes) which contains the length

of the data frame

(3) After received the RTS frame, the receiving station replies

with a CTS (Clear to Send) frame which contains the data

length (copied from the RTS frame)

(4) Upon receipt of the CTS, the sender transmits the frame

(5) All stations heard the RTS frame should remain silent for a

period of time (an estimation based on the information of RTS)

(6) All stations heard the CTS frame should remain silent for a

period of time (an estimation based on the information of CTS)

(7) If the channel is busy, the sender goes to step1

Page 94: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

94

Page 95: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

95

B. Point Coordination Function (PCF) (contention free)

(1) When a station wants to gain control of the medium, it sends out a beacon at the end of PIFS.

The beacon frame contains system parameters such as

hopping sequences, and dwell time (for FHSS), clock

synchronization, length of the contention free period, etc.

(2) All other stations heard the beacon will keep silent and wait for polling sign up frame

(3) After gained control, it invites new stations to sign up for polling service

(4) At the end of the contention free period, all station return to DCF mode

Page 96: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

96

802.11 MAC Sublayer Protocol (3)

A fragment burst.

• To deal with the problem of noise channels, 802.11 allows frames to be fragmental into smaller pieces, each with its own checksum and ack. (using stop-and-wait protocol)

Page 97: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

97

802.11 MAC Sublayer Protocol (4)

Interframe spacing in 802.11.

PCF and DCF can coexist within one cell

Page 98: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

98

802.11 Frame Structure

The 802.11 data frame.

Page 99: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

99

Version: Protocol versionType: data, control, or managementSubtype: RTS, CTS, ack, …To DS and from DS: to or from inter cell distribution system (e.g. Ethernet)MF: more fragmentsRetry: retransmissionPower management: put the receiver into sleep state or take it outMore: additional frames comingW: wired equivalent privacyO: processed strictly in orderDuration: time length of the frame and ackAddresses1.2.3 and 4: Source, destination, the source and destination base stations for intercell trafficSequence: Sequence No.

Page 100: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

100

802.11 Services

Association: To connect to a base station Disassociation: To disconnect from a base station Reassociation: To change its preferred base

station Distribution: How to route frames (local or intercell) Integration: Translation from 802.11 to other

protocol frame format

Distribution Services (managing cell membership, and interacting with station outside the cell)

Page 101: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

101

802.11 Services

Authentication Deauthentication (leave the network) Privacy: managing the encryption

and decryption Data Delivery

Intracell Services

Page 102: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

102

Broadband Wireless

Comparison of 802.11 and 802.16 The 802.16 Protocol Stack The 802.16 Physical Layer The 802.16 MAC Sublayer Protocol The 802.16 Frame Structure

Page 103: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

103

802.16 Protocol Stack

The 802.16 Protocol Stack.

Page 104: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

104

802.16 Physical Layer

The 802.16 transmission environment.

Page 105: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

105

802.16 Physical Layer (2)

Frames and time slots for time division duplexing.

Page 106: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

106

802.16 MAC Sublayer Protocol

Service Classes Constant bit rate service Real-time variable bit rate service Non-real-time variable bit rate

service Best efforts service

Page 107: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

107

802.16 Frame Structure

(a) A generic frame. (b) A bandwidth request frame.

Page 108: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

108

Bluetooth

Bluetooth Architecture

Bluetooth Applications

The Bluetooth Protocol Stack

The Bluetooth Radio Layer

The Bluetooth Baseband Layer

The Bluetooth L2CAP Layer

The Bluetooth Frame Structure

Page 109: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

109

Bluetooth Architecture

Two piconets can be connected to form a scatternet.

Page 110: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

110

Bluetooth Applications

The Bluetooth profiles.

Page 111: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

111

Bluetooth Protocol Stack

The 802.15 version of the Bluetooth protocol architecture.

Page 112: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

112

Bluetooth Frame Structure

A typical Bluetooth data frame.

Page 113: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

113

Data Link Layer Switching

• Bridges from 802.x to 802.y

• Local Internetworking

• Spanning Tree Bridges

• Remote Bridges

• Repeaters, Hubs, Bridges, Switches, Routers, Gateways

• Virtual LANs

Page 114: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

114

Data Link Layer Switching

Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

Page 115: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

115

Bridges To connect multiple LANs Operate in data link layer

– bridges do not examine network layer header: copy IP, IPX, OSI packets equally well

Six reasons why single organization with multiple LANs– autonomy: university and corporate departments– the organizations may be spread over several buildings– load: each LAN with its own file server to restrict

traffic locally– physical distance is too great– reliability: discretion about what is forwarded– security

How it works: Fig. 5-40 two-port bridge

Page 116: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

116

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to 802.3.

Page 117: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

117

Bridges from 802.x to 802.y (2)

The IEEE 802 frame formats. The drawing is not to scale.

Page 118: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

118

Local Internetworking

A configuration with four LANs and two bridges.

When the bridges are first plugged in, they use the flooding algorithm and the backward learning algorithm to establish the routing table

Page 119: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

119

Routing Procedure of Bridges

1. If destination and source LANs are the same, discard the frame

2. If the destination and source LANs are different, forward the frame

3. If the destination LAN is unknown, use flooding

Page 120: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

120

Spanning Tree Bridges

Two parallel transparent bridges.

To prevent looping

Looping

Page 121: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

121

Spanning Tree BridgesSpanning Tree

– Abstraction (See Fig. 5-44)

– exactly one path from every LAN to every other LAN: no loops

– root: the bridge with lowest serial number

– a tree of shortest paths from root to every other bridge and LAN

– can adapt to dynamic topology

Page 122: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

122

Procedure to Establish a Spanning Tree

1. Take the bridge with lowest serial number as the root

2. Compute the shortest path from the root to ever bridge and LAN

3. Connect these shortest paths to from a tree (no looping)

Page 123: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

123

Spanning Tree Bridges (2)

(a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

Page 124: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

124

Remote Bridges

Remote bridges can be used to interconnect distant LANs.

To connect two (or more) distance LANs

Page 125: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

125

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) Which device is in which layer.

(b) Frames, packets, and headers.

Page 126: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

126

Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2)

(a) A hub. (b) A bridge. (c) a switch.

When two frames arrive simultaneously at a hub, they will collide Bridges and switched will route the frames based on their destination addresses

Bridges connect LANs

Page 127: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

127

Virtual LANs

A building with centralized wiring using hubs and a switch.

Page 128: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

128

Reasons for Virtual LANs

(a) Fitting into the organization structure

(b) Loading partition

(c) Relieving broadcast storm

Page 129: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

129

Virtual LANs (2)

(a) Four physical LANs organized into two VLANs, gray and white, by two bridges. (b) The same 15 machines organized into two VLANs by switches.

VLANs are based on specially-designed VLAN-aware switches (bridges)

Page 130: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

130

Each VLAN is assigned a distinct color. Three methods are used to distinguish the color of an incoming frame

1. Every port is assigned a VLAN color (when a host moved, the port must be reassigned)

2. Every MAC address is assigned a VLAN color

3. Every layer 3 protocol or IP address is assigned a VLAN color

(The payload must be examined by the data link layer, which violates the rule: independence of the layers. When the layer 3 protocol changed, the switch fails.)

Page 131: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

131

There are some issues for VLAN

(a) What is the VLAN field format?

(b) How to identify VLAN field?

(c) Who generates the VLAN field?

(d) What happens to frames that are already the maximum size?

The 802.1Q will solve these problems

Page 132: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

132

IEEE 802.1Q Standard

Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.

To support VLAN, switches must be VLAN-aware.

Page 133: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

133

IEEE 802.1Q Standard (2)

The 802.3 (legacy) and 802.1Q Ethernet frame formats.

Priority: This field makes it possible to distinguish hard real-time traffic from soft real-time traffic from time-insensitive traffic.

CFI (Canonical Format Indicator): To indicate that the payload contains 802.5.

VLAN Identifier: To indicate which VLAN the frame belong to.

Page 134: 1 Chapter 5 The Medium Access Sublayer. 2 The Medium Access Layer 5.1 Channel Allocation problem - Static and dynamic channel allocation in LANs & MANs

134

Summary

Channel allocation methods and systems for a common channel.