Jumat, 01 Februari 2008

2.1 Hacks #13-19

There is much talk in the communications industry of providing "last mile" connectivity. Think of Bluetooth as providing connectivity for the last 10 feet. Bluetooth excels as a handy cable replacement technology, helping to eliminate the need for cumbersome wires that you might find on headsets, remote controls, PDAs, and other small devices. Bluetooth aims to end the days of needing to carry a three-foot piece of cable with obscure connectors on either end everywhere you go, just to interface to your laptop. You can use Bluetooth-enabled devices to talk to a laptop or a desktop, or even have them talk to each other to exchange data almost effortlessly. There are also a number of Bluetooth-enabled input devices on the market, such as mice and keyboards. While it does increase one's dependency on batteries, Bluetooth can go a long way toward cutting down on the rat's nest of cables that comes with personal computing. This chapter demonstrates some nifty directions people are taking with Bluetooth.

Also presented in this chapter are a couple of hacks about how to interface with mobile data networks [Hack #8]. These networks are particularly handy to use when Wi-Fi or other connectivity just isn't available. Devices that combine Bluetooth, mobile data networks, on-board storage, audio capability, and even video cameras are just coming to market. These advanced devices are just the beginning of the inevitable convergence of consumer products with general purpose computers and the Internet, creating an unprecedented level of connectivity for the average user. Here are some hacks that push this concept of hyperconnectivity quite far.

Hack 12 BSS Versus IBSS

BSS/Master/AP/Infrastructure/IBSS/Ad-Hoc/Peer-to-Peer: these all refer to 802.11b operating modes, but what does it all mean?

802.11b (see [Hack #3]) defines two possible (and mutually exclusive) radio modes that stations can use to intercommunicate. Those modes are BSS and IBSS.

BSS stands for Basic Service Set. In this operating mode, one station (the BSS master, usually a piece of hardware called an access point) acts as a gateway between the wireless and a wired (likely Ethernet) backbone. Before gaining access to the wired network, wireless clients (also called BSS clients) must first establish communications with an access point within range. Once the AP has authenticated the wireless client, it allows packets to flow between the client and the attached wired network, either routing traffic at Layer 3, or acting as a true Layer 2 bridge. A related term, Extended Service Set (ESS), refers to a physical subnet that contains more than one access point (AP). In this sort of arrangement, the APs can communicate with each other to allow authenticated clients to "roam" between them, handing off IP information as the clients move about. Note that (as of this writing) there are no APs that allow roaming across networks separated by a router.

IBSS (Independent Basic Service Set) is frequently referred to as Ad-Hoc or Peer-to-Peer mode. In this mode, no hardware AP is required. Any network node that is within range of any other can communicate if both nodes agree on a few basic parameters. If one of those peers also has a wired connection to another network, it can provide access to that network.

Note that an 802.11b radio must be set to work in either BSS or IBSS mode, but cannot work in both simultaneously. Also, BSS Masters (that is, APs) cannot speak to each other over the air without using WDS or some other tricky mechanism. Both BSS and IBSS support shared-key WEP encryption, for what it's worth (see [Hack #87] and the rest of Chapter 7).

Generally speaking, most 802.11b networks consist of one or more BSS Master devices (like a hardware access point, or a general purpose computer running the Host AP driver as seen in [Hack #57]) and several BSS clients (laptops, handhelds, etc.). Ad-Hoc networks, on the other hand, are handy for setting up a point-to-point connection between two fixed devices, or if a couple of laptops need to exchange files and there is no other wireless network present.

In the early days of 802.11b, many manufacturers implemented their own version of Ad-Hoc mode, sometimes referred to as Peer-to-Peer or Ad-Hoc Demo mode. Such devices could only communicate with each other and weren't compatible with true IBSS mode. Recent firmware updates have helped IBSS mode interoperability quite a bit, but not all cards can communicate with each other when speaking IBSS. Generally, any client device can talk to any access point regardless of the manufacturer, provided that both are certified to speak 802.11b.

Hack 11 HPNA and Powerline Ethernet

These nontraditional networking protocols can save you a ton of effort.

While not wireless networking protocols per se, both HPNA and Powerline Ethernet are finding their way into many people's network scheme. Like wireless, they both provide network functionality without requiring the installation of CAT5 cable. But rather than use wireless, they use other common media for their physical connection.

HPNA

HPNA stands for Home Phone Networking Alliance . It provides networking capabilities over existing CAT3 cable, and can share the same wire as a standard telephone line (even if you are using DSL on the same line). HPNA can reach about 1,000 feet over CAT3. The original HPNA 1.0 products can communicate at about 1.3 Mbps, while the newer HPNA 2.0 standard allows for speeds of up to 32 Mbps (although devices operating at 10 Mbps are more common). Some consumer grade routers, such as 2Wire HomePortal 100W, incorporate Ethernet, HPNA, and 802.11b in one unit.

Pros

  • Instant networking in any building with existing telephone wiring.

  • Very simple installation; just plug it in and you're done.

  • Fairly inexpensive.

Cons

  • HPNA isn't nearly as popular as Ethernet or Wireless, so it can sometimes be hard to find in retail stores.

  • HPNA 1.0 is much slower than wireless, but HPNA 2.0 approaches speeds of 802.11b.

  • Every HPNA device uses the telephone line as a shared medium, making it less efficient than a network switch as more devices are added.

Recommendation

HPNA can be ideal for adding access points to additional locations in a house or building that doesn't have CAT5 Ethernet laid to each room. Dedicated Ethernet is better for speed and reliability, but HPNA can make your job much easier. If you need to add additional access points to a building for greater coverage, or you want to shoot "through" a building by adding a device with external antennas on opposite walls, then HPNA can save a great deal of effort when tying it all together.

Powerline Ethernet

Powerline Ethernet uses AC power lines as a physical medium for network traffic. Powerline devices are about as simple as they come; simply plug in a CAT5 cable to one side of the device, plug the other end into any wall outlet, and you should be up and running. Some devices support encryption on the devices, but this is hardly ever necessary. Powerline Ethernet won't cross a power transformer, so your network signal usually stops at the end of your house wiring.

Siemens, Linksys, and NetGear all make popular Powerline adapters that should interoperate well with each other. They advertise speeds of up to 14 Mbps, but actual data rates of 5 or 6 Mbps are typical. As with HPNA, Powerline is a shared medium, much like a networking hub. More devices means more possible collisions and lower throughput.

Pros

  • Very simple installation, with virtually no configuration needed.

  • Data speeds comparable to 802.11b.

  • Ethernet bridges mean no configuration at all on the computer side.

Cons

  • Slightly expensive as of this writing (typically $100 per device, with at least two devices required).

Recommendation

Much like HPNA, Powerline Ethernet can be ideal in situations where CAT5 wiring just isn't practical. This can make installation much simpler whenever you have an AC outlet handy but can't quite get to a telephone line or CAT5 cable. There is no configuration needed in most cases, as the Powerline bridge acts just like a network hub to your Ethernet devices.

While CAT5 is usually preferred over line-sharing protocols such as HPNA and Powerline, these devices can save you a tremendous amount of installation time and effort. If you can cope with the slower data rates and slightly higher cost (compared to Ethernet), then these devices might be a perfect component for your wireless networking project.

Hack 10 802.1x: Port Security for Network Communications

Secure access to virtually any network port (wired or wireless) with 802.1x.

The 802.1x protocol is actually not a wireless protocol at all. It describes a method for port authentication that can be applied to nearly any network connection, whether wired or wireless.

Just when you thought you knew every IEEE spec relating to wireless, suddenly 802.1x appeared on the scene. The full title of 802.1x is "802.1x: Port Based Network Access Control." Interestingly enough, 802.1x wasn't originally designed for use in wireless networks; it is a generic solution to the problem of port security. Imagine a college campus with thousands of Ethernet jacks scattered throughout libraries, classrooms, and computer labs. At any time, someone could bring their laptop on campus, sit down at an unoccupied jack, plug in, and instantly gain unlimited access to the campus network. If network abuse by the general public were common, it might be desirable to enforce a policy of port access control that permitted only students and faculty to use the network.

This is where 802.1x fits in. Before any network access (to Layer 2 or above) is permitted, the client (the supplicant, in 802.1x parlance) must authenticate itself. When first connected, the supplicant can only exchange data with a component called the authenticator. This in turn checks credentials with a central data source (the Authentication Server), typically a RADIUS server or other existing user database. If all goes well, the authenticator notifies the supplicant that access is granted (along with some other optional data) and the client can go about its merry way. The various encryption methods employed are not defined in particular, but an extensible framework for encryption is provided—the Extensible Authentication Protocol , or EAP.

802.1x is widely regarded by the popular press as "the fix" for the problems of authentication in wireless networks. For example, the "other data" that is sent back to the supplicant could contain WEP keys that are dynamically assigned per session and are automatically renewed every so often, making most data collection attacks against WEP futile. Unfortunately, 802.1x has been found to be susceptible to certain session hijacking, denial of service, and man-in-the-middle attacks when used with wireless networks, making the use of 802.1x as the "ultimate" security tool a questionable proposition.

As of this writing, 802.1x drivers for Windows XP and 2000 are available, and many access points (notably Cisco and Proxim) support some flavor of 802.1x. There is also an open source 802.1x supplicant implementation project available at http://www.open1x.org/. It is possible to use the Host AP driver to provide authenticator services to a RADIUS server or other authentication server via the backend.

Unfortunately, the popular press tends to abbreviate 802.11a/b/g as 802.11x, which looks a lot like 802.1x—but don't be fooled. While it has an application in wireless networks, 802.1x actually has nothing to do with wireless networking. For a good discussion of 802.1x security methods and problems online, take a look at http://www.sans.org/rr/wireless/802.11.php.

Hack 9 FRS and GMRS: Super Walkie-Talkies

Use these high powered radios in places where mobile phones just don't cut it.

In the last couple of years, a number of manufacturers have come out with "high power" radios for general use, marketed as family or recreational communication devices and sold as impulse buy items at department stores. They claim a couple of miles range, operate on a chargeable battery pack or AA batteries, and most are surprisingly rugged and simple to use.

The two technologies behind these popular radios are FRS and GMRS. While sold in similar packaging and frequently sitting on shelves right next to each other, these two types of radios are quite different in capabilities and operating rules.

FRS

FRS stands for Family Radio Service , and was approved by the FCC for unlicensed use in 1996. It operates around 462 and 467 MHz, and is sometimes referred to as " UHF Citizens Band." It is not a Part 15 device like 802.11 radios, but is governed by FCC Part 95, Personal Radio Services. FRS radios share some channels with GMRS radios but are restricted to 500mW maximum power. Manufacturers typically claim two miles as the maximum range of FRS radios. FRS radios come with fixed antennas, and cannot be legally modified to accommodate antennas or amplifiers.

FRS channels 1 through 7 overlap with GMRS and can be used to communicate with GMRS radios. If you need to talk only to other FRS radios, use channels 8 through 14 to avoid possible interference with low band GMRS users. See Table 1-1 for the full list of FRS and GMRS frequencies.

GMRS

GMRS stands for General Mobile Radio Service, and is also known as "Class A Citizens Band." Its use is also covered by FCC Part 95, but requires a license to operate. As of this writing, a personal license costs $75 and can be obtained online at http://wireless.fcc.gov/uls/.

Handheld GMRS units can put out up to 5 Watts of power, although 4-Watt handhelds are more common. While fixed-base stations can use up to 15 Watts on most frequencies, they are restricted to 5 Watts when communicating on the FRS channels. Repeater stations are allowed and can transmit as high as 50 Watts. Both fixed-base stations and repeaters can only transmit on the lower "462" frequencies, while handhelds can operate on any GMRS frequency. Again, see Table 1-1 for the full list of FRS and GMRS frequencies. GMRS gear can include removable antennas, making it simple to use a handheld with a car mount or stationary antenna. Combined with the ability to use repeaters, GMRS can be used to communicate over considerable distances.

Table 1-1. FRS and GMRS frequencies

Lower frequency

Upper frequency

Purpose

462.550

467.550

GMRS "550"

462.5625

FRS channel 1, GMRS "5625"

462.575

467.575

GMRS "575"

462.5875

FRS channel 2, GMRS "5875"

462.600

467.600

GMRS "600"

462.6125

FRS channel 3, GMRS "6125"

462.625

467.625

GMRS "625"

462.6375

FRS channel 4, GMRS "6375"

462.650

467.650

GMRS "650"

462.6625

FRS channel 5, GMRS "6625"

462.675

467.675

GMRS "675"

462.6875

FRS channel 6, GMRS "6875"

462.700

467.700

GMRS "700"

462.7125

FRS channel 7, GMRS "7125"

462.725

467.725

GMRS "725"

467.5625

FRS channel 8

467.5875

FRS channel 9

467.6125

FRS channel 10

467.6375

FRS channel 11

467.6625

FRS channel 12

467.6875

FRS channel 13

467.7125

FRS channel 14

Typically, handheld GMRS units use lower frequencies to communicate with each other when possible, and transmit on the upper frequencies (while listening 5 MHz lower) to talk to a repeater. This allows anyone listening on the "462" side to hear traffic both from handhelds as well as from anyone using the repeater. Always use the lower frequencies and the lowest power settings whenever possible to help avoid unnecessary interference with other GMRS users. Use repeaters only when you can't otherwise establish communications.

Extending Range

While higher power radios can help extend your range a little, the best method for increasing your range is to increase your altitude. UHF radios can reach significantly further when the antenna is high in the air, even with limited power. This is one reason why the Part 95 rules limit "small control stations" to antennas no more than 20 feet higher than the structure to which they are mounted. To make the best use of your FRS or GMRS radio, find high ground when transmitting. In some cases, this can push your available range out many, many miles. If you are using a GMRS radio, attaching it to a tall antenna can significantly improve your effective range.

While these radios are half duplex and allow only limited data transmissions, they are handy in a number of situations. For example, when fine tuning a long distance point-to-point 802.11 link, you may find them far more useful than mobile phones. Any time you are working far away from a city, particularly on hills and mountains, FRS and GMRS radios can work considerably better than a phone. But don't get any bright ideas about connecting a radio to a telephone patch; this is prohibited on both FRS and GMRS.

This writing is by no means authoritative on the labyrinthine FCC rulebook, but should give you an idea of what each technology is good for. If in doubt, see the rules for yourself online at http://www.access.gpo.gov/nara/cfr/waisidx_00/47cfr95_00.html. If you are looking for more information about FRS and GMRS, there is also a wealth of information available from the Personal Radio Steering Group at http://www.provide.net/~prsg/rules.htm.

Hack 8 CDPD, 1xRTT, and GPRS: Cellular Data Networks

If you can't roll your own wireless, you might try one of these mobile phone carrier networks.

When it comes to data rates, most people are in agreement that faster is better. But current communications technology always involves a trade-off between speed, power, and range. 54 Mbps may be great if you can get it, but on a large scale, this can be difficult to maintain. The 802.11 protocols compensate for increased range by scaling back the data rate, but these devices simply aren't designed to serve hundreds of people scattered over many miles.

There are times when any data to the Internet is better than none at all, no matter how slow it might be. For example, you might need to log in to a remote machine or send a quick email while traveling, when Wi-Fi or even wired network access just isn't available. Or maybe you want to have an alternate communications channel into a wireless node in a remote place (say, on a mountaintop or deep in the woods) where telephone lines aren't even available. For these situations, you might consider exploiting the biggest advantage of the commercial mobile data networks: their ubiquity.

Mobile networks maybe be slow and relatively expensive, but you can't beat their coverage compared to current Wi-Fi networks. They can give you an IP address just about anywhere, but be warned that most mobile data services are not cheap. Most charge by the byte, and all charge for airtime while you are using it.

The type of data service you can use depends on the underlying wireless technology. Obviously, before choosing a technology, determine the coverage area of the mobile network in the place you intend to use it. The three leading mobile data services are described next, in decreasing order of availability in the U.S.

CDPD on TDMA

CDPD stands for Cellular Digital Packet Data. It works over the enormously popular Time Division Multiple Access (TDMA) mobile network, which is easily the most widely deployed mobile network in the U.S. CDPD "modems" typically use a serial port or PCMCIA slot and offer speeds of up to 19.2 Kbps (real world is typically closer to 9,600 bps).

It looks like TDMA operators are generally migrating to GSM, so it is probably unlikely that TDMA data services will ever be upgraded. In some areas, TDMA is being phased out altogether, making it difficult to obtain a CDPD account. But despite the relatively slow speed of CDPD, you can't beat its coverage. Virtually all of the populated regions of the U.S. are covered by TDMA.

1xRTT on CDMA

CDMA stands for Code Division Multiple Access: it is the second most popular mobile technology in the U.S. The original CDMA data services offered speeds of 9600 bps to 14.4 Kbps. A new upgrade called 1xRTT boasts speeds of up to 144 Kbps, but by many reports, real-world throughput is somewhere between 60 and 80 Kbps, occasionally bursting to 144 Kbps if you get lucky. If you think the 802.11 protocol names aren't confusing enough, you should really try following mobile phone technology. 1xRTT is also known in various circles as CDMA2000 Phase 1, or simply 95-C.

1xRTT is just the first phase of the CDMA2000 plan. A few communities are now trying the experimental 1xEV-DO technology, which can theoretically achieve 2 Mbps from fixed locations over CDMA. This technology hasn't yet been widely deployed. Also, we are told to expect 1xRTT Release A by the end of 2003. This is a software upgrade that promises 144 Kbps uploads and downloads of up to 300 Kbps.

GPRS on GSM

GPRS stands for General Packet Radio Service, and is the data service available on Global System for Mobile communications (GSM) networks. The original GSM data services offered only 9,600 bps throughput, but GPRS allows real-world speeds of 20 to 30 kbps. GPRS is a packet-based protocol, meaning that the GPRS radio transmits only when it actually has data to send. This can save on battery usage, and theoretically makes more efficient use of the network. A number of nifty gadgets such as the HipTop by Danger (http://www.danger.com/) use GPRS for connectivity.

Eventually, GPRS may be replaced by technologies like Enhanced Data for Global Evolution (EDGEyou have to ask yourself how they can use these acronyms with a straight face), which offers theoretical speeds of up to 384 Kbps over GSM. EDGE is still experimental, and hasn't yet been widely deployed. As of this writing, GSM coverage is increasing rapidly in the U.S. but still isn't as ubiquitous as CDMA or TDMA. Much of the rest of the world has a more thoroughly deployed GSM network.

If you find that you need simple wireless connectivity beyond what you can hope to provide with 802.11 technologies, commercial data networks are a viable alternative. They don't come cheap, but can be perfect for many low bandwidth applications.

Hack 7 900 MHz: Low Speed, Better Coverage

Ubiquity is sometimes more important than speed. If you absolutely need to make a link that isn't possible with 802.11, then this older gear might be for you.

In the days before 802.11, a number of FCC Part 15 wireless networking products were competing in the marketplace. For example, Aironet, Inc. (before it was bought by Cisco) produced the Arlan networking series. The Arlan APs and bridges use 10baseT Ethernet, operate at 900 MHz, and have a data rate of 215 Kbps or 860 Kbps. They also made a number of complementary PCMCIA radio cards (the 655-900, 690-900, and PC1000, for example). These devices put out up to a whopping 1 Watt at 900 MHz. NCR had the WaveLAN 900 MHz line that included an ISA and PCMCIA card that would push 2 Mbps at 250mW. While the data rate can't compare to modern wireless networking gear, the higher power and lower frequency of this equipment offers significant advantages.

As the frequency of a signal increases, the apparent range it can cover at the same power and gain decreases. For example, a 100mW signal at 5.8 GHz appears to travel less than half the distance of a 100mW signal at 2.4 GHz, which appears to travel less than half that of a 100mW signal at 900 MHz. There is no limit to how far a signal can actually go, but its ability to rise above the background noise and be detected at a usable level is bounded by its power, frequency, and antenna gain. So to put it simply, all other variables being equal, lower frequency signals travel further than higher frequency signals. You can make higher frequency signals appear to travel further, but to do so you need to increase the power, antenna gain, or both.

Another curious property of radio is that the requirement of having line of sight between the devices becomes more important at higher frequencies, but is less critical at lower frequencies. Higher frequencies don't fare so well when there are obstacles between the ends of the radio link (particularly in urban and indoor settings). This property, combined with the advantage of greater range, means that 900 MHz equipment can be used in a variety of situations where 802.11b/g or 802.11a don't fare as well. It can penetrate foliage, buildings, and other obstacles better than its 802.11 counterparts. Of course, the big trade-off is throughput.

Pros

  • Higher power and superior range.

  • Equipment doesn't compete with the increasingly crowded 2.4 GHz ISM band, but must still tolerate 900 MHz phones, video cameras, baby monitors, and other devices.

Cons

  • Low data throughput, from serial speeds of 9,600 bps up to 2 Mbps or so.

  • Very little vendor interoperability.

  • With the advent of 802.11 networking, 900 MHz gear has increasingly limited availability.

  • Equipment can be quite expensive compared to 802.11 gear.

Recommendation

A number of manufacturers offer serial or Ethernet to 900 MHz bridges. While Ethernet is generally preferable, the serial devices are perfectly capable of supporting a PPP connection between two sites. If you need to create a long distance point-to-point link (particularly where clean line of sight just isn't possible) and can cope with limited data rates, then this equipment might be right for your project. Expect the hardware to be difficult to locate and a bit more expensive than the typical consumer grade 802.11b equivalent.

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.