Você está na página 1de 38

SwitchedSwitched NetworksNetworks

ChapterChapter 33 MediumMedium AccessAccess ControlControl SublayerSublayer

Dr.-Ing. Torben Weis

University Duisburg-Essen

ChannelChannel AllocationAllocation ProblemProblem (1)(1)

Multiple stations access one channel

How to avoid collisions?

Two different approaches

Static Channel Allocation

Dynamic Channel Allocation

What do we expect?

Static Simple

Dynamic Efficient

do we expect? • Static Simple • Dynamic Efficient Institut für Torben Weis 2 Informationstechnik

Institut für

Torben Weis

2

Informationstechnik

ChannelChannel AllocationAllocation ProblemProblem (2)(2)

Example:

Cocktail party – many people gather in a large room

Broadcast medium = air

Human protocols:

“Give everyone a chance to speak”

“Don’t speak until you are spoken to”

“Don’t monopolize the conversation”

“Raise your hand if you have a question”

“Don’t interrupt when someone is speaking”

“Don’t fall asleep when someone else is talking”

◦ “Don’t fall asleep when so meone else is talking” Institut für Torben Weis 3 Informationstechnik

Institut für

Torben Weis

3

Informationstechnik

ChannelChannel AllocationAllocation ProblemProblem (3)(3)

If more than 2 users send at the same time collision

All collided packets are lost waste of bandwidth

Ideally, the MAC protocol for a broadcast channel with R bit/sec should satisfy:

If only 1 node is sending than the throughput is R

When M nodes have data to send than the throughput is R/M

Decentralized protocol, i.e. no master

Simple & inexpensive to implement

i.e. no master ◦ Simple & inexpensive to implement Institut für Torben Weis 4 Informationstechnik

Institut für

Torben Weis

4

Informationstechnik

ProtocolProtocol LayerLayer

Application Layer Layer Layer 5 5 Layer Layer 5 5 Transport Layer Layer Layer 4
Application Layer
Layer Layer 5 5
Layer Layer 5 5
Transport Layer
Layer Layer 4 4
Layer Layer 4 4
Network Layer
Network Layer
Layer Layer 3 3
Layer Layer 3 3
Layer Layer 3 3
Layer Layer 3 3
Data Link Layer
Data Link Layer
Layer Layer 2 2
Layer Layer 2 2
Layer Layer 2 2
Layer Layer 2 2
Physical Layer
Physical Layer
Layer Layer 1 1
Layer Layer 1 1
Layer Layer 1 1
Layer Layer 1 1

Data Link Layer puts frames on the wire

What happens if multiple stations want to put frames on the medium (wire) at the same time? => Medium Access Control (MAC) is required

Institut für Torben Weis 5 Informationstechnik

Institut für

Torben Weis

5

Informationstechnik

Institut für Torben Weis 5 Informationstechnik Medium Medium Access Access Control Control Sublayer

MediumMedium AccessAccess ControlControl SublayerSublayer

Application Layer Layer Layer 5 5 Layer Layer 5 5 Transport Layer Layer Layer 4
Application Layer
Layer Layer 5 5
Layer Layer 5 5
Transport Layer
Layer Layer 4 4
Layer Layer 4 4
Network Layer
Network Layer
Layer Layer 3 3
Layer Layer 3 3
Layer Layer 3 3
Layer Layer 3 3
Data Link Layer
Data Link Layer
Layer Layer 2 2
Layer Layer 2 2
Layer Layer 2 2
Layer Layer 2 2
MAC MAC
MAC MAC
MAC MAC
MAC MAC
Physical Layer
Physical Layer
Layer Layer 1 1
Layer Layer 1 1
Layer Layer 1 1
Layer Layer 1 1

MAC is not part of the OSI Model

MAC is a sublayer of the Data Link Layer

Institut für Torben Weis 6 Informationstechnik

Institut für

Torben Weis

6

Informationstechnik

StaticStatic ChannelChannel AllocationAllocation

 

Frequency Division Multiplexing (FDM)

Time Division Multiplexing (TDM)

 
Institut für Torben Weis 7

Institut für

Torben Weis

7

Informationstechnik

FrequencyFrequency DivisionDivision MultiplexingMultiplexing (1)(1)

 

Uses static allocation

 

Channel has a bandwidth of H

 

n stations are connected to the cable

Idea

Divide the bandwidth in H/n frequency bands

Assign one band to one station

 

Result

No collisions possible

 

Delay increased by factor n

Institut für Torben Weis 8

Institut für

Torben Weis

8

Informationstechnik

FrequencyFrequency DivisionDivision MultiplexingMultiplexing (2)(2)

 
Division Multiplexing Multiplexing (2) (2)   (a) The original bandwidths   (b) The bandwidths

(a)

The original bandwidths

 

(b)

The bandwidths raised in frequency

 

(b)

The multiplexed channel

 
Institut für Torben Weis 9

Institut für

Torben Weis

9

Informationstechnik

TimeTime DivisionDivision MultiplexingMultiplexing (1)(1)

 

Uses static allocation

 

Channel transfers B bit/sec

 

n stations are connected to the cable

Idea

Allocate n time slots of length t

 

Round robin

 

Each station transfers B*t bits per slot

 

Result

No collisions possible

 

Delay increased by factor n

Institut für Torben Weis 10

Institut für

Torben Weis

10

Informationstechnik

TimeTime DivisionDivision MultiplexingMultiplexing (2)(2)

 
Division Multiplexing Multiplexing (2) (2)   Institut für Torben Weis 11 Informationstechnik
Institut für Torben Weis 11

Institut für

Torben Weis

11

Informationstechnik

DynamicDynamic ChannelChannel AllocationAllocation (1)(1)

 

Station Model

 

n independent stations

Each station wants to send frames

 

λ is the constant arrival rate

Probability of sending a frame in time t is λ ∆t

Institut für Torben Weis 12

Institut für

Torben Weis

12

Informationstechnik

DynamicDynamic ChannelChannel AllocationAllocation (2)(2)

 

Single Channel Assumption

All stations connected to the same channel

All stations are equivalent

Every station can send/receive

Optional

• Priorities can be assigned to stations

 
Institut für Torben Weis 13

Institut für

Torben Weis

13

Informationstechnik

DynamicDynamic ChannelChannel AllocationAllocation (3)(3)

 

Collision Assumption

 

Two stations sending at overlapping time intervals collision the transmitted data is garbled

 

After a collision, data must be sent again

Stations can detect collisions

No other errors, only collisions

Institut für Torben Weis 14

Institut für

Torben Weis

14

Informationstechnik

DynamicDynamic ChannelChannel AllocationAllocation (4)(4)

 

Continuous Time

 

Time is not slotted

Station can attempt to send any time

 

Slotted Time

 

Time is slotted (divided in discrete intervals)

 

Frame transmission starts at the beginning of a slot

Institut für Torben Weis 15

Institut für

Torben Weis

15

Informationstechnik

DynamicDynamic ChannelChannel AllocationAllocation (5)(5)

 

Carrier Sense

 

Channels are either busy or idle

 

Station can sense whether the channel is busy

Before sending, the station checks the channel

No Carrier Sense

 

Station cannot sense the channel

 

Stations just transmit

 

After sending the station knows whether it was successful or not

 

Problem: A transmission has been destroyed

Institut für Torben Weis 16

Institut für

Torben Weis

16

Informationstechnik

DynamicDynamic ChannelChannel AllocationAllocation (6)(6)

 

Station Model

Single Channel Assumption

 

Collision Assumption

(a)

Continuous Time

(b)

Slotted Time

(a)

Carrier Sense

(b)

No Carrier Sense

Institut für Informationstechnik

Institut für

Informationstechnik

Torben Weis

17

 

MultipleMultiple AccessAccess ProtocolsProtocols

 

ALOHA

Carrier Sense Multiple Access Protocols

 

Collision-Free Protocols

Limited-Contention Protocols

Next week

Wavelength Division Multiple Access Protocols

 

Wireless LAN Protocols

Institut für Informationstechnik

Institut für

Informationstechnik

Torben Weis

18

 

ALOHAALOHA (1)(1)

Norm Abramson at the Univ. of Hawaii

mountainous islands land network difficult to install

 
ACK ACK ACK ACK
ACK
ACK
ACK
ACK
Institut für Torben Weis 19

Institut für

Torben Weis

19

Informationstechnik

ALOHAALOHA (2)(2)

M nodes can create new frames at any time

The node immediately transmits its frame completely on a shared frequency

(Different in slotted ALOHA)

 

Base station acknowledges packages on a dedicated frequency

If the frame collides No ACK is received

 

Retransmission with probability p avoids efficiency to become 0

 
Institut für Torben Weis 20

Institut für

Torben Weis

20

Informationstechnik

PurePure ALOHAALOHA

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

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

ALOHA, frames are transmitted at completely arbitrary times. Institut für Torben Weis 21 Informationstechnik

Institut für

Torben Weis

21

Informationstechnik

PurePure ALOHAALOHA (2)(2)

Pure Pure ALOHA ALOHA (2) (2) ∙ Vulnerable period for the shaded frame = 2 t

Vulnerable period for the shaded frame = 2t.

(2) (2) ∙ Vulnerable period for the shaded frame = 2 t . Institut für Torben

Institut für

Torben Weis

22

Informationstechnik

SlottedSlotted ALOHAALOHA

Idea

Create time slots of length t

Transmission only at beginning of each time slot

Result

Vulnerability reduced from 2t to t

We doubled the throughput

Problem

How does everybody agree on time slots?

∙ Problem ◦ How does everybody agree on time slots? Institut für Torben Weis 23 Informationstechnik

Institut für

Torben Weis

23

Informationstechnik

PurePure andand SlottedSlotted ALOHAALOHA

Pure Pure and and Slotted Slotted ALOHA ALOHA ∙ Throughput versus offered traffic for ALOHA systems

Throughput versus offered traffic for ALOHA systems

ALOHA ∙ Throughput versus offered traffic for ALOHA systems Institut für Torben Weis 24 Informationstechnik

Institut für

Torben Weis

24

Informationstechnik

EvaluatingEvaluating AlohaAloha

Assumption: Channel can transmit R bit/sec

Checklist:

If only 1 node is sending than the throughput is R - When M nodes have data to send than the throughput is R/M Decentralized protocol Simple & inexpensive to implement

Decentralized protocol Simple & inexpensive to implement Institut für Torben Weis 25 Informationstechnik

Institut für

Torben Weis

25

Informationstechnik

CarrierCarrier SenseSense MultipleMultiple AccessAccess (1)(1)

CSMA = Carrier Sense Multiple Access

Invented to minimize collisions and increase the performance

A station now “follows” the activity of other stations

Carrier Sense

Simple rules for polite human conversation

Listen before speaking

If someone else begins talking at the same time as you, stop talking

else begins talking at the same time as you, stop talking Institut für Torben Weis 26

Institut für

Torben Weis

26

Informationstechnik

CarrierCarrier SenseSense MultipleMultiple AccessAccess (2)(2)

If everyone is sensing the medium, how can collisions still occur?

channel

propagation

delay

how can collisions still occur? channel propagation delay Institut für Torben Weis 27 Informationstechnik
how can collisions still occur? channel propagation delay Institut für Torben Weis 27 Informationstechnik

Institut für

Torben Weis

27

Informationstechnik

11--persistentpersistent CSMACSMA

The protocol

Listen before transmitting

If channel busy, wait until is channel idle

If channel idle, transmit

If collision occurs, wait a random amount of time and start all over again

It is called 1-persistent because the station transmits with a probability of 1 whenever it finds the channel idle.

with a probabi lity of 1 whenever it finds the channel idle. Institut für Torben Weis

Institut für

Torben Weis

28

Informationstechnik

NonpersistentNonpersistent CSMACSMA

 

The protocol

Listen before transmitting

 

If busy, wait a random amount of time and sense the channel again

If idle, transmit a packet immediately

If collision occurs, wait a random amount of time and start all over again

What is special?

 

The station does not sense all the time less greedy than 1-persistent CSMA

 
Institut für Torben Weis 29

Institut für

Torben Weis

29

Informationstechnik

pp--persistentpersistent CSMACSMA

 

Applies to slotted channels

 

The protocol

 

Listen before transmitting

 

If channel busy, wait until is channel idle

If channel idle

 

• Transmit with probability p • Wait for next slot with probability q=1-p

 

If collision occurs, repeat the above procedure

Institut für Torben Weis 30

Institut für

Torben Weis

30

Informationstechnik

PersistentPersistent andand NonpersistentNonpersistent CSMACSMA

Persistent and and Nonpersistent Nonpersistent CSMA CSMA ∙ Comparison of the channel utilization versus load for

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

utilization versus load for various random access protocols Institut für Torben Weis 31 Informationstechnik

Institut für

Torben Weis

31

Informationstechnik

CollisionCollision DetectionDetection (1)(1)

1. Waiting for an acknowledge (ACK)

ACK is sent after the frame has been transmitted Frames with collisions are transmitted completely

Waiting for ACK wastes time and bandwidth

2. Sending and receiving

Check, whether you receive what you have sent Collisions can be detected early

This is called “Collision Detection” or just “CD”

∙ This is called “Collision Detection” or just “CD” Institut für Torben Weis 32 Informationstechnik

Institut für

Torben Weis

32

Informationstechnik

CollisionCollision DetectionDetection (2)(2)

When is a collision detected ?

Station A sends at time t 0

Signal needs τ to the most distant station X

At t 0 +τ-ε station X sends, too

X sensed that the channel is idle

The signal of X needs τ to station A

Result: A must wait 2τ-ε before it can detect a collision

Problem: Maximum value of τ depends on the maximum distance between stations

value of τ depends on the maximum distance between stations Institut für Torben Weis 33 Informationstechnik

Institut für

Torben Weis

33

Informationstechnik

CSMACSMA withwith CollisionCollision DetectionDetection

CSMA with with Collision Collision Detection Detection ∙ Senders can detect collisions while sending

Senders can detect collisions while sending “Collision Detection”

detect collisions while sending “Collision Detection” Institut für Torben Weis 34 Informationstechnik

Institut für

Torben Weis

34

Informationstechnik

CollisionCollision--FreeFree ProtocolsProtocols (1)(1)

Collision - - Free Free Protocols Protocols (1) (1) The basic bit-map protocol Institut für Torben

The basic bit-map protocol

Free Protocols Protocols (1) (1) The basic bit-map protocol Institut für Torben Weis 35 Informationstechnik

Institut für

Torben Weis

35

Informationstechnik

CollisionCollision--FreeFree ProtocolsProtocols (2)(2)

The bitmap protocol is a reservation protocol

Overhead calculation for the reservation

Every station (N in total) wants to send a frame Overhead = 1 contention slot per N frames = 1 bit

frame Overhead = 1 contention slot per N frames = 1 bit ◦ Only one station

Only one station wants to send a frame Overhead = 1 contention slot for 1 frame = N bits

a frame Overhead = 1 contention slot for 1 frame = N bits Institut für Torben
a frame Overhead = 1 contention slot for 1 frame = N bits Institut für Torben

Institut für

Torben Weis

36

Informationstechnik

Collision Collision - - Free Free Protocols Protocols (3) (3) ∙ The binary countdown protocol

CollisionCollision--FreeFree ProtocolsProtocols (3)(3)

The binary countdown protocol

A dash indicates silence

The binary countdown protocol ∙ A dash indicates silence Institut für Torben Weis 37 Informationstechnik

Institut für

Torben Weis

37

Informationstechnik

CollisionCollision--FreeFree ProtocolsProtocols (4)(4)

Binary countdown is a reservation protocol, too

Overhead calculation for the reservation

N stations in total

At least one wants to send

Contention slot has length log 2 N

wants to send ◦ Contention slot has length log 2 N ∙ Optimization ◦ Many frames

Optimization

Many frames carry the sender address Efficiency can become 100%

frames carry the sender address Efficiency can become 100% Institut für Torben Weis 38 Informationstechnik

Institut für

Torben Weis

38

Informationstechnik

CollisionCollision--FreeFree ProtocolsProtocols (5)(5)

 

Binary countdown uses priorities

High addresses always win

Low addresses can starve to death

Possible fix

 

Address numbers circulate

 

After sending a frame, address numbers are shifted

The sending station gets a low address

 
Institut für Torben Weis 39

Institut für

Torben Weis

39

Informationstechnik

LimitedLimited--ContentionContention ProtocolsProtocols

 
- - Contention Contention Protocols Protocols   Acquisition probability for a symmetric contention channel

Acquisition probability for a symmetric contention channel

Institut für Torben Weis 40

Institut für

Torben Weis

40

Informationstechnik

AdaptiveAdaptive TreeTree WalkWalk ProtocolProtocol (1)(1)

 
Tree Tree Walk Walk Protocol Protocol (1) (1)     The tree for eight stations  
 

The tree for eight stations

 
Institut für Torben Weis 41

Institut für

Torben Weis

41

Informationstechnik

AdaptiveAdaptive TreeTree WalkWalk ProtocolProtocol (2)(2)

 

Idea

Limit the number of participants in the contention

 

First, everybody may try to send

Collision halve the participants

Best of both worlds

 

Low delay when there are few collisions

 

• As good as slotted ALOHA

Low delay when many station bid for the channel

• Almost as good as reservation protocols

Institut für Torben Weis 42

Institut für

Torben Weis

42

Informationstechnik

WavelengthWavelength DivisionDivision MultipleMultiple AccessAccess ProtocolsProtocols

Division Multiple Multiple Access Access Protocols Protocols Institut für Torben Weis 43 Informationstechnik
Division Multiple Multiple Access Access Protocols Protocols Institut für Torben Weis 43 Informationstechnik

Institut für

Torben Weis

43

Informationstechnik

ManchesterManchester CodeCode (1)(1)

How to represent 0 and 1 on the wire?

Idea 1

1 = +5 Volt, 0 = 0 Volt

Problem: How to differentiate 00000000 from an idle sender ?

Idea 2

1 = +5 Volt, 0 = -5 Volt

Problem: We cannot be sure that all receivers sample the signal at the same rate (clock drift)

We need a self-clocking encoding

same rate (clock drift) ∙ We need a self-clocking encoding Institut für Torben Weis 44 Informationstechnik

Institut für

Torben Weis

44

Informationstechnik

ManchesterManchester CodeCode (2)(2)

Encode 1 bit as 2 bits

1 = 10

0 = 01

Good news: the signal oscillates in the “middle” of every bit

Bad news: We waste half of the bandwidth

This is called Manchester Code

It is used by Ethernet (we will come to that later)

Code ◦ It is used by Ethernet (we will come to that later) Institut für Torben

Institut für

Torben Weis

45

Informationstechnik

ManchesterManchester CodeCode (3)(3)

Manchester Manchester Code Code (3) (3) Institut für Torben Weis 46 Informationstechnik
Manchester Manchester Code Code (3) (3) Institut für Torben Weis 46 Informationstechnik

Institut für

Torben Weis

46

Informationstechnik

DifferentialDifferential ManchesterManchester CodeCode

 

Encode 1 bit as 2 bits

 

The encoding of bit n depends on the encoding of bit n-1

 

If n = 1

• n-1 encoded as 10 ? -> n = 01

 

• n-1 encoded as 01 ? -> n = 10

If n = 0

• n-1 encoded as 10 ? -> n = 10

 

• n-1 encoded as 01 ? -> n = 01

Advantage: Better noise immunity

Disadvantage: Requires more complex equipment

Institut für Torben Weis 47

Institut für

Torben Weis

47

Informationstechnik

IEEEIEEE StandardStandard 802802 forfor LANsLANs

 

Ethernet:

IEEE 802.3

Token Bus:

IEEE 802.4

 

Token Ring:

IEEE 802.5

Wireless:

IEEE 802.11

Institut für Torben Weis 48

Institut für

Torben Weis

48

Informationstechnik

IEEEIEEE 802.5802.5 TokenToken RingRing

 
IEEE IEEE 802.5 802.5 Token Token Ring Ring   Institut für Torben Weis 49 Informationstechnik Token
Institut für Torben Weis 49

Institut für

Torben Weis

49

Informationstechnik

TokenToken RingRing PhysicalPhysical LengthLength (1)(1)

 

A 3 byte token circulates on the ring

Sender must not receive its own token data before it sends the last token bit

How many bits fit on the ring?

 
Institut für Torben Weis 50

Institut für

Torben Weis

50

Informationstechnik

TokenToken RingRing PhysicalPhysical LengthLength (2)(2)

Each station buffers 1 bit

Problem: station can be taken off the net

The cable carries some bits

Data rate of R Mbit/sec A bit is emitted every 1/R µsec

Signal propagation speed 200 m/µsec Each bit occupies 200/R m

Example: R=1 Mbit/sec, length = 1000m Each bit occupies 200m 5 bits on the ring cable

Additional buffers are required

5 bits on the ring cable ∙ Additional buffers are required Institut für Torben Weis 51

Institut für

Torben Weis

51

Informationstechnik

PKT TokenToken PassingPassing (1)(1) TK The Token Station A rotates around Station A captures the
PKT
TokenToken PassingPassing (1)(1)
TK
The Token
Station A
rotates around
Station A
captures the
Token and
converts it to a
Packet
Station A
Staton A waits
for the Packet
releases the
transmits the
the ring
Token
packet
PKT
PKT
TK

Release After Reception (RAR)

ring Token packet PKT PKT TK Release After Reception (RAR) Institut für Torben Weis 52 Informationstechnik

Institut für

Torben Weis

52

Informationstechnik

TokenToken PassingPassing (2)(2)

 
TK
TK
PKT
PKT
TK PKT
TK
PKT

The Token

Station A

Station A transmits the Packet and

 

rotates around

the ring

captures the Token and

converts it to a Packet

immediately releases the Token

Release After Transmission (RAT)

 
Institut für Torben Weis 53

Institut für

Torben Weis

53

Informationstechnik

 

TokenToken PassingPassing (3)(3)

 

The ring can contain:

 

A token

A data frame

 

(or both in “release after transmission”)

 

The token must fit on the ring

The size of a data frame is not limited

A data frame is not entirely on the ring

The sender can receive its own frame while still sending

Can be used for error detection

 
Institut für Torben Weis 54

Institut für

Torben Weis

54

Informationstechnik

 

TokenToken PassingPassing (4)(4)

Is starvation possible?

i.e. a station wants to send but never gets the token ?

Answer: No

Stations s 1 , s 2 , … s n

Station s i fetches the token and transmits data

 

Then, s i issues a new token s i+1 can get the token

Full load round robin

Token ring is “fair”

… as long as only one priority is used

 
Institut für Informationstechnik

Institut für

Informationstechnik

Torben Weis

55

 

TokenToken RingRing WiringWiring

Wire center

bypass relays
bypass
relays
 
Institut für Informationstechnik

Institut für

Informationstechnik

Torben Weis

56

 

TokenToken RingRing MultistationMultistation AccessAccess UnitUnit (MSAU)(MSAU)

 
Access Access Unit Unit (MSAU) (MSAU)   Institut für Torben Weis 57 Informationstechnik Token
Institut für Torben Weis 57

Institut für

Torben Weis

57

Informationstechnik

TokenToken RingRing -- ActiveActive MonitorMonitor

 

Some station must …

 

inject the token

detect circulating frames

 

send a continuous signal (e.g. Differential Manchester encoded 0) to synchronize all stations

This station is the active monitor (AM)

All other stations are standby monitors (SM)

The active monitor is elected

The station with the largest MAC wins

Institut für Torben Weis 58

Institut für

Torben Weis

58

Informationstechnik

JoiningJoining aa TokenToken RingRing

 

1. (Lobe Check) - Performs a lobe media check to see whether frames are received without error.

2. (Physical Insertion) - A station then sends a 5 volt signal to the MSAU to open the relay.

3. (Address Verification) - A station then sends a message to is own MAC If the “Copied” flag is set -> The MAC is already used

4. (Participation in Ring Poll) - The station must participate in the periodic (every 7 seconds) ring poll process.

5. (Request Initialization) - Finally a station sends out a special request to a parameter server to obtain configuration information.

Institut für

 

Torben Weis

59

Informationstechnik

Informationstechnik

 

TokenToken StructureStructure (1)(1)

 
SD AC ED
SD
AC
ED
 

SD

=

Starting Delimiter

 

AC

=

Access Control

ED

=

Ending Delimiter

1

1

1

SD

J - Phase Violation J

 
JK0JK000
JK0JK000

K

- Phase Violation K

0 - Binary Zero

 

AC

PPPTMrrr
PPPTMrrr

PPP - Priority Bits

T

- Token Bit

M

- Monitor Bit

 
 

rrr - Reservation Bit

J - Phase Violation J

K - Phase Violation K

 

ED

1 - Binary One

 
JK1JK1IE
JK1JK1IE

I

- Intermediate Bit

E

- Error Bit

Institut für

 

Torben Weis

60

Informationstechnik

Informationstechnik

 

TokenToken StructureStructure (2)(2)

SD AC ED 1 1 1
SD
AC
ED
1
1
1

SD

=

Starting Delimiter

AC

=

Access Control

ED

=

Ending Delimiter

SD JK0JK000
SD
JK0JK000

J - Phase Violation J K - Phase Violation K 0 - Binary Zero

The manchester code violation enables a receiver to detect the start of a token

Violation is achieved by not switching in the “middle” of a bit

J K assures that the signal is still oscillating

∙ J ≠ K assures that the signal is still oscillating Institut für Torben Weis 61

Institut für

Torben Weis

61

Informationstechnik

DataData FrameFrame StructureStructure

SD

AC

FC

DA

SA

DATA

ED

FS

1

1

1

6

6

n

1

1

SD

=

Starting Delimiter

AC

=

Access Control

FC

=

Frame Control

DA

=

Destination Address

SA

=

Source Address

ED

=

Ending Delimiter

FS

=

Frame Status

FC

FFZZZZZZED = Ending Delimiter FS = Frame Status FC FS AC00AC00 FF - Frame Type ZZZZZZ

FS

AC00AC00Ending Delimiter FS = Frame Status FC FFZZZZZZ FS FF - Frame Type ZZZZZZ - Control

FF - Frame Type ZZZZZZ - Control Bits

A

= Address Recognized

C

= Frame Copied

Control Bits A = Address Recognized C = Frame Copied Institut für Torben Weis 62 Informationstechnik

Institut für

Torben Weis

62

Informationstechnik

TokenToken RingRing PriorityPriority

 
 
 

Institut für

Torben Weis

63

Informationstechnik

Informationstechnik

 

IEEEIEEE StandardStandard 802802 forfor LANsLANs

 

Ethernet:

IEEE 802.3

Token Bus:

IEEE 802.4

Token Ring:

IEEE 802.5

Wireless:

IEEE 802.11

Institut für

Torben Weis

64

Informationstechnik

Informationstechnik

 

IEEEIEEE 802.4802.4 TokenToken BusBus

 
IEEE IEEE 802.4 802.4 Token Token Bus Bus   ∙ Physical: Bus (solid line)   ∙

Physical: Bus (solid line)

 

Logical: Ring (dashed line)

Institut für Torben Weis 65

Institut für

Torben Weis

65

Informationstechnik

WhyWhy TokenToken BusBus ??

 

Combines:

Cabling of Ethernet (single wire)

 

Determinism of Token Ring

Different application domains

Token Ring / Ethernet: Office

Token Bus: Industrial automation

• Pushed by General Motors • Real-time important

Institut für Torben Weis 66

Institut für

Torben Weis

66

Informationstechnik

TokenToken BusBus FrameFrame FormatFormat

Token Token Bus Bus – – Frame Frame Format Format ∙ Comparable to IEEE 802.5 format,

Comparable to IEEE 802.5 format, but unfortunately different

Comparable to IEEE 802.5 format, but unfortunately different Institut für Torben Weis 67 Informationstechnik

Institut für

Torben Weis

67

Informationstechnik

TokenToken BusBus -- MessagesMessages

Token Token Bus Bus - - Messages Messages Institut für Torben Weis 68 Informationstechnik
Token Token Bus Bus - - Messages Messages Institut für Torben Weis 68 Informationstechnik

Institut für

Torben Weis

68

Informationstechnik

TokenToken BusBus –– MACMAC ProtocolProtocol (1)(1) ∙ Initializing a ring 90 ∙ Station 90 wants
TokenToken BusBus –– MACMAC ProtocolProtocol (1)(1)
∙ Initializing a ring
90
∙ Station 90 wants to join
◦ Station 90 detects that there is no traffic
◦ Station 90 sends claim_token (90)
◦ The station with the highest MAC wins
Institut für
Torben Weis
69
Informationstechnik
TokenToken BusBus –– MACMAC ProtocolProtocol (2)(2)
∙ Joining a ring
90
80
70
60
Station 80 wants to join
◦ 90 periodically sends solicit_successor (90,70)
◦ Station between 90 and 70 may respond
◦ 80 sends set_successor (90,80)
Institut für
Torben Weis
70
Informationstechnik

TokenToken BusBus MACMAC ProtocolProtocol (3)(3)

Joining a ring, part 2

90 80 70 60
90
80
70
60

Stations 80 and 70 want to join

90 periodically sends solicit_successor (90,60)

Station between 90 and 60 may respond

80 and 70 send set_successor (90,xx) collision

90 sends resolve_contention

The winner sends set_successor (90,xx)

◦ The winner sends set_successor (90,xx) Institut für Torben Weis 71 Informationstechnik

Institut für

Torben Weis

71

Informationstechnik

TokenToken BusBus MACMAC ProtocolProtocol (4)(4)

∙ Contention Resolution L Station A two random bits address bits L Station B
∙ Contention Resolution
L
Station A
two random bits
address bits
L
Station B

Use the address bits, two bits at a time, starting from the most significant bit (MSB)

To avoid that larger number nodes always win:

Add two random bits before the MSB

Regenerated random bits periodically

bits before the MSB ◦ Regenerated random bits periodically Institut für Torben Weis 72 Informationstechnik

Institut für

Torben Weis

72

Informationstechnik

TokenToken BusBus MACMAC ProtocolProtocol (5)(5)

Leaving a ring

90 80 70 60
90
80
70
60

Stations 80 wants to leave

80 waits for the token

80 sends set_successor (90,70) 90 has new successor 70 has new predecessor

(90,70) 90 has new successor 70 has new predecessor Institut für Torben Weis 73 Informationstechnik

Institut für

Torben Weis

73

Informationstechnik

TokenToken BusBus MACMAC ProtocolProtocol (6)(6)

Station failure

90 80 70 60
90
80
70
60

Station 80 fails

90 sends token . If 80 does not reply, 90 sends again

Still no response 90 sends who_follows (90,80)

70 sends set_successor (90,70)

who_follows (90,80) ◦ 70 sends set_successor (90,70) Institut für Torben Weis 74 Informationstechnik

Institut für

Torben Weis

74

Informationstechnik

TokenToken BusBus MACMAC ProtocolProtocol (7)(7)

Station failure, part 2

90 80 70 60
90
80
70
60

Stations 80 and 70 fail

90 sends token . If 80 does not reply, 90 sends again

No response 90 sends who_follows (90,80)

No response 90 sends solicit_successor_2 (90)

Any alive station sends set_successor (90,xx)

(90) ◦ Any alive station sends set_successor (90,xx) Institut für Torben Weis 75 Informationstechnik

Institut für

Torben Weis

75

Informationstechnik