Presentation is loading. Please wait.

Presentation is loading. Please wait.

Medium Access Control Sublayer. Static Channel Allocation FDM TDM Wastage of resources when some of the users are idle. What if the number of users increase.

Similar presentations

Presentation on theme: "Medium Access Control Sublayer. Static Channel Allocation FDM TDM Wastage of resources when some of the users are idle. What if the number of users increase."— Presentation transcript:

1 Medium Access Control Sublayer

2 Static Channel Allocation FDM TDM Wastage of resources when some of the users are idle. What if the number of users increase

3 Dynamic Channel Allocation : Systems in which multiple users share a common channel in a way that can lead to conflicts are called contention systems.

4 Basic Assumptions 1. Station model : N independent stations. Once a frame has been generated, the station is blocked, does nothing until the frame has been successfully transmitted 2. Single Channel : All channel can transmit on it and all can recv from it. 3. Collisions : when more than one station try to transmit a frame and they overlap in time, both of them are garbled and we say that a collision has occurred. Both the frames must be transmitted again.. There r no errors other than collision

5 Basic assumptions contd… 4. Continous time / Discrete time 5. Carrier Sense/ No carrier sense

6 Multiple Access Protocols ALOHA (by Norman Abramson in 1970) – No carrier Sense Carrier Sense Multiple Access Protocols Collision-Free Protocols Limited-Contention Protocols Wavelength Division Multiple Access Protocols Wireless LAN Protocols

7 PURE ALOHA Continuous Time No Carrier Sense

8 Pure ALOHA contd… We assume that all the frame lengths are same because, it makes the study easier, and the performance of the system is best when the frames are of fixed size.

9 Pure ALOHA contd… Let N : average number of frames created a new per frame time G : average number of frames transmitted ( new frames + retransmission due to collision) per frame time Let both follow Poisson distribution I.e. for eg. Pr[k] = G^k e^{-G} / k! Is the probability of transmitting k frames in a given frame time.

10 Pure ALOHA contd… Throughput S = fraction of all the frames transmitted that escape the collision, per frame time For eg. If the throughput is 18% and If frame time = 1/100 sec Then though 100 frames can be transmitted in one second only (at most) 18 of them are transmitted successfully.

11 Pure ALOHA contd… S = GP_0 Average number of frames transmitted X the probability that it will not suffer a collision. Where P_0 is the probability that a frame doesn’t suffer a collision

12 Pure ALOHA contd…

13 Contd.. The frames that collide with the shaded frame are generated in the intervals to – to+t and to+t – to + 2t. Average number of frames generated in these two time intervals is 2G. Probability that no frame is transmitted in these two intervals is therefore e^{-2G}

14 Pure ALOHA contd… Since Pr[k] = G^k e^-G / k! Therefore, P_0 = e^-2G, for two frames and S = G e^-2G The max thruput occurs at G = 0.5 with S = 1/2e =.184

15 Slotted ALOHA S = G e^-G Max at G =1, with S = 1/e =.368 ~.37 Probability that a slot is idle = P_0 = 1/e ~.37 Hence 37% idle, 37 % success and remaining 26% collisions.

16 Slotted ALOHA contd…

17 Slotted ALOHA Higher values of G reduces the empty slots but increases collisions exponentially.

18 CSMA : Carrier Sense Multiple Access Protocols 1 – persistent CSMA when a station is ready to send a frame, it senses the channel : if busy : continuously sense it and waits for it to become free if idle : sends it (with probability 1)..hence the name 1 -persistent if collision : waits for random time and tries again

19 CSMA contd… Effect of propagation delay in CSMA – if signal from station A has not reached station B and station B is ready to send, it will sense the channel to be idle and send its frame. Collision can be there even when propagation delay is zero and carrier sense is also there – Two stations wait for a third station to finish and then transmit simultaneously.

20 1-persistent contd.. Better than Pure ALOHA but would have been better if the two stations were more patient.

21 Nonpersistent CSMA Less greedy than 1 persistent, hence better channel utilization but longer delays when a station is ready to send a frame, it senses the channel : if busy : waits for random time rather than continuously sense it for the purpose of seizing it if idle : sends it. if collision : waits for random time and tries again

22 p- persistent CSMA Applies to slotted channels Senses the channel when ready If busy : waits for the next slot If idle : sends its frame with probability p and defers it with probability q = 1 – p to the next slot : Note that it defers even when the channel is idle Repeats above until either it or some other station grabs the channel. In case some other channel grabs treats it like a collision I.e. waits for a random time and starts again

23 Comparison

24 CSMA/CD: CSMA with Collision Detection Suppose after a station has finished sending its frame, say at time to, other stations try to sense the channel for collision. In case, collision is detected, it refrains from transmitting, waits for a random amount of time and tries again. The above procedure is repeated until the station gets a chance to transmit its frame.

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

26 What should be the size of the contention interval? How long does it take for a channel to detect a collision (max time)? Let the time it takes for a signal to travel between the two farthest stations, say A and B, is t At t0, A starts transmitting. At t-epsilon, an instant before the signal reaches B, B also starts transmitting, collision occurs But the collided signal reaches back to A not before additional t time.. I.e. at an instant 2t-epsilon Hence it takes about 2t time for A to detect a collision Hence the contention interval must be 2t.

27 CSMA/CD contd.. If a station detects collision in the midway of generating its frame, it stops immediately rather than generating the entire frame. Widely used Also in Ethernet LAN.

28 CSMA/CD Collisions do not occur in CSMA/CD once a station has acquired a channel. However, the collisions can still occur during the contention periods.

29 Collision-Free Protocols Not used these days in major systems but possess some nice properties.

30 Collision-Free Protocols The basic bit-map protocol.

31 Performance Under light load, few frames and more contention slots, so overhead is high Let one time unit = time for contention bit slot Let one frame time = d time units Efficiency is roughly = d/(d+N) where N is the number of contention slots, assuming roughly 1 frame per N contention slots Under heavy loads, lots of frames, so overhead per frame is low, assuming N frames for every N contention slots, efficiency = dN/(dN + N) = d/(d+1)

32 Collision-Free Protocols (2) The binary countdown protocol. A dash indicates silence.

33 Channel efficiency = d/(d + log N) Disadv : Biased towards higher numbered stations

34 A Variation of Binary countdown – by Mok and Ward(1979) Use round-robin A station which has been served is numbered lower (say given lower priority) and others behind it are moved up.

35 Revisit p-persistent Protocol It is symmetric.I.e each station acquires a channel with the same probability p. Suppose k stations are contending probability that some station acquires the channel in a given slot is k p (1 – p)^(k-1) What should be the value of p so that this probability is maximum? Ans : p = 1/k and the max probability is ( 1 – 1/k)^(k-1)

36 Chances of success are good when k is small I.e. limited contention

37 Performance Comparison Contention Protocols Low delays, better channel efficiency at low load Poor channel efficiency at heavy load Collision- free Protocols High delays, poor efficiency at low load Better channel efficiency at heavy loads.

38 Limited- Contention Protocols Combine the benefits of both the strategies Divide the number of contending stations into groups stations in group 0 contend for slot 0 If one of them acquires, it transmits the frame Else, stations in group 1 contend for slot 1 And so on

39 Assign stations to groups dynamically Assign many stations to a group under light load ( slotted ALOHA types) Competition is more (actually light under light load) but the bit map and hence the overhead is less Assign few (may be one) station to a group under heavy loads ( close to bit map) Competition per slot is less but the bit map size increases but that’s fine because overhead per frame is not much under heavy loads.

40 Adaptive Tree Walk Protocol Think of the stations as the leaves of a binary tree

41 How far down the tree the search must begin? Does it make sense to allot slot 0 to node 1 at heavy load ? Assume that each station has a good estimate of the number of stations q contending at any point of time Further assume that the ready stations are uniformly distributed at the leaves of the binary tree.

42 At a node at level i the expected number of ready channels under it is q/2^i Intuitively, the optimal level to begin search is the one for which q/2^i is 1 I.e. i = log q.

43 WDMA: Wavelength Division Multiple access : MAC sub-layer in optical networks The spectrum is divided in to channels (wavelength bands) Each channel is divided into groups of time slots Each station is assigned two channels Narrow channel – control channel Wide channel – data channel

44 Contd.. There is no relation between the number of time slots in the control channel (say m), the number of time slots in the data channel (say n + 1) and the number of stations. Each data channel has one slot as the status slot.. Which tells other stations about its free slots. A station might use zero, one or more of the time slots in data or control channels.

45 More topics for presentation(1 person each) MAC Sublayer in Optical Networks. MAC Sublayer in WLANs (802.11) MAC Sublayer in Broadband Wireless(802.16)

46 Wavelength Division Multiple Access Protocols Wavelength division multiple access.

47 3 types of traffic Constant data rate CO traffic variable data rate CO traffic Data-gram traffic

48 Dynamic WDMA contd… Each Station has two transmitting channels and two receiving channels as follows : Fixed wavelength receiver for listening to its own control channel Tunable transmitter for sending on other stations’ control channels Fixed wavelength transmitter for outputting data frames Tunable receiver for selecting a data transmitter to listen to

49 Variable Data Rate CO traffic Connection is established to exchange control information but not for data. “There is a frame for you in slot 3” Collision in establishing a connection in the control slot : no problem  try again Problem is : 2 stations establish connection with B say in slots 4 and 5, but both send “There is a frame for you in slot 3” …. B chooses one of them by tuning itself to one of them and the frame from the other is discarded.

50 Constant Data Rate COO A connection is established in a data slot also When A asks for a connection it also says something like : Is it all right if I send you a frame in every occurrence of slot 3. If A is free in that slot, a guaranteed bandwidth connection is established

51 Data-gram traffic Instead of writing a CONNECTION REQUEST message into the control slot, it writes data for you in slot 3. No connection is established even in control slot. If B is free during that slot, it accepts the frame else it is lost. Whichever slot is found free is used to send a control message.

52 MAC Sub-layer in Wireless LANs There is a fixed base station

53 Wireless LANs (a) Bluetooth configuration (b) Wireless LAN

54 WLANs contd.. Unlike cellular system, each room or LAN has only one channel, covering the entire available bandwidth and covering all stations in its cell. It is important to know that in WLANs not all stations may be within the range of one another.

55 Can we use CSMA? Hidden Station Problem Exposed Station Problem

56 Wireless LAN Protocols A wireless LAN. (a) A transmitting. (b) B transmitting.

57 Problem near the receiver CSMA only tells problem near the sender and not near the receiver.. The point is scene near the receiver may be different from the scene near the sender.. Which was not the case in traditional wired (Ethernet type) networks.

58 Simultaneous transmissions are possible in WLANs In contrast to wired (Ethernet type of) networks.

59 Wireless LAN Protocols (2) The MACA protocol. (a) A sending an RTS to B. (b) B responding with a CTS to A.

60 MACA : Multiple Access with Collision Avoidance A sends an RTS (Request to send) – a short frame (30 bytes long).. It contains the length of the data frame that will follow. B sends CTS (Clear to send) – again a short frame.. Also containing the length of the data frame (copied from RTS) On receiving CTS, A starts transmitting

61 Effect of MACA on other stations Suppose C is in the range of A, hence hears RTS.. Must wait until A receives CTS else will collide with CTS Suppose D is in the range of B, hence hears CTS.. Must wait until B receives the data frame.. From the length of the data frame(contained in the CTS).. the time for the data frame is estimated

62 Collisions may still occur When two stations try to send an RTS at the same time to the same station. In case of collision, sender waits a random time and starts again later. Binary exponential backoff method is used.

63 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

64 Data Link Layer Switching Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

65 Why LAN of LANs? Each deptt : own LAN Each buliding : own LAN Each discipline within a deptt : own LAN to accommodate the load For more reliability : if there is a single LAN in the entire organization and, at time there is a node which is generating frames continuously, it will cripple the entire LAN.. By keeping multiple LANs one can save the rest of the nodes. Security : rather than promiscuous mode use intelligent bridges on the gateway.

66 Bridges from 802.x to 802.y Operation of a LAN bridge from 802.11 to 802.3.

67 Difficulties in bridging 802.x with 802.y Requires reformatting – takes CPU time, new checksum => possibility of errors due to bad memory bits in the bridge’s memory. Difference in speed may lead to Swamping Different max. frame length : splitting n assembly is generally not done in the DLL.. Frames that are too large for the next LAN to handle are dropped. Security

68 Bridges from 802.x to 802.y (2) The IEEE 802 frame formats. The drawing is not to scale.

69 Local Internetworking A configuration with four LANs and two bridges.

70 Routing in Interconnected LANs Use MAC Address A hash table of MAC address is maintained : (dest., outgoing LAN) Initially empty Initially flooding Learns about a node when a frame comes from it – backward learning. Entries updated and purged from time to time

71 Routing in Interconnected LANs If destination and source are on same LAN, discard If on different, forward If destination LAN is not known, flood

72 Problem of parallel bridges between 2 LANs  cycle Two parallel transparent bridges.

73 Spanning Tree Bridges (2) (a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

74 Remote Bridges Remote bridges can be used to interconnect distant LANs.

75 Repeaters, Hubs, Bridges, Switches, Routers and Gateways (a) Which device is in which layer. (b) Frames, packets, and headers.

76 Repeaters and Hubs : Physical Layer They do not understand frames, packets or headers, understand only volts. Repeaters amplify the signal and pass it onto the next LAN.. No collision Hubs do not amplify.. They broadcast the signal they receive to all the nodes.. If two or more nodes try to send at the same time they collide.

77 Switches and Bridges : DLL Bridges connect LANs, Switches connect individual machines. In switched collision, each node has its own port, own buffer space etc. In Bridged networks, Collision may occur in individual LANs Both do routing Today, there isn’t much difference between switches and bridges and they are used interchangeably.

78 Repeaters, Hubs, Bridges, Switches, Routers and Gateways (2) (a) A hub. (b) A bridge. (c) a switch.

79 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.

80 The IEEE 802.1Q Standard Transition from legacy Ethernet to VLAN- aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.

81 The IEEE 802.1Q Standard (2) The 802.3 (legacy) and 802.1Q Ethernet frame formats.

82 Summary Channel allocation methods and systems for a common channel.

83 MACAW (MACA for wireless) by Bhargavan et al Some improvements over MACA. Ack for successful transmission was introduced. Carrier sense was introduced so that if one RTS is in progress another station abstain itself from doing so.



86 I Acknowledge Help from the following site In preparing this lecture.

Download ppt "Medium Access Control Sublayer. Static Channel Allocation FDM TDM Wastage of resources when some of the users are idle. What if the number of users increase."

Similar presentations

Ads by Google