Académique Documents
Professionnel Documents
Culture Documents
Multiple stations access one channel Two different approaches What do we expect?
Static Simple Dynamic Efficient
Institut fr Informationstechnik
Torben Weis
Human protocols:
Cocktail party many people gather in a large room Broadcast medium = air Give everyone a chance to speak Dont speak until you are spoken to Dont monopolize the conversation Raise your hand if you have a question Dont interrupt when someone is speaking Dont fall asleep when someone else is talking
Institut fr Informationstechnik
Torben Weis
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
Institut fr Informationstechnik Torben Weis 4
Protocol Layer
Layer Layer55 Layer Layer44 Layer Layer33 Layer Layer22 Layer Layer11
Network Layer Data Link Layer Physical Layer Application Layer Transport Layer
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 fr Informationstechnik Torben Weis 5
Physical Layer
Layer Layer11
MAC is not part of the OSI Model MAC is a sublayer of the Data Link Layer
Institut fr Informationstechnik Torben Weis 6
Institut fr Informationstechnik
Torben Weis
Result
Divide the bandwidth in H/n frequency bands Assign one band to one station No collisions possible Delay increased by factor n
Institut fr Informationstechnik
Torben Weis
(a) The original bandwidths (b) The bandwidths raised in frequency (b) The multiplexed channel
Institut fr Informationstechnik Torben Weis 9
Result
Institut fr Informationstechnik
Torben Weis
11
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 fr Informationstechnik
Torben Weis
12
All stations connected to the same channel All stations are equivalent Every station can send/receive Optional
Priorities can be assigned to stations
Institut fr Informationstechnik
Torben Weis
13
Institut fr Informationstechnik
Torben Weis
14
Time is not slotted Station can attempt to send any time Time is slotted (divided in discrete intervals) Frame transmission starts at the beginning of a slot
Institut fr Informationstechnik
Torben Weis
15
No Carrier Sense
Channels are either busy or idle Station can sense whether the channel is busy Before sending, the station checks the channel 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 fr Informationstechnik
Torben Weis
16
Institut fr Informationstechnik
Torben Weis
17
Institut fr Informationstechnik
Torben Weis
18
ALOHA (1)
Norm Abramson at the Univ. of Hawaii mountainous islands land network difficult to install
ACK ACK
ACK ACK
Institut fr Informationstechnik
Torben Weis
19
ALOHA (2)
M nodes can create new frames at any time The node immediately transmits its frame completely on a shared frequency 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 fr Informationstechnik Torben Weis 20
Pure ALOHA
Slotted ALOHA
Idea
Result
Create time slots of length t Transmission only at beginning of each time slot Vulnerability reduced from 2t to t We doubled the throughput How does everybody agree on time slots?
Problem
Institut fr Informationstechnik
Torben Weis
23
Evaluating Aloha
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
Institut fr Informationstechnik Torben Weis 25
Institut fr Informationstechnik
Torben Weis
27
1-persistent CSMA
The protocol
It is called 1-persistent because the station transmits with a probability of 1 whenever it finds the channel idle.
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
Institut fr Informationstechnik
Torben Weis
28
Nonpersistent CSMA
The protocol
What is special?
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 The station does not sense all the time less greedy than 1-persistent CSMA
Institut fr Informationstechnik
Torben Weis
29
p-persistent CSMA
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 fr Informationstechnik
Torben Weis
30
Comparison of the channel utilization versus load for various random access protocols
Institut fr Informationstechnik Torben Weis 31
ACK is sent after the frame has been transmitted Frames with collisions are transmitted completely Waiting for ACK wastes time and bandwidth Check, whether you receive what you have sent Collisions can be detected early This is called Collision Detection or just CD
Institut fr Informationstechnik
Torben Weis
32
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
Institut fr Informationstechnik Torben Weis 33
Institut fr Informationstechnik
Torben Weis
34
Institut fr Informationstechnik
Torben Weis
35
Every station (N in total) wants to send a frame Overhead = 1 contention slot per N frames = 1 bit
Only one station wants to send a frame Overhead = 1 contention slot for 1 frame = N bits
Institut fr Informationstechnik
Torben Weis
36
Optimization
Many frames carry the sender address Efficiency can become 100%
Institut fr Informationstechnik Torben Weis 38
Address numbers circulate After sending a frame, address numbers are shifted The sending station gets a low address
Institut fr Informationstechnik
Torben Weis
39
Limited-Contention Protocols
Limit the number of participants in the contention First, everybody may try to send Collision halve the participants Low delay when there are few collisions Low delay when many station bid for the channel
Almost as good as reservation protocols As good as slotted ALOHA
Institut fr Informationstechnik
Torben Weis
42
Institut fr Informationstechnik
Torben Weis
43
Idea 2
1 = +5 Volt, 0 = 0 Volt Problem: How to differentiate 00000000 from an idle sender ? 1 = +5 Volt, 0 = -5 Volt Problem: We cannot be sure that all receivers sample the signal at the same rate (clock drift)
Torben Weis
44
1 = 10 0 = 01 Good news: the signal oscillates in the middle of every bit Bad news: We waste half of the bandwidth
Institut fr Informationstechnik
Torben Weis
45
Institut fr Informationstechnik
Torben Weis
46
Institut fr Informationstechnik
Torben Weis
48
Institut fr Informationstechnik
Torben Weis
49
Institut fr Informationstechnik
Torben Weis
50
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
Torben Weis
51
TK
PKT
T PK
T PK
TK
Institut fr Informationstechnik
Torben Weis
52
TK
T PK
T PK
TK
Institut fr Informationstechnik
Torben Weis
53
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 fr Informationstechnik Torben Weis 54
Stations s1, s2, sn Station si fetches the token and transmits data Then, si issues a new token si+1 can get the token Full load round robin Token ring is fair
as long as only one priority is used
Institut fr Informationstechnik Torben Weis
i.e. a station wants to send but never gets the token ? Answer: No
55
bypass relays
Institut fr Informationstechnik
Torben Weis
56
Institut fr Informationstechnik
Torben Weis
57
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 fr Informationstechnik
inject the token detect circulating frames send a continuous signal (e.g. Differential Manchester encoded 0) to synchronize all stations
Torben Weis
58
SD JK0JK000 AC PPPTMrrr
J - Phase Violation J K - Phase Violation K 0 - Binary Zero PPP - Priority Bits T - Token Bit M - Monitor Bit rrr - Reservation Bit J - Phase Violation J K - Phase Violation K 1 - Binary One I - Intermediate Bit E - Error Bit
Institut fr Informationstechnik Torben Weis 60
ED JK1JK1IE
SD JK0JK000
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
Torben Weis 61
Institut fr Informationstechnik
Starting Delimiter Access Control Frame Control Destination Address Source Address Ending Delimiter Frame Status
FC FFZZZZZZ FS AC00AC00
Institut fr Informationstechnik
Institut fr Informationstechnik
Torben Weis
63
Institut fr Informationstechnik
Torben Weis
64
Institut fr Informationstechnik
Torben Weis
66
Institut fr Informationstechnik
Torben Weis
67
Institut fr Informationstechnik
Torben Weis
68
Station 90 detects that there is no traffic Station 90 sends claim_token(90) The station with the highest MAC wins
Institut fr Informationstechnik
Torben Weis
69
90 periodically sends solicit_successor(90,70) Station between 90 and 70 may respond 80 sends set_successor(90,80)
Institut fr Informationstechnik
Torben Weis
70
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)
Institut fr Informationstechnik Torben Weis 71
address bits
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
Institut fr Informationstechnik
L L
Torben Weis
72
80 waits for the token 80 sends set_successor(90,70) 90 has new successor 70 has new predecessor
Institut fr Informationstechnik
Torben Weis
73
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)
Institut fr Informationstechnik
Torben Weis
74
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)
Institut fr Informationstechnik
Torben Weis
75