 What we will do is, today's plan is to start off with wireless LANs, which is the other side of the story of wireless networks. And then towards the end, we can go back to looking at applications and related the topics. Okay, so if you see, in the last class, we looked at what are the factors for designing wireless networks and we arrived at this cost as the key factor, right? So then we went on to see that, how does this cost impact the design? We found that, you know, licensing played a major role, right? Because licensing was so expensive, we discovered that, you know, GSM had a goal of maximizing the utilization or what is called the spectral efficiency of the system, right? So that was a key requirement in the GSM system. So that's why GSM went on to do something like, you know, 25 megahertz of channel, 125 channels, 8 slots and you know, it was a very efficient system. There was control channels, there were, suppose we operate in the license spectrum, what are the key considerations, right? So today we are going to ask the question, suppose we are operating in the unlicensed spectrum, right? So then what are the key considerations? Okay? Now what is the single key consideration, no reliability? All these are standard, they all, in all your systems, these are considerations, right? See the way we want to think about this is, we want to come up with that one or two key points on which we need to focus, right? If we try to focus on everything, then we are not going to get anywhere. Standards. So there must be something different from operating in the license spectrum to the unlicensed spectrum, correct? Reliability is an important consideration there also, maximizing the number of concurrent user support is important there also, right? Interference, error, QoS, right? So what is the key consideration? See yesterday it was cost, right? Today also it's cost. The key consideration is always cost, except that yesterday's cost was the spectrum, right? So in a GSM system, in a license spectrum, since we are paying so much money for the spectrum, the spectral efficiency or to be able to extract the maximum amount of users, to be able to pack the maximum number of users into the system, that is our key constraint, right? So having more expensive equipment is kind of acceptable, right? What is the cost of a base station? Example, your base station costs about upwards of $10,000, right? $10,000 to $100,000, okay? Handset upwards of $20, right, or let's say $100, okay? So that's typically your cost, which you are having in your license spectrum system, okay? So now the same thing when we look at in an unlicensed spectrum, what becomes the key thing? So efficiency was the key requirement in your GSM type of system, okay? What is the key requirement in keep the cost low and then keep, simplicity is the key requirement, okay? So here, simplicity becomes the key requirement because the simplicity of design implies lower cost equipment, correct? That's kind of the cost that we are talking about here. So we have brought the cost down by almost two, three orders of magnitude in going from this system to this system, correct? What is the price that we pay? Efficiency, right? Efficiency. Efficiency is generally the price that you will pay in such a system, but does it matter to you so much? Why not? Yeah, we are not paying for the spectrum, right? It's a free spectrum. So if it is free, it doesn't matter if you waste some, correct? So that is basically the philosophy that is being applied here, that the efficiency is not so important because I have a lot of bandwidth. So here, for example, here you had 25 megahertz of bandwidth, right, 25 megahertz of spectrum, whereas here you have 83 megahertz of spectrum to play around, right? So you have 83 megahertz of spectrum and it doesn't matter how efficient your system is, right? So later on, we will do a calculation to find out exactly what is the efficiency of the Wi-Fi system also, okay? Once we have understood how it operates, we will do that calculation to find that out. That we want to design as simple a system as possible from where do we start, we start from what we know, right? We always start from what we know, we try to see that, okay, I already have Ethernet, can I take Ethernet and make it wireless, okay? So that is where we start. So let's see, how are wireless LANs different, right? So one of them, the key thing is that destination address does not equal to the destination location, right? When you are trying to go from Ethernet to the wireless LANs, you will find that because of mobility you might move from one subnet to the other, we need to be able to take these things into account, okay? Media is going to impact the design, right? Wireless LANs are intended to cover geographical distances and we have to worry about handling mobile stations for various propagation effects, mobility management, right? Power now becomes an important consideration. Power was not a consideration when we were dealing with desktops, right? But now we have to worry about putting the devices into power save mode, waking the device up from the power save mode and so on, okay? So before we get into all that, let's just see what are the characteristics, key characteristics that are different. Now this is nothing new for you, it's basically a more or less a recap of what we have been talking about, okay? The physical layer in wireless networks is basically going to use a medium that is neither absolute nor readily observable boundaries, right? Because it's going to be kind of fuzzy. It's not like you know where exactly the wire terminates and what goes on after that, correct? It's unprotected from outside signals and communicate over a medium which is less reliable, all these things are fairly straightforward, okay? So the key question that we are asking here is can we apply methods from fixed networks to arrive at the wireless or the Wi-Fi medium access mechanism, okay? So the easiest one that we can try is CSMA CD. So let's do this a little bit quickly, okay? So what we are trying to do is just to quickly recap how CSMA CD works. If you have a bunch of stations on a wire, so what is the key idea? Listen before transmit, right? That is CSMA, CS corresponds to carrier sensing basically means listen before transmit, right? If the medium is free for a certain amount of time, only then you are going to attempt to transmit on the medium, correct? MA is just multiple access and CD is collision detection. How do you detect collision? Listen while transmit, right? You listen before transmit and you also listen while transmit, okay? So if what you say is not what you hear then you know that there is a collision, okay? Right? So what you speak not being the same as what you hear then you are going to infer the collision, okay? What are the key things? There are two key assumptions in Ethernet. What are they? There are two key assumptions or key numbers because of which this whole thing works, right? Minimum, so one is called the minimum frame size. What is that? 64 bytes. The other one, maximum, maximum segment length. We know that these numbers exist. Why do these numbers exist? So the key reason is that when I am going to put a packet onto the wire here, right? When I put a packet onto the wire here, it is going to have some finite amount of propagation delay before it reaches this point, correct? The same way it may happen that both A and C are sensing the medium at the same time and both of them may find the medium to be free. So both of them may decide to put a packet onto the medium sending it towards B at the same time, right? So in Ethernet, in order to be able to detect the collision, if we put a very small packet, if we just write a couple of bits, then what will happen is you may just be able to write the bits and you may be able to hear the same thing at the same time and you may assume that everything is fine whereas when the bits arrive at the receiver there may be a collision, correct? When the bits arrive at the receiver, you may have a collision. So that is why you do, you have this notion of a minimum frame size saying that you have to have 64 bytes as the minimum number of bits that you are going to put on the medium. Even if you have only 2 bytes worth of data, you have to pad it up and you have to speak for a certain minimum amount of time. What is the logic behind that? Correct. So the main thing is not the final destination but the first bit. So there should be 2 times tau. So this is the propagation delay of the, for that duration. So 2 times tau of transmission time should be there. So all these things 64 and 100 they are all tied to each other, right? If you had said 50 meters then you could have a smaller minimum frame size, right? If you want to go to a longer range, if you want to go for 200 meters then you will have to increase the minimum frame size, okay? So these 2 are tied to each other because you need the first bit to go up to the other end, not only do you need the first bit to go up to the other end, right? You also need the collision signal to come back, right? So that is why you have a 2 times the round trip time, right? Your first bit has to reach to the other end. That guy has to detect that there is a collision and he has to send back a jamming signal so that you can now detect that there is a collision, right? So there is a 1 time tau in this direction, there is another time tau in the other direction. So 2 times tau is the minimum transmission duration, right? So depending upon what is the length of the segment that you want to choose you arrive at the minimum frame size, okay? So now the question is whether the same mechanism can we just import this mechanism straight away into wireless? If we can then our job is done, right? So that is what we are trying to see here, right? So CSMACD basically says send as soon as the medium is free, listen to the medium and if a collision occurs then you back off, right? So what is the problem here? Signal strength decreases proportional to the square of the distance, sender would apply CS but the collision happens at the receiver, right? Is there an example here? Is there a figure? Okay. Okay. So basically what is happening is A is trying to send data to B, okay? When A is trying to send data to B it happens that suppose C also tries to send data to B at the same time then what could happen? A collision will happen, right? I do not know what happened to that slide, I had a slide, I think it is there somewhere ahead, okay? So let us do it on paper itself, okay? So what we are saying here is the same ABC we have taken now except that we have made them kind of wireless devices, right? So I need a, that is okay, let us just do it. So I have A which has a certain range, right? I have B which is in A's range and I have C let us say which has a different range, okay? So now what is happening is A is trying to transmit something to B and C is also trying to transmit something to B, right? So since the key thing is first is A and C are out of range of each other, right? Because A and C are out of range of each other. So in wireless when you show a line between two terminals that means they are within range of each other, right? You do not want to keep drawing circles and hexagons all the time, right? So when you just draw a line between A and B it means that A and B are within hearing range of each other, right? A and C are not within hearing range of each other. So now what happens is if A and C are out of range of each other, A is going to do carrier sensing, A finds that medium is free, C also finds the medium free, right? Because both of them have transmitted to B, the collision has happened at B, right? And neither A nor C can hear the collision. What this means is your collision detection fails, okay? Why can't A or C hear the collision? Because they are out of range of each other, right? It is basically this one guy is talking to B from this side, the other guy is talking to B from the other side. So since they are both out of range of each other, neither A nor C is able to hear the collision, right? This is fairly straightforward. How do we fix this? Yeah, so we are going to avoid the collision, right? So what we want to do is avoid collision. How? Hand shake. By hand shake or what is the whole hand shake mechanism attempting to do? It's not clearing the area. What is it exactly doing? It's trying to reserve the medium. You're trying to reserve the medium in some sense, right? By reserving, by attempting to reserve the medium, right? Okay, so some kind of reservation mechanism. Now we should not get stuck in the exact way in which this is happening, right? In this case, it is RTS, CTS whatever that is called. But basically what is being attempted is that we want to reserve the medium for a particular communication at every given point of time, right? So how do they do that in 802.11? What they do is given that A and B want to transmit to each other, A sends something called an RTS packet, okay? RTS stands for request to send, right? So this RTS packet is received in all the areas around A, right? So D which is on this side of A is able to hear the RTS packet, right? On receiving the RTS, B is going to respond with a clear to send, okay? Which is your CTS. So when B sends the CTS, what happens? Yeah, C is going to hear the CTS. So C knows that A and B are in communication with each other. So C is going to keep quiet for some time, right? C hidden node C over here is the CTS and keeps quiet, right? So what is the key here? The key here is to be able to include the transfer duration in both the RTS and the CTS, right? So if you look at the RTS and CTS packet, otherwise I do not know how long to keep quiet for, right? So including this transfer duration in both the RTS and the CTS is important. So how do we include that? What is the RTS packet contain? The RTS packet will now contain the source address, destination address and the duration of the transfer, right? It is going to contain the duration of the transfer, okay? Then it turns out that there is something called an exposed node like D for example is called the exposed node. C is called the hidden node from A, okay? Because C also wants to talk to B at the same time as A. D on the other hand may be wanting to talk to some other node on this side, correct? So that is why D is called the exposed node. See so when we are having two nodes A and B, A, B and C, right? When both of them want to transmit to B, this is the hidden node problem. Hidden node or hidden terminal goes by various different ways, various names, okay? So how is this solved? This is solved by you send an RTS, okay? We will send RTS A, B, 10 milliseconds, right? So B will send a CTS, again B, A, 10 milliseconds, okay? So this could be in terms of 10 milliseconds or it could be in terms of data. It may even, you may even say that 1 KB, okay? So depending upon the data rate, you can either give it in terms of time. So either you can give it in terms of time, number of bytes, okay? Both of them are possible in your RTS packet, okay? So RTS CTS and then you send the data. So you send the data from A to B, correct? So what happens as a result of this is that the hidden node C is going to keep quiet for the duration of your transfer, correct? So the exposed node is a different thing. So exposed node problem is like this, okay? So now this communication is happening, ABC communication is happening on that side. It turns out that there is a D here who wants to talk to E, okay? Now because A has transmitted the RTS packet, right? So A's range is going to include D, right? So because A has transmitted the RTS packet, D is forced to keep quiet, right? So RTS from A causes D to be silent, that is called the exposed node problem although D wants to talk to somebody who is on the other side. See D's transmission is not likely to interfere at B, right? D's transmission is not going to interfere at B because it is not in range of B, right? So the receiver is slightly far away from the transmitter. So D's transmission is going to interfere at A, yes or no, yes? But both D and A are transmitting at the same time, correct? So it does not matter if another guy stands here, it is basically like I am standing here talking to this group of people, somebody else stands here talks to a different group of people, it is okay, right? So that is basically what the exposed node problem is trying to say that if you have two sets of transmitters which are close to each other, that is not going to create a problem, but if you have one transmitter and one receiver which are close to each other, then the receiver is going to see interference, okay? So how do we solve this exposed node problem? So are you convinced that this solves the hidden node problem? Okay? So in order to solve the hidden node problem, it is so straight forward, right? It took people a long time to figure it out. Let us say all these answers, once you know the answer it becomes very simple, right? Mathematicians say, right? Either it is obvious, either the proof, either it is not possible to prove it or the proof is obvious. Once you know how to prove it, it is obvious. So it is the same way here, it is very straight forward. Once you know that, okay, there is an RTS-CTS mechanism, it took a few years to figure this out, okay? So how do we solve the exposed node problem, okay? So there is one thing which I have not told you, D will not be able to listen to the CTS, you know, okay, we will come back to it one minute. So there is one thing which I have not told you in this hidden node problem, RTS-CTS business. What is that? Acknowledgement, right? See, finally it is not enough to just do this, you have an ACK also. Because it is an unreliable channel, okay? Because the wireless channel is inherently unreliable, once A sends the data to B, B has to eventually send back an acknowledgement to A, right? So that is when, so this is what is called your frame exchange sequence. Frame exchange sequence, right? Send the RTS, get the CTS, send the data, get the acknowledgement, okay? So this four part frame exchange sequence is the key thing here. In fact, I think it may be there on the next one, okay? So is it clear how the RTS-CTS business is working out, alright? So the first thing, the first one and the second one are more or less the same, right? RTS has the destination ID, so you are going to, so D can discard the RTS or it is the same as D hears the RTS but does not hear the CTS, so D can send the RTS to E. In fact, all the three solutions are more or less the same. I did not hear the CTS, but I heard the data, so I can send the RTS to E, right? So what is the problem with these solutions, okay? So what is happening? C in terms of D, E, A, B, C, right? So if you try to draw this as a time diagram, what is first happening? You are sending RTS, correct? You send RTS to B, B is sending the CTS, right? So D is waiting to hear the CTS for a certain amount of time, it does not hear the CTS. So we say that let D send an RTS, okay? So let us say this CTS timeout, we set up something called a CTS timeout and we say that D sends the RTS at this point, right? When A is sending the data, right? A is going to send the data, see this is the key thing, right? So A is sending the data which may arrive at D but D is not listening at that time, D is also transmitting its RTS at that time. So D is waiting for a CTS from E, so E has heard the RTS, E is sending the CTS, okay? What happens to the CTS? See this data transmission is still on, right? D cannot hear the CTS, right? D cannot hear the CTS because A has started data transmission. Even though we are saying that both A and D can transmit at the same time, if even for a short duration it has to flip to becoming the receiver, right? You are going to lose that information, okay? So that strategy does not work because the CTS is going to collide with this data here. So D is going to lose the CTS. So if we are using the same frequency, what he is saying is if we are using the same frequency then we will not be able to send, two people will not be able to send the data at the same time. So let us try to tweak the protocol a little bit, no? Suppose I say that instead of D sending RTS, D sends the data directly. Why should I always send RTS, CTS? I could send data directly. Suppose I know that there is no other transmitter or receiver in that area. See what I am trying to get at here is the way one needs to think through all these things, right? It is not very straightforward to arrive at a solution to any of these given problems, right? So suppose we were to send data, then is it necessary first of all always to send RTS, CTS? Okay, why are we doing this? I hope everybody is understanding why we are doing this. See why we are doing this is because in this case if D were to keep quiet we are going to lose some throughput in our system, correct? We are having only one conversation. So we are trying to see if it is possible to have more than one conversation simultaneously because the two receivers are far away, thereby increasing the throughput of the system, right? That is the whole attempt because A2.11 is already known to be very inefficient. So as a result of trying to do that we have been trying to work out a solution to the exposed node problem and we find that we cannot use RTS, CTS in by both the transmitters, right? Even A is doing RTS, CTS if D also starts attempting to do RTS, CTS it is not going to be able to hear the CTS, correct? So the next question we ask, next logical question to ask is can I avoid D from sending the RTS? If D can start sending data then it is fine. So that is why we are asking this question, is it always necessary to send RTS, CTS? So RTS, CTS is an overhead if the data is very small. So when the data is very small it is better to simply send data. Can we guarantee, can RTS, CTS guarantee that there will be no collision? For the data they can guarantee that there will be no collision but they cannot guarantee collision because RTS itself may collide, right? That is why it is called a collision avoidance mechanism, ok? You are only trying to avoid the collision. You cannot prevent the collision from happening, ok? So the RTS itself although it is a very small probability event, right? Even though it is a very small packet and it is highly unlikely that two RTSs will collide but still it is a non-zero probability event, ok? So RTS itself may collide, ok? This is a low probability. So that is the probability on which you are banking. So basically what we are saying is if we have very small amount of data, if we have very small amount of data which may be comparable to the size of RTS then we might as well take a chance and send the data directly instead of sending the RTS, sending the CTS and then sending the data, ok? So now can we say, can we go back to this and can we say how to attempt solving the exposed node problem? So suppose D has very small amount of data to send, correct? Suppose D has very small amount of data to send then instead of RTS D can send the data. Does that work? So what we are saying is instead of RTS now D is also going to send data. Acknowledgement. Acknowledgement has to still come back, right? So there is a notion of an acknowledgement. So there is an act which will come from E, right? If this act comes before while A's data is being still transmitted then what happens? Again the act will get lost, ok? If the act comes back from so I have to really size the amount of data that I am sending, right? When this act is coming at that time if this act also comes then both A and D are receivers, both of them will be able to receive, right? But if this data is if the data that D is sending is gets over much before A's data then D is going to lose the act because this transmission will still be going on, that makes sense? Because the A's data transmission is still going on D is going to lose the act, right? So what we say is if so the small data what we are saying, so if A if D has very small amount of data to send then it can attempt to transmit along with A's data. Does that solve the problem? See do not just nod, it is not solve the problem yet. So we have fixed one by one we are fixing the problems, right? Let me recap what we are saying here. What we are saying here is if A is going to say initially the first solution we tried was when D does not hear the RTS it assumes that it is an exposed node sorry when D does not hear the CTS it assumes that it is an exposed node and it can attempt to transmit the RTS to E, correct? That solution did not work because we discovered that there will be a CTS collision at D, correct? CTS at D and data from A are going to collide, correct? So we said okay let us see if we can abandon the RTS CTS mechanism and directly have D send the data, okay? Now we are saying that D is going to directly send the data at that time again we discovered that if the size of the data is too small then the acknowledgement from E is going to collide at D, right? If the size of the data is too big whose acknowledgement will get A, right? If the size of this data is too big let us say if D is going to transmit for a very long time then this acknowledgement will get lost, right? So either this acknowledgement will get lost or this acknowledgement will get lost depending upon the different sizes of the data that is being transmitted. So if D is transmitting for very short amount of time then D zone acknowledgement will be lost, if D is transmitting for a long time then A's acknowledgement will get lost, okay? So then finally we discover that we have to size this data very, very precisely. Is that possible for us? Correct, that is possible for us because the RTS, the original RTS that was there, right? That has the information of what is the size of the data. So given that I know what is the size of A's data I can size my data accordingly so that both the acknowledgements are coming in simultaneously, right? Does it solve the problem? There is still one more catch left, seems to have solved it. What is it that we have forgotten, okay? Let us go back to this kind of a figure, right? If you look at this figure, what is the key requirement for this whole thing to work? E has to be away, correct? So E has to be in this direction, right? Suppose E were here then what will happen? Then E will become a, then A and D will become hidden nodes for E, correct? If E is here let us say if E happens to be between A and D then both the transmissions are going to collide, correct? How does D know where is E? Does D know that E is on this side or on that side? So wireless medium, is that makes sense what I am saying? D has no way of really knowing, D only knows that I heard the RTS, I did not hear the CTS, okay? D has no way of knowing that my intended receiver E, where is my intended receiver E in any of this area? So the intended receiver E is in a direction away from A then I can attempt to do this multiplexing of the two data, right? D is called the exposed node, okay? D is called the exposed node. D can determine that it is an exposed node because it heard the RTS, it did not hear the CTS, okay? Any node which heard the RTS but did not hear the CTS can know that I am an exposed node, okay? So it knows that okay, I can talk if I want to but still it does not know in which direction E is, okay? How do you fix this, okay? So this is not yet been fixed. So this is an open research problem yet, okay? There are a bunch of solution attempts which are being made but this problem, so the exposed terminal problem continues to exist, okay? So people have attempted to put GPS on this, people have attempted to do different kinds of suggestions but there is no satisfactory solution to fixing this problem yet, okay? So it is a good area to look at, of course there are lots of proposals, so it is not also that easy to come up with a solution immediately but it is a good area to look at for problems, what are MTech level problems or PhD level problems. So what is the way of checking position, how do I know the location, there really is no clear answer to that, right? I can have signal strength measurements, okay? But I cannot get really direction measurements, direction measurements can be got only if I have at least three points of reference, right? So without having three points of reference I cannot get direction measurements, okay? So most of these things assume that the rate of mobility is far less than the packet exchange duration, right? So by the time I finish exchanging the packet for that particular instant you may be considered to be static, that is the only assumption under which this whole thing works. So that is basically the hidden and the exposed terminal problems, okay? So if you want to take a shot at solving the exposed terminal problem then it is a very interesting area to look at, okay? Try out the various combinations and see if any of them really solves everything. So is it not possible, so the question is is it not possible that all the nodes can coordinate with each other and come up with a schedule, correct? So that is possible, of course it is possible, that is what GSM does. So the question is how much do we want to move away from Ethernet? You remember that that is a constraint under which we are trying to come up with the solution. If we get a clean slate design we can always do something very nice, but this is saying that okay I have Ethernet I want to move it as little as possible to arrive at a new solution. We do not have the freedom or the luxury of doing something else altogether, right? So there is a mode in 802.11 itself which is called the PCF mode, okay in which there is an access point which says okay now you speak, now you speak, now you speak, okay? Then you do not need RTS, you do not need CTS, you do not need any of these things, okay? So what we are trying to see is what is the minimum that we should move? So the minimum that we should move we have discovered is that we do RTS, CTS, right? And we live with the exposed terminal problem. So there is a lower deficiency because the exposed terminal cannot transmit upon hearing the RTS, okay? So we live with that problem, okay? So just to get some terminology across, so this mode is called the DCF mode where you have multiple stations transmitting within what is called a basic service set, okay? So this is not very important to know this terminology exactly, but still it is commonly used terminology, okay? So there is another mode of 802.11 in which there is an access point and the stations talk through the access point, okay? So in this mode it is possible that let us say you have two stations, so the access point will pole, so this is called the polling mode. So the access point will pole the station, see whether it has data, once this guy transmits then it will pole the station, okay? So there is no question of collision here because the access point is going to control the medium access, okay? Is that making sense? Okay? Forget about all these things which are written here, they are just for information, okay? So how does it look in the stack? So if you look at the mobile terminal, the mobile terminal is going to have 802.11 MAC and 802.11 Phi, okay? The Phi is direct sequence spread spectrum what we saw towards the end of the day yesterday. So the same direct sequence spread spectrum technique is used as the Phi here, okay? The MAC is CSMA CA, right? So the MAC is CSMA CA and at the access point you have to do both, right? One side of the access point is going to talk 802.11, so this is the interface of the access point which is going to talk .11 to the mobile terminal and this is the other interface of the access point which is going to talk Ethernet to the rest of the network, okay? So the access point has two interfaces, one speaking .11, the other speaking .3, okay? So we have already talked about reliability, basic idea is that RTS, CTS, data and acknowledgement has to be passed, okay? When we talk of a general CDMA system, we have multiple codes, okay? .11 uses a single code because you also want everybody to hear each other, correct? So in a CDMA system if you think of it as a point to point system, so I am using one code to talk to you, I am using another code to talk to this person, okay? So which means that he cannot understand what I am saying to you but 802.11 what we want is a LAN. So if you want a LAN then we use a single code for communication with everybody, okay? So that is called a Barker code, okay? .11 uses what is called a Barker code. So there is no notion of orthogonality or anything, it is the same code which all the stations are using, right? So it is a CDMA system but there is only one code so that everybody can hear each other, so which causes other problems, right? So we are only using the spread spectrum property of the CDMA system. So the question is what factors decide the range of Wi-Fi? So in GSM we saw that it is the farthest range that was deciding. In Wi-Fi what could be the factors? See remember look at it from this point of power, right? It is an unlicensed spectrum. So if you are start screaming in the unlicensed spectrum you are going to cause lot of interference for everybody else who is also operating in that spectrum, correct? So power is the key thing which decides the range. Now who decides the power? Regulatory authorities, okay? So the regulatory bodies are going to say that an access point cannot transmit beyond 1 watt, okay? So 1 watt is the maximum, what is called the EIRP rating of the access point, okay? 100 milliwatts is the maximum rating for your wireless card correspondingly if you see your cell phone can transmit at 1 watt. So your access points transmit power and your cell phones transmit power are more or less equivalent, okay? So the base station is even 10 times more than that, right? Who decides these numbers? The regulatory authorities decides the numbers, okay? So let us come back to look at how the CSMA-CA mechanism really works, okay? So what we find is let us say this is a station. Now this station wants to transmit something on the medium, okay? So this is the point when the station wants to transmit something on the medium. Can it start transmitting immediately? As soon as I have data to send, can I start transmitting immediately? No, correct? I cannot transmit immediately because somebody else may be transmitting, somebody else may be in the middle of an RTSCTS exchange, right? So I have to work for a, wait for a certain minimum amount of time to ensure that the medium is free before I start transmitting, okay? So that is the first point. So that time is called a DIFS period. So there is a notion of what is called a DIFS time. DIFS basically stands for distributed interframe spacing, that is not important, okay? All that you need to think of it as a time for which you have to be silent, the medium has to be silent before you can start transmitting, okay? So it is of the order of 50 microseconds, okay? So you wait for 50 microseconds. If you see that the medium is free for 50 microseconds, then you can transmit, okay? Now if the medium is not free, then you have to wait and you have to again, once the medium gets free, you wait again for a DIFS amount of time, okay? That is the basic idea of transmitting. So if the medium is free for the duration of an interframe spacing, you can start sending, okay? If the medium is busy, then the station has to wait, right? So now let us do an example. This is the basic idea of how this business works, okay? Okay, so let us do an example here. So this example is from the book. All these red arrows indicate arrival of packet at the station from the higher layer, okay? So when there is an arrow here, this means station 3 has a packet to transmit at the medium, transmit on the medium at that point of time, okay? So this means that station 2 has a packet to transmit on the medium on that point of time. This is station 5, this is station 2, okay? So what happens which is the one that comes first? Station 3 comes first, okay? Station 3 waits for DIFS amount of time which is 50 microseconds, okay? Then it starts transmitting. So in the meantime, what has happened? In this 50 microseconds, what has happened? Station 1 has got data to send. It senses the medium, it finds the medium free force something like 10, 15 microseconds and then the medium becomes busy because station 3 has started transmitting, correct? So station 1 has to wait. Same way station 5 gets data. When station 5 has data, it is going to find that the medium is busy, station 5 has to wait, correct? Similarly, station 2 has to wait, okay? So now what is happening in the system at this point of time is that there is one station which is transmitting and three other stations which are waiting for an opportunity to transmit, correct? So now what will happen if these three other stations start transmitting immediately after this guy finishes, right? You are guaranteed that there will be a collision because there are three people waiting. If all of them start speaking, like somebody is waiting to ask me a question, if everybody starts asking the same time, you are guaranteed that there will be a collision, right? How do you solve the problem? You wait for some kind of a random amount of time in addition to the DIFS time, right? So you wait for 50 microseconds and then you wait for random few more microseconds here and there so that you can stagger the transmission on the medium, right? So that is what is called your randomized backoff mechanism. So this is what is shown here in this red area, okay? So what you are saying is that I will wait for an additional 50 microseconds and plus a certain random number of slots, okay? So the each slot here is 10 microseconds, okay? So you wait for a certain number of slots in addition to the 50 microseconds. Different people are going to pick different numbers here, correct? Since different people are picking different numbers, hopefully the system will work, okay? So that is what has happened. So let us see. So as a result of station 1, 2 and 5 are going to pick up some kind of backoff numbers, okay? So here are the questions here with respect to backoff. Out of what interval should I pick, right? Should I pick a number from 0 to 7? Should I pick a number from 0 to 1, 0 to 4, right? What is the implication? If I pick from 0 to 7 then chances of collision will increase if there are more stations that want to transmit, right? If I pick a number from 0 to 7 and there are 8 stations that want to transmit then I am guaranteed that 2 of them will pick the same number, correct? On the other hand if I pick a number from 0 to 1, 0 to 4 then I am going to wait for that much longer and I am the only guy who is transmitting, right? If I am the only guy who wants to transmit I still have wound up picking a number from 0 to 1, 0 to 4 that means I am waiting for 1000 slots unnecessarily. So I am wasting time on the medium, right? So that is why we pick this random backoff from a range of 0 to 7 initially, okay? From a range of 0 to 7 initially and then depending upon collisions we are going to do something, okay? So let us put some numbers here, give some numbers to these guys. Let us say station 2 is picking up a backoff value of 3, station 5 is picking up a backoff value of, just write down somewhere, station 2 has picked up a backoff value of 3, station 5 has picked up a backoff value of let us say 4 and let us say station 1 has picked a backoff value of 6, okay? So these are in a 0 to 7 interval, correct? So what happens after that? Once this station 3 has finished transmitting, okay? So once the station 3 has finished transmitting, all these stations are going to wait for this DIFS amount of time and then the backoff counter is going to start counting down, correct? Whose backoff counter finishes first? Station 2 is going to finish counting down, right? What is the value of station 1's backoff counter at that point? 6 minus 3, okay? So station 1's residual backoff, what is called the residual backoff is 3, correct? Station 5 is, see as soon as station 2's backoff finishes, station 2 is going to start transmitting, correct? So when station 2 starts transmitting, what do stations 1 and 5 do? That is the question, okay? 1 and 5 can do one of two things, either they can freeze their backoff counter value or they can pick fresh numbers, which one makes more sense? Freezing makes more sense because if I were to pick fresh numbers, I may always be picking a very large number, I may never get a chance to transmit, right? So it is going to pick the same number and it is going to freeze it. So what has happened is station 2 has finished its backoff, station 5 has reached the backoff value of 1, station 1 has reached the backoff value of 3, correct? So when station 2 is transmitting, what has happened? There is a packet which has arrived at station 4, right? Now it so happens that station 4 also picks a backoff value of 1, okay? Remember that we are picking a number in 0 to 7, station 4 has also picked the backoff value of 1, okay? So now when station 2's transmission is over, right? At this point, all these guys again wait for a DIFS amount of time and they all start counting down again, okay? Now what happens? What is the residual backoff value of station 5? 1, right? What is the backoff value of station 4? 1. So both of these guys are going to finish counting down at the same time, they are both going to transmit on the medium and there is going to be a collision, okay? Can you detect that there is a collision? We cannot detect that there is a collision. See in Ethernet what we can do is as soon as there is a collision you will stop the transmission and you will send out a jamming signal, right? Here there is no such thing, you will continue to transmit the data. So this entire data period here is going to get wasted, okay? In the meantime, what is the value of station 1? Station 1 has counted down from 3, it has counted down one more so it is now 2, correct? So then what happens is after that in the next duration station 1 is going to count down this 2 and transmit, okay? So the question is what do these guys do, right? So initially I picked the backoff value from 0 to 7, I find that there is a collision. So what is the typical thing to do? Exponential backoff which is used in Ethernet. The next time I pick a value from 0 to 50, right? I take a larger window. So each time I collide I am going to double my backoff interval what is called the contention window. You guys are going to pick numbers from slightly larger range, right? Hopefully at some time the transmission is going to get through, correct? So now the question is how much larger should we play with this backoff? So there is a lot of work in 802.11 which basically deals with handling this contention window properly, okay? Whether it should be 0 to 7, whether it should be 0 to 32, for higher priority stations should it be like this? So if you look at 802.11e, okay, so there are lots of these variants of 802.11, right? So that is dot 11b. What we are studying is dot 11b, okay? B is 11 Mbps using direct sequence spread spectrum, okay? There is a version of this called dot 11g which uses the same medium access mechanism but uses a different phi layer, okay? There is dot 11a, there is dot 11e, f, i, all of them exist. So if you look at dot 11e which is the QoS enhancement to 802.11, so they play around with this backoff interval values, right? So now if I am an important station or if I am an important application I will always pick backoff values from small numbers. If you are an unimportant station then you will always pick backoff values from large numbers, okay? Thereby priority on the medium, okay? So what we will do is we will take a break now and come back and talk about these priorities and other things.