~kjcole/edubuntu.cookbook-delete/wip

« back to all changes in this revision

Viewing changes to lore/chap08.lore

  • Committer: Kevin Cole
  • Date: 2005-12-22 01:12:48 UTC
  • Revision ID: kjcole@gri.gallaudet.edu-20051222011248-4b5d281afe896efe
Testing pull and merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
<body>
7
7
<h1>Networking</h1>
8
 
</p>
9
 
 
10
 
<p>8.1. Why network?
11
 
</p>
12
 
 
13
 
<p>On its own, a computer can be a fascinating tool. However,
14
 
when you connect many computers together using a network,
15
 
worlds of possibility open up. In a network, better use is
16
 
made of all the connected resources, because they can be
17
 
shared. For example, if there is one printer, everyone can use
18
 
it. It is also possible to concentrate resources where they
19
 
will have the greatest benefit --- all the additional memory
20
 
added to the server becomes available for running the programs
21
 
of all the clients.
22
 
</p>
23
 
 
24
 
<p>The advantages of networking only start with economies in
 
8
 
 
9
<h2>Why network?</h2>
 
10
 
 
11
<p>
 
12
On its own, a computer can be a fascinating tool. However, when you
 
13
connect many computers together using a network, worlds of possibility
 
14
open up. In a network, better use is made of all the connected
 
15
resources, because they can be shared. For example, if there is one
 
16
printer, everyone can use it. It is also possible to concentrate
 
17
resources where they will have the greatest benefit --- all the
 
18
additional memory added to the server becomes available for running
 
19
the programs of all the clients.
 
20
</p>
 
21
<p>
 
22
The advantages of networking only start with economies in
25
23
hardware expenditure. Another aspect, one that is really far
26
24
more exciting, is the opening up of communication channels
27
25
among lab users, and, if you can reach the internet, with the
32
30
Edubuntu lab. With a network, they can easily share documents,
33
31
discuss them, and have a record of discussions for the
34
32
learners that come after them.
35
 
_________________________________________________________
36
 
</p>
37
 
 
38
 
<p>8.1.1. Printing
39
 
</p>
40
 
 
41
 
<p>an Edubuntu lab will usually have only one or two printers for the
42
 
lab as a whole. Since everyone will use these, it's worthwhile
43
 
to get the best printers you can afford: as long as they're on
44
 
a network, everyone will benefit.
45
 
</p>
46
 
 
47
 
<p>Depending on the make of printer, it may be connected to the
48
 
network switch with a network cable, or it may be connected
49
 
directly to a print server (which may be the classroom server)
50
 
with a parallel cable.
51
 
</p>
52
 
 
53
 
<p>Printing in an Edubuntu lab will be managed using CUPS, the Common
54
 
Unix Printing System. It provides a web interface (accessible
55
 
at http://printserver:631/) where you may check the status of
56
 
printers and print jobs, print test pages, and so on. (
57
 
printserver is the hostname of the printer or the server to
 
33
</p>
 
34
 
 
35
<h3>Printing</h3>
 
36
 
 
37
<p>
 
38
An Edubuntu lab will usually have only one or two printers for the lab
 
39
as a whole. Since everyone will use these, it's worthwhile to get the
 
40
best printers you can afford: as long as they're on a network,
 
41
everyone will benefit.
 
42
</p>
 
43
<p>
 
44
Depending on the make of printer, it may be connected to the network
 
45
switch with a network cable, or it may be connected directly to a
 
46
print server (which may be the classroom server) with a parallel
 
47
cable.
 
48
</p>
 
49
<p>
 
50
Printing in an Edubuntu lab will be managed using CUPS, the Common
 
51
Unix Printing System. It provides a web interface (accessible at <a
 
52
href="http://printserver:631/">http://printserver:631/</a>) where you
 
53
may check the status of printers and print jobs, print test pages, and
 
54
so on. ( printserver is the hostname of the printer or the server to
58
55
which the printer is connected.)
59
 
_________________________________________________________
60
 
</p>
61
 
 
62
 
<p>8.1.2. Email
63
 
</p>
64
 
 
65
 
<p>Email has been called the "killer application" of the
66
 
internet. It's the most ubiquitous and accessible way to
67
 
communicate with people across the world.
68
 
</p>
69
 
 
70
 
<p>Not all Edubuntu labs have email. Generally, you'll only have email
71
 
if a Wizzy server is installed along with the classroom
72
 
application server. The Wizzy server functions as a post
73
 
office and a stand-in, or a proxy, for the world wide web.
74
 
</p>
75
 
 
76
 
<p>If your Edubuntu lab is equipped with a Wizzy server, you'll be able
77
 
to send mail to each other and to other schools or mailing
78
 
lists all over the world.
79
 
</p>
80
 
 
81
 
<p>XXX: How does Wizzy handle delivery of local email? Does that
82
 
also go via the Cape Town Wizzy server, and take a day for the
83
 
round trip? Probably not ..
84
 
_________________________________________________________
85
 
</p>
86
 
 
87
 
<p>8.1.3. File sharing
88
 
</p>
89
 
 
90
 
<p>Without a network, transferring files from one computer to
91
 
another is a difficult and inconvenient process. You have to
92
 
copy the file onto some storage medium (such as a floppy disk
93
 
or a CD) and carry it over to the other computer yourself.
94
 
Floppy disks tend to break or become silently corrupted. CDs
95
 
can only be written once, and are relatively expensive. Even
96
 
rewritable CDs are slow to use, and even more expensive.
97
 
Finally, all kinds of disk drives have many moving parts, and
98
 
they have to deal with a disk platter that spins hundreds of
99
 
times per second. They all break eventually.
100
 
</p>
101
 
 
102
 
<p><img src="illustrations/floppysilent.png">
103
 
Watch out for this one, it only looks innocent.
104
 
</p>
105
 
 
106
 
<p><img src="illustrations/floppyviolent.png">
107
 
If you're lucky, the floppy will let you know when it's
108
 
broken.
109
 
</p>
110
 
 
111
 
<p>It's much better to shift the job to network cables. Once
112
 
laid, a cable will keep on working forever. It doesn't cost
113
 
anything to transfer data over it, and it's very fast.
114
 
</p>
115
 
 
116
 
<p>In the thin-client configuration of an Edubuntu lab, the reality is
117
 
even better. None of the client workstations store any data,
118
 
so the need for them to have internal hard disk drives has
119
 
also been eliminated. The only computer in an Edubuntu lab that must
120
 
contain at least one disk drive is the classroom server. Every
121
 
user of the Edubuntu lab --- in other words, every person with a
122
 
username and password to login at a workstation --- has some
123
 
storage space on the classroom server's hard drive allocated
124
 
to them, where they may store their data. They all reach their
125
 
data via the network.
126
 
</p>
127
 
 
128
 
<p>This means that making a copy of a file for another user comes
129
 
down to making a copy elsewhere on the same disk drive.
130
 
Similarly, for files that many people need to share without
131
 
necessarily needing their own copies to modify, this means
132
 
that everyone may access the exact same copy of the file. In a
133
 
non-networked situation, every single workstation would need
134
 
their own copy of such files. This is the case for all the
135
 
operating system and application software, for example.
136
 
_________________________________________________________
137
 
</p>
138
 
 
139
 
<p>8.1.4. Servers and clients
140
 
</p>
141
 
 
142
 
<p>Without a network, every workstation needs to be sufficient
143
 
unto itself, and to provide all the storage space and
144
 
processing power that a user is likely to need. With the
145
 
introduction of a network, it becomes feasible to
146
 
differentiate between computers, and equip them according to
147
 
their roles. For an Edubuntu lab, this means removing everything that
148
 
can break or costs money from the client workstations ---
149
 
their role is only to receive data over the network, and to
150
 
display the user's desktop, sent from the server. The server
151
 
does all the work, so it can have all the memory, disk space
152
 
and computing power that you can afford. Everyone benefits
153
 
from money spent on the server.
154
 
_________________________________________________________
155
 
</p>
156
 
 
157
 
<p>8.2. Equipment
158
 
</p>
159
 
 
160
 
<p>In this section, we have a look at the different kinds of
161
 
equipment that we need to set up a network.
162
 
</p>
163
 
 
164
 
<p>There are many different kinds of computer networks, with
165
 
different strengths and weaknesses. Some might be designed for
166
 
the maximum data transfer speed, some to minimise costs, and
167
 
others to make it as easy as possible to connect computers to
168
 
one another. In the case of Edubuntu labs, we need a really fast
169
 
network, because everything displayed by the client
170
 
workstations needs to be sent from the server over the
171
 
network. We also need a standard network that allows any kind
 
56
</p>
 
57
 
 
58
<h3>Email</h3>
 
59
 
 
60
<p>
 
61
Email has been called the "killer application" of the internet. It's
 
62
the most ubiquitous and accessible way to communicate with people
 
63
across the world.
 
64
</p>
 
65
 
 
66
<p>
 
67
Not all Edubuntu labs have email. Generally, you'll only have email if
 
68
a Wizzy server is installed along with the classroom application
 
69
server. The Wizzy server functions as a post office and a stand-in, or
 
70
a proxy, for the world wide web.
 
71
</p>
 
72
 
 
73
<p>
 
74
If your Edubuntu lab is equipped with a Wizzy server, you'll be able
 
75
to send mail to each other and to other schools or mailing lists all
 
76
over the world.
 
77
</p>
 
78
 
 
79
<p>
 
80
XXX: How does Wizzy handle delivery of local email? Does that also go
 
81
via the Cape Town Wizzy server, and take a day for the round trip?
 
82
Probably not ..
 
83
</p>
 
84
 
 
85
<h3>File sharing</h3>
 
86
 
 
87
<p>
 
88
Without a network, transferring files from one computer to another is
 
89
a difficult and inconvenient process. You have to copy the file onto
 
90
some storage medium (such as a floppy disk or a CD) and carry it over
 
91
to the other computer yourself.  Floppy disks tend to break or become
 
92
silently corrupted. CDs can only be written once, and are relatively
 
93
expensive. Even rewritable CDs are slow to use, and even more
 
94
expensive.  Finally, all kinds of disk drives have many moving parts,
 
95
and they have to deal with a disk platter that spins hundreds of times
 
96
per second. They all break eventually.
 
97
</p>
 
98
<p>
 
99
<img src="illustrations/floppysilent.png" /> Watch out for this one,
 
100
it only looks innocent.
 
101
</p>
 
102
<p>
 
103
<img src="illustrations/floppyviolent.png" /> If you're lucky, the
 
104
floppy will let you know when it's broken.
 
105
</p>
 
106
<p>
 
107
It's much better to shift the job to network cables. Once laid, a
 
108
cable will keep on working forever. It doesn't cost anything to
 
109
transfer data over it, and it's very fast.
 
110
</p>
 
111
<p>
 
112
In the thin-client configuration of an Edubuntu lab, the reality is
 
113
even better. None of the client workstations store any data, so the
 
114
need for them to have internal hard disk drives has also been
 
115
eliminated. The only computer in an Edubuntu lab that must contain at
 
116
least one disk drive is the classroom server. Every user of the
 
117
Edubuntu lab --- in other words, every person with a username and
 
118
password to login at a workstation --- has some storage space on the
 
119
classroom server's hard drive allocated to them, where they may store
 
120
their data. They all reach their data via the network.
 
121
</p>
 
122
 
 
123
<p>
 
124
This means that making a copy of a file for another user comes down to
 
125
making a copy elsewhere on the same disk drive.  Similarly, for files
 
126
that many people need to share without necessarily needing their own
 
127
copies to modify, this means that everyone may access the exact same
 
128
copy of the file. In a non-networked situation, every single
 
129
workstation would need their own copy of such files. This is the case
 
130
for all the operating system and application software, for example.
 
131
</p>
 
132
 
 
133
<h3>Servers and clients</h3>
 
134
 
 
135
<p>
 
136
Without a network, every workstation needs to be sufficient unto
 
137
itself, and to provide all the storage space and processing power that
 
138
a user is likely to need. With the introduction of a network, it
 
139
becomes feasible to differentiate between computers, and equip them
 
140
according to their roles. For an Edubuntu lab, this means removing
 
141
everything that can break or costs money from the client workstations
 
142
--- their role is only to receive data over the network, and to
 
143
display the user's desktop, sent from the server. The server does all
 
144
the work, so it can have all the memory, disk space and computing
 
145
power that you can afford. Everyone benefits from money spent on the
 
146
server.
 
147
</p>
 
148
 
 
149
<h2>Equipment</h2>
 
150
 
 
151
<p>
 
152
In this section, we have a look at the different kinds of equipment
 
153
that we need to set up a network.
 
154
</p>
 
155
<p>
 
156
There are many different kinds of computer networks, with different
 
157
strengths and weaknesses. Some might be designed for the maximum data
 
158
transfer speed, some to minimise costs, and others to make it as easy
 
159
as possible to connect computers to one another. In the case of
 
160
Edubuntu labs, we need a really fast network, because everything
 
161
displayed by the client workstations needs to be sent from the server
 
162
over the network. We also need a standard network that allows any kind
172
163
of computer or peripheral to be added to the network easily.
173
164
</p>
174
 
 
175
 
<p>In order to meet these criteria, Edubuntu lab uses an Ethernet
176
 
network with category 5 network cabling (CAT-5, for short).
177
 
</p>
178
 
 
179
 
<p>In an Ethernet, data packets are broadcast onto the network
180
 
for all connected devices to receive. The devices themselves
181
 
then examine the data packet to determine whether it was meant
182
 
for them. If so, they process it; otherwise, they drop it on
183
 
the floor and it vanishes.
184
 
</p>
185
 
 
186
 
<p>The name "Ethernet" comes from the ancient Greek concept of
187
 
"ether". According to them, this was the fluid that filled the
188
 
spaces between stars. Of course there isn't any such thing,
189
 
but they made it up because surely there couldn't be nothing
190
 
between stars, could there? In an Ethernet, as far as the
191
 
communicating computers are concerned, there aren't any cables
192
 
either. Of course there really are cables, but you don't have
193
 
to send a data packet down a specific cable to a specific
194
 
computer. You just entrust it to the "ether", and all
 
165
<p>
 
166
In order to meet these criteria, Edubuntu lab uses an Ethernet network
 
167
with category 5 network cabling (CAT-5, for short).
 
168
</p>
 
169
<p>
 
170
In an Ethernet, data packets are broadcast onto the network for all
 
171
connected devices to receive. The devices themselves then examine the
 
172
data packet to determine whether it was meant for them. If so, they
 
173
process it; otherwise, they drop it on the floor and it vanishes.
 
174
</p>
 
175
<p>
 
176
The name "Ethernet" comes from the ancient Greek concept of
 
177
"ether". According to them, this was the fluid that filled the spaces
 
178
between stars. Of course there isn't any such thing, but they made it
 
179
up because surely there couldn't be nothing between stars, could
 
180
there? In an Ethernet, as far as the communicating computers are
 
181
concerned, there aren't any cables either. Of course there really are
 
182
cables, but you don't have to send a data packet down a specific cable
 
183
to a specific computer. You just entrust it to the "ether", and all
195
184
computers get the packet.
196
 
_________________________________________________________
197
 
</p>
198
 
 
199
 
<p>8.2.1. Switches / Hubs
200
 
</p>
201
 
 
202
 
<p>There are different ways of wiring an Ethernet local area
203
 
network. One way is to simply lay coaxial cable from one
204
 
computer to the next, until all the computers are connected,
205
 
forming a ring. This is relatively simple, but the resulting
206
 
network is slow, both because of the electrical properties of
207
 
the coaxial cable, as well as because all the data has to
208
 
share a single cable.
209
 
</p>
210
 
 
211
 
<p>Since an Edubuntu lab needs more speed, a star topology is used
212
 
instead diagram. In this configuration, a single CAT-5 cable
213
 
connects each workstation to a central node. This central node
214
 
acts as an interchange. In a simple network where speed isn't
215
 
critical, this node can be a hub. This is a device with ports
216
 
where you can plug in many network cables; usually 8, 16 or
217
 
24. A hub is very chatty: it simply repeats all the data
218
 
coming in on one port on all the other ports. This way, the
219
 
data is sure to reach the computer it's meant for.
220
 
Unfortunately, it also reaches all the other computers, taking
 
185
</p>
 
186
 
 
187
<h3>Switches / Hubs</h3>
 
188
 
 
189
<p>
 
190
There are different ways of wiring an Ethernet local area network. One
 
191
way is to simply lay coaxial cable from one computer to the next,
 
192
until all the computers are connected, forming a ring. This is
 
193
relatively simple, but the resulting network is slow, both because of
 
194
the electrical properties of the coaxial cable, as well as because all
 
195
the data has to share a single cable.
 
196
</p>
 
197
<p>
 
198
Since an Edubuntu lab needs more speed, a star topology is used
 
199
instead diagram. In this configuration, a single CAT-5 cable connects
 
200
each workstation to a central node. This central node acts as an
 
201
interchange. In a simple network where speed isn't critical, this node
 
202
can be a hub. This is a device with ports where you can plug in many
 
203
network cables; usually 8, 16 or 24. A hub is very chatty: it simply
 
204
repeats all the data coming in on one port on all the other
 
205
ports. This way, the data is sure to reach the computer it's meant
 
206
for.  Unfortunately, it also reaches all the other computers, taking
221
207
up precious network bandwidth.
222
208
</p>
223
 
 
224
 
<p>Instead of a hub, you can also use a switch. It looks just
225
 
like a hub, but it's cleverer about routing the traffic that
226
 
moves across it. In short, it remembers which computer is
227
 
where, so that when it receives a data packet meant for a
228
 
particular computer, it sends it only to the port where that
229
 
computer is connected.
230
 
</p>
231
 
 
232
 
<p>Switches can be linked together to form one bigger switch. For
233
 
example, if you have a lab with 25 workstations, you can link
234
 
together two 16-port switches using a fly-lead. See Section
235
 
5.4.1.
236
 
</p>
237
 
 
238
 
<p><img src="illustrations/switch-flyleads.gif">
239
 
Every switch has a couple of special high-speed ports. These
240
 
are used to link the switch to the server, or to link switches
241
 
to each other.
242
 
_________________________________________________________
243
 
</p>
244
 
 
245
 
<p>8.2.2. Cabling
246
 
</p>
247
 
 
248
 
<p>Category 5 cable, commonly known as CAT-5, is an unshielded
249
 
twisted pair type cable designed for high signal integrity.
250
 
The actual standard defines specific electrical properties of
251
 
the wire, but it is most commonly known as being rated for its
252
 
Ethernet capability of 100 MBit/s. Its specific standard
253
 
designation is EIA/TIA-568. CAT-5 cable typically has three
254
 
twists per inch of each twisted pair of 24 gauge copper wires
255
 
within the cable. Another important characteristic is that the
256
 
wires are insulated with a plastic (FEP) that has low
257
 
dispersion; that is, the dielectric constant of the plastic
258
 
does not depend greatly on frequency. Special attention also
259
 
has to be paid to minimising impedance mismatches at
260
 
connection points. In practise, this means that, when you
261
 
attach connectors to the cable ends, you shouldn't untwist
262
 
more of the cable than absolutely necessary.
263
 
_________________________________________________________
264
 
</p>
265
 
 
266
 
<p>8.2.3. Building the network
267
 
</p>
268
 
 
269
 
<p>When laying CAT-5 cable, you need a crimping tool, RJ-45
270
 
jacks, and boots for the jacks.
271
 
</p>
272
 
 
273
 
<p>The crimping tool is a clever piece of work. It combines the
274
 
functions of a cable-cutter, wire-stripper, and a special grip
275
 
specifically designed to fix the RJ-45 jack to the cable. I'll
276
 
explain them as I go through the steps of preparing a cable.
277
 
</p>
278
 
 
279
 
<p><img src="illustrations/netwerkkabelplug.png">
280
 
An RJ-45
281
 
</p>
282
 
 
283
 
<p><img src="illustrations/crimptool.png">
284
 
A crimping tool
285
 
_________________________________________________________
286
 
</p>
287
 
 
288
 
<p>8.2.3.1. Cutting the cables
289
 
</p>
290
 
 
291
 
<p>The first thing you need to do, is to cut the cable into the
292
 
appropriate lengths, using the crimping tool's cable-cutter.
293
 
To do this, measure the distance from the box where the switch
294
 
will be installed to the furthest computer in each row.
295
 
(Usually, in an Edubuntu lab, there will be four rows of
296
 
workstations.) It's easiest to use the cable itself for this,
297
 
and to mark the length with a piece of masking tape.
298
 
</p>
299
 
 
300
 
<p>To keep things organised, write something on the masking tape
301
 
to identify the computer which the cable is meant for. Label
302
 
the rows using a letter (so that you have rows A, B, C and D),
303
 
and label each computer in a row with a number (so that you
304
 
have A1 to A8, and so on). Once you have the longest cable in
305
 
each row, you can figure out all the other lengths by
306
 
shortening each subsequent cable with the distance between two
307
 
workstations (normally, this will be 1200mm).
308
 
</p>
309
 
 
310
 
<p>While you are cutting the cable into the right lengths, take
311
 
care to keep the cables for each row together. Bind all the
312
 
cables for a row together in a bundle, using masking tape. At
313
 
the one end of the bundle (the switch end) all the cable ends
314
 
will be together. On the other end, the ends will vary from
315
 
the shortest to the longest.
316
 
</p>
317
 
 
318
 
<p>Besides the cables from the switch to the workstations, you
319
 
also need to cut a couple of fly leads. These are used to
320
 
connect the server(s) to the switch, and also to link together
321
 
multiple switches.
322
 
_________________________________________________________
323
 
</p>
324
 
 
325
 
<p>8.2.3.2. Laying the cables
326
 
</p>
327
 
 
328
 
<p>Once all the cables have been cut and gathered together in
329
 
bundles, you can take them in to the lab. Put them on the
330
 
ground underneath the desks, and ensure that the cables at the
331
 
switch end can comfortably reach the switch.
332
 
</p>
333
 
 
334
 
<p>If your network shares the same trunking with the electrical
335
 
wiring of the lab, you MUST switch off the lab's power at the
336
 
electrical subdivision board for the lab.
337
 
</p>
338
 
 
339
 
<p>Now you need to put the cables inside the trunking. To do
340
 
this, get as much help as you can muster, as it's hard work
341
 
and no fun to do alone. Take the cover off the trunking. Note
342
 
carefully where each workstation will be standing, and drill a
343
 
small hole in the trunking below each workstation, for the
344
 
CAT-5 cable to reach the workstation. While the cables and the
345
 
covers are lying on the floor, thread each cable through the
346
 
correct hole in the trunking (the cable for computer A1 goes
347
 
through the hole for A1, and so on).
348
 
</p>
349
 
 
350
 
<p>Once this is done, carefully put the cables inside the
351
 
trunking and put the covers back on. Pass the cable ends up
352
 
above the desks. You should have about 1m free cable for each
353
 
workstation.
354
 
_________________________________________________________
355
 
</p>
356
 
 
357
 
<p>8.2.3.3. Crimping the cables
358
 
</p>
359
 
 
360
 
<p>Stepping back, your lab looks the same as before, with the
361
 
addition of cable ends emerging above the desks, and a whole
362
 
bundle of cables terminating at the switch cabinet. Now you
363
 
need to attach RJ-45 jacks to the cable ends, so that they can
364
 
be plugged into the switch at the one end, and into each
365
 
workstation's network card on the other end.
366
 
</p>
367
 
 
368
 
<p>To do this, complete the following steps for each cable.
369
 
</p>
370
 
 
371
 
<p>* Insert the 'boot' over the cable. This will cover the
372
 
exposed wires where the RJ-45 jack is attached to the
373
 
cable wires.
374
 
* Cut through the sheath around the cable to expose the
375
 
pairs of coloured wires, without damaging them.
376
 
* Untwist about 2cm of each pair of wires (no more, as this
377
 
impairs the effectiveness of the cable for data
378
 
transmission).
379
 
* Arrange the wires in the correct colour sequence.
380
 
(Straight-through cabling for cables between the switch
381
 
and workstations, or Cross-over cabling for fly leads that
382
 
connect switches, or that connect the switch to the
383
 
server).
384
 
* Insert the wires into the RJ-45 connector. Push them up so
385
 
that all the wires terminate right at the tip of the
386
 
connector.
387
 
* Check the colour sequence of the wires again.
388
 
* Crimp the wires to the connector using the tool. You'll
389
 
notice that the connector has copper strips along the top.
390
 
These connect to matching strips in the plug of the
391
 
workstation's network card or the switch. When you crimp
392
 
the connector, it bites into the wires through their
393
 
plastic covering, connecting its copper strips to the
394
 
copper wire. This is why it's critical to push the wires
395
 
right up to the tip of the connector, so that the
396
 
connector's teeth find the wire.
397
 
* Test the cable using a continuity tester, if you have one.
398
 
If you don't, you'll just have to figure out whether it
399
 
works by trial and error later.
400
 
</p>
401
 
 
402
 
<p><img src="illustrations/cablingcrossed.png">
403
 
Cross-over CAT-5 cable
404
 
</p>
405
 
 
406
 
<p><img src="illustrations/cablingstraight.png">
407
 
Straight-through CAT-5 cable
408
 
_________________________________________________________
409
 
</p>
410
 
 
411
 
<p>8.3. LANs and WANs
412
 
</p>
413
 
 
414
 
<p>You have now constructed a local area network, or LAN. It's
415
 
what gives your Edubuntu lab life, but it stops at the classroom
416
 
walls. To be able to send and receive email or access the
417
 
internet, it is necessary to connect to further networks. This
418
 
happens over a wide area network, or WAN. A WAN is a computer
419
 
network covering a wide geographical area. The grandest
420
 
example of a WAN is the internet.
421
 
</p>
422
 
 
423
 
<p>WANs are used to connect local area networks together, so that
424
 
users and computers in one location can communicate with users
425
 
and computers in other locations. Many WANs are built for one
426
 
particular organisation and are private; others, built by
427
 
internet service providers, provide connections from an
428
 
organisation's LAN to the internet. This is the case with a
429
 
Edubuntu lab that is connected to the internet. Private WANs are
430
 
most often built using leased lines. At each end of the leased
431
 
line, a router connects to the LAN on one side and a hub or a
432
 
switch within the WAN on the other. (XXX: diagram)
433
 
</p>
434
 
 
435
 
<p>While a LAN is a network of computers and devices, a WAN is
436
 
most often a network of networks. A router, or a computer
437
 
configured to function as a router, on each network, connects
438
 
to routers on other networks.
439
 
</p>
440
 
 
441
 
<p>Behind every router there may be many computers (or networks)
442
 
that are not directly connected to the internet. It is then
443
 
the function of the internet gateway computer to route packets
444
 
from outside networks to the correct computer on the inside.
445
 
All the computers on a LAN share a single connection to the
446
 
internet. In the case of Edubuntu labs, the Wizzy server, if you
447
 
have one, acts as a gateway computer.
448
 
</p>
449
 
 
450
 
<p>However, because a permanent WAN connection is very expensive
451
 
in South Africa, especially in rural areas where
452
 
telecommunication infrastructure may be lacking, an Edubuntu lab will
453
 
connect to the internet only intermittently. When it is not
454
 
connected, the Wizzy server acts as a proxy for the internet,
455
 
serving cached requests, and queueing email to send later when
456
 
the connection is established again.
457
 
_________________________________________________________
458
 
</p>
459
 
 
460
 
<p>8.4. TCP/IP
461
 
</p>
462
 
 
463
 
<p>The network protocol of the Edubuntu lab LAN is the same as that
464
 
used for communication on the internet, namely TCP/IP. This is
465
 
the Transmission Control Protocol (TCP), encapsulated within
466
 
the Internet Protocol (IP). The Internet Protocol takes care
467
 
of routing data packets from a source IP address to a
468
 
destination IP address. An IP address consists of four numbers
469
 
that look like this: 192.168.10.200. IP packets can contain
470
 
TCP packets. Whereas an IP packet only knows where it should
471
 
go, TCP packets contain information about their position in a
472
 
sequence of packets.
473
 
</p>
474
 
 
475
 
<p>TCP is wonderful: it makes it possible to treat a flaky
476
 
network as though it were perfectly reliable. When you send
477
 
anything across a TCP/IP network (e.g. an email message, an
478
 
image, or a document) it is broken down into many TCP packets.
479
 
These are numbered and sent, one by one, to the destination
480
 
computer. At the destination, the sequence number is used to
481
 
put the packets in the correct order (as they may have become
482
 
mixed up in transit). If there are gaps in the sequence, only
483
 
those packets are requested again. If some packets are
484
 
received more than once, the extra packets are simply dropped.
485
 
Once all the packets in the sequence have been received, the
486
 
entire file has been transferred successfully.
487
 
</p>
488
 
 
489
 
<p>Unsurprisingly, an IP address cannot be just any four numbers.
490
 
Actually, there is a lot of underlying structure. In the first
491
 
place, the numbers are a sequence of four bytes. Computers
492
 
generally handle data one byte at a time, so it's convenient
493
 
to specify things as a sequence of bytes. A byte consists of
494
 
eight binary digits. The binary number system has only two
495
 
digits, namely 0 and 1: just as 99999999 is the largest number
496
 
that you can express with eight decimal digits, 11111111 is
497
 
the largest number that you can express with eight binary
498
 
digits. If you convert that number to decimal, you get 256.
499
 
For this reason, a sequence like 300.5.502.743 does not make
500
 
any sense as an IP address.
501
 
</p>
502
 
 
503
 
<p>In the second place, some address ranges are reserved. For
504
 
example, all the networks that start with 192.168.---.--- as
505
 
their first two digits are private, not routed on the
506
 
internet. The whole public IP address space is divided among
507
 
ISPs. Each ISP gets a range of numbers that they may portion
508
 
out between its customers. This range of numbers is described
509
 
in terms of a netmask, a number which looks similar to an IP
510
 
address, but is used to match all the IP addresses that belong
511
 
to a particular network. Private networks can also be
512
 
segmented into subnets using netmasks. Any computer on a
513
 
network can send IP packets to any other computer on the
514
 
network, but to send an IP packet to a computer on a different
515
 
network, there must be a gateway computer which is configured
516
 
to help the packets cross from one network to another.
517
 
</p>
518
 
 
519
 
<p>Gateway computers also implement network management policies,
520
 
e.g. by way of firewall software, that specify what traffic is
521
 
allowed into and out of a network.
522
 
_________________________________________________________
523
 
</p>
524
 
 
525
 
<p>8.5. LTSP, Wizzy, Wikipedia
526
 
</p>
527
 
 
528
 
<p>On an Edubuntu lab LAN, there may be up to three important servers.
529
 
</p>
530
 
 
531
 
<p>* Most importantly, there will always be an LTSP classroom
532
 
server, which serves the desktop sessions of all the
533
 
client workstations.
534
 
* If the Edubuntu lab makes use of the Wizzy solution for internet
535
 
connectivity, there will be a Wizzy server functioning as
536
 
mail server (using Courier for IMAP mail storage, and exim
537
 
for sending and receiving of mail via SMTP) and web proxy
538
 
(using wwwoffle). The address of this server will need to
539
 
be configured in the mail clients and web browsers of all
540
 
Edubuntu lab users.
541
 
For mail clients (XXX: Thunderbird?), the proper ports on
542
 
the Wizzy server needs to be configured as SMTP and IMAP
543
 
server. This will normally be ports 25 and 143 of
544
 
XXX.myschool.Edubuntu lab.org.za. For web browsers, the Wizzy
545
 
server needs to be configured as proxy server for all
546
 
protocols (HTTP, SSL, FTP). wwwoffle, the proxy server,
547
 
usually runs on port 3128.
548
 
* If a local mirror of the Wikipedia project has been
549
 
installed, it will be available as a website on the LAN,
550
 
e.g. at XXX http://wikipedia.myschool.Edubuntu lab.org.za/. As a
551
 
website, it's served by apache, just like the
552
 
administration pages of the Wizzy server. The Wikipedia
553
 
and the mail server / web proxy server may be the same
554
 
machine.
555
 
_________________________________________________________
 
209
<p>
 
210
Instead of a hub, you can also use a switch. It looks just like a hub,
 
211
but it's cleverer about routing the traffic that moves across it. In
 
212
short, it remembers which computer is where, so that when it receives
 
213
a data packet meant for a particular computer, it sends it only to the
 
214
port where that computer is connected.
 
215
</p>
 
216
<p>
 
217
Switches can be linked together to form one bigger switch. For
 
218
example, if you have a lab with 25 workstations, you can link together
 
219
two 16-port switches using a fly-lead. See Section 5.4.1.
 
220
</p>
 
221
<p>
 
222
<img src="illustrations/switch-flyleads.gif" /> Every switch has a
 
223
couple of special high-speed ports. These are used to link the switch
 
224
to the server, or to link switches to each other.
 
225
</p>
 
226
 
 
227
<h3>Cabling</h3>
 
228
 
 
229
<p>
 
230
Category 5 cable, commonly known as CAT-5, is an unshielded twisted
 
231
pair type cable designed for high signal integrity.  The actual
 
232
standard defines specific electrical properties of the wire, but it is
 
233
most commonly known as being rated for its Ethernet capability of 100
 
234
MBit/s. Its specific standard designation is EIA/TIA-568. CAT-5 cable
 
235
typically has three twists per inch of each twisted pair of 24 gauge
 
236
copper wires within the cable. Another important characteristic is
 
237
that the wires are insulated with a plastic (FEP) that has low
 
238
dispersion; that is, the dielectric constant of the plastic does not
 
239
depend greatly on frequency. Special attention also has to be paid to
 
240
minimising impedance mismatches at connection points. In practise,
 
241
this means that, when you attach connectors to the cable ends, you
 
242
shouldn't untwist more of the cable than absolutely necessary.
 
243
</p>
 
244
 
 
245
<h3>Building the network</h3>
 
246
 
 
247
<p>
 
248
When laying CAT-5 cable, you need a crimping tool, RJ-45 jacks, and
 
249
boots for the jacks.
 
250
</p>
 
251
<p>
 
252
The crimping tool is a clever piece of work. It combines the functions
 
253
of a cable-cutter, wire-stripper, and a special grip specifically
 
254
designed to fix the RJ-45 jack to the cable. I'll explain them as I go
 
255
through the steps of preparing a cable.
 
256
</p>
 
257
 
 
258
<p><img src="illustrations/netwerkkabelplug.png" /> An RJ-45</p>
 
259
<p><img src="illustrations/crimptool.png" /> A crimping tool</p>
 
260
 
 
261
<h4>Cutting the cables</h4>
 
262
 
 
263
<p>
 
264
The first thing you need to do, is to cut the cable into the
 
265
appropriate lengths, using the crimping tool's cable-cutter.  To do
 
266
this, measure the distance from the box where the switch will be
 
267
installed to the furthest computer in each row.  (Usually, in an
 
268
Edubuntu lab, there will be four rows of workstations.) It's easiest
 
269
to use the cable itself for this, and to mark the length with a piece
 
270
of masking tape.
 
271
</p>
 
272
<p>
 
273
To keep things organised, write something on the masking tape to
 
274
identify the computer which the cable is meant for. Label the rows
 
275
using a letter (so that you have rows A, B, C and D), and label each
 
276
computer in a row with a number (so that you have A1 to A8, and so
 
277
on). Once you have the longest cable in each row, you can figure out
 
278
all the other lengths by shortening each subsequent cable with the
 
279
distance between two workstations (normally, this will be 1200mm).
 
280
</p>
 
281
<p>
 
282
While you are cutting the cable into the right lengths, take care to
 
283
keep the cables for each row together. Bind all the cables for a row
 
284
together in a bundle, using masking tape. At the one end of the bundle
 
285
(the switch end) all the cable ends will be together. On the other
 
286
end, the ends will vary from the shortest to the longest.
 
287
</p>
 
288
 
 
289
<p>
 
290
Besides the cables from the switch to the workstations, you also need
 
291
to cut a couple of fly leads. These are used to connect the server(s)
 
292
to the switch, and also to link together multiple switches.
 
293
</p>
 
294
 
 
295
<h4>Laying the cables</h4>
 
296
 
 
297
<p>
 
298
Once all the cables have been cut and gathered together in bundles,
 
299
you can take them in to the lab. Put them on the ground underneath the
 
300
desks, and ensure that the cables at the switch end can comfortably
 
301
reach the switch.
 
302
</p>
 
303
<p>
 
304
If your network shares the same trunking with the electrical wiring of
 
305
the lab, you MUST switch off the lab's power at the electrical
 
306
subdivision board for the lab.
 
307
</p>
 
308
<p>
 
309
Now you need to put the cables inside the trunking. To do this, get as
 
310
much help as you can muster, as it's hard work and no fun to do
 
311
alone. Take the cover off the trunking. Note carefully where each
 
312
workstation will be standing, and drill a small hole in the trunking
 
313
below each workstation, for the CAT-5 cable to reach the
 
314
workstation. While the cables and the covers are lying on the floor,
 
315
thread each cable through the correct hole in the trunking (the cable
 
316
for computer A1 goes through the hole for A1, and so on).
 
317
</p>
 
318
<p>
 
319
Once this is done, carefully put the cables inside the trunking and
 
320
put the covers back on. Pass the cable ends up above the desks. You
 
321
should have about 1m free cable for each workstation.
 
322
</p>
 
323
 
 
324
<h4>Crimping the cables</h4>
 
325
 
 
326
<p>
 
327
Stepping back, your lab looks the same as before, with the addition of
 
328
cable ends emerging above the desks, and a whole bundle of cables
 
329
terminating at the switch cabinet. Now you need to attach RJ-45 jacks
 
330
to the cable ends, so that they can be plugged into the switch at the
 
331
one end, and into each workstation's network card on the other end.
 
332
</p>
 
333
<p>
 
334
To do this, complete the following steps for each cable.
 
335
</p>
 
336
 
 
337
<ul>
 
338
  <li>Insert the 'boot' over the cable. This will cover the exposed
 
339
  wires where the RJ-45 jack is attached to the cable wires.</li>
 
340
 
 
341
  <li>Cut through the sheath around the cable to expose the pairs of
 
342
  coloured wires, without damaging them.</li>
 
343
 
 
344
  <li>Untwist about 2cm of each pair of wires (no more, as this
 
345
  impairs the effectiveness of the cable for data transmission).</li>
 
346
 
 
347
  <li>Arrange the wires in the correct colour
 
348
  sequence. (Straight-through cabling for cables between the switch
 
349
  and workstations, or Cross-over cabling for fly leads that connect
 
350
  switches, or that connect the switch to the server).</li>
 
351
 
 
352
  <li>Insert the wires into the RJ-45 connector. Push them up so that
 
353
  all the wires terminate right at the tip of the connector.</li>
 
354
 
 
355
  <li>Check the colour sequence of the wires again.</li>
 
356
 
 
357
  <li>Crimp the wires to the connector using the tool. You'll notice
 
358
  that the connector has copper strips along the top. These connect to
 
359
  matching strips in the plug of the workstation's network card or the
 
360
  switch. When you crimp the connector, it bites into the wires
 
361
  through their plastic covering, connecting its copper strips to the
 
362
  copper wire. This is why it's critical to push the wires right up to
 
363
  the tip of the connector, so that the connector's teeth find the
 
364
  wire.</li>
 
365
 
 
366
  <li>Test the cable using a continuity tester, if you have one. If
 
367
  you don't, you'll just have to figure out whether it works by trial
 
368
  and error later.</li>
 
369
 
 
370
</ul>
 
371
 
 
372
<p><img src="illustrations/cablingcrossed.png" /> Cross-over CAT-5 cable</p>
 
373
 
 
374
<p><img src="illustrations/cablingstraight.png" /> Straight-through CAT-5 cable</p>
 
375
 
 
376
<h2>LANs and WANs</h2>
 
377
 
 
378
<p>
 
379
You have now constructed a local area network, or LAN. It's what gives
 
380
your Edubuntu lab life, but it stops at the classroom walls. To be
 
381
able to send and receive email or access the internet, it is necessary
 
382
to connect to further networks. This happens over a wide area network,
 
383
or WAN. A WAN is a computer network covering a wide geographical
 
384
area. The grandest example of a WAN is the internet.
 
385
</p>
 
386
<p>
 
387
WANs are used to connect local area networks together, so that users
 
388
and computers in one location can communicate with users and computers
 
389
in other locations. Many WANs are built for one particular
 
390
organisation and are private; others, built by internet service
 
391
providers, provide connections from an organisation's LAN to the
 
392
internet. This is the case with a Edubuntu lab that is connected to
 
393
the internet. Private WANs are most often built using leased lines. At
 
394
each end of the leased line, a router connects to the LAN on one side
 
395
and a hub or a switch within the WAN on the other. (XXX: diagram)
 
396
</p>
 
397
<p>
 
398
While a LAN is a network of computers and devices, a WAN is most often
 
399
a network of networks. A router, or a computer configured to function
 
400
as a router, on each network, connects to routers on other networks.
 
401
</p>
 
402
<p>
 
403
Behind every router there may be many computers (or networks) that are
 
404
not directly connected to the internet. It is then the function of the
 
405
internet gateway computer to route packets from outside networks to
 
406
the correct computer on the inside.  All the computers on a LAN share
 
407
a single connection to the internet. In the case of Edubuntu labs, the
 
408
Wizzy server, if you have one, acts as a gateway computer.
 
409
</p>
 
410
<p>
 
411
However, because a permanent WAN connection is very expensive in South
 
412
Africa, especially in rural areas where telecommunication
 
413
infrastructure may be lacking, an Edubuntu lab will connect to the
 
414
internet only intermittently. When it is not connected, the Wizzy
 
415
server acts as a proxy for the internet, serving cached requests, and
 
416
queueing email to send later when the connection is established again.
 
417
</p>
 
418
 
 
419
<h2>TCP/IP</h2>
 
420
 
 
421
<p>
 
422
The network protocol of the Edubuntu lab LAN is the same as that used
 
423
for communication on the internet, namely TCP/IP. This is the
 
424
Transmission Control Protocol (TCP), encapsulated within the Internet
 
425
Protocol (IP). The Internet Protocol takes care of routing data
 
426
packets from a source IP address to a destination IP address. An IP
 
427
address consists of four numbers that look like this: 192.168.10.200. 
 
428
IP packets can contain TCP packets. Whereas an IP packet only knows
 
429
where it should go, TCP packets contain information about their
 
430
position in a sequence of packets.
 
431
</p>
 
432
<p>
 
433
TCP is wonderful: it makes it possible to treat a flaky network as
 
434
though it were perfectly reliable. When you send anything across a
 
435
TCP/IP network (e.g. an email message, an image, or a document) it is
 
436
broken down into many TCP packets.  These are numbered and sent, one
 
437
by one, to the destination computer. At the destination, the sequence
 
438
number is used to put the packets in the correct order (as they may
 
439
have become mixed up in transit). If there are gaps in the sequence,
 
440
only those packets are requested again. If some packets are received
 
441
more than once, the extra packets are simply dropped.  Once all the
 
442
packets in the sequence have been received, the entire file has been
 
443
transferred successfully.
 
444
</p>
 
445
<p>
 
446
Unsurprisingly, an IP address cannot be just any four numbers.
 
447
Actually, there is a lot of underlying structure. In the first place,
 
448
the numbers are a sequence of four bytes. Computers generally handle
 
449
data one byte at a time, so it's convenient to specify things as a
 
450
sequence of bytes. A byte consists of eight binary digits. The binary
 
451
number system has only two digits, namely 0 and 1: just as 99999999 is
 
452
the largest number that you can express with eight decimal digits,
 
453
11111111 is the largest number that you can express with eight binary
 
454
digits. If you convert that number to decimal, you get 256.  For this
 
455
reason, a sequence like 300.5.502.743 does not make any sense as an IP
 
456
address.
 
457
</p>
 
458
<p>
 
459
In the second place, some address ranges are reserved. For example,
 
460
all the networks that start with 192.168.---.--- as their first two
 
461
digits are private, not routed on the internet. The whole public IP
 
462
address space is divided among ISPs. Each ISP gets a range of numbers
 
463
that they may portion out between its customers. This range of numbers
 
464
is described in terms of a netmask, a number which looks similar to an
 
465
IP address, but is used to match all the IP addresses that belong to a
 
466
particular network. Private networks can also be segmented into
 
467
subnets using netmasks. Any computer on a network can send IP packets
 
468
to any other computer on the network, but to send an IP packet to a
 
469
computer on a different network, there must be a gateway computer
 
470
which is configured to help the packets cross from one network to
 
471
another.
 
472
</p>
 
473
<p>
 
474
Gateway computers also implement network management policies, e.g. by
 
475
way of firewall software, that specify what traffic is allowed into
 
476
and out of a network.
 
477
</p>
 
478
 
 
479
<h2>LTSP, Wizzy, Wikipedia</h2>
 
480
 
 
481
<p>
 
482
On an Edubuntu lab LAN, there may be up to three important servers.
 
483
</p>
 
484
 
 
485
<ul>
 
486
  <li>Most importantly, there will always be an LTSP classroom server,
 
487
  which serves the desktop sessions of all the client
 
488
  workstations.</li>
 
489
 
 
490
  <li>If the Edubuntu lab makes use of the Wizzy solution for internet
 
491
  connectivity, there will be a Wizzy server functioning as mail
 
492
  server (using Courier for IMAP mail storage, and exim for sending
 
493
  and receiving of mail via SMTP) and web proxy (using wwwoffle). The
 
494
  address of this server will need to be configured in the mail
 
495
  clients and web browsers of all Edubuntu lab users. For mail clients
 
496
  (XXX: Thunderbird?), the proper ports on the Wizzy server needs to
 
497
  be configured as SMTP and IMAP server. This will normally be ports
 
498
  25 and 143 of XXX.myschool.Edubuntu lab.org.za. For web browsers,
 
499
  the Wizzy server needs to be configured as proxy server for all
 
500
  protocols (HTTP, SSL, FTP). wwwoffle, the proxy server, usually runs
 
501
  on port 3128.</li>
 
502
 
 
503
  <li>If a local mirror of the Wikipedia project has been installed,
 
504
  it will be available as a website on the LAN, e.g. at XXX
 
505
  http://wikipedia.myschool.Edubuntu lab.org.za/. As a website, it's
 
506
  served by apache, just like the administration pages of the Wizzy
 
507
  server. The Wikipedia and the mail server / web proxy server may be
 
508
  the same machine.</li>
 
509
</ul>
556
510
 
557
511
</body>
558
512
</html>