|
|
Library
> Articles >
Technical Information
>
002
|
|
|
|
Creating
a local area network
Contributor:
Kevin Boone

This article describes how to install a local-area
network in your house with its' focus on simple installations
(two or three computers side-by-side). The article
is only concerned with the DIY issues, that is, installation
of the cabling and hardware; it does not 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
set up a network?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's
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 principles
Networking computers involves connecting them together
with cables and connectors. At the time of writing
most practical small networks are based on electrical
cables, although optical fibres may soon be competitive
and wireless networks are beginning to become standard.
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. If you are
wiring your entire house then you probably need 1000-foot
drum. 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.
Network
adapters
To take part in a network, your computers will need
to be fitted with network adapters. At the time of
writing, adapters for fast ethernet are quite a lot
more expensive.
Hubs
UTP 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 example
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.
A
technical interlude
If 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 organisation and the RJ45 connector
pins.
A CAT5 cable consists internally of eight wires, organised
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: Pair Pins Colour
1 7 and 8 brown and white
2 1 and 2 green and white, or orange and white
3 3 and 6 orange and white, or green and white
4 4 and 5 blue and white
The colour coding within a pair is complementary;
that is, if one wire in a pair is orange with a white
stripe, the other will be white with an orange stripe.
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 wiring
If 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. 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 carry out the above, you'll 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. The outlets are the same size and
appearance as a single-gang lights-witch or socket
outlet, and mount in the same fittings.
In this scheme, when there are no computers plugged
into the sockets, then no cables are visible at all.
The previous scheme always had a cable and RJ45 plug
dangling somewhere. If you are doing the job properly,
then the cable between outlets will be concealed completely,
usually under floorboards and buried in the plaster
of a wall. This leads to a very elegant, unobtrusive
system.
Of course, it will usually only be practical to follow
the second method if you are redecorating. Alternatively
a small conduit can be used to route the cable up
walls. The outlets can be recessed into the wall,
or mounted on the surface. The wiring between the
outlets is exactly the same as the wiring of a patch
cable: pair 1 to pair 1, 2 to 2, etc. In other words,
it is a straight cable. Wiring an outlet is very much
less fiddly than wiring an RJ45 connector. The wires
are usually pressed into the terminals with a small
screwdriver. Some outlets have their terminals colour-coded
to match the wires, which is handy. Others have the
connections numbered 1-8. It can be awkward to mix
outlets with different coding schemes in the same
installation. If your outlets have colour-coded connections,
then they will be designed to keep the correct pair
organisation. If they aren't, then you'll need to
ensure the pairs are grouped together correctly, as
shown in the table above.
RJ45 outlets are commonly available in single or double
units. 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
panels
Suppose you are rewiring 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. 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 together
In 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 minimises the distance
between hubs and outlets. This is because only one
cable is needed between hubs, however many outlets
they serve.
The hubs are joined together by running a cable from
a normal port on one to the uplink port on another.
This allows an arbitrary number of hubs to be chained
together. A useful scheme would be to have one hub
on each floor of the house, plus one in each room
that has a high concentration of computer equipment
(e.g., an office). Because my house is tall and thin,
I have a hub in the basement to serve the basement
(which acts as the `machine room' and contains the
file server, etc) and the ground floor. There is another
hub in the attic, which contains the office, and I
will fit a hub on the first floor when I get around
to rewiring it.
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.
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
Wherever you site your hub(s) you will need to ensure
that they have access to a power source, and are accessible
for maintenance if necessary. In some situations hubs
can conveniently be mounted under floorboard, and
powered from a (fused) spur from the ring main. This
is only useful if all the ports on the hub are connected
to outlets, rather than directly to computers. Putting
the hubs under a fitted carpet may prove impractical.
Modern hubs are small (about the size of a cigarette
packet) so they can be mounted almost anywhere (subject
to access to a power source). It can be quite useful
to mount them in a cupboard or closet; this allows
the wiring to be kept out of sight.
If you are making a permanent installation, and you
want your wiring to conform to BS7671 (and you should)
then you should pay attention to IEE wiring regulation
528-01-02, which says that mains and signal cables
should be segregated for electrical safety reasons.
Segregation is unnecessary if the insulation breakdown
voltage of all cables is high enough to withstand
the highest voltage that might be encountered. Networking
equipment suppliers don't normally provide details
of breakdown voltages of the cables they sell, so
you would have to contact the manufacturer to find
out whether this applies to your cables or not. The
breakdown voltage of your network cables must be at
least 230 volts to be able to run alongside mains
cables. By `segregation' is meant that the signal
cables should be run in separate conduits from power
cables, or they should be physically separated by
50 mm or more. This should not be difficult to achieve
in practice, and may lead to more reliable operation
anyway. IEE regulation 422-01-04 may also be relevant;
this says that cable connections should be made in
a suitable enclosure. Some other IEE regulation apply,
but they are generally common-sense (e.g., cables
should be mounted in such a way that they are not
likely to be penetrated by nails).
The largest cable run allowed between any two pieces
of equipment (computers or hubs) is 100m. In a large
house you could easily exceed this if the cable route
is complicated.
CAT5 cables will carry a video signal, among other
things; so if you put in more cables than you need
you can use them for other things. Don't use them
for mains, however, unless you're tired of life.
Most hubs are fitted with LEDs to indicate the state
of the connection. These can be very useful for checking
whether your wiring is OK. If you connect your computers
and they don't communicate, it can be difficult to
tell whether the problem is in software, configuration,
or cabling. If your hub has an LED to indicate that
the connection is sound, then you can be reasonably
sure that the problem is elsewhere. Some hubs have
a system of flashing LEDs to indicate the type of
fault; you will need to refer to the manual to figure
out what these mean.
Most RJ45 outlets have insulation-displacement connections,
that is, the cables are pushed into position and the
terminal penetrates the insulation to make the connection.
For about 50 pence you can get a tool to assist with
this. Or, if you're stingy, you can push the wires
in with a screwdriver. The problem with the miserly
approach is that the screwdriver will spread the sides
of the connector and weaken the connection. So splash
out.
Connecting
your network to the Internet
One 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.
Device
sharing
In this strategy a modem is fitted to one computer
on the network, and this computer makes the modem
available to others on an exclusive, first-come-first-served
basis. For brevity, I will refer to the computer in
which the modem is installed as the `modem computer'.
To make this work you need `device sharing' software,
which is available for most platforms. Once this software
is working on the modem computer, the machines that
share the modem just proceed as if they had a modem
installed internally. Depending on your hardware and
operating system, you may have to install software
on the non-modem computers as well. This system has
the advantages of simplicity and low cost, but does
not allow multiple machines to have simultaneous Internet
access. You will also have to deal with the problem
that each machine will have two IP numbers: one for
the local network and one for the Internet. This issue
is beyond the scope of this article. In addition,
the modem computer probably needs to be switched on
permanently; if it is switched on only when required
this is inconvenient as you will have to wait for
it to boot up.
Modem
sharing without routing
Here a single computer has a modem, and dials the
ISP when required by other computers. So far this
is the same as the `device sharing' strategy. However,
the non-modem computers don't control the modem, they
simply route data to it over the local network. Multiple
computers can be using the modem for Internet connection
at the same time. The modem computer is responsible
for mediating between the Internet and the local network.
For this to work the modem computer has to be able
to translate between the IP numbers of the local network,
and the (usually single) IP number provided by the
ISP. Techniques called Port Address Translation, IP
spoofing, and Network Address Translation are used
for this. To the best of my knowledge, only Linux
is widely used for this kind of operation. Of course,
it is only one computer on the local network that
must be set up to mediate with the Internet; the other
computers think they are using the local network.
The only modification necessary is that the non-modem
computers must be configured to use the modem computer
as the default router (gateway). This is a matter
of a few seconds on most systems.
This scheme is flexible and costs nothing extra to
implement (provided you already have the modem). However,
it is fiddly to set up, and if the modem-sharing computer
fails then the whole system loses Internet access.
It has the same disadvantage as the device sharing
scheme that the modem computer really needs to be
permanently on.
External
modem router
In my view this is the simplest scheme, and the most
effective; the only disadvantage is that it is relatively
expensive. A modem router (or ISDN router) essentially
fulfils the responsibilities of the modem computer
in the previous strategy, but in a box the size of
a paperback book. Because it is single-minded, it
only takes a few seconds to `boot', so it can be switched
on and off as required; alternatively, as this device
has a low power consumption it is not too extravagant
to leave it running all the time.
The computers that share the modem router need to
be configured to use it as the default router (gateway),
as in the previous scheme. Other than that, no changes
should be necessary. However, most of these devices
can act as DNS relays, so normally you would want
to tell the computers to use the router for DNS, not
an address provided by your ISP.
A modem router can usually be configured to dial on
demand, or to be manually connected. If it is set
to dial on demand, it will listen for network activity
that relates to IP numbers not on the local network,
and dial the ISP when it finds any. This makes the
whole business very simple, but you need to monitor
it quite carefully. Many applications attempt frequent
connection to non-local addresses, for various reasons,
and these will generally cause a dial-in. With manual
dialling your would typically use a Web browser to
connect to the router and operate it through its Web
interface.
The only real disadvantage of this scheme, apart from
the initial cost of the hardware, is that it is so
convenient you will probably find yourself using the
Internet more than you did before, leading to higher
connection charges.
|
|
|
|
| |
|
|
|
 |
| |
| Authors
background |

Kevin Boone is Principal Instructor at Sun Microsystems
Ltd. Kevin has been programming professionally
since 1989, and as an amateur since 1980. Until
recently he specialised in software for control
of electronic devices; his software can be found
in devices ranging in size from heart pacemakers
to an oil platform power plant. Kevin has also
become involved in e-commerce development, has
taught programming in Java and C++ at undergraduate
and postgraduate levels, and has developed software
commercially for Windows NT, Solaris and Linux.
Kevin's
previous position was as Senior Lecturer of
`Interactive Multimedia', and was programme
director at Middlesex University (United Kingdom).
This article also appears on Kevin's web site
at www.kevinboone.co.uk.
If
you observe inaccuracies or wish to contribute
an article or review to be included at AbleStable®
visit Feedback.
Copyright
Notice
Although our contents are free to browse, copyright
resides with the originators of all works accessed
at AbleStable®, and unauthorised copying
or publication of our site contents is strictly
prohibited. To use our specially selected premium
content go to Content
Syndication and Licensing.
AbleStable © 2002-2010 |
| |
 |
|
|
|
|
| |
|
|
|
|
 |
 |
| All
Material: AbleStable © 2002-2010 |
|
|

|