Sunday, 25 April 2010

How should I set up my home network?


Summary: Once you add a second computer, you're faced with setting up a network, at least to share the internet connection. Here are some general guidelines.

How should I set up my home network?
You just bought your second computer. Perhaps you purchased a new laptop, a new machine for your spouse, or maybe just another machine for yourself. Now you'd like to be able to connect them all to the internet and it'd be nice to be able to share things like printers or extra disk space among your machines.
You need a LAN, or Local Area Network. There are lots of ways to do it but thankfully there are many straightforward solutions.
The basis of your LAN will be ethernet. The word has a very specific technical meaning but in common use it's simply the technology behind 99% of PC networks. Most computers now come already equipped with an ethernet adapter - it's the squarish hole that accepts what looks like an oversized North American modular phone jack.
Your broadband connection being cable, DSL or something else, will first go through some kind of device typically called a modem (again, somewhat technically inaccurate but it's the common term). The modem's job is to convert the broadband signal to ethernet.
"There are lots of ways to do it but thankfully there are many straightforward solutions."
You'll connect that ethernet from your broadband modem to a broadband router. I've talked about them in a previous article What's the difference between a Hub, a Switch and a Router? Routers control two important things - as the name implies they "route" information between computers on your LAN, and between those computers and the broadband connection to the internet. The other important function if you get what's called a NAT router is that they provide a very efficient firewall - protecting the computers on your LAN from many of the dangers of the internet. As a side effect, a NAT router allows you to place several computers on a broadband connection that's really only designed for one.
As I said earlier, each of your computers will need an ethernet adapter and most will already have them. A cable will run from each computer to the router and from the router to the modem. Each computer will also need to support the TCP/IP communications protocol. TCP/IP is the fundamental "language" of communication on the internet - in fact the IP stands for "Internet Protocol". Windows includes TCP/IP support by default.
Unfortunately, configuration specifics are unique to both your ISP or broadband provider and the specific model of router that you are using, so I can't cover that in detail here. However much like ethernet and TCP/IP being common standards, the configuration I'm outlining here is also very common. Your ISP should be able to provide the information you need and the router will in all likelihood include the documentation needed for this common scenario as well.
I can hear some of you asking about "wireless". If you're starting a home network from scratch, I really recommend getting an integrated wireless base station and router to begin with even if you don't yet have wireless on any computers. The incremental cost is not that much, and wireless is so convenient that it's really likely that you, or perhaps a guest, will someday be looking to connect wirelessly to your LAN. The great news is if you select an integrated router then nothing I've described above changes except that there won't be a cable running to your laptop.
Just like "ethernet" is the standard for wired networking, "802.11b" is the standard for wireless (or WiFi) networking. A new faster standard, "802.11g" is now becoming popular and since it can co-exist with 802.11b many manufacturers are providing equipment which supports both. I recommend springing for the dual-mode integrated wireless router if you can. You'll thank me, if not now, then in a few years.
That's it! Here's a simple diagram of the LAN we've just created:
network diagram
The other question that I can hear you asking is "but what brand of router should I get?". I run LinkSys equipment and have been very happy. In fact you'll find links there to the specific router models I happen to run. While mine are not dual mode (801.11b and g), LinkSys does make them. I've also heard good things about Netgear, 3Com, and US Robotics. My biggest advice is to stick to nationally well known brands.
For more information including tutorials, equipment reviews, and more, visit Practically Networked. It's a great place for your next networking steps.

Why didn't my gigabit network card result in better performance?


Summary: Gigabit network cards hold the promise of faster connections and operations. The key is knowing where your other bottlenecks might be.

I recently installed a Gigabit PCI card on my Dell Windows XP SP2 system. I'm running on a Cable LAN system and was hoping to see at least a small improvement on the 100mbps of the old card. I'm not complaining because everything is as was before the install,just wondering if there is a little tweak I should have carried out to help it along?
It depends on what it was you were expecting to change.
I ran into a very similar situation when I upgraded one of my switches to gigabit and saw only a marginal performance impact. So I started looking into why.
First, let's make sure you've actually covered all the bases.
In order for a gigabit (or 1,000 megabit) connection to happen, the equipment at both ends of the wire need to be gigabit-capable. You indicated that you purchased a gigabit ethernet card, but what's it plugged into? If it's a router or other device that's only capable of 100 megabits, then the connection will happen at the slower speed. You can't force a gigabit into a 100 megabit connection.
Similarly, if you're copying files between two machines, then both machines must have gigabit-capable network connections for you to be able to take advantage of the higher speed.
And if you're expecting your gigabit network card to somehow improve your internet speed, then you're going to be very disappointed. Your internet connection already has a maximum speed - a cable connection might occasionally go as fast as 10, or even 50 megabits, but that's slower than the card you already had! Putting in a faster network card will not speed up the internet connection provided by your ISP.
"Putting in a faster network card will not speed up the internet connection provided by your ISP."
So far I hope all that makes sense.
Now, let me tell you about a scenario that isn't nearly as clear, and had me puzzling over it myself for a while.
My desktop machine came with a gigabit ethernet adapter. I decided to speed up the connection between this machine and a backup machine by installing a gigabit ethernet card in that machine and connecting the two through a gigabit switch.
Now, even though a gigabit per second is 10 times faster than 100 megabits per second, I didn't really expect a 10x increase in speed, there are too many other factors at play. What I didn't expect was that the increase would be more like 2x. My ten-times-faster gigabit connection was copying files machine-to-machine only twice as fast as my 100 megabit connection had.
Clearly the gigabit connection had some effect, since there was a speed up, but it wasn't what I was expecting.
My assumption was that there was another choke point in the system. Just like the gigabit connection to your ISPs internet connection will never be any faster than whatever the ISP gives you, there must be something else in my system that was slower than my newly speed gigabit connection.
And indeed there was. I did some tests and discovered that the gigabit connection was faster than the transfer rate of my hard drives. The hard drives had become the slowest component in that machine-to-machine transfer. While the network was capable of faster speeds it was being held back by the work required to actually get the data on and off my hard drives.
Does this mean that the gigabit network is pointless? Hardly.
While in the past that machine-to-machine copy might have actually saturated my network, since the 100 megabit network was at that point slower than the hard drives and hence the limiting factor for the copy, now the copy could proceed at the hard drive's full speed, and still leave lots of network bandwidth for other traffic. Other machines and other network activities could continue without being nearly as impacted by something that would previously have used up all available bandwidth.
In practice, do you care? Probably not. At least not yet. As always, speeds and needs will increase so that eventually that 100megabit network will seem slower than molasses compared to future technologies.
But for now, for most home and even small business needs, a 100 megabit per second network is plenty.
And upgrading may not even get you the increase you were expecting.

How is my IP address assigned?


Summary: Every device on an TCP/IP network must have a unique IP address. IP addresses are assigned, either automatically by DHCP, or by manual configuration.

Given that IP address must be unique for every computer attached to the internet,how is it possible that we do not plug in IP addresses for the computer we want to connect?
Well, every device connected to the internet must have a unique IP, it's true. And they're assigned one of two ways: static or dynamic. But there's also a useful trick that lets multiple computers share a single IP address ... and that trick is called a router.
Static IP addresses are exactly that: static or unchanging. They are assigned by your network administrator or ISP, and yes, you do have to configure the computer or other internet device manually to respond to that specific address.
But, as you point out, most folks don't need to do that. So how do they get their IP addresses?
Enter the dynamic IP address and "DHCP" or Dynamic Host Configuration Protocol.
Using DHCP (which is the default for Windows TCP/IP connections) the computer broadcasts a special request for an IP address to the network. An upstream device, commonly belonging to your ISP, responds with an IP address that the computer then configures itself to use. Especially when many computers aren't connected continuously, this allows the ISP to reuse the IP addresses of computers that have disconnected from the internet.
If you need your computer to be identifiable on the internet ... for example if you're running a web server or want people to be able to connect to your machine, you'll probably need or use a static IP address. On the other hand, if all you do is connect out to surf or read email, as most users do, then a dynamic IP address is the easiest to configure.
Routers are devices that allow multiple computers to "share" a single IP address. The device that's connected to the internet is the router, and it has a unique IP address. The router can then act as the DHCP server to the local network handing out local IP addresses to the computers connected to it. As traffic flows across the router, it does the job of translating the IP addresses from the local addresses it has assigned, to the external IP address it was assigned, and routing the right bits of data to the right computer ... hence the name.
One of the many side effects of using a router is that it can be assigned a static address on the internet, and hand out dynamic IP addresses locally, vice versa, or any combination.