Chapter 6 Medium Access Control Protocols and Local Area Networks

Part I: Medium Access Control Part II: Local Area Networks

Chapter Overview
!!

Broadcast Networks
!!

!!

Medium Access Control
!!

!! !! !!

All information sent to all users No routing Shared media Radio
!! !!

!!

How to coordinate access to shared medium Data link layer since direct transfer of frames High-speed, low-cost communications between co-located computers Typically based on broadcast networks Simple & cheap Limited number of users

!!

Local Area Networks
!!

Cellular telephony Wireless LANs Ethernet LANs Cable Modem Access

!!

Copper & Optical
!! !!

!!

!! !!

1

Multiple Access Communications
!!

Shared media basis for broadcast networks
!! !!

Inexpensive: radio over air; copper or coaxial cable M users communicate by broadcasting into medium

!!

Key issue: How to share the medium when there is a competition for it?
3 1 2 4

Shared multiple access medium
M 5

Approaches to Media Sharing
Medium sharing techniques

Static channelization
!! !!

Dynamic medium access control

!!

!!

Partition medium Dedicated allocation to users Satellite transmission Cellular Telephone

Scheduling
!! !!

Random access
!!

!! !!

Polling: take turns Request for slot in transmission schedule Token ring Wireless LANs

!!

!! !!

Loose coordination Send, wait, retry if necessary Aloha Ethernet

2

Channelization: Satellite
Satellite Channel

uplink fin

downlink fout

What we learned from the foundations of queueing theory?

Random Access
Multi-tapped (mulit-access) Bus Crash!!

Transmit when ready Transmissions can occur; need retransmission strategy

3

Scheduling: Polling

Data from 1 from 2 Data Poll 1 Poll 2 1 2

Inbound line
Data to M

Host computer

Outbound line
3 M

Stations

Scheduling: Token-Passing
Ring networks
token

Data to M token

Station that holds token transmits into ring

4

Wireless LAN AdHoc: station-to-station Infrastructure: stations to base station Random access & polling Chapter 6 Medium Access Control Protocols and Local Area Networks Random Access 5 .

the resulting signal is garbled (a) Continuous Time: transmission begins at any instant. frames are transmitted at completely arbitrary times. (b) Slotted Time: transmission begins at the start of a slot. (b) No Carrier Sense: just go ahead transmission LANs generally have carrier sense. how about wireless networks? !! !! !! !! Pure ALOHA In pure ALOHA.Dynamic Channel Allocation Assumptions !! Station Model: N independent stations generating frames at a constant rate. (a) Carrier Sense: stations can sense the channel busy or idle. one-by-one transmission Single Channel: only one for all stations equivalently Collision: if two frames are transmitted simultaneously. How a station knows its frame was destroyed due to collision? What is the efficiency of an ALOHA channel? Feedback property of broadcasting. 6 .

) !! Psuccess : probability a frame transmission is successful S = GPsuccess !! X Prior interval X frame transmission !! Any transmission that begins during vulnerable period leads to collision Success if no arrivals during 2X seconds 7 .ALOHA !! !! Wireless link to provide data transfer between main campus & remote campuses of University of Hawaii Simplest solution: just do it !! !! !! !! A station transmits whenever it has data to transmit If more than one frames are transmitted. they interfere with each other (collide) and are lost If ACK not received within timeout. then a station picks random backoff time (to avoid repeated collision) Station retransmits frame after backoff time Retransmission t t0+X t0+X+2tprop Time-out t0+X+2tprop+ + B First transmission t0-X t0 Backoff period B Vulnerable period ALOHA Model !! Definitions and assumptions !! X frame transmission time (assume constant) !! S: throughput (average # successful frame transmissions per X seconds) !! G: load (average # transmission attempts per X sec.

p) 2n = (1 # G 2n ) " e # 2G as n " ! n Slotted ALOHA !! !! !! !! Time is slotted in X seconds slots Stations synchronized to frame times Stations transmit frames in first slot after frame arrival Backoff intervals in multiples of slots Backoff period B t t0 +X+2tprop+ B kX (k+1)X t0 +X+2tprop Time-out Vulnerable period What is required to turn a pure ALOHA to a slotted ALOHA? What benefit received by slotted ALOHA? What is the price for the benefit? And how much? 8 . 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] = (1 .Abramson’s Assumption !! !! !! !! !! What is probability of no arrivals in vulnerable period? Abramson assumption: Effect of backoff algorithm is that frame arrivals are equally likely to occur at any time interval G is avg. # arrivals per X seconds Divide X into n intervals of duration ! = X/n p = probability of arrival in ! interval.

25 0.4 0.5 8 G Carrier Sensing Multiple Access (CSMA) !! A station senses the channel before it starts transmission !! !! !! !! If busy.01563 0.1 0.Throughput of Slotted ALOHA S = GPsuccess = GP[no arrivals in X seconds] = GP[no arrivals in n intervals] = G (1 ! p ) n = G (1 ! 0.2 0.0625 0.184 Ge-G Ge-2G 1 2 4 0.15 0.05 0 0.25 0. start transmission Vulnerable period is reduced to tprop (due to channel capture effect) When collisions occur they involve entire frame transmission times Station A begins transmission at t=0 A Are ALOHA protocols carrier sense? Station A captures channel at t = tprop A 9 .35 0.3 G n ) " Ge !G n 0. either wait or schedule backoff (different options) If idle.03125 0.368 S 0.125 0.

16 a = 0.45 0.06 0.25 0.53 0.6 0.2 0. p. wait a backoff period.5 64 !! 0.1 0 1 2 4 8 16 32 0.01 !! Better than Aloha & slotted Aloha for small a Worse than Aloha for a > 1 a =0.03 0.5 0. transmit with prob.4 0. or wait one mini-slot time & re-sense with probability 1-p !! Delay and efficiency can be balanced Sensing 1-Persistent CSMA Throughput S 0.13 0. then sense carrier again !! High delay and high efficiency p-persistent CSMA (adjustable greedy) !! Wait till channel becomes idle.02 0.1 G a=1 10 .CSMA Options !! Transmitter behavior when busy channel is sensed !! !! !! 1-persistent CSMA (most greedy) !! Start transmission as soon as the channel becomes idle !! Low delay and low efficiency Non-persistent CSMA (least greedy) !! If busy.3 0.

quickly terminating a damaged frame saves T& BW In CSMA collisions result in wastage of X seconds spent transmitting an entire frame CSMA-CD reduces wastage to time to detect collision and abort transmission 11 .4 0. all stations involved abort transmission.5 64 0.06 0. and try again at scheduled times .01 S 0.03 0.1 0 1 2 4 8 16 32 0.5 0.Non-Persistent CSMA Throughput a = 0. first do carrier sensing !! After beginning transmissions.6 0.8 0.2 0.81 !! 0.9 0.1 G !! Higher maximum throughput than 1-persistent for small a Worse than Aloha for a > 1 a=1 CSMA with Collision Detection (CSMA/CD) !! !! !! Monitor for collisions & abort transmission !! Stations with frames to send.51 0.7 0.02 0.13 0. reschedule random backoff times.25 0. stations continue listening to the medium to detect collisions !! If collisions detected.14 a = 0.3 0.

Can collision occurs with CSMA/CD? If so. B detects collision at t = tprop It takes 2 tprop to find out if channel has been captured 12 . when occurs and not occurs? When a station can seize the channel for transmission (how long is the contention)? CSMA/CD reaction time A begins to transmit at A t=0 B B A A detects collision at A t= 2 tprop.!.! " B B begins to transmit at t = tprop.CSMA/CD Diagram !! CSMA/CD: Widely used on LANs in the MAC sublayer CSMA/CD can be in one of three states: contention. or idle. transmission.

If the red x still appears. 1/Pmax = e = 2. or the image may have been corrupted.CSMA-CD Model !! Assumptions !! Collisions can be detected and resolved in 2tprop !! Time slotted in 2tprop slots during contention periods !! Assume n busy stations. By taking derivative of Psuccess we find max occurs at p=1/n 1 1 1 1 max Psuccess = n (1 " ) n "1 = (1 " ) n"1 ! n n n e !! On average. Your computer may not have enough memory to open the image. and each may transmit with probability p in each contention time slot !! Once the contention period is over (a station successfully occupies the channel). you may have to delete the image and then insert it again. Restart your computer. and then open the file again.718 time slots to resolve contention Average Contention Period = 2t prop e seconds 13 . it takes X seconds for a frame to be transmitted !! It takes tprop before the next contention period starts. (a) Busy Contention Busy Idle Contention Busy Time Contention Resolution !! !! How long does it take to resolve contention? Contention is resolved (“success’) if exactly 1 station transmits in a slot: Psuccess = np(1 ! p) n!1 !! The image cannot be displayed.

2 microseconds !! !! 512 bits = 64 byte slot accommodates 2.5 km + 4 repeaters After nth collision. 10) !! Truncated Binary Exponential Backoff !! 14 . L bits/frame. select backoff from {0. systems alternates between contention periods and frame transmission times !! How long for a station to find out that a transmission is just over. 1. speed of light in medium d meters is diameter of system 2e+1 = 6. and then to start contention again? " max = !! where: X 1 1 = = X + t prop + 2et prop 1 + (2e + 1)a 1 + (2e + 1)Rd /! L R bits/sec. 2k – 1}. where k=min(n. X=L/R seconds/frame a = tprop/X # meters/sec.CSMA/CD Throughput Busy Contention Busy Contention Busy Contention Busy Time !! At maximum throughput.….44 CSMA-CD Application: Ethernet !! First Ethernet LAN standard used CSMA-CD !! !! !! 1-persistent Carrier Sensing R = 10 Mbps 2 * tprop = 51.

01 !! !! a 0.6 0.1 1 For small a: CSMA-CD has best maximum throughput For larger a: Aloha & slotted Aloha better maximum throughput.2 0 0.g. e.11 wireless LAN 15 .8 CSMA/CD 1-P CSMA Non-P CSMA Slotted ALOHA $max 0.Throughput for Random Access MACs 1 0. seizes channel first !! This priority mechanism is used in IEEE 802.4 ALOHA 0. ACK messages !! Impose different inter-frame times !! !! !! !! High priority traffic sense channel for time "1 # Low priority traffic sense channel for time "2>"1 # High priority traffic. if present. since not dependent on a (reaction time) Carrier Sensing and Priority Transmission Certain applications require faster response than others.

station that begin transmitting earlier retransmits (propagation time is known) !! Simple two-station example !! !! !! Two-Station MAC Example Two stations are trying to share a common medium A transmits at t = 0 Case 1 Distance d meters tprop = d / # seconds A B B does not transmit before t = tprop & A captures channel B transmits before t = tprop and detects collision soon thereafter A Station listens to medium and transmits if medium found idle B Case 2 A A detects collision at t = 2 tprop B B A 16 .Delay-Bandwidth Product !! Delay-bandwidth product key parameter !! !! Coordination in sharing medium involves using bandwidth (explicitly or implicitly) Difficulty of coordination commensurate with delaybandwidth product Station with frame to send listens to medium and transmits if medium found idle (carrier sense) Station monitors medium to detect collision If collision occurs.

then efficiency close to 100% As a approaches 1.Efficiency of Two-Station Example !! Each frame transmission requires 2tprop of quiet time !! !! !! Station B needs to be quiet tprop before and after time when Station A transmits R transmission bit rate L bits/frame L 1 1 = = L + 2t prop R 1 + 2t prop R / L 1 + 2a L 1 MaxThroughput = Reff = = R bits/second L / R + 2t prop 1 + 2a Efficiency = ! max = Normalized Delay-Bandwidth Product a= t prop L/ R Propagation delay Time to transmit a frame Typical MAC Efficiencies Two-Station Example: Efficiency = 1 1 + 2a !! CSMA-CD (Ethernet) protocol: Efficiency = Token-ring network 1 1 + 6.44a 1 1 + a! !! If a<<1. the efficiency becomes low Efficiency = a!= latency of the ring (bits)/average frame length 17 .

33 x 1003 1000 km 3.33 x 100 Network Type Desk area network 1 m 3.33 x 1001 3.33 x 10-01 100 m 3.33 x 1002 3.33 x 1007 3.33 x 1008 Global area network !! !! Max size Ethernet frame: 1500 bytes = 12000 bits Long and/or fat pipes give large a MAC protocol features Delay-bandwidth product !! Efficiency !! Transfer delay !! Fairness !! Reliability !! Capability to carry different types of traffic !! Quality of service !! Cost !! 18 .33 x 10-02 3.33 x 1002 10 km 3.33 x 1005 100000 km 3.33 x 1006 Wide area network 3.33 x 1004 Metropolitan area network 3.33 x 1006 3.Typical Delay-Bandwidth Products Distance 10 Mbps 100 Mbps 1 Gbps 3.33 x 1004 3.33 x 1003 Local area network 3.

rate at which “work” arrives Maximum throughput (@100% efficiency): R/L fr/sec Chapter 6 Medium Access Control Protocols and Local Area Networks Scheduling 19 .MAC Delay Performance !! Frame transfer delay !! !! From first bit of frame arrives at source MAC To last bit of frame delivered at destination MAC Actual transfer rate through the shared medium Measured in frames/sec or bits/sec !! Throughput !! !! !! Parameters R bits/sec & L bits/frame X=L/R seconds/frame $ frames/second average arrival rate Load % = $ X.

Scheduling for Medium Access Control !! Schedule frame transmissions to avoid collision in shared medium More efficient channel utilization "! Less variability in delays "! Can provide fairness to stations #! Increased computational or procedural complexity "! !! Two main approaches Reservation !! Polling !! A Bit-Map Protocol !! Assumptions: M stations have unique addresses 0 to M -1 !! Which station gets the channel after a successful transmission? a contention period has exactly M slots and a station j announces it has a frame to send by inserting 1 into slot j •! A bit-map protocol: !! The basic bit-map protocol. What is the length of a mini-slot? Is it fair to stations with different addresses? Worst case? 20 .

issues grants Distributed systems: Each station determines its slot for transmission from the reservation information Single frame reservation: Only one frame transmission can be reserved within a reservation cycle Multiple frame reservation: More than one frame transmission can be reserved within a frame Channelized (typically TDMA) reservation: Reservation messages from different stations are multiplexed without any risk of collision Random access reservation: Each station transmits its reservation message randomly until the message goes through !! Single or Multiple Frames !! !! !! Channelized or Random Access Reservations !! !! 21 .Collision-free Res. decides order of transmission. Systems Reservation interval Frame transmissions r d d Cycle n d r d d Cycle (n + 1) d Time r !! !! !! = 1 2 3 M Transmissions organized into cycles Cycle: reservation interval + frame transmissions Reservation interval has a mini-slot for each station to request reservations for frame transmissions Reservation System Options !! Centralized or distributed system !! !! Centralized systems: A central controller listens to reservation information.

What if the propagation delay is not negligible? 22 . How inefficient . a single frame transmission requires (1+v)X seconds Link is fully loaded when all stations transmit.Efficiency of Reservation Systems !! !! Assume mini-slot duration = vX (v < 1) A single frame reservation scheme !! !! If propagation delay is negligible and there are M stations. as many as Mk frames can be transmitted in XM(k+v) seconds Maximum efficiency is: !! ! max = MkX 1 = MvX + MkX 1 + v k Efficiency of Reservation Systems !! Large number of light traffic stations !! Dedicating a mini-slot to each station is inefficient. maximum efficiency is: ! max = !! !! MX 1 = MvX + MX 1 + v A k frame reservation scheme If k frame transmissions can be reserved with a reservation message and if there are M stations.

g.. cellphones or laptops.Application of Slotted Aloha cycle . Reservation mini-slots X-second slot . send packet data over radio and then to Internet Slotted Aloha MAC used for reservations Single & multi-slot reservations supported 23 ... e. !! !! !! Reservation protocol allows a large number of stations with infrequent traffic to reserve slots to transmit their frames in future cycles Each cycle has mini-slots allocated for making reservations Stations use slotted Aloha during mini-slots to request slots Example: GPRS !! General Packet Radio Service !! !! !! !! Packet data service in GSM cellular radio GPRS devices..

Polling Systems !! Centralized systems: A central controller accepts requests from stations and issues grants to transmit Distributed systems: Stations implement a decentralized algorithm to determine transmission order Central Controller !! Polling System Options !! Service Limits: How much is a station allowed to transmit per poll? !! !! !! !! Exhaustive: until station’s data buffer is empty (including new frame arrivals) Gated: all data in buffer when poll arrives Frame-Limited: one frame per poll Time-Limited: up to some maximum time More bandwidth & lower delay for stations that appear multiple times in the polling list Issue polls for stations with message of priority k or higher !! Priority mechanisms !! !! 24 .

Comparison of MAC approaches !! !! Channelization !! Feasible if traffic is steady Simple & quick transfer at very low load Accommodates large number of low-traffic bursty users Highly variable delay at moderate loads Efficiency does not depend on a Quick transfer and high efficiency for low delay-bandwidth product Can accommodate large number of bursty users Variable and unpredictable delay Aloha & Slotted Aloha !! !! !! !! !! CSMA-CD !! !! !! Comparison of MAC approaches !! Reservation !! !! !! !! On-demand transmission of bursty or steady streams Accommodates large number of low-traffic users with slotted Aloha reservations Can incorporate QoS Handles large delay-bandwidth product via delayed grants Generalization of time-division multiplexing Provides fairness through regular access opportunities Can provide bounds on access delay Performance deteriorates with large delay-bandwidth product !! Polling !! !! !! !! 25 .

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 What is a LAN? Local area means: !! Private ownership !! freedom from regulatory constraints of WANs low cost very high-speed. relatively error-free communication complex error control unnecessary Keeping track of location of computers a chore Simply give each machine a unique address Broadcast all messages to all machines in the LAN !! Short distance (~1km) between computers !! !! !! !! Machines are constantly moved !! !! !! !! Need a medium access control protocol 26 .

Medium Access Control Sublayer !! 1.! !! !! !! !! In IEEE 802.2 Logical link control Data link layer MAC 802.! !! Logical Link Control Sublayer Between Network layer & MAC sublayer MAC Sub-layer IEEE 802 Network layer OSI Network layer LLC 802.3 802.5 CSMA-CD Token Ring Wireless LAN Other LANs Physical layer Various physical layers Physical layer 27 . Data Link Layer divided into: Medium Access Control Sublayer Coordinate access to medium Connectionless frame transfer service Machines identified by MAC/physical address Broadcast frames with MAC addresses 2.1.11 802.

distinguished by their SAP (service access points). Encapsulation of MAC frames IP Packet IP LLC LLC PDU Header Data MAC Header FCS 28 .Logical Link Control Services !! Type 1: Unacknowledged connectionless service !! Unnumbered frame mode of HDLC Asynchronous balanced mode of HDLC !! Type 2: Reliable connection-oriented service !! !! Type 3: Acknowledged connectionless service Additional addressing !! !! !! A workstation has a single MAC physical address Can handle several logical connections.

A bit of history… !! !! !! !! !! !! !! !! 1970 ALOHAnet radio network deployed in Hawaiian islands 1973 Metcalf and Boggs invent Ethernet. random access in wired net 1979 DIX Ethernet II Standard 1985 IEEE 802.Ethernet . where k=min(n.10) Give up after 16 retransmissions !! Truncated binary exponential backoff !! !! 29 .3 LAN Standard (10 Mbps) 1995 Fast Ethernet (100 Mbps) 1998 Gigabit Ethernet 2002 10 Gigabit Ethernet Ethernet is the dominant LAN standard Metcalf’s Sketch IEEE 802.3 MAC: Ethernet MAC Protocol: !! CSMA/CD !! Slot Time is the critical system parameter !! !! !! !! !! upper bound on time to detect collision upper bound on time to acquire channel upper bound on length of frame segment generated by collision quantum for retransmission scheduling At least round-trip propagation for nth retransmission: 0 < r < 2k.

Collision detection can take as long as 2" (50 µsec).IEEE 802.2 µsec !! Max Length: 2500 meters + 4 repeaters !! !! Each x10 increase in bit rate. must be accompanied by x10 decrease in distance Ethernet Minimal Frame Size !! Why there is a minimum length (64B) for a frame? !! All frames must take more than 2" to send so that the transmission is still taking place when the noise burst gets back to the sender.3 Original Parameters Transmission Rate: 10 Mbps !! Min Frame: 512 bits = 64 bytes !! Slot time: 512 bits/10 Mbps = 51. 30 .

how randomization is done? Binary exponential backoff: after k collisions. transmission. IEEE 802. idle.1518 bytes !! !! !! !! !! Every frame transmission begins “from scratch” Preamble helps receivers synchronize their clocks to transmitter clock 7 bytes of 10101010 generate a square wave Start frame byte changes to 10101011 Receivers look for change in 10 pattern 31 . a random number between 0 to 2^k – 1 is chosen.3 MAC Frame 7 Preamble Synch 1 SD Start frame 6 Destination address 6 Source address 2 Length Information Pad 4 FCS 64 . that number of slots is skipped What is a time slot used in Ethernet? CSMA/CD can be in one of three states: contention. a station waits a random amount of time to try again.3 MAC Frame 802.Binary Exponential Backoff !! CSMA/CD !! !! If there is a collision.

3? 32 . excluding preamble & SD !! Max information 1500 bytes: 05DC Pad: ensures min frame of 64 bytes FCS: CCITT-32 CRC.. information.3 MAC Frame 802.1518 bytes !! !! !! Length: # bytes in information field !! Max frame 1518 bytes. covers addresses. length.111 Addresses •! local or global •! Global addresses •! first 24 bits assigned to manufacturer.3 MAC Frame 802.3 MAC Frame 7 Preamble Synch 1 SD Start frame Single address Group address 0 1 Local address Global address 6 Destination address 6 Source address 2 Length Information Pad 4 FCS 64 .. pad fields !! NIC discards frames if failed CRC Why no error control (ARQ) in 802. •! next 24 bits assigned by manufacturer •! Cisco 00-00-0C •! 3COM 02-60-8C 0 1 IEEE 802.1518 bytes •! Destination address •! single address •! group address •! broadcast = 111.3 MAC Frame 7 Preamble Synch 1 SD Start frame 6 Destination address 6 Source address 2 Length Information Pad 4 FCS 64 .IEEE 802.

48 0.24 0.2 Avg.84 0. or increase frame length x10 Fast Ethernet Table 6.12 0.78 0.3 100 Mbps Ethernet medium alternatives 100baseT4 Medium Max.Ethernet Scalability CSMA-CD a = .18 0. Segment Length Topology Twisted pair category 3 UTP 4 pairs 100 m Star 100baseT Twisted pair category 5 UTP two pairs 100 m Star 100baseFX Optical fiber multimode Two strands 2 km Star To preserve compatibility with 10 Mbps Ethernet: !! Same frame format.6 0.3 0.4 IEEE 802.54 0.36 0.96 33 .9 Load !! !! !! CSMA-CD maximum throughput depends on normalized delay-bandwidth product a=tprop/X x10 increase in bit rate = x10 decrease in X To keep a constant need to either: decrease tprop (distance) by x10.1 a = . same protocols !! Hub topology only with twisted pair & fiber !! Bus topology & coaxial cable abandoned !! Category 3 twisted pair (ordinary telephone grade) requires 4 pairs !! Category 5 twisted pair requires 2 pairs (most popular) !! Most prevalent LAN today 0.66 0. same interfaces.06 0.01 0 0.72 0. Transfer Delay 30 25 20 15 10 5 0 a = .42 0.

3 1 Gbps Fast Ethernet medium alternatives 1000baseSX Medium Max. Segment Length 300 m 10GBaseLR Two optical fibers Single-mode at 1310 nm 64B66B 10 km 10GbaseEW Two optical fibers Single-mode at 1550 nm SONET compatibility 40 km 10GbaseLX4 Two optical fibers multimode/singlemode with four wavelengths at 1310 nm band 8B10B code 300 m – 10 km !! !! !! !! !! Frame structure preserved CSMA-CD protocol officially abandoned LAN PHY for local network applications WAN PHY for wide area interconnection using SONET OC-192c Extensive deployment in metro networks anticipated 34 .3 IEEE 802.3 10 Gbps Ethernet medium alternatives 10GbaseSR Two optical fibers Multimode at Medium 850 nm 64B66B code Max. and operated primarily in a switched mode Extensive deployment in backbone of enterprise data networks and in server farms 10 Gigabit Ethernet Table 6.5 IEEE 802. Segment Length Topology Optical fiber multimode Two strands 550 m Star 1000baseLX Optical fiber single mode Two strands 5 km Star 1000baseCX Shielded copper cable 25 m Star 1000baseT Twisted pair category 5 UTP 100 m Star !! !! !! !! !! Slot time increased to 512 bytes Small frames need to be extended to 512 B Frame bursting to allow stations to transmit burst of short frames Frame structure preserved but CSMA-CD essentially abandoned.Gigabit Ethernet Table 6.

11 Wireless LAN 35 .Typical Ethernet Deployment Server farm Server Server Server Switch/router Gigabit Ethernet links Gigabit Ethernet links Switch/router Server Ethernet switch 100 Mbps links Hub 10 Mbps links Server Ethernet switch 100 Mbps links Hub 10 Mbps links Server Ethernet switch 100 Mbps links Hub 10 Mbps links Department A Department B Department C Chapter 6 Medium Access Control Protocols and Local Area Networks 802.

g. data-cell-phones Supports communicating devices "! Cameras. low-cost deployment Mobility & roaming: Access information anywhere Supports personal devices "! PDAs. laptops. Presentation in meeting. wireless identification Susceptible to noise and interference: reliability! Signal strength varies in space & time: coverage! Signal can be captured by snoopers: security! Ad Hoc Communications A C B D The basic service set (BSS) The basic service area (BSA) !! Temporary association of group of stations !! !! !! Within range of each other Need to exchange information E. or distributed computer game. location devices.Wireless Data Communications !! Wireless communications compelling "! "! "! "! #! #! #! Easy. or both 36 .

station A is hidden from C Data Frame B Data Frame C C transmits data frame & collides with A at B !! New MAC: CSMA with Collision Avoidance (MACA) (a) RTS B C A requests to send (b) A CTS B CTS C B announces A ok to send (c) Data Frame A sends (d) B C remains quiet ACK B ACK how long C be quiet? B sends ACK 37 .Hidden Terminal Problem Why not use CSMA-CD as wireless Ethernet? (a) A C Data Frame A transmits data frame B (b) A C senses medium.

The use of virtual channel sensing using CSMA/CA (MACA). each individually sequenced and acked with Stop&Wait •! A fragment burst after a RTS/CTS How to guarantee the burst transfer will complete? 38 . How C and D knows how long to set NAV (network allocation vector)? •! If a frame is too long. very little of chance getting through undamaged and will probably have to be retransmitted •! 802. C is within A’s range and D is within B’s range but not within A’s range.11 allows frames to be fragmented to smaller pieces.Example A wants to send data to B.

11 MAC Services !! !! !! Contention Service: Best effort Contention-Free Service: time-bounded transfer (controlled by AP) MAC can alternate between Contention Periods (CPs) & Contention-Free Periods (CFPs) Contentionfree service MSDUs MSDUs Contention service Point coordination function Distribution coordination function (CSMA-CA) Physical MAC Distributed Coordination Function (DCF) DIFS PIFS SIFS Busy medium Defer access Wait for reattempt time Next frame Contention window DIFS Time !! DCF provides basic access service !! !! Asynchronous best-effort data transfer All stations contend for access to medium Ready stations wait for completion of transmission All stations must wait Interframe Space (IFS) !! CSMA-CA !! !! 39 .IEEE 802.

CTS.Priorities through Interframe Spacing DIFS PIFS SIFS Busy medium Defer access Wait for reattempt time Next frame Contention window DIFS Time !! High-Priority frames wait Short IFS (SIFS) !! !! Typically to complete exchange in progress ACKs. data frames of segmented MSDU. etc. !! !! !! PCF IFS (PIFS) to initiate Contention-Free Periods DCF IFS (DIFS) to transmit data & MPDUs EIFS for receiver to recover a bad frame Contention & Backoff Behavior !! !! If channel is still idle after DIFS period. then station must schedule backoff time for reattempt !! !! !! Backoff period is integer # of idle contention time slots Waiting station monitors medium & decrements backoff timer each time an idle contention slot transpires Station can contend when backoff timer expires !! A station that completes a frame transmission is not allowed to transmit immediately !! Must first perform a backoff procedure 40 . ready station can transmit an initial MPDU If channel becomes busy before DIFS.

Transmission of MPDU without RTS/CTS DIFS Data Source SIFS Destination ACK Why not use RTS/CTS? Less value! DIFS NAV Other Defer Access Wait for Reattempt Time Transmission of MPDU with RTS/ CTS DIFS RTS Source SIFS Destination CTS SIFS SIFS Ack Data What is the length of a contention slot? DIFS NAV (RTS) What is the capacity (maximum throughput)? Other NAV (CTS) NAV (Data) Defer access 41 .

it waits until channel becomes idle for DIFS period & then begins random backoff time (in units of idle slots) Station transmits frame when backoff timer expires If collision occurs (how to know it?). contention-free service through polling !! Point coordinator (PC) in AP performs PCF !! Polling table up to implementor !! CFP repetition interval !! !! !! !! !! Determines frequency with which CFP occurs Initiated by beacon frame transmitted by PC in AP Contains CFP and CP During CFP stations may only transmit to respond to a poll from PC or to send ACK 42 . Losses & Errors !! Collision Avoidance !! !! !! When station senses channel busy. recompute backoff over interval that is twice as long Sending station interprets non-arrival of ACK as loss Executes backoff and then retransmits Receiving stations use sequence numbers to identify duplicate frames !! Receiving stations of error-free frames send ACK !! !! !! Point Coordination Function PCF provides connection-oriented.Collisions.

organizations geography Load sharing Longer distance Security 43 .Chapter 6 Medium Access Control Protocols and Local Area Networks LAN Bridges Data Link Layer Switching Data Link Layer Switching Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

Bridges & Routers !! Hub: Active central element in a star topology !! !! !! !! Twisted Pair: inexpensive. net configuration. Bridges & Routers !! Interconnecting Hubs !! !! !! Repeater: Signal regeneration All traffic appears in both LANs Bridge: MAC address filtering !! Local traffic stays in own LAN Routers: Internet routing !! All traffic stays in own LAN !! Higher Scalability ? Hub Two Twisted Pairs Two Twisted Pairs Hub Station Station Station Station Station Station 44 . statistics Requirements that arise: User community grows.Hubs. need to interconnect hubs Hubs are for different types of LANs Hub ? Two Twisted Pairs Hub Two Twisted Pairs Station Station Station Station Station Station Hubs. easy to insall Simple repeater in Ethernet LANs “Intelligent hub”: fault isolation.

3 802. timers.3 802.5 802.3 802.5 802.3 802.General Bridge Issues Network LLC MAC PHY 802.5 802.5 Network LLC MAC PHY !! !! Operation at data link level implies capability to work with multiple network layers However.5 Token Ring 802. security Difference in maximum frame length Bridges of Same Type Network LLC MAC Physical MAC Physical Bridge MAC Physical Network LLC MAC Physical Common case involves LANs of same type !! Bridging is done at MAC level !! 45 . must deal with !! !! !! Difference in MAC formats Difference in data rates.3 CSMA/CD 802. buffering.

and !! discard frame. if destination unknown Use backward learning to build table !! observe source address of arriving LANs !! handle topology changes by removing old entries S1 S2 LAN1 S3 Bridge LAN2 S4 S5 S6 S1!S5 S1 S2 S3 S4 S5 S1 to S5 LAN1 Port 1 S1 to S5 LAN2 B1 Port 2 Port 1 S1 to S5 B2 S1 to S5 LAN3 Port 2 Address Port S1 1 Address Port S1 1 46 .Transparent Bridges !! !! !! Interconnection of IEEE LANs with complete transparency Use table lookup. if source & destination in different LAN !! use flooding. if source & destination in same LAN !! forward frame.

S3!S2 S1 S2 S3 S4 S5 S3$S2 LAN1 Port 1 S3$S2 S3$S2 LAN2 B1 Port 2 Port 1 B2 Port 2 S3$S2 S3$S2 LAN3 Address Port S1 S3 1 2 Address Port S1 S3 1 1 S4!S3 S1 S2 S3 S4 S5 S4 S3 LAN1 Port 1 B1 S4$S3 Port 2 LAN2 S4$S3 Port 1 B2 S4$S3 LAN3 Port 2 Address Port S1 S3 S4 1 2 2 Address Port S1 S3 S4 1 1 2 47 .

stations are added & moved all the time !! !! !! Introduce timer (minutes) to age each entry & force it to be relearned periodically If frame arrives on port that differs from frame address & port in table.S1 S2!S1 S2 S3 S4 S5 S2$S1 LAN1 S2$S1 Port 1 LAN2 B1 Port 2 Port 1 B2 Port 2 LAN3 Address Port S1 S3 S4 S2 1 2 2 1 Address Port S1 S3 S4 1 1 2 Adaptive Learning In a static network. update immediately What to do if “Loop” bridges? What is a spanning tree? 48 . tables eventually store all addresses & learning stops !! In practice.

store-and-forward switches How about collision domain? Repeaters. Routers and Gateways (a) Which device is in which layer. (b) A bridge. packets. Bridges. and headers. Bridges. (b) Frames. Hubs. Cut-through switches vs. Switches. (c) a switch. 49 . Switches.Repeaters. Hubs. Routers and Gateways (a) A hub.