Download presentation
Presentation is loading. Please wait.
1
Week3 The Medium Access Sublayer
Multiple Access Protocols TANENBAUM
2
Overal Internet Architecture
3
MAC Sublayer
4
MAC Architecture
5
Broadcast through a Single Channel
Determining who will use the channel next is a problem Medium Access Control (MAC) sublayer solves this problem MAC is a sublayer (bottom part) of data link layer Broadcast Channels, also called Multiaccess Channels Random Access Channels TANENBAUM Computer Networks 1
6
Static Channel Allocation
Usually done by FDM or TDM Not an efficient method for data traffic: Let The capacity of a channel be C bps The mean time delay of the channel be T (seconds) Frame arrival rate is a random variable from Poisson distribution with mean frames/second Frame length is a random variable from exponential probability density function with mean 1/ bits/frame Then T = 1 / (C - ) (result from queuing theory) Now, let the channel be divided into N subchannels with capacity C/N and mean input rate /N TFDM= 1 / ((C/N) – (/N) = N / (C - ) = NT Tis means that he average delay is N times worse TANENBAUM
7
Dynamic Channel Allocation Assumptions 1
Station Model: block and wait Generates frames at a rate of frames/unit time (Frame generation is Poisson Distribution) Once a frame is generated, the station is blocked until the frame is successfully transmitted Single Channel Assumption: equal rights All stations transmit and receive with equal priority over a unique channel TANENBAUM
8
Dynamic Channel Allocation Assumptions 2
Collision Assumption Overlapping transmission by two or more stations at the same time garbles the frames (collision) All stations detect collisions There are no errors other than those generated by collisions Continuous Time Frame transmission can begin at any instant of time Slotted Time Time is divided into very narrow time slots Frame transmission always begins with a slot TANENBAUM
9
Dynamic Channel Allocation Assumptions 3
Carrier Sense Stations can detect if the channel is in use LANs generally have carrier sense No Carrier Sense Stations can not sense the channel before trying to use it Satellite networks do not have carrier sense TANENBAUM
10
Pure ALOHA Users transmit any time If there is a collision
sender knows about it after a certain time, waits random amount of time, sends the frame again Contention systems Systems in which multiple users share a common channel in a way that can lead to conflicts To maximize throughput, frames must have uniform sizes TANENBAUM
11
Frames in Pure ALOHA TANENBAUM
12
ALOHA Assumptions Frame time=time to transmit one frame
Number of frames generated in a frame time is a Poisson Distribution with mean N. If N>1, every frame will suffer a collision 0<N<1 is reasonable Probability of k transmission attempts in a frame time is Poisson with parameter G. Pr[k]=Gk e-G/k! For small N, G N For large N, G>N TANENBAUM
13
ALOHA cont’d P0 = probability that a frame does not suffer a collision
S = Probability of a transmission succeeding S = G P0 TANENBAUM
14
ALOHA Frame Collision Period
TANENBAUM
15
Efficiency of ALOHA Referring to the figure on prev. page, the vulnerable period is two frame times The probability that no frame is transmitted during this period is e-2G Pr[0]=e-G in one frame period so P0=e-2G in two frame periods Therefore troughput S = G e-2G The maximum of S occurs at G=0.5, S=1/2e TANENBAUM
16
ALOHA Throughput TANENBAUM
17
Slotted ALOHA 1 Can only transmit at the beginning of a slot
Vulnerable period is halved Hence S = G e-G S peaks at G = 1 Probability that a frame avoids a collision is e-G The probability of a collision is 1-e-G Probability of a transmission requiring exactly k attempts is Pk=e-G(1-e-G)k-1 TANENBAUM
18
Slotted ALOHA 2 Expected number of transmissions, E, per each created frame is E = k Pk = ke-G(1-e-G)k-1= d/dG(1-e-G)k = k= k= k=1 d/dG (1-e-G)k = d/dG eG = eG k=1 Conclusion: Performance exponentially degrades by the load TANENBAUM
19
Carrier Sense Multiple Access (CSMA) Protocols
ALOHA does not listen to the channel before it transmits, ending up with poor performance Carrier Sense Protocols Stations listen the channel if there is any transmission going on before they transmit TANENBAUM
20
Persistent and Nonpersistent CSMA
Stations transmit with probability 1 whenever they find the channel idle Nonpersistent CSMA If the channel is idle before the first attempt, transmit If the channel is already in use, wait for a random amount of time, and then listen to the channel for transmission P-persistent CSMA Applies to slotted channels If the channel is idle, transmit with probability p Defer transmission until the next slot with probability q = 1 – p If, in the mean time, someone else transmits, wait a random time If channel busy Wait for the next slot
21
Channel Utilization for Random Access Protocols
TANENBAUM
22
CSMA with Collision Detection (CSMA/CD)
Abort transmission as soon as detect collision If is the time the signal propagates between two farthest stations, the station has to wait 2 to make sure that no collision has occurred CSMA/CD model has contention, transmission and idle periods Contention period is modeled as a slotted ALOHA with slot size 2 TANENBAUM
23
CSMA/CD States TANENBAUM
24
Collision-Free Protocols
Assumptions There are N stations Each station has a unique address (0 to N-1) hardwired to it Question Which station gets the channel after a successful transmission? TANENBAUM
25
A Bit-Map Protocol (Reservation Protocol)
Two rounds of transmission cycle First Round (Contention Period) Consists of N slots each reserved for a particular station In this period, each station transmits 1 if it has a frame to transmit 0 if it has no frame to transmit At the completion of the first round everybody knows who wants to transmit Second Round (Transmission Period) Stations transmit according to the order formed in the first round There will not be any collisions TANENBAUM
26
The basic bit-map protocol
TANENBAUM
27
Reservation Protocol Performance :Binary Countdown
Each station has a binary station address A station wanting to transmit broadcasts its address starting with the high-order bit The bits from each station are boolean Or’ed Arbitration Rule As soon as a station sees that a high-order bit position that is 0 in its address is overwritten by 1, it gives up Channel Efficiency is d/(d+log2N) If station address is the first field in the frame then efficiency is 100%. TANENBAUM
28
Binary Countdown Example
TANENBAUM
29
Wavelength Division Multiple Access (WDMA) Protocols
All optical LANs divide the spectrum into wavelength bands Each station is assigned two channels Narrow channel: Control channel to signal the station Wide channel: Station outputs data frames Narrow channel is divided into m time slots Wide channel is divided into n+1 slots n for data output 1 for status (to indicate which slots on both channels are free) TANENBAUM
30
WDMA 2 TANENBAUM Computer Networks 1
31
WDMA 3 Both connection-oriented and connectionless traffic is supported Each station has: A fixed-wavelength receiver for listening to its own control channel A tunable transmitter for sending on other station’s control channel A fixed-wavelength transmitter for outputting data frames A tunable receiver for selecting a data transmitter to listen to TANENBAUM
32
WDMA Connection Setup Procedure
A tunes its data receiver to B’s data channel and waits for the status slot to learn about a free B control slot (on 4 of A) A chooses a free control slot and sends a CONNECTION REQUEST (on 2 of A) B assigns a data slot to A by announcing it in the status slot (on 3 of B, B also tunes 4 to A’s 3) A reads this announcement and a unidirectional connection from A to B is established (A transmits on 4 in the slot assigned by B) If the request was for two way communications, B would repeat the same procedure TANENBAUM
33
The Medium Access Sublayer
IEEE Standard and Ethernet Ethernet Frame Structure (Ethernet Encapsulation) preamble SFD DA SA type Data CRC 60 to 1514 bytes synchronize the receiver type Cyclic Redundancy Check 0800: IPv4 datagram 0806: ARP request/reply 8035: RARP request/reply 86DD: IPv6 start frame delimiter
34
Ethernet Frame (cont’d)
2 byte type that indicates what kind of data follows, e.g., 0800 for an IP packet Then the data, maximum 1500 bytes, minimum 46 bytes Data field must be padded with extra bytes if fewer than 46 bytes are supplied
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.