Transcription of COMPUTER NETWORKS - SJTU
1 COMPUTER NETWORKS . FIFTH EDITION. This page intentionally left blank COMPUTER NETWORKS . FIFTH EDITION. ANDREW S. TANENBAUM. Vrije Universiteit Amsterdam, The Netherlands DAVID J. WETHERALL. University of Washington Seattle, WA. PRENTICE HALL. Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Paris Montreal Toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Tapei Tokyo Editorial Director: Marcia Horton Art Director: Linda Knowles Editor-in-Chief: Michael Hirsch Cover Designer: Susan Paradise Executive Editor: Tracy Dunkelberger Cover Illustration: Jason Consalvo Assistant Editor: Melinda Haggerty Interior Design: Andrew S.
2 Tanenbaum Editorial Assistant: Allison Michael AV Production Project Manager: Vice President, Marketing: Patrice Jones Gregory L. Dulles Marketing Manager: Yezan Alayan Interior Illustrations: Laserwords, Inc. Marketing Coordinator: Kathryn Ferranti Media Editor: Daniel Sandin Vice President, Production: Vince O'Brien Composition: Andrew S. Tanenbaum Managing Editor: Jeff Holcomb Copyeditor: Rachel Head Senior Operations Supervisor: Alan Fischer Proofreader: Joe Ruddick Manufacturing Buyer: Lisa McDowell Printer/Binder: Courier/Westford Cover Direction: Andrew S. Tanenbaum, Cover Printer: Lehigh-Phoenix Color/. David J. Wetherall, Tracy Dunkelberger Hagerstown Credits and acknowledgments borrowed from other sources and reproduced, with permission, in this textbook appear on appropriate page within text.
3 Many of the designations by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed in initial caps or all caps. Copyright 2011, 2003, 1996, 1989, 1981 Pearson Education, Inc., publishing as Prentice Hall. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise.
4 To obtain permission(s). to use material from this work, please submit a written request to Pearson Education, Inc., Permissions Department, 501 Boylston Street, Suite 900, Boston, Massachusetts 02116. Library of Congress Cataloging-in-Publication Data Tanenbaum, Andrew S., 1944- COMPUTER NETWORKS / Andrew S. Tanenbaum, David J. Wetherall. -- 5th ed. p. cm. Includes bibliographical references and index. ISBN-13: 978-0-13-212695-3 (alk. paper). ISBN-10: 0-13-212695-8 (alk. paper). 1. COMPUTER NETWORKS . I. Wetherall, D. (David) II. Title. 2011. 2010034366. 10 9 8 7 6 5 4 3 2 1 CRW 14 13 12 11 10. To Suzanne, Barbara, Daniel, Aron, Marvin, Matilde, and the memory of Bram, and Sweetie (AST).
5 To Katrin, Lucy, and Pepper (DJW). This page intentionally left blank CONTENTS. PREFACE xix 1 introduction 1. USES OF COMPUTER NETWORKS , 3. Business Applications, 3. Home Applications, 6. Mobile Users, 10. Social Issues, 14. network HARDWARE, 17. Personal Area NETWORKS , 18. Local Area NETWORKS , 19. Metropolitan Area NETWORKS , 23. Wide Area NETWORKS , 23. Internetworks, 28. network SOFTWARE, 29. Protocol Hierarchies, 29. Design Issues for the Layers, 33. Connection-Oriented Versus Connectionless Service, 35. Service Primitives, 38. The Relationship of Services to Protocols, 40. REFERENCE MODELS, 41. The OSI Reference Model, 41. The TCP/IP Reference Model, 45.
6 The Model Used in This Book, 48. vii viii CONTENTS. A Comparison of the OSI and TCP/IP Reference Models*, 49. A Critique of the OSI Model and Protocols*, 51. A Critique of the TCP/IP Reference Model*, 53. EXAMPLE NETWORKS , 54. The Internet, 54. Third-Generation Mobile Phone NETWORKS *, 65. Wireless LANs: *, 70. RFID and Sensor NETWORKS *, 73. network STANDARDIZATION*, 75. Who's Who in the Telecommunications World, 77. Who's Who in the International Standards World, 78. Who's Who in the Internet Standards World, 80. METRIC UNITS, 82. OUTLINE OF THE REST OF THE BOOK, 83. SUMMARY, 84. 2 THE PHYSICAL LAYER 89. THE THEORETICAL BASIS FOR DATA COMMUNICATION, 90.
7 Fourier Analysis, 90. Bandwidth-Limited Signals, 90. The Maximum Data Rate of a Channel, 94. GUIDED TRANSMISSION MEDIA, 95. Magnetic Media, 95. Twisted Pairs, 96. Coaxial Cable, 97. Power Lines, 98. Fiber Optics, 99. WIRELESS TRANSMISSION, 105. The Electromagnetic Spectrum, 105. Radio Transmission, 109. Microwave Transmission, 110. Infrared Transmission, 114. Light Transmission, 114. CONTENTS ix COMMUNICATION SATELLITES*, 116. Geostationary Satellites, 117. Medium-Earth Orbit Satellites, 121. Low-Earth Orbit Satellites, 121. Satellites Versus Fiber, 123. DIGITAL MODULATION AND MULTIPLEXING, 125. Baseband Transmission, 125. Passband Transmission, 130.
8 Frequency Division Multiplexing, 132. Time Division Multiplexing, 135. Code Division Multiplexing, 135. THE PUBLIC SWITCHED TELEPHONE network , 138. Structure of the Telephone System, 139. The Politics of Telephones, 142. The Local Loop: Modems, ADSL, and Fiber, 144. Trunks and Multiplexing, 152. Switching, 161. THE MOBILE TELEPHONE SYSTEM*, 164. First-Generation (coco1G) Mobile Phones: Analog Voice, 166. Second-Generation (2G) Mobile Phones: Digital Voice, 170. Third-Generation (3G) Mobile Phones: Digital Voice and Data, 174. CABLE TELEVISION*, 179. Community Antenna Television, 179. Internet over Cable, 180. Spectrum Allocation, 182. Cable Modems, 183.
9 ADSL Versus Cable, 185. SUMMARY, 186. 3 THE DATA LINK LAYER 193. DATA LINK LAYER DESIGN ISSUES, 194. Services Provided to the network Layer, 194. Framing, 197. Error Control, 200. Flow Control, 201. x CONTENTS. ERROR DETECTION AND CORRECTION, 202. Error-Correcting Codes, 204. Error-Detecting Codes, 209. ELEMENTARY DATA LINK PROTOCOLS, 215. A Utopian Simplex Protocol, 220. A Simplex Stop-and-Wait Protocol for an Error-Free Channel, 221. A Simplex Stop-and-Wait Protocol for a Noisy Channel, 222. SLIDING WINDOW PROTOCOLS, 226. A One-Bit Sliding Window Protocol, 229. A Protocol Using Go-Back-N, 232. A Protocol Using Selective Repeat, 239. EXAMPLE DATA LINK PROTOCOLS, 244.
10 Packet over SONET, 245. ADSL (Asymmetric Digital Subscriber Loop), 248. SUMMARY, 251. 4 THE MEDIUM ACCESS CONTROL SUBLAYER 257. THE CHANNEL ALLOCATION PROBLEM, 258. Static Channel Allocation, 258. Assumptions for Dynamic Channel Allocation, 260. MULTIPLE ACCESS PROTOCOLS, 261. ALOHA, 262. Carrier Sense Multiple Access Protocols, 266. Collision-Free Protocols, 269. Limited-Contention Protocols, 274. Wireless LAN Protocols, 277. ETHERNET, 280. Classic Ethernet Physical Layer, 281. Classic Ethernet MAC Sublayer Protocol, 282. Ethernet Performance, 286. Switched Ethernet, 288. CONTENTS xi Fast Ethernet, 290. Gigabit Ethernet, 293. 10-Gigabit Ethernet, 296.