Sunday, April 21, 2013

WiFi? or not to WiFi?

I feel as though I should really type this out once; and give everyone a good rundown of HOW wifi works, what should be changed, and what should not be changed.  So here goes.

DISCLAIMER: This is for a fairly intermediate crowd, those who have setup wifi before, understand that wifi has channels, SSIDs, etc. - to those in the industry, that will be considered a beginner level.  I'll try to explain things clearly.

First of all, let's talk about frequency. It's getting so confusing when picking a router, do I get "gigabit" or "Wireless N" or that fancy "Wireless AC" (whatever that is)... what do I need, and why? - I'm here to help with exactly that, and more.

There are two parts when it comes to frequency. First, is the capability of the router (or AP) - is it a "dual band", or "simultaneous dual band"? what's the difference and why does it matter? Well, with most older, common 'wireless' networks for households, you didn't have a choice of 'band' - everything operated on 2.4Ghz.  Just like your radio, where stations operate at frequencies like "104.5 FM" (which is 104.5Mhz) - same applies to wireless, just instead of transmitting voice, it's data.  2.4Ghz is by-far the most common. It's internationally a 'free' channel.  Which means, you don't need a permit to broadcast on the channel, anyone can use it, at any time, for any reason.  This is why you'll see wireless phones toting "2.4Ghz" on the box, etc. This 'band' is the only frequency range available for the 802.11b/g (more affectionately known as 'wireless b' and 'wireless g').  In being so, earlier model routers, and inexpensive options will default to this range and this range alone; not having the necessary transceivers to operate anywhere but on the 2.4Ghz spectrum.  "Dual band" comes from routers being able to operate not only on the 2.4Ghz band, but the 5Ghz band aswell. The 5Ghz band typically ranges from 5.180Ghz to 5.825Ghz, which is much more broad than the 2.4Ghz band (spanning 2.412Ghz to 2.472Ghz); the benefits of this is quite simple, more room for more networks; this leads us into our second point, then we'll have a small discussion on which is better in what situations.

The second part of frequency has to do with contention; contention is a fancy term to talk about interference - specifically the interference created by OTHER networks operating on the same, or similar frequencies. I've already mentioned that each 'band' is a span of frequencies; what I haven't said is that each of those frequencies boils down to 20Mhz segments.  Let me start with an analogy.  Think for a moment about our earlier discussion of radio.  When you're in your car, as I'm sure you're familliar, if you tune away, just one step from a local radio station (one that comes in quite clearly) often, you can hear the station, both one-step above and below the actual 'channel' - this is because of BANDWIDTH. the station is CENTERED on the frequency you're tuned into - our earlier example was 104.5Mhz; this is the channel center. From there, the station occupies an amount of frequency range both above and below the 104.5Mhz mark, the further you get away from the station, the lower the effect of this, so it won't happen on all stations. You'll notice that at 104.3 and 104.7 (the next step in either direction), you can still hear the original station, though the transmission may be poor, it's there.  Same thing with wifi, except the channels are 5Mhz apart, and the bandwidth is 20mhz - this means that there are a LOT of overlaps when it comes to 2.4Ghz. so much so, that in north america, there are only 3 viable "non overlapping" channels: 1, 6, and 11.  Obviously on 5Ghz, there are many more channels, and while they overlap with other channels just as much, there are so many of them, there's a large portion more "non-overlapping channels".

So what does this all mean? how does it affect your decision on a router? well, quite simply put, depending on where you live and what you need, you may want to pick 5ghz, or you may require 2.4ghz.  According to the scientific properties of electromagnetic waves, the lower the wavelength, the less likely it is to be scattered and/or misdirected - this means if you need high penetration, or longer distance, 2.4Ghz is likely for you.  how long? about 75m (240 ft).  you can attain longer links with directional antennas (eg parabolics .  If you need shorter-range with more reliable access in a high-density environment (eg, a housing complex or apartment building), 5ghz is definitely the way to go.

Word of warning while choosing a frequency range - many small devices (such as smartphones and tablets) don't necessarily support dual-band. it would be worthwhile to look into this while picking an option.  That said, if you're in a high-density environment, but need both high reliability and 2.4ghz for micro devices, a simultaneous dual band option would be best, as it will do both 2.4ghz and 5ghz at the same time.

Next, let's talk network names and encryption.

If you've ever setup a wireless network, you've dealt with these before.  The key with network naming is to pick something unique for you, that you don't mind having other people see, that you will recognize as yours. I've seen people even put witty phrases as their network names. be creative; the sky is the limit here.  Next, you'll have to consider encryption. DO NOT, and I really mean this, DO NOT USE WEP - if anyone tells you to use it, hit them for me.  ALWAYS use WPA.  WPA2 if possible.  Don't complicate the wireless too much, if you're going to use a WPA/WPA2 mixed (or WPA2 Auto) set encryption to auto as well. for just WPA, use TKIP, for just WPA2, use AES.  I cannot recommend highly enough to use WPA2 with AES.  This is an industry standard (802.11i for those curious), and is the recommended configuration from apple, the wifi alliance and IEEE for wireless encryption.  It is the newest and possibly the best wireless encryption standard to date and has yet to be broken.  WITH THAT SAID, pick a good wireless encryption key sequence; the only known attacks on WPA2/AES to date, have to do with guessing passwords. Do not just use character substitution in a short word for the password.  Eg: 'P@ssW0rD' is no more secure than 'Password' - use something long, and easy to remember.  In the past I've used slogans and parts of mission statements, or peoples combined middle names (eg, the middle names of all the people that regularly use the wireless, with spaces inbetween) - ensure it's not something you'll hesitate to give out to guests who need wireless, but ensure it's not something someone who doesn't know you, will readily guess, or be able to pull from a dictionary.  Even using a line from a song that the whole family enjoys, is more secure than a single word; whether that word has numbers and symbols in it or not.

I cannot emphasize strongly enough to use a strong wireless password. take some time and do it right, you'll never have to worry about it again.

Next, we're going to get into some more complicated stuff. You'll find most of these options in your "Advanced" section.  I won't tell you which ones to pick to turn on or off, you'll have to decide on that from my description of what they do; no two networks are built for doing the same thing, and no two networks are designed for the same users; be careful when changing these options as they can also have adverse effects on performance - however, DO EXPERIMENT - the worst that can happen is needing to reset the router to defaults (a procedure you should look up first) and re-configuring it from scratch to get reconnected.  Enjoy.

BEACON INTERVAL:  This setting changes how frequently the Beacon is sent. The Beacon has two main tasks: 1. to inform stations that the access point is still active, and 2. to deliver 'wake up' messages to stations in 'low power' states.  I'll deal with point #2 more in my next talking point "DTIM Interval".  Basically, the beacon contains information about the network, the network name, it's wireless encryption types (only types, not the keys), etc. effectively everything required for a new station to connect.  Higher Beacon intervals: less intrusive. the Beacon has a fairly high priority for transmission, as it not only provides information for new stations to connect it tells existing connections that it's still around, if the Beacon is set too low, the router or AP will spend all it's time and available bandwidth advertising that it's there, and spend no time actually moving information.  Too low of a beacon interval, and connected stations may lose their connection at random.  The beacon is typically measured in ms, and the default is typically 100ms (1/10th of a second), I've seen these as low as 250ms (1/4 of a second) or as frequently as 50ms.  Depending on your needs, you may want to increase this number, if it creates a problem of dropped connections you may want to decrease the number.

DTIM Interval: DTIM's are wake-up messages for 'sleeping' devices. effectively it boils down to; if a small device is in a standby state or has activated a low-power state on the device will only power-up for two reasons: 1. to send information.  2. a DTIM request.  Basically, the DTIM is telling the low-power devices, to connect to the AP, since it has a message for it. the device will 'wake' from it's low-power mode, connect to the AP and request the delayed transaction message.  In low-power states, the device will only listen for beacons, nothing more.  DTIM is set in frequency of beacon intervals; so a setting of 1, is every beacon, 2, is every other beacon. etc.  Typically DTIM is set to 1 or 2, but can be set higher if you wish. KEEP IN MIND, this is also based on the beacons interval, if you have a higher interval, you may want to consider a lower DTIM, a higher beacon, you may want to consider a lower DTIM.  I don't believe there are any adverse effects to a higher DTIM, except that low-power devices (such as cellphones and tablets) will take seconds longer to receive a message while in standby; this may not be important to you.

PREAMBLE: options are long and short.  Long preambles are required for older equipment, and are more standards compliant. however, there are many performance improvements to a short preamble.  Effectively, the preamble is a sync message prior to transmission, it's sent by the transmitting station (eg. your PC or the router), so that receiving stations can sync their clock rate to the transmission. newer hardware requires less preamble to sync.  cheap hardware may also require a longer preamble.  There is no significant change in router performance either way, short is better, but only slightly.  If possible use short, if any device exhibits strange connection behavior, try a long preamble to try to correct the problem.

PROTECTED MODE:  This is kind of a big topic, so try to hold on.  Effectively Protected mode has two parts: 1. a "basic" rate, and 2. a request, then send, method of communication.  Let me break this down a little. The basic rate is the MINIMUM require connection speed that a station must sustain to be able to participate in the network.  Typical values are 1 or 2Mbps.  This is low because, typically, you want a lot of compatibility.  If you're on a computer with wireless, you can check your connection rate at any time, typically by opening your wireless connection status window; it will show the connection "speed" - if that speed is less than the basic rate of the network, your connection is not considered valid.  The reason this is important is because of the second point.  The basic rate is used for control messages for RTS/CTS (Request to Send, Clear to Send) requests.  Protected mode, if set to auto, is triggered when the network detects that some stations cannot 'hear' other stations, and/or collisions (more than one station sending at a time) happens frequently.  How this works is as follows.  Your PC (let's just say, it works in reverse too) will transmit a RTS to the AP.  That request contains all the information about the length of the transmission you want to send, etc. the AP will then transmit a CTS, which includes all the information from the request, plus a confirmation that you're clear to send.  The AP does this so that every station on the network knows that someone is transmitting for X ms (whatever was defined in the RTS). All other stations will now wait (or "back off") for AT LEAST that length of time, before attempting to request to send.  This is analogous to raising your hand to speak in a classroom.  While just blurting out answers is faster, if everyone did that, you would not be able to understand anyone.  This, while slowing down the overall transaction time for each message sent, ensures that only one "person" (or station) 'speaks' at a time.  This ensures more reliable communication across the network, but can slow it down significantly.  If you're in a situation where you have a lot of differing devices with differing capabilities, you may want to consider turning this on.  If you're in a situation where you need faster speed of message transaction, you may want to turn this off. cases and results will vary.

Wireless Multimedia (WMM): Also known as WME (Wireless Multimedia Extensions) is an extension of the RTS/CTS found in protected mode.  Effectively, what happens is an RTS/CTS request/response occurs, whether or not Protected mode is enabled, however, the main difference here is, rather than sending just one message, the station is requesting time to send a block of messages. - this VASTLY improves overall throughput for the one connection stream, however it greatly delays other transmissions. choose this option carefully.  I highly recommend using an Ethernet connection for anything multimedia; but if you must use wireless to connect a media extender, be sure to enable this; I will leave you with a warning, if anyone is doing anything time-sensitive on the network (VoIP or Gaming), and this option is set to ON, they WILL NOTICE a significant drop in responsiveness in their data.  For gamers, this phenomenon is referred to as "lag".  Reduce LAG by turning off WMM.

There you have it. The comprehensive 'advanced wireless configuration for dummies' guide.  I hope this helps some people in choosing the right wireless access points and network configurations.  I don't think this is the first time I've posted this.  In any case, have a great day, and may all your packets arrive with their checksums intact.

No comments:

Post a Comment