Computer Networks
Computer Networks
Computer networks
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 computerequipment).
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 at how it works!
Artwork: The basic concept of a computer network: a collection of computers (and related equipment) hooked
up with wired or wireless links so any machine can exchange information with any other.
Photo: Testing a small computer network linked to the Internet. Photo courtesy of NASA Glenn Research
Center (NASA-GRC).
Types of networks
Photo: A wireless router like this one, made by Netgear, is the heart of many home PANs.
3|Page
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.
Rules
Artwork: The three best-known computer network topologies: line (chain/bus), ring, and star.
Computers are all about logic—and logic is all about following rules. Computer
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
4|Page
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.
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.
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 communicate 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
6|Page
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.
Photo: Computer architecture: We can think of computers in layers, from the hardware and the BIOS at the
moment to the operating system and applications at the top. We can think of computer networks in a similar
way.
thinking about any of the other layers. Nevertheless, each layer is made
possible by things happening at lower levels, whether you're aware of that or
not. Things that happen at the higher levels could be carried out in many
different ways at the lower levels; for example, you can use a web browser
like Firefox (an application) on many different operating systems, and you can
run various operating systems on a particular laptop, even though the
hardware doesn't change at all.
Computer networks are similar: we all have different ideas about them and
care more or less about what they're doing and why. If you work in a small
office with your computer hooked up to other people's machines and shared
printers, probably all you care about is that you can send emails to your
colleagues and print out your stuff; you're not bothered how that actually
happens. But if you're charged with setting up the network in the first place,
you have to consider things like how it's physically linked together, what sort
of cables you're using and how long they can be, what the MAC addresses
are, and all kinds of other nitty gritty. Again, just like with computers, we can
think about a network in terms of its different layers—and there are two
popular ways of doing that.
Perhaps the best-known way is with what's called the OSI (Open Systems
Interconnect) model, based on an internationally agreed set of standards
devised by a committee of computer experts and first published in 1984. It
describes a computer network as a stack of seven layers. The lower layers
are closest to the computer hardware; the higher levels are closer to human
users; and each layer makes possible things that happen at the higher layers:
OSI was conceived as a way of making all kinds of different computers and
networks talk to one another, which was a major problem back in the 1960s,
1970s, and 1980s, when virtually all computing hardware was proprietary and
one manufacturer's equipment seldom worked with anyone else's.
If you've never heard of the OSI model, that's quite probably because a
different way of hooking up the world's computers triumphed over it, delivering
the amazing computer network you're using right now: the Internet. The
Internet is based on a two-part networking system called TCP/IP in which
computers hook up over networks (using what's called TCP, Transmission
Control Protocol) to exchange information in packets (using the Internet
Protocol, IP). We can understand TCP/IP using four slightly simpler layers,
sometimes known as the TCP/IP model (or the DARPA model, for the US
government's Defense Advanced Research Projects Agency that sponsored
its development):
Artwork: The TCP/IP model is easy to understand. In this example, suppose you're emailing someone over the
Internet. Your two devices are, in effect, connected by one long "cable" running between their network cards.
That's what the green Network Access layer at the bottom represents. Your email is transmitted as packets
(orange squares) using the Internet Protocol (IP), illustrated by the orange Internet layer. Transmission Control
Protocol (TCP) oversees this process in the blue Transport layer; and, in effect, TCP and IP work together. At
the top, in the Application layer, you sit at your computer using an email program (an application) that uses all
the layers below.
While the OSI model is quite an abstract and academic concept, rarely
encountered outside books and articles about computer networking, the
TCP/IP model is a simpler, easier-to-understand, and more practical
10 | P a g e
proposition: it's the bedrock of the Internet—and the very technology you're
using to read these words now.
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
12 | P a g e
Artwork: Checking the integrity of a large download with an MD5 code: If you've ever downloaded
a linux distribution (anything from a few hundred megabytes to several gigabytes of data), you've probably
done this—or you certainly should have done! On the original download page, you'll be given an MD5
checksum code matching the file you want to download. Once your download is complete, you simply run the
file through an MD5 calculator program (here I'm using winMd5sum) to calculate the MD5 code from the data
you've downloaded. If the two MD5 codes match, you can be reasonably confident your file downloaded
without any mistakes.
you can ask for all the data to be resent. That's laborious and inefficient—
doubling the time it takes to transmit information—and there are far better
methods of keeping data straight. One of the simplest is called parity
checking (or parity bit checking). Suppose you're sending strings of binary
digits (bits, made up of zeros and ones) over a network. Every time you send
seven bits, you add up the number of ones you've sent. If you've sent an odd
number of ones (1, 3, 5, or 7 of them), you then send an extra 1 to confirm
this; if you've sent an even number of ones (0, 2, 4, or 6), you send a zero
instead. The receiver can do the same sums with the data it sees, check the
parity bit, and so detect if a mistake has been made. Unfortunately, with
simple parity checking, it's not possible to say where an error has been made
or to correct it on the spot, but the receiver can at least spot a batch of
incorrect data and ask for it to be sent again.