Friday, April 15, 2016

Deploying Wi-Fi in the Real World

Note, this blog post was written for and originally appeared in Network Computing on 4/14/2016:

Over the last decade, the proliferation of WiFi has been tremendous. However, this proliferation is fueled by one major misconception: Deploying Wi-Fi is EASY! How difficult can it be to go to your local big-box or consumer-electronics store, buy the shiniest WAP router you can find, and plug it in? When WiFi was new and consumers and business were wary about deploying a seemingly complex and unknown technology, this messaging made a lot of sense. Plus, back in the day, deploying WiFi was actually fairly easy. When data rates were low and the modulation and coding schemes (MCS) were simple, WiFi networks were quite tolerant to errors in deployment and issues in the environment.
Moreover, WiFi is a very robust protocol designed to work in the presence of interference -- even self-interference from other access points on your own network. The success of WiFi is at least partially due to its durability; WiFi as a protocol will continue to try and pass data, long after logic and sound engineering principles indicate that it should have already crashed and burned.
However, as WiFi became more popular, there's been ever-increasing demand for higher speeds and capacity. While we cannot break the laws of physics, engineering as a discipline is all about using mathematics to “bend” the laws of physics. Hence, we add more mathematical complexity to squeeze more performance: more complex MCS rates like quadrature amplitude modulation (QAM), MIMO, and transmit beamforming MU-MIMO. We also increase the channel size, which allows us to push more data on the channel. There is always a price, however: As we add more complexity, we add more fragility or sensitivity. Modern WiFi now requires much better signal-to-noise ratios (SNR), accurate antenna alignment, and position feedback from the client devices so we know where they are relative to the access point.

WiFi.jpg

WiFi
(Image: iSergey/iStockphoto)
Consumer marketing continues to promote WiFi ease of use, but so have many enterprise WiFi vendors, telling customers to put APs wherever they wanted, and that the APs would figure it all out in the firmware. However, we no longer live in a “best effort” era, where if the WiFi works for you great, and if not, too bad. WiFi is a requirement, and bad WiFi is bad for business. Just look at the hotel industry, where the importance of fast WiFi is consistently rated more important than clean sheets and towels!
As with any complex engineering system, the ultimate success of a WiFi network comes down to the following, all which have their own set of challenges:
Proper understanding of WiFi requirements and constraints. Formulating requirements are often overlooked or disregarded, because on the surface, requirements seem deceptively easy: WiFi is a commodity, and it should be readily obvious what's needed! Unfortunately, this is generally not true. Most customers and end users are not WiFi experts, nor do they usually even have more than a passing knowledge of networking or information technology. Hence, they don’t appreciate what is impossible vs. impossible, or what is easy and cheap vs. what is difficult and expensive.
Accordingly, expectations can be skewed because many requirements and constraints end up in direct conflict, such as providing both the best performance and the cheapest price, or providing WiFi coverage everywhere while hiding the access points from view to preserve aesthetics. If deploying in an existing building, there are often hidden constraints that may not emerge until the deployment, such as the ease or difficulty of running backhaul cabling, or walls that are made out of materials that are more RF shielded or RF transparent than previously thought.
Requirements and expectations also change unpredictably over time, both during the life of the project as well as the life of the WiFi network as a whole. If a WiFi network installed today has an expected lifetime of three to five years or more, then it needs to handle devices and user expectations that don’t exist today. The networks we design today must be designed for the iPhone 10. How do we design a network to handle client devices, and client expectations, that don’t yet exist or haven’t even been conceived of yet?
Proper product selection. Again, picking the right solution is deceptively easy in a world where WiFi is thought of as a commodity, and thus WiFi vendors and WiFi solutions are treated as interchangeable, not only by the customers, but by the vendors and solution providers themselves. The reality is that most network vendors have optimized their products and services to meet the typical requirements of specific vertical markets like hospitals, schools, stadiums, and SMB; a solution tuned for one environment may be a very poor choice for another, because the requirements are very different.
However, WiFi systems are sufficiently complicated that no reseller, system integrator, or even WLAN engineer, can possibly be an expert in all of the diverse offerings from multiple access point vendors, so most tend to deploy equipment from either a single or a small set of sources. The vendors actively encourage this with pricing promotions and training and certification programs because, like all businesses, they like having a loyal customer-base and the repeat business it generates.
Proper implementation. We have endless debates in the WLAN industry about site surveys, and the validity of performing predictive modeling vs. going on-site to perform pre-deployment and post-deployment surveys. A predictive model is, by definition, a model, which is a simplified mathematical representation of reality. The modeling tools we have today, such as Ekahau, AirMagnet, and TamoGraph, are quite mathematically sophisticated at computing RF propagation, but they can only ever be as accurate as the inputs you put in. Garbage in produces garbage out.
Since every environment is at least somewhat unique in its construction, on-site surveys are obviously better, but these require specialists with custom, hard-to-learn tools and take a lot of time. This makes site surveys quite expensive in terms of both cost and time, and most customers who perceive the WiFi as “easy” don’t want to pay for it, so they tend not to get done or, at best, rushed.
So what do we do as WiFi engineers? The best we can. We try to standardize on a set of solutions and best practices, but not make this standardization so rigid that we cannot be flexible and adapt to unique requirements or unusual constraints. We also build robust designs that are built conservatively with a lot of margin for capacity and growth. We may not know what the iPhone 10 is, but we can safely assume it will consume more data and that there will be more of them compared to what we are used to today.
We also hopefully build service contracts to periodically tune and refine the WLAN while it is in operation. Undoubtedly, channels will need to be tweaked, coverage may need to be extended, or capacity may need to be increased over the life of a network. Finally, we as WiFi engineers must continue to hone our craft. WiFi is still a rapidly changing technology, and our understanding of what works in practice and what doesn’t will keep evolving as we deploy more networks and encounter real-world issues.

Monday, November 30, 2015

Private Pre-Shared Key (PPSK) for Small Business




There are two types of security in the Wi-Fi protocol: WPA2 Personal and WPA2 Enterprise.    WPA2 Personal (a.k.a. WPA2 Passphrase) is designed for small personal networks, and requires that each device have a common passphrase used to allow association with the network.  WPA2 Enterprise is based on the 802.1X standard, where each client device has a unique set of pre-established credentials, and the access point connects the client device to an external database to verify those credentials before allowing association with the network.

Neither of these security methods are appropriate for the small/medium business market (SMB).   WPA2 Personal does not offer the level of security needed by SMBs, but WPA2 Enterprise is quite complicated to operate in practice, and generally requires dedicated IT staff to implement and maintain the databases and the credentials for client devices. 

Accordingly, a security solution is needed for the SMB where individual client devices can be managed, but without the complexity of a full WPA2 Enterprise solution.   A few AP vendors, including Aerohive, Ruckus, and Xirrus, implement variations on Private Pre-Shared Key, which combines the use of a passphrase with an internal database to provide each client device a unique WPA2 passphrase.  If implemented correctly, this approach can provides enhanced security while being fairly simple and straightforward to implement.

The Problems with WPA2 Personal

WPA2 Personal relies upon a pre-shared-key, or passphrase, to authenticate to the Wi-Fi network.  All devices use the same WPA2 passphrase to connect to the network.  This is suitable for home and very small network environments implementing a handful of devices that are all under the control of a single set of owners.

WPA2 Personal is commonly used in the SMB environment, but it is becoming increasingly problematic because of several security risks. 

-        Distribution:   The WPA2 passphrase is usually given out to employees, so that they can configure their own personal devices to connect to the Wi-Fi.  If the WPA2 passphrase is shared, then any employee could consciously share the WPA2 passphrase with a third party.  Even if the SMB has an IT person do this configuration and not publicize the WPA2 passphrase, the WPA2 passphrase is present on the device of any former employees after they leave the employ on the SMB.  While the SMB could change the WPA2 passphrase on their Wi-Fi and all connected devices, this is logistically challenging and therefore isn’t generally done. 

-        Automated Tools for Sharing Networks on Social Media:  There are now automated tools that automatically facilitate the sharing of WPA2 passphrases over social media, including Wi-Fi Sense in Windows 10 and Wi-Fi Master Key on Android.  These applications are intended to share someone’s personal network with their friends, but the ability to control who this access is shared with is quite limited.  Accordingly, users may unknowingly share the WPA2 passphrase over social media.  While the WPA2 passphrase is not directly shared with the third party user, it is provided to the device and allows third party devices on to the Wi-Fi network, which effectively breaks the security of the network.  For more information, check out http://www.emperorwifi.com/2015/11/wi-fi-master-key-brings-windows-wi-fi.html and http://www.emperorwifi.com/2015/06/wi-fi-sense-how-microsoft-has.html)

-        WPA2 Personal Can Be Hacked:  When a WPA2 Personal or Enterprise connection is established, a private set of encryption keys is established between the access point and each associated client device.  For WPA2 Enterprise, the seed for this encryption key is unique and comes from the authentication server.  For WPA2 Personal, the seed for the encryption key is the WPA2 Passphrase.  A hacker who already possesses the WPA2 passphrase and can capture the association traffic of a client device can derive the encryption key for that client device and thus decrypt wireless traffic from that client.

-       Ineffective for Guest Networks:  Many SMBs open up their own networks (or more hopefully set up a dedicated SSID and VLAN) for visitors or customers.  This is especially important in service businesses, such as restaurants, cafés, hotels, doctor’s offices, or any other locations where customers need to wait for long periods for a service to be provided.  Many SMBs protect this network with WPA2 Personal, which is quite ineffective as this WPA2 passphrase must be distributed publicly, making it an ineffective security measure.  See http://www.emperorwifi.com/2015/05/how-operators-can-make-hotspots-and.html for more information on how to more properly secure a guest network.


The Problems with WPA2 Enterprise

In WPA2 Enterprise, the client device connecting to the Wi-Fi network gets authenticated to an authentication server (i.e. a database server via RADIUS) before association to the access point is completed.  The authentication server can either be internal to the access point technology (i.e. implemented on a controller), or it can be an external server on the local network or even the Internet.   The authentication process is known as Extensible Authentication Protocol (EAP), and there are several variations of EAP that dictate different types of credentials and encryption required by both the supplicant (i.e. client device) and the authentication server (i.e. external database accessed via RADIUS).  Most modern EAP implementations require mutual authentication between the supplicant and authentication server, which typically requires a signed certificate on the database server and either client certificates, tokens, or other credentials on the client device.   The most difficult part of implementing EAP are supporting the client devices, as each client device must have appropriate credentials pre-loaded.   Additionally, many IoT devices and network appliances simply do not have the capability of supporting WPA2 Enterprise.

The authenticator (i.e. the access point) acts only as a middleman during the EAP authentication process, and thus doesn't care which EAP method gets used.  Configuring WPA2 Enterprise on an AP is therefore quite simple, as all the AP needs to know is the IP address and port of the RADIUS server, along with a shared secret (i.e. password) for authenticating communication between the AP and the authentication server over the wired network. 

When a client is approved for access to the network by the authentication server, the server passes information to the AP, including the fact that the client device is approved and the seed for generating the unique unicast AES encryption key between the AP and the client device. 

It is possible to set up the authentication server to pass additional information to the AP when a client successfully authenticates.  One application of this is dynamic VLANs, where the authentication server tells the access point the desired VLAN tag of the client device is passed to the AP.  The AP is then responsible for tagging the traffic from the client device for the VLAN identified by the external authentication server.  Using this approach, multiple client devices can associate to a single VLAN on a single access point, but each be on a different VLAN, based on the information received from the authentication server.

Private Pre-Shared Key

PPSK integrates WPA2 Personal and WPA2 Enterprise in a way that is quite suitable for the SMB market.  With PPSK, each user / client device is assigned a unique WPA2 passphrase, which is tracked by the access points in a database to match up a passphrase with the client device MAC address(es).  From the client device’s perspective, this is still WPA2 Personal, so there are no client / server certificates to manage nor are there issues with compatibility to IoT and other Wi-Fi appliances.   Since the WPA2 passphrase is unique to each user / client device, the risks with WPA2 Personal are eliminated.   The WPA2 passphrase for an individual employee can simply be disabled or changed.  Since it is not publicly known, it also cannot be hacked by a local wireless packet sniffer.   Additionally, add-on features to WPA2 Enterprise like dynamic VLANs can also be enabled for PPSK very readily.

While the current implementations are proprietary, it actually is fairly straightforward to add this feature to any access point platform with centralized management.  The following is required to implement PPSK on an AP platform:
  • A central database of users, device MAC address(es), and passphrases.   A copy of this should ideally reside on-site on a controller, but if no on-site controller is in place, then the database can be located on a cloud-based controller (a cloud-based database may lead to association and roaming delays).  This can be the same RADIUS database that supports WPA2 Enterprise,  The MAC address(es) can either be entered up-front by the network administrator, or with only one MAC address per passphrase, can be added to the database upon first use of the passphrase to minimize overhead burden.
  •  802.11r support for fast roaming.  This is especially important for a cloud-based database.
  • AP firmware needs to be able to select the option “WPA2 PPSK” for the security of an SSID and verify passphrase against APs central database.
  • A user interface in the on-site or cloud controller to allow network administrator to input the following parameters:
  1. Name of user
  2. Passphrase (a random character generator would be a good feature here)
  3. MAC address(es) of allowed devices 
  4. Dynamic VLAN ID (if supported)

Sunday, November 22, 2015

Dynamic VLANs: A simple explanation



Dynamic VLANs are a fairly common feature used in large corporate enterprise applications such as hospitals, universities, large corporate offices, and similar.  Dynamic VLANs are fairly unusual in SMB environments, as WPA2 Enterprise is required as a prerequisite, though using WPA2 Enterprise does not necessarily require use of Dynamic VLANs.   Thus, only some access point and switch vendors offer support for Dynamic VLANs. Nonetheless, it is a good option in some circumstances, and is another tool in the toolbox for Wi-Fi and network engineers 

VLAN Description and Background

While VLANs are defined by the IEEE standard 802.1q, there is no IEEE standard for dynamic VLANs.  It is one of those feature enhancements that one AP vendor (probably Cisco, but I don't know for sure) invented several years ago and many other AP vendors copied.

VLANs, or Virtual Local Area Networks, are a method of segmenting users into different groups that are normally isolated from each other.   It allows one physical set of network infrastructure hardware (i.e. router, switches, APs, cabling) to act like they are multiple parallel co-located networks, hence the term "virtual".  In addition to only requiring one physical set of hardware, VLANs are transparent to client devices.  Traffic is "tagged" as it enters the network either wired or wirelessly, traverses the wired network infrastructure with this identifying tag, and then the traffic is "untagged" when it leaves the network, either to another client device on the network or to the WAN / internet. I've given a detailed explanation of VLANs in a prior blog post.

Here is a simple analogy to visualize how VLANs work:  You send a letter in the mail and hand it to a postman, who takes this letter and puts it into a larger colored envelope to send it through the mail system.  The post office routes the envelope through their extensive network infrastructure based on the color, as different colors get handled and routed differently.  The postman on the other end removes the original letter from the colored envelope before delivering it to the intended recipient.

Virtually every enterprise AP vendor implements "static VLANs".  With static VLANs, each SSID is associated with one particular VLAN.  If you connect to the SSID "staff", all of your traffic is tagged to be on the staff VLAN.  Another device next to you connects to the SSID "visitor" on the same AP and is tagged to be on the visitor VLAN, and so forth.  The traffic to/from these devices behave as if they are on completely independent networks, even though they are actually on the same physical network.  Since most enterprise APs can typically support up to 8 SSIDs (per band), up to 8 different groups of users (i.e. VLANs) can be supported wirelessly.

Dynamic VLANs

In contrast, Dynamic VLANs assign users to VLANs based on their WPA2 Enterprise user credentials.  In WPA2 Enterprise, the client device connecting to the Wi-Fi network must be authenticated to an external server via RADIUS before association to the access point is completed.  This authentication process is known as Extensible Authentication Protocol (EAP), and there are several variations of EAP that dictate different types of credentials and encryption required by both the supplicant (i.e. client device) and the authentication server (i.e. external database accessed via RADIUS).  The authenticator (i.e. the access point) acts only as a middleman during the EAP process, and thus doesn't care which EAP process gets used.  Configuring WPA2 Enterprise on an AP is therefore quite simple, as all the AP needs to know is the IP address and port of the RADIUS server, along with a shared secret (i.e. password) for authenticating  communication between the AP and the authentication server over the wired network.  When a client is approved for access to the network by the authentication server, the server passes information to the AP, including the fact that the client device is approved and the seed for generating the unique unicast AES encryption key between the AP and the client device. 

It is possible to set up the authentication server to pass additional information to the AP when a client successfully authenticates.  For Dynamic VLANs, the desired VLAN tag of the client device is passed to the AP.  The AP is then responsible for tagging the traffic from the client device for the VLAN identified by the external authentication server.  Using this approach, multiple client devices can associate to a single VLAN on a single AP, but each be on a different VLAN, based on the information received from the authentication server.  Any arbitrary number of VLANs could be supported on a single SSID (up to 4096, since VLANs are defined by 802.1q as a 12 bit number in the MAC header frame - in practice an AP will runs out of client device capacity long before that).  If a client device is authenticated by the authentication server but for some reason the server does not identify a VLAN for the client device, the AP will use a particular hard-coded default VLAN (i.e. it behaves like a static VLAN).

It must be noted that the switch ports connecting to the APs, along with the backhaul ports interconnecting switches together and linking to the router, must all be configured to allow tagged traffic all of the VLANs that can possibly be assigned to client devices by the authentication server.

The particular VLAN tags themselves must be identified by the IT Administrator of the network for each device / user account in advance, and be part of the the user's database entry in the authentication server when their account is created.

Since dynamic VLANs require a lot of administrative overhead by the network operator,  it is generally only used on very large corporate networks where the IT department issues the client devices to users, or has an established process to register BYOD clients.