Wireless Gone Wacky

Wireless RoutersAmong the many things I wish I knew a lot more about is how my home network works. I mean, I have a pretty decent if admittedly fundamental handle on how TCP/IP and DHCP work together, but heaven help me if I ever try to get them to behave reliably for anything other than the most basic of configurations.

I use a heck of a lot of what I think is network address translation or “port forwarding,” directing traffic from outside my LAN to a specific computer within it — a feature I find incredibly handy for SSH tunnels, light HTTP serving and AFP access. All of which frequently amount to exercises in frustration. I can never get my computers to reliably acquire the same IP address on repeated reboots and re-connections to the network. I’ve tried fiddling with a countless combination of settings, including manually acquiring IP addresses and address reservation, with little luck.

The High Cost of Cheap Electronics

Granted, I have an inexpensive, consumer-grade wireless router, but so far, it’s the only one I’ve found that has that particular collection of features that (I think) I need: port forwarding, an inventory of attached devices, IP address reservation and more than one wired Ethernet port. None of the other routers I’ve come across seem demonstrably better. And when I say “the other routers I’ve come across,” I mean none of the other routers I’ve bought, taken home, unboxed, configured, tested and returned to the retailer.

If this is all a bunch of gobbledygook to you, believe me, it’s barely more than that to me. There’s room, plenty of room, for improvement on providing appreciably more facile interfaces to consumers who need to manage their home networks. Not even Apple does a particularly great job of shielding users from the arcane terminology of network protocols; which is a shame, but I can empathize. Hooking up one computer to another — let alone to a network of infinitely more computers — is an invitation to unbridled complexity, and to some extent it’s reasonable to expect users to learn this stuff.

For my part, I’m certainly willing to learn more about it, but I have yet to come across a text that really bothers to explain it to someone like myself who possesses only a moderate understanding of networking technology. Point me to a book that can explain all of this in plain English, and I’ll buy it. Similarly, point me to a great wireless router with an intuitive interface and reliable performance, and I’ll buy that, too.

+
  1. Though tangential to your question, what I’ve often found helps is defining your PCs as ‘static’ DHCP leases – check the manual, it’s a one off process, but it’ll ensure, even via DHCP, that each computer will always get the same leased IP address.

    Oh, and don’t buy D-Link. I have had so many problems with my DI-624+ that I’m ready to throw it out the window and buy a Linksys WRT 54GS next paycheck (but that’s because I’m a Linux geek who will install the firmware and configure it exactly how I want).

  2. That’s funny. I use that same D-Link. Not my choice — I got stuck with it in a move — but I’ve had few problems with it. And the thing I love about it is that it has static DHCP, which I don’t think most home routers do (at least they didn’t when I was shopping two years ago), though I think it’s becoming more common. I agree though, that for what you want to do, static DHCP is probably the easiest way to go.

    Barring static DHCP, I believe you should be able to set your DHCP range to, say, .100-.199. This will have the DHCP server assigning IP addresses to 192.168.1.100-199, for example. Then, on machines you want to have static IPs, set the network settings manually and assign them IP addresses in the 192.168.1.2-99 range (outside the DHCP range).

    This works fine on my home network with my particular router. But any router should be capable of doing this. The main thing is that the static and DHCP ranges cannot overlap in this config.

    Hope that helps. Aw Hell, I just hope it made sense.

  3. I completely understand where the trouble comes from. And you’re not alone since most of my friends ask questions about setting up their routers all the time.

    I’m working on a little set of “How-To” articles on the basics of networking and routing. For those who are interested, feel free to visit my website which is going through a live-spring update.

  4. Is this becoming an epidemic? Since the first of the year, I’m currently on my second router after my old trusty netgear died just after christmas. I purchased a Linksys which ended up being a dud. It dropped it’s signal at least twice a day, and site restrictions didn’t work at all. Just yesterday I went and got a new netgear rangemax which so far has not dropped it’s connection.

    I’ve added vonage for my phone service which puts a kink in my network. The device they send is actually a modem/router and if my wireless router goes down, so does the phone.

    I’m in the same boat. I know enough to be dangerous about wireless networks. I’m a programmer, not a hardware-IT guy. Argh.

  5. Your router should grant you the IP address your computer requests, as long as it is available, so I would suggest choosing an IP address you don’t think will be used, and then code it into your settings.

    Open system preferences, choose network, and then which interface you want to change and then change configure IPv4 from “using DHCP” to “using DHCP with manual address” and then choose an IP address which sits in your subnet mask – if your IP address was 192.168.1.5 then I would suggest something like 192.168.1.168 which should always be available. Basically pick a number much higher than the amount of devices on your network.

    At my office, we have about 20 computers, which get IP addresses automatically via DHCP, and then we have things like the printers which have IP addresses assigned, otherwise we can’t see them. This works no problem for me.

  6. Are you using DHCP for something essential? If not just turn it off and give each of your computers a different IP address.

    I also recommend just doing a spreadsheet that has a list of which computer / router etc has which IP address.

    All you have to do then is configure each computer manually with an IP, Gateway (router IP), and possibly DNS (to use the web).

    Like robert I also have a similar linksys device (with custom firmware), I have heard that netgear make good devices too.

  7. I hate Linksys with a passion, I just feel like it’s the poor man’s router. I have a D-LINK at home and it works flawlessly w/ my Apple iBook. I’m shocked to find out you have problems w/ your Netgear, but then again I noticed many people are staying away from D-LINK, while my D-LINK has worked well for the past 2 yrs.

  8. I’m not sure if any of these router brands are really doing a uniformly better job than the others. People here are complaining about D-link, but it’s more or less the recommended router brand at Tekserve, whom I trust explicitly with all things Macintosh.

    Anyway, thanks everyone for your suggestions. I’ve tried many of the techniques here, including static IP addresses, but I can’t get them to work reliably. Setting up a block range of static IPs seems to ‘wall off’ those IPs from other devices on the network, preventing me from accessing, say, a temporarily added PowerBook or a printer very easily.

    Matthew: one of my favorite features in Netgear routers is the “Attached Devices” screen, which gives me a live list of devices on the LAN and their IP addresses. It’s an essential bit of info.

  9. It’s very odd. I also have the same Netgear router and I never have trouble with IP leases. DHCP knows which computer is which and always gives the same IP.

    However, it’s obviously not working for you, so I would want to reiterate Josh’s solution. If you tell the computer to not use DHCP, or use it for everything but setting the IP, that doesn’t mean you have to turn it off on the router. You can bring new devices onto the network without worrying about available IPs.

  10. Definitely go with Static IP for any desktop that you aren’t moving around often, and DHCP for laptops, etc. that may. Make sure all the boxes have the same dns suffix – ie, your macs are probably set (I think the Bonjour inspired default) to be machine_name.local. I think you can tweak this via settings in Network and Sharing sections of preferences.

    Your router may have a “local DNS” you can use, and may even auto add DHCP clients to that DNS when they join the network. This works very well for making sure you can access everything.

  11. Khoi. I recently was on the lookout for a router which does what you need and ended up buying an SCM Barricade wireless router. Works OK so far, does both static and dynamic addressing (the DHCP pool starts from 100 so you have quite some room for manually-configured machines). Runnign it for three days and already had one lockup – but otherwise a fine piece of software, having some nifty things older Barricades didn’t (like port wildcards etc.).

    And it has a DHCP log (the one you describe – shows connected users with the names of their machines, but it works only for DHCP clients).

    The problem that you describe has to do with the fact that professional (enterprise-class) networking equipment is costly – it has and will always be. If you need top reliability, go with some ProCurve office switch instead of these wireless routers – but this will lift you off quite sime $).

  12. Yes, to statically hook my Quad to the network I just need to setup everything manually in the Network prefpane (router address, IP and the subnet mask). The router also works like a DNS cache, so I use it’s address as my DNS. And voila – I got the Quad addressed statically, dynamic clients showup dynamically, both wireless and wired. I will be on the lookout for lockups though (they happen to all SOHO-class wireless router AFAIK).

  13. Khoi, I have the same model router, and I’ve been more than satisfied with it. Because I’ve never seen the book you’re looking for, I thought I’d share what I’ve done with my setup.

    After logging into the router’s configuration page, click on “LAN IP Setup” (under Advanced). In the resulting frame, I shrank the address scopeЁ In my case, there are four computers on the network, so I (arbitrarily) set the (last number of the) starting address to 101 and the (last number of the) ending address to 106.

    In that same frame, I setup (DHCP) Address Reservations for two of the computers so that they will always get the same IP address from the router’s DHCP server.

    A final note: Using static addresses (configured on your machine) that are inside of the DHCP server’s scope can cause problems. If two hosts end up with the same IP address (one assigned statically and the other assigned dynamically), then those two hosts will likely be unable to communicate.

  14. Khoi,

    I’m using an Airport Express at home and an Airport Extreme at the office. Both home and office have requirements for static IP addresses to certain machines, port forwarding and NAT.

    I’ve had extremely few problems by sticking to a few basic rules:

    1. The computers used for staging applications or static pages undergoing prototyping are the only ones that need the same addresses (actually, if you operate in a majority or all Mac environment, you don’t even need to assign static addresses – you can call up the correct web server by just typing “khoi.local” into your computer, where “khoi” is the computer name).
    2. xxx.xxx.xxx.2 – 10 are reserved for the machines that need static addresses. All addresses above that are given out dynamically.
    3. Machine hardware addresses or MAC addresses are mapped to each machine’s static IP address using Airport Admin Utility

    That’s it, works like a charm.

  15. Hrush provides solid advice from a technical point of view, and indeed it is fairly strait forward from a set up point of view.

    His mention of MAC (Media Access Control) address is very salient to this discussion also. Being (overly) familiar with the netgear router interfaces, that family does allow you to map MAC address to static IP’s. Since a MAC address is tied to the hardware, this is a very reliable way of mapping specific machines to hardware.

    You can find a machines MAC address by using (in 10.4) System Profiler and looking under the “Network” section.

    Even if you (the author of this blog) already know this information, it should be helpful for people googling into this thread.

Thank you! Your remarks have been sent to Khoi.