Thursday, April 28, 2005

Finally getting my local network running Finally getting my local network running

I have been struggling for quite awhile getting my local network running. Off and on, for a couple of months.

The basic problem is that I recently started subscribing to DSL. The DSL modem kindly provided one Ethernet connection, one wireless connection, and one USB connection. I wanted to add a router in front of the DSL modem so that I could connect the DSL modem to multiple computers over Ethernet.

This had worked just fine when I used one of my routers with a cable modem with cox.net several years ago. The installation was pretty painless. Very little in the way of configuration. Rather, I just just had to tell the modem how to connect to cox.net. Voila. Running network.

Well, I got the DSL modem to work well connected directly to a computer. But, the minute I put a router in front of it, it disappeared. Add to this, that in order to configure the modem, I needed to hook it up to the Ethernet cable instead. And, as I noted above, the modem only has one Ethernet port, and if it was connected to a computer, it couldn't be connected to the router. I could ameleorate this a bit by enabling wireless on the modem - but every time I reinitialized it to factory defaults, I would have to reenable wireless, which would, of course, require hooking it up to the Ethernet cable...

First thing I figured out yesterday was to hook the DSL modem directly to this laptop via the USB port. Whoops. Don't have the USB driver. Took awhile, but finally tracked it down. But when I did, and also tracked down a USB extension, this solved the first problem. I just had to remember the IP address I had assigned to the modem, and I could configure it just fine, without switching Ethernet cables around.

Still couldn't get from the router to the modem. Indeed, according to Ping, it didn't exist, but I knew it did, because DHCP on the modem would assign an IP address to the router. Plus, the router would occasionally show up in the trace files on the modem. So, I knew there was a physical connection, but not a logical connection.

I tried using totally default IP addresses throughout. No go. I tried my usual internal IP addresses. Same thing. And then a light went off today. The default IP addresses (192.168.x.x) used by both the router and the modem are non-routable. In other words, packets to these IP addresses don't cross a firewall. Ditto with my own internal IP addresses (10.x.x.x). This works just fine behind te firewall in the router, or behind the firewall in the modem, if there is no router in front of it. But this means that I couldn't reach the modem through the firewall in the router.

The answer turned out to be to use semi-public IP addresses between the modem and the router. Luckily, I know of a Class-B subnet that is used very sparsely, and, essentially appriated a Class-C subnet from it - though this shoudn't be a problem in any case.

This worked fairly well, but somewhat intermittently. I could get to the modem via the router, and visa versa. But I couldn't always get outside. At one point, everything was working perfectly. Then I squeezed down the intermediate subnet and configured static IP addresses on two computers. And then I lost going outside (except, when using the USB port).

I went back, defaulted a lot of things, and one computer started to work right, but another didn't. It turns out that if you let Windows default everything, and get things automatically, the primary Gateway is in the next hop - the router. I had copied my successful USB configuration in which the primary Gateway was the modem. So, hard coding the Gateways was what did me in.

So, things are working just fine with the following:
- static IP addresses for all computers, router, and modem.
- IP addresses used between modem and router, USB, and Wireless are public (though actually unused).
- IP addresses used behind router are private.
- static Gateways with router listed first and modem second.
- static DNS with router listed first, modem second, and external last.

What I intend to do to finish this up:
- Turn DHCP off in both the router and the modem. Static IP addresses work just fine.
- Shrink down the two subnets to minimal size - I should be able to get by with a subnet of size 7 behind the modem, and 63 behind the router (and can shrink that down a bit by compressing my static IP addresses).

Oh, and the reason for this blog entry is show myself that it all works.

Labels:

6:09 PM Display: Full / Chopped / Footer

Display: Full / Chopped / None

Display: Full / Footer / None

Display: Chopped / Footer / None