top-rated free essay

Data Communication

By vairag Apr 18, 2011 6574 Words
for67757_fm.fm Page i Saturday, January 7, 2006 12:00 AM

DATA COMMUNICATIONS AND NETWORKING

for67757_fm.fm Page ii Saturday, January 7, 2006 12:00 AM

McGraw-Hill Forouzan Networking Series

Titles by Behrouz A. Forouzan: Data Communications and Networking TCP/IP Protocol Suite Local Area Networks Business Data Communications

for67757_fm.fm Page iii Saturday, January 7, 2006 12:00 AM

DATA COMMUNICATIONS AND NETWORKING
Fourth Edition

Behrouz A. Forouzan
DeAnza College

with

Sophia Chung Fegan

for67757_fm.fm Page iv Saturday, January 7, 2006 12:00 AM

New copyright page to come

for67757_fm.fm Page v Monday, January 9, 2006 9:14 PM

To my wife, Faezeh, with love Behrouz Forouzan

for67757_fm.fm Page vi Saturday, January 7, 2006 12:00 AM

for67757_fm.fm Page vii Saturday, January 7, 2006 12:00 AM

BRIEF CONTENTS

Preface PART 1

xxix Overview Introduction 1 3 27 55

Chapter 1 Chapter 2 PART 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 PART 3 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18

Network Models

Physical Layer and Media Data and Signals 57 101 141 Digital Transmission Analog Transmission Transmission Media Switching 213

Bandwidth Utilization: Multiplexing and Spreading 191

161

Using Telephone and Cable Networks for Data Transmission 241 Data Link Layer Data Link Control Multiple Access Wireless LANs 265 267 307 395

Error Detection and Correction 363 421

Wired LANs: Ethernet

Connecting LANs, Backbone Networks, and Virtual LANs 445 Wireless WANs: Cellular Telephone and Satellite Networks 467 SONET/SDH 491 517 vii

Virtual-Circuit Networks: Frame Relay and ATM

for67757_fm.fm Page viii Saturday, January 7, 2006 12:00 AM

viii

BRIEF CONTENTS

PART 4 Chapter 19 Chapter 20 Chapter 21 Chapter 22 PART 5 Chapter 23 Chapter 24 PART 6 Chapter 25 Chapter 26 Chapter 27 Chapter 28 Chapter 29 PART 7 Chapter 30 Chapter 31 Chapter 32 Appendix A Appendix B Appendix C Appendix D Appendix E Appendix F Appendix G Appendix H Acronyms Glossary References Index 1111

Network Layer

547 549 579

Network Layer: Logical Addressing Network Layer: Internet Protocol

Network Layer: Address Mapping, Error Reporting, and Multicasting 611 Network Layer: Delivery, Forwarding, and Routing Transport Layer 701 703 761 647

Process-to-Process Delivery: UDP, TCP, and SCTP Congestion Control and Quality of Service Application Layer 795 797

Domain Name System WWW and HTTP Multimedia Security 901 851

Remote Logging, Electronic Mail, and File Transfer Network Management: SNMP 873

817

929 931 961

Cryptography

Network Security

Security in the Internet: IPSec, SSL/TLS, PGP, VPN, and Firewalls 995 Unicode 1029 1037 1043 Numbering Systems Mathematical Review 8B/6T Code 1055 1059 1061 1065 Telephone History Contact Addresses RFCs 1063 UDP and TCP Ports

1067 1071 1107

for67757_fm.fm Page ix Saturday, January 7, 2006 12:00 AM

CONTENTS

Preface

xxix Overview 1 3
3

PART 1

Chapter 1
1.1

Introduction

DATA COMMUNICATIONS
Components 4 Data Representation Data Flow 6 5

1.2

NETWORKS

7

Distributed Processing 7 Network Criteria 7 Physical Structures 8 Network Models 13 Categories of Networks 13 Interconnection of Networks: Internetwork

15

1.3 1.4

THE INTERNET

16 19

A Brief History 17 The Internet Today 17

PROTOCOLS AND STANDARDS
Protocols 19 Standards 19 Standards Organizations Internet Standards 21 20

1.5

RECOMMENDED READING
Books 21 Sites 22 RFCs 22

21

1.6 1.7 1.8

KEY TERMS 22 SUMMARY 23 PRACTICE SET 24
Review Questions 24 Exercises 24 Research Activities 25

Chapter 2
2.1

Network Models
27
28

27

LAYERED TASKS

Sender, Receiver, and Carrier Hierarchy 29

ix

for67757_fm.fm Page x Saturday, January 7, 2006 12:00 AM

x

CONTENTS

2.2

THE OSI MODEL

29

Layered Architecture 30 Peer-to-Peer Processes 30 Encapsulation 33

2.3

LAYERS IN THE OSI MODEL
Physical Layer 33 Data Link Layer 34 Network Layer 36 Transport Layer 37 Session Layer 39 Presentation Layer 39 Application Layer 41 Summary of Layers 42

33

2.4

TCP/IP PROTOCOL SUITE
Physical and Data Link Layers Network Layer 43 Transport Layer 44 Application Layer 45

42
43

2.5

ADDRESSING

45

Physical Addresses 46 Logical Addresses 47 Port Addresses 49 Specific Addresses 50

2.6

RECOMMENDED READING
Books 51 Sites 51 RFCs 51

50

2.7 2.8 2.9

KEY TERMS 51 SUMMARY 52 PRACTICE SET 52
Review Questions 52 Exercises 53 Research Activities 54

PART 2

Physical Layer and Media Data and Signals
57
58

55

Chapter 3
3.1

57

ANALOG AND DIGITAL

Analog and Digital Data 57 Analog and Digital Signals 58 Periodic and Nonperiodic Signals

3.2

PERIODIC ANALOG SIGNALS

59

3.3

Sine Wave 59 Phase 63 Wavelength 64 Time and Frequency Domains 65 Composite Signals 66 Bandwidth 69 DIGITAL SIGNALS 71 Bit Rate 73 Bit Length 73 Digital Signal as a Composite Analog Signal Transmission of Digital Signals 74

74

for67757_fm.fm Page xi Saturday, January 7, 2006 12:00 AM

CONTENTS

xi

3.4

TRANSMISSION IMPAIRMENT
Attenuation 81 Distortion 83 Noise 84

80

3.5

DATA RATE LIMITS

85

Noiseless Channel: Nyquist Bit Rate 86 Noisy Channel: Shannon Capacity 87 Using Both Limits 88

3.6

PERFORMANCE

89

Bandwidth 89 Throughput 90 Latency (Delay) 90 Bandwidth-Delay Product Jitter 94

92

3.7 3.8 3.9 3.10

RECOMMENDED READING
Books 94

94

KEY TERMS 94 SUMMARY 95 PRACTICE SET 96
Review Questions Exercises 96 96

Chapter 4
4.1

Digital Transmission

101
101

DIGITAL-TO-DIGITAL CONVERSION
Line Coding 101 Line Coding Schemes Block Coding 115 Scrambling 118 106

4.2 4.3 4.4 4.5 4.6 4.7

ANALOG-TO-DIGITAL CONVERSION
Pulse Code Modulation (PCM) Delta Modulation (DM) 129 121

120

TRANSMISSION MODES
Parallel Transmission 131 Serial Transmission 132

131 135

RECOMMENDED READING
Books 135

KEY TERMS 135 SUMMARY 136 PRACTICE SET 137
Review Questions Exercises 137 137

Chapter 5
5.1

Analog Transmission

141
141
142

DIGITAL-TO-ANALOG CONVERSION
Aspects of Digital-to-Analog Conversion Amplitude Shift Keying 143 Frequency Shift Keying 146 Phase Shift Keying 148 Quadrature Amplitude Modulation 152

5.2

ANALOG-TO-ANALOG CONVERSION
Amplitude Modulation 153 Frequency Modulation 154 Phase Modulation 155

152

for67757_fm.fm Page xii Saturday, January 7, 2006 12:00 AM

xii

CONTENTS

5.3 5.4 5.5 5.6

RECOMMENDED READING
Books 156

156

KEY TERMS 157 SUMMARY 157 PRACTICE SET 158
Review Questions 158 Exercises 158

Chapter 6
6.1

Bandwidth Utilization: Multiplexing and Spreading 161
161

MULTIPLEXING

Frequency-Division Multiplexing 162 Wavelength-Division Multiplexing 167 Synchronous Time-Division Multiplexing 169 Statistical Time-Division Multiplexing 179

6.2 6.3 6.4 6.5 6.6

SPREAD SPECTRUM

180
181

Frequency Hopping Spread Spectrum (FHSS) Direct Sequence Spread Spectrum 184

RECOMMENDED READING
Books 185

185

KEY TERMS 185 SUMMARY 186 PRACTICE SET 187
Review Questions 187 Exercises 187

Chapter 7
7.1

Transmission Media
192

191

GUIDED MEDIA

Twisted-Pair Cable 193 Coaxial Cable 195 Fiber-Optic Cable 198

7.2

UNGUIDED MEDIA: WIRELESS
Radio Waves 205 Microwaves 206 Infrared 207

203

7.3 7.4 7.5 7.6

RECOMMENDED READING
Books 208

208

KEY TERMS 208 SUMMARY 209 PRACTICE SET 209
Review Questions Exercises 210 209

Chapter 8
8.1

Switching

213
214

CIRCUIT-SWITCHED NETWORKS

Three Phases 217 Efficiency 217 Delay 217 Circuit-Switched Technology in Telephone Networks

218

8.2

DATAGRAM NETWORKS
Routing Table 220

218

for67757_fm.fm Page xiii Saturday, January 7, 2006 12:00 AM

CONTENTS Efficiency 220 Delay 221 Datagram Networks in the Internet

xiii

221

8.3

VIRTUAL-CIRCUIT NETWORKS

221

Addressing 222 Three Phases 223 Efficiency 226 Delay in Virtual-Circuit Networks 226 Circuit-Switched Technology in WANs 227

8.4 8.5 8.6 8.7 8.8

STRUCTURE OF A SWITCH
Structure of Circuit Switches 227 Structure of Packet Switches 232

227 235

RECOMMENDED READING
Books 235

KEY TERMS 235 SUMMARY 236 PRACTICE SET 236
Review Questions Exercises 237 236

Chapter 9
9.1

Using Telephone and Cable Networks for Data Transmission 241 241

TELEPHONE NETWORK

Major Components 241 LATAs 242 Signaling 244 Services Provided by Telephone Networks

247

9.2 9.3

DIAL-UP MODEMS
Modem Standards ADSL 252 ADSL Lite 254 HDSL 255 SDSL 255 VDSL 255 Summary 255 249

248

DIGITAL SUBSCRIBER LINE 251

9.4 9.5

CABLE TV NETWORKS

256
256

Traditional Cable Networks 256 Hybrid Fiber-Coaxial (HFC) Network Bandwidth 257 Sharing 259 CM and CMTS 259 Data Transmission Schemes: DOCSIS

CABLE TV FOR DATA TRANSFER

257

260

9.6 9.7 9.8 9.9

RECOMMENDED READING
Books 261

261

KEY TERMS 261 SUMMARY 262 PRACTICE SET 263
Review Questions Exercises 264 263

for67757_fm.fm Page xiv Saturday, January 7, 2006 12:00 AM

xiv

CONTENTS

PART 3

Data Link Layer

265 267

Chapter 10
10.1

Error Detection and Correction
267

INTRODUCTION

Types of Errors 267 Redundancy 269 Detection Versus Correction 269 Forward Error Correction Versus Retransmission Coding 269 Modular Arithmetic 270

269

10.2

BLOCK CODING

271

Error Detection 272 Error Correction 273 Hamming Distance 274 Minimum Hamming Distance

274

10.3 10.4

LINEAR BLOCK CODES CYCLIC CODES 284

277
278

Minimum Distance for Linear Block Codes Some Linear Block Codes 278 Cyclic Redundancy Check 284 Hardware Implementation 287 Polynomials 291 Cyclic Code Analysis 293 Advantages of Cyclic Codes 297 Other Cyclic Codes 297

10.5

CHECKSUM

298

Idea 298 One’s Complement 298 Internet Checksum 299

10.6 10.7 10.8 10.9

RECOMMENDED READING
Books 301 RFCs 301

301

KEY TERMS 301 SUMMARY 302 PRACTICE SET 303
Review Questions Exercises 303 303

Chapter 11
11.1 11.2 11.3 11.4 11.5 FRAMING

Data Link Control

307

307 311

Fixed-Size Framing 308 Variable-Size Framing 308

FLOW AND ERROR CONTROL
Flow Control 311 Error Control 311 PROTOCOLS 311

NOISELESS CHANNELS
Simplest Protocol 312 Stop-and-Wait Protocol 315

312

NOISY CHANNELS

318

Stop-and-Wait Automatic Repeat Request 318 Go-Back-N Automatic Repeat Request 324

for67757_fm.fm Page xv Saturday, January 7, 2006 12:00 AM

CONTENTS Selective Repeat Automatic Repeat Request Piggybacking 339 332

xv

11.6

HDLC

340
340

Configurations and Transfer Modes Frames 341 Control Field 343

11.7

POINT-TO-POINT PROTOCOL
Framing 348 Transition Phases 349 Multiplexing 350 Multilink PPP 355

346

11.8

RECOMMENDED READING
Books 357

357

11.9 KEY TERMS 357 11.10 SUMMARY 358 11.11 PRACTICE SET 359
Review Questions Exercises 359 359

Chapter 12
12.1

Multiple Access
364

363

RANDOM ACCESS

ALOHA 365 Carrier Sense Multiple Access (CSMA) 370 Carrier Sense Multiple Access with Collision Detection (CSMA/CD) 373 Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) 377

12.2

CONTROLLED ACCESS
Reservation 379 Polling 380 Token Passing 381

379

12.3

CHANNELIZATION

383

Frequency-Division Multiple Access (FDMA) 383 Time-Division Multiple Access (TDMA) 384 Code-Division Multiple Access (CDMA) 385

12.4 12.5 12.6 12.7

RECOMMENDED READING
Books 391

390

KEY TERMS 391 SUMMARY 391 PRACTICE SET 392
Review Questions 392 Exercises 393 Research Activities 394

Chapter 13
13.1 13.2 13.3

Wired LANs: Ethernet
395 397 406

395

IEEE STANDARDS
Data Link Layer 396 Physical Layer 397

STANDARD ETHERNET
MAC Sublayer 398 Physical Layer 402

CHANGES IN THE STANDARD
Bridged Ethernet 406 Switched Ethernet 407 Full-Duplex Ethernet 408

for67757_fm.fm Page xvi Saturday, January 7, 2006 12:00 AM

xvi

CONTENTS

13.4 13.5

FAST ETHERNET
MAC Sublayer 409 Physical Layer 410

409 412

GIGABIT ETHERNET
MAC Sublayer 412 Physical Layer 414 Ten-Gigabit Ethernet 416

13.6 13.7 13.8 13.9

RECOMMENDED READING
Books 417

417

KEY TERMS 417 SUMMARY 417 PRACTICE SET 418
Review Questions Exercises 419 418

Chapter 14
14.1 IEEE 802.11

Wireless LANs
421
428

421

Architecture 421 MAC Sublayer 423 Addressing Mechanism Physical Layer 432

14.2

BLUETOOTH

434

Architecture 435 Bluetooth Layers 436 Radio Layer 436 Baseband Layer 437 L2CAP 440 Other Upper Layers 441

14.3 14.4 14.5 14.6

RECOMMENDED READING
Books 442

441

KEY TERMS 442 SUMMARY 442 PRACTICE SET 443
Review Questions Exercises 443 443

Chapter 15
15.1

Connecting LANs, Backbone Networks, and Virtual LANs 445
445

CONNECTING DEVICES
Passive Hubs 446 Repeaters 446 Active Hubs 447 Bridges 447 Two-Layer Switches 454 Routers 455 Three-Layer Switches 455 Gateway 455

15.2

BACKBONE NETWORKS
Bus Backbone 456 Star Backbone 457 Connecting Remote LANs 457

456

for67757_fm.fm Page xvii Saturday, January 7, 2006 12:00 AM

CONTENTS

xvii

15.3

VIRTUAL LANs 458 Membership 461 Configuration 461 Communication Between Switches IEEE Standard 462 Advantages 463 RECOMMENDED READING Books 463 Site 463

462

15.4 15.5 15.6 15.7

463

KEY TERMS 463 SUMMARY 464 PRACTICE SET 464
Review Questions Exercises 465 464

Chapter 16
16.1

Wireless WANs: Cellular Telephone and Satellite Networks 467 467
467

CELLULAR TELEPHONY
Frequency-Reuse Principle Transmitting 468 Receiving 469 Roaming 469 First Generation 469 Second Generation 470 Third Generation 477

16.2

SATELLITE NETWORKS
Orbits 479 Footprint 480 Three Categories of Satellites GEO Satellites 481 MEO Satellites 481 LEO Satellites 484

478
480

16.3 16.4 16.5 16.6

RECOMMENDED READING
Books 487

487

KEY TERMS 487 SUMMARY 487 PRACTICE SET 488
Review Questions Exercises 488 488

Chapter 17
17.1

SONET/SDH
491

491

ARCHITECTURE
Signals 491 SONET Devices 492 Connections 493

17.2

SONET LAYERS

494

Path Layer 494 Line Layer 495 Section Layer 495 Photonic Layer 495 Device–Layer Relationships

495

for67757_fm.fm Page xviii Saturday, January 7, 2006 12:00 AM

xviii

CONTENTS

17.3

SONET FRAMES

496
496

Frame, Byte, and Bit Transmission STS-1 Frame Format 497 Overhead Summary 501 Encapsulation 501

17.4

STS MULTIPLEXING
Byte Interleaving 504 Concatenated Signal 505 Add/Drop Multiplexer 506

503

17.5

SONET NETWORKS
Linear Networks 507 Ring Networks 509 Mesh Networks 510

507

17.6 17.7

VIRTUAL TRIBUTARIES
Types of VTs Books 513 512

512 513

RECOMMENDED READING

17.8 KEY TERMS 513 17.9 SUMMARY 514 17.10 PRACTICE SET 514
Review Questions Exercises 515 514

Chapter 18
18.1

Virtual-Circuit Networks: Frame Relay and ATM
517

517

FRAME RELAY

Architecture 518 Frame Relay Layers 519 Extended Address 521 FRADs 522 VOFR 522 LMI 522 Congestion Control and Quality of Service

522

18.2

ATM

523

Design Goals 523 Problems 523 Architecture 526 Switching 529 ATM Layers 529 Congestion Control and Quality of Service

535

18.3

ATM LANs

536

ATM LAN Architecture 536 LAN Emulation (LANE) 538 Client/Server Model 539 Mixed Architecture with Client/Server

540

18.4 18.5 18.6 18.7

RECOMMENDED READING
Books 541

540

KEY TERMS 541 SUMMARY 541 PRACTICE SET 543
Review Questions Exercises 543 543

for67757_fm.fm Page xix Saturday, January 7, 2006 12:00 AM

CONTENTS

xix

PART 4

Network Layer

547 549

Chapter 19
19.1

Network Layer: Logical Addressing
549

IPv4 ADDRESSES

Address Space 550 Notations 550 Classful Addressing 552 Classless Addressing 555 Network Address Translation (NAT)

563

19.2 19.3

IPv6 ADDRESSES
Structure 567 Address Space 568

566 572

RECOMMENDED READING
Books 572 Sites 572 RFCs 572

19.4 19.5 19.6

KEY TERMS 572 SUMMARY 573 PRACTICE SET 574
Review Questions 574 Exercises 574 Research Activities 577

Chapter 20
20.1

Network Layer: Internet Protocol
579

579

INTERNETWORKING

Need for Network Layer 579 Internet as a Datagram Network 581 Internet as a Connectionless Network 582

20.2

IPv4

582

Datagram 583 Fragmentation 589 Checksum 594 Options 594

20.3

IPv6

596

Advantages 597 Packet Format 597 Extension Headers 602

20.4

TRANSITION FROM IPv4 TO IPv6
Dual Stack 604 Tunneling 604 Header Translation 605

603

20.5

RECOMMENDED READING
Books 606 Sites 606 RFCs 606

605

20.6 20.7 20.8

KEY TERMS 606 SUMMARY 607 PRACTICE SET 607
Review Questions 607 Exercises 608 Research Activities 609

for67757_fm.fm Page xx Saturday, January 7, 2006 12:00 AM

xx

CONTENTS

Chapter 21
21.1 21.2

Network Layer: Address Mapping, Error Reporting, and Multicasting 611 611
618

ADDRESS MAPPING ICMP 621

Mapping Logical to Physical Address: ARP 612 Mapping Physical to Logical Address: RARP, BOOTP, and DHCP Types of Messages 621 Message Format 621 Error Reporting 622 Query 625 Debugging Tools 627

21.3

IGMP

630

Group Management 630 IGMP Messages 631 Message Format 631 IGMP Operation 632 Encapsulation 635 Netstat Utility 637

21.4 21.5

ICMPv6

638
638

Error Reporting Query 639 Books 641 Site 641 RFCs 641

RECOMMENDED READING

640

21.6 21.7 21.8

KEY TERMS 641 SUMMARY 642 PRACTICE SET 643
Review Questions 643 Exercises 644 Research Activities 645

Chapter 22
22.1 22.2 DELIVERY

Network Layer: Delivery, Forwarding, and Routing 647
647
647

Direct Versus Indirect Delivery

FORWARDING

648

Forwarding Techniques 648 Forwarding Process 650 Routing Table 655

22.3

UNICAST ROUTING PROTOCOLS
Optimization 658 Intra- and Interdomain Routing Distance Vector Routing 660 Link State Routing 666 Path Vector Routing 674 659

658

22.4

MULTICAST ROUTING PROTOCOLS
Unicast, Multicast, and Broadcast Applications 681 Multicast Routing 682 Routing Protocols 684 678

678

for67757_fm.fm Page xxi Saturday, January 7, 2006 12:00 AM

CONTENTS

xxi

22.5

RECOMMENDED READING
Books 694 Sites 694 RFCs 694

694

22.6 22.7 22.8

KEY TERMS 694 SUMMARY 695 PRACTICE SET 697
Review Questions 697 Exercises 697 Research Activities 699

PART 5

Transport Layer

701

Chapter 23
23.1

Process-to-Process Delivery: UDP, TCP, and SCTP 703
703
707

PROCESS-TO-PROCESS DELIVERY

Client/Server Paradigm 704 Multiplexing and Demultiplexing 707 Connectionless Versus Connection-Oriented Service Reliable Versus Unreliable 708 Three Protocols 708

23.2

USER DATAGRAM PROTOCOL (UDP)
Well-Known Ports for UDP User Datagram 710 Checksum 711 UDP Operation 713 Use of UDP 715 709

709

23.3

TCP

715

TCP Services 715 TCP Features 719 Segment 721 A TCP Connection 723 Flow Control 728 Error Control 731 Congestion Control 735

23.4

SCTP

736

SCTP Services 736 SCTP Features 738 Packet Format 742 An SCTP Association 743 Flow Control 748 Error Control 751 Congestion Control 753

23.5

RECOMMENDED READING
Books 753 Sites 753 RFCs 753

753

23.6 23.7 23.8

KEY TERMS 754 SUMMARY 754 PRACTICE SET 756
Review Questions 756 Exercises 757 Research Activities 759

for67757_fm.fm Page xxii Saturday, January 7, 2006 12:00 AM

xxii

CONTENTS

Chapter 24
24.1 24.2 24.3 24.4 24.5 24.6

Congestion Control and Quality of Service
761

761

DATA TRAFFIC

Traffic Descriptor 761 Traffic Profiles 762

CONGESTION 763
Network Performance 764

CONGESTION CONTROL TWO EXAMPLES 768

765

Open-Loop Congestion Control 766 Closed-Loop Congestion Control 767 Congestion Control in TCP 769 Congestion Control in Frame Relay

773

QUALITY OF SERVICE
Flow Characteristics Flow Classes 776 775

775 776

TECHNIQUES TO IMPROVE QoS
Scheduling 776 Traffic Shaping 777 Resource Reservation 780 Admission Control 780

24.7

INTEGRATED SERVICES

780

Signaling 781 Flow Specification 781 Admission 781 Service Classes 781 RSVP 782 Problems with Integrated Services

784

24.8 24.9

DIFFERENTIATED SERVICES
DS Field 785

785 786

QoS IN SWITCHED NETWORKS
QoS in Frame Relay QoS in ATM 789 Books 791 787

24.10 RECOMMENDED READING 24.11 KEY TERMS 791 24.12 SUMMARY 791 24.13 PRACTICE SET 792 Review Questions Exercises 793 792

790

PART 6

Application Layer

795 797

Chapter 25
25.1 25.2

Domain Name System

NAME SPACE 798 Flat Name Space 798 Hierarchical Name Space 798 DOMAIN NAME SPACE Label 799 Domain Name Domain 801 799

799

for67757_fm.fm Page xxiii Saturday, January 7, 2006 12:00 AM

CONTENTS

xxiii

25.3

DISTRIBUTION OF NAME SPACE
Hierarchy of Name Servers 802 Zone 802 Root Server 803 Primary and Secondary Servers 803

801

25.4

DNS IN THE INTERNET
Generic Domains 804 Country Domains 805 Inverse Domain 805

803

25.5

RESOLUTION

806

Resolver 806 Mapping Names to Addresses 807 Mapping Address to Names 807 Recursive Resolution 808 Iterative Resolution 808 Caching 808

25.6 25.7 25.8 25.9 25.10 25.11

DNS MESSAGES
Header 809 Question Record 811 Resource Record 811

809 811

TYPES OF RECORDS

REGISTRARS 811 DYNAMIC DOMAIN NAME SYSTEM (DDNS) ENCAPSULATION 812 RECOMMENDED READING 812 Books 813 Sites 813 RFCs 813

812

25.12 KEY TERMS 813 25.13 SUMMARY 813 25.14 PRACTICE SET 814 Review Questions Exercises 815 814

Chapter 26
26.1 26.2
TELNET 817

Remote Logging, Electronic Mail, and File Transfer 817
817 824

REMOTE LOGGING ELECTRONIC MAIL

Architecture 824 User Agent 828 Message Transfer Agent: SMTP 834 Message Access Agent: POP and IMAP Web-Based Mail 839

837

26.3 26.4

FILE TRANSFER

840
840

File Transfer Protocol (FTP) Anonymous FTP 844 Books 845 Sites 845 RFCs 845

RECOMMENDED READING

845

26.5 26.6

KEY TERMS 845 SUMMARY 846

for67757_fm.fm Page xxiv Saturday, January 7, 2006 12:00 AM

xxiv

CONTENTS

26.7

PRACTICE SET

847

Review Questions 847 Exercises 848 Research Activities 848

Chapter 27
27.1

WWW and HTTP
851
853

851

ARCHITECTURE

Client (Browser) 852 Server 852 Uniform Resource Locator Cookies 853

27.2

WEB DOCUMENTS

854

Static Documents 855 Dynamic Documents 857 Active Documents 860

27.3

HTTP

861
868

HTTP Transaction 861 Persistent Versus Nonpersistent Connection Proxy Server 868

27.4

RECOMMENDED READING
Books 869 Sites 869 RFCs 869

869

27.5 27.6 27.7

KEY TERMS 869 SUMMARY 870 PRACTICE SET 871
Review Questions Exercises 871 871

Chapter 28
28.1

Network Management: SNMP
873

873

NETWORK MANAGEMENT SYSTEM
Configuration Management 874 Fault Management 875 Performance Management 876 Security Management 876 Accounting Management 877

28.2

SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP)
Concept 877 Management Components 878 Structure of Management Information 881 Management Information Base (MIB) 886 Lexicographic Ordering 889 SNMP 891 Messages 893 UDP Ports 895 Security 897

877

28.3

RECOMMENDED READING
Books 897 Sites 897 RFCs 897

897

28.4 28.5

KEY TERMS 897 SUMMARY 898

for67757_fm.fm Page xxv Saturday, January 7, 2006 12:00 AM

CONTENTS

xxv

28.6

PRACTICE SET
Review Questions Exercises 899

899
899

Chapter 29
29.1 29.2 29.3

Multimedia

901
902 903 908

DIGITIZING AUDIO AND VIDEO
Digitizing Audio 902 Digitizing Video 902

AUDIO AND VIDEO COMPRESSION
Audio Compression 903 Video Compression 904

STREAMING STORED AUDIO/VIDEO

First Approach: Using a Web Server 909 Second Approach: Using a Web Server with Metafile 909 Third Approach: Using a Media Server 910 Fourth Approach: Using a Media Server and RTSP 911

29.4 29.5 29.6 29.7

STREAMING LIVE AUDIO/VIDEO 912 REAL-TIME INTERACTIVE AUDIO/VIDEO Characteristics 912 917

912

RTP RTCP

916 919

RTP Packet Format UDP Port 919

Sender Report 919 Receiver Report 920 Source Description Message 920 Bye Message 920 Application-Specific Message 920 UDP Port 920

29.8 29.9

VOICE OVER IP
SIP 920 H.323 923

920 925

RECOMMENDED READING
Books 925 Sites 925

29.10 KEY TERMS 925 29.11 SUMMARY 926 29.12 PRACTICE SET 927 Review Questions 927 Exercises 927 Research Activities 928

PART 7

Security

929 931

Chapter 30
30.1 30.2

Cryptography
931

INTRODUCTION
Definitions 931 Two Categories 932

SYMMETRIC-KEY CRYPTOGRAPHY
Traditional Ciphers 935 Simple Modern Ciphers 938

935

for67757_fm.fm Page xxvi Saturday, January 7, 2006 12:00 AM

xxvi

CONTENTS Modern Round Ciphers 940 Mode of Operation 945

30.3 30.4 30.5 30.6 30.7

ASYMMETRIC-KEY CRYPTOGRAPHY
RSA 949 Diffie-Hellman Books 956 952

949

RECOMMENDED READING KEY TERMS 956 SUMMARY 957 PRACTICE SET 958 Review Questions 958 Exercises 959 Research Activities 960

956

Chapter 31
31.1

Network Security
961

961

SECURITY SERVICES

Message Confidentiality 962 Message Integrity 962 Message Authentication 962 Message Nonrepudiation 962 Entity Authentication 962

31.2 31.3

MESSAGE CONFIDENTIALITY MESSAGE INTEGRITY 964

962

Confidentiality with Symmetric-Key Cryptography 963 Confidentiality with Asymmetric-Key Cryptography 963 Document and Fingerprint 965 Message and Message Digest 965 Difference 965 Creating and Checking the Digest 966 Hash Function Criteria 966 Hash Algorithms: SHA-1 967

31.4 31.5

MESSAGE AUTHENTICATION
MAC 969

969

DIGITAL SIGNATURE
Comparison 971 Need for Keys 972 Process 973 Services 974 Signature Schemes 976

971

31.6 31.7 31.8

ENTITY AUTHENTICATION
Passwords 976 Challenge-Response 978

976

KEY MANAGEMENT

981 990

Symmetric-Key Distribution 981 Public-Key Distribution 986

RECOMMENDED READING
Books 990

31.9 KEY TERMS 990 31.10 SUMMARY 991 31.11 PRACTICE SET 992
Review Questions 992 Exercises 993 Research Activities 994

for67757_fm.fm Page xxvii Saturday, January 7, 2006 12:00 AM

CONTENTS

xxvii

Chapter 32
32.1

Security in the Internet: IPSec, SSL/TLS, PGP, VPN, and Firewalls 995 996

IPSecurity (IPSec)

Two Modes 996 Two Security Protocols 998 Security Association 1002 Internet Key Exchange (IKE) 1004 Virtual Private Network 1004

32.2

SSL/TLS

1008

SSL Services 1008 Security Parameters 1009 Sessions and Connections 1011 Four Protocols 1012 Transport Layer Security 1013

32.3

PGP

1014

Security Parameters 1015 Services 1015 A Scenario 1016 PGP Algorithms 1017 Key Rings 1018 PGP Certificates 1019

32.4 32.5 32.6 32.7 32.8

FIREWALLS

1021 1024

Packet-Filter Firewall 1022 Proxy Firewall 1023

RECOMMENDED READING
Books 1024

KEY TERMS 1024 SUMMARY 1025 PRACTICE SET 1026
Review Questions Exercises 1026 1026

Appendix A
A.1 UNICODE

Unicode

1029

1029

Planes 1030 Basic Multilingual Plane (BMP) 1030 Supplementary Multilingual Plane (SMP) 1032 Supplementary Ideographic Plane (SIP) 1032 Supplementary Special Plane (SSP) 1032 Private Use Planes (PUPs) 1032

A.2

ASCII

1032
1036

Some Properties of ASCII

Appendix B
B.1 B.2
Weights 1038

Numbering Systems
1037

1037

BASE 10: DECIMAL BASE 2: BINARY
Weights 1038 Conversion 1038

1038

for67757_fm.fm Page xxviii Saturday, January 7, 2006 12:00 AM

xxviii

CONTENTS

B.3

BASE 16: HEXADECIMAL
Weights 1039 Conversion 1039 A Comparison 1040

1039

B.4 B.5

BASE 256: IP ADDRESSES
Weights 1040 Conversion 1040

1040

OTHER CONVERSIONS

1041

Binary and Hexadecimal 1041 Base 256 and Binary 1042

Appendix C
C.1

Mathematical Review
1043

1043

TRIGONOMETRIC FUNCTIONS
Sine Wave 1043 Cosine Wave 1045 Other Trigonometric Functions 1046 Trigonometric Identities 1046

C.2 C.3

FOURIER ANALYSIS
Fourier Series 1046 Fourier Transform 1048

1046 1050

EXPONENT AND LOGARITHM
Exponential Function 1050 Logarithmic Function 1051

Appendix D Appendix E

8B/6T Code

1055 1059

Telephone History
1059

Before 1984 1059 Between 1984 and 1996 After 1996 1059

Appendix F Appendix G Appendix H Acronyms Glossary References Index 1111 1067 1071 1107

Contact Addresses RFCs 1063 UDP and TCP Ports

1061 1065

for67757_fm.fm Page xxix Saturday, January 7, 2006 12:00 AM

Preface

Data communications and networking may be the fastest growing technologies in our culture today. One of the ramifications of that growth is a dramatic increase in the number of professions where an understanding of these technologies is essential for success— and a proportionate increase in the number and types of students taking courses to learn about them.

Features of the Book
Several features of this text are designed to make it particularly easy for students to understand data communications and networking. Structure We have used the five-layer Internet model as the framework for the text not only because a thorough understanding of the model is essential to understanding most current networking theory but also because it is based on a structure of interdependencies: Each layer builds upon the layer beneath it and supports the layer above it. In the same way, each concept introduced in our text builds upon the concepts examined in the previous sections. The Internet model was chosen because it is a protocol that is fully implemented. This text is designed for students with little or no background in telecommunications or data communications. For this reason, we use a bottom-up approach. With this approach, students learn first about data communications (lower layers) before learning about networking (upper layers). Visual Approach The book presents highly technical subject matter without complex formulas by using a balance of text and figures. More than 700 figures accompanying the text provide a visual and intuitive opportunity for understanding the material. Figures are particularly important in explaining networking concepts, which are based on connections and transmission. Both of these ideas are easy to grasp visually. Highlighted Points We emphasize important concepts in highlighted boxes for quick reference and immediate attention. xxix

for67757_fm.fm Page xxx Monday, January 9, 2006 12:10 PM

xxx

PREFACE

Examples and Applications When appropriate, we have selected examples to reflect true-to-life situations. For example, in Chapter 6 we have shown several cases of telecommunications in current telephone networks. Recommended Reading Each chapter includes a list of books and sites that can be used for further reading. Key Terms Each chapter includes a list of key terms for the student. Summary Each chapter ends with a summary of the material covered in that chapter. The summary provides a brief overview of all the important points in the chapter. Practice Set Each chapter includes a practice set designed to reinforce and apply salient concepts. It consists of three parts: review questions, exercises, and research activities (only for appropriate chapters). Review questions are intended to test the student's first-level understanding of the material presented in the chapter. Exercises require deeper understanding of the material. Research activities are designed to create motivation for further study. Appendixes The appendixes are intended to provide quick reference material or a review of materials needed to understand the concepts discussed in the book. Glossary and Acronyms The book contains an extensive glossary and a list of acronyms.

Changes in the Fourth Edition
The Fourth Edition has major changes from the Third Edition, both in the organization and in the contents. Organization The following lists the changes in the organization of the book: 1. Chapter 6 now contains multiplexing as well as spreading. 2. Chapter 8 is now totally devoted to switching. 3. The contents of Chapter 12 are moved to Chapter 11. 4. Chapter 17 covers SONET technology. 5. Chapter 19 discusses IP addressing. 6. Chapter 20 is devoted to the Internet Protocol. 7. Chapter 21 discusses three protocols: ARP, ICMP, and IGMP. 8. Chapter 28 is new and devoted to network management in the Internet. 9. The previous Chapters 29 to 31 are now Chapters 30 to 32.

for67757_fm.fm Page xxxi Saturday, January 7, 2006 12:00 AM

PREFACE

xxxi

Contents We have revised the contents of many chapters including the following: 1. The contents of Chapters 1 to 5 are revised and augmented. Examples are added to clarify the contents. 2. The contents of Chapter 10 are revised and augmented to include methods of error detection and correction. 3. Chapter 11 is revised to include a full discussion of several control link protocols. 4. Delivery, forwarding, and routing of datagrams are added to Chapter 22. 5. The new transport protocol, SCTP, is added to Chapter 23. 6. The contents of Chapters 30, 31, and 32 are revised and augmented to include additional discussion about security issues and the Internet. 7. New examples are added to clarify the understanding of concepts. End Materials 1. A section is added to the end of each chapter listing additional sources for study. 2. The review questions are changed and updated. 3. The multiple-choice questions are moved to the book site to allow students to self-test their knowledge about the contents of the chapter and receive immediate feedback. 4. Exercises are revised and new ones are added to the appropriate chapters. 5. Some chapters contain research activities. Instructional Materials Instructional materials for both the student and the teacher are revised and augmented. The solutions to exercises contain both the explanation and answer including full colored figures or tables when needed. The Powerpoint presentations are more comprehensive and include text and figures.

Contents
The book is divided into seven parts. The first part is an overview; the last part concerns network security. The middle five parts are designed to represent the five layers of the Internet model. The following summarizes the contents of each part. Part One: Overview The first part gives a general overview of data communications and networking. Chapter 1 covers introductory concepts needed for the rest of the book. Chapter 2 introduces the Internet model. Part Two: Physical Layer The second part is a discussion of the physical layer of the Internet model. Chapters 3 to 6 discuss telecommunication aspects of the physical layer. Chapter 7 introduces the transmission media, which, although not part of the physical layer, is controlled by it. Chapter 8 is devoted to switching, which can be used in several layers. Chapter 9 shows how two public networks, telephone and cable TV, can be used for data transfer.

for67757_fm.fm Page xxxii Saturday, January 7, 2006 12:00 AM

xxxii

PREFACE

Part Three: Data Link Layer The third part is devoted to the discussion of the data link layer of the Internet model. Chapter 10 covers error detection and correction. Chapters 11, 12 discuss issues related to data link control. Chapters 13 through 16 deal with LANs. Chapters 17 and 18 are about WANs. LANs and WANs are examples of networks operating in the first two layers of the Internet model. Part Four: Network Layer The fourth part is devoted to the discussion of the network layer of the Internet model. Chapter 19 covers IP addresses. Chapters 20 and 21 are devoted to the network layer protocols such as IP, ARP, ICMP, and IGMP. Chapter 22 discusses delivery, forwarding, and routing of packets in the Internet. Part Five: Transport Layer The fifth part is devoted to the discussion of the transport layer of the Internet model. Chapter 23 gives an overview of the transport layer and discusses the services and duties of this layer. It also introduces three transport-layer protocols: UDP, TCP, and SCTP. Chapter 24 discusses congestion control and quality of service, two issues related to the transport layer and the previous two layers. Part Six: Application Layer The sixth part is devoted to the discussion of the application layer of the Internet model. Chapter 25 is about DNS, the application program that is used by other application programs to map application layer addresses to network layer addresses. Chapter 26 to 29 discuss some common applications protocols in the Internet. Part Seven: Security The seventh part is a discussion of security. It serves as a prelude to further study in this subject. Chapter 30 briefly discusses cryptography. Chapter 31 introduces security aspects. Chapter 32 shows how different security aspects can be applied to three layers of the Internet model.

Online Learning Center
The McGraw-Hill Online Learning Center contains much additional material. Available at www.mhhe.com/forouzan. As students read through Data Communications and Networking, they can go online to take self-grading quizzes. They can also access lecture materials such as PowerPoint slides, and get additional review from animated figures from the book. Selected solutions are also available over the Web. The solutions to odd-numbered problems are provided to students, and instructors can use a password to access the complete set of solutions. Additionally, McGraw-Hill makes it easy to create a website for your networking course with an exclusive McGraw-Hill product called PageOut. It requires no prior knowledge of HTML, no long hours, and no design skills on your part. Instead, PageOut offers a series of templates. Simply fill them with your course information and

for67757_fm.fm Page xxxiii Monday, January 9, 2006 9:14 PM

PREFACE

xxxiii

click on one of 16 designs. The process takes under an hour and leaves you with a professionally designed website. Although PageOut offers “instant” development, the finished website provides powerful features. An interactive course syllabus allows you to post content to coincide with your lectures, so when students visit your PageOut website, your syllabus will direct them to components of Forouzan’s Online Learning Center, or specific material of your own.

How to Use the Book
This book is written for both an academic and a professional audience. The book can be used as a self-study guide for interested professionals. As a textbook, it can be used for a one-semester or one-quarter course. The following are some guidelines.

❏ Parts one to three are strongly recommended. ❏ Parts four to six can be covered if there is no following course in TCP/IP protocol. ❏ Part seven is recommended if there is no following course in network security. Acknowledgments It is obvious that the development of a book of this scope needs the support of many people. Peer Review The most important contribution to the development of a book such as this comes from peer reviews. We cannot express our gratitude in words to the many reviewers who spent numerous hours reading the manuscript and providing us with helpful comments and ideas. We would especially like to acknowledge the contributions of the following reviewers for the third and fourth editions of this book. Farid Ahmed, Catholic University Kaveh Ashenayi, University of Tulsa Yoris Au, University of Texas, San Antonio Essie Bakhtiar, Clayton College & State University Anthony Barnard, University of Alabama, Brimingham A.T. Burrell, Oklahoma State University Scott Campbell, Miami University Teresa Carrigan, Blackburn College Hwa Chang, Tufts University Edward Chlebus, Illinois Institute of Technology Peter Cooper, Sam Houston State University Richard Coppins, Virginia Commonwealth University Harpal Dhillon, Southwestern Oklahoma State University Hans-Peter Dommel, Santa Clara University M. Barry Dumas, Baruch College, CUNY William Figg, Dakota State University Dale Fox, Quinnipiac University Terrence Fries, Coastal Carolina University Errin Fulp, Wake Forest University

for67757_fm.fm Page xxxiv Monday, January 9, 2006 9:14 PM

xxxiv

PREFACE

Sandeep Gupta, Arizona State University George Hamer, South Dakota State University James Henson, California State University, Fresno Tom Hilton, Utah State University Allen Holliday, California State University, Fullerton Seyed Hossein Hosseini, University of Wisconsin, Milwaukee Gerald Isaacs, Carroll College, Waukesha Hrishikesh Joshi, DeVry University E.S. Khosravi, Southern University Bob Kinicki, Worcester Polytechnic University Kevin Kwiat, Hamilton College Ten-Hwang Lai, Ohio State University Chung-Wei Lee, Auburn University Ka-Cheong Leung, Texas Tech University Gertrude Levine, Fairleigh Dickinson University Alvin Sek See Lim, Auburn University Charles Liu, California State University, Los Angeles Wenhang Liu, California State University, Los Angeles Mark Llewellyn, University of Central Florida Sanchita Mal-Sarkar, Cleveland State University Louis Marseille, Harford Community College Kevin McNeill, University of Arizona Arnold C. Meltzer, George Washington University Rayman Meservy, Brigham Young University Prasant Mohapatra, University of California, Davis Hung Z Ngo, SUNY, Buffalo Larry Owens, California State University, Fresno Arnold Patton, Bradley University Dolly Samson, Hawaii Pacific University Joseph Sherif, California State University, Fullerton Robert Simon, George Mason University Ronald J. Srodawa, Oakland University Daniel Tian, California State University, Monterey Bay Richard Tibbs, Radford University Christophe Veltsos, Minnesota State University, Mankato Yang Wang, University of Maryland, College Park Sherali Zeadally, Wayne State University McGraw-Hill Staff Special thanks go to the staff of McGraw-Hill. Alan Apt, our publisher, proved how a proficient publisher can make the impossible possible. Rebecca Olson, the developmental editor, gave us help whenever we needed it. Sheila Frank, our project manager, guided us through the production process with enormous enthusiasm. We also thank David Hash in design, Kara Kudronowicz in production, and Patti Scott, the copy editor.

Cite This Document

Related Documents

  • Adv and Disadvantage of communication sysytem

    ...analog and digital technologies is that in analog technology, information is translated into electric pulses of varying amplitude. In digital technology, translation of information is into binary format (zero or one) where each bit is representative of two distinct amplitudes. Differences in Usage in Equipment : Many devices come with buil...

    Read More
  • The Internet and Contemporary Business Environments: Connectivity, Connectedness, and Communication

    ...The Internet and Contemporary Business Environments: Connectivity, Connectedness, and Communication Kenneth Joe Galloway KGSUPPORT 05-03-2014 The Internet and Contemporary Business Environments: Connectivity, Connectedness, and Communication Contents The Internet and Contemporary Business Environments: Connectivity, Connectednes...

    Read More
  • The four V's of Big Data

    ...The four V’s of volume, velocity, variety and veracity are commonly used to characterise different aspects of big data. Discuss. Big data refers to datasets whose size is beyond the ability of typical database software tools to capture, store, manage, and analyze. We assume that, as technology advances over time, the size of dataset...

    Read More
  • Data Collection

    ... Data Collection QNT/351 June 30, 2014 Data Collection In the hospitality business, employee retention and low turnover is of utmost importance. Employees are the foundation of any successful operation. Employees provide direct communication with customers, support organizational initiatives, boost profit, curb losses, and build future suc...

    Read More
  • What is Data

    ...Department of Economics Course of study: MBA Course Title: Marketing Research Course code: MBA 763 Assignment: Secondary Data Mat Number: 74168 Name: Abiona Timothy Olufemi What is Data Data is a collection of facts, such as numbers, words, measurements, observations or even just descriptions of things. 1.Information in raw or unorganized f...

    Read More
  • Big Data

    ...importance of using Big Data which companies are easily able to collect from their businesses, customers and employees. It explains the numerous advantages of using the data collected by companies effectively so that it can be used by the company in improving its efficiencies, sales, faster and quicker turnaround which in turn would lead to incr...

    Read More
  • Data Security

    ...Module 5 Data Security What is a computer security risk? A computer security risk is any event or action that could cause loss of or damage to computer hardware, software, data, information, or processing capability. Some breaches to computer security are accidental, others are planned intrusions. Some intruders do no damage; they mer...

    Read More
  • Data Interpretation

    ...Interpreting your data is a process that involves answering a series of questions about the research. We suggest the following steps: 1) Review and interpret the data "in-house" to develop preliminary findings, conclusions, and recommendations. 2) Review the data and your interpretation of it with an advisory group or technical committee....

    Read More

Discover the Best Free Essays on StudyMode

Conquer writer's block once and for all.

High Quality Essays

Our library contains thousands of carefully selected free research papers and essays.

Popular Topics

No matter the topic you're researching, chances are we have it covered.