Chapter 6 Medium Access Control Protocols and Local Area Networks
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 6 Medium Access Control Protocols and Local Area Networks Part I: Medium Access Control Part II: Local Area Networks Chapter Overview z Broadcast Networks z Medium Access Control z All information sent to all z To coordinate access to users shared medium z No routing z Data link layer since direct z Shared media transfer of frames z Radio z Local Area Networks z Cellular telephony z High-speed, low-cost z Wireless LANs communications between co-located computers z Copper & Optical z z Ethernet LANs Typically based on broadcast networks z Cable Modem Access z Simple & cheap z Limited number of users Chapter 6 Medium Access Control Protocols and Local Area Networks Part I: Medium Access Control Multiple Access Communications Random Access Scheduling Channelization Delay Performance Chapter 6 Medium Access Control Protocols and Local Area Networks Part II: Local Area Networks Overview of LANs Ethernet Token Ring and FDDI 802.11 Wireless LAN LAN Bridges Chapter 6 Medium Access Control Protocols and Local Area Networks Multiple Access Communications Multiple Access Communications z Shared media basis for broadcast networks z Inexpensive: radio over air; copper or coaxial cable z M users communicate by broadcasting into medium z Key issue: How to share the medium? 3 2 4 1 Shared multiple access medium M 5 … Approaches to Media Sharing Medium sharing techniques Static Dynamic medium channelization access control z Partition medium Scheduling Random access z Dedicated allocation to users z Polling: take turns z Loose z Satellite z Request for slot in coordination transmission transmission z Send, wait, retry if z Cellular schedule necessary Telephone z Token ring z Aloha z Wireless LANs z Ethernet Channelization: Satellite Satellite Channel uplink fin downlink fout Channelization: Cellular uplink f1 ; downlink f2 uplink f3 ; downlink f4 Scheduling: Polling Inbound line Data fromData 1 from 2 Poll 1 Poll 2 Data to M Outbound line Host M computer 1 2 3 Stations Scheduling: Token-Passing Ring networks token Data to M token Station that holds token transmits into ring Random Access Multitapped Bus Crash!! Transmit when ready Transmissions can occur; need retransmission strategy Wireless LAN AdHoc: station-to-station Infrastructure: stations to base station Random access & polling Selecting a Medium Access Control z Applications z What type of traffic? z Voice streams? Steady traffic, low delay/jitter z Data? Short messages? Web page downloads? z Enterprise or Consumer market? Reliability, cost z Scale z How much traffic can be carried? z How many users can be supported? z Current Examples: z Design MAC to provide wireless DSL-equivalent access to rural communities z Design MAC to provide Wireless-LAN-equivalent access to mobile users (user in car travelling at 130 km/hr) Delay-Bandwidth Product z Delay-bandwidth product key parameter z Coordination in sharing medium involves using bandwidth (explicitly or implicitly) z Difficulty of coordination commensurate with delay-bandwidth product z Simple two-station example z Station with frame to send listens to medium and transmits if medium found idle z Station monitors medium to detect collision z If collision occurs, station that begin transmitting earlier retransmits (propagation time is known) Two-Station MAC Example Two stations are trying to share a common medium Distance d meters A tprop = d / ν seconds transmits AB at t = 0 B does not Case 1 transmit before A B t = tprop & A captures channel Case 2 B transmits before t = tprop A B and detects A detects collision soon collision at thereafter A t = 2 tprop B Efficiency of Two-Station Example z Each frame transmission requires 2tprop of quiet time z Station B needs to be quiet tprop before and after time when Station A transmits z R transmission bit rate z L bits/frame L 1 1 Efficiency = ρmax = = = L + 2t prop R 1+ 2t prop R / L 1+ 2a L 1 MaxThroughput = Reff = = R bits/second L / R + 2t prop 1+ 2a Normalized Propagation delay t prop Delay-Bandwidth a = Product L / R Time to transmit a frame Typical MAC Efficiencies Two-Station Example: 1 Efficiency = 1+ 2a z If a<<1, then efficiency close to CSMA-CD (Ethernet) protocol: 100% 1 Efficiency = z As a approaches 1+ 6.44a 1, the efficiency Token-ring network becomes low 1 Efficiency = 1+ a′ a΄= latency of the ring (bits)/average frame length Typical Delay-Bandwidth Products Distance 10 Mbps 100 Mbps 1 Gbps Network Type 1 m 3.33 x 10- 3.33 x 10- 3.33 x 100 Desk area network 02 01 100 m 3.33 x 1001 3.33 x 1002 3.33 x 1003 Local area network 10 km 3.33 x 1002 3.33 x 1003 3.33 x 1004 Metropolitan area network 1000 km 3.33 x 1004 3.33 x 1005 3.33 x 1006 Wide area network 100000 km 3.33 x 1006 3.33 x 1007 3.33 x 1008 Global area network z Max size Ethernet frame: 1500 bytes = 12000 bits z Long and/or fat pipes give large a MAC protocol features z Delay-bandwidth product z Efficiency z Transfer delay z Fairness z Reliability z Capability to carry different types of traffic z Quality of service z Cost MAC Delay Performance z Frame transfer delay z From first bit of frame arrives at source MAC z To last bit of frame delivered at destination MAC z Throughput z Actual transfer rate through the shared medium z Measured in frames/sec or bits/sec z Parameters R bits/sec & L bits/frame X=L/R seconds/frame λ frames/second average arrival rate Load ρ = λ X, rate at which “work” arrives Maximum throughput (@100% efficiency): R/L fr/sec Normalized Delay versus Load E[T]/X E[T] = average frame z At low arrival transfer delay rate, only frame transmission X = average frame time transmission time z At high arrival rates, increasingly longer waits to Transfer delay access channel z Max efficiency typically less than 100% 1 ρ ρ 1 Load max Dependence on Rtprop/L E[T]/X a′ > a a′ a Transfer Delay 1 ρ ρ′max ρmax 1 Load Chapter 6 Medium Access Control Protocols and Local Area Networks Random Access ALOHA z Wireless link to provide data transfer between main campus & remote campuses of University of Hawaii z Simplest solution: just do it z A station transmits whenever it has data to transmit z If more than one frames are transmitted, they interfere with each other (collide) and are lost z If ACK not received within timeout, then a station picks random backoff time (to avoid repeated collision) z Station retransmits frame after backoff time First transmission Retransmission Backoff period B t t -X t0 t0+X t +X+2t + B 0 t0+X+2tprop 0 prop Vulnerable Time-out period ALOHA Model z Definitions and assumptions z X frame transmission time (assume constant) z S: throughput (average # successful frame transmissions per X seconds) z G: load (average # transmission attempts per X sec.) z Psuccess : probability a frame transmission is successful S = GP success z Any transmission that begins during vulnerable period leads to collision z Success if no arrivals X X during 2X seconds Prior interval frame transmission Abramson’s Assumption z What is probability of no arrivals in vulnerable period? z Abramson assumption: Effect of backoff algorithm is that frame arrivals are equally likely to occur at any time interval z G is avg. # arrivals per X seconds z Divide X into n intervals of duration Δ=X/n z p = probability of arrival in Δ interval, then G = n p since there are n intervals in X seconds Psuccess = P[0 arrivals in 2X seconds] = = P[0 arrivals in 2n intervals] G = (1- p)2n = (1− )2n → e−2G as n → ∞ n Throughput of ALOHA −2G S = GPsuccess = Ge z Collisions are means -2 for coordinating 0.2 e = 0.184 0.18 access 0.16 z Max throughput is 0.14 0.12 ρmax=1/2e (18.4%) S 0.1 z Bimodal behavior: 0.08 0.06 Small G, S≈G 0.04 Large G, S↓0 0.02 0 z Collisions can 5 5 0 2 2 5 5 5 5 .5 1 2 4 1 6 2 2 2 .2 0 8 5 1 6 .1 0 snowball and drop 7 1 3 .0 0 0 .0 .0 0 .0 0 0 0 throughput to zero G Slotted ALOHA z Time is slotted in X seconds slots z Stations synchronized to frame times z Stations transmit frames in first slot after frame arrival z Backoff intervals in multiples of slots Backoff period B t (k+1)X t +X+2t kX 0 prop t0 +X+2tprop+ B Time-out Vulnerable period Only frames that arrive during prior X seconds collide Throughput of Slotted ALOHA S = GPsuccess = GP[no arrivals in X seconds] = GP[no arrivals in n intervals] G = G(1− p)n = G(1− )n → Ge−G n 0.4 0.368 0.35 0.3 S 0.25 Ge-G 0.2 0.184 0.15 0.1 0.05 Ge-2G 0 1 2 4 8 0.5 0.25 0.125 0.0625 0.01563 0.03125 G Application of Slotted Aloha cycle . Reservation X-second slot mini-slots z Reservation protocol allows a large number of stations with infrequent traffic to reserve slots to transmit their frames in future cycles z Each cycle has mini-slots allocated for making reservations z Stations use slotted Aloha during mini-slots to request slots Carrier Sensing Multiple Access (CSMA) z A station senses the channel before it starts transmission z If busy, either wait or schedule backoff (different options) z If idle, start transmission z Vulnerable period is reduced to tprop (due to channel capture effect) z When collisions occur they involve entire frame transmission times z If tprop >X (or if a>1), no gain compared to ALOHA or slotted ALOHA Station A begins transmission at t = 0 A Station A captures channel at t = tprop A CSMA Options z Transmitter behavior when busy channel is sensed z 1-persistent CSMA (most greedy) z Start transmission as soon as the channel becomes idle z Low delay and low efficiency z Non-persistent CSMA (least greedy) z Wait a backoff period, then sense carrier again z High delay and high efficiency z p-persistent CSMA (adjustable greedy) z Wait till channel becomes idle, transmit with prob.