17
The Principles of Computer Networking www.cambridge.org © in this web service Cambridge University Press Cambridge University Press 978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles of Computer Networking D. Russell Frontmatter More information

The Principles of Computer Networking

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

The Principles of ComputerNetworking

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

Also in this series1 An Introduction to Logical Design of Digital Circuits

C. M. Reeves 19722 Information Representation and Manipulation in a Computer

E. S. Page and L. B. Wilson, Second Edition 19783 Computer Simulation of Continuous Systems

R. J. Ord-Smith and J. Stephenson 19754 Macro Processors

A. J. Cole, Second Edition 19815 An Introduction to the Uses of Computers

Murray haver 19766 Computing Systems Hardware

M. Wells 19767 An Introduction to the Study of Programming Languages

D. W Barron 19778 ALGOL 68 - A first and second course

A. D. McGettrick 19789 An Introduction to Computational Combinatorics

E. S. Page and L. B. Wilson 197910 Computers and Social Change

Murray haver 198011 The Definition of Programming Languages

A. D. McGettrick 198012 Programming via Pascal

J. S. Rohl and H. J. Barrett 198013 Program Verification using Ada

A. D. McGettrick 198214 Simulation Techniques for Discrete Event Systems

/. Mitrani 198215 Information Representation and Manipulation using Pascal

E. S. Page and h. B. Wilson 198316 Writing Pascal Programs

J. S. Rohl 198317 An Introduction to APL

5. Pommier 198318 Computer Mathematics

D. J. Cooke and H. E. Bez 198419 Recursion via Pascal

J. S. Rohl 198420 Text Processing

A. Colin Day 198421 Introduction to Computer Systems

Brian Molinari 198522 Program Construction

R. G. Stone and D. J. Cooke 198723 A Practical Introduction to Denotational Semantics

hloyd Allison 198724 Modelling of Computer and Communication Systems

/. Mitrani 1987

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

2 5 Cambridge Computer Science Texts

The Principles of ComputerNetworking

D. RussellComputing Laboratory, University of Newcastle upon Tyne

CAMBRIDGEUNIVERSITY PRESS

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

cambridge university press Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo, Delhi, Tokyo, Mexico City

Cambridge University Press The Edinburgh Building, Cambridge CB2 8RU, UK

Published in the United States of America by Cambridge University Press, New York

www.cambridge.org Information on this title: www.cambridge.org/9780521339926

© Cambridge University Press 1989

This publication is in copyright. Subject to statutory exception and to the provisions of relevant collective licensing agreements, no reproduction of any part may take place without the written permission of Cambridge University Press.

First published 1989 Reprinted 1991, 1997

A catalogue record for this publication is available from the British Library

isbn 978-0-521-32795-4 Hardback isbn 978-0-521-33992-6 Hardback

Cambridge University Press has no responsibility for the persistence or accuracy of URLs for external or third-party internet websites referred to in this publication, and does not guarantee that any content on such websites is, or will remain, accurate or appropriate. Information regarding prices, travel timetables, and other factual information given in this work is correct at the time of first printing but Cambridge University Press does not guarantee the accuracy of such information thereafter.

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

To my parents

For more than I can ever know

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

Contents

11.11.21.31.41.51.61.71.81.91.101.111.121.131.141.151.161.171.181.191.201.21

22.12.22.32.42.52.62.72.82.92.102.112.122.13

Data TransmissionCharacter RepresentationPrinciples of TransmissionFourier AnalysisNoiseLimits of Data TransmissionReal Data TransmissionAsynchronous CommunicationSynchronous CommunicationSignal EncodingClock RecoveryData Coding and ModulationModem SignalsOther Modem SignalsAutomatic AnsweringNull ModemsLocal Loopback or Cross-Connection?Plugs and SocketsOriginating Dialled CallsCharacter and Record StructureBit StuffingErrors

Error Detection and RecoveryError DetectionHamming DistanceError-Correcting CodesHamming Single-Error-Correcting CodeBurst ErrorsChecksum Error DetectionCyclic Redundancy ChecksCRC AnalysisBack-to-Back BlocksError AnalysisCRC Computation by ProgramChoice of MethodForward and Reverse Error Correction

115699

11131517212222242527293031323536

3737383840424343444647485051

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

viii

2.142.152.162.172.182.192.202.212.222.232.242.252.262.27

33.13.23.33.43.53.63.73.83.93.103.113.123.133.143.153.163.173.183.193.203.213.223.233.24

44.1

Contents

Reverse Error Correction ProtocolParallel ExerciseProtocol RepresentationProtocol EvaluationProtocol Representation AgainA Minimal Link ProtocolA Real Link Level Protocol—The HDLC FamilyThe Notion of StateMultiple Packets—WindowsQuerying the Send State VariableRemote Procedure CallsForward or Reverse Error Correction?Acceptable Error in an Imperfect WorldSummary

Shared MediaWhy Share a Medium?Time and Frequency Division MultiplexingContention AccessThroughputOther Aloha DisciplinesAloha ModelsAloha SummaryCarrier Sense Multiple AccessEthernetsCSMA SummaryRingsThe Slotted RingThe Monitor StationSlotted Ring SummaryThe Token RingToken Ring PriorityToken Ring ErrorsThe FDDI RingOther Types of RingContention RingsRing SummaryToken BusToken Bus SummarySummary

Flow ControlExamples of Flow Control

5152525355575858606565676870

7171737679878888889094949699

101101104109109111113114115117118

119119

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

IX

4.24.34.44.54.64.74.84.94.104.114.124.13

55.15.25.35.45.55.65.75.85.95.105.115.12

66.16.26.36.46.56.66.76.86.96.106.116.126.136.146.15

Record Oriented Flow ControlBandwidth, Throughput, and Delay TimeFlow Control MechanismsM and N PacingFlow Control WindowsWindows and Cyclic NumberingThe Mental Picture of a Window MechanismImplications of Window MechanismsCredit MechanismsCredits and Sliding Window ProtocolsDo We Really Need Flow Control?Flow Control in Real Life

Network Routing and CongestionNetwork Addresses, Routes and TopologyDatagrams and Virtual CallsRouting DatagramsDynamic RoutingLoad BalancingRe-RoutingCongestion and DeadlockVirtual Call NetworksHybrid NetworksBroadcasts and MulticastsSource RoutingSummary

Network Service and InterfaceX.25The X.25 ProtocolPacket Format in X.25Call Connection in X.25Data Transfer in X.25Flow Control in X.25Expedited Data in X.25RESET in X.25Disconnection in X.25Connections Over Datagrams—The ARPANET TCPSequence Numbers in TCPConnection Management in TCPCall Disconnection in TCPThe Actual TCP/IP ProtocolThe Internet Protocol

122124126126128129130130132133134134

139139141142147150151151157162163165166

168168171171172174176179179180181181183187188189

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

X

6.166.176.186.196.206.216.226.23

77.17.27.37.47.57.67.77.8

88.18.28.38.48.5

99.19.29.39.49.59.69.79.89.99.10

1010.110.210.310.4

Contents

The ISO Transport ServiceISO Transport across Heterogeneous NetworksThe ISO Transport ChecksumISDNSignalling System Number 7Facilities on ISDNISDN and Computer CommunicationsSummary

Terminal SupportSupporting Simple Character Terminals—Triple-XVirtual Terminals—TELNETScreen Based TerminalsSupporting Bitmapped Terminals—X and NeWSThe X-Window SystemNeWSA Comparison of NeWS and XSummary

PresentationData RepresentationCompression and EncryptionEncryptionAbstract Syntax Notation 1—ASN.lGeneral

File Transfer and AccessFile StructureFile Transfer ProtocolFile TypesISO File Transfer Access and Manipulation ProtocolVirtual and Real File StructuresDocument TypesFile AccessFile Transfer "In The Large"Checkpoint RecoverySummary

Network MailComputer MessagesForwarding, Relaying and Address StructuresDomain StructureOther Mail Networks

192195196197198199200201

203203213219224225229231232

233233239243245253

254254257258260260262265265271272

273274283285289

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

XI

10.510.610.710.810.9

1111.111.211.311.411.511.6

1212.112.212.312.412.512.612.712.812.912.1012.1112.1212.13

1313.113.213.313.413.513.613.713.813.913.10

1414.1

X.400 Mail SystemsX.400 Mail ProtocolsConferencingHuman FactorsSummary

Application Level ServicesCASE StandardsRemote OperationsUpper Layer ArchitectureDirectory ServicesMaintaining the DatabaseSummary

Performance and System IssuesLightweight ProtocolsRemote Procedure CallsGeneral Performance and Cost IssuesPacket Handling CostsSingle Byte InteractionsMultiple Packet InteractionsHardware Checksum CalculationThe Cost of Heavyweight ProtocolsThe Task Switching Overhead—Back-to-Back BlocksThe Impact of Transmission Errors on ThroughputNon-Sequential ProtocolsError Recovery and Network CongestionSummary

Network ManagementError MonitoringTraffic and CongestionDynamic ReconfigurationDistributing and Loading New Network SoftwareSoftware IntegrityTopology of Shared MediaBackbonesGeneral DiscussionSizeSummary

Security and AuthenticationThe Need for Security

290292297299300

301301306309313318320

322322323330330334335337340341347348350351

352352354357357364365370371371373

374374

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

xii

14.214.314.414.514.614.714.814.914.1014.1114.1214.1314.1414.1514.1614.1714.18

1515.115.215.315.415.515.615.715.815.915.1015.1115.1215.1315.1415.1515.16

1616.116.216.316.416.516.6

Contents

Physical SecurityA Potted History of CryptologyRotor MachinesThe DES StandardThe DES ControversyPublic Key EncryptionThe Knapsack AlgorithmThe RSA AlgorithmDigital SignaturesWeaknesses of Current Public Key AlgorithmsNetwork Applications of EncryptionEquivalence of Secure Channels and AuthenticationKey ManagementFormal Protocol AnalysisConfidentiality Using Public Key EncryptionPublic vs Private Key AuthenticationSummary

GatewaysAddressing DomainsThird Party AddressingHierarchical NamingAdministrative GatewaysTransparent GatewaysProtocol MappingMapping at the Packet Level—Packet SizesPacket-Level AddressingNetwork-Level GatewaysNetwork-Level Packet SizesDatagram or Virtual Call?Internetwork ServicesHigher Level GatewaysStore and Forward GatewaysGateway, Router, Switch, Bridge, or Repeater?Summary

StandardsThe Need for StandardsThe Standards MakersCommunications ModelsIEEE Project 802TOP and MAPFunctional Standards

375377384388391392394395398400401401401406406407408

411412414416417420421421424425425425427429431433433

435435439443448450451

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

Xlll

16.7 Protocol Description 45116.8 Testing Protocol Definitions and Implementations 46016.9 Summary 463

Glossary 465

Further Reading and References 481Further Reading 481References 483

Index 489

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

Preface

This book is intended to cover the whole of the field of computer com-munications. Even with such a wide ranging ambition, there must belimits to the coverage. Roughly these are drawn at the lower end ofthe spectrum by assuming the properties of transmission media, and atthe top end by stopping short of discussing truly distributed processing.In between, the aim has been to give an overall understanding of theprinciples involved.

Computer communications is such a vast and fast moving fieldthat it is quite impossible to cover the details of any complete archi-tecture within the confines of one book. However, that was never myintention. The real aim is to try to extract some of the principles thatemerge in computer networking, sometimes over and over again. Oneprime example is the topic of flow control. The principles of flow con-trol can be extracted independently of context, and this book devotesChapter 4 to just that. Similarly, in Chapter 3 we look at what is atfirst sight a bewildering range of ways of sharing a medium. However,it soon emerges that most of their number can be reduced by askingtwo orthogonal questions—is the topology a bus or a ring, and is theaccess by contention or by token? Once these two principles have beenunderstood, the other aspects are of secondary importance. Again, theaddressing and routing principles that we discuss in Chapter 6 in rela-tion to the techniques of providing the network service, crop up againwhen looking at network mail in Chapter 10, and Gateways in Chapter15.

In overall plan the book starts at the bottom and works up-wards. Thus, the early chapters through Chapter 6 explain how raw,error-prone communications media can be built into a reliable end-to-end communications service. However, the subject of communicationshas only just started by this time. For successful communication totake place, agreements have to be made about what the bits on thisreliable pipe actually mean. This brings us to the consideration of pre-sentation issues which are concerned with a consistent representation ofthe same semantic information across diverse systems. We also go intoconsiderable detail in describing how various applications of computerconnections actually work, including computer mail, terminal support,and file transfer and access. The application level tools provided by ISO,and in particular the remote operations service are explained.

As well as the "traditional" kinds of protocol with which thisbook is mainly concerned, a chapter is devoted to looking at so-calledlightweight protocols, and the performance and system issues involved in

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

XVI Preface

the efficient implementation of communications architectures. In addi-tion, since networks have grown so big, they need to be managed, andsome of the management issues are also discussed.

Perhaps unusually, a whole chapter is devoted to Security, Au-thentication, and Encryption. This topic was given such treatment be-cause the author perceives that current attitudes show a huge ignoranceof what can and can't be done in this area. Computer networks are in-secure, and becoming more so. However, many people either seem to bevery ignorant of what can be achieved by encryption, or, naively, seemto be ready to put complete trust into encryption techniques. In 1978,Needham and Schroeder showed how, through the use of encryptiontechniques, two mutually unknown network entities could authenticatethemselves, one to the other through the agency of a third, trusted, au-thentication server. This is independent of "hostile" agents observingall the messages, and inserting, corrupting, or replaying messages. Mostpeople are very surprised by this ability, and it is surprisingly poorlyknown even 10 years after its first publication. On the other hand, somepeople put an unquestioning trust in encryption, apparently obliviousof the consistent history of broken cyphers. In addition, the interestingproperties of public key encryption, together with their present disap-pointing position is also presented. Chapter 14 aims to give an up-to-date review of what can and cannot be done in this area.

Finally, Chapter 16 tries to summarise the need for standards,and the processes, political and technical, by which standards are pro-duced and imposed. In addition to discussing the various political bodiesthat produce standards, Chapter 16 also discusses some of the tech-niques by which standards are described and analysed. Natural humanlanguage is inadequate and leads to ambiguity and misunderstanding,and Chapter 16 indicates some of the improved tools that are beginningto appear.

Throughout the book, the principles are illustrated by examplestaken from real computer architectures. The emphasis is always ongenerally agreed standards, and so the examples come mainly from theISO and ARPANET suites of protocols. The attempt has been to avoidproprietary architectures wherever possible, and the choice of the ISOand ARPANET suites is for two main reasons. One is that they arepublicly and widely available, and the other is that they often have quitedifferent approaches to solving the problems in hand. When differentapproaches are used on the same problem, then a careful analysis ofwhere differences lie often illuminates the real character of the problemand reveals the principles involved.

A book like this owes much to the efforts of others. Perhaps themost help have been those with whom the author has come into contact

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information

XV11

over the long years that he has worked in designing and implementingnetworks. I have been privileged to encounter many luminaries, and itwould be invidious to mention any individually since at least ten timesas many would of necessity not be mentioned. However, I hope I maybe allowed the indulgence of mentioning just two. I was privileged toknow Bob Husak of the Merit Computer Network. Bob had a deep andencyclopaedic knowledge of networks at all levels, and was a good friend.His early death saddened all who knew him. In my undergraduate lifeas a physicist, Thomas Littlefield taught me how to get a feel for com-plex physical processes by employing simple mental pictures. It is anapproach I have valued ever since.

Directly involved in the production of this book have been HarryWhitfield who fooled me into starting the project in the first place,and pointed out many silly mistakes, Quentin Campbell, Jill Foster, IsiMitrani, and especially Ian Doak have read various drafts and givensuggestions. From CUP, Ernest Kirkwood, Tim Bradshaw, and DavidTranah have supported me during the preparation of this book.

I shall not break with the worthy tradition of thanking the typistDenis Russell for typing and revising endless revisions of the manuscript,with only the occasional hint of dissatisfaction with his lot. In addition,he typeset the text using TEJXf, produced all the drawings in Post Script J,and produced camera ready copy. Of course this leaves even less roomthan normal for the author to disclaim responsibility for errors. Moreto the point, various tools were used including text editors on severaloperating systems (even including UNIX§), micros, workstations andmainframes too numerous to mention, and communications systems in-cluding most of those described between these covers.

Finally, and most of all, I would like to thank my wife Marion,and the kids for putting up both with me and without me during theexcessively protracted gestation period of this book. I can only hope itwas worth their efforts.

I T^Xis a trademark of the American Mathematical SocietyX PostScript is a trademark of Adobe Systems Incorporated§ UNIX is a trademark of Bell Laboratories

www.cambridge.org© in this web service Cambridge University Press

Cambridge University Press978-0-521-33992-6 - 25 Cambridge Computer Science Texts: The Principles ofComputer NetworkingD. RussellFrontmatterMore information