Thursday, March 26, 2015

Because It's Wi-Fi (a musical parody)

Because It's Wi-Fi
Written by Jason D. Hintersteiner
Copyright 2015

A musical parody of "Because I'm Happy" by Pharrell Williams
(The video would be a bunch of CWNEs walking around a warehouse singing...)

[Verse 1:]
It might seem crazy what I'm about to say
Free Wi-Fi's here, you can take a break
I'm a large bandwidth hog taking up air space
With QoS, cause I don't care baby by the way

{Uh}

[Chorus:]
Because It's Wi-Fi
Clap along if you feel like mounting APs on the roof
Because It's Wi-Fi
Clap along if you feel like Internet is all truth
Because It's Wi-Fi
Clap along if you know what Wi-Fi speeds mean to you
Because It's Wi-Fi
Clap along if you feel like you're gonna surf porno, too.


[Verse 2:]
Here come controllers to limit this and that {yeah}
Well, give me all you got, and don't hold bandwidth back {yeah}
Well, I should probably warn you my VPN's just fine {yeah}
Copyright notice, don't waste your time
Here's why...

[Chorus]

{Hey
Go
Uh}

[Bridge:]
AP's down
Can't nothing
AP's down
My signal's too high
AP's down
Can't nothing
APs down
I said (let me tell you now)
AP's down
Can't nothing
AP's down
My signal's too high
AP's down
Can't nothing
AP's down
I said

[Chorus x2]

{Hey
Go
Uh}

[repeats]
AP's down... can't nothing...
AP's down... my signal's too high...
AP's down... can't nothing...
AP's down, I said (let me tell you now)

[Chorus x2]

{Hey
C'mon}

Friday, March 20, 2015

An overview of SFPs for interconnecting switches with fiber

Those of us who deploy Wi-Fi networks are often expected to understand the wired side of the network just as well as the wireless side.  Thus, as a primer, here is an overview of SFPs that I needed to put together for one of my clients.

For distances of more than 100 m / 328 ft, CAT5e / CAT6a is insufficient, and thus fiber is often used to interconnect switches in high-rise and multi-building deployments.  Most layer 2 managed and smart switches contain ports to handle one or more small form-factor pluggable (SFP) modules for interconnecting switches with fiber.  The SFP converts between an Ethernet network (copper) and an optical network (fiber), and contains a class 1 laser diode for the optical transmissions.  The SFP module has a receiver port and a transmitter port to make up one optical interface.  An example of an SFP module is shown in the figure.




Since these modules are based on an IEEE 802.3z specification, any 1 Gbps Cisco-compatible mini-GBIC fiber SFP module will generally work fine in any vendor's layer 2 managed or smart network switch.   

The specific SFP module selected depends on the type of fiber and the application.   For high rise building and multi-building applications, multimode fiber (MMF) is typically used with a diameter of either 50 microns or  62.5 microns.  Single mode fiber (SMF) is sometimes used in building or between neighboring buildings, but SMF is generally more expensive and is really intended for very long distance applications (i.e. many miles).   The fiber patch cable between the switch and the fiber patch panel should match whatever fiber type and diameter is used in the building(s).  Typically, most mini-GBIC fiber SFP modules have an LC interface.   The fiber patch panel could have an LC, SC, or ST interface, and fiber patch cables are available to interconnect the LC interface on the mini-GBIC to any of these interfaces.

They also come in different operating frequencies, depending on the application:


  • 850 nm  (Short wavelength, SX):   Used with multimode fiber for relatively short distances (220 m – 275 m / 722’ – 902’  for 62.5 micron, 500 m – 550 m / 1640’ – 1804’ for 50 micron)
  • 1300 nm (Long wavelength, LX or LH):  Used with either multimode or single mode fiber for distances up to 550 m / 1804’ (multimode) or 10 km / 6.2 miles (single mode)
  • 1550 nm :  (Extended distance, ZX):   Used with single mode fiber for 70 km – 100 km (43 – 62 miles)

On a network switch, most switches will implement a shared port, meaning that there will be both an RJ-45 and an SFP interface that share the same port, and either physical connection can be used on that port (but not both physical connections simultaneously).   Some vendors do manufacture switches with dedicated SFP ports.  Dedicated SFP ports are also common on core switches (e.g. HP Procurve 6200yl), where most or all of the ports on the switch are SFP ports for interconnecting with remote Ethernet switches.   To connect to these types of "SFP only" switches, there are SFP modules manufactured that provide an RJ-45 interface.

Thursday, March 19, 2015

De-mystifying wireless connection speeds


There are a lot of myths and misconceptions about connection speeds in Wi-Fi, and how those wireless connection speeds relate to what we are usually interested in, i.e. throughput.   The story is a complicated one, but this post shall hopefully provide a relatively straightforward explanation of a very complex topic.

Strictly speaking, wireless connection speed is only one of several factors that influence Internet throughput.  Amongst other factors are the available bandwidth into your property, the number of devices simultaneously competing for that bandwidth and the applications they are running, whether the bandwidth is a shared resource (e.g. cable modem) or dedicated resource (e.g. business-class fiber), the bandwidth and utilization of the remote server you are trying to access, etc.  That said, wireless connection speeds, when they are poor, can dominate your user experience.  The Wi-Fi is the infrastructure our devices use to connect to each other and the Internet.  As such, getting the Wi-Fi right is paramount to good network connectivity.

When your device has a strong Wi-Fi signal and is not exposed to interference, high connection speeds are achieved that are generally far above the speed of your Internet connection.  In this case, the bandwidth of your Internet connection (and the number and type of devices and applications on your network) will be the bottleneck of the network.   This is how we nominally design wired and wireless networks.    However, if the Wi-Fi signal is weak, or if the environment has a lot of interference, only low connection rates are possible, and thus the wireless connection becomes the bottleneck of your network.

With every generation of Wi-Fi, connection speeds have increased, often dramatically.  Alas, you cannot break the laws of physics, and the RF of today is the same as when it was discovered approximately 200 years ago.  That said, clever engineering solutions can be devised to push the boundaries of physics.  Fundamentally, all of the improvements in Wi-Fi over the last 20 years have been accomplished by using mathematics to increase complexity, such as adding more complex modulation, less forward error correction, multiple spatial streams, wider channel widths, etc.   The price paid, however, is that complexity increases fragility and decreases robustness.   802.11b is approximately 100x slower than 802.11ac wave 1, but 802.11b went much further distances, still worked reasonably well in the presence of noise and interference, and, most importantly, was quite tolerant of extremely poor design and implementation practices. 

The Wi-Fi connection speed established between two Wi-Fi stations is the Modulation and Coding Scheme, or MCS.
  • Modulation is defined as encoding an analog or digital signal on an electromagnetic wave.  In classic radio, such as the radio in your car, the two mechanisms used are amplitude modulation (AM), where the power level is altered as a function of time, and frequency modulation (FM), where the wavelength is altered as a function of time.  One can also perform phase modulation (PM), which the phase of the signal (i.e. where along the sine wave you are) is shifted as a function of time.  Wi-Fi requires operation on one of several particular channels (i.e at a fixed center frequency and frequency width), so FM is not an option.  Instead, both the amplitude and phase of the signal are modified so that particular combinations of amplitude and phase offsets represent a particular string of bits.   By more finely adjusting the particular amplitude and phase offsets, a larger string of bits can be represented, and thus faster connection rates can be achieved.   Thus, for faster speeds, the more complex the modulation.  The tradeoff, however, is that the amplitude and phase of a signal normally get distorted in all radio communications between a transmitter and receiver due to several factors, including signal loss as a function of distance between the transmitter and receiver, attenuation and reflections off of walls and other objects, and other RF noise in the environment.  Thus, as the modulation becomes more complex, the harder it becomes for the receiver to interpret the receive signal and derive the intended sequence of data bits.
  • Coding, also known as forward error correction, is the process of inserting "error correction bits" into the data stream, so that even if some of bits are misinterpreted during the radio communication process, the original data stream can be reconstructed mathematically.   The amount of forward error correction is typically represented as a ratio:  A coding of 1/2 means that for every 1 data bit, 2 bits are transmitted; a coding of 5/6 means that for every 5 data bits, 6 bits are transmitted.   The more error correction bits that are used in the data stream, the more likely that the receiver will be able to reconstruct the intended sequence of data bits, though the more overhead and thus the fewer actual data bits that get transmitted. 
The MCS rates, therefore, are specific pre-defined combinations of modulation and coding that result in particular uni-directional speeds between two Wi-Fi  stations.  For the fastest speeds, it is desirable to make the modulation as complex as possible and the forward error correction to be as little as possible.   When an AP is advertised with specs like "up to 450 Mbps" for 802.11n or "up to 1.3 Gbps" for 802.11ac, these numbers correspond to the largest MCS supported by that make and model of AP, i.e. the most complex modulation scheme and the fewest error correction bits. 

So what determines the actual rate between the client and the access point? In Wi-Fi, we generally want the fastest connection speed we can get, so the actual speed is targeted to be the best MCS rate at which the receiver can still correctly interpret the intended sequence of data bits.  The specific algorithm as to which MCS rate gets selected is proprietary to each Wi-Fi equipment vendor, though generally it is based on the signal strength, the number of errors measured, and the number of retransmissions required.   This rate is periodically renegotiated over time as a client moves around the environment and thus these parameters change in a process known as dynamic rate shifting

Distance is generally the largest single contributing factor to signal strength, due to an effect called free space path loss, which is simple geometery.  As a signal moves away from its transmitter, it spreads out in space both horizontally and vertically, which means the power level decreases as the square of the distance between the transmitter and receiver.   This effect is illustrated in two dimensions in this figure.



Since the transmit power on the AP is generally higher than the transmit power of a client device, the wireless connection speeds are not necessarily symmetrical in both directions.  An AP broadcasting at a high power level can achieve a relatively strong signal at the client device, allowing for a high MCS rate.  The lower power transmitter at the client device will result in a much weaker signal at the access point, and thus a lower MCS rate.  For certain applications, such as streaming a video from NetFlix, this is usually still ok, since most of the traffic is flowing downstream to your device.   For a two-way FaceTime video chat, your performance will be driven by the weakness of your client device, not the strength of your access point.


Of course, distance isn't the only contributing factor.  Other objects in the path (e.g. walls, ductwork, people, etc.) will serve to attenuate the signal, along with interference from any other sources of noise on the same operating frequency.  In the presence of interference, MCS rates are usually dramatically low, in order to have the simplest forms of modulation and a lot of forward error correction to give the Wi-Fi data stream the greatest possible chance of being received properly.  Even this can be marginal, requiring multiple retransmissions to get any data through, driving down data rates even further.  

In poorly designed or implemented Wi-Fi deployments, self-interference (i.e. interference from your own neighboring access points) dominate, because high power settings lead to too much overlap between the neighboring APs.  If the APs are on the same or adjacent channels, large levels of interference results.  Fortunately, this generally can be fixed, or at least mitigated, by improving channel and power settings and, when necessary, changing AP locations and antennas.  In "un-designed environments", such as apartment buildings where every 1000 sq. ft. apartment has a consumer-grade Wi-Fi modem from a provider designed to cover a 2500 sq. ft. house, all broadcasting on the same channels at their top power settings, the level of interference from neighboring systems is so extreme that there are no good channel or power settings available, and low MCS rates and high levels of retransmissions are unfortunately the norm.

Friday, February 27, 2015

The case "against" 802.11ac

Still a hot topic for debate:  Do you invest in more expensive 802.11ac access points or do you deploy cheaper 802.11n, given that 802.11n is likely more than adequate for today's needs in the small to medium enterprise environment.

The answer:  As always, it depends.  :)




There are only two main improvements in 802.11ac wave 1:

  • 80 MHz channels:  Gives you 2x improvement in speed, but higher noise floor and more subject to external interference
  • 256 QAM:   33% improvement in speed, but you need a > 29 dBm SNR to take advantage of it, meaning that in practical terms you must be within 10’ – 15’ of the AP in open air to get MCS 8 or 9.

Additionally, newer chipsets and APs generally have better performance, though impact is probably at most in the 10% - 15% range.   Given the same environment and the same 2x2:2 5 GHz 802.11n client device, an 802.11ac is likely to perform somewhat better than its 802.11n counterpart.

802.11ac wave 2 will have two other “improvements”:
  • 160 MHz channels:   Gives another 2x improvement in speed, but even higher noise floor and, at least with current FCC allocated spectrum, only two usable channels, making it impractical for multi-AP deployments.
  • MU-MIMO:   I finally understand how this is supposed to work (from WLPC 2015), and will have to go into it in a separate blog post.  Suffice it to say that it will likely only be useful in high density environments, and it requires transmit beamforming feedback from the client devices, meaning that the devices will likely need to be 802.11ac wave 2 compatible.  The feedback mechanism is actually part of 802.11n spec, but most client device vendors didn’t implement it.  It is not clear whether the functionality even was built into the chipsets of most 802.11n or existing 802.11ac wave 1 devices, or even if it was, whether firmware upgrades will ever be made available on current generation devices to make it useful.   Note that the feedback mechanism will also serve improve range, even if the "multi-user" part is not applied.
Add to this the bifurcation of client devices we are likely to see on the networks evolving in the next few years, which will ultimately lead to different classes of service based on FREQUENCY BAND:

  • Smartphone / Tablet Devices (i.e. the iPhone 10):   Don’t know their capabilities, but their being more of them, sucking down more bandwidth more frequently is a pretty safe assumption.   Will use the latest and greatest Wi-Fi chipsets for 5 GHz / dual band.  They will still only be 1x1:1 or 2x2:2 devices because of the need to keep both size and power consumption down.   Even now there are very few high end laptops with 3x3:3 802.11n or 802.11ac capability, and that is unlikely to change going forward.  Hence the desire for MU-MIMO.
  • Internet of Things:  Lots of devices that need to be connected all the time but each one passing very little data.  Consumer / price driven, so likely to have the cheapest Wi-Fi chipsets and antennas that can be found.  Hence, most of these devices will likely be 2.4 GHz only and maybe still 802.11b or 802.11g (i.e. not even 802.11n).
It is true that the bottleneck of the network is the internet bandwidth connection from the carrier.  That is where you want the bottleneck to be.   You never want the internal network (APs, switches, wireless bridges, or routers) to be the bottleneck.

So, still begs the question – do you deploy 802.11n or 802.11ac?   I still think the answer ultimately comes down to the expected lifetime of the network.  Most small / medium enterprise customers are not going to want to upgrade anytime soon.  The minimum lifespan of a network deployed today is at least 5 years, with 7-8 years being more likely.   Hence, do you deploy for today, or do you deploy for tomorrow?   The expectations of performance out of a network deployed today will only increase over time, both in terms of number of devices and in total bandwidth consumption.  I therefore believe today’s networks should have the latest and greatest technology deployed, if only to be 2-3 generations behind in 5 years vs. 4-5 generations behind.

Tuesday, February 24, 2015

LAA-LTE and the Threat to Wi-Fi

There is a big raging debate in the Wi-Fi industry right now about LAA-LTE.   This is a proposal by cellular carriers to use the 5 GHz unlicensed band to perform data offload, but using a LTE protocol and not Wi-Fi.   Of course the mobile carriers are going to proclaim how wonderful LAA-LTE is for their network operations and sugar-coat the whole Wi-Fi co-existence problem.

LTE, as a protocol, is designed to work on a licensed spectrum where you do not have to compete with, or even share, the resources with another network.  The "LAA" here stands for "licensed assisted access", which is a wonderful Orwellian term that sounds really good but actually means the complete opposite of what it sounds like.   In this context, "licensed assisted access" means that your traffic is traveling over unlicensed spectrum.

Whether licensed or not, wireless radio technology, being half duplex, is all about collision avoidance.  LTE uses time division multiplexing, generically known as TDMA.  TDMA, and all of its variations, are designed to work under the central premise that the network coordinates the usage of the spectrum, in order to prevent collisions from occurring between two or more radio transmissions on the same frequency.  Wi-Fi, by contrast, works by clients "contending" for the space and the right to transmit.  Most people don't understand that when you have a network with an AP and 20 client devices, the AP has to compete for the next transmission slot along with all of the clients, and while QoS modifies the contention rules, it is only a statistical advantage, not a guarantee. 

Wi-Fi and LTE are fundamentally conflicting and mutually exclusive architectures. Even if LAA-LTE allocated a large portion of the spectrum time to "external Wi-Fi", early studies (see http://www.cablelabs.com/wi-fi-vs-duty-cycled-lte/) have already shown that latency in Wi-Fi increases astronomically when an LAA-LTE network is present, even under light duty cycles. There are also no guarantees or requirements that LAA-LTE has to be configured to "play nicely" in the 5 GHz sandbox.

It is ironic that 2.4 GHz and 5 GHz used to be considered "garbage bands" that nobody in the cellular space wanted to get close to, until other companies figured out how to use the bands effectively (and make money from it). Now, these same carriers want to save money on licensed bands by seizing control over "free" unlicensed bands with LAA-LTE.

At the same time, the way the FCC rules are currently structured, the bands are unlicensed and thus there really isn't anything that the industry can do to stop it. If the 800 lb gorillas in the room want to bully their way into taking over the spectrum, they have the ability to make a real go of it.

One idea I've had on this subject is to take the proposed 5.9 GHz band that Congress wants to open up and dedicate those channels to applications like LAA-LTE, to keep it unlicensed yet, by mutual agreement, separated from Wi-Fi. Such an approach is unfortunately way too logical and reasonable to likely gain any traction.

Deploying in Hallways vs. Deploying in Rooms

Having done a lot of Wi-Fi in the Multi-Dwelling Unit (MDU) space, I'm often asked by installers for Wi-Fi in apartment buildings and hotels as to why I always recommend putting access points in the apartments / guest rooms instead of in the hallway.

It is generally true that installing APs in hallways is generally far easier than installing APs in units.  After all, many hallways have drop ceilings making cabling and installation a snap.    Even when there are hard ceilings present, cabling soffits or access panels are often already in place or are fairly easy to install, making cabling possible.   If there isn't already low-voltage infrastructure (i.e. a spare CAT5e / CAT6a cable) available in each unit, getting cabling into the units can be impractical or cost-ineffective.  

However, from a performance standpoint, putting APs in line of sight of each other down a hallway is the worst thing you can do for the following reasons:

  1. Talkback:  Client devices like smartphones and tablets have weak transmitters in order to maximize battery life.  Accordingly, while the AP may be strong enough to be heard by the client, the client often is not strong enough to be heard by the AP.  Hence, you want to put the APs as close to the clients as possible to best facilitate the client's ability to "talk back" to the AP. 
  2. Attenuation:  The inside wall adjacent to the hallway tends to have high attenuation.  Why?  Everyone likes having the biggest windows looking out as possible.  Hence, the inside wall tends to have all of the metal appliances (refrigerators, dishwashers, ovens, etc.), mirrors, plumbing, steel fire doors, etc.    This serves to attenuate the signal from the hallways.  It is not uncommon to see signal penetration through the floor / ceiling be much better than signal penetration from the hallway into the unit.
  3. Self-interference:   A long, thin hallway acts as a tunnel for Wi-Fi signals, focusing the signal and making it extend much further than it will laterally into the units.    Furthermore, even with the APs on different channels, there is always some level of adjacent channel interference.   When all of the APs are in line with each other, they will cause interference with each other.  The heavier the traffic load, the more interference there will be.
If you don't have the benefit of existing low-voltage cabling infrastructure, one trick often used is to run the cables down the corridor, penetrate above the doorway to the apartment / guest room, and mount the AP above the door.   While the AP may still not be ideally located within the center of the unit, having to penetrate the inside wall with signal is eliminated, placing the AP closer to the client devices and taking advantage of the building structure itself to further attenuate signals between the APs.