
Computer networks
Last updated: December 2, 2009.
Thank goodness for
computer networks! If they'd never been invented, you wouldn't be
reading this now (using the Internet) and
I wouldn't be writing it
either (using a wireless home
network to link up my computer
equipment). There's no doubt that computer networking is extremely
complex when you delve into it deeply, but the basic concept of
linking up computers so they can talk to one another is pretty
simple. Let's take a closer look!
Photo: Testing a small computer network linked to the Internet. Photo courtesy of NASA Glenn Research Center (NASA-GRC).
What is a computer network?

You can do lots of
things with a computer but, connect it up to other computers and
peripherals (the general name given to add-on bits of computer
equipment such as modems, inkjet and laser
printers, and scanners) and you can do
an
awful lot more. A computer network is simply a collection of computer
equipment that's connected with wires, optical
fibers, or wireless
links so the various separate devices (known as nodes) can
"talk"
to one another and swap data (computerized information).
Photo: From the outside, a computer network looks like
nothing more than a bundle of wires. Photo courtesy of
NASA Glenn
Research Center (NASA-GRC).
Types of networks

Not all computer networks are the same. The network I'm using to
link this laptop to
my wireless router, printer, and other equipment is the smallest
imaginable. It's an example of what's sometimes called a PAN
(personal area network)—essentially a convenient, one-person
network. If you work in an office, you probably use a LAN (local
area
network), which is typically a few separate computers linked to one
or two printers, a scanner, and maybe a single, shared connection to
the Internet. Networks can be much bigger than this. At the opposite
end of the scale, we talk about MANs (metropolitan area networks),
which cover a whole town or city, and WANs (wide area networks),
which can cover any geographical area. The Internet is a WAN that
covers the entire world but, in practice, it's a network of networks
as well as individual computers: many of the machines linked to the
Net connect up through LANs operated by schools and businesses.
Photo: A wireless router like this one, made by Netgear, is the heart
of many home PANs.
Rules

Computers are all
about logic—and logic is all about following rules. Computers
networks are a bit like the army: everything in a network has to be
arranged with almost military precision and it has to behave
according to very clearly defined rules. In a LAN, for example, you
can't connect things together any old how: all the nodes (computers
and other devices) in the network have to be connected in an orderly
pattern known as the network topology. You can connect nodes in
a simple line (also called a daisy chain or bus), with each connected to the next in
line. You can connect them in a star shape with the various machines
radiating out from a central controller known as the network server.
Or you can link them into a loop (generally known as a ring). All the
devices on a network also have to follow clearly defined rules
(called protocols) when they communicate to ensure they
understand one another—for example, so they don't all try to send messages at
exactly the same time, which causes confusion.
Artwork: The three best-known computer network topologies: line (chain/bus), ring, and star.
Permissions and security
Just because a machine
is on a network, it doesn't automatically follow that every other
machine and device has access to it (or can be accessed by it). The
Internet is an obvious example. If you're online, you get access to
billions of Web pages, which are simply files stored on other
machines (servers) dotted all over the network. But you can't access
every single file on every single computer hooked up to the Internet:
you can't read my personal files and I can't read yours, unless we
specifically choose for that to happen.
Permissions and
security are central to the idea of networking: you can access files
and share resources only if someone gives you permission to do so.
Most personal computers that connect to the Internet allow outgoing
connections (so you can, theoretically, link to any other computer),
but block most incoming connections or prohibit them completely.
Servers (the machines on the Internet that hold and serve up Web
pages and other files) operate a more relaxed policy to incoming
connections. You've probably heard of hacking, which, in one
sense of
the word, means gaining unauthorized access to a computer network by
cracking passwords or defeating other security checks. To make a
network more secure, you can add a firewall (either a physical
device
or a piece of software running on your machine, or both) at the point
where your network joints onto another network or the Internet to
monitor and prohibit any unauthorized, incoming access attempts.
What makes a network?
To make a network, you
need nodes and connections (sometimes called links) between them.
Linking up the nodes means making some sort of a temporary or
permanent connection between them. In the last decade or so, wireless
connections have become one of the most popular ways of doing this,
especially in homes. In offices, wired connections are still more
commonplace—not least because they are generally faster and more
secure and because many newer offices have network cabling already in
place.

Photo: If your laptop doesn't have a network card, you
can simply plug in a PCMCIA adapter like this one. The adapter has a network card
built into it.
Apart from computers,
peripherals, and the connections between them, what else do you need?
Each node on a network needs a special circuit known as a network
card (or, more formally, a network interface card or NIC) to tell
it
how to interact with the network. Most new computers have network
cards built in as standard. If you have an older computer or laptop,
you may have to fit a separate plug-in circuit board (or, in a
laptop, add a PCMCIA card) to make your machine talk to a network.
Each network card has its own separate numeric identifier, known as a
MAC (media access control) code or LAN MAC address. A MAC code
is a
bit like a phone number: any machine on the network can communciate
with another one by sending a message quoting its MAC code. In a
similar way, MAC codes can be used to control which machines on a
network can access files and other shared resources. For example,
I've set up my wireless link to the Internet so that only two MAC
codes can ever gain access to it (restricting access to the network
cards built into my two computers). That helps to stop other people
in nearby buildings (or in the street) hacking into my connection or
using it by mistake.
The bigger you make a
network, the more extra parts you need to add to make it function
efficiently. Signals can travel only so far down cables or over
wireless links so, if you want to make a big network, you have to add
in devices called repeaters—effectively signal boosters. You
might
also need bridges, switches, and routers—devices
that help to link
together networks (or the parts of networks, which are known as
segments), regulate the traffic between them, and forward traffic
from one part of a network to another part.
How Ethernet works

Photo: A typical ethernet networking cable.
Not so long ago, computers were all made by different companies,
worked in different
ways, and couldn't communicate with one another. Often, they didn't
even have the same sorts of plugs and sockets on their cases! During
the 1980s and 1990s, everything became much more standardized and
it's now possible to connect virtually any machine to any other and
get them exchanging data without too much effort. That's largely
because most networks now use the same system, called Ethernet.
It
was developed in May 1973 by US computer engineer Dr Robert ("Bob")
Metcalfe (1946-), who went on to found 3Com and later became a
well-known computer-industry pundit (perhaps, somewhat unfairly, best
known for predicting a spectacular collapse of the Internet in 1995
that never actually occurred).
As Metcalfe originally
designed it, Ethernet was based on three very simple ideas. First,
computers would connect through the "ether" (a semi-serious,
semi-scientific name for the void of emptiness that separates them)
using standard coaxial cable (wires like the ones used in a television
antenna connection, made up of concentric metal layers). In
Ethernet-speak, the physical connection between the nodes (computers
and other devices) on the network is also known as the medium.
Things
have moved on quite a bit since the early 1970s and the medium is now
just as often a wireless radio link (you've probably heard of Wi-Fi,
which is the wireless version of Ethernet). Second, all the computers
and devices on a network would stay silent except for when they were
sending or receiving messages. Finally, when they wanted to
communicate, they'd do so by breaking up messages into small packets
of data and sending them around the network by a highly efficient
method known as packet switching (discussed in much more detail
in our article on the Internet).
If one machine wants
to send a message to another machine on an Ethernet network, it goes
through a process a bit like sending a letter. The message has to be
packaged in a standard format called a frame (a bit like the
envelope
that contains a letter). The frame includes a standard header, the
address of the device on the network it's intended for (like the
address on an envelope), the address of the machine that sent it
(like an envelope's return-to or sender's address), an indication of
how much data it contains, the data itself, some padding, and some
error checking information at the end (used to do a quick check on
whether the data has transmitted correctly). Unlike a letter, which
goes only to the recipient, the frame goes to every machine and
device on the network. Each machine reads the destination address to
figure out whether the frame is intended for them. If so, they act on
it; if not, they ignore it. Any machine on the network can transmit
messages through the ether at any time, but problems will occur if
two or more machines try to talk at once (known as a collision). If
that happens, the machines all fall silent for a random period of
time before trying again. Eventually, one will find the ether is
clear and get its message out first, followed by the other, so all
messages will get through eventually. Typical Ethernet equipment can
handle thousands of frames per second. In tech-speak, this method of
using the network is called carrier sense multiple access with
collision detection (CSMA/CD): that's a fancy way of saying that
the nodes do their best to transmit when the ether is clear ("carrier
sense"), they can all theoretically send or receive at any time
("multiple access"), and they have a way of sorting out the problem if
two happen to transmit at exactly the same time ("collision detection").