Forum

  • These notes are not complete, but should give people who are having trouble understanding the difference between BANDWIDTH, THROUGHPUT and PROTECTION a little more understanding.

    Protection can be a complicated business [ especially with 802.11n ], however there are some basic things that can help us understand what is going on here.

    One of the first things we need to do is to be able to understand why the 54 MBPS advertised on your 802.11 card does not mean 54 MBPS of your data going through.

    In order to do that, lets discuss ???¡é?¡é?????¡­?¡°air speed???¡é?¡é???????? or ???¡é?¡é?????¡­?¡°BANDWIDTH???¡é?¡é???????? [ terrible word by the way, but we???¡é?¡é?????¡é???¡ére stuck with it ???¡é?¡é?????¡é?€?? true bandwidth refers to frequency range in Hz not bps, but historically that???¡é?¡é?????¡é???¡és what it is called ] and THROUGHPUT.

    Imagine that we were very tiny and could hover in mid air and see 802.11 frames coming flying through the air [ we would actually see modulated electromagnetic radio waves, but bear with me ]. Now imagine that we saw a frame coming towards us . The moment that frame passes us, we start a very fast clock. We stop the clock when the last bit passes. Using our super x-ray vision we were able to see into the frame and know how many bits are in there. Let???¡é?¡é?????¡é???¡és say that we counted 54 bits in a frame [ not realistic, but let???¡é?¡é?????¡é???¡és plough on ] . The clock told us that the data flew past us in one microsecond. Knowing that speed equals distance [ number of bits ] divided by time, we say the speed [ through the air ] is 54/1 microsecond = 54 Mbps.

    A while later another frame comes through the air, 54 bits long and we do the same calculation: 54 Mbps. Uh ???¡é?¡é?????¡é?€?? oh. We now see something is not what we thought it was. There are gaps between the frames, so even though each frame moves at 54 Mbps, when we average the speed of the two packets to include the gap period where no frame was coming, it is apparent that the data CONTAINED WITHIN the frames is moving on average less than 54 Mbps. But why can???¡é?¡é?????¡é???¡ét we just keep sending data continually ? 802.11 works in a manner that for each frame transmitted, the sender has to wait for an acknowledgement from the other side. That wait period once again reduces the actual true AVERAGE amount of data which we put through the system [ called THROUGHPUT ]. OK, but why not just send a massively long frame. Well others have to share the network and 802.11 puts a maximum frame size limit on what one station can transmit.

    Imagine that an 802.11g network [ 54Mbps being used in this case ] is transmitting and receiving quite happily. We only have two stations and an access point on our little network and all we want to do is send data from computer A to computer B and vice versa.

    We usually have data being sent backwards from computer B to computer A. So computer A cannot just ???¡é?¡é?????¡­?¡°hog the bandwidth???¡é?¡é???????? and transmit continually. Why not ? On a point-to-point cisco link we can easily have two computers talking to each other at the same time [ called a full duplex link ]. 802.11 does not work that way. It only allows one station to be ???¡é?¡é?????¡­?¡°on the air???¡é?¡é???????? at one time. It is what is called a ???¡é?¡é?????¡­?¡°half-duplex???¡é?¡é???????? system [ Like ???¡é?¡é?????¡­?¡°walkie talkie???¡é?¡é???????? radios ???¡é?¡é?????¡é?€?? ???¡é?¡é?????¡­?¡°Hi this is Bill, over???¡é?¡é???????? ???¡é?¡é?????¡­?¡°Good to hear you Bill, this is Fred, over???¡é?¡é???????? ] I won???¡é?¡é?????¡é???¡ét go into the details here of why that is, but it has to do with the radio card???¡é?¡é?????¡é???¡és internal circuitry. So, again our throughput is affected.

    So, at this stage we can see that our THROUGHPUT [ how much actual data gets through ] is less than the BANDWIDTH due to having to wait for acknowledgements, having a half-duplex system and a maximum limit on frame size.

    Then we suddenly think ???¡é?¡é?????¡­?¡°Wait a minute, we can???¡é?¡é?????¡é???¡ét just shove data over the air, we need to tell the access point where it is going to and where it is coming from, in other words addresses. So, we will have to have some form of framing [ 802.11 MAC framing ]. Our THROUGHPUT drops again. Even with all this, our ???¡é?¡é?????¡­?¡°over the air speed???¡é?¡é???????? of an ENTIRE FRAME [ including framing bits ] is still 54 MBPS.

    And it gets worse. Just imagine you were sitting down in a chair [ you are an 802.11 receiver ] when someone creeps up behind you and shouts ???¡é?¡é?????¡­?¡°AreYouGoingToTheGameTomorrow????¡é?¡é????????.

    You???¡é?¡é?????¡é???¡éd probably say: ???¡é?¡é?????¡­?¡°What ? I missed half of what you said. I wasn???¡é?¡é?????¡é???¡ét ready???¡é?¡é????????.

    In polite conversation, we don???¡é?¡é?????¡é???¡ét just walk up to someone and startle them, we start off with a preamble of ???¡é?¡é?????¡­?¡°Hi, How are you ? I have a question to ask you ? ???¡é?¡é?????¡­?¡° and then you say ???¡é?¡é?????¡­?¡°Are you going to the game tomorrow ????¡é?¡é????????

    802.11 works the same. At the physical [ PHY ] layer we add on a physical header, part of which is called the preamble. One of the functions of the preamble is to alert the receiver to the fact that a message is coming in [ it does some other very complex things as well involving setting clock speeds ???¡é?¡é?????¡é?€?? how does the receiver know the transmitter???¡é?¡é?????¡é???¡és clock speed ? Two clocks may be nominally running at 54 Mhz, but one may be a little off from the other. How do we take that into account ? I???¡é?¡é?????¡é???¡éll leave that for another posting ].

    Another thing we need to do is to let the receiver know what particular airspeed or BANDWIDTH is being used [ 1, 2, 5.5, 11 Mbps etc ]. In the PHY layer header, a thing called the SIG field can help provide us with that info.

    So, on top of all the MAC framing, half-duplex etc we now have PHY layer framing.

    All of this combines [ along with a few other things like CSMA/CA for equal sharing ] to drastically reduce our throughput.

    But the pain does not stop there. Suppose we have our 54 Mbps 802.11g network running and one of our clients comes up running at 802.11b speeds. What do we do ? Boot him off the network ? No, we have to play fair and that???¡é?¡é?????¡é???¡és where protection comes in. More about that later.

  • Just a note about bandwidth. The term originally referred to radio system bandwidth in Hz, khz, Mhz, Ghz etc.

    For instance if a signal occupied a frequency space from 15 Mhz to 35 Mhz, then it's bandwidth would be said to be 20 Mhz. If a signal occupied a frequency space from 1 Ghz to 4 Ghz, then it's bandwidth would be said to be 3 Ghz.

    Unfortunately, some time ago, the IT industry started calling data rates "bandwidth", as in "what's your bandwidth ?" "Oh, 20 Mbit/s".

    So on a T-1 link, what frequency range [ or REAL bandwidth ] would that signal occupy, and why would I care. As to what the frequency range would be, I'll cover that in a separate posting. Why should we care ? Because if you know what the highest frequency component is in your signal, you can figure out what quality of cable you need to support that data rate. Very important in serial communications. Some links do not live up to expectation due to poor quality of old-fashioned copper wire. All copper wire is not created equally. Depending upon the amount of impurities [ other metals, oxygen etc ] in the copper will determine the resistance etc of the wire. Simple corrosion can affect the data rate dramatically [ this often happens with DSL at the old-fashioned telephone junction boxes ].

    What is more annoying is that now some publications are mixing up bandwidth [ the IT version ] with throughput. In one article the other day, it said:

    "It is possible to get up to 54 Mbps throughput with an 802.11g link". Grrrrrr..... }:-@

    Dave

  • Getting back to this protection business, why do we need it. ? Imagine we have a nice 802.11g network running at 54 Mbps bandwidth [ grrr???¡é?¡é???????| ]. Along comes someone else at 802.11 speeds, say 11 Mbps. What will happen if he associates to our access point ? Will we suddenly all drop down to 11 Mbps ? Can???¡é?¡é?????¡é???¡ét we just send him an 802.11 ???¡é?¡é?????¡­?¡°Get away from here now horrible beastie???¡é?¡é???????? frame ? The answer is no to both of these. 802.11 was designed to be as fair as possible to everyone who is associated with it. Now, it???¡é?¡é?????¡é???¡és not perfect, but it does a pretty good job. Sadly, ???¡é?¡é?????¡­?¡°beastie???¡é?¡é???????? frames are not part of the standard.

    So straight away, whether we like it or not, we must let our 802.11b friend ???¡é?¡é?????¡­?¡°have a chat???¡é?¡é???????? over our network. But there???¡é?¡é?????¡é???¡és a problem. At 54 Mbps, 802.11g does not ???¡é?¡é?????¡­?¡°speak???¡é?¡é???????? the same ???¡é?¡é?????¡­?¡°language???¡é?¡é???????? as 802.11b at 11 Mbps.

    The 802.11 g uses a modulation type called 64 QAM [ QUADRATURE AMPLITUDE MODULATION ] at 54 Mbps [ more about QAM that in a later posting ] whereas 802.11b at 11 Mbps uses a modulation type called Complementary Code Keying. .11G uses OFDM as a transmission type whilst .11b uses Direct Sequence Spread Spectrum. These guys cannot talk to each other. So how do we get around this ? We have to PROTECT each group [ 802.11G and 802.11B ] from each other???¡é?¡é?????¡é???¡és transmissions, and still allow each group to get a ???¡é?¡é?????¡­?¡°fair share???¡é?¡é???????? at communication.

    Imagine you are a parent from New York with two boys who only speak English [ Andy and Bob ]. They speak English very ,very fast indeed [ Their dad is a cab driver ]. For the summer you have invited two French boys from the country [ who only speak French and speak slowly ] to stay. They are Charles and Didier. All of them sit in the living room and start talking. A and B are speaking English, B and C are speaking French. The noise drives you crazy. A and B can???¡é?¡é?????¡é???¡ét understand each other because of the ???¡é?¡é?????¡­?¡°interference???¡é?¡é???????? from C and D, and C and D can???¡é?¡é?????¡é???¡ét understand each other because of the interference from A and B. You have to do something. Your boys don???¡é?¡é?????¡é???¡ét want to spend years learning French, so you teach them just a few words of French and how to count numbers in French. Before your boys speak, they say to the French Boys [ In French ] ???¡é?¡é?????¡­?¡°We???¡é?¡é?????¡é???¡ére going to talk for 3 minutes, when we???¡é?¡é?????¡é???¡ére done, you can speak???¡é?¡é????????. Now each group [ A to B or C to D ] can talk for a bit, then stop and let the other group talk. Your boys have not needed to learn French, they???¡é?¡é?????¡é???¡éve simply used a French preamble before talking in English to give the French boys a head???¡é?¡é?????¡é???¡és up that English is about to be spoken. You also teach the French boys to say in French ???¡é?¡é?????¡­?¡°We???¡é?¡é?????¡é???¡ére going to speak for x minutes, when we???¡é?¡é?????¡é???¡ére done you can speak???¡é?¡é????????. A and B have already learned these words, so they know C and D are going to speak and for how long. Actually A and B [ 802.11 g ] secretly speak fluent French [ 802.11b ] but being from New York want to speak English very very fast indeed.

    In a shared b/g environment, g stations ???¡é?¡é?????¡­?¡°prefix???¡é?¡é???????? their transmissions with special frames called RTS/CTS or CTS-SELF using modulation etc that b stations can understand. Basically saying to them ???¡é?¡é?????¡­?¡°hey b stations, we are g guys and are going to be talking for x microseconds???¡é?¡é????????. How do the stations transmit the time information ? If you look in an 802.11 MAC frame you will see a part called ???¡é?¡é?????¡­?¡°duration/ID???¡é?¡é????????. The duration value is used to set what is called a NAV timer at a station.

    There are a bunch of other factors involved in reality, such as what actually triggers the protection mechanisms, and how beacons are involved,but I think that???¡é?¡é?????¡é???¡és enough for now.

    Dave

  • So, what is the bandwidth of a copper cable [ Ethernet cable, radio cable for 802.11 , DSL cable etc ] and why is it important ? The true frequency bandwidth can only be determined by measurement. This frequency bandwidth will be a major determining factor in the ???¡é?¡é?????¡­?¡°IT bandwidth???¡é?¡é???????? or bit rate. The bandwidth determines the maximum frequency that the cable will allow to be propagated without causing large attenuation. So how does a cable attenuate a signal ? All cables have resistance. This is caused by many factors. One of the most important is the amount of impurities present in the cable. Copper is refined from copper ore, and trace amounts of other metals and gases [ like oxygen ] are present in the material. The more we can get rid of these impurities, the lower the resistance will be. However this process is not easy. The copper ore has to be heated and ???¡é?¡é?????¡­?¡°skimmed???¡é?¡é???????? of impurities [ like skimming fat off the top of a pot of chicken soup ]. The more you do this, the more expensive it is. All cables have capacitance. Capacitors are devices which can store an electrical charge [ like a sort of small battery ] then discharge the stored electricity. This constant charging and uncharging can affect the speed of the signal down the cable. Cables also have inductance. This is to do with the electromagnetic properties of the inductor. An inductor can build up a magnetic field then can have it collapse and generate current. There is another factor called admittance which is something like resistance. We can make an electrical model of the cable with series resistance, series inductance and shunt [ parallel ] capacitance and admittance.

    However the only real way to truly determine the frequency range of a cable is to send signals at different frequencies down the cable and measure the output levels at the other end. This determines the true frequency bandwidth of the cable. This is important in 802.11, because if you use cheap/damaged/wrong frequency range cable to connect your outdoor antennas to an AP etc, you can end up with terrible problems such as data corruption, reflections etc.


    http://en.wikipedia.org/wiki/Copper_extraction
    http://electronics.howstuffworks.com/capacitor.htm
    http://electronics.howstuffworks.com/inductor.htm
    http://www.allaboutcircuits.com/vol_2/chpt_14/3.html


    You hear some people say ???¡é?¡é?????¡­?¡°A cable is a cable is a cable???¡é?¡é???????|???¡é?¡é???????? Nothing could be further from the truth.

    Dave

  • By (Deleted User)

    Anyone who's been using USB since the early days, knows this statement is wrong. USB 1.1 Cables were junk! When we remodeled our lab here, I purposely went through, identified, cut up, and then threw out about 25 USB 1.1 cables (out of over a hundred).
    Why cut them up? To make sure some poor fool didn't pull them out of the trash, and put them right back into the system. They can be an unending source of grief.
    We also had a to-be-un-named connector company try to pull a fast one over on us, with TOTALLY defective cables. Actually it was the connectors on their 1.37 mm 802.11 cables. When we confronted them with the failures, they tried to change their connectors specs, and then said "look, we meet the specs!". What a joke. Stick with the original Hirose Brand U.FL connectors!

  • I thought I???¡é?¡é?????¡é???¡éd add a story that came to mind of just how important a little piece of cable can be.

    On a satellite communications station operating at C-Band [ usually 5.85 ???¡é?¡é?????¡é?€?? 6.425 Ghz on the uplink ???¡é?¡é?????¡é?€?? to the satellite ], the customer data [ e.g. a 256 kbps data stream ] feeds into a modulator. The center frequency of the modulator output is usually in the 70 Mhz range [ 70 +/- 18 Mhz ] and is then fed to a device called an upconverter which takes the 70 Mhz signal [ known as an intermediate frequency signal or IF signal ] and converts it to the C-band range [ 6 Ghz ].

    I was called in to troubleshoot a brand new station which was suffering from very poor performance [ high bit-error-rate, many re-transmissions etc ]. The guys had checked the link budget, replaced all the transmit equipment etc but to no avail. The distant end used their equipment with another station and everything was OK, so we knew the problem was coming from us or was on the satellite. Even though the service was terible, the customer had an emergency need for communications and we had keep the link up, albeit bad.

    After eliminating some things [ such as interference on board the satellite etc ], I came to the conclusion that the problem was due to local interference at our earth station. This was not good. Unlike 802.11, you cannot easily jump to another frequency as you are working with licensed frequencies and have to use what you have already paid for. No interference had shown up during the site survey. Finally after many hours of checking the IF and 6 Ghz ranges with the spectrum analyzer set to a bunch of different values [ max-hold, slow sweep etc ], I thought I saw something peeking above one of our carriers. I shut down the carrier for a little bit and saw a signal. It???¡é?¡é?????¡é???¡és shape did not give many clues, but I thought it looked like a commercial FM signal. Using a technique called ???¡é?¡é?????¡­?¡°slope demodulation???¡é?¡é???????? on an HP spectrum analyzer, I was able to demodulate the signal and feed it to the unit???¡é?¡é?????¡é???¡és speaker. I got a shock when a local music station [ Cool FM ] came blaring out. There was a transmitter nearby, but we???¡é?¡é?????¡é???¡éd never had any problems before. After a few enquiries to some friends, I heard that they???¡é?¡é?????¡é???¡éd recently bumped up the power by 9 dB , just like that. [ No FCC there !!]. I checked all the grounding to no avail. We were under immense pressure commercially as our company???¡é?¡é?????¡é???¡és entire frame relay network was to be hub???¡é?¡é?????¡é???¡éd from the antenna, and it was already very late. Calls to industry experts proved fruitless. Then laying in bed one night I thought ???¡é?¡é?????¡­?¡°This is a radio signal. It can be received by an antenna of a specific size, related to it???¡é?¡é?????¡é???¡és wavelength???¡é?¡é????????. The antenna would have to be an integral multiple or sub-multiple of a wavelength.

    I worked out the wavelength by knowing the frequency of the signal and the speed of light [ 3 x 10 to the 8 m/s ]. The answer came out to 3.75m. I couldn???¡é?¡é?????¡é???¡ét find any cable that size, so started looking for one that was half that size [ 1.875m ]. That???¡é?¡é?????¡é???¡és almost 6 feet. I???¡é?¡é?????¡é???¡ém about 6 feet tall so I just looked for a cable about my height., then rummaged through all the equipment racks until I found an IF cable coming off a splitter which was almost exactly 1.9m long. I pulled the cable out and replaced it with a much shorter cable. .???¡é?¡é???????|..all interference gone. It was acting as what is known as a ???¡é?¡é?????¡­?¡°half-wave resonant dipole ???¡é?¡é?????¡­?¡°.

    That one little cable could have caused very severe financial penalties [ for every day over our deadline we would have had to ???¡é?¡é?????¡­?¡°repay???¡é?¡é???????? the customer a lot of money ].

    No matter how complex the system or whatever ???¡é?¡é?????¡­?¡°super-cool???¡é?¡é???????? new technologies are used, some of the first things I check are cables, connectors, power and grounding. These are responsible directly or indirectly for many non-propagation related problems in radio links.

    Dave

  • By (Deleted User)

    Dave, Thanks for the great story. :D :D

  • Just talking about cables, I thought I'd ask if anyone knew the answer to the following:

    When we use a parallel cable for a printer [ old-school ] we find that there is a maximum length for the cable, which is relatively very short. Why is this ?

    Why should it be so short ?

    A clue: The old answer of "Well parallel just can't go as far as serial" does not give enough information.

    Some may know the answer, and some may be surprised by the answer.

    The answer is important to designers of the internal circuitry of 802.11 devices and high performance computers alike.

    Dave

  • Haven't had any bites yet, so another clue.....

    "What time is it ?.."

    Dave

  • Let???¡é?¡é?????¡é???¡és imagine that we were able to clone athletes exactly. We produce 8 clones. Every single one of them has EXACTLY the same characteristics ???¡é?¡é?????¡é?€?? strength, speed, agility etc. Down to the last detail. We then outfit them with the same running shoes, clothes etc. They even have the exact same haircut and number of hairs. What one does, the others do exactly. If one moves his left leg, all the others do.

    We now take them to a race track with 8 lanes, a start point and a finish line. We line all 8 up side by side at the start. Bang???¡é?¡é???????| off they go. We just know that all will all finish first, all at the same time. But a strange thing happens. Two them are a little behind the others. What happened ? Couldn???¡é?¡é?????¡é???¡ét be them or their clothes or their technique or air resistance [ haircuts ]. They all ate the same lunch. The only other thing it could be is the track. We then examine the grass on the 8 separated tracks and find that a couple of the tracks have slippery patches from a recent rainstorm. Those slippery areas caused a very, very small disadvantage to two of the runners, who came in slightly behind the others. They were a little late in arriving due to the condition of the tracks they ran on.

    Let???¡é?¡é?????¡é???¡és imagine we have a serial cable with a transmitter on one end and a receiver on the other. We send 8 data bits out [ say the 7 bit ASCII code for letter A with a parity bit ]. We will forget about framing and whether we are using HDLC etc. There is a clock inside the transmitter [ just like in an 802.11 STA ]. This clock is not being used to feed data into a modulator however, it is just sending data out onto the copper wires. If the clock was feeding data out at 8 Mbps, then it would take 1 microsecond to clock all 8 bits out onto the cable. Let???¡é?¡é?????¡é???¡és also assume that we have a very long cable and that by the time the last bit ???¡é?¡é?????¡­?¡°goes out onto the cable???¡é?¡é????????, the first bit has not yet reached the other end. All 8 bits travel together [ like having the athletes one after the other, tied together with belts ]. If we reach a bit in the cable where there is something that will slow the bits down [ like a change in resistance over a section of cable, or a change in capacitance ], then when the first bit slows down, all the others behind him slow down. What the first one does, all others do. When the first bit reaches the other end [ no matter how much it has been ???¡é?¡é?????¡­?¡°held up???¡é?¡é???????? on it???¡é?¡é?????¡é???¡és way there] all the other seven bits are right behind him, and the whole ???¡é?¡é?????¡­?¡°byte???¡é?¡é???????? is received. At the receiver, the bits are clocked into a special device called a Serial-In Parallel-Out Shift register.

    Now let???¡é?¡é?????¡é???¡és imagine that we have the same 8 bits, only this time we are going to send the bits in parallel across 8 wires with a common ground reference. Here???¡é?¡é?????¡é???¡és we hit our potential problem. Each of those wires is different from the others on a MICROSCOPIC scale. Each will have slightly different values of resistance, inductance, capacitance etc. Without going into the math, these variations cause variations in what is called the propagation velocity of the cable. Bits travelling down a copper cable [ Ethernet, DSL, fiber-optic etc ] do NOT travel at the speed of light, but rather a fraction of that speed whose value depends upon the cable characteristics. It???¡é?¡é?????¡é???¡és pretty close, but when we have parallel cables, over a certain distance, the difference between each wire becomes important. At the distant end, we clock the data into a different device called a Parallel-In , Parallel-Out shift register [ it acts as a form of input buffer ]. If all the bits have not arrived exactly on time side-by side, some of them will not get clocked into the shift register, and the ???¡é?¡é?????¡­?¡°blank spaces???¡é?¡é???????? will get filled with ones or zeroes depending on the system. We have just had data corruption as a result of what is called ???¡é?¡é?????¡­?¡°timing skew???¡é?¡é????????, all because of microscopic differences between each wire which build up over distance. This is what limits the practical distance for parallel transmission.

    Even an 802.11 signal on earth does not travel at the speed of light [ due to ???¡é?¡é?????¡­?¡°slowing down???¡é?¡é???????? of the signal by molecules of oxygen etc ]. It travels pretty close to it, and the small difference is not important to us in the world of 802.11. An RF signal only travels at the speed of light in a vacuum [ like outer space ???¡é?¡é?????¡é?€?? though even that has dust particles etc !! ]. It is important for our GPS signals however, and tiny corrections are made to allow for this and the effects of the ionosphere which surrounds the earth.

    This whole timing skew business is very important for computer designers and high speed switch bus designers. When there is a separate clock line from the data [ as there is in many systems ], clock skew becomes very important [ this is where a good quality digital storage oscilloscope comes in very handy ].

    http://www.eelab.usyd.edu.au/digital_tutorial/part2/register01.html

    http://www.gpsworld.com/gpsworld/article/articleDetail.jsp?id=57974


    Dave

Page 1 of 2