2nd

  • View
    94

  • Download
    3

Embed Size (px)

Text of 2nd

  • DATA COMMUNICATIONSAND

    NETWORKING

    Second Edition

    FM Page i Wednesday, February 23, 2000 2:30 PM

  • FM Page ii Wednesday, February 23, 2000 2:30 PM

  • DATA COMMUNICATIONSAND

    NETWORKING

    Second Edition

    Behrouz A. Forouzan

    DeAnza College

    with

    Catherine Coombs

    and

    Sophia Chung Fegan

    Boston Burr Ridge, IL Dubuque, IA Madison, WI New York San Francisco StBangkok Bogot Caracas Lisbon London Madrid

    Mexico City Milan New Delhi Seoul Singapore Sydney Taipei Toronto

    FM Page iii Wednesday, February 23, 2000 2:30 PM

  • DATA COMMUNICATIONS AND NETWORKING

    Published by McGraw-Hill, an imprint of the McGraw-Hill Companies, Inc. 1221 Avenue of the Americas, New York, NY, 10020. Copyright 2001, 1998 by The McGraw-Hill Companies, Inc. All rights reserved. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of The McGraw-Hill Companies, Inc., including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning.

    This book is printed on acid-free paper.

    1 2 3 4 5 6 7 8 9 0 DOC/DOC 0 9 8 7 6 5 4 3 2 1 0

    ISBN 0-07-232204-7

    Publisher:

    Thomas Casson

    Executive editor:

    Elizabeth A. Jones

    Developmental editor:

    Emily J. Gray

    Senior marketing manager:

    John T. Wannemacher

    Senior project manager:

    Amy Hill

    Senior production supervisor:

    Heather D. Burbridge

    Freelance design coordinator:

    Gino Cieslik

    Supplement coordinator:

    Susan Lombardi

    New media:

    Christopher Styles

    Cover design:

    Joanne Schopler

    Cover illustration:

    Tony Stone

    Compositor:

    Interactive Composition Corporation

    Typeface:

    10/12 Times Roman

    Printer:

    R. R. Donnelley & Sons Company

    [CIP to come]

    http://www.mhhe.com

    FM Page iv Wednesday, February 23, 2000 2:30 PM

  • To Faezeh with love.

    FM Page v Wednesday, February 23, 2000 2:30 PM

  • FM Page vi Wednesday, February 23, 2000 2:30 PM

  • vii

    BRIEF CONTENTS

    Contents ix

    Preface xxvii

    Chapter 1

    Introduction 1

    Chapter 2

    Basic Concepts 21

    Chapter 3

    The OSI Model 43

    Chapter 4

    Signals 65

    Chapter 5

    Encoding and Modulating 91

    Chapter 6

    Transmission of Digital Data: Interfacesand Modems 139

    Chapter 7

    Transmission Media 187

    Chapter 8

    Multiplexing 231

    Chapter 9

    Error Detection and Correction 273

    Chapter 10

    Data Link Control 301

    Chapter 11

    Data Link Protocols 329

    Chapter 12

    Local Area Networks 369

    Chapter 13

    Metropolitan Area Networks 413

    Chapter 14

    Switching 431

    FM Page vii Wednesday, February 23, 2000 2:30 PM

  • viii

    BRIEF CONTENTS

    Chapter 15

    Point-to-Point Protocol (PPP) 455

    Chapter 16

    Integrated Services Digital Network (ISDN) 471

    Chapter 17

    X.25 505

    Chapter 18

    Frame Relay 525

    Chapter 19

    ATM 553

    Chapter 20

    SONET/SDH 593

    Chapter 21

    Networking and Internetworking Devices 613

    Chapter 22

    Transport Layer 657

    Chapter 23

    Upper OSI Layers 677

    Chapter 24

    TCP/IP Protocol Suite: Part 1 705

    Chapter 25

    TCP/IP Protocol Suite: Part 2, Application Layer 737

    Appendix A

    ASCII Code 777

    Appendix B

    Numbering Systems and Transformation 783

    Appendix C

    Representation of Binary Numbers 791

    Appendix D

    Fourier Analysis 799

    Appendix E

    Hardware Equipment for Error Detection 803

    Appendix F

    Huffman Coding 811

    Appendix G

    LZW (Lempel-Ziv-Welch) Compression Method 817

    Appendix H

    Next Generation of TCP/IP Protocol Suite: IPv6 and ICMPv6 825

    Appendix I

    Spanning Tree 839

    Glossary 845

    Acronyms 877

    Index 000

    FM Page viii Wednesday, February 23, 2000 2:30 PM

  • ix

    TABLE OFCONTENTS

    Preface xxvii

    Chapter 1

    Introduction 1

    1.1 WHY STUDY DATA COMMUNICATIONS 1 1.2 DATA COMMUNICATION 2

    Components 3

    1.3 NETWORKS 4

    Distributed Processing 4Network Criteria 5Applications 6

    1.4 PROTOCOLS AND STANDARDS 7

    Protocols 7Standards 8

    1.5 STANDARDS ORGANIZATIONS 9

    Standards Creation Committees 9Forums 12Regulatory Agencies 13

    1.6 STRUCTURE OF THE BOOK 13 1.7 KEY TERMS AND CONCEPTS 13 1.8 SUMMARY 14 1.9 PRACTICE SET 15

    Review Questions 15Multiple Choice 16Exercises 18

    Chapter 2

    Basic Concepts 21

    2.1 LINE CONFIGURATION 21

    Point-to-Point 21Multipoint 22

    2.2 TOPOLOGY 22

    Mesh 23Star 25Tree 25

    FM Page ix Wednesday, February 23, 2000 2:30 PM

  • x

    TABLE OF CONTENTS

    Bus 26Ring 27Hybrid Topologies 28

    2.3 TRANSMISSION MODE 28

    Simplex 29Half-Duplex 29Full-Duplex 29

    2.4 CATEGORIES OF NETWORKS 30

    Local Area Network (LAN) 30Metropolitan Area Network (MAN) 32Wide Area Network (WAN) 32

    2.5 INTERNETWORKS 33 2.6 KEY TERMS AND CONCEPTS 33 2.7 SUMMARY 34 2.8 PRACTICE SET 35

    Review Questions 35Multiple Choice 36Exercises 38

    Chapter 3

    The OSI Model 43

    3.1 THE MODEL 43

    Layered Architecture 43

    3.2 FUNCTIONS OF THE LAYERS 47

    Physical Layer 47Data Link Layer 48Network Layer 49Transport Layer 51Session Layer 53Presentation Layer 54Application Layer 55Summary of Layer Functions 56

    3.3 TCP/IP PROTOCOL SUITE 56 3.4 KEY TERMS AND CONCEPTS 57 3.5 SUMMARY 58 3.6 PRACTICE SET 59

    Review Questions 59Multiple Choice 60Exercises 63

    Chapter 4

    Signals 65

    4.1 ANALOG AND DIGITAL 65

    Analog and Digital Data 66Analog and Digital Signals 66

    4.2 APERIODIC AND PERIODIC SIGNALS 66

    Periodic Signals 67Aperiodic Signals 67

    4.3 ANALOG SIGNALS 68

    Simple Analog Signals 68

    FM Page x Wednesday, February 23, 2000 2:30 PM

  • TABLE OF CONTENTS

    xi

    4.4 TIME AND FREQUENCY DOMAIN 74 4.5 COMPOSITE SIGNALS 75

    Frequency Spectrum and Bandwidth 76

    4.6 DIGITAL SIGNALS 79

    Decomposition of a Digital Signal 80

    4.7 KEY TERMS AND CONCEPTS 81 4.8 SUMMARY 82 4.9 PRACTICE SET 83

    Review Questions 83Multiple Choice 84Exercises 86

    Chapter 5

    Encoding and Modulating 91

    5.1 DIGITAL-TO-DIGITAL CONVERSION 92

    Unipolar 92Polar 94Bipolar 97

    5.2 ANALOG-TO-DIGITAL CONVERSION 102

    Pulse Amplitude Modulation (PAM) 102Pulse Code Modulation (PCM) 103Sampling Rate 104How Many Bits Per Sample 106Bit Rate 107

    5.3 DIGITAL-TO-ANALOG CONVERSION 107

    Aspects of Digital-to-Analog Conversion 108Amplitude Shift Keying (ASK) 109Frequency Shift Keying (FSK) 111Phase Shift Keying (PSK) 113Quadrature Amplitude Modulation (QAM) 116Bit/Baud Comparison 118

    5.4 ANALOG-TO-ANALOG CONVERSION 120

    Amplitude Modulation (AM) 121Frequency Modulation (FM) 122Phase Modulation (PM) 125

    5.5 KEY TERMS AND CONCEPTS 125 5.6 SUMMARY 126 5.7 PRACTICE SET 127

    Review Questions 127Multiple Choice 128Exercises 133

    Chapter 6

    Transmission of Digital Data: Interfaces and Modems 139

    6.1 DIGITAL DATA TRANSMISSION 139

    Parallel Transmission 140Serial Transmission 141

    6.2 DTE-DCE INTERFACE 143

    Data Terminal Equipment (DTE) 144

    FM Page xi Wednesday, February 23, 2000 2:30 PM

  • xii

    TABLE OF CONTENTS

    Data CircuitTerminating Equipment (DCE) 144Standards 145EIA-232 Interface 145

    6.3 OTHER INTERFACE STANDARDS 152

    EIA-449 153EIA-530 157X.21 158

    6.4 MODEMS 159

    Transmission Rate 160Modem Standards 164

    6.5 56K MODEMS 171

    Traditional Modems 17156K Modems 172Why Only 56 Kbps? 174

    6.6 CABLE MODEM 174

    Downloading 174Uploading 175

    6.7 KEY TERMS AND CONCEPTS 175 6.8 SUMMARY 176 6.9 PRACTICE SET 177

    Review Questions 177Multiple Choice 179Exercises 185

    Chapter 7

    Transmission Media 187

    7.1 GUIDED MEDIA 188

    Twisted-Pair Cable 188Coaxial Cable 192Optical Fiber 193

    7.2 UNGUIDED MEDIA 200Radio Frequency Allocation 200Propagation of Radio Waves 200Terrestrial Microwave 205Satellite Communication 206Cellular Telephony 208

    7.3 TRANSMISSION IMPAIRMENT 211Attenuation 211Distortion 213Noise 213

    7.4 PERFORMANCE 214Throughput 214Propagation Speed 215Propagation Time 215

    7.5 WAVELENGTH 215 7.6 SHANNON CAPACITY 216 7.7 MEDIA COMPARISON 217 7.8 KEY TERMS AND CONCEPTS 218 7.9 SUMMARY 220

    FM Page xii Wednesday, February 23, 2000 2:30 PM

  • TABLE OF CONTENTS xiii

    7.10 PRACTICE SET 222Review Questions 222Multiple Choice 223Exercises 230

    Chapter 8 Multiplexing 231 8.1 MANY TO ONE/ONE TO MANY 231 8.2 FREQUENCY-DIVISION MULTIPLEXING (FDM) 232 8.3 WAVE-DIVISION MULTIPLEXING (WDM) 235 8.4 TIME-DIVISION MULTIPLEXING (TDM) 236

    Inverse Multiplexing 244 8.5 MULTIPLEXING APPLICATION: THE TELEPHONE SYSTEM 245

    Common Carrier Services and Hierarchies 245Analog Services 246Digital Services 248

    8.6 DIGITAL SUBSCRIBER LINE (DSL) 254ADSL 254RADSL 255HDSL 256SDSL 256VDSL 256

    8.7 FTTC 257FTTC in the Telephone Network 257FTTC in the Cable TV Network 257

    8.8 KEY TERMS AND CONCEPTS 258 8.9 SUMMARY 259 8.10 PRACTICE SET 261

    Review Questions 261Multiple Choice 262Exercises 266

    Chapter 9 Error Detection and Correction 273 9.1 TYPES OF ERRORS