|
©1994-2007 Kevin Boone | |||||||||||||||||||||||||||||||||||||
|
Home > DIY and home improvement
Installing a home computer network
Last modified: Fri Aug 3 08:20:42 2007
(UPDATED March 2001 to include new section on connecting a home network to the Internet)
In this article I describe how to install a local-area network in your house. Although I do discuss very simple installations (two or three computers side-by-side) the article is mostly about more ambitious projects, such as providing a network outlet in every room. The article is only concerned with the DIY issues, that is, installation of the cabling and hardware; it does not even touch on configuration of the computers or installation of the appropriate software. Although mainly concerned with domestic installation, the information contained in this article is also relevant to small commercial premises. Why do it?Many people have a computer at home, some have more than one. As soon as you have more than one computer, networking is worth consideration. Networking your computers will allow them to share peripherals, and allow one computer to backup the data of another. You can, if you are cunning, allow a single computer to act as an Internet access point for the whole network, which is more convenient than fitting a modem and a telephone extension for each computer. All manner of computing operations can be carried out more conveniently and flexibly.What is involved?Installing computer networking equipment requires similar craft skills to any other form of electrical installation, except that there is no safety hazard associated with network cabling. Unless your network is very simple (two PCs on the same desk, for example), you will need to be able to use a screwdriver, drill, and pliers. You will need to know how to run cable neatly and unobtrusively. All the technical knowledge you will need is contained in this short article. There are no particular legal restriction on doing this kind of work.Network cabling principlesNetworking computers involves connecting them together with cables and connectors. At the time of writing all practical small networks are based on electrical cables, although optical fibres may soon be competitive. Although in principle there is a number of different connection schemes to choose from, in practice everyone uses a scheme called ethernet. Ethernet has been around for about 30 years, and completely dominates the local-area networking market. Although ethernet derived from a proprietary standard (Xerox Corporation) it is now non-proprietary, and many companies make ethernet equipment. Therefore it is relatively inexpensive.The ethernet system defines a signalling strategy (the way signals are carried on wires) and a low-level protocol (the way data is converted into signals). It does not define the type of cable or the speed of transmission. In practice, however, everyone now uses twisted pair cables, with speeds of either 10 megabits per second, or 100 megabits per second. For a domestic installation, the earlier `coaxial' cabling scheme may be more appropriate, but it is getting increasingly difficult to find compatible equipment, so I will assume that you are going to use twisted pair cabling like everyone else. Happily, the hard part of the installation (laying the cables and connecting the hubs) is the same whether you go for the 10 or the 100 mbits/sec option. Twisted pair cable is available in various categories and either with, or without, a screen (`shield' in the US). The category dictates the maximum transmission speed and distance that the cable will tolerate. The most common sort of cable, which is used in nearly all domestic and commercial installations, is category 5 unscreened twisted pair. You will usually see this abbreviated to `CAT5 UTP' in trade publications. Although in principle CAT3 cable could be used with the lower-speed ethernet, there is no real advantage to this as it isn't any cheaper. Screened twisted pair cable is used in some industrial installations, where there is a high level of electrical interference. There is unlikely to be a good reason to use it in domestic or commercial work. So, in practice, you will almost certainly need to use CAT5 UTP cable for your installation. At the time of writing this cable costs about £40 for a 1000-foot drum. If you are wiring your entire house then you probably do need this much. If you have only two PCs, and they are side-by-side, then you should probably buy pre-assembled `patch cables', rather than a cable drum, as described below. The connector used with CAT5 UTP cable is called an `RJ45'. It looks a bit like a telephone connector, and you may be able to plug it into a telephone socket. Don't do this, however, as the voltage on the telephone line is about 50 times too high for an ethernet interface, and won't do it any good. A pre-assembled CAT5 UTP cable with an RJ45 on each end is often referred to as an `RJ45 cable' or a `patch cable'. These are available in various lengths and colours; a 2m plain grey one will cost about £1 from a trade supplier. Network adaptersTo take part in a network, your computers will need to be fitted with network adapters. A suitable device for 10 mbits/sec ethernet should cost less than £20. At the time of writing, adapters for fast ethernet are quite a lot more expensive (over £100).HubsUTP ethernet installation centres on hubs. A hub is a cable connection centre, into which the various computers are plugged, either directly (using patch cables) or indirectly. You can also connect hubs together to extend the system.As far as installation (not performance) is concerned, the most important features of a hub are (1) the number of ports it has, and (2) the power supply arrangements. Hubs are usually available with 4, 8 or 16 ports. Often a hub will have an `uplink' port (for connecting two hubs) in addition to the standard ports, but sometimes you will have to use one of the ordinary ports for uplink. You will need a minimum of one port for each computer that is to be connected, plus one port for each hub-to-hub connection. In practice, however, a flexible system will provide more ports than computers, for exactly the same reason that a well-designed mains system has more power outlets than you have appliances. You may want to move your computers from one room to another, or add computers at a later date, and you don't want to have to rewire whenever you do that. This issue will be discussed in more detail later. Hubs may be mains-operated (sometimes indirectly by a small transformer) or powered by a computer. The latter is usually cheaper, but it limits the location of the hub to within cable reach of a computer. Such devices are usually connected to the PC keyboard. A simple exampleThe figure below shown demonstrates the simple way of networking a small number of PCs, all of which are assumed to be in the same room. You will need a hub (with enough ports for the computers), and enough patch cables to connect each port to the PC. You will also need network adapters if your computers don't already have them. Not including network adapters, the total cost of networking these three computers should be less than £50.
A technical interludeIf your networking needs are such that you can get away with using a single hub and a set of patch cables then that's it: nothing more to say. If you are tackling a more ambitious project, such as networking a whole house, then you need to understand some of the technicalities; in particular you need to understand the relationship between the cable organization and the RJ45 connector pins.A CAT5 cable consists internally of eight wires, organized as four pairs. It is the pairs that are important, not the individual wires. The RJ45 connector has 8 pins, each corresponding to a wire in the UTP cable. However, for reasons that must have made sense to someone at some time, the relationship between pairs and pins is not entirely straightforward. The correspondence between pins and pairs, and the usual colour coding is as follows:
In practice, neither the numbering nor the colour coding scheme is followed very closely by manufacturers, but what is extremely important -- and always followed -- is the grouping of the pins into pairs, as will be explained. Some of the pairs are used for carrying data in one direction, and some in another. For the system to work properly, the `transmit' output from one PC must end up on the `receive' inputs on the others. This is not normally a problem: the hubs take care of routing the signals. A patch cable is wired such that pair 1 (pins 7 and 8) on one RJ45 goes to pair 1 on the other, pair 2 to pair 2, and so on. The hub expects this, and routes the transmit lines to the corresponding receive lines internally. So far, so good. In other words, connecting a computer to a hub is simply a case of wiring all the corresponding pairs together. It doesn't matter how long the cables are, or how many junctions they go through, the principle is the same. However, connecting two hubs together is different. The ports on a hub are wired to accept a connection to a computer, not to another hub. This means that the connection of transmit lines to receive lines must be made in the cable, not the hub. To simplify things, many hubs provide an `uplink' port which is intended to connect two hubs. In this scheme, the uplink port of one hub is connected to a normal port on the other. A common mistake is to wire two uplink ports together: this won't work. Some hubs have a port that can be switched between uplink and normal. If your hubs have uplink ports, then hubs can be wired together exactly like wiring a hub to a PC: pair 1 to pair 1, 2 to 2 etc. The importance of this consideration will become apparent later, when we discuss more complex wiring systems. More sophisticated wiringIf your computers are in different rooms from the hubs, then your wiring becomes more complicated, for two reasons. First, the distance between hub and PC will be too long to use a standard patch cable. Second, the cables themselves need to be routed in a way that does not cause danger and is not too ugly.One solution (simple but ugly) is to make your own patch cables of the right length using a drum of UTP cable and a set of RJ45 connectors. The procedure is as follows. 1. Run the UTP cable from close to the hub to close to the computer. Ideally the cable should be concealed for as much of its length as possible, under floorboards or behind furniture. 2. Remove enough of the outer sheath of the cable (at each end) to expose the right length of the twisted pairs (the information supplied with the plugs should tell you exactly how much, but it's usually about a centimetre. 3. Press the wires into the receptacles in the connectors., following the colour coding given with the plugs, or as shown above. In fact, it doesn't matter what wires go to which terminals, so long as it's the same on both ends and the pairs are maintained. So, pins 3 and 6 must form a pair, pins 4 and 5 must form a pair, etc., as shown in the table above. It would be a mistake to wire the pins in numerical order with the pairs together. That is, don't wire the pairs like this: (1,2) (3,4) (5,6) (7,8) however logical it may look. It won't work (you might get away with it over sort distances, but it will be erratic). The problem is that the twists in the cable have a very specific purpose, and splitting a signal between pairs would negate the effect of the twisting. This wiring arrangement is called a `straight cable', because none of the connections is crossed between terminals. 4. Push the two parts of the connector together, perhaps using a pair of pliers. The pins in the connector make electrical contact with the wires by piercing the plastic insulation (this is called `insulation displacement'). If you do this a lot, you will soon get annoyed by how fiddly it is. You can buy a gadget to make the connections automatically, but it's a bit pricey. The second method, which is preferable in almost all respects (except cost) is to use RJ45 outlet modules. These mount on (or in) the wall exactly like a mains outlet, but have a socket into which is plugged an RJ45 connector. This scheme is shown below. The outlets are the same size and appearance as a single-gang lights-witch or socket outlet, and mount in the same fittings.
RJ45 outlets are commonly available in single or double units. A single unit will cost about £5, a double about £10. Note that if you use a double outlet you can plug in two computers, but you still need two cables back to the hub. You can't just connect the two outlets together internally. Note that for every outlet that connects to a computer, you will need an outlet at the hub. You will also need a short patch cable at each end. It is sensible to label the corresponding outlets with the same number or name at each end, so you know what goes where. Patch panelsSuppose you are re-wiring your house, and you decide to to a thorough job of networking, with one or two outlets in each room. All the outlets (for the time being) are connected to a single hub. Let's suppose you have 20 outlets for computers, in total. This means that you will need a corresponding 20 outlets in the region of the hub, and twenty patch cables to connect the hub to the outlets.Because this would be rather ugly, and would take a lot of trouble to assemble, it is customary in installations like this to use patch panels rather than outlet modules. A patch panel is a box with a large number of RJ45 outlets all mounted very close together. All the wires to the room outlets would be routed through the house and into the patch panel. A patch panel with 20 outlets will cost about £50, and be (usually) 19 inches wide (because they are designed to fit into a standard 19-inch rack). Bear in mind that a patch panel does not contain any electronics, it is just like a row of RJ45 sockets all mounted in the same box. In the installation described above, we would mount the patch panel close to where the hub will be installed. Even though we have 20 outlets in the house, we don't need a 20-port hub, because it is unlikely that all the outlets will be used. We have provided 20 outlets for flexibility, not (usually) because we want to connect 20 computers. Of course, if we really did have 20 computers then we would need 20 ports at the hub end. The use of the patch panel is quite helpful here: all we have to do is connect the ports on the hub to the sockets on the patch panel that correspond to outlets that will be in use. If we change which outlets are in use, all we have to change is the socket on the patch panel that is connected to the hub. Neat, isn't it? This is why it is advisable to label the outlets at both ends of the cable; otherwise this process is one of guesswork. Connecting hubs togetherIn practice, a domestic installation will not usually be well-served by connecting all the outlets back to a single hub. This is because the outlets will usually be widely spaced throughout the house, compared to the case in a commercial premises where there may be eight or more outlets in each room. In a house, it is probably better to use multiple hubs, with a few outlets connected to each hub. The distance between hubs can be large, if this minimizes the distance between hubs and outlets. This is because only one cable is needed between hubs, however many outlets they serve. This situation is shown in the figure below.
If your hubs have uplink ports, the wiring between hubs will be exactly the same as the wiring from hubs to computers. A straight cable is wired between two RJ45 outlets, and the hubs are connected to the outlets by patch cables. The presence of an uplink port on each hub means that all the wiring (hub-to-hub and hub-to-computer) can be identical. If your hubs don't have an uplink port, you will need to get a `crossover' cable at one end, rather than a standard patch cable. Alternatively you can crossover the receive and transmit pairs at one (not both) of the outlets; this is straightforward but does lead to an installation with two different wiring schemes. In the table above, the pairs to be cross would be 2 and 3. That is, pair 2 goes to pair 3, and pair 3 goes to pair 2. This is why there is some disagreement about the colour coding of these pairs. Remember that your computers can be plugged either directly into hubs, or into an RJ45 outlet connected to a hub. If you plan to connect computers directly to a hub, then naturally the hubs need to be sited within a patch-cables-reach of the hub. This is usually only practical if you plan to run two or more computers in the same room (e.g., an office). If you are using the kind of hubs that have to be powered from a computer, then you will have to do this. In this environment a hub can usefully be placed on a desk between the computers it serves. Things to keep in mind
Connecting your network to the InternetOne of the great advantages of having a proper network is that you can provide Internet access from anywhere in the premises that has a network outlet. This is much more convenient than fitting a modem in each computer and, if done properly, allows multiple computers to get access to the Internet simultaneously. In this section I assume that you already have a single-point Internet connection, provided by a dial-up telephone or ISDN link to an Internet service provider. There are three basic techniques for turning this into a shared Internet connection. These techniques are equally applicable to analogue and ISDN connections; although the ISDN terminator is not called a modem, I will use the term `modem' for both connection types, for brevity.
Buying equipmentDon't buy UTP cable, connectors, patch cables, face-plates or hubs from a computer retailer. They are about half the price from a trade supplier like RS Components. RS won't supply direct to the public, but their distributor Electromail will, and the prices are the same. Alternatively, most of the cabling and installation material can be obtained mail-order from Screwfix.
|
|
||||||||||||||||||||||||||||||||||||