Jumat, 01 Februari 2008

Hack 6 Bluetooth: Cable Replacement for Devices

Bluetooth eliminates the need for cables that tether your tiny devices.

While the 802.11 protocols were designed to replace the ubiquitous CAT5 networking cable, Bluetooth aims to replace all of the other cables connected to your computer (with the sad exception of the power cable). Operating as a frequency hopper in the 2.4 GHz ISM band, it shares the same spectrum as 802.11b/g and many other devices. It is designed to create a so-called "Personal Area Network" for devices like cell phones, digital cameras, PDAs, headsets, keyboards and mice, and of course, computers. While it is possible to use Bluetooth for an actual Internet connection, it seems to be better suited for low bandwidth data and voice applications.

Pros

  • Very low power requirements, making it ideal for small battery-powered devices such as handhelds, phones, and headsets.

  • Simple interface and security model.

  • Exceptional interoperability between devices.

  • Built-in support for simultaneous data and voice traffic.

Cons

  • Relatively low data throughput (about 720 Kbps maximum).

  • Shares the 2.4 GHz band with many other devices, including 802.11b/g.

  • Very limited range, by design.

Recommendation

Bluetooth uses an aggressive full duplex frequency-hopping scheme (changing channels up to 1,600 times per second) to attempt to avoid noise in the 2.4 GHz band. While this may be good for Bluetooth, high power frequency-hopping devices can cause considerable interference for other devices using the band. Fortunately, most Bluetooth products operate only at 1mW, keeping most interference limited to a very small area. Even when using Bluetooth alongside an 802.11b connection, the perceived interference turns out to be minimal, and most people don't even notice the difference with normal usage. If you are using 802.11a in the presence of Bluetooth devices, the two will not interfere with each other at all.

The 802.11 protocols and Bluetooth are complementary and solve very different problems. I will show you some cool things you can do with Bluetooth in Chapter 2, and much of the rest of this book will focus on fun with 802.11.

Hack 5 802.16: Long Distance Wireless Infrastructure

The long awaited Municipal Area Network protocol is on the way, but isn't here just yet.

Approved on December 6, 2001, 802.16 promises to be the answer to all of the shortcomings of long distance applications that people have encountered using 802.11 protocols. It should be pointed out that the 802.11 family was never intended to provide long distance, metropolitan-area coverage (although I'll show you some examples of people doing exactly that). The 802.16 specification is specifically designed for providing wireless infrastructure that will cover entire cities, with typical ranges measured in kilometers. It will use frequencies from 10 to 66 GHz to provide commercial quality services to stationary locations (i.e., buildings). In January 2003, a new extension (802.16a) was ratified, which will operate in the 2 to 11 GHz range. This should help significantly with line-of-sight requirements of the extremely short waves of 10 to 66 GHz. Realistically, actual equipment that implements 802.16 is just now coming to market, and will likely be priced well above the consumer-grade equipment of the 802.11 family.

Pros

  • 802.16 is designed for long-range networking, likely providing ranges of 20 to 30 kilometers.

  • Very high speed for fixed wireless, probably about 70 Mbps.

Cons

  • Shorter wavelengths of 10 to 66 GHz are more susceptible to signal fade due to environmental conditions (such as rain).

  • Many bands used by 802.16 and 802.16a are licensed spectrum.

  • It's just not available yet.

Recommendation

It will be interesting to see the 802.16 MAN story as it evolves, but it's too early to tell how this technology will fare. Fujitsu is currently developing an 802.16a chipset that it expects to have ready sometime in 2004, and is currently targeting a price tag of about $300. 802.16 will certainly be a welcome technology for long distance point-to-multipoint applications, which are difficult to implement effectively using 802.11. But unfortunately, the hardware isn't available to play with yet.

Hack 4 802.11g: Like 802.11b, only Faster

Turbo charge your wireless network without leaving your 802.11b users in the cold.

At the time of this writing, the 802.11g specification has just been ratified by the IEEE. 802.11g uses the OFDM encoding of 802.11a in the 2.4 GHz band, and also falls back to DSSS to maintain backwards compatibility with 802.11b radios. This means that raw speeds of 54 Mbps (20 to 25 Mbps data) are achievable in the 2.4 GHz band, all while keeping backwards compatibility with existing 802.11b gear. This is a very promising technology—so promising, in fact, that the lack of ratification didn't stop some manufacturers from shipping gear that used the draft standard, even before it was ratified.

Pros

  • Very high data rates of up to 54 Mbps.

  • Backwards compatibility with the phenomenally popular 802.11b offers a simple upgrade path for existing users.

  • 802.11g uses the same band as 802.11b, so existing antennas and feed lines can be reused.

Cons

  • Slightly more expensive than 802.11b, but prices are expected to fall as more equipment ships.

  • As it uses the 2.4 GHz ISM band, 802.11g will have to contend with many other devices, leading to more interference in crowded areas.

Recommendation

If you are building a network from scratch, strongly consider the benefits of 802.11g. It allows existing 802.11b users to continue to use the network, while providing a significant speed boost for 802.11g users. While it is a very new technology, reports from early adopters look very good. Apple has already decided to use 802.11g as its high speed standard in their new "AirPort Extreme" line of wireless gear. Note that the WECA hasn't referred to 802.11g as "Wi-Fi" yet, but just give them time.

802.11g will likely be a massively popular technology, as it promises many of the advantages of 802.11a without significantly raising cost or breaking backwards compatibility. My advice is to keep watching 802.11g and roll it out if you can afford it. Since it offers many advantages with relatively few drawbacks, I believe it is poised to become the next massively ubiquitous wireless technology.

Kamis, 31 Januari 2008

Hack 3 802.11b: The De Facto Standard

Many people continue to use 802.11b, the protocol of the Wi-Fi revolution.

Throughout this book, I mainly discuss 802.11b (also known as Wi-Fi, but then, so is 802.11a). It is the de facto wireless networking standard of the last few years, and for good reason. It offers excellent range and respectable throughput. (While the radio can send frames at up to 11 Mbps, protocol overhead puts the data rate at 5 to 6 Mbps, which is about on par with 10baseT-wired Ethernet.) It operates using DSSS at 2.4 GHz, and automatically selects the best data rate (either 1, 2, 5.5 or 11 Mbps), depending on available signal strength. Its greatest advantage at this point is its ubiquity: millions of 802.11b devices have shipped, and the cost of client and access point gear is not only phenomenally low, but also ships embedded in many laptop and handheld devices. Since it can move data at rates much faster than the average Internet connection, it is widely regarded as "good enough" for general use.

Pros

  • Near universal ubiquity in standard consumer devices, add-on cards, and APs.

  • Extreme popularity and pressure from 802.11a/g has led to massively discounted hardware. Cards less than $40 and APs less than $100 are common as of this writing.

  • 802.11b "hot spots" are available at many coffee shops, restaurants, public parks, libraries, and airports, further increasing its popularity.

  • With many people using and experimenting with it, 802.11b is arguably the most hackable (and customizable) wireless protocol on the planet.

Cons

  • The 11 Mbps data rate of 802.11b will never get any faster, and is already surpassed by 802.11a and 802.11g.

  • 802.11b's channel scheme allows only for three nonoverlapping channels, making for considerable contention in the 2.4 GHz ISM band.

  • Standard 802.11b security features have been revealed to be less than effective. See [Hack #87] and all of Chapter 7 for details.

Recommendation

While it is impossible to forecast the fickle weather patterns of the consumer marketplace, it is very likely that 802.11b has at least a few years left in it. Millions of devices have shipped, making it the most popular wireless networking protocol on the planet. Ironically, it will probably get a life extension from its competitor 802.11g, as the newer 802.11g equipment will work with existing 802.11b access points. This makes upgrades less of an immediate issue, and if there's anything that network administrators hate, it's upgrading the critical network devices.

Considering that average Internet speeds are still much slower than 802.11b, it is likely that 802.11b will be used as a mechanism for providing Internet access for some time yet. Backbone links and corporate networks may have an immediate need for the increased bandwidth of 802.11a and 802.11g, but for the average Internet user, 802.11b provides sufficient speed and a very simple mechanism for accessing networks. Even after three years of explosive growth, 802.11b continues to enjoy a lively general acceptance.

Hack 2 802.11a: The Betamax of the 802.11 Family

802.11a offers more channels, higher speed, and less interference than other protocols, but it still just isn't popular.

According to the specifications available from the IEEE (at http://standards.ieee.org/getieee802/), both 802.11a and 802.11b were ratified on September 16, 1999. Early on, 802.11a was widely touted as the "802.11b killer," as it not only provides significantly faster data rates (up to 54 Mbps raw, or about 27 Mbps actual data), but also operates in a completely different spectrum—the 5 GHz UNII band. It uses an encoding technique called Orthogonal Frequency Division Multiplexing (OFDM).

While the promises of higher speeds and freedom from interference with 2.4 GHz devices made 802.11a sound promising, it came to market much later than 802.11b. It also suffers from range problems: at the same power and gain, signals at 5 GHz appear to travel only half as far as signals at 2.4 GHz, presenting a real technical hurdle for designers and implementers. The rapid adoption of 802.11b only made matters worse, since users of 802.11b gear didn't have a clear upgrade path to 802.11a (as the two are not compatible). As a result, 802.11a still isn't nearly as ubiquitous or inexpensive as 802.11b, although client cards and dual-band access points (which essentially incorporate two radios, or a single radio with a dual-band chipset) are coming down in price.

Pros

  • Very fast data rates: up to 54 Mbps (raw radio rate), with some vendors providing 72 Mbps or faster with proprietary extensions.

  • Uses the much less cluttered (for now, in the U.S.) UNII band, at 5.8 GHz.

Cons

  • As of this writing, 802.11a equipment is still more expensive on average than 802.11b or 802.11g.

  • Most 802.11a client devices are add-on cards, and the technology is built into relatively few consumer devices (specifically laptops).

  • 802.11a PCMCIA cards require a 32-bit CardBus slot, and won't work in older devices.

  • Cards and APs with external antenna connectors are hard to find, making distance work difficult.

  • Upgrading from 802.11b can be painful, as 5.8 GHz radiates very differently from 2.4 GHz, requiring a new site survey and likely more APs.

  • Limited range compared to 802.11b and 802.11g, at the same power levels and gain.

  • Internal 802.11a antennas tend to be quite directional, making them sometimes annoyingly sensitive to proper orientation for best results.

Recommendation

The Wi-Fi alliance (http://www.weca.net/) tried to call 802.11a "Wi-Fi5," but the name never stuck. These devices are also sometimes confusingly labeled "Wi-Fi," just like the completely incompatible 802.11b. Be sure to look for the specification's real name (802.11a) when purchasing gear.

802.11a can be significantly faster than 802.11b, but achieves roughly the same throughput as 802.11g (27 Mbps for 802.11a, compared to 20-25 Mbps for 802.11g). 802.11a would be ideal for creating point-to-point links, if devices with external antenna connectors were more readily available. Many people tout OFDM's ability to cope with reflections caused by obstacles (called multipath) as a good reason to use 802.11a, but 802.11g uses the same encoding while achieving greater range at the same power and gain. Some consider the shorter range of 802.11a to be a security advantage, but this can lead to a false sense of security. See the introduction to Chapter 6, as well as [Hack #81] for more details.

Keep in mind that the 54 Mbps data rate is the theoretical maximum, and frequently is only achieved when in very close proximity to the AP. The speed scales back sharply as your distance from the AP increases, and suffers dramatically when separated by a wall or other solid obstacle. It is a very good idea to perform a site survey complete with throughput testing to determine whether 802.11a is suitable for your intended location.

It is probably a bad idea to build an 802.11a-only network unless you are already committed to using only 802.11a gear. If you want to allow guests to use your network, it is a very good idea to at least incorporate a few dual-band APs (or perhaps a dedicated 802.11g AP), as guest users are more likely to bring 802.11b or 802.11g gear with them.

WARLES HACK

1.1 Hacks #1-12

The mad rush to bring wireless products to market has left a slew of similar sounding yet often completely incompatible acronyms in its wake. 802.11b is the sequel to 802.11a, right? (Wrong.) If I just buy Wi-Fi, then everything will work together, right? (Unfortunately, no.) What is the difference between 802.11 a/b/g, 802.16, and 802.1x? How about GSM, GPRS, GMRS, and GPS? Where does Bluetooth fit into the picture?

Before we can jump into the more advanced hackery that is possible with wireless communications, it is important to understand what we have to work with. Remember that no technology is inherently "better" than any other; which one you should use depends on what you want to accomplish and the resources you have to work with. The goal of this chapter is to familiarize you with many of the popular wireless technologies available today, and to give you an idea of their relative strengths and weaknesses.


Hack 1 802.11: The Mother of All IEEE Wireless Ethernet

While definitely showing its age, the original 802.11 gear still has its uses.

The first wireless standard to be defined in the 802 wireless family was 802.11. It was approved by the IEEE in 1997, and defines three possible physical layers: Frequency Hopping Spread Spectrum (FHSS) at 2.4 GHz, Direct Sequence Spread Spectrum (DSSS) at 2.4 GHz, or Infrared. 802.11 could achieve data rates of 1 or 2 Mbps. 802.11 radios that use DSSS are interoperable with 802.11b and 802.11g radios at those speeds, while FHSS radios and Infrared obviously are not.

The original 802.11 devices are increasingly hard to come by, but can still be useful for point-to-point links with low bandwidth requirements.

Pros

  • Very inexpensive (a few dollars or even free) when you can find them.

  • DSSS cards are compatible with 802.11b/g.

  • Infrared 802.11 cards (while rare) can offer interference-free wireless connections, particularly in noisy RF environments.

  • Infrared also offers increased security due to significantly shorter range.

Cons

  • No longer manufactured.

  • Low data rate of 1 or 2 Mbps.

  • FHSS radios are incompatible with everything else.

Recommendation

802.11 devices can still be useful, particularly if you find that you already have a few on hand. But the ever falling price of 802.11b and 802.11g gear makes the old 802.11 equipment less attractive each day. The FHSS and Infrared cards talk only to cards of the same era, so don't expect them to work outside of your own projects. Infrared requires an absolutely clean line of sight between devices and offers limited range, but it operates well away from the popular ISM and UNII bands. This means that it won't interfere with (or see interference from) other networking devices, which can be a huge advantage in some situations.

I probably wouldn't go out of my way to acquire 802.11 equipment, but you can still build a useful network if it's all you have to work with. They are probably best used for building point-to-point links, but might be better avoided altogether.