1.37k likes | 1.6k Vues
Chapter 5. The Medium Access Sublayer. 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-contention protocols, Wireless LAN protocols
E N D
Chapter 5 The Medium Access Sublayer
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-contention protocols, Wireless LAN protocols • 5.3 Ethernet - Cabling, MAC sublayer protocol, Backoff algorithm, Performance, Gigabit Ethernet, 802.2 Logical Link Control • 5.4Wireless LANs - 802.11 protocol stack, physical layer, MAC sublayer protocol, frame structure
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
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)
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 nodes 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
5.1 The Channel Allocation problem 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:
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 E[ ] = L L
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 higher • Average number in queue is the same, but in the 1st system the customers move out faster
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?
The Channel Allocation problem 5.1.1 Static channel Allocation in LANs and WANs Frequency Division Multiplexing (FDM)
5.1.2 Dynamic Channel Allocation in LANs and WANs Five Assumptions • 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. • Single Channel Assumption. A single channel is available for all communication. • Collision Assumption. If two frames are transmitted simultaneously, they are destroyed and must be retransmitted again later. There are no other errors.
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)
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
ALOHA • Users send whenever they want to send. If it fails, wait random time and resend it. • Independent stations • Single channel assumption • Collision occurs • Types of ALOHA • Pure ALOHA: stations transmit at any time (Continuous time) • Slotted ALOHA: Transmission can only occur at certain time instances • carrier sense vs no carrier senses
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 Hawaii Pure ALOHA (infinite population) In pure ALOHA, frames are transmitted at completely arbitrary times.
Pure ALOHA (2) Vulnerable period for the shaded frame.
Poisson pmf (1) • Suppose we are observing the arrival of jobs to a large computation center for the time interval (0, t] • Assume that for each small interval of time Dt, the probability of a new job arrival is lDt, where l is the average arrival rate.. • If Dt is sufficiently small, the probability of two or more jobs arriving in the interval of duration Dtmay 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 = lt / n • Bernoulli trials: P(X = 0) = p, withP(X = 1) = 1p
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 => lt = G Poisson pmf (2)
Pure ALOHA (2) • 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 and 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 loadtimes 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 by 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)
0.368 0.184 Throughput versus offered traffic for ALOHA systems.
Persistent and Nonpersistent CSMA Comparison of the channel utilization versus load for various random access protocols.
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 station 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
CSMA with Collision Detection CSMA/CD can be in one of three states: contention, transmission, or idle.
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
5.2.3 Collision-Free Protocols The basic bit-map protocol. 4-6.
Collision-Free Protocols (2) • 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 The binary countdown protocol. A dash indicates silence.