-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path11050.txt
More file actions
3830 lines (3302 loc) · 140 KB
/
Copy path11050.txt
File metadata and controls
3830 lines (3302 loc) · 140 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Network Protocols
ANDREW S. TANENBAUM
W~skund~g Semmar~um, Vr~]e Unwers~te~t, Amsterdam, The Netherlands
Dunng the last ten years, many computer networks have been designed, implemented,
and put into service in the United States, Canada, Europe, Japan, and elsewhere. From
the experience obtamed with these networks, certain key design principles have begun to
emerge, principles that can be used to design new computer networks in a more
structured way than has tradltmnally been the case. Chmf among these principles is the
notion of structuring a network as a hmrarchy of layers, each one built upon the previous
one. This paper is a tutorial about such network hierarchies, using the Reference Model
of Open Systems Interconnectmn developed by the International Organization for
Standardization as a grade. Numerous examples are gwen to illustrate the principles.
Key Words and Phrases: computer network, data communicatmn, ISO OS! Reference
Model, layered architecture, network, protocol
CR Categorws" 1.3, 4.9, 6.9
INTRODUCTION
Ten years ago, only a handful of computer
networks existed, mostly experimental networks built by research organizations. Today dozens of national and international
networks and innumerable local networks
operate on a commercial basis around the
clock. From the beginning, many networks
were designed hierarchically, as a series of
layers, each one building on the one below.
At first, each network design team started
out by choosing its own set of layers. However, in the past few years, a consensus has
begun to develop among network designers,
a consensus embodied in the International
Organization for Standardization's Reference Model of Open Systems Interconnection (ISO OSI). In this paper we present an
informal introduction to computer networking using this model as a guide. A more
thorough treatment of the ISO OSI model
itself can be found in ZIMM80.
Before getting into the subject of network
protocols, it is worth saying a few words
about what we mean by a computer network. A computer network is a collection of
computers, called hosts, that communicate
with one another. The hosts may be large
multiprogrammed mainframes or small
personal computers. Networks can be classified as local networks or long-haul networks. The hosts on a local network are
typically contained in a single building or
campus and are connected by a high-bandwidth cable or other communication medium specifically designed for this purpose.
Long-haul networks, in contrast, typically
connect hosts in different cities using the
public telephone network, an earth satellite, or both.
Local networks are nearly always completely owned by a single organization,
whereas long-haul networks normally involve at least two organizations: the carrier,
which operates the communication facility
(telephone lines, microwave dishes, satellite, etc.), and the users, who own the hosts.
This division of labor into (1) the provider
of the communication facility and (2) the
Permission to copy without fee all or part of thin maternal is granted provided that the copies are not made or
distributed for direct commercial advantage, the ACM copyright notice and the title of the publication and its
date appear, and notme is given that copying is by permmslon of the Association for Computing Machinery. To
copy otherwise, or to republish, requrres a fee and/or specific permmslon.
© 1981 ACM 0010-4892/81/1200-0453 $00 75
Computing Surveys, Vol. 13, No. 4, December 1981
454
•
Andrew S. Tanenbaum
CONTENTS
INTRODUCTION
Protocols
Overvmw of the ISO OSI Layers
1. THE PHYSICAL LAYER
1 1 The Telephone System
1 2 Communication Satellites
1 3 Local Networks
1.4 An Example Physmal Layer Protocol X 21
2 THE DATA LINK LAYER
2 1 Stop-and-Walt Protocols
2.2 Shding-Wmdow Protocols
2 3 An Example Data Link Layer Protocol HDLC
2 4 Channel Allocation in Satellite Networks
2 5 Channel Allocation m Local Networks
3 THE NETWORK LAYER
3 1 Routing m Point-to-Point Networks
3 2 Congestion Control m Point-to-Point Networks
3.3 An Example Network Layer Protocol X 25
4 THE TRANSPORT LAYER
4 1 The Transport Station
4 2 Establishing and Closing Connectmns
4 3 Flow Control and Buffering
4 4 Connectmn Multiplexing
5 THE SESSION LAYER
6 THE PRESENTATION LAYER
6.1 Text Compression
6 2 Encryptlon Protocols
6 3 Virtual-Terminal Protocols
6 4 File Transfer Protocols
7 SUMMARY
ACKNOWLEDGMENTS
REFERENCES
A
ically because no consensus on nomenclature exists.
When the IMPs are connected by telephone lines, they are normally located on
the carrier's premises, with each IMP servicing multiple hosts. To save on long-distance leased-line line charges, hosts and
terminals are often funneled through remote concentrators. When the IMPs are
connected by a satellite, the IMPs may be
located on the customer's premises {e.g., on
the roof). Local networks do not have
IMPs; instead, each host has an interface
card inserted into its backplane to control
access to the network. This card is attached
to the communication subnet, which is typically just a cable.
Although the ISO Reference Model can
be used for both long-haul and local networks, it was designed primarily with the
former in mind. Accordingly, in this paper
we also treat both kinds of networks, but
we emphasize slightly the long-haul variety,
since issues such as routing and congestion
control play a more prominent role in longhaul networks than in local networks.
In passing, we note that the subject of
connecting distinct networks together is an
increasingly important one, although it lies
beyond the scope of this article. For an
introduction to this subject see BOGG80 and
POST80.
v
Protocols
users of the communication facility has important ramifications for network architectures, as we shall see later.
The communication facility in a longhaul network is called the (communication)
subnet, and often consists of a collection of
minicomputers variously called IMPs (interface message processors), nodes, or
switches connected by high-bandwidth
leased telephone lines or a satellite. Figure
1 shows a network using telephone lines.
Such a network is called apoint-to-point or
store-and forward network, as opposed to
a broadcast network, such as a satellite
network. The terms "host," "IMP," and
"communication subnet" come from the
U.S. Department of Defense's ARPANET,
one of the first large-scale networks
[McQu77]. We use this terminology generComputing Surveys, Vol. 13, No 4, December 1981
As mentioned above, networks are almost
always organized as a hierarchy of layers.
Each layer performs a small set of closely
related functions. The ISO Reference
Model has seven layers:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
the
the
the
the
the
the
the
physical layer,
data link layer,
network layer,
transport layer,
session layer,
presentation layer,
application layer,
as shown in Figure 2. All layers are present
on the hosts, but only layers 1, 2, and 3 are
present on the IMPs.
Each layer should be thought of as a
program or process (possibly embedded in
a hardware device) that communicates with
Network Protocols
•
SuOn t b o u o d o r y
•
455
IMP
Host
Concentrator
Q
Terminal
High bandwidth trunk
~p
Figure
1.
A typmal point-to-point long-haul network.
Apphc__at,on Ia_yerp_ro_toco_]
Prgsentatron laler protocol _ ~ q
6 I
Session Igyer protocot
TrQnsport layer protocol
L
I
I
Network ~ N e t w o r k
hyslca] ~
Host A
Figure2.
Phys~cnl
IMP
Host B
The seven-layer ISO Reference Model.
the corresponding process on another machine. In Figure 2, host layers 1, 2, and 3
think that they are communicating with
their corresponding layers on the IMP,
called peers. (In this example, hosts A and
B are serviced by a common IMP; in general, multiple IMPs may intervene.) Layers
4-7, in contrast, communicate directly with
their peer layers on the other host. The
rules governing the layer k conversation are
called the layer k protocol. The ISO model
thus has seven protocols.
In reality, data are not transmitted horizontally, from machine to machine within
a given layer, but are passed vertically down
the layers of the sending machine and up
the layers of the receiving machine. Only in
layer 1 does actual intermachine communication occur. When an application program, running in layer 7 on host A, wants
to send a message to the application in
layer 7 on host B, it passes the message
down to the presentation layer on its own
machine. The presentation layer transforms the data, adds a layer 6 header containing control information used by the
layer 6 protocol, and passes the resulting
message down to the session layer. The
session layer then adds its own header and
passes the new message down to the transport layer. The complete path from layer 7
on host A to layer 7 on host B is shown in
Figure 2 by the solid line. The boundary
between adjacent layers is called an interface. The layers, interfaces, and protocols
in a network form the network architecture.
No layer is aware of the header formats
or protocols used by other layers. Layer k
on the sending machine regards its job as
getting the bits that come in from layer
k + 1 over to the receiving machine somehow (using the services of the lower layers).
It neither knows nor cares what the bits
mean.
A three-layer analogy may be helpful in
understanding how multilayer communication works. Consider the problem of the
Computing Surveys, Vol 13, No. 4, December 1981
456
°
Andrew S. Tanenbaum
two talking philosophers. Philosopher 1
lives in an ivory tower in Kenya and speaks
only Swahfli. Philosopher 2 lives in a cave
in India and speaks only Telugn. Nevertheless, Philosopher 1 wishes to convey his
affection for Oryctolagus cuniculus to his
Indian colleague (the philosophers are layer
3 peers). Since the philosophers speak different languages, each engages the services
of a translator (layer 2 process) and an
engineer (layer 1 process).
To convey his thoughts, Philosopher 1
passes his message, in Swahili, to his translator, across the 3/2 interface. The translator may convert it to English, French,
Dutch, or some other language, depending
only on the layer 2 protocol. The translator
then hands his output to his engineer across
the 2/1 interface for transmission. The
physical mode of transmission may be telegram, telephone, computer network, or
something else, depending only on the layer
1 protocol. When the Indian engineer receives the message, he passes it to his translator for rendition into Telugu. Finally, the
Indian translator gives the message, in Telugn, to his philosopher.
This analogy illustrates three points.
First, each person thinks of his communication as being primarily horizontal, with
his peer (although in reality it is vertical,
except in layer 1). For example, Philosopher
1 regards himself as conversing with Philosopher 2, even though his only physical
communication is with translator 1. Second, actual communication is vertical, not
horizontal, except in layer 1. Third, the
three protocols are completely independent. The philosophers can switch the subject from rabbits to guinea pigs at will; the
translators can switch from English to
Dutch at will; the engineers can switch from
telegram to telephone at will. The peers in
any layer can change their protocol without
affecting the other layers. It is for precisely
this reason that networks are designed as a
series of layers--to prevent changes in one
part of the design (e.g., caused by technological advances) from requiring changes in
other parts.
Overview of the ISO OSI Layers
The remainder of this article concerns the
various layers in the ISO Reference Model,
Computing Surveys, Vol. 13, No 4, December 1981
one section per layer. Before looking at the
layers in detail, we first present a brief
overview of each layer, to put the hierarchy
in perspective.
The physical layer protocol is concerned
with the transmission of a raw bit stream.
Its protocol designers must decide how to
represent O's and l's, how many microseconds a bit will last, whether transmission is
full- or half-duplex, how the connection is
set up and torn down, how many pins the
network connector has, what each pin is
used for, and other electrical, mechanical,
and procedural details.
The data link layer converts an unreliable transmission channel into a reliable one
for use by the network layer. The technique
for doing so is to break up the raw bit
stream into frames, each containing a
checksum for detecting errors. (A checksum
is a short integer that depends on all the
bits in the frame so that a transmission
error will probably change it and thus be
detectable.) The data link protocol usually
ensures that the sender of a data frame will
repeatedly transmit the frame until it receives an acknowledgment frame from the
receiver.
The network layer in a point-to-point
network is primarily concerned with routing and the effects of poor routing, namely,
congestion. In a broadcast network, routing
is not an issue, since only one channel exists.
The task of the transport layer is to provide reliable host-to-host communication
for use by the session layer. It must hide all
the details of the communication subnet
from the session layer, so that, for example,
a point-to-point subnet can be replaced by
a satellite link without affecting the session,
presentation, or application layers. In effect, the transport layer shields the customer's portion of the network (layers 5-7)
from the carrier's portion (layers 1-3).
The session layer is responsible for setting up, managing, and tearing down process-to-process connections, using the hostto-host service provided by the transport
layer. It also handles certain aspects of
synchronization and recovery.
The presentation layer performs generally useful transformations on the data to
be sent, such as text compression. It also
Network Protocols
performs the conversions required to allow
an interactive program to converse with
any one of a set of incompatible intelligent
terminals.
The content of the application layer is up
to the users. Nevertheless, standard protocols for specific industries, such as airlines
and banking, are likely to develop, although
few exist now. For this reason we say no
more about the application layer in this
paper.
Although the ISO OSI Reference Model
says nothing about how the layers are to be
implemented, one possible configuration
might have the physical layer in hardware,
the data link layer in a special protocol
chip, the network layer in a device driver,
the transport and session layers in the operating system proper, the presentation
layer in a set of library routines in the user's
address space, and the application layer be
the user's program.
At this point we have covered enough
background material to say a little bit about
the ISO OSI Reference Model itself. Basically, it is a framework for describing layered networks. It discusses the concept of
layering in considerable detail, and introduces a uniform terminology for naming
the various entities involved. Finally, it
specifies the seven layers mentioned thus
far, and for each layer gives its purpose, the
services provided to the next higher layer,
and a description of the functions that the
layer must perform. The value of the model
is that it provides a uniform nomenclature
and a generally agreed upon way to split
the various network activities into layers.
However, the ISO OSI Reference Model
is not a protocol standard. By breaking a
network's functions up into layers, it suggests places where protocol standards could
be developed (physical layer protocols, data
link layer protocols, and so on), but these
standards themselves fall outside the domain of the model. With the model in hand,
other organizations such as the Consultative Committee for International Telephony and Telegraphy (CCITT), the International Federation for Information Processing (IFIP), and the American National
Standards Institute (ANSI) may develop
specific protocol standards for the various
layers. Although these standards may even-
•
457
tually be officially approved by ISO, such
work is still in progress and, in any event,
falls far outside the scope of the model.
As a final note, before plunging into the
details of the various layers, we would like
to point out that this article is about network protocols, with the ISO OSI Reference Model used as a guide; it is not an
article about the model itself. We emphasize the communication algorithms and
protocols themselves, a subject about which
the Reference Model says nothing.
1. THE PHYSICAL LAYER
In this section we look at a variety of aspects related to the physical layer. Our
emphasis is on the conceptual organization
of the physical transmission facilities, not
on the hardware details themselves. Pointto-point, satellite, and local networks are
discussed. We conclude with a brief discussion of the X.21 physical layer protocol.
The function of the physical layer is to
allow a host to send a raw bit stream into
the network. The physical layer is in no
way concerned with the way the bits are
grouped into larger units, or what they
mean. Nor does it rectify the problem of
some bits being garbled by transmission
errors. Recovery from such errors is up to
the data link layer.
The communication subnet can be organized in one of two ways. In circuit switching, a fixed amount of transmission capacity (bandwidth) is reserved when the source
initiates a conversation and released only
when the conversation is over. The telephone system uses circuit switching. When
someone calls a time-sharing service in a
distant city, the connection is established
after dialing and remains in force until one
end hangs up. If the user goes out to lunch
while still logged in, the connection remains
intact and the charges continue to accumulate, even though the connection is actually idle.
With packet switching, in contrast, the
user initially sets up a connection between
his terminal or host and the nearest IMP,
not the destination host. (We assume that
the destination host also is connected to
some IMP.) Whenever the user has data to
send, he sends them to the IMP as a series
of packets, typically 10-1000 bytes long.
Computing Surveys, Vol. 13, No. 4, December 1981
458
•
Andrew S. Tanenbaum
Packets are routed from IMP to IMP
within the subnet, until they get to the IMP
which services the destination host. No circuits are reserved in advance within the
subnet for the terminal-to-host connection
{except the terminal-to-IMP and IMP-tohost circuits). Instead, the high-bandwidth
I M P - I M P lines are dynamically shared
among all the users on a demand basis;
I M P - I M P bandwidth is only tied up when
data are actually being transmitted.
Although the above discussion is cast in
terms of a point-to-point network, the same
considerations apply to broadcast channels.
If a portion of the channel (e.g., one frequency band) is dedicated to a given conversation throughout its duration, without
regard to actual usage, the network is circuit switched. If, however, the channel is
dynamically requested, used, and released
for every packet, the network is packet
switched.
Circuit-switched networks are best suited
to communication whose bandwidth requirements do not change much over time.
Transmission of human speech is such an
application, so it makes sense for the telephone network to be circuit switched. Terminal-to-computer and computer-to-computer traffic, however, is usually bursty.
Most of the time there are no data to send,
but once in a while a burst of data must be
transmitted. For this reason, most computer networks use packet switching to
avoid tying up expensive transmission facilities when they are not needed. However,
in the future, all digital transmission systems will allow computers to dial a call,
send the data, and hang up, all within a few
milliseconds. If such systems become widespread, circuit switching may come back
into favor.
1.1 The Telephone System
Since most existing long-haul networks use
the telephone system for their transmission
facilities, we shall briefly describe how the
latter is organized. Most telephones are
connected to a nearby telephone company
switching office by a pair of copper wires
known as a local loop. The switching offices
themselves are connected by high-bandwidth trunks onto which thousands of unrelated calls are multiplexed. Although
Computing Surveys, Vol 13, No 4, December 1981
some trunks utilize copper wire, many utilize microwave relays, fiber optics, or wave
guides as the transmission medium.
Because the bandwidth of the local loop
is artificially limited to about 3000 Hz
(hertz), it is difficult to transmit information over it by using, for example, +5 volts
for a binary one and 0 volts for a binary
zero. Such square wave signaling depends
on high-frequency harmonics that are well
above the 3000-Hz cutoff frequency. Only
with very low date rates might enough information be below 3000 Hz to be intelligible. Instead, a device called a modem is
inserted between the host and the telephone line. The input to the modem is pure
digital data, but the output is a modulated
sine wave with a base frequency of generally between 1000 and 2000 Hz. Since the
modulated sine wave has fewer high-frequency components than the original
square wave, it is affected less by the limited bandwidth.
A sine wave has three properties that can
be modulated to transmit information: an
amplitude, a frequency, and a phase. In
amplitude modulation, two different amplitude values are used to represent 0 and 1.
In frequency modulation, different frequencies are used for 0 and 1, but the amplitude
is never varied. In phase modulation, neither the amplitude nor the frequency is
varied, but the phase of the sine wave is
abruptly switched to send data. In the most
common encoding scheme, phase shifts of
45, 135, 225, and 315 degrees are used to
send 00, 01, 10, and 11, respectively. In
other words, each phase shift sends two
bits. The three methods can be combined
to increase the transmission capacity.
Many such transmission systems have
been standardized and form an important
class of physical layer protocols. Unfortunately, in many cases, the standards in the
United States and Canada differ from those
used by the rest of the world. For example,
those ubiquitous 300-bit-per-second frequency modulation modems found near terminals around the world use different signaling frequencies in North America and
Europe.
Probably the best known physical layer
standard at present is RS-232-C, which
specifies the meaning of each of the 25 pins
N e t w o r k Protocols
on a terminal connector and the protocol
governing their use. However, a new standard, RS-449, has been developed to replace this aging workhorse. RS-449 is upward compatible with RS-232-C but uses a
37-pin connector to accommodate the new
signals. Unfortunately, 37 pins are insufficient, so users wishing to take advantage of
all the features of RS-449 (notably the secondary channel) need a second 9-pin connector as well.
The transmission technology and protocols used on the interoffice trunks are different from those used on the local loop. In
particular, digital rather than analog techniques are becoming increasingly widespread. The most common digital system is
p u l s e code m o d u l a t i o n (PCM), in which
the analog signal coming in from the local
loop is digitized by sampling it 8000 times
per second. Eight bits (seven data and one
control) are transmitted during each 125#s (microsecond) sampling period. In North
America, 24 such PCM channels are
grouped together into 193-bit frames, with
the last bit being used for synchronization.
With 8000 193-bit frames per second, the
gross data rate of this system, known as T1,
is 1.544 Mbits/s (megabits per second). In
Europe, the 1.544-Mbit/s PCM standard
uses all 8 bits for data, with the 193rd bit
(which is attached to the front rather than
rear of the frame) used for signaling. Two
different (and incompatible) 32-channel
PCM standards running at 2.048 Mbits/s
are also widely used outside North America. For more information about the telephone system see DAVI73 and DOLL78.
1.2 Communication Satellites
Although most existing long-haul networks
use leased telephone circuits to connect the
IMPs, satellite-based networks are becoming increasingly common. A communication satellite is a big repeater in the sky.
Incoming signals are amplified and rebroadcast by a transponder on the satellite.
The upward and downward signals use different frequencies to avoid interference. A
typical communication satellite has 5-10
independent transponders, each with a capacity of about 50 Mbits/s.
Communication satellites are put into
•
459
geosynchronous equatorial orbit at an altitude of 36,000 kilometers to make them
appear stationary in the sky when viewed
from the earth. Consequently, the ground
station antenna can be pointed at the satellite when the antenna is installed and
never moved. A moving satellite would require a much more expensive steerable antenna and would also have the disadvantage of being on the other side of the earth
half the time. On the other hand, the great
altitude required to achieve a 24-hour period implies an up-and-down propagation
delay of 270 ms (milliseconds), which seriously affects the data link layer protocols
and response time.
To avoid mutual interference, communication satellites using the 4/6-GHz (gigahertz) frequency band must be separated
by an angle of 4 degrees as viewed from the
earth. Since some orbit slots have been
allocated by international agreement to
television, military, and other use, the number of equatorial orbit slots available to
data communication is limited. (As an
aside, the allocation of orbit slots has been
a political battleground, with every country, especially those in the Third World,
asking for its fair share of slots for the
purpose of renting them back to those countries able to launch satellites.) The 12/14GHz band has also been allocated to data
communication. At these frequencies, an
orbit spacing of 1 degree is sufficient, providing four times as many slots. Unfortunately, because water is an excellent absorber of these short microwaves, multiple
ground stations and elaborate switching are
needed in order to avoid rain.
Three modes of operation have been proposed for satellite users. The most direct
but most expensive mode is to put a complete ground station with antenna on the
user's roof. This approach is already feasible for large multinational corporations and
will become feasible for medium-sized ones
as costs decline. The second approach is to
put a small, cheap antenna on the user's
roof to communicate with a shared satellite
ground station on a nearby hill. The third
approach is to access the ground station via
a cable (e.g., a leased telephone circuit or
even the same cable used for cable television).
ComputingSurveys, Vol. 13, No. 4, December 1981
460
•
A n d r e w S. T a n e n b a u m
???? ??? O]
(a)
??? El
???E
(c)
(b)
Local network topologies. (a) Linear cable with four hosts. (b) Segmented cable with repeaters and
hosts. (c) Ring.
Figure 3.
Physical layer satellite protocols typically have many PCM channels multiplexed on each transponder beam. Sometimes they are dedicated (circuit switched);
at other times they are dynamically assigned as needed (packet switched). For
more information about communication
satellites see MART78.
1.3 Local Networks
In most local networks, the hosts are connected by a linear, tree-shaped, or ringshaped cable, as shown in Figure 3. In Figure 3a, all hosts tap onto a common cable.
In Figure 3b, multiple cables are used (e.g.,
one per floor of an office building), with
repeaters connecting the segments. In Figure 3c, all hosts tap onto a unidirectional
ring.
A widely imitated linear or tree-shaped
local network is the Ethernet T M network
[METC76]. The proper term for this kind of
network is CSMA/CD (Carrier Sense Multiple Access/Collision Detect), although
many people incorrectly use the term "Ethernet" (which is a trademark of the Xerox
Corporation) in a generic sense. In these
networks, only one packet may be on the
cable at any instant. The cable is known as
the ether, after the luminiferous ether
through which electromagnetic radiation
was once alleged to propagate. The principle behind CSMA/CD is simple: when a
Computing Surveys, Vol. 13, No 4, December 1981
host wishes to send a packet, it first listens
to the ether to see if the ether is being used.
If it is, the host waits until the current
transmission finishes; if not, the host begins
transmitting immediately.
The interface hardware must detect collisions caused by two hosts simultaneously
starting a transmission. Collision detection
is done using analog circuitry, in essence
monitoring the ether to see if it agrees with
the signal being transmitted. When a host
interface (the analog of an IMP in this
system, since the ether itself is totally passive) detects a collision, it informs the data
link layer. The collision recovery action
consists of aborting the current transmission, broadcasting a noise burst to make
sure that everyone else detects the collision
as well, waiting a random length of time,
and then trying again. Collision detection is
only feasible if the round-trip propagation
delay is short compared to the packet transmission time, a condition that can be met
with cable networks, but not, for example,
with satellite networks.
Cable networks similar to the Xerox Ethernet network, but without the collision
detect feature, also exist. Network designers can trade off the cost of collision detection circuitry against the time lost by not
aborting colliding packets quickly.
Ring nets use a different principle: in
effect, the whole ring is a giant circular shift
Network Protocols
DTE
T
(Transmit)
C
(Control)
R
(Receive)
I
( Indication )
S
(Srgnal timing)
B
(Byte
timing)
Ga ( C o m m o n
G
Figure 4.
DCE
return)
( Ground )
The D T E / D C E interface m X 21.
register. After each shift, the host interface
can read or write the bit just shifted into it.
Several different kinds of rings have been
p r o p o s e d [CLAR78, FARB72, FRAS75, LIU78,
WILK79], differing primarily in their layer
2 organizations, which we describe later.
Both CSMA/CD networks and rings typically operate at data rates of 1-10 Mbits/s.
A substantial bibliography about local networks can be found in FREE80 and SHOC81.
1.4 An Example Physical Layer Protocol:
X.21
At present, most physical layer standards,
like RS-232-C and RS-449, utilize analog
signaling. In the future, true digital interfaces will be needed. Recognizing this need,
CCITT, the international standardization
body for telephony, has developed a fully
digital interface called X.21. X.21 is intended to be used to connect a host computer to a network. This connection remains established as long as the host wants
to communicate with the network. Consequently, X.21 is a circuit-switched protocol,
but host-host connections set up over the
X.21 line may be either circuit switched or
packet switched.
In X.21 terminology, the host is a D T E
(Data Terminal Equipment) and the IMP
is a D C E (Data Circuit-Terminating Equipment}. The DTE-DCE interface consists of
eight lines, as shown in Figure 4. The S line
provides a clock signal to define bit boundaries. The (optional) B line provides a pulse
every eighth bit, to allow byte alignment.
The C and I lines are used for control
signaling, analogous to the on-hook/offhook signal on a telephone. The T and R
lines are used for data and also for signaling.
•
461
To see how X.21 works, let us examine
how a DTE calls another DTE, talks to it,
and then hangs up. When the interface is
idle, T, R, C, and I are all 1. The series of
events is as follows (with a telephone analogy in parentheses):
(1) DTE drops T and C (DTE picks up
phone).
(2) DCE sends "+ + + + + + . . . + + +" on
R (DCE sends dial tone).
(3) DTE sends callee's address on T
(DTE dials number).
(4) DCE sends call progress signals on R
(phone rings).
(5) DCE drops I to 0 (callee answers
phone).
(6) Full duplex data exchange on T and
R (talk).
(7) DTE raises C to 1 (DTE says goodbye).
(8) DCE raises I to 1 (DCE says goodbye).
(9) DCE raises R to 1 (DCE hangs up).
(10) DTE raises T to 1 (DTE hangs up).
The call progress signals in Step 4 tell
whether the call has been put through, and
if not, why not. The shutdown procedure in
Steps 7-10 operates in two phases. After
either party has said goodbye, that party
may not send more data but it must continue listening for incoming data. When
both sides have said goodbye, they then
hang up, returning the interface to idle
state, with l's on all four lines. RS-449 and
X.21 are described in more detail in BERT80
and FOLT80.
2. THE DATA LINK LAYER
As we have seen, neither X.21, RS-232-C,
nor any other physical layer protocol makes
any attempt to detect or correct transmission errors. Nor do these protocols recognize the possibility that the receiver cannot
accept data as fast as the sender can transmit them. Both of these problems are handled in the data link layer. In the following
sections we first discuss the relevant principles and then we give an example of a
widely used data link protocol, HDLC
(High-Level Data Link Control). Following
the HDLC example, we look at some data
link protocols for satellite and local networks.
Computing Surveys, Vol. 13, No. 4, December 1981
462
•
A n d r e w S. Tanenbaum
As mentioned earlier, the approach used
in the data layer is to partition the raw
physical layer bit stream into frames so
each transmitted frame can be acknowledged if need be. An obvious question is:
"How are frames delimited?" In other
words, how can the receiver tell where one
frame ends and the next one begins?
Three methods are in common use on
long-haul networks: character count, character stuffing, and btt stuffing. With the
first method, each frame begins with a
fixed-format frame header that tells how
many characters are contained in the
frame. Thus, by simply counting characters, the receiver can detect the end of the
current frame and the start of the following
one. Th e method has the disadvantage of
being overly sensitive to undetected transmission errors which affect the count field;
it also has the disadvantage of enforcing a
specific character size. Furthermore, lost
characters wreak havoc with frame synchronization. Digital Equipment Corporation's D D C M P (Digital Data Communication Message Protocol) uses the character
count method, but few other protocols do.
Use of character counts to delimit frames
is likely to diminish in the future.
T h e second method for delimiting
frames, character stuffing, is to terminate
each frame with a special "end-of-frame"
character. T h e problem here is what to do
with "end-of-frame" characters that accidently appear in the data (e.g., in the middle of a floating point number). T he solution is to insert an "escape" character before every accidental "end-of-frame" character. Now what about accidental "escape"
characters? These are rendered as two consecutive escapes. Although these conventions eliminate all ambiguity, they do so at
the price of building a specific character
code into the protocol. IBM's BISYNC
(Binary SYNchronous Communication)
protocol uses character stuffing, but, like all
other such protocols, it is gradually becoming obsolete.
Modern data link protocols for long-haul
networks all use bit stuffing, a technique in
which frames are delimited by the bit pattern 01111110. Whenever five consecutive
one bits appear in the data stream, a zero
bit is "stuffed" into the bit stream (norCompuung Surveys, Vol. 13, No 4, December 1981
mally by hardware). Doing so prevents user
data from interfering with framing, but does
not impose any character size on the data.
On local networks, one can use any of the
above methods, or a fourth method: detecting frames by the presence or absence of a
signal on the cable. This method is much
more direct, but it is not applicable to longhaul networks.
Virtually all data link protocols include
a checksum in the frame header or trailer
to detect, but not correct, errors. This approach has traditionally been used because
error detection and retransmission requires
fewer bits on the average than forward error
correction (e.g., with a Hamming code).
However, with the growing use of satellites,
the long propagation delay makes forward
error correction increasingly attractive.
A simple checksum algorithm is: compute the Exclusive OR of all the bytes or
words as they are transmitted. This algorithm will detect all frames containing an
odd number of bits in error, or a single error
burst of length less than the checksum, and
many other combinations. In practice, a
more complex algorithm based on modulo
2 polynomial arithmetic is used [PETE61,
SLOA75].
2.1 Stop-and-Wait Protocols
As a first example of a data link layer
protocol, consider a host A wishing to send
data to another host B over a perfectly
reliable channel. At first glance you might
think that A could just send at will. However, this idea does not work, since B may
not be able to process the data as fast as
they come in. If B had an infinite amount
of buffer space, it could store the input for
subsequent processing. Unfortunately, no
host has infinite storage. Consequently, a
mechanism is needed to throttle A into
sending no faster than B can process the
data. Such mechanisms are called flow control algorithms. T he simplest one calls for
A to send a frame and then wait for B to
send explicit permission to send the next
frame. This algorithm, called stop-andwast, is widely used.
More elaborate protocols are needed for
actual channels that make errors. An obvious extension to our basic protocol is to
N e t w o r k Protocols
463
•
Sender
Receiver
@@
(a)
(c)
(b)
(d)
(e)
(f)
(g)
Figure 5. T h e shding-window algorithm.
have A put a sequence number in each data
link frame header and to have B put in
each acknowledgment frame both a sequence number and a bit telling whether
the checksum was correct or not. Whenever
A received a negative acknowledgment
frame (i.e., one announcing a checksum error), it could just repeat the frame.
Unfortunately, this protocol fails if either
data or acknowledgment frames can be lost
entirely in noise bursts. If a frame is lost, A
will wait forever, creating a deadlock. Consequently, A must time out and repeat a
frame if no acknowledgment is forthcoming
within a reasonable period. Since each
frame bears a sequence number, no harm is
done if A has an itchy trigger finger and
retransmits too quickly; however, some
bandwidth is lost.
2.2 Sliding-Window Protocols
Stop-and-wait works well if the propagation
time between the hosts is negligible. Consider, for a moment, how stop-and-wait
works when 1000-bit frames are sent over
a 1-Mbit/s satellite channel:
Time
(ms)
Event
0
1
270
271
271
541
A starts sendmg the frame
Last bit sent, A starts to walt
Fncst bit arrives at B
Last bit arrives at B
B sends a short acknowledgment
T h e acknowledgment arrives at A
For each millisecond of transmission, A has
to wait 540 ms. The channel utilization is
thus 1/541, or well below 1 percent. A better
protocol is needed.
One such protocol is the s h d i n g - w i n d o w
protocol, in which the sender is allowed to
have multiple unacknowledged frames outstanding simultaneously. In this protocol,
the sender has two variables, SL and Su,
that tell which frames have been sent but
not yet acknowledged. SL is the lowest numbered frame sent but not yet acknowledged.
The upper limit, Su, is the first frame not
yet sent. The current send window size is
defined as Su - SL.
The receiver also has two variables, RL
and Ru, indicating that a frame with sequence number N may be accepted, provided that RL ~ N < Ru. If Ru - RL = 1,
then the receiver has a window of size 1,
that is, it only accepts frames in sequence.
If the receiver's window is larger than 1, the
receiver's data link layer may accept frames