Presentation is loading. Please wait.

Presentation is loading. Please wait.

CEN 4500 Data Communications Instructor: S. Masoud Sadjadi sadjadi At cs Dot fiu Dot edu Chapter 4: The Medium.

Similar presentations


Presentation on theme: "CEN 4500 Data Communications Instructor: S. Masoud Sadjadi sadjadi At cs Dot fiu Dot edu Chapter 4: The Medium."— Presentation transcript:

1 CEN 4500 Data Communications Instructor: S. Masoud Sadjadi http://www.cs.fiu.edu/~sadjadi/Teaching/ sadjadi At cs Dot fiu Dot edu Chapter 4: The Medium Access Control Sublayer

2 CEN 4500, S. Masoud Sadjadi2 Recap Networks are divided into two categories –Point-2-point connections (WANs) –Broadcast channels (LANs) a.k.a Multicast Channels a.k.a Random Access Channels Key issue in broadcast channels –Determining who gets to use the channel, when there is a competition Medium Access Control (MAC) sublayer –Has the protocol that addresses this issue –Technically is the bottom part of the data link layer –Usually used in LAN and in satellite networks

3 CEN 4500, S. Masoud Sadjadi3 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Data Link Layer Switching Summary

4 CEN 4500, S. Masoud Sadjadi4 The Channel Allocation Problem How to allocate a single broadcast channel among competing users? Static Channel Allocation in LANs and MANs Dynamic Channel Allocation in LANs and MANs

5 CEN 4500, S. Masoud Sadjadi5 Static Channel Allocation Frequency Division Multiplexing (FDM) –If there are N users, the bandwidth is divided into N equal-sized portions. –Good for small and constant numbers of users, each of which has a heavy (buffered) load of traffic. –Not good for users with bursty traffic Time Division Multiplexing (TDM) –Each user is statically allocated every Nth time slot. –The same problem with bursty traffics.

6 CEN 4500, S. Masoud Sadjadi6 Why FDM and TDM have a poor performance? Mean time delay, T, for a channel of capacity C bps, with arrival rate of frames/sec, each frame having a length drawn from an exponential probability density function with mean 1/  bits/frame. From queuing theory with Poisson arrival and service times: T = 1/(  C - ) –Ex: C = 100 Mbps, 1/  = 10,000 bits/frames, = 5000 frames/sec, then T = 200  sec NOT T = 100  sec T FDM = 1/(  (C/N) – ( /N)) = N/(  C - ) = NT –Ex: 10 networks of 10 Mbps, T FDM = NT = 2 msec

7 CEN 4500, S. Masoud Sadjadi7 Dynamic Channel Allocation: Assumptions 1.Station Model –N independent stations/terminals –The probability of a frame being generated in an interval of  t is  t, where is a constant (the arrival rate of new frames). 2.Single Channel Assumption –A single channel is available for all communications. –All stations can transmit on it and all can receive from it 3.Collision Assumption –Collision: If two frames are transmitted simultaneously, they overlap in time and the resulting signal is garbled. –All stations can detect collisions. –There are no errors other than those generated by collisions. 4.(a) Continuous Time: No master clock. Frame can start at any time. (b) Slotted Time: Time is divided into discrete intervals (slots). Frame transmission always begins at the start of a slot. 5.(a) Carrier Sense: Stations can tell if the channel is in use. (b) No Carrier Sense: Stations cannot sense the channel before using it.

8 CEN 4500, S. Masoud Sadjadi8 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Data Link Layer Switching Summary

9 CEN 4500, S. Masoud Sadjadi9 Multiple Access Protocols ALOHA Carrier Sense Multiple Access Protocols Collision-Free Protocols Limited-Contention Protocols Wavelength Division Multiple Access Protocols Wireless LAN Protocols

10 CEN 4500, S. Masoud Sadjadi10 ALOHA 1970, Norman Abramson, Univ. of Hawaii Was called “the ALOHA system” Used ground-based radio broadcasting The basic idea is applicable to any system, in which uncoordinated users are competing for the use of a single shared channel. Two versions –Pure ALOHA: not global time synchronization –Slotted ALOHA: time is divided into discrete slots

11 CEN 4500, S. Masoud Sadjadi11 Pure ALOHA Basic idea: –Let users transmit whenever they have data to be sent. –There will be collisions, of course, and the colliding frame will be damaged. –However, due to the feedback property of broadcasting, a sender can always find out whether its frame was destroyed by listening to the channel, the same way the other users do. –If listening at the same time of sending is not possible, then ack is required. –If a frame is destroyed, the sender just wait a random amount of time and sends it again. Contention Systems –Systems in which multiple users share a common channel in a way that can lead to conflicts.

12 CEN 4500, S. Masoud Sadjadi12 Pure ALOHA: Example In pure ALOHA, frames are transmitted at completely arbitrary times. The throughput of ALOHA systems is maximized by having a uniform frame size.

13 CEN 4500, S. Masoud Sadjadi13 Pure ALOHA: Channel Efficiency? Let the “frame size” denote the amount of time needed to transmit the standard, fixed-length frame. Assume that infinite population of users generates new frames according to a Poisson distribution with mean N frames per frame time. If N > 1, the user community is generating more frames than the channel can handle, so nearly every frame will suffer a collision. For reasonable throughput, we expect 0 < N < 1. In addition to the new frame, the stations also generate retransmissions of garbled frames. Assume that the probability of k transmission attempts per frame time, old and new combined, is also Poisson, with mean G per frame time. Clearly G >= N S = GP 0, where S is throughput and P 0 is the probability that a frame does not suffer collision.

14 CEN 4500, S. Masoud Sadjadi14 Pure ALOHA: Vulnerable Period A frame will not suffer a collision if not other frames are sent within one frame time of its start. Vulnerable period for the shaded frame.

15 CEN 4500, S. Masoud Sadjadi15 Pure ALOHA: Throughput The probability that k frames are generated during a given frame time is given by the Poisson distribution: –Pr[k] = G k e -G / k! –Pr[0] = e -G –In an interval of two frame time, the mean number of frames generated is 2G. –Then, the probability of no other traffic being initiated during the entire vulnerable period is P 0 = e -2G –Using S = GP 0, we get S = G e -2G

16 CEN 4500, S. Masoud Sadjadi16 Pure ALOHA: Throughput Maximum throughput occurs at G = 0.5, which is about 0.184, or %18. Not encouraging! Throughput versus offered traffic for ALOHA systems.

17 CEN 4500, S. Masoud Sadjadi17 Slotted ALOHA 1972, Roberts, doubling the capacity of ALOHA Basic idea –Users need to agree on slot boundaries –One special station emit a pip at the start of each interval, like a clock. –The users need to wait until the beginning of the next slot. Throughput –The vulnerable area is halved –So, P 0 = e -G, and S = G e -G –Probability of collision is 1- P 0 or 1- e -G –The probability of a transmission requiring exactly k attempts P k = e -G (1- e -G ) k-1 –The expected number of transmissions E =  k=1 kP k = e G

18 CEN 4500, S. Masoud Sadjadi18 Carrier Sense Multiple Access Protocols ALOHA and Slotted ALOHA are bound to have many collisions as the stations start transmitting at will. In LANs, it is possible for stations to detect what other stations are doing and adapt their behavior accordingly. Carrier Sense Protocols –Protocols in which stations listen for a carrier (i.e., a transmission) and act accordingly –Persistent and Nonpersistent CSMA –CSMA with Collision Detection

19 CEN 4500, S. Masoud Sadjadi19 Persistent CSMA When a station has data to send, it first listens to the channel ro see if anyone else is transmitting If the channel is busy, the station waits until it becomes idle. When the station detects an idle channel, it transmits a frame with the probability of one, hence the name 1-persistent CSMA. The propagation delay has an important effect on the performance of this protocol –The longer the propagation delay, the more chance of collision. –With propagation delay of zero, there will still be collisions.

20 CEN 4500, S. Masoud Sadjadi20 Nonpersistent CSMA A conscious attempt is made to be less greedy. Before sending, a station senses the channel. If the channel is already in use, the station does not continually sense it for the purpose of seizing it immediately upon detection the end of the previous submission. Instead, it waits a random period of time and then repeats the algorithm. Consequently, this algorithm leads to a better channel utilization, but longer delays.

21 CEN 4500, S. Masoud Sadjadi21 P-Persistent CSMA It applies to slotted channels When a station becomes ready to send, it senses the channel. If it is busy, it waits until the next slot. If it is idle, it transmits with a probability p With probability q=1-p, it defers until the next slot. If that slot is also idle, it either transmits or defers again, with probability p and q. This process is repeated until either the frame has been transmitted or another station has begun transmitting. In the latter case, it waits a random time and starts again

22 CEN 4500, S. Masoud Sadjadi22 Persistent and Nonpersistent CSMA Comparison of the channel utilization versus load for various random access protocols.

23 CEN 4500, S. Masoud Sadjadi23 CSMA with Collision Detection Persistent and nonpersistent CSMA protocols are clearly an improvement over ALOHA –No station will start transmission if it senses that the channel is busy! Another improvement –Abort transmission as soon as a collision is detected. –This saves time and bandwidth CSMA/CD –Is widely used in LANs in the MAC sublayer –It is the base for the popular Ethernet LAN

24 CEN 4500, S. Masoud Sadjadi24 CSMA/CD Conceptual Model Let’s assume that at time t 0 a station has finished transmitting its frame. Any other station having a frame to send may now attempt to do so. If two or more stations decide to transmit simultaneously, there will be a collision. Collisions can be detected by looking at the power or pulse width of the received signal and comparing it to the transmitted signal. After a station detects a collision, it aborts its transmission, waits a random period of time, and then tries again, assuming that no other station has started transmitting in the meantime. Therefore, our model for CSMA/CD will consists of alternating contention and transmission periods, with idle periods occurring when all stations are quiet.

25 CEN 4500, S. Masoud Sadjadi25 CSMA with Collision Detection CSMA/CD can be in one of three states: contention, transmission, or idle.

26 CEN 4500, S. Masoud Sadjadi26 CSMA/CD: Modeling the Contention Period Worst case scenario –Assume  is the channel propagation time –If station A starts transmission at t 0 and B at the farthest in the channel start transmission at t 0 +  - , then A will not know about the collision until t 0 + 2  -  –Therefore, we model the contention period as a slotted ALOHA system with slot width 2  Collision detection is an analog process –so the signal encoding must allow collisions to be detected (two 0 volts will be 0 volt). –A sending station must continuously monitor the channel, listening for noise bursts that might indicate a collision. –So, CSMA/CD with a single channel is a half-duplex system inherently, as the receiving logic is in use. No MAC-sublayer protocol guarantees reliable delivery (the receiving side may not correctly copy the frame!).

27 CEN 4500, S. Masoud Sadjadi27 Collision-Free Protocols In CSMA/CD still collisions can happen during the contention period –Adversely affecting the system performance. –Especially when the cable is long and frames are short Collision-Free Protocols –Do not have any collisions –Not widely used yet Examples –A Bit-Map Protocol –Binary Countdown Protocol

28 CEN 4500, S. Masoud Sadjadi28 A Bit-Map Protocol Efficiency: –Low loads: With the overhead per frame, N bits, and data d bits, the efficiency is d / (N + d) –High loads: With the overhead per frame, 1 bit, the efficiency is d / (1 + d) Problem: The overhead is one bit per station, so it does not scale well The basic bit-map protocol.

29 CEN 4500, S. Masoud Sadjadi29 Binary Countdown Protocol All addresses are assume to be the same length. The bits in each address position from different stations are BOOLEAN ORed together. The channel efficiency –d / (d + log 2 N) The binary countdown protocol. A dash indicates silence.

30 CEN 4500, S. Masoud Sadjadi30 Limited-Contention Protocols Performance measures –Low delay at low loads Contention protocols (e.g., pure of slotted ALOHA) –High channel efficiency at high loads Collision-free protocols It would be best if we could combine the best properties of the contention and collision-free protocols. Limited-Contention Protocol –Uses a contention protocol at low load –Uses collision-free protocol at high load

31 CEN 4500, S. Masoud Sadjadi31 Limited-Contention Protocols Acquisition probability for a symmetric contention channel.

32 CEN 4500, S. Masoud Sadjadi32 Adaptive Tree Walk Protocol The tree for eight stations.

33 CEN 4500, S. Masoud Sadjadi33 Wavelength Division Multiple Access Protocols A different approach to channel allocation is to divide the channel into sub-channels using FDM, TDM, or both, and dynamically allocate them as needed. Wavelength division multiple access.

34 CEN 4500, S. Masoud Sadjadi34 Wireless LAN Protocols Portal and Mobile computers may not be the same! CSMA may not be appropriate, because what matters is interference at the receiver, and not at the sender side. –Hidden Station Problem: a station not being able to detect a potential competitor for the medium because the competitor is too far away. –Exposes Station Problem: a station falsely avoid transmission, because it senses activity on the network that does not affect the intended receiver.

35 CEN 4500, S. Masoud Sadjadi35 Wireless LAN Protocols A wireless LAN: (a)Hidden Station Problem: A is transmitting and if C transmits too, then there will be collision at B. (b)B is transmitting and for that, C is avoiding transmission to D.

36 CEN 4500, S. Masoud Sadjadi36 Wireless LAN Protocols (2) The Multiple Access with Collision Avoidance (MACA) protocol. (a) A sending an RTS to B. (b) B responding with a CTS to A.

37 CEN 4500, S. Masoud Sadjadi37 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Wireless LANs Broadband Wireless Bluetooth Data Link Layer Switching Summary

38 CEN 4500, S. Masoud Sadjadi38 Ethernet Ethernet Cabling Manchester Encoding The Ethernet MAC Sublayer Protocol The Binary Exponential Backoff Algorithm Ethernet Performance Switched Ethernet Fast Ethernet Gigabit Ethernet IEEE 802.2: Logical Link Control Retrospective on Ethernet

39 CEN 4500, S. Masoud Sadjadi39 IEEE 802 The IEEE has standardized a number of LANs and MANs under the name IEEE 802. –802.3 is Ethernet (based on the original Ethernet) –802.11 is for Wireless LAN –802.15 is for Bluetooth –802.16 is for Wireless MAN –802.2 is for logical link control for both 802.3 and 802.11

40 CEN 4500, S. Masoud Sadjadi40 Ethernet Cabling 10Base5 & 10Base2 –10 Mbps, Base is for baseband signaling, 500 & 185 meters 10Base-T and 10Base-F –T for Twisted Pair and F for Fiber The most common kinds of Ethernet cabling.

41 CEN 4500, S. Masoud Sadjadi41 Ethernet Cabling (2) Three kinds of Ethernet cabling. (a) 10Base5, (b) 10Base2, (c) 10Base-T.

42 CEN 4500, S. Masoud Sadjadi42 Ethernet Cabling (3) Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.

43 CEN 4500, S. Masoud Sadjadi43 Ethernet Cabling (4) (a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.

44 CEN 4500, S. Masoud Sadjadi44 Ethernet MAC Sublayer Protocol Preamble (10101010 pattern): The Manchester encoding will produce a 10 MHz square wave for 6.4  sec to allow the receiver clock to synchronize Type: multiple network protocols; Which process to give the frame to. Pad: Frame size at least 64 bytes; frames must take more than 2 . –For 10 Mbps, max length of 2500 m, and four repeaters, 2  is 50  sec –So, 500 bits is the smallest frame that can work SoF: Start of Frame delimiter for compatibility with 802.4 and 802.5 Frame formats. (a) The original DIX (DEC, Intel, and Xerox) Ethernet, (b) IEEE 802.3.

45 CEN 4500, S. Masoud Sadjadi45 Ethernet MAC Sublayer Protocol (2)

46 CEN 4500, S. Masoud Sadjadi46 Ethernet Performance Efficiency of Ethernet at 10 Mbps with 512- bit slot times.

47 CEN 4500, S. Masoud Sadjadi47 Switched Ethernet A simple example of switched Ethernet. Collision domains are different.

48 CEN 4500, S. Masoud Sadjadi48 Fast Ethernet The original fast Ethernet cabling.

49 CEN 4500, S. Masoud Sadjadi49 Gigabit Ethernet (a)A two-station Ethernet. (b) A multistation Ethernet.

50 CEN 4500, S. Masoud Sadjadi50 Gigabit Ethernet (2) Gigabit Ethernet cabling.

51 CEN 4500, S. Masoud Sadjadi51 IEEE 802.2: Logical Link Control (a) Position of LLC. (b) Protocol formats.

52 CEN 4500, S. Masoud Sadjadi52 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Wireless LANs Broadband Wireless Bluetooth Data Link Layer Switching Summary

53 CEN 4500, S. Masoud Sadjadi53 Wireless LANs The 802.11 Protocol Stack The 802.11 Physical Layer The 802.11 MAC Sublayer Protocol The 802.11 Frame Structure Services

54 CEN 4500, S. Masoud Sadjadi54 The 802.11 Protocol Stack Part of the 802.11 protocol stack.

55 CEN 4500, S. Masoud Sadjadi55 The 802.11 MAC Sublayer Protocol (a) The hidden station problem. (b) The exposed station problem.

56 CEN 4500, S. Masoud Sadjadi56 The 802.11 MAC Sublayer Protocol The use of virtual channel sensing using CSMA/CA.

57 CEN 4500, S. Masoud Sadjadi57 The 802.11 MAC Sublayer Protocol A fragment burst.

58 CEN 4500, S. Masoud Sadjadi58 The 802.11 MAC Sublayer Protocol Interframe spacing in 802.11.

59 CEN 4500, S. Masoud Sadjadi59 The 802.11 Frame Structure The 802.11 data frame.

60 CEN 4500, S. Masoud Sadjadi60 802.11 Services Association Disassociation Reassociation Distribution Integration Distribution Services

61 CEN 4500, S. Masoud Sadjadi61 802.11 Services Authentication Deauthentication Privacy Data Delivery Intracell Services

62 CEN 4500, S. Masoud Sadjadi62 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Wireless LANs Broadband Wireless Bluetooth Data Link Layer Switching Summary

63 CEN 4500, S. Masoud Sadjadi63 Broadband Wireless Comparison of 802.11 and 802.16 The 802.16 Protocol Stack The 802.16 Physical Layer The 802.16 MAC Sublayer Protocol The 802.16 Frame Structure

64 CEN 4500, S. Masoud Sadjadi64 The 802.16 Protocol Stack The 802.16 Protocol Stack.

65 CEN 4500, S. Masoud Sadjadi65 The 802.16 Physical Layer The 802.16 transmission environment.

66 CEN 4500, S. Masoud Sadjadi66 The 802.16 Physical Layer (2) Frames and time slots for time division duplexing.

67 CEN 4500, S. Masoud Sadjadi67 The 802.16 MAC Sublayer Protocol Service Classes Constant bit rate service Real-time variable bit rate service Non-real-time variable bit rate service Best efforts service

68 CEN 4500, S. Masoud Sadjadi68 The 802.16 Frame Structure (a) A generic frame. (b) A bandwidth request frame.

69 CEN 4500, S. Masoud Sadjadi69 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Wireless LANs Broadband Wireless Bluetooth Data Link Layer Switching Summary

70 CEN 4500, S. Masoud Sadjadi70 Bluetooth Bluetooth Architecture Bluetooth Applications The Bluetooth Protocol Stack The Bluetooth Radio Layer The Bluetooth Baseband Layer The Bluetooth L2CAP Layer The Bluetooth Frame Structure

71 CEN 4500, S. Masoud Sadjadi71 Bluetooth Architecture Two piconets can be connected to form a scatternet.

72 CEN 4500, S. Masoud Sadjadi72 Bluetooth Applications The Bluetooth profiles.

73 CEN 4500, S. Masoud Sadjadi73 The Bluetooth Protocol Stack The 802.15 version of the Bluetooth protocol architecture.

74 CEN 4500, S. Masoud Sadjadi74 The Bluetooth Frame Structure A typical Bluetooth data frame.

75 CEN 4500, S. Masoud Sadjadi75 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Wireless LANs Data Link Layer Switching Summary

76 CEN 4500, S. Masoud Sadjadi76 Data Link Layer Switching Bridges from 802.x to 802.y Local Internetworking Spanning Tree Bridges Remote Bridges Repeaters, Hubs, Bridges, Switches, Routers, Gateways Virtual LANs

77 CEN 4500, S. Masoud Sadjadi77 Data Link Layer Switching Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

78 CEN 4500, S. Masoud Sadjadi78 Bridges from 802.x to 802.y Operation of a LAN bridge from 802.11 to 802.3.

79 CEN 4500, S. Masoud Sadjadi79 Bridges from 802.x to 802.y (2) The IEEE 802 frame formats. The drawing is not to scale.

80 CEN 4500, S. Masoud Sadjadi80 Local Internetworking A configuration with four LANs and two bridges.

81 CEN 4500, S. Masoud Sadjadi81 Spanning Tree Bridges Two parallel transparent bridges.

82 CEN 4500, S. Masoud Sadjadi82 Spanning Tree Bridges (2) (a)Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

83 CEN 4500, S. Masoud Sadjadi83 Remote Bridges Remote bridges can be used to interconnect distant LANs.

84 CEN 4500, S. Masoud Sadjadi84 Repeaters, Hubs, Bridges, Switches, Routers and Gateways (a) Which device is in which layer. (b) Frames, packets, and headers.

85 CEN 4500, S. Masoud Sadjadi85 Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2) (a) A hub. (b) A bridge. (c) a switch.

86 CEN 4500, S. Masoud Sadjadi86 Virtual LANs A building with centralized wiring using hubs and a switch.

87 CEN 4500, S. Masoud Sadjadi87 Virtual LANs (2) (a) Four physical LANs organized into two VLANs, gray and white, by two bridges. (b) The same 15 machines organized into two VLANs by switches.

88 CEN 4500, S. Masoud Sadjadi88 The IEEE 802.1Q Standard Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.

89 CEN 4500, S. Masoud Sadjadi89 The IEEE 802.1Q Standard (2) The 802.3 (legacy) and 802.1Q Ethernet frame formats.

90 CEN 4500, S. Masoud Sadjadi90 Agenda The Channel Allocation Problem Multiple Access Protocols Ethernet Data Link Layer Switching Summary

91 CEN 4500, S. Masoud Sadjadi91 Summary Channel allocation methods and systems for a common channel.


Download ppt "CEN 4500 Data Communications Instructor: S. Masoud Sadjadi sadjadi At cs Dot fiu Dot edu Chapter 4: The Medium."

Similar presentations


Ads by Google