The Medium Access Sublayer -...

86
1 Chapter 4 The Medium Access Sublayer

Transcript of The Medium Access Sublayer -...

Page 1: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

1

Chapter 4

The Medium Access

Sublayer

Page 2: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

2

Chapter 4 The Medium Access Layer

• 4.1 The Channel Allocation problem

- Static and dynamic channel allocation in LANs & MANs

• 4.2 Multiple Access Protocols

- ALOHA, CSMA, CSMA/CD, Collision-free protocols,

Limited-contention protocols, Wireless LAN protocols

• 4.3 Ethernet

- Cabling, MAC sublayer protocol, Backoff algorithm,

Performance, Gigabit Ethernet, 802.2 Logical Link Control

• 4.4 Wireless LANs

- 802.11 protocol stack, physical layer, MAC sublayer

protocol, frame structure

Page 3: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

3

• 4.5 Broadband Wireless

- Comparison of 802.11 with 802.16, protocol stack,

frame structure

• 4.6 Data Link Layer Switching

- Bridges from 802.x to 802.y, Local internetworking,

Spanning tree bridges, Remote bridges

Page 4: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

4

4.1 The Channel Allocation problem

4.1.1 Static channel Allocation in LANs and WANs

Frequency Division Multiplexing (FDM)

Page 5: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

5

Poisson process and the M/M/1 queue will be discussed in the

next chapter.

Page 6: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

6

Page 7: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

7

4.1.2 Dynamic Channel Allocation in LANs and WANs

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(observable). If two

frames are transmitted simultaneously, they

are destroyed and must be retransmitted again

later. There are no other errors.

t t

Page 8: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

8

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.

5b. No Carrier Sense. Stations cannot sense the

channel before trying to use it.

Page 9: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

4.2 Multiple Access Protocols

• ALOHA

• Carrier Sense Multiple Access

• Collision-free protocols

• Limited-contention protocols

• Wireless LAN protocols

9

Page 10: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

10

4.2 Multiple Access Protocols

4.2.1 ALOHA

4-1.

Page 11: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

11

4-2.

Page 12: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

12

Page 13: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

13

4-3.

Page 14: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

14

Page 15: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

15

Page 16: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

16

Page 17: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

17

4.2.2 Carrier Sense Multiple Access Protocols

Page 18: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

18

Page 19: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

19

P-persistent (slotted case)

1. When a station has data to send, it first listens to the

channel to see if any one else is transmitting.

2. If the channel is idle, the station transmits the frame with

probab P,with probability q=1-P, it defers until the next slot

and goes to 1.

3. If the channel is busy, it waits until the next slot and goes to

step 1.

4. If a collision occurs (no acknowledgement), the station

waits a ran amount of time and goes Step1.

Page 20: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

20

Page 21: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

21

4-4.

Page 22: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

22

4-5.

Page 23: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

23

4.2.3 Collision-Free Protocols

4-6.

Page 24: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Collision-Free Protocols (2)

Token ring.

Station

Direction of

transmission

Token

24

Page 25: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

25

4-7.

Page 26: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

26

Page 27: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

27

4.2.4 Limited-contention Protocols

Page 28: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

28

Limited-Contention protocols

Page 29: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

29

Page 30: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

30

Page 31: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

31

Page 32: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

32

4.8

4.8.

4.8.

Page 33: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

33

4-9

The Adaptive Tree Walk protocol

(Method for testing soldiers for syphilis)

Page 34: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

34

Page 35: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

35

i

i

i

i2

iq 2

qi2

Page 36: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Wireless LAN Protocols (1)

A wireless LAN. (a) A and C are hidden terminals

when transmitting to B.

36

Page 37: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Wireless LAN Protocols (2)

A wireless LAN. (b) B and C are exposed terminals

when transmitting to A and D. 37

Page 38: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Wireless LAN Protocols (3)

The MACA protocol. (a) A sending an RTS to B. (b) B

responding with a CTS to A. 38

Page 39: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

39

4.3 Ethernet

• Physical Layer

• 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 Ethernet

Page 40: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Classic Ethernet Physical Layer

Architecture of classic Ethernet 40

Page 41: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

41

Ethernet Cabling

The most common kinds of Ethernet cabling.

Page 42: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

42

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 43: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

43

Ethernet Cabling (3)

Cable topologies. (a) Linear, (b) Spine, (c)

Tree, (d) Segmented.

Page 44: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

44

Ethernet Cabling (4)

(a) Binary encoding, (b) Manchester encoding,

(c) Differential Manchester encoding.

Page 45: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

45

Ethernet MAC Sublayer Protocol

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

SOF: Start of frame

DIX (DEC, Intel, Xerox)

7 1

Page 46: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

46

Ethernet MAC Sublayer

Protocol (2)

Collision detection can take as long as 2 .

Page 47: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The Binary Exponential Back off Algorithm

1. Any station experiences collisions, it has to choose a

random number between 0 and ,and that number

of slots is skipped ( ≤10 )

2. After ten collisions have been reached the randomization

interval is frozen at a maximum of 1023 slots

3. After 16 collisions the controller has to stop transmission

and reports failure back the the computer, Further

recovery is up to higher layers.

47

12

Page 48: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

48

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 49: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

49

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

2A

w 2

pk

p 1e

A1

k eA

1 4.52 ew

p

Ap

p

2

CFBLee

CL

BF

BF

21

1

)(2

Page 50: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

50

Ethernet Performance

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

Page 51: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Switched Ethernet (1)

(a) Hub. (b) Switch. 51

Page 52: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Switched Ethernet (2)

An Ethernet switch.

Switch

Twisted pair

Switch ports

Hub

52

Page 53: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

53

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 54: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

54

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 55: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

55

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 56: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

10 Gigabit Ethernet

Gigabit Ethernet cabling 56

Page 57: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Wireless Lans

• 802.11 architecture and protocol stack

• 802.11 physical layer

• 802.11 MAC sublayer protocol

• 802.11 frame structure

• Services

57

Page 58: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

802.11 Architecture and Protocol Stack (1)

802.11 architecture – infrastructure mode

Access

Point

Client

To Network

58

Page 59: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

802.11 Architecture and Protocol Stack (2)

802.11 architecture – ad-hoc mode 59

Page 60: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

802.11 Architecture and Protocol Stack (3)

Part of the 802.11 protocol stack. 60

Page 61: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The 802.11 MAC Sublayer Protocol (1)

Sending a frame with CSMA/CA. 61

Page 62: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The 802.11 MAC Sublayer Protocol (2)

The hidden terminal problem. 62

Page 63: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The 802.11 MAC Sublayer Protocol (3)

The exposed terminal problem. 63

Page 64: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The 802.11 MAC Sublayer Protocol (4)

The use of virtual channel sensing using

CSMA/CA. 64

Page 65: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The 802.11 MAC Sublayer Protocol (5)

Interframe spacing in 802.11 65

Page 66: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

802.11 Frame Structure

Format of the 802.11 data frame 66

Page 67: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

67

Version: Protocol version

Type: data, control, or management

Subtype: RTS, CTS, ack, …

To DS and from DS: to or from inter cell distribution

system (e.g. Ethernet)

MF: more fragments

Retry: retransmission

Power management: put the receiver into sleep state or

take it out

More: additional frames coming

Protected: encrypted for Security

O: processed strictly in order

Duration: time length of the frame and ack

Addresses1.2.3 and 4: Source, destination, the source and

destination base stations for intercell traffic

Sequence: Sequence No.

Page 68: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

68

802.11 Services

• Association: To connect to a base station

• Reassociation: To change its preferred base

station

• Disassociation: To disconnect from a 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 69: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

69

802.11 Services

• Authentication

• Deauthentication (leave the network)

• Privacy: managing the encryption

and decryption

• Data Delivery: transmit and receive data

Intracell Services

Page 70: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Data Link Layer Switching

• Uses of bridges

• Learning bridges

• Spanning tree bridges

• Repeaters, hubs, bridges, switches,

routers, and gateways

• Virtual LANs

70

Page 71: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

71

Bridges from 802.x to 802.y

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

Page 72: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

72

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to 802.3.

Page 73: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Learning Bridges (1)

Bridge connecting two multidrop LANs 73

Page 74: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Learning Bridges (2)

Bridges (and a hub) connecting seven point-to-

point stations. 74

Page 75: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Learning Bridges (3)

Protocol processing at a bridge. 75

Page 76: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Spanning Tree Bridges (1)

Bridges with two parallel links

76

Page 77: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Spanning Tree Bridges (2)

A spanning tree connecting five bridges. The dotted

lines are links that are not part of the spanning tree. 77

Page 78: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Poem by Radia Perlman (1985)

Algorithm for Spanning Tree (1)

I think that I shall never see

A graph more lovely than a tree.

A tree whose crucial property

Is loop-free connectivity.

A tree which must be sure to span.

So packets can reach every LAN.

. . .

78

Page 79: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Poem by Radia Perlman (1985)

Algorithm for Spanning Tree (2)

. . .

First the Root must be selected

By ID it is elected.

Least cost paths from Root are traced

In the tree these paths are placed.

A mesh is made by folks like me

Then bridges find a spanning tree.

79

Page 80: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Repeaters, Hubs, Bridges, Switches,

Routers, and Gateways

(a) Which device is in which layer.

(b) Frames, packets, and headers. 80

Page 81: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Virtual LANs (1)

A building with centralized wiring using hubs and a

switch. 81

Page 82: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Virtual LANs (2)

Two VLANs, gray and white, on a bridged LAN. 82

Page 83: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

The IEEE 802.1Q Standard (1)

Bridged LAN that is only partly VLAN-aware. The shaded

symbols are VLAN aware. The empty ones are not. 83

Page 84: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

84

The 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 85: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

85

Summary

Channel allocation methods and systems for a common channel.

Page 86: The Medium Access Sublayer - 國立臺灣大學cc.ee.ntu.edu.tw/~wujsh/10002CN/Chapter4(2012.04.16).pdf · 2012-04-23 · The Medium Access Sublayer . 2 Chapter 4 The Medium Access

Homework due 2012.04.24

1. State the CSMA/CD protocol.

2. State the Binary Exponential Backoff (Traucated) algorithm.

3. Measurements of a slotted ALOHA channel with an infinite

number of users show that 15% of the slots are idle.

(a) What is the channel load, G?

(b) What is the throughput?

(c) Is the channel underloaded or overloaded?

4. State the hidden terminal problem and the exposed terminal

problem in a wireless LAN.

5. The station source address of each Ethernet is globally unique

assigned to ensure that no two stations anywhere in the world

have the same address. What is the maximum number of

addresses we may have?

6. Why do the Ethernet frames have to be at least 64 bytes

long?

86