A2 Distributed elements A2.1

advertisement
A2
Distributed elements
A2.1
Introduction
The following chapters cover the theory of distributing data and processing over a network,
thus we need to understand the main principles involved in data distribution. The main
principle is the concept of peer-to-peer systems, and client-server systems. A server is a system that provides a particular service (such as remote login, or file services) to a client. The
server must wait on connections from clients. A peer-to-peer network works on cooperation, where peer computers share resources. Small networks (typically with fewer
than 10 computers) normally work best with a peer-to-peer network, and larger networks
work best with a client-server architecture. It must be noted that client-server and peer-topeer architectures can easily co-exist together, and many networks operate this way. A good
example is that a computer will use a client-server architecture when contacting a WWW
server, but it might use a peer-to-peer architecture when it is sharing a printer with its
neighbour. The Internet supports many server applications, including remote login (telnet),
remote file transfer (ftp), electronic mail transfer (smtp), domain name services (dns), and
so on.
A traditional method of presenting distributed elements is to define: the concept of analogue and digital data; the concept of a communications model; and the coverage of the
communications channel. Thus, some of this chapter discusses these topics. These will be
more important on the chapters in Data Communications and Networks, but they have
been covered here in order to present distributed elements as a single entity.
Data is available in either an analogue form or in a digital form, as illustrated in Figure
A2.1. Computer-generated data can be easily stored in a digital format, but if a computer is
to be able to interpret analogue signals, such as speech and video, they must first be sampled at regular intervals and then converted into a digital form. This process is known as
digitization and has the following advantages:
•
•
•
•
•
•
Less susceptible to noise. Digital data is less affected by noise, as illustrated in Figure
A2.2. Noise is any unwanted signal and has many causes, such as static pick-up, poor
electrical connections, electronic noise in components, cross-talk, and so on. It makes
the reception/storage of a data more difficult and can produce unwanted distortion on
the received/stored data.
Less error prone. Extra information can be added to digital data so that errors can either be detected or corrected.
Digital data tends not to degrade over time.
Easier processing. Processing of digital data is relatively easy, either in real time (online processing) or non real time (off-line processing).
Easier to store. A single type of storage media can be used to store many different types
of information (such as video, speech, audio and computer data being stored on tape,
hard disk or CD-ROM). This is more difficult in an analogue media. For example in an
analogue environment, images are stored on photographic paper, video and audio are
stored on magnetic tape, temperatures are stored as numerical values, and so on.
More dependable and predictable. A digital system has a more dependable response,
whereas an analogue system’s accuracy depends on its operating parameters and its
•
design characteristics such as its component tolerance, its operating temperature,
power supply variations, and so on. Analogue systems thus produce a variable response
and no two analogue systems are identical. This obviously gives analogue systems more
of a personality, and they must be carefully setup in order to produce a dependable performance. Many methods, though, have been used in analogue systems to ensure that
they have a more dependable performance. One of the most widely used is to provide
feedback from the output and then compare this with the required output, and make
some correction on the output. Unfortunately these corrections take time, and can lead
to under or over compensation, which cause the system either to be too slow to respond to changes, or respond too quickly.
Easier to upgrade. Digital systems are more adaptable and can be reprogrammed with
software. Analogue systems normally require a change of hardware for any functional
changes (although programmable analogue devices are now available). This makes upgrades and bug fixes easier, as all that is required is a change of software.
Analogue
form
1
Digital
form
0
Figure A2.1 Analogue and digital format
Digital
threshold
+
Digital signal
Noise
Digital signal + noise
+
-
Digital
threshold
Comparator
Recovered digital signal
Figure A2.2
22
Handbook of the Internet
Recovery of a digital signal with noise added to it
As an analogue signal must be sampled at regular intervals, digital representations of analogue waveforms require large amounts of storage space. For example, 70 minutes of hi-fi
quality music requires over 600 MB of data storage. Fortunately, we now live in a time where
large amounts of digital storage are available, in a reliable form, for a modest amount of
money.
The data once stored tends to be reliable and will not degrade over time. Typically, digital data is stored either as magnetic fields on a magnetic disk or as pits on an optical disk. A
great advantage of digital technology is that once the analogue data has been converted to
digital, it is relatively easy to store it with other purely digital data. This is known as media
integration. Once stored in digital form it is relatively easy to process the data before it is
converted back into analogue form. Analogue signals are relatively easy to store, such as
video and audio signals as magnetic fields on tape or a still picture on photographic paper.
These media, though, tend to add noise (such as tape hiss) during storage and recovery. It is
also difficult preserve the data over time, and to recover the original analogue data, once it
has degraded in some way (especially if it is affected in a random way). Most methods of
reducing this degradation (which is due to noise) involve some form of filtering or smoothing of the data.
The accuracy of a digital system depends on the number of bits used for each sample,
whereas an analogue system’s accuracy depends on the specification of the components
used in the system. Analogue systems also produce a differing response for different systems whereas a digital system has a more dependable response.
A2.2
Conversion to digital
Figure A2.3 outlines the conversion process for digital data (the upper diagram) and for analogue data (the lower diagram). The lower diagram shows how an analogue signal (such as
speech or video) is first sampled at regular intervals of time. These samples are then converted into a digital form with an ADC (analogue-to-digital converter). The digital samples
then be compressed and/or stored in a defined digital format (such as WAV, JPG, and so on).
This digital form is then converted back into an analogue form with a DAC (digital-toanalogue converter). When data is already in a digital form (such as text or animation) it is
converted into a given data format (such as BMP, GIF, JPG, and so on). It can be further
compressed before it is stored, transmitted or processed.
101011010
Sound
Video
ADC
ADC
Compression
DAC
DAC
Uncompressing
Digital
Digital
storage/
storage/
Transmission/
Transmission/
Processing
Processing
Distributed elements 23
101011010
Sound
Video
Data
Data
conversion
conversion
ADC
ADC
Compression/
Data
conversion
Filter
Filter
DAC
DAC
Uncompressing/
Data
conversion
Digital
Digital
storage/
storage/
Transmission/
Transmission/
Processing
Processing
Figure A2.3 Information conversion into a digital form
A2.3
Communications model
Figure A2.4 shows a communications model in its simplest form. An information source
transmits data to a destination through a transmission media. This transmission can either
be with a direct communication (using a physical or wireless connection) or through an
indirect communication (via a number of physical or wireless connections).
The information, itself, can either be directly sent through an electrical cable, or it can be
carried on an electromagnetic wave. Electromagnetics waves act as a carrier of the data, in
the same way that the postal service, or telephone providers, support channels for post and
telephone information to be sent and received in a reliable way. The type of electromagnetic
carrier depends on the communication media which the data is to be sent through. Each
carrier has a specific frequency (which is indirectly proportional to their wavelength), which
is used to tune-into the wave at the receiver. The frequency typically defines how well the
carrier propagates through a media channel. Typical electromagnetic carrier types are:
•
•
•
24
Radio waves. The lower the frequency of a radio wave the more able it is to bend
around objects. Defense applications use low frequency communications as they can
use this to transmit over large distances, and up and over solid objects (such as hills and
mountains). The trade-off is that the lower the frequency of the radio wave, the less the
information that can be carried. LW (MF) and AM (HF) signals can propagate large distances, but FM (VHF) requires repeaters because they cannot bend round and over
solid objects such as trees and hills.
Microwaves. Microwaves have the advantage over optical waves (light, infrared and
ultra-violet) in that they propagate reasonably well through water and thus can be
transmitted through clouds, rain, and so on. One of the first applications of microwaves
was in radar, as the microwave pulses could propagate through clouds, and bounce off
a metal target (normally an airplane, a missile, or a ship), and return to the transmitter.
If the microwaves were of a high enough frequency they can even propagate through
the ionosphere and out into outer space. This is the property that is used in satellite
communications where the transmitter bounces microwave energy off a satellite, which
is then picked up at a receiving station. Their main disadvantage is that they will not
bend round large objects, as their wavelength is too small.
Infrared. Infrared is used in optical communications, and allows for a much greater
amount of data to be sent, than radio and microwaves. Infrared is extensively used for
line-of-site communications (and fiber optic communication), especially in remote
Handbook of the Internet
•
•
control applications. The amount of data that can be transmitted is normally limited by
the electronics at the transmitter and the receiver, but it is possible to get many billions
of bits to be transmitted, in each second.
Light. Light is the only part of the electromagnetic spectrum that humans can ‘see’ (although we can feel the affect of infra-red radiation on the air around us). It is a very
small part of the spectrum and ranges from 300 to 900 nm (a nanometer is one billionth
of a meter). Colors contained are Red, Orange, Yellow, Green, Blue, Indigo and Violet
(ROY.G.BIV or Richard Of York Gave Battle In Vain).
Ultra-violet. As with infrared, ultra-violet is used in optical communications (typically
with fiber optic communications). In high enough exposures, it can cause skin cancer.
Fortunately, for humans, the ozone layer blocks out much of the ultra-violet radiation
from the sun. Note that you should not look directly into a fiber optic cable which is
currently operating, as invisible radiation (especially infrared radiation) may damage
your eye.
Direct transmission
media
Destination
Source
Indirect
Transmission
media
Source
Destination
Figure A2.4 Simple communications model
A2.4
Cables
The cable type used to transmit the data over the communications channel depends on several parameters, including:
•
•
•
•
•
The reliability of the cable, and the maximum length between nodes.
The possibility of electrical hazards, and the power loss in the cables.
Tolerance to harsh conditions, and expense and general availability of the cable.
Ease of connection and maintenance, and the ease of running cables, and so on.
The signal bandwidth. The amount of information that can be sent directly relates to
the bandwidth of the system, and typically, the main limitation on the bandwidth is the
channel between the transmitter and the receiver. With this, the lowest bandwidth of all
the connected elements defines the overall bandwidth of the system (unless there are
alternative paths for the data).
The main types of cables used for the digital communications channels are illustrated in
Figure A2.5, and include:
Distributed elements 25
•
•
•
Coaxial. Coaxial cable has a grounded metal sheath around the signal conductor. This
limits the amount of interference between cables and thus allows higher data rates.
Typically, they are used at bit rates of 100 Mbps for maximum lengths of 1 km.
Fiber optic. The highest specification of the three cables is fiber optic, and allows extremely high bit rates over long distances. Fiber optic cables do not interfere with
nearby cables and give greater security. They also provide more protection from electrical damage by external equipment and greater resistance to harsh environments, as
well as being safer in hazardous environments.
Unshielded twisted-pair (UTP) copper. Twisted-pair and coaxial cables transmit electric signals, whereas fiber-optic cables transmit light pulses. Unshielded twisted-pair
cables are not shielded and thus interfere with nearby cables. Public telephone lines
generally use twisted-pair cables. In LANs, they are generally used up to bit rates of
100 Mbps and with maximum lengths of 100 m. UTP cables are typically used to connect a computer to a network. There are various standards for twisted-pair cables, such
as Cat-5 cables, which can transmit up to 100 Mbps (100,000,000 bits per second), and
Cat-3, which support the transmission of up to 16 Mbps (16,000,000 bits per second).
Inner
conductor
Metal sheath
Insulating outer conductor
Coaxial
cable
Inner fiber
(glass)
Inner cladding
(glass)
Outer cladding
(PVC)
Fiber optic
cable
Twisted -pair
cable
Figure A2.5
Types of network cable and their connectors
A2.4.1 Cable characteristics
The main characteristics of cables are:
•
•
•
26
Attenuation. Attenuation defines the reduction in the signal strength at a given frequency for a defined distance. It is normally specified in decibels (dB) per 100 m. As a
basic measure a value of 3dB/100 m gives a reduction of half the signal power every
100 m (see Table A2.1).
Crosstalk. Crosstalk is an important parameter as it defines the amount of signal that
crosses from one signal path to another. This causes distortion on the transmitted signal. Shielded twisted-pair cables have less crosstalk than unshielded twisted-pair
cables.
Characteristic impedance. The characteristic impedance (as measured in Ω – ohms) of
a cable and its connectors are important, as all parts of the transmission system need to
be matched to the same impedance. This impedance is normally classified as the characteristic impedance of the cable. Any differences in the matching results in a reduction
of signal power and can produce signal reflections (or ghosting). For example, twistedpair cables have a characteristic impedance of approximately 100 Ω, and coaxial cable
used in networking has a characteristic impedance of 50 Ω (or 75 Ω for TV systems).
Handbook of the Internet
Capacitance (pF/100 m) defines the amount of distortion in the signal caused by each signal
pair. The lower the capacitance value, the lower the distortion.
The main types of cable used in networking and data communications are:
Table A2.1 Attenuation rates as a ratio
dB
Ratio
dB
Ratio
dB
Ratio
0
1
2
3
4
5
6
7
8
9
1.000
0.891
0.794
0.708
0.631
0.562
0.501
0.447
0.398
0.355
10
15
20
25
30
35
40
45
50
55
0.316
0.178
0.100
0.056
0.032
0.018
0.010
0.005 6
0.003 2
0.001 8
60
65
70
75
80
85
90
95
100
0.001
0.000 6
0.000 3
0.000 2
0.000 1
0.000 06
0.000 03
0.000 02
0.000 01
60
50
40
1
30
Attenuation (dB)
20
•
10
•
0
•
Coaxial cable – cables with an inner core and a conducting shield having a characteristic
impedance of either 75 Ω for TV signal or 50 Ω for other types.
Cat-3 UTP cable – level 3 cables have non-twisted-pair cores with a characteristic impedance of 100 Ω (±15 Ω) and a capacitance of 59 pF/m. Conductor resistance is around
9. 2 Ω/100 m.
Cat-4 UTP cable – level 4 cables have twisted-pair cores with a characteristic impedance
of 100 Ω (±15 Ω) and a capacitance of 49.2 pF/m. Conductor resistance is around
9 Ω/100 m.
Cat-5 UTP cable – level 5 cables have twisted-pair cores with a characteristic impedance
of 100 Ω (±15 Ω) and a capacitance of 45.9 pF/m. Conductor resistance is around
9 Ω/100 m.
0.1
Signal ratio
•
0.01
0.001
0.0001
Figure A2.6 Signal ratio related to attenuation
Distributed elements 27
The Electrical Industries Association (EIA) has defined five main types of cables. Levels 1
and 2 are used for voice and low-speed communications (up to 4 Mbps). Level 3 is designed
for LAN data transmission up to 16 Mbps and level 4 is designed for speeds up to 20 Mbps.
Level 5 cables, have the highest specification of the UTP cables and allow data speeds of up
to 100 Mbps (but this can be increased using special signal processing techniques). The
main EIA specification on these types of cables is EIA/TIA568 and the ISO standard is
ISO/IEC11801.
Coaxial cables have an inner core separated from an outer shield by a dielectric. They
have an accurate characteristic impedance (which reduces reflections), and because they
are shielded they have very low crosstalk levels.
UTPs (unshielded twisted-pair cables) have either solid cores (for long cable runs) or are
stranded patch cables (for shorts run, such as connecting to workstations, patch panels, and
so on). Solid cables should not be flexed, bent or twisted repeatedly, whereas stranded cable
can be flexed without damaging the cable. Coaxial cables use BNC connectors while UTP
cables use either the RJ-11 (small connector which is used to connect the handset to the
telephone) or the RJ-45 (larger connector which is used to connect LAN networks to a hub).
Table A2.2 and Figure A2.7 show typical attenuation rates (dB/100 m) for the Cat-3, Cat4 and Cat-5 cables. Notice that the attenuation rates for Cat-4 and Cat-5 are approximately
the same. These two types of cable have lower attenuation rates than equivalent Cat-3 cables. Notice that the attenuation of the cable increases as the frequency increases. This is
due to several factors, such as the skin effect, where the electrical current in the conductors becomes concentrated around the outside of the conductor, and the fact that the
insulation (or dielectric) between the conductors actual starts to conduct as the frequency
increases.
The Cat-3 cable produces considerable attenuation over a distance of 100 m. The table
shows that the signal ratio of the output to the input at 1 MHz, will be 0.76 (2.39 dB), then, at
4 MHz it is 0.55 (5.24 dB), until at 16 MHz it is 0.26. This differing attenuation at different
frequencies produces not just a reduction in the signal strength but also distorts the signal
(because each frequency is affected differently by the cable. Cat-4 and Cat-5 cables also produce distortion but their effects will be lessened because attenuation characteristics have
flatter shapes.
Coaxial cables tend to have very low attenuation, such as 1.2 dB at 4 MHz. They also
have a relatively flat response and virtually no crosstalk (due to the physical structure of the
cables and the presence of a grounded outer sheath).
Table A2.3 and Figure A2.8 show typical near end crosstalk rates (dB/100 m) for Cat-3,
Cat-4 and Cat-5 cables. The higher the figure, the smaller the crosstalk. Notice that Cat-3
cables have the most crosstalk and Cat-5 have the least, for any given frequency. Notice also
that the crosstalk increases as the frequency of the signal increases. Thus, high-frequency
signals have more crosstalk than lower-frequency signals.
Table A2.2 Attenuation rates (dB/100 m) for Cat-3, Cat-4 and Cat-5 cable
Frequency
(MHz)
1
4
10
16
28
Handbook of the Internet
Cat-3
Cat-4
Cat-5
2.39
1.96
2.63
5.24
3.93
4.26
8.85
11.8
6.56
6.56
8.2
8.2
Table A2.3
Near-end crosstalk (dB/100 m) for Cat-3, Cat-4 and Cat-5 cable
Frequency
(MHz)
Near end crosstalk (dB/100m)
Cat-3
Cat-4
Cat-5
1
4
10
16
13.45
10.49
8.52
7.54
18.36
15.41
13.45
12.46
21.65
18.04
15.41
14.17
12
Attenuation (dB/100 m)
10
8
Cat 3
6
Cat 4
Cat 5
4
2
0
0
5
10
15
20
Frequency (MHz)
Figure A2.7 Attenuation characteristics for Cat-3, Cat-4 and Cat-5 cables
25
Cat-3
Cat-4
Near-end
crosstalk
(dB/100 m)
20
Cat-5
15
10
5
0
0
Figure A2.8
A2.5
5
10
15
Frequency (MHz)
20
Near-end crosstalk characteristics for Cat-3, Cat-4 and Cat-5 cables
Peer-to-peer and client/server
An important concept in Computing is the differentiation between a peer-to-peer connection and a client-server connection. With a client-server connection, servers provide
services to client, and must wait for clients to connect to these services. Typical services
might be to allow the printing of documents to a networked printer, or provide access to a
networked file system. A peer-to-peer architecture allows two systems to actively seek con-
Distributed elements 29
nections, without involving a server. An example of a client-server network in human terms
might be a travel agent, who will wait for customers (clients) to get in contact with them in
order to book the best holiday for them. The clients contact the agents (servers) to book a
holiday, who will then find the best holiday for them. A peer-to-peer network would be
equivalent to someone phoning a friend (who is not a travel agent) and asking them of the
best holiday that they could get. The friend might then go and book the holiday over the
Internet. This is a peer-to-peer network, as the friend does not actively seek questions on
holiday arrangements, or in booking holidays.
A peer-to-peer connection allows users on a local network to access a local computer.
Typically, this might be access to:
Local printers. Printers, local to a computer, can be accessed by
other users if the printer is shareable. This can be password protected, or not. Shareable printers on a Microsoft network have a
small hand under the icon.
Local disk drives and folders. The disk drives, such as the hard disk
or CD-ROM drives can be accessed if they are shareable. Normally
the drives must be shareable. On a Microsoft network a drive can
be made shareable by selecting the drive and selecting the righthand mouse button, then selecting the Sharing option. User names
and passwords can be set-up locally or can be accessed from a
network server. Typically, only the local computer grants access to
certain folders, while others are not shared.
These shared resources can also be mounted as objects on the remote computer. Thus, the
user of the remote computer can simply access resources on the other computers as if they
were mounted locally. This option is often the best when there is a small local network, as it
requires the minimum amount of set-up and does not need any complicated server set-ups.
Figure A2.9 shows an example of a peer-to-peer network where a computer allows access to
its local resources. In this case, its local disk drive and printer are shareable.
Local disk
(shared)
Peer-to-peer
network
A peer-to-peer connection allows
users on a local network to access a remote computer,
such as printers, local disk resources, and so on.
Local
communications
Network
connection
Remote computer can access a printer
connected to the local computer
Local printer
(shared)
Figure A2.9 Peer-to-peer network
30
Handbook of the Internet
Normally a peer-to-peer network works best for a small office environment. Care must be
taken, though, when setting up the attributes of the shared resources. Figure A2.10 shows an
example of the sharing setting for a disk drive. It can be seen that the main attributes are:
•
•
•
Read-only. This should be used when the remote user only requires to copy or execute
files. The remote user cannot modify any of the files.
Full. This option should only be used when the remote user has full access to the files
and can copy, erase or modify the files.
Depends on Password. In this mode, the remote user must provide a password to get
either read-only access or full access.
If the peer-to-peer network has a local server, such as Novell NetWare or Windows NT/2000
then access can be provided for certain users and/or groups, if they provide the correct
password.
A client-server network has a central server which proves services to clients, as illustrated in Figure A2.11. These clients can either be local to the network segment, or from a
remote network. The server typically provides one or more of the following services:
•
Store usernames, group names and
passwords.
• Run print queues for networked
printers.
• Allocate IP addresses for Internet
accesses.
• Provide system back-up facilities,
such as CD-R disk drives and DAT
tape drives.
• Provide centralized file services,
such as networked hard disks or
networked CD-ROM drives.
• Centralize
computer
settings
and/or configuration.
• Provide access to other centralized
peripherals, such as networked
faxes and dial-in network connections.
• Provide WWW and TCP/IP services,
Figure A2.10 File access rights
such as remote login and file transfer.
A network operating system server typically provides file and print services, as well as storing a list of user names and passwords. Typical network operating systems are Windows
NT/2000, Novell NetWare and UNIX. Internet and WWW services are typically run from an
Internet server. Typical services include:
•
HTTP (HyperText Transfer Protocol), for WWW (World-Wide Web) services. On the
WWW, WWW servers and WWW clients pass information between each other using
HTTP. A simple HTTP command is GET, which a WWW client (the WWW browser)
sends to server in order to get a file.
Distributed elements 31
A client/server network uses a server to provide
services to a client
Client/server
network
Client
Server
Server services:
• File server
• Networked printers (queues)
• Network logins
• Centralized settings
• Internet access
• Back-up
Network
connection
Figure A2.11
•
•
•
•
•
Client/server network
FTP (File Transfer Protocol), which is a standard protocol and used to transfer files from
one computer system to another. In order for the transfer to occur, the server must run
an FTP server program.
TELNET, which is used for remote login services.
SMTP (Simple Mail Transport Protocol), which is used for electronic mail transfer.
TIME, which is used for a time service.
SNMP (Simple Network Management Protocol), which is used to analyze network components.
Figure A2.12 shows an example network which has two local network servers. One provides
file and print services, while the other supports Internet services. The local computer accesses each of these for the required service. It can also access a remote Internet server
through a router. This router automatically determines that the node is accessing a remote
node and routes the traffic out of the local network.
Access for local
Internet access
Access to local
network server
Network server
(such as UNIX,
Novell NetWare or
Windows NT/2000):
• File server.
• Print services.
• Network login.
Local WWW/Internet server:
- HTTP (for WWW)
- FTP (for remote file transfer)
- Telnet (for remote login)
- SMTP (for electronic mail)
Router
Router
Access to remote
Internet access
Remote WWW/
Internet server:
- HTTP (for WWW)
- FTP (for remote file transfer)
- Telnet (for remote login)
- SMTP (for electronic mail)
Internet
Figure A2.12
32
Handbook of the Internet
Local and remote servers
Download