• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
data communications and networking by behrouz a.forouzan

data communications and networking by behrouz a.forouzan



Data communications and networking by behrouz a.forouzan (4th Edition)

Data communications and networking by behrouz a.forouzan (4th Edition)



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds


Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    data communications and networking by behrouz a.forouzan data communications and networking by behrouz a.forouzan Document Transcript

    • Dont forget to check out the Online Learning Center, www.mhhe.com/forouzan foradditional resources!Instructors and students using Data Communications and Networking, Fourth Editionby Behrouz A. Forouzan will find a wide variety of resources available at the OnlineLearning Center, www.mhhe.comlforouzanInstructor ResourcesInstructors can access the following resources by contacting their McGraw-Hill Repre-sentative for a secure password.a PowerPoint Slides. Contain figures, tables, highlighted points, and brief descriptionsof each section.o Complete Solutions Manual. Password-protected solutions to all end-of-chapterproblems are provided.a Pageout. A free tool that helps you create your own course website.D Instructor Message Board. Allows you to share ideas with other instructorsusing the text.Student ResourcesThe student resources are available to those students using the book. Once you haveaccessed the Online Learning Center, click on "Student Resources," then select a chap-ter from the drop down menu that appears. Each chapter has a wealth of materials tohelp you review communications and networking concepts. Included are:a Chapter Summaries. Bulleted summary points provide an essential review ofmajor ideas and concepts covered in each chapter.a Student Solutions Manual. Contains answers for odd-numbered problems.o Glossary. Defines key terms presented in the book.o Flashcards. Facilitate learning through practice and review.a Animated Figures. Visual representations model key networking concepts, bringingthem to life.D Automated Quizzes. Easy-to-use quizzes strengthen learning and emphasize impor-tant ideas from the book.a Web links. Connect students to additional resources available online.
    • McGraw-Hill Forouzan Networking SeriesTitles by Behrouz A. Forouzan:Data Communications and NetworkingTCPflP Protocol SuiteLocal Area NetworksBusiness Data Communications
    • DATACOMMUNICATIONSANDNETWORKINGFourth EditionBehrouz A. ForouzanDeAnza CollegewithSophia Chung Fegan• Higher EducationBoston Burr Ridge, IL Dubuque, IA Madison, WI New York San Francisco S1. LouisBangkok Bogota Caracas Kuala Lumpur Lisbon London Madrid Mexico CityMilan Montreal New Delhi Santiago Seoul Singapore Sydney Taipei Toronto
    • The McGraw·HiII Companies .~IIIHigher EducationDATA COMMUNICATIONS AND NETWORKING, FOURTH EDITIONPublished by McGraw-Hill, a business unit of The McGraw-Hill Companies. Inc., 1221 Avenueof the Americas, New York, NY 10020. Copyright © 2007 by The McGraw-Hill Companies, Inc.AlI rights reserved. No part of this publication may be reproduced or distributed in any form orby any means, or stored in a database or retrieval system, without the prior written consent ofThe McGraw-Hill Companies, Inc., including, but not limited to, in any network or otherelectronic storage or transmission, or broadcast for distance learning.Some ancillaries, including electronic and print components, may not be available to customersoutside the United States.This book is printed on acid-free paper.1234567890DOC/DOC09876ISBN-13 978-0-07-296775-3ISBN-to 0-07-296775-7Publisher: Alan R. AptDevelopmental Editor: Rebecca OlsonExecutive Marketing Manager: Michael WeitzSenior Project Manager: Sheila M. FrankSenior Production Supervisor: Kara KudronowiczSenior Media Project Manager: Jodi K. BanowetzAssociate Media Producer: Christina NelsonSenior Designer: David W HashCover Designer: Rokusek Design(USE) Cover Image: Women ascending Mount McKinley, Alaska. Mount McKinley (Denali)12,000 feet, ©Allan Kearney/Getty ImagesCompositor: Interactive Composition CorporationTypeface: 10/12 Times RomanPrinter: R. R. Donnelley Crawfordsville, INLibrary of Congress Cataloging-in~Publication DataForouzan, Behrouz A.Data communications and networking I Behrouz A Forouzan. - 4th ed.p. em. - (McGraw-HilI Forouzan networking series)Includes index.ISBN 978-0-07-296775-3 - ISBN 0-07-296775-7 (hard eopy : alk. paper)1. Data transmission systems. 2. Computer networks. I. Title. II. Series.TK5105.F6617004.6--dc22www.mhhe.com20072006000013CIP
    • To lny wife, Faezeh, with loveBehrouz Forouzan
    • Preface XXlXPART 1 Overview 1Chapter 1 Introduction 3Chapter 2 Network Models 27PART 2Chapter 3Chapter 4Chapter 5Chapter 6Chapter 7Chapter 8Chapter 9PART 3Chapter 10Chapter 11Chapter 12Chapter 13Chapter 14Chapter 15Chapter 16Chapter 17Chapter 18Physical Layer and Media 55Data and Signals 57Digital Transmission 101Analog Transmission 141Bandwidth Utilization: Multiplexing and Spreading 161Transmission Media 191Switching 213Using Telephone and Cable Networksfor Data Transmission 241Data Link Layer 265Error Detection and Correction 267Data Link Control 307Multiple Access 363Wired LANs: Ethernet 395Wireless LANs 421Connecting LANs, Backbone Networks, and Virtual LANs 445Wireless WANs: Cellular Telephone and Satellite Networks 467SONETISDH 491Virtual-Circuit Nenvorks: Frame Relay andATM 517vii
    • viii BRIEF CONTENTSPART 4Chapter 19Chapter 20Chapter 21Chapter 22PARTSChapter 23Chapter 24PART 6Chapter 25Chapter 26Chapter 27Chapter 28Chapter 29Network Layer 547Netvvork Layer: Logical Addressing 549Netvvork Layer: Internet Protocol 579Netl,vork La.ver: Address Mapping, Error Reporting,and Multicasting 611Network Layer: Delivery, Fonvarding, and Routing 647Transport Layer 701Process-to-Process Delivery: UDp, TCP, and SCTP 703Congestion Control and Quality qlSenice 761Application Layer 795Domain Name System 797Remote Logging, Electronic Mail, and File Transfer 817WWW and HTTP 851Network Management: SNMP 873Multimedia 901PART 7 Security 929Chapter 30 Cf}1Jtography 931Chapter 31 Network Security 961Chapter 32 Securit} in the Internet: IPSec, SSLlTLS, PCp, VPN,and Firewalls 995Appendix A Unicode 1029Appendix B Numbering Systems 1037Appendix C Mathematical Review 1043Appendix D 8B/6T Code 1055Appendix E Telephone History 1059Appendix F Co!1tact Addresses 1061Appendix G RFCs 1063Appendix H UDP and TCP Ports 1065Acron.Vl11s 1067ClOSSOlY 1071References 1107Index IIII
    • Preface xxixPART 1 Overview 1Chapter 1 Introduction 31.1 DATA COMMUNICATIONS 3Components 4Data Representation 5DataFlow 61.2 NETWORKS 7Distributed Processing 7Network Criteria 7Physical Structures 8Network Models 13Categories of Networks 13Interconnection of Networks: Internetwork IS1.3 THE INTERNET 16A Brief History 17The Internet Today 171.4 PROTOCOLS AND STANDARDS 19Protocols 19Standards 19Standards Organizations 20Internet Standards 211.5 RECOMMENDED READING 21Books 21Sites 22RFCs 221.6 KEY TERMS 221.7 SUMMARY 231.8 PRACTICE SET 24Review Questions 24Exercises 24Research Activities 25Chapter 2 Network Models 272.1 LAYERED TASKS 27Sender, Receiver, and Carrier 28Hierarchy 29ix
    • x CONTENTS2.2 THE OSI MODEL 29Layered Architecture 30Peer-to-Peer Processes 30Encapsulation 332.3 LAYERS IN THE OSI MODEL 33Physical Layer 33Data Link Layer 34Network Layer 36Transport Layer 37Session Layer 39Presentation Layer 39Application Layer 41Summary of Layers 422.4 TCP/IP PROTOCOL SUITE 42Physical and Data Link Layers 43Network Layer 43Transport Layer 44Application Layer 452.5 ADDRESSING 45Physical Addresses 46Logical Addresses 47Port Addresses 49Specific Addresses 502.6 RECOMMENDED READING 50Books 51Sites 51RFCs 512.7 KEY lERMS 512.8 SUMMARY 522.9 PRACTICE SET 52Review Questions 52Exercises 53Research Activities 54PART 2 Physical Layer and Media 55Chapter 3 Data and Signals 573.1 ANALOG AND DIGITAL 57Analog and Digital Data 57Analog and Digital Signals 58Periodic and Nonperiodic Signals 583.2 PERIODIC ANALOG SIGNALS 59Sine Wave 59Phase 63Wavelength 64Time and Frequency Domains 65Composite Signals 66Bandwidth 693.3 DIGITAL SIGNALS 71Bit Rate 73Bit Length 73Digital Signal as a Composite Analog Signal 74Transmission of Digital Signals 74
    • 3.4 TRANSMISSION IMPAIRMENT 80Attenuation 81Distortion 83Noise 843.5 DATA RATE LIMITS 85Noiseless Channel: Nyquist Bit Rate 86Noisy Channel: Shannon Capacity 87Using Both Limits 883.6 PERFORMANCE 89Bandwidth 89Throughput 90Latency (Delay) 90Bandwidth-Delay Product 92Jitter 943.7 RECOMMENDED READING 94Books 943.8 KEYTERMS 943.9 SUMMARY 953.10 PRACTICE SET 96Review Questions 96Exercises 96Chapter 4 Digital Transmission 1014.1 DIGITAL-TO-DIGITAL CONVERSION 101Line Coding 101Line Coding Schemes 106Block Coding 115Scrambling 1184.2 ANALOG-TO-DIGITAL CONVERSION 120Pulse Code Modulation (PCM) 121Delta Modulation (DM) 1294.3 TRANSMISSION MODES 131Parallel Transmission 131Serial Transmission 1324.4 RECOMMENDED READING 135Books 1354.5 KEYTERMS 1354.6 SUMMARY 1364.7 PRACTICE SET 137Review Questions 137Exercises 137Chapter 5 Analog TranSl1lission 1415.1 DIGITAL-TO-ANALOG CONVERSION 141Aspects of Digital-to-Analog Conversion 142Amplitude Shift Keying 143Frequency Shift Keying 146Phase Shift Keying 148Quadrature Amplitude Modulation 1525.2 ANALOG-TO-ANALOG CONVERSION 152Amplitude Modulation 153Frequency Modulation 154Phase Modulation 155CONTENTS xi
    • xii CONTENTS5.3 RECOMMENDED READING 156Books 1565.4 KEY lERMS 1575.5 SUMMARY 1575.6 PRACTICE SET 158Review Questions 158Exercises 158Chapter 6 Ba17chridth Utili::.ation: Multiplexingand Spreading 1616.1 MULTIPLEXING 161Frequency-Division Multiplexing 162Wavelength-Division Multiplexing 167Synchronous Time-Division Multiplexing 169Statistical Time-Division Multiplexing 1796.2 SPREAD SPECTRUM 180Frequency Hopping Spread Spectrum (FHSS) 181Direct Sequence Spread Spectrum 1846.3 RECOMMENDED READING 185Books 1856.4 KEY lERMS 1856.5 SUMMARY 1866.6 PRACTICE SET 187Review Questions 187Exercises 187Chapter 7 Transmission Media 1917.1 GUIDED MEDIA 192Twisted-Pair Cable 193Coaxial Cable 195Fiber-Optic Cable 1987.2 UNGUIDED MEDIA: WIRELESS 203Radio Waves 205Microwaves 206Infrared 2077.3 RECOMMENDED READING 208Books 2087.4 KEY lERMS 2087.5 SUMMARY 2097.6 PRACTICE SET 209Review Questions 209Exercises 210Chapter 8 Svvitching 2138.1 CIRCUIT-SWITCHED NETWORKS 214Three Phases 217Efficiency 217Delay 217Circuit-Switched Technology in Telephone Networks 2188.2 DATAGRAM NETWORKS 218Routing Table 220
    • CONTENTS xiiiEfficiency 220Delay 221Datagram Networks in the Internet 2218.3 VIRTUAL-CIRCUIT NETWORKS 221Addressing 222Three Phases 223Efficiency 226Delay in Virtual-Circuit Networks 226Circuit-Switched Technology in WANs 2278.4 STRUCTURE OF A SWITCH 227Structure of Circuit Switches 227Structure of Packet Switches 2328.5 RECOMMENDED READING 235Books 2358.6 KEY TERMS 2358.7 SUMMARY 2368.8 PRACTICE SET 236Review Questions 236Exercises 237Chapter 9 Using Telephone and Cable Networks for DataTransm,ission 2419.1 1ELEPHONE NETWORK 241Major Components 241LATAs 242Signaling 244Services Provided by Telephone Networks 2479.2 DIAL-UP MODEMS 248Modem Standards 2499.3 DIGITAL SUBSCRIBER LINE 251ADSL 252ADSL Lite 254HDSL 255SDSL 255VDSL 255Summary 2559.4 CABLE TV NETWORKS 256Traditional Cable Networks 256Hybrid Fiber-Coaxial (HFC) Network 2569.5 CABLE TV FOR DATA TRANSFER 257Bandwidth 257Sharing 259CM and CMTS 259Data Transmission Schemes: DOCSIS 2609.6 RECOMMENDED READING 261Books 2619.7 KEY TERMS 2619.8 SUMMARY 2629.9 PRACTICE SET 263Review Questions 263Exercises 264
    • xiv CONTENTSPART 3 Data Link Layer 265Chapter 10 Error Detection and Correction 26710.1 INTRODUCTION 267Types of Errors 267Redundancy 269Detection Versus Correction 269Forward Error Correction Versus Retransmission 269Coding 269Modular Arithmetic 27010.2 BLOCK CODING 271Error Detection 272Error Correction 273Hamming Distance 274Minimum Hamming Distance 27410.3 LINEAR BLOCK CODES 277Minimum Distance for Linear Block Codes 278Some Linear Block Codes 27810.4 CYCLIC CODES 284Cyclic Redundancy Check 284Hardware Implementation 287Polynomials 291Cyclic Code Analysis 293Advantages of Cyclic Codes 297Other Cyclic Codes 29710.5 CHECKSUM 298Idea 298Ones Complement 298Internet Checksum 29910.6 RECOMMENDED READING 30IBooks 301RFCs 30110.7 KEY lERMS 30110.8 SUMMARY 30210.9 PRACTICE SET 303Review Questions 303Exercises 303Chapter 11 Data Link Control 30711.1 FRAMING 307Fixed-Size Framing 308Variable-Size Framing 30811.2 FLOW AND ERROR CONTROL 311Flow Control 311Error Control 31111.3 PROTOCOLS 31111.4 NOISELESS CHANNELS 312Simplest Protocol 312Stop-and-Wait Protocol 31511.5 NOISY CHANNELS 318Stop-and-Wait Automatic Repeat Request 318Go-Back-N Automatic Repeat Request 324
    • 11.611.711.811.911.1011.11Selective Repeat Automatic Repeat RequestPiggybacking 339HDLC 340Configurations and Transfer Modes 340Frames 341Control Field 343POINT-TO-POINT PROTOCOL 346Framing 348Transition Phases 349Multiplexing 350Multilink PPP 355RECOMMENDED READING 357Books 357KEY TERMS 357SUMMARY 358PRACTICE SET 359Review Questions 359Exercises 359332CONTENTS xvChapter 12 Multiple Access 36312.1 RANDOMACCESS 364ALOHA 365Carrier Sense Multiple Access (CSMA) 370Carrier Sense Multiple Access with Collision Detection (CSMAlCD) 373Carrier Sense Multiple Access with Collision Avoidance (CSMAlCA) 37712.2 CONTROLLED ACCESS 379Reservation 379Polling 380Token Passing 38112.3 CHANNELIZATION 383Frequency-Division Multiple Access (FDMA) 383Time-Division Multiple Access (TDMA) 384Code-Division Multiple Access (CDMA) 38512.4 RECOMMENDED READING 390Books 39112.5 KEY TERMS 39112.6 SUMMARY 39112.7 PRACTICE SET 392Review Questions 392Exercises 393Research Activities 394Chapter 13 Wired LANs: Ethernet 39513.1 IEEE STANDARDS 395Data Link Layer 396Physical Layer 39713.2 STANDARD ETHERNET 397MAC Sublayer 398Physical Layer 40213.3 CHANGES IN THE STANDARD 406Bridged Ethernet 406Switched Ethernet 407Full-Duplex Ethernet 408
    • xvi CONTENTS13.4 FAST ETHERNET 409MAC Sublayer 409Physical Layer 41013.5 GIGABIT ETHERNET 412MAC Sublayer 412Physical Layer 414Ten-Gigabit Ethernet 41613.6 RECOMMENDED READING 417Books 41713.7 KEY TERMS 41713.8 SUMMARY 41713.9 PRACTICE SET 418Review Questions 418Exercises 419Chapter 14 Wireless LANs 42114.1 IEEE 802.11 421Architecture 421MAC Sublayer 423Addressing Mechanism 428Physical Layer 43214.2 BLUETOOTH 434Architecture 435Bluetooth Layers 436Radio Layer 436Baseband Layer 437L2CAP 440Other Upper Layers 44114.3 RECOMMENDED READING 44IBooks 44214.4 KEYTERMS 44214.5 SUMMARY 44214.6 PRACTICE SET 443Review Questions 443Exercises 443Chapter 15 Connecting LANs, Backbone Networks,and VirtuaL LANs 44515.1 CONNECTING DEVICES 445Passive Hubs 446Repeaters 446Active Hubs 447Bridges 447Two-Layer Switches 454Routers 455Three-Layer Switches 455Gateway 45515.2 BACKBONE NETWORKS 456Bus Backbone 456Star Backbone 457Connecting Remote LANs 457
    • 15.3 VIRTUAL LANs 458Membership 461Configuration 461Communication Between Switches 462IEEE Standard 462Advantages 46315.4 RECOMMENDED READING 463Books 463Site 46315.5 KEY TERMS 46315.6 SUMMARY 46415.7 PRACTICE SET 464Review Questions 464Exercises 465CONTENTS xviiChapter 16 Wireless WANs: Cellular Telephone andSatellite Networks 46716.1 CELLULAR TELEPHONY 467Frequency-Reuse Principle 467Transmitting 468Receiving 469Roaming 469First Generation 469Second Generation 470Third Generation 47716.2 SATELLITE NETWORKS 478Orbits 479Footprint 480Three Categories of Satellites 480GEO Satellites 481MEO Satellites 481LEO Satellites 48416.3 RECOMMENDED READING 487Books 48716.4 KEY TERMS 48716.5 SUMMARY 48716.6 PRACTICE SET 488Review Questions 488Exercises 488Chapter 17 SONETISDH 49117.1 ARCHITECTURE 491Signals 491SONET Devices 492Connections 49317.2 SONET LAYERS 494Path Layer 494Line Layer 495Section Layer 495Photonic Layer 495Device-Layer Relationships 495
    • xviii CONTENTS17.3 SONET FRAMES 496Frame, Byte, and Bit Transmission 496STS-l Frame Format 497Overhead Summary 501Encapsulation 50117.4 STS MULTIPLEXING 503Byte Interleaving 504Concatenated Signal 505AddlDrop Multiplexer 50617.5 SONET NETWORKS 507Linear Networks 507Ring Networks 509Mesh Networks 51017.6 VIRTUAL TRIBUTARIES 512Types ofVTs 51217.7 RECOMMENDED READING 513Books 51317.8 KEY lERMS 51317.9 SUMMARY 51417.10 PRACTICE SET 514Review Questions 514Exercises 515Chapter 18 Virtual-Circuit Networks: Frame Relm and ATM 51718.1 FRAME RELAY 517Architecture 518Frame Relay Layers 519Extended Address 521FRADs 522VOFR 522LMI 522Congestion Control and Quality of Service 52218.2 ATM 523Design Goals 523Problems 523Architecture 526Switching 529ATM Layers 529Congestion Control and Quality of Service 53518.3 ATM LANs 536ATM LAN Architecture 536LAN Emulation (LANE) 538Client/Server Model 539Mixed Architecture with Client/Server 54018.4 RECOMMENDED READING 540Books 54118.5 KEY lERMS 54118.6 SUMMARY 54118.7 PRACTICE SET 543Review Questions 543Exercises 543
    • CONTENTS xixPART 4 Network Layer 547Chapter 19 Netvl/ark Layer: Logical Addressing 54919.1 IPv4ADDRESSES 549Address Space 550Notations 550Classful Addressing 552Classless Addressing 555Network Address Translation (NAT) 56319.2 IPv6 ADDRESSES 566Structure 567Address Space 56819.3 RECOMMENDED READING 572Books 572Sites 572RFCs 57219.4 KEY TERMS 57219.5 SUMMARY 57319.6 PRACTICE SET 574Review Questions 574Exercises 574Research Activities 577Chapter 20 Network Layer: Internet Protocol 57920.1 INTERNETWORKING 579Need for Network Layer 579Internet as a Datagram Network 581Internet as a Connectionless Network 58220.2 IPv4 582Datagram 583Fragmentation 589Checksum 594Options 59420.3 IPv6 596Advantages 597Packet Format 597Extension Headers 60220.4 TRANSITION FROM IPv4 TO IPv6 603Dual Stack 604Tunneling 604Header Translation 60520.5 RECOMMENDED READING 605Books 606Sites 606RFCs 60620.6 KEY TERMS 60620.7 SUMMARY 60720.8 PRACTICE SET 607Review Questions 607Exercises 608Research Activities 609
    • xx CONTENTSChapter 21 Network Layer: Address Mapping, Error Reporting,and Multicasting 61121.1 ADDRESS MAPPING 611Mapping Logical to Physical Address: ARP 612Mapping Physical to Logical Address: RARp, BOOTP, and DHCP 61821.2 ICMP 621Types of Messages 621Message Format 621Error Reporting 622Query 625Debugging Tools 62721.3 IGMP 630Group Management 630IGMP Messages 631Message Format 631IGMP Operation 632Encapsulation 635Netstat Utility 63721.4 ICMPv6 638Error Reporting 638Query 63921.5 RECOMMENDED READING 640Books 641Site 641RFCs 64121.6 KEYTERMS 64121.7 SUMMARY 64221.8 PRACTICE SET 643Review Questions 643Exercises 644Research Activities 645Chapter 22 Network Layer: Delivery, Forwarding,and Routing 64722.1 DELIVERY 647Direct Versus Indirect Delivery 64722.2 FORWARDING 648Forwarding Techniques 648Forwarding Process 650Routing Table 65522.3 UNICAST ROUTING PROTOCOLS 658Optimization 658Intra- and Interdomain Routing 659Distance Vector Routing 660Link State Routing 666Path Vector Routing 67422.4 MULTICAST ROUTING PROTOCOLS 678Unicast, Multicast, and Broadcast 678Applications 681Multicast Routing 682Routing Protocols 684
    • CONTENTS xxi22.5 RECOMMENDED READING 694Books 694Sites 694RFCs 69422.6 KEY lERMS 69422.7 SUMMARY 69522.8 PRACTICE SET 697Review Questions 697Exercises 697Research Activities 699PART 5 Transport Layer 701Chapter 23 Process-fa-Process Delivery: UDp, TCp,and SeTP 70323.1 PROCESS-TO-PROCESS DELIVERY 703Client/Server Paradigm 704Multiplexing and Demultiplexing 707Connectionless Versus Connection-Oriented Service 707Reliable Versus Unreliable 708Three Protocols 70823.2 USER DATAGRAM PROTOCOL (UDP) 709Well-Known Ports for UDP 709User Datagram 710Checksum 711UDP Operation 713Use ofUDP 71523.3 TCP 715TCP Services 715TCP Features 719Segment 721A TCP Connection 723Flow Control 728Error Control 731Congestion Control 73523.4 SCTP 736SCTP Services 736SCTP Features 738Packet Format 742An SCTP Association 743Flow Control 748Error Control 751Congestion Control 75323.5 RECOMMENDED READING 753Books 753Sites 753RFCs 75323.6 KEY lERMS 75423.7 SUMMARY 75423.8 PRACTICE SET 756Review Questions 756Exercises 757Research Activities 759
    • xxii CONTENTSChapter 24 Congestion Control and Quality (~jService 76724.1 DATA lRAFFIC 761Traffic Descriptor 76]Traffic Profiles 76224.2 CONGESTION 763Network Performance 76424.3 CONGESTION CONTROL 765Open-Loop Congestion Control 766Closed-Loop Congestion Control 76724.4 lWO EXAMPLES 768Congestion Control in TCP 769Congestion Control in Frame Relay 77324.5 QUALITY OF SERVICE 775Flow Characteristics 775Flow Classes 77624.6 TECHNIQUES TO IMPROVE QoS 776Scheduling 776Traffic Shaping 777Resource Reservation 780Admission Control 78024.7 INTEGRATED SERVICES 780Signaling 781Flow Specification 781Admission 781Service Classes 781RSVP 782Problems with Integrated Services 78424.8 DIFFERENTIATED SERVICES 785DS Field 78524.9 QoS IN SWITCHED NETWORKS 786QoS in Frame Relay 787QoS inATM 78924.10 RECOMMENDED READING 790Books 79124.11 KEY TERMS 79124.12 SUMMARY 79124.13 PRACTICE SET 792Review Questions 792Exercises 793PART 6 Application Layer 795Chapter 25 DO/nain Name Svstem 79725.1 NAME SPACE 798Flat Name Space 798Hierarchical Name Space 79825.2 DOMAIN NAME SPACE 799Label 799Domain Narne 799Domain 801
    • 25.325.425.525.625.725.825.925.1025.1125.1225.1325.14DISTRIBUTION OF NAME SPACE 801Hierarchy of Name Servers 802Zone 802Root Server 803Primary and Secondary Servers 803DNS IN THE INTERNET 803Generic Domains 804Country Domains 805Inverse Domain 805RESOLUTION 806Resolver 806Mapping Names to Addresses 807Mapping Address to Names 807Recursive Resolution 808Iterative Resolution 808Caching 808DNS MESSAGES 809Header 809TYPES OF RECORDS 811Question Record 811Resource Record 811REGISTRARS 811DYNAMIC DOMAIN NAME SYSTEM (DDNS)ENCAPSULATION 812RECOMMENDED READING 812Books 813Sites 813RFCs 813KEY TERMS 813SUMMARY 813PRACTICE SET 814Review Questions 814Exercises 815812CONTENTS xxiiiChapter 26 Remote Logging, Electronic Mail, and File Transfer 81726.1 REMOTE LOGGING 817TELNET 81726.2 ELECTRONIC MAIL 824Architecture 824User Agent 828Message Transfer Agent: SMTP 834Message Access Agent: POP and IMAP 837Web-Based Mail 83926.3 FILE TRANSFER 840File Transfer Protocol (FTP) 840Anonymous FTP 84426.4 RECOMMENDED READING 845Books 845Sites 845RFCs 84526.5 KEY lERMS 84526.6 SUMMARY 846
    • xxiv CONTENTS26.7 PRACTICE SET 847Review Questions 847Exercises 848Research Activities 848Chapter 27 WWW and HTTP 85127.1 ARCHITECTURE 851Client (Browser) 852Server 852Uniform Resource Locator 853Cookies 85327.2 WEB DOCUMENTS 854Static Documents 855Dynamic Documents 857Active Documents 86027.3 HTTP 861HTTP Transaction 861Persistent Versus Nonpersistent Connection 868Proxy Server 86827.4 RECOMMENDED READING 869Books 869Sites 869RFCs 86927.5 KEY 1ERMS 86927.6 SUMMARY 87027.7 PRACTICE SET 871Review Questions 871Exercises 871Chapter 28 Network Management: SNMP 87328.1 NETWORK MANAGEMENT SYSTEM 873Configuration Management 874Fault Management 875Performance Management 876Security Management 876Accounting Management 87728.2 SIMPLE NETWORK MANAGEMENT PROTOCOL (SNMP) 877Concept 877Management Components 878Structure of Management Information 881Management Information Base (MIB) 886Lexicographic Ordering 889SNMP 891Messages 893UDP Ports 895Security 89728.3 RECOMMENDED READING 897Books 897Sites 897RFCs 89728.4 KEY 1ERMS 89728.5 SUMMARY 898
    • 28.6 PRACTICE SET 899Review Questions 899Exercises 899Chapter 29 Multimedia 90129.1 DIGITIZING AUDIO AND VIDEO 902Digitizing Audio 902Digitizing Video 90229.2 AUDIO AND VIDEO COMPRESSION 903Audio Compression 903Video Compression 90429.3 STREAMING STORED AUDIO/VIDEO 908First Approach: Using a Web Server 909Second Approach: Using a Web Server with Metafile 909Third Approach: Using a Media Server 910Fourth Approach: Using a Media Server and RTSP 91129.4 STREAMING LIVE AUDIOIVIDEO 91229.5 REAL-TIME INTERACTIVE AUDIOIVIDEO 912Characteristics 91229.6 RTP 916RTP Packet Format 917UDPPort 91929.7 RTCP 919Sender Report 919Receiver Report 920Source Description Message 920Bye Message 920Application-Specific Message 920UDP Port 92029.8 VOICE OVER IP 920SIP 920H.323 92329.9 RECOMMENDED READING 925Books 925Sites 92529.10 KEY 1ERMS 92529.11 SUMMARY 92629.12 PRACTICE SET 927Review Questions 927Exercises 927Research Activities 928PART 7 Security 929Chapter 30 Cryptography 93130.1 INTRODUCTION 931Definitions 931Two Categories 93230.2 SYMMETRIC-KEY CRYPTOGRAPHY 935Traditional Ciphers 935Simple Modem Ciphers 938CONTENTS xxv
    • xxvi CONTENTSModern Round Ciphers 940Mode of Operation 94530.3 ASYMMETRIC-KEY CRYPTOGRAPHY 949RSA 949Diffie-Hellman 95230.4 RECOMMENDED READING 956Books 95630.5 KEY TERMS 95630.6 SUMMARY 95730.7 PRACTICE SET 958Review Questions 958Exercises 959Research Activities 960Chapter 31 Network Security 96131.1 SECURITY SERVICES 961Message Confidentiality 962Message Integrity 962Message Authentication 962Message Nonrepudiation 962Entity Authentication 96231.2 MESSAGE CONFIDENTIALITY 962Confidentiality with Symmetric-Key Cryptography 963Confidentiality with Asymmetric-Key Cryptography 96331.3 MESSAGE INTEGRITY 964Document and Fingerprint 965Message and Message Digest 965Difference 965Creating and Checking the Digest 966Hash Function Criteria 966Hash Algorithms: SHA-1 96731.4 MESSAGE AUTHENTICATION 969MAC 96931.5 DIGITAL SIGNATURE 971Comparison 97INeed for Keys 972Process 973Services 974Signature Schemes 97631.6 ENTITY AUTHENTICATION 976Passwords 976Challenge-Response 97831.7 KEY MANAGEMENT 981Symmetric-Key Distribution 981Public-Key Distribution 98631.8 RECOMMENDED READING 990Books 99031.9 KEY TERMS 99031.10 SUMMARY 99131.11 PRACTICE SET 992Review Questions 992Exercises 993Research Activities 994
    • CONTENTS xxviiChapter 32 Security in the Internet: IPSec, SSUFLS, PGP, VPN,and Firewalls 99532.1 IPSecurity (lPSec) 996Two Modes 996Two Security Protocols 998Security Association 1002Internet Key Exchange (IKE) 1004Virtual Private Network 100432.2 SSLffLS 1008SSL Services 1008Security Parameters 1009Sessions and Connections 1011Four Protocols 1012Transport Layer Security 101332.3 PGP 1014Security Parameters 1015Services 1015A Scenario 1016PGP Algorithms 1017Key Rings 1018PGP Certificates 101932.4 FIREWALLS 1021Packet-Filter Firewall 1022Proxy Firewall 102332.5 RECOMMENDED READING 1024Books 102432.6 KEY lERMS 102432.7 SUMMARY 102532.8 PRACTICE SET 1026Review Questions 1026Exercises 1026Appendix A Unicode 1029A.l UNICODE 1029Planes 1030Basic Multilingual Plane (BMP) 1030Supplementary Multilingual Plane (SMP) 1032Supplementary Ideographic Plane (SIP) 1032Supplementary Special Plane (SSP) 1032Private Use Planes (PUPs) 1032A.2 ASCII 1032Some Properties ofASCII 1036Appendix B Numbering Systems 1037B.l BASE 10: DECIMAL 1037Weights 1038B.2 BASE 2: BINARY 1038Weights 1038Conversion 1038
    • xxviii CONTENTSB.3 BASE 16: HEXADECIMAL 1039Weights 1039Conversion 1039A Comparison 1040BA BASE 256: IP ADDRESSES 1040Weights 1040Conversion 1040B.5 OTHER CONVERSIONS 1041Binary and Hexadecimal 1041Base 256 and Binary 1042Appendix C Mathenwtical Revietv 1043C.1 TRIGONOMETRIC FUNCTIONS 1043Sine Wave 1043Cosine Wave 1045Other Trigonometric Functions 1046Trigonometric Identities 1046C.2 FOURIER ANALYSIS 1046Fourier Series 1046Fourier Transform 1048C.3 EXPONENT AND LOGARITHM 1050Exponential Function 1050Logarithmic Function 1051Appendix 0 8B/6T Code 1055Appendix E Telephone History 1059Before 1984 1059Between 1984 and 1996 1059After 1996 1059Appendix F Contact Addresses 1061Appendix G RFCs 1063Appendix H UDP and TCP Ports 1065Acronyms 1067Glossary 1071References 1107Index 1111
    • Data communications and networking may be the fastest growing technologies in ourculture today. One of the ramifications of that growth is a dramatic increase in the numberof 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 learnabout them.Features of the BookSeveral features of this text are designed to make it particularly easy for students tounderstand data communications and networking.StructureWe have used the five-layer Internet model as the framework for the text not only becausea thorough understanding of the model is essential to understanding most current network-ing theory but also because it is based on a structure of interdependencies: Each layerbuilds upon the layer beneath it and supports the layer above it. In the same way, each con-cept introduced in our text builds upon the concepts examined in the previous sections. TheInternet model was chosen because it is a protocol that is fully implemented.This text is designed for students with little or no background in telecommunica-tions or data communications. For this reason, we use a bottom-up approach. With thisapproach, students learn first about data communications (lower layers) before learningabout networking (upper layers).Visual ApproachThe book presents highly technical subject matter without complex formulas by using abalance of text and figures. More than 700 figures accompanying the text provide avisual and intuitive opportunity for understanding the material. Figures are particularlyimportant in explaining networking concepts, which are based on connections andtransmission. Both of these ideas are easy to grasp visually.Highlighted PointsWe emphasize important concepts in highlighted boxes for quick reference and imme-diate attention.xxix
    • xxx PREFACEExamples and ApplicationsWhen appropriate, we have selected examples to reflect true-to-life situations. For exam-ple, in Chapter 6 we have shown several cases of telecommunications in current telephonenetworks.Recommended ReadingEach chapter includes a list of books and sites that can be used for further reading.Key TermsEach chapter includes a list of key terms for the student.SummaryEach chapter ends with a summary of the material covered in that chapter. The sum-mary provides a brief overview of all the important points in the chapter.Practice SetEach chapter includes a practice set designed to reinforce and apply salient concepts. Itconsists of three parts: review questions, exercises, and research activities (only forappropriate chapters). Review questions are intended to test the students first-level under-standing of the material presented in the chapter. Exercises require deeper understandingof the materiaL Research activities are designed to create motivation for further study.AppendixesThe appendixes are intended to provide quick reference material or a review of materi-als needed to understand the concepts discussed in the book.Glossary and AcronymsThe book contains an extensive glossary and a list of acronyms.Changes in the Fourth EditionThe Fourth Edition has major changes from the Third Edition, both in the organizationand in the contents.OrganizationThe 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.
    • PREFACE xxxiContentsWe 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 toclarify the contents.2. The contents of Chapter 10 are revised and augmented to include methods of errordetection 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 includeadditional discussion about security issues and the Internet.7. New examples are added to clarify the understanding of concepts.End Materials1. 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-testtheir 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 MaterialsInstructional materials for both the student and the teacher are revised and augmented.The solutions to exercises contain both the explanation and answer including full col-ored figures or tables when needed. The Powerpoint presentations are more compre-hensive and include text and figures.ContentsThe book is divided into seven parts. The first part is an overview; the last part concernsnetwork security. The middle five parts are designed to represent the five layers of theInternet model. The following summarizes the contents of each part.Part One: OverviewThe first part gives a general overview of data communications and networking. Chap-ter 1 covers introductory concepts needed for the rest of the book. Chapter 2 introducesthe Internet model.Part Two: Physical LayerThe second part is a discussion of the physical layer of the Internet model. Chapters 3to 6 discuss telecommunication aspects of the physical layer. Chapter 7 introduces thetransmission 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 showshow two public networks, telephone and cable TV, can be used for data transfer.
    • xxxii PREFACEPart Three: Data Link LayerThe 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 relatedto data link control. Chapters 13 through 16 deal with LANs. Chapters 17 and] 8 areabout WANs. LANs and WANs are examples of networks operating in the first two lay-ers of the Internet model.Part Four: Network LayerThe 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 layerprotocols such as IP, ARP, ICMP, and IGMP. Chapter 22 discusses delivery, forwarding,and routing of packets in the Internet.Part Five: Transport LayerThe 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 andduties of this layer. It also introduces three transport-layer protocols: UDP, TCP, andSCTP. Chapter 24 discusses congestion control and quality of service, two issuesrelated to the transport layer and the previous two layers.Part Six: Application LayerThe 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 pro-grams to map application layer addresses to network layer addresses. Chapter 26 to 29discuss some common applications protocols in the Internet.Part Seven: SecurityThe seventh part is a discussion of security. It serves as a prelude to further study in thissubject. Chapter 30 briefly discusses cryptography. Chapter 31 introduces securityaspects. Chapter 32 shows how different security aspects can be applied to three layersof the Internet model.Online Learning CenterThe McGraw-Hill Online Learning Center contains much additional material. Avail-able at www.mhhe.com/forouzan. As students read through Data Communications andNetworking, they can go online to take self-grading quizzes. They can also access lec-ture materials such as PowerPoint slides, and get additional review from animated fig-ures from the book. Selected solutions are also available over the Web. The solutions toodd-numbered problems are provided to students, and instructors can use a password toaccess the complete set of solutions.Additionally, McGraw-Hill makes it easy to create a website for your networkingcourse with an exclusive McGraw-Hill product called PageOut. It requires no priorknowledge of HTML, no long hours, and no design skills on your part. Instead, Page:-Out offers a series of templates. Simply fill them with your course information and
    • PREFACE xxxiiiclick on one of 16 designs. The process takes under an hour and leaves you with a pro-fessionally designed website.Although PageOut offers "instant" development, the finished website provides pow-erful features. An interactive course syllabus allows you to post content to coincide withyour lectures, so when students visit your PageOut website, your syllabus will direct themto components of Forouzans Online Learning Center, or specific material of your own.How to Use the BookThis book is written for both an academic and a professional audience. The book can beused as a self-study guide for interested professionals. As a textbook, it can be used fora one-semester or one-quarter course. The following are some guidelines.o Parts one to three are strongly recommended.o Parts four to six can be covered if there is no following course in TCP/IP protocol.o Part seven is recommended if there is no following course in network security.AcknowledgmentsIt is obvious that the development of a book of this scope needs the support ofmany people.Peer ReviewThe most important contribution to the development of a book such as this comes frompeer reviews. We cannot express our gratitude in words to the many reviewers whospent numerous hours reading the manuscript and providing us with helpful commentsand ideas. We would especially like to acknowledge the contributions of the followingreviewers for the third and fourth editions of this book.Farid Ahmed, Catholic UniversityKaveh Ashenayi, University ofTulsaYoris Au, University ofTexas, San AntonioEssie Bakhtiar, Clayton College & State UniversityAnthony Barnard, University ofAlabama, BriminghamA.T. Burrell, Oklahoma State UniversityScott Campbell, Miami UniversityTeresa Carrigan, Blackburn CollegeHwa Chang, Tufts UniversityEdward Chlebus, Illinois Institute ofTechnologyPeter Cooper, Sam Houston State UniversityRichard Coppins, Virginia Commonwealth UniversityHarpal Dhillon, Southwestern Oklahoma State UniversityHans-Peter Dommel, Santa Clara UniversityM. Barry Dumas, Baruch College, CUNYWilliam Figg, Dakota State UniversityDale Fox, Quinnipiac UniversityTerrence Fries, Coastal Carolina UniversityErrin Fulp, Wake Forest University
    • xxxiv PREFACESandeep Gupta, Arizona State UniversityGeorge Hamer, South Dakota State UniversityJames Henson, California State University, FresnoTom Hilton, Utah State UniversityAllen Holliday, California State University, FullertonSeyed Hossein Hosseini, University ofWisconsin, MilwaukeeGerald Isaacs, Carroll College, WaukeshaHrishikesh Joshi, DeVry UniversityE.S. Khosravi, Southern UniversityBob Kinicki, Worcester Polytechnic UniversityKevin Kwiat, Hamilton CollegeTen-Hwang Lai, Ohio State UniversityChung-Wei Lee, Auburn UniversityKa-Cheong Leung, Texas Tech UniversityGertrude Levine, Fairleigh Dickinson UniversityAlvin Sek See Lim, Auburn UniversityCharles Liu, California State University, Los AngelesWenhang Liu, California State University, Los AngelesMark Llewellyn, University ofCentral FloridaSanchita Mal-Sarkar, Cleveland State UniversityLouis Marseille, Harford Community CollegeKevin McNeill, University ofArizonaArnold C. Meltzer, George Washington UniversityRayman Meservy, Brigham Young UniversityPrasant Mohapatra, University ofCalifornia, DavisHung Z Ngo, SUNY, BuffaloLarry Owens, California State University, FresnoArnold Patton, Bradley UniversityDolly Samson, Hawaii Pacific UniversityJoseph Sherif, California State University, FullertonRobert Simon, George Mason UniversityRonald 1. Srodawa, Oakland UniversityDaniel Tian, California State University, Monterey BayRichard Tibbs, Radford UniversityChristophe Veltsos, Minnesota State University, MankatoYang Wang, University ofMaryland, College ParkSherali Zeadally, Wayne State UniversityMcGraw-Hill StaffSpecial thanks go to the staff of McGraw-Hill. Alan Apt, our publisher, proved how aproficient publisher can make the impossible possible. Rebecca Olson, the developmen-tal editor, gave us help whenever we needed it. Sheila Frank, our project manager,guided us through the production process with enormous enthusiasm. We also thankDavid Hash in design, Kara Kudronowicz in production, and Patti Scott, the copy editor.
    • OverviewObjectivesPart 1 provides a general idea of what we will see in the rest of the book. Four majorconcepts are discussed: data communications, networking, protocols and standards,and networking models.Networks exist so that data may be sent from one place to another-the basic con-cept of data communications. To fully grasp this subject, we must understand the datacommunication components, how different types of data can be represented, and howto create a data flow.Data communications between remote parties can be achieved through a processcalled networking, involving the connection of computers, media, and networkingdevices. Networks are divided into two main categories: local area networks (LANs)and wide area networks (WANs). These two types of networks have different charac-teristics and different functionalities. The Internet, the main focus of the book, is acollection of LANs and WANs held together by internetworking devices.Protocols and standards are vital to the implementation of data communicationsand networking. Protocols refer to the rules; a standard is a protocol that has beenadopted by vendors and manufacturers.Network models serve to organize, unify, and control the hardware and software com-ponents of data communications and networking. Although the term "network model"suggests a relationship to networking, the model also encompasses data communications.ChaptersThis part consists of two chapters: Chapter 1 and Chapter 2.Chapter 1In Chapter 1, we introduce the concepts of data communications and networking. We dis-cuss data communications components, data representation, and data flow. We then moveto the structure of networks that carry data. We discuss network topologies, categoriesof networks, and the general idea behind the Internet. The section on protocols andstandards gives a quick overview of the organizations that set standards in data communi-cations and networking.
    • Chapter 2The two dominant networking models are the Open Systems Interconnection (OSI) andthe Internet model (TCP/IP).The first is a theoretical framework; the second is theactual model used in todays data communications. In Chapter 2, we first discuss theOSI model to give a general background. We then concentrate on the Internet model,which is the foundation for the rest of the book.
    • CHAPTERlIntroductionData communications and networking are changing the way we do business and the waywe live. Business decisions have to be made ever more quickly, and the decision makersrequire immediate access to accurate information. Why wait a week for that reportfrom Germany to arrive by mail when it could appear almost instantaneously throughcomputer networks? Businesses today rely on computer networks and internetworks.But before we ask how quickly we can get hooked up, we need to know how networksoperate, what types of technologies are available, and which design best fills which setof needs.The development of the personal computer brought about tremendous changes forbusiness, industry, science, and education. A similar revolution is occurring in datacommunications and networking. Technological advances are making it possible forcommunications links to carry more and faster signals. As a result, services are evolvingto allow use of this expanded capacity. For example, established telephone servicessuch as conference calling, call waiting, voice mail, and caller ID have been extended.Research in data communications and networking has resulted in new technolo-gies. One goal is to be able to exchange data such as text, audio, and video from allpoints in the world. We want to access the Internet to download and upload informationquickly and accurately and at any time.This chapter addresses four issues: data communications, networks, the Internet,and protocols and standards. First we give a broad definition of data communications.Then we define networks as a highway on which data can travel. The Internet is dis-cussed as a good example of an internetwork (i.e., a network of networks). Finally, wediscuss different types of protocols, the difference between protocols and standards,and the organizations that set those standards.1.1 DATA COMMUNICATIONSWhen we communicate, we are sharing information. This sharing can be local orremote. Between individuals, local communication usually occurs face to face, whileremote communication takes place over distance. The term telecommunication, which3I I, I
    • 4 CHAPTER 1 INTRODUCTIONincludes telephony, telegraphy, and television, means communication at a distance (teleis Greek for "far").The word data refers to information presented in whatever form is agreed upon bythe parties creating and using the data.Data communications are the exchange of data between two devices via someform of transmission medium such as a wire cable. For data communications to occur,the communicating devices must be part of a communication system made up of a com-bination of hardware (physical equipment) and software (programs). The effectivenessof a data communications system depends on four fundamental characteristics: deliv-ery, accuracy, timeliness, and jitter.I. Delivery. The system must deliver data to the correct destination. Data must bereceived by the intended device or user and only by that device or user.7 Accuracy. The system must deliver the data accurately. Data that have beenaltered in transmission and left uncorrected are unusable.3. Timeliness. The system must deliver data in a timely manner. Data delivered late areuseless. In the case of video and audio, timely delivery means delivering data asthey are produced, in the same order that they are produced, and without signifi-cant delay. This kind of delivery is called real-time transmission.-.. Jitter. Jitter refers to the variation in the packet arrival time. It is the uneven delay inthe delivery of audio or video packets. For example, let us assume that video packetsare sent every 3D ms. If some of the packets arrive with 3D-ms delay and others with4D-ms delay, an uneven quality in the video is the result.COinponentsA data communications system has five components (see Figure 1.1).Figure 1.1 Five components ofdata communicationRule 1:Rule 2:Rule n:Protocol-1 Message rMediumProtocolRule 1:Rule 2:Rulen:I. Message. The message is the information (data) to be communicated. Popularforms of information include text, numbers, pictures, audio, and video.I Sender. The sender is the device that sends the data message. It can be a com-puter, workstation, telephone handset, video camera, and so on.3. Receiver. The receiver is the device that receives the message. It can be a com-puter, workstation, telephone handset, television, and so on.-1.. Transmission medium. The transmission medium is the physical path by whicha message travels from sender to receiver. Some examples of transmission mediainclude twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves.
    • SECTION 1.1 DATA COMMUNICATIONS 55. Protocol. A protocol is a set of rules that govern data communications. It repre-sents an agreement between the communicating devices. Without a protocol, twodevices may be connected but not communicating, just as a person speaking Frenchcannot be understood by a person who speaks only Japanese.Data RepresentationInformation today comes in different forms such as text, numbers, images, audio, andvideo.TextIn data communications, text is represented as a bit pattern, a sequence of bits (Os orIs). Different sets of bit patterns have been designed to represent text symbols. Each setis called a code, and the process of representing symbols is called coding. Today, theprevalent coding system is called Unicode, which uses 32 bits to represent a symbol orcharacter used in any language in the world. The American Standard Code for Infor-mation Interchange (ASCII), developed some decades ago in the United States, nowconstitutes the first 127 characters in Unicode and is also referred to as Basic Latin.Appendix A includes part of the Unicode.NumbersNumbers are also represented by bit patterns. However, a code such as ASCII is not usedto represent numbers; the number is directly converted to a binary number to simplifymathematical operations. Appendix B discusses several different numbering systems.ImagesImages are also represented by bit patterns. In its simplest form, an image is composedof a matrix of pixels (picture elements), where each pixel is a small dot. The size of thepixel depends on the resolution. For example, an image can be divided into 1000 pixelsor 10,000 pixels. In the second case, there is a better representation of the image (betterresolution), but more memory is needed to store the image.After an image is divided into pixels, each pixel is assigned a bit pattern. The sizeand the value of the pattern depend on the image. For an image made of only black-and-white dots (e.g., a chessboard), a I-bit pattern is enough to represent a pixel.If an image is not made of pure white and pure black pixels, you can increase thesize of the bit pattern to include gray scale. For example, to show four levels of grayscale, you can use 2-bit patterns. A black pixel can be represented by 00, a dark graypixel by 01, a light gray pixel by 10, and a white pixel by 11.There are several methods to represent color images. One method is called RGB,so called because each color is made of a combination of three primary colors: red,green, and blue. The intensity of each color is measured, and a bit pattern is assigned toit. Another method is called YCM, in which a color is made of a combination of threeother primary colors: yellow, cyan, and magenta.AudioAudio refers to the recording or broadcasting of sound or music. Audio is by naturedifferent from text, numbers, or images. It is continuous, not discrete. Even when we
    • 6 CHAPTER 1 INTRODUCTIONuse a microphone to change voice or music to an electric signal, we create a continuoussignal. In Chapters 4 and 5, we learn how to change sound or music to a digital or ananalog signal.VideoVideo refers to the recording or broadcasting of a picture or movie. Video can either beproduced as a continuous entity (e.g., by a TV camera), or it can be a combination ofimages, each a discrete entity, arranged to convey the idea of motion. Again we canchange video to a digital or an analog signal, as we will see in Chapters 4 and 5.Data FlowCommunication between two devices can be simplex, half-duplex, or full-duplex asshown in Figure 1.2.Figure 1.2 Data flow (simplex, half-duplex, andfull-duplex)Mainframea. Simplexb. Half-duplexc. Full·duplexDirection of dataDirection of data at time I~Direction of data at time 2Direction of data all the time)MonitorSimplexIn simplex mode, the communication is unidirectional, as on a one-way street. Only oneof the two devices on a link can transmit; the other can only receive (see Figure 1.2a).Keyboards and traditional monitors are examples of simplex devices. The key-board can only introduce input; the monitor can only accept output. The simplex modecan use the entire capacity of the channel to send data in one direction.Half-DuplexIn half-duplex mode, each station can both transmit and receive, but not at the same time. :When one device is sending, the other can only receive, and vice versa (see Figure 1.2b).
    • SECTION 1.2 NETWORKS 7The half-duplex mode is like a one-lane road with traffic allowed in both direc-tions. When cars are traveling in one direction, cars going the other way must wait. In ahalf-duplex transmission, the entire capacity of a channel is taken over by whichever ofthe two devices is transmitting at the time. Walkie-talkies and CB (citizens band) radiosare both half-duplex systems.The half-duplex mode is used in cases where there is no need for communicationin both directions at the same time; the entire capacity of the channel can be utilized foreach direction.Full-DuplexIn full-duplex m.,lle (als@ called duplex), both stations can transmit and receive simul-taneously (see Figure 1.2c).The full-duplex mode is like a tW<D-way street with traffic flowing in both direc-tions at the same time. In full-duplex mode, si~nals going in one direction share thecapacity of the link: with signals going in the other din~c~on. This sharing can occur intwo ways: Either the link must contain two physically separate t:nmsmissiIDn paths, onefor sending and the other for receiving; or the capacity of the ch:arillilel is dividedbetween signals traveling in both directions.One common example of full-duplex communication is the telephone network.When two people are communicating by a telephone line, both can talk and listen at thesame time.The full-duplex mode is used when communication in both directions is requiredall the time. The capacity of the channel, however, must be divided between the twodirections.1.2 NETWORKSA network is a set of devices (often referred to as nodes) connected by communicationlinks. A node can be a computer, printer, or any other device capable of sending and/orreceiving data generated by other nodes on the network.Distributed ProcessingMost networks use distributed processing, in which a task is divided among multiplecomputers. Instead of one single large machine being responsible for all aspects of aprocess, separate computers (usually a personal computer or workstation) handle asubset.Network CriteriaA network must be able to meet a certain number of criteria. The most important ofthese are performance, reliability, and security.PerformancePerformance can be measured in many ways, including transit time and response time.Transit time is the amount of time required for a message to travel from one device to
    • 8 CHAPTER 1 INTRODUCTIONanother. Response time is the elapsed time between an inquiry and a response. The per-formance of a network depends on a number of factors, including the number of users,the type of transmission medium, the capabilities of the connected hardware, and theefficiency of the software.Performance is often evaluated by two networking metrics: throughput and delay.We often need more throughput and less delay. However, these two criteria are oftencontradictory. If we try to send more data to the network, we may increase throughputbut we increase the delay because of traffic congestion in the network.ReliabilityIn addition to accuracy of delivery, network reliability is measured by the frequency offailure, the time it takes a link to recover from a failure, and the networks robustness ina catastrophe.SecurityNetwork security issues include protecting data from unauthorized access, protectingdata from damage and development, and implementing policies and procedures forrecovery from breaches and data losses.Physical StructuresBefore discussing networks, we need to define some network attributes.Type ofConnectionA network is two or more devices connected through links. A link is a communicationspathway that transfers data from one device to another. For visualization purposes, it issimplest to imagine any link as a line drawn between two points. For communication tooccur, two devices must be connected in some way to the same link at the same time.There are two possible types of connections: point-to-point and multipoint.Point-to-Point A point-to-point connection provides a dedicated link between twodevices. The entire capacity of the link is reserved for transmission between those twodevices. Most point-to-point connections use an actual length of wire or cable to con-nect the two ends, but other options, such as microwave or satellite links, are also possi-ble (see Figure 1.3a). When you change television channels by infrared remote control,you are establishing a point-to-point connection between the remote control and thetelevisions control system.Multipoint A multipoint (also called multidrop) connection is one in which morethan two specific devices share a single link (see Figure 1.3b).In a multipoint environment, the capacity of the channel is shared, either spatiallyor temporally. If several devices can use the link simultaneously, it is a spatially sharedconnection. If users must take turns, it is a timeshared connection.Physical TopologyThe term physical topology refers to the way in which a network is laid out physically.:1vo or more devices connect to a link; two or more links form a topology. The topology
    • SECTION 1.2 NETWORKS 9Figure 1.3 Types ofconnections: point-to-point and multipointLinka. Point-to-pointMainframeLinkb. Multipointof a network is the geometric representation of the relationship of all the links andlinking devices (usually called nodes) to one another. There are four basic topologiespossible: mesh, star, bus, and ring (see Figure 1.4).Figure 1.4 Categories oftopologyMesh In a mesh topology, every device has a dedicated point-to-point link to everyother device. The term dedicated means that the link carries traffic only between thetwo devices it connects. To find the number of physical links in a fully connected meshnetwork with n nodes, we first consider that each node must be connected to everyother node. Node 1 must be connected to n - I nodes, node 2 must be connected to n - 1nodes, and finally node n must be connected to n - 1 nodes. We need n(n - 1) physicallinks. However, if each physical link allows communication in both directions (duplexmode), we can divide the number of links by 2. In other words, we can say that in amesh topology, we needn(n -1) /2duplex-mode links.To accommodate that many links, every device on the network must have n - 1input/output (VO) ports (see Figure 1.5) to be connected to the other n - 1 stations.
    • 10 CHAPTER 1 INTRODUCTIONFigure 1.5 A fully connected mesh topology (five devices)A mesh offers several advantages over other network topologies. First, the use ofdedicated links guarantees that each connection can carry its own data load, thus elimi-nating the traffic problems that can occur when links must be shared by multiple devices.Second, a mesh topology is robust. If one link becomes unusable, it does not incapaci-tate the entire system. Third, there is the advantage of privacy or security. When everymessage travels along a dedicated line, only the intended recipient sees it. Physicalboundaries prevent other users from gaining access to messages. Finally, point-to-pointlinks make fault identification and fault isolation easy. Traffic can be routed to avoidlinks with suspected problems. This facility enables the network manager to discover theprecise location of the fault and aids in finding its cause and solution.The main disadvantages of a mesh are related to the amount of cabling and thenumber of I/O ports required. First, because every device must be connected to everyother device, installation and reconnection are difficult. Second, the sheer bulk of thewiring can be greater than the available space (in walls, ceilings, or floors) can accom-modate. Finally, the hardware required to connect each link (I/O ports and cable) can beprohibitively expensive. For these reasons a mesh topology is usually implemented in alimited fashion, for example, as a backbone connecting the main computers of a hybridnetwork that can include several other topologies.One practical example of a mesh topology is the connection of telephone regionaloffices in which each regional office needs to be connected to every other regional office.Star Topology In a star topology, each device has a dedicated point-to-point linkonly to a central controller, usually called a hub. The devices are not directly linked toone another. Unlike a mesh topology, a star topology does not allow direct trafficbetween devices. The controller acts as an exchange: If one device wants to send data toanother, it sends the data to the controller, which then relays the data to the other con-nected device (see Figure 1.6) .A star topology is less expensive than a mesh topology. In a star, each device needsonly one link and one I/O port to connect it to any number of others. This factor alsomakes it easy to install and reconfigure. Far less cabling needs to be housed, and addi-tions, moves, and deletions involve only one connection: between that device and the hub.Other advantages include robustness. If one link fails, only that link is affected. Allother links remain active. This factor also lends itself to easy fault identification and
    • SECTION 1.2 NETWORKS 11Figure 1.6 A star topology connecting four stationsHubfault isolation. As long as the hub is working, it can be used to monitor link problemsand bypass defective links.One big disadvantage of a star topology is the dependency of the whole topologyon one single point, the hub. If the hub goes down, the whole system is dead.Although a star requires far less cable than a mesh, each node must be linked to acentral hub. For this reason, often more cabling is required in a star than in some othertopologies (such as ring or bus).The star topology is used in local-area networks (LANs), as we will see in Chapter 13.High-speed LANs often use a star topology with a central hub.Bus Topology The preceding examples all describe point-to-point connections. A bustopology, on the other hand, is multipoint. One long cable acts as a backbone to link allthe devices in a network (see Figure 1.7).Figure 1.7 A bus topology connecting three stationsDrop line Drop line Drop lineCable end 11I-----1..- - - - -..- - - - -..----11 Cable endTap Tap TapNodes are connected to the bus cable by drop lines and taps. A drop line is a con-nection running between the device and the main cable. A tap is a connector that eithersplices into the main cable or punctures the sheathing of a cable to create a contact withthe metallic core. As a signal travels along the backbone, some ofits energy is transformedinto heat. Therefore, it becomes weaker and weaker as it travels farther and farther. Forthis reason there is a limit on the number of taps a bus can support and on the distancebetween those taps.Advantages of a bus topology include ease of installation. Backbone cable can belaid along the most efficient path, then connected to the nodes by drop lines of variouslengths. In this way, a bus uses less cabling than mesh or star topologies. In a star, forexample, four network devices in the same room require four lengths of cable reaching
    • 12 CHAPTER 1 INTRODUCTIONall the way to the hub. In a bus, this redundancy is eliminated. Only the backbone cablestretches through the entire facility. Each drop line has to reach only as far as the near-est point on the backbone.Disadvantages include difficult reconnection and fault isolation. A bus is usuallydesigned to be optimally efficient at installation. It can therefore be difficult to add newdevices. Signal reflection at the taps can cause degradation in quality. This degradationcan be controlled by limiting the number and spacing of devices connected to a givenlength of cable. Adding new devices may therefore require modification or replacementof the backbone.In addition, a fault or break in the bus cable stops all transmission, even betweendevices on the same side of the problem. The damaged area reflects signals back in thedirection of origin, creating noise in both directions.Bus topology was the one of the first topologies used in the design of early local-area networks. Ethernet LANs can use a bus topology, but they are less popular now forreasons we will discuss in Chapter 13.Ring Topology In a ring topology, each device has a dedicated point-to-point con-nection with only the two devices on either side of it. A signal is passed along the ringin one direction, from device to device, until it reaches its destination. Each device inthe ring incorporates a repeater. When a device receives a signal intended for anotherdevice, its repeater regenerates the bits and passes them along (see Figure 1.8).Figure 1.8 A ring topology connecting six stationsRepeaterRepeaterRepeaterRepeaterRepeaterRepeaterA ring is relatively easy to install and reconfigure. Each device is linked to only itsimmediate neighbors (either physically or logically). To add or delete a device requireschanging only two connections. The only constraints are media and traffic consider-ations (maximum ring length and number of devices). In addition, fault isolation is sim-plified. Generally in a ring, a signal is circulating at all times. If one device does notreceive a signal within a specified period, it can issue an alarm. The alarm alerts thenetwork operator to the problem and its location.However, unidirectional traffic can be a disadvantage. In a simple ring, a break inthe ring (such as a disabled station) can disable the entire network. This weakness canbe solved by using a dual ring or a switch capable of closing off the break.
    • SECTION 1.2 NETWORKS 13Ring topology was prevalent when IBM introduced its local-area network TokenRing. Today, the need for higher-speed LANs has made this topology less popular.Hybrid Topology A network can be hybrid. For example, we can have a main star topol-ogy with each branch connecting several stations in a bus topology as shown in Figure 1.9.Figure 1.9 A hybrid topology: a star backbone with three bus networksHubNetwork ModelsComputer networks are created by different entities. Standards are needed so that theseheterogeneous networks can communicate with one another. The two best-known stan-dards are the OSI model and the Internet model. In Chapter 2 we discuss these twomodels. The OSI (Open Systems Interconnection) model defines a seven-layer net-work; the Internet model defines a five-layer network. This book is based on the Internetmodel with occasional references to the OSI model.Categories of NetworksToday when we speak of networks, we are generally referring to two primary catego-ries: local-area networks and wide-area networks. The category into which a networkfalls is determined by its size. A LAN normally covers an area less than 2 mi; a WAN canbe worldwide. Networks of a size in between are normally referred to as metropolitan-area networks and span tens of miles.Local Area NetworkA local area network (LAN) is usually privately owned and links the devices in a singleoffice, building, or campus (see Figure 1.10). Depending on the needs of an organizationand the type of technology used, a LAN can be as simple as two PCs and a printer insomeones home office; or it can extend throughout a company and include audio andvideo peripherals. Currently, LAN size is limited to a few kilometers.
    • 14 CHAPTER 1 INTRODUCTIONFigure 1.10 An isolated IAN connecting 12 computers to a hub in a closetHubLANs are designed to allow resources to be shared between personal computers orworkstations. The resources to be shared can include hardware (e.g., a printer), software(e.g., an application program), or data. A common example of a LAN, found in manybusiness environments, links a workgroup of task-related computers, for example, engi-neering workstations or accounting PCs. One of the computers may be given a large-capacity disk drive and may become a server to clients. Software can be stored on thiscentral server and used as needed by the whole group. In this example, the size of theLAN may be determined by licensing restrictions on the number of users per copy of soft-ware, or by restrictions on the number of users licensed to access the operating system.In addition to size, LANs are distinguished from other types of networks by theirtransmission media and topology. In general, a given LAN will use only one type oftransmission medium. The most common LAN topologies are bus, ring, and star.Early LANs had data rates in the 4 to 16 megabits per second (Mbps) range. Today,however, speeds are normally 100 or 1000 Mbps. LANs are discussed at length inChapters 13, 14, and 15.Wireless LANs are the newest evolution in LAN technology. We discuss wirelessLANs in detail in Chapter 14.Wide Area NetworkA wide area network (WAN) provides long-distance transmission of data, image, audio,and video information over large geographic areas that may comprise a country, a conti-nent, or even the whole world. In Chapters 17 and 18 we discuss wide-area networks ingreater detail. A WAN can be as complex as the backbones that connect the Internet or assimple as a dial-up line that connects a home computer to the Internet. We normally referto the first as a switched WAN and to the second as a point-to-point WAN (Figure 1.11).The switched WAN connects the end systems, which usually comprise a router (internet-working connecting device) that connects to another LAN or WAN. The point-to-pointWAN is normally a line leased from a telephone or cable TV provider that connects ahome computer or a small LAN to an Internet service provider (lSP). This type of WANis often used to provide Internet access.
    • ComputerSECTION 1.2 NETWORKSFigure 1.11 WANs: a switched WAN and a point-to-point WANa. Switched WANPoint-te-point ~d::_:WAN .c . -- cu::J::W~ii~~;-E=~~~· "", ,~! j., .. ;~, -, E::JModem Modem -ISPb. Point-to-point WAN15i iIAn early example of a switched WAN is X.25, a network designed to provide con-nectivity between end users. As we will see in Chapter 18, X.25 is being graduallyreplaced by a high-speed, more efficient network called Frame Relay. A good exampleof a switched WAN is the asynchronous transfer mode (ATM) network, which is a net-work with fixed-size data unit packets called cells. We will discuss ATM in Chapter 18.Another example ofWANs is the wireless WAN that is becoming more and more popu-lar. We discuss wireless WANs and their evolution in Chapter 16.Metropolitan Area NetworksA metropolitan area network (MAN) is a network with a size between a LAN and aWAN. It normally covers the area inside a town or a city. It is designed for customerswho need a high-speed connectivity, normally to the Internet, and have endpointsspread over a city or part of city. A good example of a MAN is the part of the telephonecompany network that can provide a high-speed DSL line to the customer. Anotherexample is the cable TV network that originally was designed for cable TV, but todaycan also be used for high-speed data connection to the Internet. We discuss DSL linesand cable TV networks in Chapter 9.Interconnection of Networks: InternetworkToday, it is very rare to see a LAN, a MAN, or a LAN in isolation; they are con-nected to one another. When two or more networks are connected, they become aninternetwork, or internet.As an example, assume that an organization has two offices, one on the east coastand the other on the west coast. The established office on the west coast has a bus topologyLAN; the newly opened office on the east coast has a star topology LAN. The president ofthe company lives somewhere in the middle and needs to have control over the company
    • 16 CHAPTER 1 INTRODUCTIONfrom her horne. To create a backbone WAN for connecting these three entities (twoLANs and the presidents computer), a switched WAN (operated by a service providersuch as a telecom company) has been leased. To connect the LANs to this switchedWAN, however, three point-to-point WANs are required. These point-to-point WANscan be a high-speed DSL line offered by a telephone company or a cable modern lineoffered by a cable TV provider as shown in Figure 1.12.Figure 1.12 A heterogeneous network made offour WANs and two LANsPresident1_...... ,, Mod,m••Point-to-point:WAN :•MOdem~~•:, Point-to-point:. WAN••~ Point-to-point~ WAN.LANLAN1.3 THE INTERNETThe Internet has revolutionized many aspects of our daily lives. It has affected the waywe do business as well as the way we spend our leisure time. Count the ways youveused the Internet recently. Perhaps youve sent electronic mail (e-mail) to a businessassociate, paid a utility bill, read a newspaper from a distant city, or looked up a localmovie schedule-all by using the Internet. Or maybe you researched a medical topic,booked a hotel reservation, chatted with a fellow Trekkie, or comparison-shopped for acar. The Internet is a communication system that has brought a wealth of information toour fingertips and organized it for our use.The Internet is a structured, organized system. We begin with a brief history of theInternet. We follow with a description of the Internet today.
    • SECTION 1.3 THE INTERNET 17A Brief HistoryA network is a group of connected communicating devices such as computers andprinters. An internet (note the lowercase letter i) is two or more networks that can com-municate with each other. The most notable internet is called the Internet (uppercaseletter I), a collaboration of more than hundreds of thousands of interconnected net-works. Private individuals as well as various organizations such as government agen-cies, schools, research facilities, corporations, and libraries in more than 100 countriesuse the Internet. Millions of people are users. Yet this extraordinary communication sys-tem only came into being in 1969.In the mid-1960s, mainframe computers in research organizations were stand-alone devices. Computers from different manufacturers were unable to communicatewith one another. The Advanced Research Projects Agency (ARPA) in the Depart-ment of Defense (DoD) was interested in finding a way to connect computers so thatthe researchers they funded could share their findings, thereby reducing costs and elim-inating duplication of effort.In 1967, at an Association for Computing Machinery (ACM) meeting, ARPA pre-sented its ideas for ARPANET, a small network of connected computers. The idea wasthat each host computer (not necessarily from the same manufacturer) would beattached to a specialized computer, called an inteiface message processor (IMP). TheIMPs, in tum, would be connected to one another. Each IMP had to be able to commu-nicate with other IMPs as well as with its own attached host.By 1969, ARPANET was a reality. Four nodes, at the University of California atLos Angeles (UCLA), the University of California at Santa Barbara (UCSB), StanfordResearch Institute (SRI), and the University of Utah, were connected via the IMPs toform a network. Software called the Network Control Protocol (NCP) provided com-munication between the hosts.In 1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANETgroup, collaborated on what they called the Internetting Projec1. Cerf and Kahns land-mark 1973 paper outlined the protocols to achieve end-to-end delivery of packets. Thispaper on Transmission Control Protocol (TCP) included concepts such as encapsula-tion, the datagram, and the functions of a gateway.Shortly thereafter, authorities made a decision to split TCP into two protocols:Transmission Control Protocol (TCP) and Internetworking Protocol (lP). IP wouldhandle datagram routing while TCP would be responsible for higher-level functionssuch as segmentation, reassembly, and error detection. The internetworking protocolbecame known as TCPIIP.The Internet TodayThe Internet has come a long way since the 1960s. The Internet today is not a simplehierarchical structure. It is made up of many wide- and local-area networks joined byconnecting devices and switching stations. It is difficult to give an accurate represen-tation of the Internet because it is continually changing-new networks are beingadded, existing networks are adding addresses, and networks of defunct companies arebeing removed. Today most end users who want Internet connection use the services ofInternet service providers (lSPs). There are international service providers, national
    • 18 CHAPTER 1 INTRODUCTIONservice providers, regional service providers, and local service providers. The Internettoday is run by private companies, not the government. Figure 1.13 shows a conceptual(not geographic) view of the Internet.Figure 1.13 Hierarchical organization of the InternetNationalISPa. Structure of a national ISPNationalISPNationalISPb. Interconnection of national ISPsInternational Internet Service ProvidersAt the top of the hierarchy are the international service providers that connect nationstogether.National Internet Service ProvidersThe national Internet service providers are backbone networks created and main-tained by specialized companies. There are many national ISPs operating in NorthAmerica; some of the most well known are SprintLink, PSINet, UUNet Technology,AGIS, and internet Mel. To provide connectivity between the end users, these back-bone networks are connected by complex switching stations (normally run by a thirdparty) called network access points (NAPs). Some national ISP networks are alsoconnected to one another by private switching stations called peering points. Thesenormally operate at a high data rate (up to 600 Mbps).
    • SECTION 1.4 PROTOCOLS AND STANDARDS 19Regional Internet Service ProvidersRegional internet service providers or regional ISPs are smaller ISPs that are connectedto one or more national ISPs. They are at the third level of the hierarchy with a smallerdata rate.Local Internet Service ProvidersLocal Internet service providers provide direct service to the end users. The localISPs can be connected to regional ISPs or directly to national ISPs. Most end users areconnected to the local ISPs. Note that in this sense, a local ISP can be a company thatjust provides Internet services, a corporation with a network that supplies services to itsown employees, or a nonprofit organization, such as a college or a university, that runsits own network. Each of these local ISPs can be connected to a regional or nationalservice provider.1.4 PROTOCOLS AND STANDARDSIn this section, we define two widely used terms: protocols and standards. First, wedefine protocol, which is synonymous with rule. Then we discuss standards, which areagreed-upon rules.ProtocolsIn computer networks, communication occurs between entities in different systems. Anentity is anything capable of sending or receiving information. However, two entities can-not simply send bit streams to each other and expect to be understood. For communicationto occur, the entities must agree on a protocol. A protocol is a set of rules that govern datacommunications. A protocol defines what is communicated, how it is communicated, andwhen it is communicated. The key elements of a protocol are syntax, semantics, and timing.o Syntax. The term syntax refers to the structure or format of the data, meaning theorder in which they are presented. For example, a simple protocol might expect thefirst 8 bits of data to be the address of the sender, the second 8 bits to be the addressof the receiver, and the rest of the stream to be the message itself.o Semantics. The word semantics refers to the meaning of each section of bits.How is a particular pattern to be interpreted, and what action is to be taken basedon that interpretation? For example, does an address identify the route to be takenor the final destination of the message?o Timing. The term timing refers to two characteristics: when data should be sentand how fast they can be sent. For example, if a sender produces data at 100 Mbpsbut the receiver can process data at only 1 Mbps, the transmission will overload thereceiver and some data will be lost.StandardsStandards are essential in creating and maintaining an open and competitive market forequipment manufacturers and in guaranteeing national and international interoperabilityof data and telecommunications technology and processes. Standards provide guidelines
    • 20 CHAPTER 1 INTRODUCTIONto manufacturers, vendors, government agencies, and other service providers to ensurethe kind of interconnectivity necessary in todays marketplace and in international com-munications. Data communication standards fall into two categories: de facto (meaning"by fact" or "by convention") and de jure (meaning "by law" or "by regulation").o De facto. Standards that have not been approved by an organized body but havebeen adopted as standards through widespread use are de facto standards. De factostandards are often established originally by manufacturers who seek to define thefunctionality of a new product or technology.o De jure. Those standards that have been legislated by an officially recognized bodyare de jure standards.Standards OrganizationsStandards are developed through the cooperation of standards creation committees,forums, and government regulatory agencies.Standards Creation CommitteesWhile many organizations are dedicated to the establishment of standards, data tele-communications in North America rely primarily on those published by the following:o International Organization for Standardization (ISO). The ISO is a multinationalbody whose membership is drawn mainly from the standards creation committeesof various governments throughout the world. The ISO is active in developingcooperation in the realms of scientific, technological, and economic activity.o International Telecommunication Union-Telecommunication StandardsSector (ITU-T). By the early 1970s, a number of countries were defining nationalstandards for telecommunications, but there was still little international compati-bility. The United Nations responded by forming, as part of its InternationalTelecommunication Union (ITU), a committee, the Consultative Committeefor International Telegraphy and Telephony (CCITT). This committee wasdevoted to the research and establishment of standards for telecommunications ingeneral and for phone and data systems in particular. On March 1, 1993, the nameof this committee was changed to the International Telecommunication Union-Telecommunication Standards Sector (ITU-T).o American National Standards Institute (ANSI). Despite its name, the AmericanNational Standards Institute is a completely private, nonprofit corporation not affili-ated with the U.S. federal government. However, all ANSI activities are undertakenwith the welfare of the United States and its citizens occupying primary importance.o Institute of Electrical and Electronics Engineers (IEEE). The Institute ofElectrical and Electronics Engineers is the largest professional engineering society inthe world. International in scope, it aims to advance theory, creativity, and productquality in the fields of electrical engineering, electronics, and radio as well as in allrelated branches of engineering. As one of its goals, the IEEE oversees the develop-ment and adoption of international standards for computing and communications.o Electronic Industries Association (EIA). Aligned with ANSI, the ElectronicIndustries Association is a nonprofit organization devoted to the promotion of
    • SECTION 1.5 RECOMMENDED READING 21electronics manufacturing concerns. Its activities include public awareness educationand lobbying efforts in addition to standards development. In the field of informationtechnology, the EIA has made significant contributions by defining physical connec-tion interfaces and electronic signaling specifications for data communication.ForumsTelecommunications technology development is moving faster than the ability of stan-dards committees to ratify standards. Standards committees are procedural bodies andby nature slow-moving. To accommodate the need for working models and agreementsand to facilitate the standardization process, many special-interest groups have devel-oped forums made up of representatives from interested corporations. The forumswork with universities and users to test, evaluate, and standardize new technologies. Byconcentrating their efforts on a particular technology, the forums are able to speedacceptance and use of those technologies in the telecommunications community. Theforums present their conclusions to the standards bodies.Regulatory AgenciesAll communications technology is subject to regulation by government agencies suchas the Federal Communications Commission (FCC) in the United States. The pur-pose of these agencies is to protect the public interest by regulating radio, television,and wire/cable communications. The FCC has authority over interstate and interna-tional commerce as it relates to communications.Internet StandardsAn Internet standard is a thoroughly tested specification that is useful to and adheredto by those who work with the Internet. It is a formalized regulation that must be fol-lowed. There is a strict procedure by which a specification attains Internet standardstatus. A specification begins as an Internet draft. An Internet draft is a working docu-ment (a work in progress) with no official status and a 6-month lifetime. Upon recom-mendation from the Internet authorities, a draft may be published as a Request forComment (RFC). Each RFC is edited, assigned a number, and made available to allinterested parties. RFCs go through maturity levels and are categorized according totheir requirement level.1.5 RECOMMENDED READINGFor more details about subjects discussed in this chapter, we recommend the followingbooks and sites. The items enclosed in brackets [...] refer to the reference list at the endof the book.BooksThe introductory materials covered in this chapter can be found in [Sta04] and [PD03].[Tan03] discusses standardization in Section 1.6.
    • 22 CHAPTER 1 INTRODUCTIONSitesThe following sites are related to topics discussed in this chapter.o www.acm.org/sigcomm/sos.html This site gives the status of varililus networkingstandards.o www.ietf.org/ The Internet Engineering Task Force (IETF) home page.RFCsThe following site lists all RFCs, including those related to IP and TCP. In future chap-ters we cite the RFCs pertinent to the chapter material.o www.ietf.org/rfc.html1.6 KEY TERMSAdvanced Research ProjectsAgency (ARPA)American National StandardsInstitute (ANSI)American Standard Code forInformation Interchange (ASCII)ARPANETaudiobackboneBasic Latinbus topologycodeConsultative Committee forInternational Telegraphyand Telephony (CCITT)datadata communicationsde facto standardsde jure standardsdelaydistributed processingElectronic Industries Association (EIA)entityFederal Communications Commission(FCC)forumfull-duplex mode, or duplexhalf-duplex modehubimageInstitute of Electrical and ElectronicsEngineers (IEEE)International Organization forStandardization (ISO)International TelecommunicationUnion-TelecommunicationStandards Sector (ITU-T)InternetInternet draftInternet service provider (ISP)Internet standardinternetwork or internetlocal area network (LAN)local Internet service providersmesh topologymessagemetropolitan area network (MAN)multipoint or multidrop connectionnational Internet service providernetwork
    • network access points (NAPs)nodeperformancephysical topologypoint-to-point connectionprotocolreceiverregional ISPreliabilityRequest for Comment (RFC)ROBring topologysecuritysemantics1.7 SUMMARYSECTION 1.7 SUMMARY 23sendersimplex modestar topologysyntaxtelecommunicationthroughputtimingTransmission Control Protocol!Internetworking Protocol (TCPIIP)transmission mediumUnicodevideowide area network (WAN)YCMo Data communications are the transfer of data from one device to another via someform of transmission medium.o A data communications system must transmit data to the correct destination in anaccurate and timely manner.o The five components that make up a data communications system are the message,sender, receiver, medium, and protocol.o Text, numbers, images, audio, and video are different forms of information.o Data flow between two devices can occur in one of three ways: simplex, half-duplex,or full-duplex.o A network is a set of communication devices connected by media links.o In a point-to-point connection, two and only two devices are connected by adedicated link. In a multipoint connection, three or more devices share a link.o Topology refers to the physical or logical arrangement of a network. Devices maybe arranged in a mesh, star, bus, or ring topology.o A network can be categorized as a local area network or a wide area network.o A LAN is a data communication system within a building, plant, or campus, orbetween nearby buildings.o A WAN is a data communication system spanning states, countries, or the wholeworld.o An internet is a network of networks.o The Internet is a collection of many separate networks.o There are local, regional, national, and international Internet service providers.o A protocol is a set of rules that govern data communication; the key elements ofa protocol are syntax, semantics, and timing.
    • 24 CHAPTER 1 INTRODUCTIONo Standards are necessary to ensure that products from different manufacturers canwork together as expected.o The ISO, ITD-T, ANSI, IEEE, and EIA are some of the organizations involvedin standards creation.o Forums are special-interest groups that quickly evaluate and standardize newtechnologies.o A Request for Comment is an idea or concept that is a precursor to an Internetstandard.1.8 PRACTICE SETReview Questions1. Identify the five components of a data communications system.2. What are the advantages of distributed processing?3. What are the three criteria necessary for an effective and efficient network?4. What are the advantages of a multipoint connection over a point-to-pointconnection?5. What are the two types of line configuration?6. Categorize the four basic topologies in terms of line configuration.7. What is the difference between half-duplex and full-duplex transmission modes?8. Name the four basic network topologies, and cite an advantage of each type.9. For n devices in a network, what is the number of cable links required for a mesh,ring, bus, and star topology?10. What are some of the factors that determine whether a communication system is aLAN or WAN?1I. What is an internet? What is the Internet?12. Why are protocols needed?13. Why are standards needed?Exercises14. What is the maximum number of characters or symbols that can be represented byUnicode?15. A color image uses 16 bits to represent a pixel. What is the maximum number ofdifferent colors that can be represented?16. Assume six devices are arranged in a mesh topology. How many cables are needed?How many ports are needed for each device?17. For each of the following four networks, discuss the consequences if a connection fails.a. Five devices arranged in a mesh topologyb. Five devices arranged in a star topology (not counting the hub)c. Five devices arranged in a bus topologyd. Five devices arranged in a ring topology
    • SECTION 1.8 PRACTICE SET 2518. You have two computers connected by an Ethernet hub at home. Is this a LAN, aMAN, or a WAN? Explain your reason.19. In the ring topology in Figure 1.8, what happens if one of the stations is unplugged?20. In the bus topology in Figure 1.7, what happens if one ofthe stations is unplugged?21. Draw a hybrid topology with a star backbone and three ring networks.22. Draw a hybrid topology with a ring backbone and two bus networks.23. Performance is inversely related to delay. When you use the Internet, which of thefollowing applications are more sensitive to delay?a. Sending an e-mailb. Copying a filec. Surfing the Internet24. When a party makes a local telephone call to another party, is this a point-to-pointor multipoint connection? Explain your answer.25. Compare the telephone network and the Internet. What are the similarities? Whatare the differences?Research Activities26. Using the site iww.cne.gmu.edu/modules/network/osi.html, discuss the OSI model.27. Using the site www.ansi.org, discuss ANSIs activities.28. Using the site www.ieee.org, discuss IEEEs activities.29. Using the site www.ietf.org/, discuss the different types of RFCs.
    • CHAPTER 2Network ModelsA network is a combination of hardware and software that sends data from one locationto another. The hardware consists of the physical equipment that carries signals fromone point of the network to another. The software consists of instruction sets that makepossible the services that we expect from a network.We can compare the task of networking to the task of solving a mathematics problemwith a computer. The fundamental job of solving the problem with a computer is doneby computer hardware. However, this is a very tedious task if only hardware is involved.We would need switches for every memory location to store and manipulate data. Thetask is much easier if software is available. At the highest level, a program can directthe problem-solving process; the details of how this is done by the actual hardware canbe left to the layers of software that are called by the higher levels.Compare this to a service provided by a computer network. For example, the taskof sending an e-mail from one point in the world to another can be broken into severaltasks, each performed by a separate software package. Each software package uses theservices of another software package. At the lowest layer, a signal, or a set of signals, issent from the source computer to the destination computer.In this chapter, we give a general idea of the layers of a network and discuss thefunctions of each. Detailed descriptions of these layers follow in later chapters.2.1 LAYERED TASKSWe use the concept of layers in our daily life. As an example, let us consider twofriends who communicate through postal maiL The process of sending a letter to afriend would be complex if there were no services available from the post office. Fig-ure 2.1 shows the steps in this task.27
    • 28 CHAPTER 2 NETWORK MODELSFigure 2.1 Tasks involved in sending a letterSendertReceivertI tThe letter is written, The letter is picked up,put in an envelope, and Higher layers removed from thedropped in a mailbox. envelope, and read.I -,The letter is carried The letter is carriedfrom the mailbox Middle layers from the post officeto a post office. to the mailbox.I IThe letter is delivered The letter is deliveredto a carrier by the post Lower layers from the carrieroffice. to the post office.• IIThe parcel is carried fromthe source to the destination.Sender, Receiver, and CarrierIn Figure 2.1 we have a sender, a receiver, and a carrier that transports the letter. Thereis a hierarchy of tasks.At the Sellder SiteLet us first describe, in order, the activities that take place at the sender site.o Higher layer. The sender writes the letter, inserts the letter in an envelope, writesthe sender and receiver addresses, and drops the letter in a mailbox.o Middle layer. The letter is picked up by a letter carrier and delivered to the postoffice.o Lower layer. The letter is sorted at the post office; a carrier transports the letter.011 the WayThe letter is then on its way to the recipient. On the way to the recipients local postoffice, the letter may actually go through a central office. In addition, it may be trans-ported by truck, train, airplane, boat, or a combination of these.At the Receiver Siteo Lower layer. The carrier transports the letter to the post office.o Middle layer. The letter is sorted and delivered to the recipients mailbox.o Higher layer. The receiver picks up the letter, opens the envelope, and reads it.
    • SECTION 2.2 THE OS! MODEL 29HierarchyAccording to our analysis, there are three different activities at the sender site andanother three activities at the receiver site. The task of transporting the letter betweenthe sender and the receiver is done by the carrier. Something that is not obviousimmediately is that the tasks must be done in the order given in the hierarchy. At thesender site, the letter must be written and dropped in the mailbox before being pickedup by the letter carrier and delivered to the post office. At the receiver site, the lettermust be dropped in the recipient mailbox before being picked up and read by therecipient.ServicesEach layer at the sending site uses the services of the layer immediately below it. Thesender at the higher layer uses the services of the middle layer. The middle layer usesthe services of the lower layer. The lower layer uses the services of the carrier.The layered model that dominated data communications and networking literaturebefore 1990 was the Open Systems Interconnection (OSI) model. Everyone believedthat the OSI model would become the ultimate standard for data communications, butthis did not happen. The TCPIIP protocol suite became the dominant commercial archi-tecture because it was used and tested extensively in the Internet; the OSI model wasnever fully implemented.In this chapter, first we briefly discuss the OSI model, and then we concentrate onTCPIIP as a protocol suite.2.2 THE OSI MODELEstablished in 1947, the International Standards Organization (ISO) is a multinationalbody dedicated to worldwide agreement on international standards. An ISO standardthat covers all aspects of network communications is the Open Systems Interconnectionmodel. It was first introduced in the late 1970s. An open system is a set of protocols thatallows any two different systems to communicate regardless of their underlying archi-tecture. The purpose of the OSI model is to show how to facilitate communicationbetween different systems without requiring changes to the logic of the underlying hard-ware and software. The OSI model is not a protocol; it is a model for understanding anddesigning a network architecture that is flexible, robust, and interoperable.ISO is the organization. OSI is the model.The OSI model is a layered framework for the design of network systems thatallows communication between all types of computer systems. It consists of seven sep-arate but related layers, each ofwhich defines a part of the process of moving informationacross a network (see Figure 2.2). An understanding of the fundamentals of the OSImodel provides a solid basis for exploring data communications.
    • 30 CHAPTER 2 NETWORK MODELSFigure 2.2 Seven layers of the OSI model71 Application61 Presentation51 Session41 Transport31 Network21 Data link1 I PhysicalLayered ArchitectureThe OSI model is composed of seven ordered layers: physical (layer 1), data link (layer 2),network (layer 3), transport (layer 4), session (layer 5), presentation (layer 6), andapplication (layer 7). Figure 2.3 shows the layers involved when a message is sent fromdevice A to device B. As the message travels from A to B, it may pass through manyintermediate nodes. These intermediate nodes usually involve only the first three layersof the OSI model.In developing the model, the designers distilled the process of transmitting data toits most fundamental elements. They identified which networking functions had relateduses and collected those functions into discrete groups that became the layers. Eachlayer defines a family of functions distinct from those of the other layers. By definingand localizing functionality in this fashion, the designers created an architecture that isboth comprehensive and flexible. Most importantly, the OSI model allows completeinteroperability between otherwise incompatible systems.Within a single machine, each layer calls upon the services of the layer just belowit. Layer 3, for example, uses the services provided by layer 2 and provides services forlayer 4. Between machines, layer x on one machine communicates with layer x onanother machine. This communication is governed by an agreed-upon series of rulesand conventions called protocols. The processes on each machine that communicate ata given layer are called peer-to-peer processes. Communication between machines istherefore a peer-to-peer process using the protocols appropriate to a given layer.Peer-to-Peer ProcessesAt the physical layer, communication is direct: In Figure 2.3, device A sends a streamof bits to device B (through intermediate nodes). At the higher layers, however, com-munication must move down through the layers on device A, over to device B, and then
    • SECTION 2.2 THE OSI MODEL 31Figure 2.3 The interaction between layers in the OSI modelDeviceADeviceBIntermediatenodeIntermediatenodePeer-to-peer protocol Oth layer)7 Application ------------------------ Application 77-6 interface 7-6 interfacePeer-to-peer protocol (6th layer)6 Presentation ------------------------ Presentation 66-5 interface 6-5 interfacePeer-to-peer protocol (5th layer)5 Session ------------------------ Session 55-4 interfacePeer-to-peer protocol (4th layer)5-4 interface4 Transport ------------------------ Transport 44-3 interface 4-3 interface3 Network Network 33-2 interface 3-2 interface2 Data link Data link 22-1 interface 2-1 interfacePhysical PhysicalPhysical communicationback up through the layers. Each layer in the sending device adds its own informationto the message it receives from the layer just above it and passes the whole package tothe layer just below it.At layer I the entire package is converted to a form that can be transmitted to thereceiving device. At the receiving machine, the message is unwrapped layer by layer,with each process receiving and removing the data meant for it. For example, layer 2removes the data meant for it, then passes the rest to layer 3. Layer 3 then removes thedata meant for it and passes the rest to layer 4, and so on.Interfaces Between LayersThe passing of the data and network information down through the layers of the send-ing device and back up through the layers of the receiving device is made possible byan interface between each pair of adjacent layers. Each interface defines the informa-tion and services a layer must provide for the layer above it. Well-defined interfaces andlayer functions provide modularity to a network. As long as a layer provides theexpected services to the layer above it, the specific implementation of its functions canbe modified or replaced without requiring changes to the surrounding layers.Organization ofthe LayersThe seven layers can be thought of as belonging to three subgroups. Layers I, 2, and3-physical, data link, and network-are the network support layers; they deal with
    • 32 CHAPTER 2 NETWORK MODELSthe physical aspects of moving data from one device to another (such as electricalspecifications, physical connections, physical addressing, and transport timing andreliability). Layers 5, 6, and 7-session, presentation, and application-can bethought of as the user support layers; they allow interoperability among unrelatedsoftware systems. Layer 4, the transport layer, links the two subgroups and ensuresthat what the lower layers have transmitted is in a form that the upper layers can use.The upper OSI layers are almost always implemented in software; lower layers are acombination of hardware and software, except for the physical layer, which is mostlyhardware.In Figure 2.4, which gives an overall view of the OSI layers, D7 means the dataunit at layer 7, D6 means the data unit at layer 6, and so on. The process starts at layer7 (the application layer), then moves from layer to layer in descending, sequentialorder. At each layer, a header, or possibly a trailer, can be added to the data unit.Commonly, the trailer is added only at layer 2. When the formatted data unit passesthrough the physical layer (layer 1), it is changed into an electromagnetic signal andtransported along a physical link.Figure 2.4 An exchange using the OS! model:HiiD7lt---~~~§J D6 I:Hs-1 D5 Ir- _J:H4j D4 Ir--- .------:-Hil D3 Ir-- J---=-=----:HiJ D2 ~.j!1- - - .10--1:_~i§j 010101010101101010000010000 ITrn",m;"io" =dium 1~~ D6 I~ D5 I~ D4 I~ D3 I~ D2 •@IQj 010101010101101010000010000 IL...Upon reaching its destination, the signal passes into layer 1 and is transformedback into digital form. The data units then move back up through the OSI layers. Aseach block of data reaches the next higher layer, the headers and trailers attached to it atthe corresponding sending layer are removed, and actions appropriate to that layer aretaken. By the time it reaches layer 7, the message is again in a form appropriate to theapplication and is made available to the recipient.
    • SECTION 2.3 LAYERS IN THE OSI MODEL 33EncapsulationFigure 2.3 reveals another aspect of data communications in the OSI model: encapsula-tion. A packet (header and data) at level 7 is encapsulated in a packet at level 6. Thewhole packet at level 6 is encapsulated in a packet at level 5, and so on.In other words, the data portion of a packet at level N - 1 carries the whole packet(data and header and maybe trailer) from level N. The concept is called encapsulation;level N - 1 is not aware of which part of the encapsulated packet is data and which partis the header or trailer. For level N - 1, the whole packet coming from level N is treatedas one integral unit.2.3 LAYERS IN THE OSI MODELIn this section we briefly describe the functions of each layer in the OSI model.Physical LayerThe physical layer coordinates the functions required to carry a bit stream over a physi-cal medium. It deals with the mechanical and electrical specifications of the interface andtransmission medium. It also defines the procedures and functions that physical devicesand interfaces have to perform for transmission to Occur. Figure 2.5 shows the position ofthe physical layer with respect to the transmission medium and the data link layer.Figure 2.5 Physical layerFrom data link layer To data link layerPhysicallayerPhysicallayerTransmission mediumThe physical layer is responsible for movements ofindividual bits from one hop (node) to the next.The physical layer is also concerned with the following:o Physical characteristics of interfaces and medium. The physical layer definesthe characteristics of the interface between the devices and the transmissionmedium. It also defines the type of transmission medium.o Representation of bits. The physical layer data consists of a stream of bits(sequence of Os or 1s) with no interpretation. To be transmitted, bits must be
    • 34 CHAPTER 2 NETWORK MODELSencoded into signals--electrical or optical. The physical layer defines the type ofencoding (how Os and Is are changed to signals).o Data rate. The transmission rate-the number of bits sent each second-is alsodefined by the physical layer. In other words, the physical layer defines the dura-tion of a bit, which is how long it lasts.o Synchronization of bits. The sender and receiver not only must use the same bitrate but also must be synchronized at the bit level. In other words, the sender andthe receiver clocks must be synchronized.o Line configuration. The physical layer is concerned with the connection ofdevices to the media. In a point-to-point configuration, two devices are connectedthrough a dedicated link. In a multipoint configuration, a link is shared amongseveral devices.o Physical topology. The physical topology defines how devices are connected tomake a network. Devices can be connected by using a mesh topology (every deviceis connected to every other device), a star topology (devices are connected througha central device), a ring topology (each device is connected to the next, forming aring), a bus topology (every device is on a common link), or a hybrid topology (thisis a combination of two or more topologies).o Transmission mode. The physical layer also defines the direction of transmissionbetween two devices: simplex, half-duplex, or full-duplex. In simplex mode, onlyone device can send; the other can only receive. The simplex mode is a one-waycommunication. In the half-duplex mode, two devices can send and receive, butnot at the same time. In a full-duplex (or simply duplex) mode, two devices cansend and receive at the same time.Data Link LayerThe data link layer transforms the physical layer, a raw transmission facility, to a reli-able link. It makes the physical layer appear error-free to the upper layer (networklayer). Figure 2.6 shows the relationship of the data link layer to the network and phys-icallayers.Figure 2.6 Data link layerFrom network layerData link layerTo physical layerH2To network layerData link layerFrom physical layer
    • SECTION 2.3 LAYERS IN THE OSI MODEL 35The data link layer is responsible for moving frames from one hop (node) to the next.Other responsibilities of the data link layer include the following:[I Framing. The data link layer divides the stream of bits received from the networklayer into manageable data units called frames.o Physical addressing. If frames are to be distributed to different systems on thenetwork, the data link layer adds a header to the frame to define the sender and/orreceiver of the frame. If the frame is intended for a system outside the sendersnetwork, the receiver address is the address of the device that connects the networkto the next one.D Flow control. If the rate at which the data are absorbed by the receiver is less thanthe rate at which data are produced in the sender, the data link layer imposes a flowcontrol mechanism to avoid overwhelming the receiver.o Error control. The data link layer adds reliability to the physical layer by addingmechanisms to detect and retransmit damaged or lost frames. It also uses a mecha-nism to recognize duplicate frames. Error control is normally achieved through atrailer added to the end of the frame.D Access control. When two or more devices are connected to the same link, datalink layer protocols are necessary to determine which device has control over thelink at any given time.Figure 2.7 illustrates hop-to-hop (node-to-node) delivery by the data link layer.Figure 2.7 Hop-fa-hop deliveryEndsystemrLinkLinkAEndsystemrEndsystemE FHop-ta-hop delivery Hop-to-hop delivery Hop-to-hop deliveryA B E FData link Data link Data linkPhysical Physical PhysicalHop-to-hop delivery Hop-to-hop delivery Hop-to-hop deliveryAs the figure shows, communication at the data link layer occurs between twoadjacent nodes. To send data from A to F, three partial deliveries are made. First, thedata link layer at A sends a frame to the data link layer at B (a router). Second, the data
    • 36 CHAPTER 2 NETWORK MODELSlink layer at B sends a new frame to the data link layer at E. Finally, the data link layerat E sends a new frame to the data link layer at F. Note that the frames that areexchanged between the three nodes have different values in the headers. The frame fromA to B has B as the destination address and A as the source address. The frame from B toE has E as the destination address and B as the source address. The frame from E to Fhas F as the destination address and E as the source address. The values of the trailerscan also be different if error checking includes the header of the frame.Network LayerThe network layer is responsible for the source-to-destination delivery of a packet,possibly across multiple networks (links). Whereas the data link layer oversees thedelivery of the packet between two systems on the same network (links), the networklayer ensures that each packet gets from its point of origin to its final destination.If two systems are connected to the same link, there is usually no need for a net-work layer. However, if the two systems are attached to different networks (links) withconnecting devices between the networks (links), there is often a need for the networklayer to accomplish source-to-destination delivery. Figure 2.8 shows the relationship ofthe network layer to the data link and transport layers.Figure 2.8 Network layerFrom transport layerI1 -,,-_1~: Data .1 PacketI ITo transport layer...I,,- - -H-3- - _]1... jI. Data,. Packeti------------------1Networklayer...,To data link layerNetworklayerFrom data link layerThe network layer is responsible for the delivery of individualpackets from the source host to the destination host.Other responsibilities of the network layer include the following:o Logical addressing. The physical addressing implemented by the data link layerhandles the addressing problem locally. If a packet passes the network boundary,we need another addressing system to help distinguish the source and destinationsystems. The network layer adds a header to the packet coming from the upperlayer that, among other things, includes the logical addresses of the sender andreceiver. We discuss logical addresses later in this chapter.o Routing. When independent networks or links are connected to create intemetworks(network of networks) or a large network, the connecting devices (called routers
    • SECTION 2.3 LAYERS IN THE OSI MODEL 37or switches) route or switch the packets to their final destination. One of the func-tions of the network layer is to provide this mechanism.Figure 2.9 illustrates end-to-end delivery by the network layer.Figure 2.9 Source-to-destination deliveryEndsystemrLinkIntermediatesystemAEndsystemrEndsystemrE FHOP-lO-hop delivery Hop-to-hop delivery HOp-lO-hop deliverySource-to-destination deliveryA B E FNetwork- Network- NetworkData link Data link Data linkPhysical Physical PhysicalI. Source-to-destination delivery,IAs the figure shows, now we need a source-to-destination delivery. The network layerat A sends the packet to the network layer at B. When the packet arrives at router B, therouter makes a decision based on the final destination (F) of the packet. As we will seein later chapters, router B uses its routing table to find that the next hop is router E. Thenetwork layer at B, therefore, sends the packet to the network layer at E. The networklayer at E, in tum, sends the packet to the network layer at F.Transport LayerThe transport layer is responsible for process-to-process delivery of the entire mes-sage. A process is an application program running on a host. Whereas the network layeroversees source-to-destination delivery of individual packets, it does not recognizeany relationship between those packets. It treats each one independently, as thougheach piece belonged to a separate message, whether or not it does. The transport layer,on the other hand, ensures that the whole message arrives intact and in order, overseeingboth error control and flow control at the source-to-destination level. Figure 2.10 showsthe relationship of the transport layer to the network and session layers.
    • 38 CHAPTER 2 NETWORK MODELSFigure 2.10 Transport layerFrom session layer To session layerTransportlayerSegmentsFrom network layer//CH!lData II ITo network layer/ / I I IH4(Data rIH4f Data rIH4) Data 1I I I I I ISegmentsTransportlayerThe transport layer is responsible for the delivery of a message from one process to another.Other responsibilities of the transport layer include the following:o Service-point addressing. Computers often run several programs at the sametime. For this reason, source-to-destination delivery means delivery not only fromone computer to the next but also from a specific process (running program) onone computer to a specific process (running program) on the other. The transportlayer header must therefore include a type of address called a service-pointaddress (or port address). The network layer gets each packet to the correctcomputer; the transport layer gets the entire message to the correct process onthat computer.o Segmentation and reassembly. A message is divided into transmittable segments,with each segment containing a sequence number. These numbers enable the trans-port layer to reassemble the message correctly upon arriving at the destination andto identify and replace packets that were lost in transmission.o Connection control. The transport layer can be either connectionless or connection-oriented. A connectionless transport layer treats each segment as an independentpacket and delivers it to the transport layer at the destination machine. A connection-oriented transport layer makes a connection with the transport layer at the destina-tion machine first before delivering the packets. After all the data are transferred,the connection is terminated.o Flow control. Like the data link layer, the transport layer is responsible for flowcontrol. However, flow control at this layer is performed end to end rather thanacross a single link.o Error control. Like the data link layer, the transport layer is responsible forerror control. However, error control at this layer is performed process-to-process rather than across a single link. The sending transport layer makes surethat the entire message arrives at the receiving transport layer without error(damage, loss, or duplication). Error correction is usually achieved throughretransmission.
    • SECTION 2.3 LAYERS IN THE OSI MODEL 39Figure 2.11 illustrates process-to-process delivery by the transport layer.Figure 2.11 Reliable process-to-process delivery ofa messageProcesses Processes)-----~~~~C)~An internetIII,,,,/ ~~~~,....-----<, I I/ I I, I - . I . - - - - - - - - - - - - - - - - - - - - - - . J . I/ I Network layer I, Host-to-host deliveryLTransport layerProcess-to-process deliverySession LayerThe services provided by the first three layers (physical, data link, and network) arenot sufficient for some processes. The session layer is the network dialog controller.It establishes, maintains, and synchronizes the interaction among communicatingsystems.The session layer is responsible for dialog control and synchronization.Specific responsibilities of the session layer include the following:o Dialog control. The session layer allows two systems to enter into a dialog. Itallows the communication between two processes to take place in either half-duplex (one way at a time) or full-duplex (two ways at a time) mode.o Synchronization. The session layer allows a process to add checkpoints, or syn-Chronization points, to a stream of data. For example, if a system is sending a fileof 2000 pages, it is advisable to insert checkpoints after every 100 pages to ensurethat each 100-page unit is received and acknowledged independently. In this case,if a crash happens during the transmission of page 523, the only pages that need tobe resent after system recovery are pages 501 to 523. Pages previous to 501 neednot be resent. Figure 2.12 illustrates the relationship of the session layer to thetransport and presentation layers.Presentation LayerThe presentation layer is concerned with the syntax and semantics of the informationexchanged between two systems. Figure 2.13 shows the relationship between the pre-sentation layer and the application and session layers.
    • 40 CHAPTER 2 NETWORK MODELSFigure 2.12 Session layerIIII1/ I I II I I I I• , II~)~:{~~ ,r ~" 9 ~,Isyn syn synITo presentation layer~i1-,IIIIIIIIIFrom presentation layer1I/ ;f t/ I~ II~.•. lsyn syn syn1SessionlayerSessionlayerTo transport layer From transport layerFigure 2.13 Presentation layerFrom application layerITo application layer..I;.......,.1 --1~l ...,i "J)8,tfi~~. ,.JI IPresentationlayer...To session layerPresentationlayerFrom session layerThe presentation layer is responsible for translation, compression, and encryption.Specific responsibilities of the presentation layer include the following:o Translation. The processes (running programs) in two systems are usually exchang-ing information in the form of character strings, numbers, and so on. The infonna-tion must be changed to bit streams before being transmitted. Because differentcomputers use different encoding systems, the presentation layer is responsible forinteroperability between these different encoding methods. The presentation layerat the sender changes the information from its sender-dependent format into acommon format. The presentation layer at the receiving machine changes thecommon format into its receiver-dependent format.o Encryption. To carry sensitive information, a system must be able to ensureprivacy. Encryption means that the sender transforms the original information to
    • SECTION 2.3 LAYERS IN THE OSI MODEL 41another form and sends the resulting message out over the network. Decryptionreverses the original process to transform the message back to its original form.o Compression. Data compression reduces the number of bits contained in theinformation. Data compression becomes particularly important in the transmissionof multimedia such as text, audio, and video.Application LayerThe application layer enables the user, whether human or software, to access the net-work. It provides user interfaces and support for services such as electronic mail,remote file access and transfer, shared database management, and other types of distrib-uted information services.Figure 2.14 shows the relationship of the application layer to the user and the pre-sentation layer. Of the many application services available, the figure shows only three:XAOO (message-handling services), X.500 (directory services), and file transfer,access, and management (FTAM). The user in this example employs XAOO to send ane-mail message.Figure 2.14 Application layerData ~:.User(human or program)ApplicationlayerTo presentation layerUser(human or program)ApplicationlayerFrom presentation layerThe application layer is responsible for providing services to the user.Specific services provided by the application layer include the following:o Network virtual terminal. A network virtual terminal is a software version ofa physical terminal, and it allows a user to log on to a remote host. To do so, theapplication creates a software emulation of a terminal at the remote host. Theusers computer talks to the software terminal which, in turn, talks to the host,and vice versa. The remote host believes it is communicating with one of its ownterminals and allows the user to log on.
    • 42 CHAPTER 2 NETWORK MODELSo File transfer, access, and management. This application allows a user to accessfiles in a remote host (to make changes or read data), to retrieve files from a remotecomputer for use in the local computer, and to manage or control files in a remotecomputer locally.o Mail services. This application provides the basis for e-mail forwarding andstorage.o Directory services. This application provides distributed database sources andaccess for global information about various objects and services.Summary of LayersFigure 2.15 shows a summary of duties for each layer.Figure 2.15 Summary oflayersTo translate, encrypt, andcompress dataTo provide reliable process-to-process message delivery anderror recoveryTo organize bits into frames;to provide hop-to-hop deliveryApplicationPresentationSessionTransportNetworkData linkPhysicalTo allow access to networkresourcesTo establish, manage, andterminate sessionsTo move packets from sourceto destination; to provideinternetworkingTo transmit bits over a medium;to provide mechanical andelectrical specifications2.4 TCP/IP PROTOCOL SUITEThe TCPIIP protocol suite was developed prior to the OSI model. Therefore, the lay-ers in the TCP/IP protocol suite do not exactly match those in the OSI model. Theoriginal TCP/IP protocol suite was defined as having four layers: host-to-network,internet, transport, and application. However, when TCP/IP is compared to OSI, we cansay that the host-to-network layer is equivalent to the combination of the physical anddata link layers. The internet layer is equivalent to the network layer, and the applica-tion layer is roughly doing the job of the session, presentation, and application layerswith the transport layer in TCPIIP taking care of part of the duties of the session layer.So in this book, we assume that the TCPIIP protocol suite is made of five layers: physi-cal, data link, network, transport, and application. The first four layers provide physicalstandards, network interfaces, internetworking, and transport functions that correspondto the first four layers of the OSI model. The three topmost layers in the OSI model,however, are represented in TCPIIP by a single layer called the application layer (seeFigure 2.16).
    • SECTION 2.4 TCPIIP PROTOCOL SUITE 43Figure 2.16 TCPIIP and OSI modelIApplicationApplicationsJ8GB8GBI Presentation ... ]ISession1I Transport _ _ _SC_TP_ _! IL-.-__TC_P_ _I I UD_P_ _III ICMP II IGMP INetworkIP(internet)IRARP II ARP IIData linkI PhysicalProtocols defined bythe underlying networks(host-to-network)J1TCP/IP is a hierarchical protocol made up of interactive modules, each of whichprovides a specific functionality; however, the modules are not necessarily interdepen-dent. Whereas the OSI model specifies which functions belong to each of its layers,the layers of the TCP/IP protocol suite contain relatively independent protocols thatcan be mixed and matched depending on the needs of the system. The term hierarchi-cal means that each upper-level protocol is supported by one or more lower-levelprotocols.At the transport layer, TCP/IP defines three protocols: Transmission ControlProtocol (TCP), User Datagram Protocol (UDP), and Stream Control TransmissionProtocol (SCTP). At the network layer, the main protocol defined by TCP/IP is theInternetworking Protocol (IP); there are also some other protocols that support datamovement in this layer.Physical and Data Link LayersAt the physical and data link layers, TCPIIP does not define any specific protocol. Itsupports all the standard and proprietary protocols. A network in a TCPIIP internetworkcan be a local-area network or a wide-area network.Network LayerAt the network layer (or, more accurately, the internetwork layer), TCP/IP supportsthe Internetworking Protocol. IP, in turn, uses four supporting protocols: ARP,RARP, ICMP, and IGMP. Each of these protocols is described in greater detail in laterchapters.
    • 44 CHAPTER 2 NETWORK MODELSInternetworking Protocol (IP)The Internetworking Protocol (IP) is the transmission mechanism used by the TCP/IPprotocols. It is an unreliable and connectionless protocol-a best-effort delivery service.The term best effort means that IP provides no error checking or tracking. IP assumesthe unreliability of the underlying layers and does its best to get a transmission throughto its destination, but with no guarantees.IP transports data in packets called datagrams, each of which is transported sepa-rately. Datagrams can travel along different routes and can arrive out of sequence or beduplicated. IP does not keep track of the routes and has no facility for reordering data-grams once they arrive at their destination.The limited functionality of IP should not be considered a weakness, however. IPprovides bare-bones transmission functions that free the user to add only those facilitiesnecessary for a given application and thereby allows for maximum efficiency. IP is dis-cussed in Chapter 20.Address Resolution ProtocolThe Address Resolution Protocol (ARP) is used to associate a logical address with aphysical address. On a typical physical network, such as a LAN, each device on a linkis identified by a physical or station address, usually imprinted on the network interfacecard (NIC). ARP is used to find the physical address of the node when its Internetaddress is known. ARP is discussed in Chapter 21.Reverse Address Resolution ProtocolThe Reverse Address Resolution Protocol (RARP) allows a host to discover its Inter-net address when it knows only its physical address. It is used when a computer is con-nected to a network for the first time or when a diskless computer is booted. We discussRARP in Chapter 21.Internet Control Message ProtocolThe Internet Control Message Protocol (ICMP) is a mechanism used by hosts andgateways to send notification of datagram problems back to the sender. ICMP sendsquery and error reporting messages. We discuss ICMP in Chapter 21.Internet Group Message ProtocolThe Internet Group Message Protocol (IGMP) is used to facilitate the simultaneoustransmission of a message to a group of recipients. We discuss IGMP in Chapter 22.Transport LayerTraditionally the transport layer was represented in TCP/IP by two protocols: TCP andUDP. IP is a host-to-host protocol, meaning that it can deliver a packet from onephysical device to another. UDP and TCP are transport level protocols responsiblefor delivery of a message from a process (running program) to another process. A newtransport layer protocol, SCTP, has been devised to meet the needs of some newerapplications.
    • SECTION 2.5 ADDRESSING 45User Datagram ProtocolThe User Datagram Protocol (UDP) is the simpler of the two standard TCPIIP transportprotocols. It is a process-to-process protocol that adds only port addresses, checksumerror control, and length information to the data from the upper layer. UDP is discussedin Chapter 23.Transmission Control ProtocolThe Transmission Control Protocol (TCP) provides full transport-layer services toapplications. TCP is a reliable stream transport protocol. The term stream, in this con-text, means connection-oriented: A connection must be established between both endsof a transmission before either can transmit data.At the sending end of each transmission, TCP divides a stream of data into smallerunits called segments. Each segment includes a sequence number for reordering afterreceipt, together with an acknowledgment number for the segments received. Segmentsare carried across the internet inside of IP datagrams. At the receiving end, TCP col-lects each datagram as it comes in and reorders the transmission based on sequencenumbers. TCP is discussed in Chapter 23.Stream Control Transmission ProtocolThe Stream Control Transmission Protocol (SCTP) provides support for newerapplications such as voice over the Internet. It is a transport layer protocol that com-bines the best features of UDP and TCP. We discuss SCTP in Chapter 23.Application LayerThe application layer in TCPIIP is equivalent to the combined session, presentation,and application layers in the OSI modeL Many protocols are defined at this layer. Wecover many of the standard protocols in later chapters.2.5 ADDRESSINGFour levels of addresses are used in an internet employing the TCP/IP protocols:physical (link) addresses, logical (IP) addresses, port addresses, and specificaddresses (see Figure 2.17).Figure 2.17 Addresses in TCPIIPAddressesII I I IPhysical Logical Port Specificaddresses addresses addresses addresses
    • 46 CHAPTER 2 NETWORK MODELSEach address is related to a specific layer in the TCPIIP architecture, as shown inFigure 2.18.Figure 2.18 Relationship oflayers and addresses in TCPIIPPhysicaladdresses• Specificaddresses• Portaddresses.. LogicaladdressesIIIPandother protocolsUnderlying~ physical ~networksPhysical layerAppli"tio" I,,", II p=,= 11-----.- - - - . . IT""port I,,", IEJG [j~ 1-----.- - - - . . INetwork layerData link layerPhysical AddressesThe physical address, also known as the link address, is the address of a node as definedby its LAN or WAN. It is included in the frame used by the data link layer. It is thelowest-level address.The physical addresses have authority over the network (LAN or WAN). The sizeand format of these addresses vary depending on the network. For example, Ethernetuses a 6-byte (48-bit) physical address that is imprinted on the network interface card(NIC). LocalTalk (Apple), however, has a I-byte dynamic address that changes eachtime the station comes up.Example 2.1In Figure 2.19 a node with physical address 10 sends a frame to a node with physical address 87.The two nodes are connected by a link (bus topology LAN). At the data link layer, this framecontains physical (link) addresses in the header. These are the only addresses needed. The rest ofthe header contains other information needed at this level. The trailer usually contains extra bitsneeded for error detection. As the figure shows, the computer with physical address lOis thesender, and the computer with physical address 87 is the receiver. The data link layer at thesender receives data from an upper layer. It encapsulates the data in a frame, adding a header anda trailer. The header, among other pieces of information, carries the receiver and the sender phys-ical (link) addresses. Note that in most data link protocols, the destination address, 87 in thiscase, comes before the source address (10 in this case).We have shown a bus topology for an isolated LAN. In a bus topology, the frame is propa-gated in both directions (left and right). The frame propagated to the left dies when it reaches theend of the cable if the cable end is terminated appropriately. The frame propagated to the right is
    • SECTION 2.5 ADDRESSING 47Figure 2.19 Physical addresses53 __Sender__ 28Destination address doesnot match; the packet isdropped•••LAN"Receiversent to every station on the network. Each station with a physical addresses other than 87 dropsthe frame because the destination address in the frame does not match its own physical address.The intended destination computer, however, finds a match between the destination address in theframe and its own physical address. The frame is checked, the header and trailer are dropped, andthe data part is decapsulated and delivered to the upper layer.Example 2.2As we will see in Chapter 13, most local-area networks use a 48-bit (6-byte) physical addresswritten as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, asshown below:07:01:02:01:2C:4BA 6-byte (12 hexadecimal digits) physical addressLogical AddressesLogical addresses are necessary for universal communications that are independent ofunderlying physical networks. Physical addresses are not adequate in an internetworkenvironment where different networks can have different address formats. A universaladdressing system is needed in which each host can be identified uniquely, regardlessof the underlying physical network.The logical addresses are designed for this purpose. A logical address in the Internetis currently a 32-bit address that can uniquely define a host connected to the Internet. Notwo publicly addressed and visible hosts on the Internet can have the same IP address.Example 2.3Figure 2.20 shows a part of an internet with two routers connecting three LANs. Each device(computer or router) has a pair of addresses (logical and physical) for each connection. In thiscase, each computer is connected to only one link and therefore has only one pair of addresses.Each router, however, is connected to three networks (only two are shown in the figure). So eachrouter has three pairs of addresses, one for each connection. Although it may obvious that eachrouter must have a separate physical address for each connection, it may not be obvious why itneeds a logical address for each connection. We discuss these issues in Chapter 22 when we dis-cuss routing.
    • 48 CHAPTER 2 NETWORK MODELSFigure 2.20 IP addressesAI10LAN 2To anothernetwork Y/55To another XJ44networkPh)sicaladdlesscschangedLAN 3-~~_~I~I JRouterll~tE]LAN 1P/95The computer with logical address A and physical address 10 needs to send apacket to the computer with logical address P and physical address 95. We use letters toshow the logical addresses and numbers for physical addresses, but note that both areactually numbers, as we will see later in the chapter.The sender encapsulates its data in a packet at the network layer and adds two logicaladdresses (A and P). Note that in most protocols, the logical source address comes beforethe logical destination address (contrary to the order of physical addresses). The networklayer, however, needs to find the physical address of the next hop before the packet can bedelivered. The network layer consults its routing table (see Chapter 22) and finds thelogical address of the next hop (router I) to be F. The ARP discussed previously findsthe physical address of router 1 that corresponds to the logical address of 20. Now thenetwork layer passes this address to the data link layer, which in tum, encapsulates thepacket with physical destination address 20 and physical source address 10.The frame is received by every device on LAN 1, but is discarded by all exceptrouter 1, which finds that the destination physical address in the frame matches with itsown physical address. The router decapsulates the packet from the frame to read the log-ical destination address P. Since the logical destination address does not match therouters logical address, the router knows that the packet needs to be forwarded. The
    • SECTION 2.5 ADDRESSING 49router consults its routing table and ARP to find the physical destination address of thenext hop (router 2), creates a new frame, encapsulates the packet, and sends it to router 2.Note the physical addresses in the frame. The source physical address changesfrom 10 to 99. The destination physical address changes from 20 (router 1 physicaladdress) to 33 (router 2 physical address). The logical source and destination addressesmust remain the same; otherwise the packet will be lost.At router 2 we have a similar scenario. The physical addresses are changed, and anew frame is sent to the destination computer. When the frame reaches the destination,the packet is decapsulated. The destination logical address P matches the logical addressof the computer. The data are decapsulated from the packet and delivered to the upperlayer. Note that although physical addresses will change from hop to hop, logicaladdresses remain the same from the source to destination. There are some exceptions tothis rule that we discover later in the book.The physical addresses will change from hop to hop,but the logical addresses usually remain the same.Port AddressesThe IP address and the physical address are necessary for a quantity of data to travelfrom a source to the destination host. However, arrival at the destination host is not thefinal objective of data communications on the Internet. A system that sends nothing butdata from one computer to another is not complete. Today, computers are devices thatcan run multiple processes at the same time. The end objective of Internet communica-tion is a process communicating with another process. For example, computer A cancommunicate with computer C by using TELNET. At the same time, computer A com-municates with computer B by using the File Transfer Protocol (FTP). For these pro-cesses to receive data simultaneously, we need a method to label the different processes.In other words, they need addresses. In the TCPIIP architecture, the label assigned to aprocess is called a port address. A port address in TCPIIP is 16 bits in length.Example 2.4Figure 2.21 shows two computers communicating via the Internet. The sending computer is run-ning three processes at this time with port addresses a, b, and c. The receiving computer is runningtwo processes at this time with port addresses j and k. Process a in the sending computer needs tocommunicate with process j in the receiving computer. Note that although both computers areusing the same application, FTP, for example, the port addresses are different because one is a clientprogram and the other is a server program, as we will see in Chapter 23. To show that data fromprocess a need to be delivered to process j, and not k, the transport layer encapsulates data fromthe application layer in a packet and adds two port addresses (a and j), source and destination. Thepacket from the transport layer is then encapsulated in another packet at the network layer withlogical source and destination addresses (A and P). Finally, this packet is encapsulated in a framewith the physical source and destination addresses of the next hop. We have not shown the physi-cal addresses because they change from hop to hop inside the cloud designated as the Internet.Note that although physical addresses change from hop to hop, logical and port addresses remainthe same from the source to destination. There are some exceptions to this rule that we discusslater in the book.
    • 50 CHAPTER 2 NETWORK MODELSFigure 2.21 Port addressesa b cDD- - - - Data link layer - - --Internetj kDDThe physical addresses change from hop to hop,but the logical and port addresses usually remain the same.Example 2.5As we will see in Chapter 23, a port address is a 16-bit address represented by one decimal num-her as shown.753A 16-bit port address represented as one single numberSpecific AddressesSome applications have user-friendly addresses that are designed for that specific address.Examples include the e-mail address (for example, forouzan@fhda.edu) and the UniversalResource Locator (URL) (for example, www.mhhe.com). The first defines the recipient ofan e-mail (see Chapter 26); the second is used to find a document on the World Wide Web(see Chapter 27). These addresses, however, get changed to the corresponding port andlogical addresses by the sending computer, as we will see in Chapter 25.2.6 RECOMMENDED READINGFor more details about subjects discussed in this chapter, we recommend the followingbooks and sites. The items enclosed in brackets, [...] refer to the reference list at theend of the text.
    • SECTION 2. 7 KEY TERMS 51BooksNetwork models are discussed in Section 1.3 of [Tan03], Chapter 2 of [For06], Chapter 2of [Sta04], Sections 2.2 and 2.3 of [GW04], Section 1.3 of [PD03], and Section 1.7 of[KR05]. A good discussion about addresses can be found in Section 1.7 of [Ste94].SitesThe following site is related to topics discussed in this chapter.o www.osi.org! Information about OS1.RFCsThe following site lists all RFCs, including those related to IP and port addresses.o www.ietLorg/rfc.html2.7 KEY TERMSaccess controlAddress Resolution Protocol (ARP)application layerbest-effort deliverybitsconnection controldata link layerencodingerrorerror controlflow controlframeheaderhop-to-hop deliveryhost-to-host protocolinterfaceInternet Control Message Protocol(ICMP)Internet Group Message Protocol (IGMP)logical addressingmail servicenetwork layernode-to-node deliveryopen systemOpen Systems Interconnection (OSI)modelpeer-to-peer processphysical addressingphysical layerport addresspresentation layerprocess-to-process deliveryReverse Address Resolution Protocol(RARP)routingsegmentationsession layersource-to-destination deliveryStream Control Transmission Protocol(SCTP)synchronization pointTCPIIP protocol suitetrailerTransmission Control Protocol (TCP)transmission ratetransport layertransport level protocolsUser Datagram Protocol (UDP)
    • 52 CHAPTER 2 NETWORK MODELS2.8 SUMMARYo The International Standards Organization created a model called the Open SystemsInterconnection, which allows diverse systems to communicate.U The seven-layer OSI model provides guidelines for the development of universallycompatible networking protocols.o The physical, data link, and network layers are the network support layers.o The session, presentation, and application layers are the user support layers.D The transport layer links the network support layers and the user support layers.o The physical layer coordinates the functions required to transmit a bit stream overa physical medium.o The data link layer is responsible for delivering data units from one station to thenext without errors.o The network layer is responsible for the source-to-destination delivery of a packetacross multiple network links.[J The transport layer is responsible for the process-to-process delivery of the entiremessage.D The session layer establishes, maintains, and synchronizes the interactions betweencommunicating devices.U The presentation layer ensures interoperability between communicating devicesthrough transformation of data into a mutually agreed upon format.o The application layer enables the users to access the network.o TCP/IP is a five-layer hierarchical protocol suite developed before the OSI model.U The TCP/IP application layer is equivalent to the combined session, presentation,and application layers of the OSI model.U Four levels of addresses are used in an internet following the TCP/IP protocols: phys-ical (link) addresses, logical (IP) addresses, port addresses, and specific addresses.o The physical address, also known as the link address, is the address of a node asdefined by its LAN or WAN.L,J The IP address uniquely defines a host on the Internet.U The port address identifies a process on a host.o A specific address is a user-friendly address.2.9 PRACTICE SETReview QuestionsI. List the layers of the Internet model.2. Which layers in the Internet model are the network support layers?3. Which layer in the Internet model is the user support layer?4. What is the difference between network layer delivery and transport layer delivery?
    • SECTION 2.9 PRACTICE SET 535. What is a peer-to-peer process?6. How does information get passed from one layer to the next in the Internetmodel?7. What are headers and trailers, and how do they get added and removed?X. What are the concerns of the physical layer in the Internet model?9. What are the responsibilities of the data link layer in the Internet model?10. What are the responsibilities of the network layer in the Internet model?II. What are the responsibilities of the transport layer in the Internet model?12. What is the difference between a port address, a logical address, and a physicaladdress?13. Name some services provided by the application layer in the Internet model.14. How do the layers of the Internet model correlate to the layers of the OSI model?Exercises15. How are OSI and ISO related to each other?16. Match the following to one or more layers of the OSI model:a. Route determinationb. Flow controlc. Interface to transmission mediad. Provides access for the end userI7. Match the following to one or more layers of the OSI model:a. Reliable process-to-process message deliveryb. Route selectionc. Defines framesd. Provides user services such as e-mail and file transfere. Transmission of bit stream across physical medium8. Match the following to one or more layers of the OSl model:a. Communicates directly with users application programb. Error correction and retransmissionc. Mechanical, electrical, and functional interfaced. Responsibility for carrying frames between adjacent nodesI9. Match the following to one or more layers of the OSI model:a. Format and code conversion servicesb. Establishes, manages, and terminates sessionsc. Ensures reliable transmission of datad. Log-in and log-out procedurese. Provides independence from differences in data representation20. In Figure 2.22, computer A sends a message to computer D via LANl, router Rl,and LAN2. Show the contents of the packets and frames at the network and datalink layer for each hop interface.
    • 54 CHAPTER 2 NETWORK MODELSFigure 2.22 Exercise 20Sender 8/42LAN 1RlLAN 2 Sender21. In Figure 2.22, assume that the communication is between a process running atcomputer A with port address i and a process running at computer D with portaddress j. Show the contents of packets and frames at the network, data link, andtransport layer for each hop.22. Suppose a computer sends a frame to another computer on a bus topology LAN.The physical destination address of the frame is corrupted during the transmission.What happens to the frame? How can the sender be informed about the situation?23. Suppose a computer sends a packet at the network layer to another computersomewhere in the Internet. The logical destination address of the packet is cor-rupted. What happens to the packet? How can the source computer be informed ofthe situation?24. Suppose a computer sends a packet at the transport layer to another computersomewhere in the Internet. There is no process with the destination port addressrunning at the destination computer. What will happen?25. If the data link layer can detect errors between hops, why do you think we needanother checking mechanism at the transport layer?Research Activities26. Give some advantages and disadvantages of combining the session, presentation,and application layer in the OSI model into one single application layer in theInternet model.27. Dialog control and synchronization are two responsibilities of the session layer inthe OSI model. Which layer do you think is responsible for these duties in theInternet model? Explain your answer.28. Translation, encryption, and compression are some of the duties of the presentationlayer in the OSI model. Which layer do you think is responsible for these duties inthe Internet model? Explain your answer.29. There are several transport layer models proposed in the OSI model. Find all ofthem. Explain the differences between them.30. There are several network layer models proposed in the OSI model. Find all ofthem. Explain the differences between them.
    • Physical Layerand MediaObjectivesWe start the discussion of the Internet model with the bottom-most layer, the physicallayer. It is the layer that actually interacts with the transmission media, the physical partof the network that connects network components together. This layer is involved inphysically carrying information from one node in the network to the next.The physical layer has complex tasks to perform. One major task is to provideservices for the data link layer. The data in the data link layer consists of Os and Is orga-nized into frames that are ready to be sent across the transmission medium. This streamof Os and Is must first be converted into another entity: signals. One of the services pro-vided by the physical layer is to create a signal that represents this stream of bits.The physical layer must also take care of the physical network, the transmissionmedium. The transmission medium is a passive entity; it has no internal program orlogic for control like other layers. The transmission medium must be controlled by thephysical layer. The physical layer decides on the directions of data flow. The physicallayer decides on the number of logical channels for transporting data coming fromdifferent sources.In Part 2 of the book, we discuss issues related to the physical layer and the trans-mission medium that is controlled by the physical layer. In the last chapter of Part 2, wediscuss the structure and the physical layers of the telephone network and the cablenetwork.Part 2 of the book is devoted to the physical layerand the transmission media.
    • ChaptersThis part consists of seven chapters: Chapters 3 to 9.Chapter 3Chapter 3 discusses the relationship between data, which are created by a device, andelectromagnetic signals, which are transmitted over a medium.Chapter 4Chapter 4 deals with digital transmission. We discuss how we can covert digital oranalog data to digital signals.Chapter 5Chapter 5 deals with analog transmission. We discuss how we can covert digital oranalog data to analog signals.Chapter 6Chapter 6 shows how we can use the available bandwidth efficiently. We discuss twoseparate, but related topics, multiplexing and spreading.Chapter 7After explaining some ideas about data and signals and how we can use them effi-ciently, we discuss the characteristics of transmission media, both guided andunguided, in this chapter. Although transmission media operates under the physicallayer, they are controlled by the physical layer.Chapter 8Although the previous chapters in this part are issues related to the physical layer ortransmission media, Chapter 8 discusses switching, a topic that can be related to severallayers. We have included this topic in this part of the book to avoid repeating the dis-cussion for each layer.Chapter 9Chapter 9 shows how the issues discussed in the previous chapters can be used in actualnetworks. In this chapter, we first discuss the telephone network as designed to carryvoice. We then show how it can be used to carry data. Second, we discuss the cable net-work as a television network. We then show how it can also be used to carry data.
    • CHAPTER 3Data and SignalsOne of the major functions of the physical layer is to move data in the form of electro-magnetic signals across a transmission medium. Whether you are collecting numericalstatistics from another computer, sending animated pictures from a design workstation,or causing a bell to ring at a distant control center, you are working with the transmis-sion of data across network connections.Generally, the data usable to a person or application are not in a form that can betransmitted over a network. For example, a photograph must first be changed to a formthat transmission media can accept. Transmission media work by conducting energyalong a physical path.To be transmitted, data must be transformed to electromagnetic signals.3.1 ANALOG AND DIGITALBoth data and the signals that represent them can be either analog or digital in form.Analog and Digital DataData can be analog or digital. The term analog data refers to information that is contin-uous; digital data refers to information that has discrete states. For example, an analogclock that has hour, minute, and second hands gives information in a continuous form;the movements of the hands are continuous. On the other hand, a digital clock thatreports the hours and the minutes will change suddenly from 8:05 to 8:06.Analog data, such as the sounds made by a human voice, take on continuous values.When someone speaks, an analog wave is created in the air. This can be captured by amicrophone and converted to an analog signal or sampled and converted to a digitalsignal.Digital data take on discrete values. For example, data are stored in computermemory in the form of Os and 1s. They can be converted to a digital signal or modu-lated into an analog signal for transmission across a medium.57
    • 58 CHAPTER 3 DATA AND SIGNALSData can be analog or digital. Analog data are continuous and take continuous values.Digital data have discrete states and take discrete values.Analog and Digital SignalsLike the data they represent, signals can be either analog or digital. An analog signalhas infinitely many levels of intensity over a period of time. As the wave moves fromvalue A to value B, it passes through and includes an infinite number of values along itspath. A digital signal, on the other hand, can have only a limited number of definedvalues. Although each value can be any number, it is often as simple as 1 and O.The simplest way to show signals is by plotting them on a pair of perpendicularaxes. The vertical axis represents the value or strength of a signal. The horizontal axisrepresents time. Figure 3.1 illustrates an analog signal and a digital signal. The curverepresenting the analog signal passes through an infinite number of points. The verticallines of the digital signal, however, demonstrate the sudden jump that the signal makesfrom value to value.Signals can be analog or digital. Analog signals can have an infinite number ofvalues in a range; digital signals can have only a limited number of values.Figure 3.1 Comparison ofanalog and digital signalsValue ValueTime-Tim----ea. Analog signal b. Digital signalPeriodic and Nonperiodic SignalsBoth analog and digital signals can take one of two forms: periodic or nonperiodic(sometimes refer to as aperiodic, because the prefix a in Greek means "non").A periodic signal completes a pattern within a measurable time frame, called aperiod, and repeats that pattern over subsequent identical periods. The completion ofone full pattern is called a cycle. A nonperiodic signal changes without exhibiting a pat-tern or cycle that repeats over time.Both analog and digital signals can be periodic or nonperiodic. In data communi-cations, we commonly use periodic analog signals (because they need less bandwidth,
    • SECTION 3.2 PERIODIC ANALOG SIGNALS 59as we will see in Chapter 5) and nonperiodic digital signals (because they can representvariation in data, as we will see in Chapter 6).In data communications, we commonly use periodicanalog signals and nonperiodic digital signals.3.2 PERIODIC ANALOG SIGNALSPeriodic analog signals can be classified as simple or composite. A simple periodicanalog signal, a sine wave, cannot be decomposed into simpler signals. A compositeperiodic analog signal is composed of multiple sine waves.Sine WaveThe sine wave is the most fundamental form of a periodic analog signal. When wevisualize it as a simple oscillating curve, its change over the course of a cycle is smoothand consistent, a continuous, rolling flow. Figure 3.2 shows a sine wave. Each cycleconsists of a single arc above the time axis followed by a single arc below it.Figure 3.2 A sine waveValueTimeWe discuss a mathematical approach to sine waves in Appendix C.A sine wave can be represented by three parameters: the peak amplitude, the fre-quency, and the phase. These three parameters fully describe a sine wave.Peak AmplitudeThe peak amplitude of a signal is the absolute value of its highest intensity, propor-tional to the energy it carries. For electric signals, peak amplitude is normally measuredin volts. Figure 3.3 shows two signals and their peak amplitudes.Example 3.1The power in your house can be represented by a sine wave with a peak amplitude of 155 to 170 V.However, it is common knowledge that the voltage of the power in U.S. homes is 110 to 120 V.
    • 60 CHAPTER 3 DATA AND SIGNALSFigure 3.3 Two signals with the same phase andfrequency, but different amplitudesAmplitudePeak amplitudeTimea. A signal with high peak amplitudeAmplitudeTimeb. A signal with low peak amplitudeThis discrepancy is due to the fact that these are root mean square (rms) values. The signal issquared and then the average amplitude is calculated. The peak value is equal to 2112x rmsvalue.Example 3.2The voltage of battery is a constant; this constant value can be considered a sine wave, as we willsee later. For example, the peak value of an AA battery is normally 1.5 V.Period and FrequencyPeriod refers to the amount of time, in seconds, a signal needs to complete 1 cycle.Frequency refers to the number of periods in I s. Note that period and frequency are justone characteristic defined in two ways. Period is the inverse of frequency, and frequencyis the inverse of period, as the following formulas show.1f= -Tand1T=-fFrequency and period are the inverse of each other.Figure 3.4 shows two signals and their frequencies.
    • SECTION 3.2 PERIODIC ANALOG SIGNALS 61Figure 3.4 Two signals with the same amplitude and phase, but different frequenciesAmplitude12 periods in Is-----+- Frequency is 12 Hz1 sTimePeriod: nsa. A signal with a frequency of 12 HzAmplitude6 periods in Is-----+- Frequency is 6 Hz1 sI •••TimeTPeriod: tsb. A signal with a frequency of 6 HzPeriod is formally expressed in seconds. Frequency is formally expressed inHertz (Hz), which is cycle per second. Units of period and frequency are shown inTable 3.1.Table 3.1 Units ofperiod andfrequencyUnit Equivalent Unit EquivalentSeconds (s) 1 s Hertz (Hz) 1 HzMilliseconds (ms) 10-3 s Kilohertz (kHz) 103 HzMicroseconds (Ils) 10-6 s Megahertz (MHz) 106HzNanoseconds (ns) 10-9 s Gigahertz (GHz) 109 HzPicoseconds (ps) 10-12 s Terahertz (THz) 1012HzExample 3.3The power we use at home has a frequency of 60 Hz (50 Hz in Europe). The period of this sinewave can be determined as follows:T= 1= 610 = 0.0166 s = 0.0166 x 103ms =16.6 illSThis means that the period of the power for our lights at home is 0.0116 s, or 16.6 ms. Oureyes are not sensitive enough to distinguish these rapid changes in amplitude.
    • 62 CHAPTER 3 DATA AND SIGNALSExample 3.4Express a period of 100 ms in microseconds.SolutionFrom Table 3.1 we find the equivalents of 1 ms (l ms is 10-3s) and 1 s (1 sis 106118). We makethe following substitutions:100 ms:;;::; 100 X 10-3 s:;;::; 100 X 10-3 X 106 JlS:;;::; 102 X 10-3 X 106 JlS :::::: 105 JlSExample 3.5The period of a signal is 100 ms. What is its frequency in kilohertz?SolutionFirst we change lOO ms to seconds, and then we calculate the frequency from the period (1 Hz =10-3 kHz).100 ms = 100 X 10-3 S =10-1Sf= 1. = _1_ Hz = 10 Hz = 10 X 10-3 kHz =10-2 kHzT 10-1More About FrequencyWe already know that frequency is the relationship ofa signal to time and that the frequencyof a wave is the number of cycles it completes in 1 s. But another way to look at frequencyis as a measurement of the rate of change. Electromagnetic signals are oscillating wave-forms; that is, they fluctuate continuously and predictably above and below a mean energylevel. A 40-Hz signal has one-half the frequency of an 80-Hz signal; it completes 1 cycle intwice the time of the 80-Hz signal, so each cycle also takes twice as long to change from itslowest to its highest voltage levels. Frequency, therefore, though described in cycles per sec-ond (hertz), is a general measurement of the rate of change of a signal with respect to time.Frequency is the rate of change with respect to time. Change in a short span of timemeans high frequency. Change over a long span of time means low frequency.If the value of a signal changes over a very short span of time, its frequency ishigh. If it changes over a long span of time, its frequency is low.Two ExtremesWhat if a signal does not change at all? What if it maintains a constant voltage level for theentire time it is active? In such a case, its frequency is zero. Conceptually, this idea is a sim-ple one. Ifa signal does not change at all, it never completes a cycle, so its frequency is aHz.But what if a signal changes instantaneously? What if it jumps from one level toanother in no time? Then its frequency is infinite. In other words, when a signal changesinstantaneously, its period is zero; since frequency is the inverse of period, in this case,the frequency is 1/0, or infinite (unbounded).
    • SECTION 3.2 PERiODIC ANALOG SIGNALS 63If a signal does not change at all, its frequency is zero.If a signal changes instantaneously, its frequency is infinite.PhaseThe term phase describes the position of the waveform relative to time O. If we think ofthe wave as something that can be shifted backward or forward along the time axis,phase describes the amount of that shift. It indicates the status of the first cycle.Phase describes the position of the waveform relative to time O.Phase is measured in degrees or radians [360° is 2n rad; 1° is 2n/360 rad, and 1 radis 360/(2n)]. A phase shift of 360° corresponds to a shift of a complete period; a phaseshift of 180° corresponds to a shift of one-half of a period; and a phase shift of 90° cor-responds to a shift of one-quarter of a period (see Figure 3.5).Figure 3.5 Three sine waves with the same amplitude andfrequency, but different phasesa. 0 degrees*AAL1!4TOJ~b. 90 degreesc. 180 degrees•Time~Time)ITimeLooking at Figure 3.5, we can say thatI. A sine wave with a phase of 0° starts at time 0 with a zero amplitude. Theamplitude is increasing.2. A sine wave with a phase of 90° starts at time 0 with a peak amplitude. Theamplitude is decreasing.
    • 64 CHAPTER 3 DATA AND SIGNALS3. A sine wave with a phase of 180° starts at time 0 with a zero amplitude. Theamplitude is decreasing.Another way to look at the phase is in terms of shift or offset. We can say that1. A sine wave with a phase of 0° is not shifted.2. A sine wave with a phase of 90° is shifted to the left by ! cycle. However, note4that the signal does not really exist before time O.3. A sine wave with a phase of 180° is shifted to the left by ~ cycle. However, notethat the signal does not really exist before time O.Example 3.6A sine wave is offset ~ cycle with respect to time O. What is its phase in degrees and radians?SolutionWe know that 1 complete cycle is 360°. Therefore, i cycle is! x 360;::; 60° =60 x 2n tad;::; ~ fad;::; 1.046 rad6 360 3WavelengthWavelength is another characteristic of a signal traveling through a transmissionmedium. Wavelength binds the period or the frequency of a simple sine wave to thepropagation speed of the medium (see Figure 3.6).Figure 3.6 Wavelength and periodWavelength" " " :. :Transmission medium / - ~ / -Direction ofpropagationWhile the frequency of a signal is independent of the medium, the wavelengthdepends on both the frequency and the medium. Wavelength is a property of any typeof signal. In data communications, we often use wavelength to describe the transmis-sion of light in an optical fiber. The wavelength is the distance a simple signal can travelin one period.Wavelength can be calculated if one is given the propagation speed (the speed oflight) and the period of the signal. However, since period and frequency are related toeach other, if we represent wavelength by A, propagation speed by c (speed of light), andfrequency by1, we get. • propagation speedWavelength =propagatJon speed x perJod ;::; {requency
    • SECTION 3.2 PERIODIC ANALOG SIGNALS 6SThe propagation speed of electromagnetic signals depends on the medium and onthe frequency of the signal. For example, in a vacuum, light is propagated with a speedof 3 x 108 mls. That speed is lower in air and even lower in cable.The wavelength is normally measured in micrometers (microns) instead of meters.For example, the wavelength of red light (frequency =4 x 1014) in air is8c 3xlO -6A= - = =0.75 x 10 m=0.75!J.mf 4x 1014In a coaxial or fiber-optic cable, however, the wavelength is shorter (0.5 !Jm) because thepropagation speed in the cable is decreased.Time and Frequency DomainsA sine wave is comprehensively defined by its amplitude, frequency, and phase. Wehave been showing a sine wave by using what is called a time-domain plot. Thetime-domain plot shows changes in signal amplitude with respect to time (it is anamplitude-versus-time plot). Phase is not explicitly shown on a time-domain plot.To show the relationship between amplitude and frequency, we can use what iscalled a frequency-domain plot. A frequency-domain plot is concerned with only thepeak value and the frequency. Changes of amplitude during one period are not shown.Figure 3.7 shows a signal in both the time and frequency domains.Figure 3.7 The time-domain andfrequency-domain plots ofa sine waveAmplitudeFrequency: 6 HzPeak value: 5 V5 ----------Time(s)a. A sine wave in the time domain (peak value: 5 V, frequency: 6 Hz)AmplituderPeak value: 5 V5 --; -1-1--; --1--1--+-1-----111--+1-----111--+1-+-1-+1-+-1 ~.1 2 3 4 5 6 7 8 9 10 11 12 13 14 Frequency(Hz)b. The same sine wave in the frequency domain (peak value: 5 V, frequency: 6 Hz)
    • 66 CHAPTER 3 DATA AND SIGNALSIt is obvious that the frequency domain is easy to plot and conveys the informationthat one can find in a time domain plot. The advantage of the frequency domain is thatwe can immediately see the values of the frequency and peak amplitude. A completesine wave is represented by one spike. The position of the spike shows the frequency;its height shows the peak amplitude.A complete sine wave in the time domain can be representedby one single spike in the frequency domain.Example 3.7The frequency domain is more compact and useful when we are dealing with more than one sinewave. For example, Figure 3.8 shows three sine waves, each with different amplitude and fre-quency. All can be represented by three spikes in the frequency domain.Figure 3.8 The time domain andfrequency domain ofthree sine wavesAmplitude15 -10 - I5-o 8 16 Frequencya. Time-domain representation of three sine waves withfrequencies 0, 8, and 16b. Frequency-domain representation ofthe same three signals- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Composite SignalsSo far, we have focused on simple sine waves. Simple sine waves have many applica-tions in daily life. We can send a single sine wave to carry electric energy from oneplace to another. For example, the power company sends a single sine wave with a fre-quency of 60 Hz to distribute electric energy to houses and businesses. As anotherexample, we can use a single sine wave to send an alarm to a security center when aburglar opens a door or window in the house. In the first case, the sine wave is carryingenergy; in the second, the sine wave is a signal of danger.If we had only one single sine wave to convey a conversation over the phone, itwould make no sense and carry no information. We would just hear a buzz. As we willsee in Chapters 4 and 5, we need to send a composite signal to communicate data. Acomposite signal is made of many simple sine waves.A singleafrequency sine wave is not useful in data communications;we need to send a composite signal, a signal made of many simple sine waves.
    • SECTION 3.2 PERIODIC ANALOG SIGNALS 67In the early 1900s, the French mathematician Jean-Baptiste Fourier showed thatany composite signal is actually a combination of simple sine waves with different fre-quencies, amplitudes, and phases. Fourier analysis is discussed in Appendix C; for ourpurposes, we just present the concept.According to Fourier analysis, any composite signal is a combination ofsimple sine waves with different frequencies, amplitudes, and phases.Fourier analysis is discussed in Appendix C.A composite signal can be periodic or nonperiodic. A periodic composite signalcan be decomposed into a series of simple sine waves with discrete frequencies-frequencies that have integer values (1, 2, 3, and so on). A nonperiodic composite sig-nal can be decomposed into a combination of an infinite number of simple sine waveswith continuous frequencies, frequencies that have real values.If the composite signal is periodic, the decomposition gives a series of signals withdiscrete frequencies; if the composite signal is nonperiodic, the decompositiongives a combination of sine waves with continuous frequencies.Example 3.8Figure 3.9 shows a periodic composite signal with frequencyf This type of signal is not typicalof those found in data communications.We can consider it to be three alarm systems, each with adifferent frequency. The analysis of this signal can give us a good understanding of how todecompose signals.Figure 3.9 A composite periodic signal...TimeIt is very difficult to manually decompose this signal into a series of simple sine waves.However, there are tools, both hardware and software, that can help us do the job. We are not con-cerned about how it is done; we are only interested in the result. Figure 3.10 shows the result ofdecomposing the above signal in both the time and frequency domains.The amplitude of the sine wave with frequencyf is almost the same as the peak amplitude ofthe composite signal. The amplitude of the sine wave with frequency 3fis one-third of that of thefirst, and the amplitude of the sine wave with frequency 9fis one-ninth of the first. The frequency
    • 68 CHAPTER 3 DATA AND SIGNALSFigure 3.10 Decomposition ofa composite periodic signal in the time andfrequency domainsAmplitudea. Time-domain decomposition of a composite signal- Frequency1- Frequency 31- Frequency 91TimeAmplitudeWL...-----3~L...-------9L-!---------T~i~eb. Frequency-domain decomposition of the composite signalof the sine wave with frequencyf is the same as the frequency of the composite signal; it is calledthe fundamental frequency, or first harmonic. The sine wave with frequency 3fhas a frequencyof 3 times the fundamental frequency; it is called the third harmonic. The third sine wave with fre-quency 9fhas a frequency of 9 times the fundamental frequency; it is called the ninth harmonic.Note that the frequency decomposition of the signal is discrete; it has frequenciesf, 3f, and9f Because f is an integral number, 3fand 9f are also integral numbers. There are no frequenciessuch as 1.2f or 2.6f The frequency domain of a periodic composite signal is always made of dis-crete spikes.Example 3.9Figure 3.11 shows a nonperiodic composite signal. It can be the signal created by a microphone or atelephone set when a word or two is pronounced. In this case, the composite signal cannot be peri-odic, because that implies that we are repeating the same word or words with exactly the same tone.Figure 3.11 The time andfrequency domains ofa nonperiodic signalAmplitude AmplitudeAmplitude for sinewave of frequency1IA IAa. Time domain,v Time 1b. Frequency domain4 kHz Frequency
    • SECTION 3.2 PERIODIC ANALOG SIGNALS 69In a time-domain representation of this composite signal, there are an infinite num-ber of simple sine frequencies. Although the number of frequencies in a human voice isinfinite, the range is limited. A normal human being can create a continuous range offrequencies between 0 and 4 kHz.Note that the frequency decomposition of the signal yields a continuous curve.There are an infinite number of frequencies between 0.0 and 4000.0 (real values). To findthe amplitude related to frequency J, we draw a vertical line atfto intersect the envelopecurve. The height of the vertical line is the amplitude of the corresponding frequency.BandwidthThe range of frequencies contained in a composite signal is its bandwidth. The band-width is normally a difference between two numbers. For example, if a composite signalcontains frequencies between 1000 and 5000, its bandwidth is 5000 - 1000, or 4000.The bandwidth of a composite signal is the difference between thehighest and the lowest frequencies contained in that signal.Figure 3.12 shows the concept of bandwidth. The figure depicts two compositesignals, one periodic and the other nonperiodic. The bandwidth of the periodic signalcontains all integer frequencies between 1000 and 5000 (1000, 100I, 1002, ...). The band-width of the nonperiodic signals has the same range, but the frequencies are continuous.Figure 3.12 The bandwidth ofperiodic and nonperiodic composite signalsAmplitude1000I· Bandwidth = 5000 - 1000 = 4000 Hz5000 Frequency·1a. Bandwidth of a periodic signalAmplitude1000I· Bandwidth =5000 - 1000 = 4000 Hz5000 Frequency·1b. Bandwidth of a nonperiodic signal
    • 70 CHAPTER 3 DATA AND SIGNALSExample 3.10If a periodic signal is decomposed into five sine waves with frequencies of 100, 300, 500, 700,and 900 Hz, what is its bandwidth? Draw the spectrum, assuming all components have a maxi-mum amplitude of 10 V.SolutionLetfh be the highest frequency, fl the lowest frequency, and B the bandwidth. ThenB =fh - it = 900 - 100 =800 HzThe spectrum has only five spikes, at 100, 300, 500, 700, and 900 Hz (see Figure 3.13).Figure 3.13 The bandwidthfor Example 3.10Amplitude10+-----]Bandwidth =900 - 100 =800 Hz100I,300 500 700 900-IFrequencyExample 3.11A periodic signal has a bandwidth of 20 Hz. The highest frequency is 60 Hz. What is the lowestfrequency? Draw the spectrum if the signal contains all frequencies of the same amplitude.SolutionLetfh be the highest frequency,fz the lowest frequency, and B the bandwidth. ThenB =fh - fz :::::} 20 =60 - it =} .ft =60 - 20 =40 HzThe spectrum contains all integer frequencies. We show this by a series of spikes (see Figure 3.14).Figure 3.14 The bandwidth for Example 3.11III4041 42I, Bandwidth = 60 - 40 = 20 Hz585960·1Frequency(Hz)Example 3.12A nonperiodic composite signal has a bandwidth of 200 kHz, with a middle frequency of140 kHz and peak amplitude of 20 V. The two extreme frequencies have an amplitude of 0. Drawthe frequency domain of the signal.
    • SECT/ON 3.3 DIGITAL SIGNALS 71SolutionThe lowest frequency must be at 40 kHz and the highest at 240 kHz. Figure 3.15 shows the fre-quency domain and the bandwidth.Figure 3.15 The bandwidth for Example 3.12Amplitude40 kHz 140kHz 240 kHz FrequencyExample 3. J3An example of a nonperiodic composite signal is the signal propagated by an AM radio station, Inthe United States, each AM radio station is assigned a lO-kHz bandwidth. The total bandwidth ded-icated to AM radio ranges from 530 to 1700 kHz. We will show the rationale behind this lO-kHzbandwidth in Chapter 5.Example 3. J4Another example of a nonperiodic composite signal is the signal propagated by an FM radio sta-tion. In the United States, each FM radio station is assigned a 200-kHz bandwidth. The totalbandwidth dedicated to FM radio ranges from 88 to 108 MHz. We will show the rationale behindthis 200-kHz bandwidth in Chapter 5.Example 3./5Another example of a nonperiodic composite signal is the signal received by an old-fashionedanalog black-and-white TV. A TV screen is made up of pixels (picture elements) with each pixelbeing either white or black. The screen is scanned 30 times per second. (Scanning is actually60 times per second, but odd lines are scanned in one round and even lines in the next and theninterleaved.) If we assume a resolution of 525 x 700 (525 vertical lines and 700 horizontal lines),which is a ratio of 3:4, we have 367,500 pixels per screen. If we scan the screen 30 times per sec-ond, this is 367,500 x 30 = 11,025,000 pixels per second. The worst-case scenario is alternatingblack and white pixels. In this case, we need to represent one color by the minimum amplitudeand the other color by the maximum amplitude. We can send 2 pixels per cycle. Therefore, weneed 11,025,000/2 =5,512,500 cycles per second, or Hz. The bandwidth needed is 5.5124 MHz.This worst-case scenario has such a low probability of occurrence that the assumption is that weneed only 70 percent of this bandwidth, which is 3.85 MHz. Since audio and synchronization sig-nals are also needed, a 4-MHz bandwidth has been set aside for each black and white TV chan-nel. An analog color TV channel has a 6-MHz bandwidth.3.3 DIGITAL SIGNALSIn addition to being represented by an analog signal, information can also be repre-sented by a digital signal. For example, a I can be encoded as a positive voltage and a 0as zero voltage. A digital signal can have more than two levels. In this case, we can
    • 72 CHAPTER 3 DATA AND SIGNALSsend more than 1 bit for each level. Figure 3.16 shows two signals, one with two levelsand the other with four.Figure 3.16 Two digital signals: one with two signal levels and the other with four signal levelsAmplitude 8 bits sent in I s,LevellLevellBit rate = 8 bps1 I 0 I 1 I I I 0 I 0 I 0 I 1 II I I I I I I II II I II I II I II I I ...I I I I I I II sI I I I I I I TimI I I I I I Iea. A digital signal with two levelse6 b" "1I Its sent III s,Bit rate = 16 bpsII I 10 I 01 [ 01 I 00 00 [ 00 I 10 II I I I I I Iel4, I I I I I II I I I I I II I I I I Iel3 [ I II ...I I I [I I I II sI I I I Timell IIII I [ [ellI I [ II I I[ I I I I ILevAmplitudeLevLevLevb. A digital signal with four levelsWe send 1 bit per level in part a of the figure and 2 bits per level in part b of thefigure. In general, if a signal has L levels, each level needs log2L bits.Appendix C reviews information about exponential and logarithmic functions.Example 3.16A digital signal has eight levels. How many bits are needed per level? We calculate the numberof bits from the formulaNumber of bits per level =log2 8 =3Each signal level is represented by 3 bits.Example 3.17A digital signal has nine levels. How many bits are needed per level? We calculate the number ofbits by using the formula. Each signal level is represented by 3.17 bits. However, this answer isnot realistic. The number of bits sent per level needs to be an integer as well as a power of 2. Forthis example, 4 bits can represent one level.
    • SECTION 3.3 DIGITAL SIGNALS 73Bit RateMost digital signals are nonperiodic, and thus period and frequency are not appropri-ate characteristics. Another term-bit rate (instead ofjrequency)-is used to describedigital signals. The bit rate is the number of bits sent in Is, expressed in bits persecond (bps). Figure 3.16 shows the bit rate for two signals.Example 3.18Assume we need to download text documents at the rate of 100 pages per minute. What is therequired bit rate of the channel?SolutionA page is an average of 24 lines with 80 characters in each line. If we assume that one characterrequires 8 bits, the bit rate is100 x 24 x 80 x 8 =1,636,000 bps =1.636 MbpsExample 3.19A digitized voice channel, as we will see in Chapter 4, is made by digitizing a 4-kHz bandwidthanalog voice signal. We need to sample the signal at twice the highest frequency (two samplesper hertz). We assume that each sample requires 8 bits. What is the required bit rate?SolutionThe bit rate can be calculated as2 x 4000 x 8 =64,000 bps =64 kbpsExample 3.20What is the bit rate for high-definition TV (HDTV)?SolutionHDTV uses digital signals to broadcast high quality video signals. The HDTV Screen is normallya ratio of 16 : 9 (in contrast to 4 : 3 for regular TV), which means the screen is wider. There are1920 by 1080 pixels per screen, and the screen is renewed 30 times per second. Twenty-four bitsrepresents one color pixel. We can calculate the bit rate as1920 x 1080 x 30 x 24 = 1,492,992,000 or 1.5 GbpsThe TV stations reduce this rate to 20 to 40 Mbps through compression.Bit LengthWe discussed the concept of the wavelength for an analog signal: the distance one cycleoccupies on the transmission medium. We can define something similar for a digitalsignal: the bit length. The bit length is the distance one bit occupies on the transmis-sion medium.Bit length =propagation speed x bit duration
    • 74 CHAPTER 3 DATA AND SIGNALSDigital Signal as a Composite Analog SignalBased on Fourier analysis, a digital signal is a composite analog signal. The bandwidthis infinite, as you may have guessed. We can intuitively corne up with this concept whenwe consider a digital signal. A digital signal, in the time domain, comprises connectedvertical and horizontal line segments. A vertical line in the time domain means a fre-quency of infinity (sudden change in time); a horizontal line in the time domain means afrequency of zero (no change in time). Going from a frequency of zero to a frequency ofinfinity (and vice versa) implies all frequencies in between are part of the domain.Fourier analysis can be used to decompose a digital signal. If the digital signal isperiodic, which is rare in data communications, the decomposed signal has a frequency-domain representation with an infinite bandwidth and discrete frequencies. If the digitalsignal is nonperiodic, the decomposed signal still has an infinite bandwidth, but the fre-quencies are continuous. Figure 3.17 shows a periodic and a nonperiodic digital signaland their bandwidths.Figure 3.17 The time andfrequency domains ofperiodic and nonperiodic digital signals---- - - - - - - - - - - - -- .--- .---Lu... I I I I... ..Time / 3/ 5f 7f 9f Ilf I3f Frequency--- --- ---a. Time and frequency domains of perIodic digital signalob~)Time~~~-----=------+-.Frequencyb. Time and frequency domains of nonperiodic digital signalNote that both bandwidths are infinite, but the periodic signal has discrete frequen-cies while the nonperiodic signal has continuous frequencies.Transmission of Digital SignalsThe previous discussion asserts that a digital signal, periodic or nonperiodic, is a com-posite analog signal with frequencies between zero and infinity. For the remainder ofthe discussion, let us consider the case of a nonperiodic digital signal, similar to theones we encounter in data communications. The fundamental question is, How can wesend a digital signal from point A to point B? We can transmit a digital signal by usingone of two different approaches: baseband transmission or broadband transmission(using modulation).
    • SECTION 3.3 DIGITAL SIGNALS 75Baseband TransmissionBaseband transmission means sending a digital signal over a channel without changingthe digital signal to an analog signal. Figure 3.18 shows baseband transmission.Figure 3.18 Baseband transmission-----D •Digital signal&i;;~;;;;_;;;~aChannelA digital signal is a composite analog signal with an infinite bandwidth.Baseband transmission requires that we have a low-pass channel, a channel with abandwidth that starts from zero. This is the case if we have a dedicated medium with abandwidth constituting only one channel. For example, the entire bandwidth of a cableconnecting two computers is one single channel. As another example, we may connectseveral computers to a bus, but not allow more than two stations to communicate at atime. Again we have a low-pass channel, and we can use it for baseband communication.Figure 3.19 shows two low-pass channels: one with a narrow bandwidth and the otherwith a wide bandwidth. We need to remember that a low-pass channel with infinite band-width is ideal, but we cannot have such a channel in real life. However, we can get close.Figure 3.19 Bandwidths oftwo low-pass channelsoa. Low-pass channel, wide bandwidthob. Low-pass channel, narrow bandwidthLet us study two cases of a baseband communication: a low-pass channel with awide bandwidth and one with a limited bandwidth.
    • 76 CHAPTER 3 DATA AND SIGNALSCase 1: Low-Pass Channel with Wide BandwidthIf we want to preserve the exact form of a nonperiodic digital signal with vertical seg-ments vertical and horizontal segments horizontal, we need to send the entire spectrum,the continuous range of frequencies between zero and infinity. This is possible if wehave a dedicated medium with an infinite bandwidth between the sender and receiverthat preserves the exact amplitude of each component of the composite signal.Although this may be possible inside a computer (e.g., between CPU and memory), itis not possible between two devices. Fortunately, the amplitudes of the frequencies atthe border of the bandwidth are so small that they can be ignored. This means that if wehave a medium, such as a coaxial cable or fiber optic, with a very wide bandwidth, twostations can communicate by using digital signals with very good accuracy, as shown inFigure 3.20. Note that!i is close to zero, andh is very high.Figure 3.20 Baseband transmission using a dedicated mediumInput signal bandwidth,<::;S>:,:, ,...-,:.">~oInput signalBandwidth supported by mediumJw_, ,", L~.~:~ " ,,"...-.;:.~ "Wide-bandwidth channelOutput signal bandwidth_C c:~::.:.~.•.•..c<lII hOutput signalAlthough the output signal is not an exact replica of the original signal, the datacan still be deduced from the received signal. Note that although some of the frequen-cies are blocked by the medium, they are not critical.Baseband transmission of a digital signal that preserves the shape of the digital signal ispossible only if we have a low-pass channel with an infinite or very wide bandwidth.Example 3.21An example of a dedicated channel where the entire bandwidth of the medium is used as one singlechannel is a LAN. Almost every wired LAN today uses a dedicated channel for two stations com-municating with each other. In a bus topology LAN with multipoint connections, only two stationscan communicate with each other at each moment in time (timesharing); the other stations need torefrain from sending data. In a star topology LAN, the entire channel between each station and thehub is used for communication between these two entities. We study LANs in Chapter 14.Case 2: Low-Pass Channel with Limited BandwidthIn a low-pass channel with limited bandwidth, we approximate the digital signal withan analog signal. The level of approximation depends on the bandwidth available.Rough Approximation Let us assume that we have a digital signal of bit rate N. If wewant to send analog signals to roughly simulate this signal, we need to consider the worstcase, a maximum number of changes in the digital signal. This happens when the signal
    • SECTION 3.3 DIGITAL SIGNALS 77carries the sequence 01010101 ... or the sequence 10101010· ... To simulate these twocases, we need an analog signal of frequencyf = N12. Let 1 be the positive peak value andobe the negative peak value. We send 2 bits in each cycle; the frequency of the analogsignal is one-half of the bit rate, or N12. However, just this one frequency cannot make allpatterns; we need more components. The maximum frequency is NI2. As an example ofthis concept, let us see how a digital signal with a 3-bit pattern can be simulated by usinganalog signals. Figure 3.21 shows the idea. The two similar cases (000 and 111) are simu-lated with a signal with frequencyf =0 and a phase of 180° for 000 and a phase of 0° for111. The two worst cases (010 and 101) are simulated with an analog signal with fre-quencyf =NI2 and phases of 180° and 0°. The other four cases can only be simulated withan analog signal with f = NI4 and phases of 180°, 270°, 90°, and 0°. In other words, weneed a channel that can handle frequencies 0, N14, and NI2. This rough approximation isreferred to as using the first harmonic (NI2) frequency. The required bandwidth isBandwidth = lJ. - 0 = lJ.2 2Figure 3.21 Rough approximation ofa digital signal using the first harmonic for worst caseAmplitudeBandwidth == ~o N/4 N/2 FrequencyDigital: bit rate N1° 1 0 I 0 1I 1 I 1I 1 I 1I 1! !, ,1 1 I 11 I I 1i i i II I . ,, , , ,Analog:f= 0, p = 180Digital: bit rate N1 I I o 101-A=±i: • ~ 11 I I I~1~, . , ,Analog:f=N/4, p = 90Digital: bit rate NI 0 1o~I 1: :, , , ,I I I II I n~l I, , , .Analog:f==N/4,p= 180Digital: bit rate NI 1 I o 1 1 I-R=R-AAI M I, , . ,Analog:j== N/2, P = 0Digital: bit rate N~I I-I--I 1J I I I1{"j:1MM, , , ,Analog:j==N/2, p == 180Digital: bit rate N1 1 I 1I °I: ,8-I1 I, ,I I j I~II:~NJ , J ,Analog:f=N/4,p== 0Digital: bit rate N*I I, , ,I~I I I I~~~, , , ,Analog:j==N/4, p == 270Digital: bit rate NI 1 1 I I I 1i i I iI I I II 1 I 1, , , ,I ! 1 ,I I I II I i II 1 I I, , , ,Analog: j == 0, p = 0Better Approximation To make the shape of the analog signal look more like thatof a digital signal, we need to add more harmonics of the frequencies. We need toincrease the bandwidth. We can increase the bandwidth to 3N12, 5N12, 7NI2, and so on.Figure 3.22 shows the effect of this increase for one of the worst cases, the pattern 010.
    • 78 CHAPTER 3 DATA AND SIGNALSFigure 3.22 Simulating a digital signal with three first harmonicsI 1 ..5N/4 5N12 Frequencyo N/4 NI2W_I I--- ~3N/4 3N12Amplitude 5NBandwidth = TDigital: bit rate N Analog:/= NI2 and 3N120 1 I0I I II II II II II II III I IIv=s.2 :VIIcf:.U~ U__IIft.~ ~-1Analog:!= N/2 Analog:!= N12, 3N12, and 5NI2Note that we have shown only the highest frequency for each hannonic. We use the first,third, and fifth hannonics. The required bandwidth is now 5NJ2, the difference between thelowest frequency 0 and the highest frequency 5NJ2. As we emphasized before, we needto remember that the required bandwidth is proportional to the bit rate.In baseband transmission, the required bandwidth is proportional to the bit rate;if we need to send bits faster, we need more bandwidth.By using this method, Table 3.2 shows how much bandwidth we need to send dataat different rates.Table 3.2 Bandwidth requirementsBit Harmonic Harmonics HarmonicsRate 1 1,3 1,3,5n = 1 kbps B=500Hz B= 1.5 kHz B=2.5 kHzn = 10 kbps B=5 kHz B= 15kHz B= 25 kHzn = 100 kbps B= 50kHz B = 150 kHz B= 250 kHzExample 3.22What is the required bandwidth of a low-pass channel if we need to send 1 Mbps by using base-band transmission?
    • Bandpass channelSECTION 3.3 DIGITAL SIGNALS 79SolutionThe answer depends on the accuracy desired.a. The minimum bandwidth, a rough approximation, is B =: bit rate /2, or 500 kHz. We needa low-pass channel with frequencies between 0 and 500 kHz.b. A better result can be achieved by using the first and the third harmonics with the requiredbandwidth B =: 3 x 500 kHz =: 1.5 MHz.c. Still a better result can be achieved by using the first, third, and fifth harmonics withB =: 5 x 500 kHz =0 2.5 MHz.Example 3.23We have a low-pass channel with bandwidth 100 kHz. What is the maximum bit rate of thischannel?SolutionThe maximum bit rate can be achieved if we use the first harmonic. The bit rate is 2 times theavailable bandwidth, or 200 kbps.Broadband Transmission (Using Modulation)Broadband transmission or modulation means changing the digital signal to an analogsignal for transmission. Modulation allows us to use a bandpass channel-a channel witha bandwidth that does not start from zero. This type of channel is more available than alow-pass channel. Figure 3.23 shows a bandpass channel.Figure 3.23 Bandwidth ofa bandpass channelAmplitude1_~~.FrequencyNote that a low-pass channel can be considered a bandpass channel with the lowerfrequency starting at zero.Figure 3.24 shows the modulation of a digital signal. In the figure, a digital signal isconverted to a composite analog signal. We have used a single-frequency analog signal(called a carrier); the amplitude of the carrier has been changed to look like the digitalsignal. The result, however, is not a single-frequency signal; it is a composite signal, aswe will see in Chapter 5. At the receiver, the received analog signal is converted to digital,and the result is a replica of what has been sent.Ifthe available channel is a bandpass channel~ we cannot send the digital signal directly tothe channel; we need to convert the digital signal to an analog signal before transmission.
    • 80 CHAPTER 3 DATA AND SIGNALSFigure 3.24 Modulation ofa digital signal for transmission on a bandpass channel0 _ D-- ~.Input digital signal Output digital signalInput analog signal bandwidthL "Output analog signal bandwidth/ -,>:~,;:>~Analog/digitalconverter t--~>--Available bandwidthDigitaUanalogconverter- - IBandpass channelInput analog signal Input analog signalExample 3.24An example of broadband transmission using modulation is the sending of computer data througha telephone subscriber line, the line connecting a resident to the central telephone office. Theselines, installed many years ago, are designed to carry voice (analog signal) with a limited band-width (frequencies between 0 and 4 kHz). Although this channel can be used as a low-pass chan-nel, it is normally considered a bandpass channel. One reason is that the bandwidth is so narrow(4 kHz) that if we treat the channel as low-pass and use it for baseband transmission, the maximumbit rate can be only 8 kbps. The solution is to consider the channel a bandpass channel, convert thedigital signal from the computer to an analog signal, and send the analog signal. We can install twoconverters to change the digital signal to analog and vice versa at the receiving end. The converter,in this case, is called a modem (modulator/demodulator), which we discuss in detail in Chapter 5.Example 3.25A second example is the digital cellular telephone. For better reception, digital cellular phonesconvert the analog voice signal to a digital signal (see Chapter 16). Although the bandwidth allo-cated to a company providing digital cellular phone service is very wide, we still cannot send thedigital signal without conversion. The reason is that we only have a bandpass channel availablebetween caller and callee. For example, if the available bandwidth is Wand we allow lOOO cou-ples to talk simultaneously, this means the available channel is WIlOOO, just part of the entirebandwidth. We need to convert the digitized voice to a composite analog signal before sending.The digital cellular phones convert the analog audio signal to digital and then convert it again toanalog for transmission over a bandpass channel.3.4 TRANSMISSION IMPAIRMENTSignals travel through transmission media, which are not petfect. The impetfection causessignal impairment. This means that the signal at the beginning of the medium is not thesame as the signal at the end of the medium. What is sent is not what is received. Threecauses of impairment are attenuation, distortion, and noise (see Figure 3.25).
    • SECTION 3.4 TRANSMISSION IMPAIRMENT 81Figure 3.25 Causes ofimpairmentAttenuationAttenuation means a loss of energy. When a signal, simple or composite, travelsthrough a medium, it loses some of its energy in overcoming the resistance of themedium. That is why a wire carrying electric signals gets warm, if not hot, after awhile. Some of the electrical energy in the signal is converted to heat. To compensatefor this loss, amplifiers are used to amplify the signal. Figure 3.26 shows the effect ofattenuation and amplification.Figure 3.26 AttenuationOriginal Attenuated Amplified-AffiPoint 1 Transmission medium Point 2 Point 3DecibelTo show that a signal has lost or gained strength, engineers use the unit of the decibel.The decibel (dB) measures the relative strengths of two signals or one signal at two dif-ferent points. Note that the decibel is negative if a signal is attenuated and positive if asignal is amplified.Variables PI and P2 are the powers of a signal at points 1 and 2, respectively. Note thatsome engineering books define the decibel in terms of voltage instead of power. In thiscase, because power is proportional to the square of the voltage, the formula is dB =20 log 10 (V2IV1). In this text, we express dB in terms of power.
    • 82 CHAPTER 3 DATA AND SIGNALSExample 3.26Suppose a signal travels through a transmission medium and its power is reduced to one-half.This means that P2 = ~ PI In this case, the attenuation (loss of power) can be calculated asPz 0.5PI1010glO - = 1010gl0 - - = 10 Ioglo0.5 = 10(-0.3) = -3 dBPI PIA loss of 3 dB (-3 dB) is equivalent to losing one-half the power.Example 3.27A signal travels through an amplifier, and its power is increased 10 times. This means that Pz=1OPI In this case, the amplification (gain of power) can be calculated asExample 3.28One reason that engineers use the decibel to measure the changes in the strength of a signal is thatdecibel numbers can be added (or subtracted) when we are measuring several points (cascading)instead ofjust two. In Figure 3.27 a signal travels from point 1 to point 4. The signal is attenuatedby the time it reaches point 2. Between points 2 and 3, the signal is amplified. Again, betweenpoints 3 and 4, the signal is attenuated. We can find the resultant decibel value for the signal justby adding the decibel measurements between each set of points.Figure 3.27 Decibels for Example 3.28I dB:17dBI-3 dBPoint 3 Transmission Point 4mediumPoint 2TransmissionmediumPoint 11_:_------=-.3dB _ _•1• - - - - - - - -In this case, the decibel value can be calculated asdB=-3+7-3=+1The signal has gained in power.Example 3.29Sometimes the decibel is used to measure signal power in milliwatts. In this case, it is referred toas dBm and is calculated as dBm = 10 loglO Pm where Pm is the power in milliwatts. Calculatethe power of a signal if its dBm =-30.
    • SECTION 3.4 TRANSMISSION IMPAIRMENT 83SolutionWe can calculate the power in the signal asdBm = 10log10 Pm = -30loglO Pm:= -3 Pm =10-3 rnWExample 3.30The loss in a cable is usually defined in decibels per kilometer (dB/km). If the signal at thebeginning of a cable with -0.3 dBlkm has a power of 2 mW, what is the power of the signalat 5 km?SolutionThe loss in the cable in decibels is 5 x (-0.3)::: -1.5 dB. We can calculate the power asDistortionDistortion means that the signal changes its form or shape. Distortion can occur in acomposite signal made of different frequencies. Each signal component has its ownpropagation speed (see the next section) through a medium and, therefore, its owndelay in arriving at the final destination. Differences in delay may create a difference inphase if the delay is not exactly the same as the period duration. In other words, signalcomponents at the receiver have phases different from what they had at the sender. Theshape of the composite signal is therefore not the same. Figure 3.28 shows the effect ofdistortion on a composite signal.Figure 3.28 DistortionComposite signalsentAt the senderComponents,in phaseComposite signalreceivedComponents,out of phaseAt the receiver
    • 84 CHAPTER 3 DATA AND SIGNALSNoiseNoise is another cause of impairment. Several types of noise, such as thermal noise,induced noise, crosstalk, and impulse noise, may corrupt the signal. Thermal noise isthe random motion of electrons in a wire which creates an extra signal not originallysent by the transmitter. Induced noise comes from sources such as motors and appli-ances. These devices act as a sending antenna, and the transmission medium acts as thereceiving antenna. Crosstalk is the effect of one wire on the other. One wire acts as asending antenna and the other as the receiving antenna. Impulse noise is a spike (a sig-nal with high energy in a very short time) that comes from power lines, lightning, and soon. Figure 3.29 shows the effect of noise on a signal. We discuss error in Chapter 10.Figure 3.29 NoiseTransmittedIII•Point 1NoiseTransmission mediumIII•Point 2Signal-to-Noise Ratio (SNR)As we will see later, to find the theoretical bit rate limit, we need to know the ratio ofthe signal power to the noise power. The signal-to-noise ratio is defined asSNR =average signal poweraverage noise powerWe need to consider the average signal power and the average noise power becausethese may change with time. Figure 3.30 shows the idea of SNR.SNR is actually the ratio of what is wanted (signal) to what is not wanted (noise).A high SNR means the signal is less corrupted by noise; a low SNR means the signal ismore corrupted by noise.Because SNR is the ratio of two powers, it is often described in decibel units,SNRdB, defined asSNRcm = lOloglo SNRExample 3.31The power of a signal is 10 mW and the power of the noise is 1 /lW; what are the values of SNRand SNRdB?
    • SECTION 3.5 DATA RATE LIMITS 85Figure 3.30 Two cases ofSNR: a high SNR and a low SNRSignal-a. Large SNRb. Small SNRNoiseNoise Signal + noiseSolutionThe values of SNR and SN~B can be calculated as follows:SNR = 10.000 flW = 10 000ImW SNRdB = 10 loglO 10,000 = 10 loglO 104= 40Example 3.32The values of SNR and SNRdB for a noiseless channel areSNR =signal power = <>0oSNRdB = 10 loglO 00 = <>0We can never achieve this ratio in real life; it is an ideal.3.5 DATA RATE LIMITSA very important consideration in data communications is how fast we can send data, inbits per second. over a channel. Data rate depends on three factors:1. The bandwidth available2. The level of the signals we use3. The quality of the channel (the level of noise)Two theoretical formulas were developed to calculate the data rate: one by Nyquist fora noiseless channel. another by Shannon for a noisy channel.
    • 86 CHAPTER 3 DATA AND SIGNALSNoiseless Channel: Nyquist Bit RateFor a noiseless channel, the Nyquist bit rate formula defines the theoretical maximumbit rateBitRate = 2 x bandwidth x 10g2 LIn this formula, bandwidth is the bandwidth of the channel, L is the number of signallevels used to represent data, and BitRate is the bit rate in bits per second.According to the formula, we might think that, given a specific bandwidth, we canhave any bit rate we want by increasing the number of signa11eve1s. Although the ideais theoretically correct, practically there is a limit. When we increase the number of sig-nal1eve1s, we impose a burden on the receiver. Ifthe number oflevels in a signal is just 2,the receiver can easily distinguish between a 0 and a 1. If the level of a signal is 64, thereceiver must be very sophisticated to distinguish between 64 different levels. In otherwords, increasing the levels of a signal reduces the reliability of the system.Increasing the levels of a signal may reduce the reliability of the system.Example 3.33Does the Nyquist theorem bit rate agree with the intuitive bit rate described in basebandtransmission?SolutionThey match when we have only two levels. We said, in baseband transmission, the bit rate is 2times the bandwidth if we use only the first harmonic in the worst case. However, the Nyquistformula is more general than what we derived intuitively; it can be applied to baseband transmis-sion and modulation. Also, it can be applied when we have two or more levels of signals.Example 3.34Consider a noiseless channel with a bandwidth of 3000 Hz transmitting a signal with two signallevels. The maximum bit rate can be calculated asBitRate =2 x 3000 x log2 2 =6000 bpsExample 3.35Consider the same noiseless channel transmitting a signal with four signal levels (for each level,we send 2 bits). The maximum bit rate can be calculated asBitRate =2 x 3000 X log2 4 = 12,000 bpsExample 3.36We need to send 265 kbps over a noiseless channel with a bandwidth of 20 kHz. How many sig-nallevels do we need?
    • SECTION 3.5 DATA RATE LIMITS 87SolutionWe can use the Nyquist formula as shown:265,000 =2 X 20,000 X logz Llog2 L =6.625 L =26.625 = 98.7 levelsSince this result is not a power of 2, we need to either increase the number of levels or reducethe bit rate. If we have 128 levels, the bit rate is 280 kbps. If we have 64 levels, the bit rate is240 kbps.Noisy Channel: Shannon CapacityIn reality, we cannot have a noiseless channel; the channel is always noisy. In 1944,Claude Shannon introduced a formula, called the Shannon capacity, to determine thetheoretical highest data rate for a noisy channel:Capacity =bandwidth X log2 (1 +SNR)In this formula, bandwidth is the bandwidth of the channel, SNR is the signal-to-noise ratio, and capacity is the capacity of the channel in bits per second. Note that in theShannon formula there is no indication of the signal level, which means that no matterhow many levels we have, we cannot achieve a data rate higher than the capacity of thechannel. In other words, the formula defines a characteristic of the channel, not the methodof transmission.Example 3.37Consider an extremely noisy channel in which the value of the signal-to-noise ratio is almostzero. In other words, the noise is so strong that the signal is faint. For this channel the capacity Cis calculated asC=B log2 (1 + SNR) =B 10gz (l + 0) =B log2 1 ::;;: B x 0 :;;;; 0This means that the capacity of this channel is zero regardless of the bandwidth. In otherwords, we cannot receive any data through this channel.Example 3.38We can calculate the theoretical highest bit rate of a regular telephone line. A telephone line nor-mally has a bandwidth of 3000 Hz (300 to 3300 Hz) assigned for data communications. The sig-nal-to-noise ratio is usually 3162. For this channel the capacity is calculated asC =B log2 (1 + SNR) =3000 log2 (l + 3162) =3000 log2 3163:::::: 3000 x 11.62 = 34,860 bpsThis means that the highest bit rate for a telephone line is 34.860 kbps. If we want to senddata faster than this, we can either increase the bandwidth of the line or improve the signal-to-noise ratio.
    • 88 CHAPTER 3 DATA AND SIGNALSExample 3.39The signal-to-noise ratio is often given in decibels. Assume that SN~B = 36 and the channelbandwidth is 2 MHz. The theoretical channel capacity can be calculated asSNRdB = 10 loglO SNR ... SNR = lOSNRoB/10 ... SNR::; 10 3.6 =3981C =B log2 (1+ SNR) = 2 X 106X log2 3982 = 24 MbpsExample 3.40For practical purposes, when the SNR is very high, we can assume that SNR + I is almost thesame as SNR. In these cases, the theoretical channel capacity can be simplified toSNRdBC=BX --=3For example, we can calculate the theoretical capacity of the previous example as36C= 2 MHz X - =24 Mbps3Using Both LimitsIn practice, we need to use both methods to find the limits and signal levels. Let us showthis with an example.Example 3.41We have a channel with a I-MHz bandwidth. The SNR for this channel is 63. What are the appro-priate bit rate and signal level?SolutionFirst, we use the Shannon formula to find the upper limit.C =B log2 (l + SNR) =106 log2 (1 + 63) =10610g2 64 =6 MbpsThe Shannon formula gives us 6 Mbps, the upper limit. For better performance we choosesomething lower, 4 Mbps, for example. Then we use the Nyquist formula to find the number ofsignal levels.4Mbps=2x 1 MHz x log2 L ... L=4The Shannon capacity gives us the upper limit;the Nyquist formula tells us how many signal levels we need.
    • SECTION 3.6 PERFORMANCE 893.6 PERFORMANCEUp to now, we have discussed the tools of transmitting data (signals) over a networkand how the data behave. One important issue in networking is the performance of thenetwork-how good is it? We discuss quality of service, an overall measurement ofnetwork performance, in greater detail in Chapter 24. In this section, we introduceterms that we need for future chapters.BandwidthOne characteristic that measures network performance is bandwidth. However, the termcan be used in two different contexts with two different measuring values: bandwidth inhertz and bandwidth in bits per second.Bandwidth in HertzWe have discussed this concept. Bandwidth in hertz is the range of frequencies con-tained in a composite signal or the range of frequencies a channel can pass. For exam-ple, we can say the bandwidth of a subscriber telephone line is 4 kHz.Bandwidth in Bits per SecondsThe term bandwidth can also refer to the number of bits per second that a channel, alink, or even a network can transmit. For example, one can say the bandwidth of a FastEthernet network (or the links in this network) is a maximum of 100 Mbps. This meansthat this network can send 100 Mbps.RelationshipThere is an explicit relationship between the bandwidth in hertz and bandwidth in bitsper seconds. Basically, an increase in bandwidth in hertz means an increase in bandwidthin bits per second. The relationship depends on whether we have baseband transmissionor transmission with modulation. We discuss this relationship in Chapters 4 and 5.In networking, we use the term bandwidth in two contexts.o The first, bandwidth in hertz, refers to the range of frequencies in a compositesignal or the range of frequencies that a channel can pass.o The second, bandwidth in bits per second, refers to the speed of bit transmis-sion in a channel or link.Example 3.42The bandwidth of a subscriber line is 4 kHz for voice or data. The bandwidth ofthis line for data trans-mission can be up to 56,000 bps using a sophisticated modem to change the digital signal to analog.Example 3.43If the telephone company improves the quality of the line and increases the bandwidth to 8 kHz,we can send 112,000 bps by using the same technology as mentioned in Example 3.42.
    • 90 CHAPTER 3 DATA AND SIGNALSThroughputThe throughput is a measure of how fast we can actually send data through a network.Although, at first glance, bandwidth in bits per second and throughput seem the same,they are different. A link may have a bandwidth of B bps, but we can only send T bpsthrough this link with T always less than B. In other words, the bandwidth is a potentialmeasurement of a link; the throughput is an actual measurement of how fast we cansend data. For example, we may have a link with a bandwidth of 1 Mbps, but thedevices connected to the end of the link may handle only 200 kbps. This means that wecannot send more than 200 kbps through this link.Imagine a highway designed to transmit 1000 cars per minute from one pointto another. However, if there is congestion on the road, this figure may be reduced to100 cars per minute. The bandwidth is 1000 cars per minute; the throughput is 100 carsper minute.Example 3.44A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minutewith each frame carrying an average of 10,000 bits. What is the throughput of this network?SolutionWe can calculate the throughput asThroughput = 12,000 x 10,000 =2 Mbps60The throughput is almost one-fifth of the bandwidth in this case.Latency (Delay)The latency or delay defines how long it takes for an entire message to completelyarrive at the destination from the time the first bit is sent out from the source. We cansay that latency is made of four components: propagation time, transmission time,queuing time and processing delay.Latency =propagation time +transmission time +queuing time + processing delayPropagation TimePropagation time measures the time required for a bit to travel from the source to thedestination. The propagation time is calculated by dividing the distance by the propaga-tion speed.Propagation time = Dist:mcePropagation speedThe propagation speed of electromagnetic signals depends on the medium and onthe frequency of the signaL For example, in a vacuum, light is propagated with a speedof 3 x 108 mfs. It is lower in air; it is much lower in cable.
    • SECTION 3.6 PERFORMANCE 91Example 3.45What is the propagation time if the distance between the two points is 12,000 km? Assume thepropagation speed to be 2.4 x 108mls in cable.SolutionWe can calculate the propagation time as. . 12000 x 1000Propagation tIme = =50 ms2.4 x 108The example shows that a bit can go over the Atlantic Ocean in only 50 ms if there is a directcable between the source and the destination.Tra/lsmissio/l TimeIn data communications we dont send just 1 bit, we send a message. The first bit maytake a time equal to the propagation time to reach its destination; the last bit also maytake the same amount of time. However, there is a time between the first bit leaving thesender and the last bit arriving at the receiver. The first bit leaves earlier and arrives ear-lier; the last bit leaves later and arrives later. The time required for transmission of amessage depends on the size of the message and the bandwidth of the channel.Transmission time =Message sizeBandwidthExample 3.46What are the propagation time and the transmission time for a 2.5-kbyte message (an e-mail) ifthe bandwidth of the network is 1 Gbps? Assume that the distance between the sender and thereceiver is 12,000 km and that light travels at 2.4 x 108mls.SolutionWe can calculate the propagation and transmission time as. . 12000 x 1000PropagatIon Hme = ~.4 x 108 =50 msT . . . 2500 x 8 0 020ranSIlllSSlOn tIme = 9 =. ms10Note that in this case, because the message is short and the bandwidth is high, thedominant factor is the propagation time, not the transmission time. The transmissiontime can be ignored.Example 3.47What are the propagation time and the transmission time for a 5-Mbyte message (an image) if thebandwidth of the network is 1 Mbps? Assume that the distance between the sender and thereceiver is 12,000 km and that light travels at 2.4 x 108mls.
    • 92 CHAPTER 3 DATA AND SIGNALSSolutionWe can calculate the propagation and transmission times as. , 12 000 X 1000PropagatIon tIme :::: 8:::: 50 ms2.4x 10T.. . 5,000,000 x 8 40ranSffilSSlOn tIme:::: 6 :::: S10Note that in this case, because the message is very long and the bandwidth is not veryhigh, the dominant factor is the transmission time, not the propagation time. The propa-gation time can be ignored.Queuing TimeThe third component in latency is the queuing time, the time needed for each interme-diate or end device to hold the message before it can be processed. The queuing time isnot a fixed factor; it changes with the load imposed on the network. When there isheavy traffic on the network, the queuing time increases. An intermediate device, suchas a router, queues the arrived messages and processes them one by one. If there aremany messages, each message will have to wait.Bandwidth-Delay ProductBandwidth and delay are two performance metrics of a link. However, as we will see inthis chapter and future chapters, what is very important in data communications is theproduct of the two, the bandwidth-delay product. Let us elaborate on this issue, usingtwo hypothetical cases as examples.o Case 1. Figure 3.31 shows case 1.Figure 3.31 Filling the link with bits for case 1Sender Receiver1sBandwidth: 1 bps Delay: 5 sBandwidth x delay = 5 bits1st bit ~_...1st bit1sLet US assume that we have a link with a bandwidth of 1 bps (unrealistic, but goodfor demonstration purposes). We also assume that the delay of the link is 5 s (alsounrealistic). We want to see what the bandwidth-delay product means in this case.
    • SECTION 3.6 PERFORMANCE 93Looking at figure, we can say that this product 1 x 5 is the maximum number ofbits that can fill the link. There can be no more than 5 bits at any time on the link.o Case 2. Now assume we have a bandwidth of 4 bps. Figure 3.32 shows that therecan be maximum 4 x 5 = 20 bits on the line. The reason is that, at each second,there are 4 bits on the line; the duration of each bit is 0.25 s.Figure 3.32 Filling the link with bits in case 2Bandwidth: 4 bps Delay: 5 sBandwidth x delay = 20 bitsAfter 1 sI------------.l..-.L-lAfter 2 sAfter 4 s1 s 1 s 1 s 1 s 1 sReceiverrThe above two cases show that the product of bandwidth and delay is the number ofbits that can fill the link. This measurement is important if we need to send data in burstsand wait for the acknowledgment of each burst before sending the next one. To use themaximum capability of the link, we need to make the size ofour burst 2 times the productof bandwidth and delay; we need to fill up the full-duplex channel (two directions). Thesender should send a burst of data of (2 x bandwidth x delay) bits. The sender then waitsfor receiver acknowledgment for part of the burst before sending another burst. Theamount 2 x bandwidth x delay is the number of bits that can be in transition at any time.The bandwidth~delay product defines the number of bits that can rdl the link.Example 3.48We can think about the link between two points as a pipe. The cross section of the pipe representsthe bandwidth, and the length of the pipe represents the delay. We can say the volume of the pipedefines the bandwidth-delay product, as shown in Figure 3.33.Figure 3.33 Concept ofbandwidth-delay productLength: delayCross section: bandwidth
    • 94 CHAPTER 3 DATA AND SIGNALSJitterAnother performance issue that is related to delay is jitter. We can roughly say that jitteris a problem if different packets of data encounter different delays and the applicationusing the data at the receiver site is time-sensitive (audio and video data, for example).If the delay for the first packet is 20 ms, for the second is 45 ms, and for the third is40 ms, then the real-time application that uses the packets endures jitter. We discuss jitterin greater detail in Chapter 29.3.7 RECOMMENDED READINGFor more details about subjects discussed in this chapter, we recommend the followingbooks. The items in brackets [...] refer to the reference list at the end of the text.BooksData and signals are elegantly discussed in Chapters 1 to 6 of [Pea92]. [CouOl] givesan excellent coverage about signals in Chapter 2. More advanced materials can befound in [Ber96]. [Hsu03] gives a good mathematical approach to signaling. Completecoverage of Fourier Analysis can be found in [Spi74]. Data and signals are discussed inChapter 3 of [Sta04] and Section 2.1 of [Tan03].3.8 KEY TERMSanaloganalog dataanalog signalattenuationbandpass channelbandwidthbaseband transmissionbit ratebits per second (bps)broadband transmissioncomposite signalcycledecibel (dB)digitaldigital datadigital signaldistortionFourier analysisfrequencyfrequency-domainfundamental frequencyharmonicHertz (Hz)jitterlow-pass channelnoisenonperiodic signalNyquist bit ratepeak amplitudeperiodperiodic signalphaseprocessing delaypropagation speed
    • propagation timequeuing timeShannon capacitysignalsignal-to-noise ratio (SNR)SECTION 3.9 SUMMARY 95sine wavethroughputtime-domaintransmission timewavelength3.9 SUMMARYo Data must be transformed to electromagnetic signals to be transmitted.o Data can be analog or digital. Analog data are continuous and take continuousvalues. Digital data have discrete states and take discrete values.o Signals can be analog or digital. Analog signals can have an infinite number ofvalues in a range; digital ,signals can have only a limited number of values.o In data communications, we commonly use periodic analog signals and nonperi-odic digital signals.o Frequency and period are the inverse of each other.o Frequency is the rate of change with respect to time.o Phase describes the position of the waveform relative to time O.o A complete sine wave in the time domain can be represented by one single spike inthe frequency domain.o A single-frequency sine wave is not useful in data communications; we need tosend a composite signal, a signal made of many simple sine waves.o According to Fourier analysis, any composite signal is a combination of simplesine waves with different frequencies, amplitudes, and phases.o The bandwidth of a composite signal is the difference between the highest and thelowest frequencies contained in that signal.o A digital signal is a composite analog signal with an infinite bandwidth.o Baseband transmission of a digital signal that preserves the shape of the digitalsignal is possible only if we have a low-pass channel with an infinite or very widebandwidth.o If the available channel is a bandpass channel, we cannot send a digital signaldirectly to the channel; we need to convert the digital signal to an analog signalbefore transmission.o For a noiseless channel, the Nyquist bit rate formula defines the theoretical maxi-mum bit rate. For a noisy channel, we need to use the Shannon capacity to find themaximum bit rate.o Attenuation, distortion, and noise can impair a signal.o Attenuation is the loss of a signals energy due to the resistance of the medium.o Distortion is the alteration of a signal due to the differing propagation speeds ofeach of the frequencies that make up a signal.o Noise is the external energy that corrupts a signal.o The bandwidth-delay product defines the number of bits that can fill the link.
    • 96 CHAPTER 3 DATA AND SIGNALS3.10 PRACTICE SETReview Questions1. What is the relationship between period and frequency?2. What does the amplitude of a signal measure? What does the frequency of a signalmeasure? What does the phase of a signal measure?3. How can a composite signal be decomposed into its individual frequencies?4. Name three types of transmission impairment.5. Distinguish between baseband transmission and broadband transmission.6. Distinguish between a low-pass channel and a band-pass channel.7. What does the Nyquist theorem have to do with communications?8. What does the Shannon capacity have to do with communications?9. Why do optical signals used in fiber optic cables have a very short wave length?10. Can we say if a signal is periodic or nonperiodic by just looking at its frequencydomain plot? How?11. Is the frequency domain plot of a voice signal discrete or continuous?12. Is the frequency domain plot of an alarm system discrete or continuous?13. We send a voice signal from a microphone to a recorder. Is this baseband or broad-band transmission?14. We send a digital signal from one station on a LAN to another station. Is this base-band or broadband transmission?15. We modulate several voice signals and send them through the air. Is this basebandor broadband transmission?Exercises16. Given the frequencies listed below, calculate the corresponding periods.a. 24Hzb. 8 MHzc. 140 KHz17. Given the following periods, calculate the corresponding frequencies.a. 5 sb. 12 Jlsc. 220 ns18. What is the phase shift for the foIlowing?a. A sine wave with the maximum amplitude at time zerob. A sine wave with maximum amplitude after 1/4 cyclec. A sine wave with zero amplitude after 3/4 cycle and increasing19. What is the bandwidth of a signal that can be decomposed into five sine waveswith frequencies at 0, 20, 50, 100, and 200 Hz? All peak amplitudes are the same.Draw the bandwidth.
    • SECTION 3.10 PRACTICE SET 9720. A periodic composite signal with a bandwidth of 2000 Hz is composed of two sinewaves. The first one has a frequency of 100 Hz with a maximum amplitude of 20 V;the second one has a maximum amplitude of 5 V. Draw the bandwidth.21. Which signal has a wider bandwidth, a sine wave with a frequency of 100 Hz or asine wave with a frequency of 200 Hz?22. What is the bit rate for each of the following signals?a. A signal in which 1 bit lasts 0.001 sb. A signal in which 1 bit lasts 2 msc. A signal in which 10 bits last 20 J-ls23. A device is sending out data at the rate of 1000 bps.a. How long does it take to send out 10 bits?b. How long does it take to send out a single character (8 bits)?c. How long does it take to send a file of 100,000 characters?24. What is the bit rate for the signal in Figure 3.34?Figure 3.34 Exercise 2416 ns---t=:i--J~-...;..---+-.....;.--.;....-d ... ~1 TI~25. What is the frequency of the signal in Figure 3.35?Figure 3.35 Exercise 25TimeTV V VVV V~I, 4ms .11 IV f f f f f f f :...26. What is the bandwidth of the composite signal shown in Figure 3.36.Figure 3.36 Exercise 26Frequency5 5 5 5 5 I
    • 9S CHAPTER 3 DATA AND SIGNALS27. A periodic composite signal contains frequencies from 10 to 30 KHz, each with anamplitude of 10 V. Draw the frequency spectrum.2K. A non-periodic composite signal contains frequencies from 10 to 30 KHz. Thepeak amplitude is 10 V for the lowest and the highest signals and is 30 V for the20-KHz signal. Assuming that the amplitudes change gradually from the minimumto the maximum, draw the frequency spectrum.20. A TV channel has a bandwidth of 6 MHz. If we send a digital signal using onechannel, what are the data rates if we use one harmonic, three harmonics, and fiveharmonics?30. A signal travels from point A to point B. At point A, the signal power is 100 W. Atpoint B, the power is 90 W. What is the attenuation in decibels?31. The attenuation of a signal is -10 dB. What is the final signal power if it was origi-nally 5 W?32. A signal has passed through three cascaded amplifiers, each with a 4 dB gain.What is the total gain? How much is the signal amplified?33. If the bandwidth of the channel is 5 Kbps, how long does it take to send a frame of100,000 bits out of this device?3cf. The light of the sun takes approximately eight minutes to reach the earth. What isthe distance between the sun and the earth?35. A signal has a wavelength of 1 11m in air. How far can the front of the wave travelduring 1000 periods?36. A line has a signal-to-noise ratio of 1000 and a bandwidth of 4000 KHz. What isthe maximum data rate supported by this line?37. We measure the performance of a telephone line (4 KHz of bandwidth). When thesignal is 10 V, the noise is 5 mV. What is the maximum data rate supported by thistelephone line?3X. A file contains 2 million bytes. How long does it take to download this file using a56-Kbps channel? 1-Mbps channel?39. A computer monitor has a resolution of 1200 by 1000 pixels. If each pixel uses1024 colors, how many bits are needed to send the complete contents of a screen?40. A signal with 200 milliwatts power passes through 10 devices, each with an averagenoise of 2 microwatts. What is the SNR? What is the SNRdB?4 I. If the peak voltage value of a signal is 20 times the peak voltage value of the noise,what is the SNR? What is the SNRdB?42. What is the theoretical capacity of a channel in each of the following cases:a. Bandwidth: 20 KHz SNRdB =40b. Bandwidth: 200 KHz SNRdB =4c. Bandwidth: 1 MHz SNRdB =2043. We need to upgrade a channel to a higher bandwidth. Answer the followingquestions:a. How is the rate improved if we double the bandwidth?b. How is the rate improved if we double the SNR?
    • SECTION 3.10 PRACTICE SET 9944. We have a channel with 4 KHz bandwidth. If we want to send data at 100 Kbps,what is the minimum SNRdB? What is SNR?45. What is the transmission time of a packet sent by a station if the length of thepacket is 1 million bytes and the bandwidth of the channel is 200 Kbps?46. What is the length of a bit in a channel with a propagation speed of 2 x 108 mls ifthe channel bandwidth isa. 1 Mbps?h. 10 Mbps?c. 100 Mbps?-1-7. How many bits can fit on a link with a 2 ms delay if the bandwidth of the link isa. 1 Mbps?h. 10 Mbps?c. 100 Mbps?-1-X. What is the total delay (latency) for a frame of size 5 million bits that is being senton a link with 10 routers each having a queuing time of 2 Ils and a processing timeof 1 Ils. The length of the link is 2000 Km. The speed of light inside the link is 2 x108 mls. The link has a bandwidth of 5 Mbps. Which component of the total delayis dominant? Which one is negligible?
    • CHAPTER 4Digital TransmissionA computer network is designed to send information from one point to another. Thisinformation needs to be converted to either a digital signal or an analog signal for trans-mission. In this chapter, we discuss the first choice, conversion to digital signals; inChapter 5, we discuss the second choice, conversion to analog signals.We discussed the advantages and disadvantages of digital transmission over analogtransmission in Chapter 3. In this chapter, we show the schemes and techniques thatwe use to transmit data digitally. First, we discuss digital-to-digital conversion tech-niques, methods which convert digital data to digital signals. Second, we discuss analog-to-digital conversion techniques, methods which change an analog signal to a digitalsignaL Finally, we discuss transmission modes.4.1 DIGITAL~TO~DIGITAL CONVERSIONIn Chapter 3, we discussed data and signals. We said that data can be either digital oranalog. We also said that signals that represent data can also be digital or analog. In thissection, we see how we can represent digital data by using digital signals. The conver-sion involves three techniques: line coding, block coding, and scrambling. Line codingis always needed~ block coding and scrambling mayor may not be needed.Line CodingLine coding is the process of converting digital data to digital signals. We assume thatdata, in the form of text, numbers, graphical images, audio, or video, are stored in com-puter memory as sequences of bits (see Chapter 1). Line coding converts a sequence ofbits to a digital signal. At the sender, digital data are encoded into a digital signal; at thereceiver, the digital data are recreated by decoding the digital signal. Figure 4.1 showsthe process.CharacteristicsBefore discussing different line coding schemes, we address their common characteristics.101
    • 102 CHAPTER 4 DIGITAL TRANSMISSIONFigure 4.1 Line coding and decodingSender ReceiverDigital data1°101". 101 1Digital signalDigital data1°101 •• 101 1Signal Element Versus Data Element Let us distinguish between a data elementand a signal element. In data communications, our goal is to send data elements. Adata element is the smallest entity that can represent a piece of information: this is thebit. In digital data communications, a signal element carries data elements. A signalelement is the shortest unit (timewise) of a digital signal. In other words, data elementsare what we need to send; signal elements are what we can send. Data elements arebeing carried; signal elements are the carriers.We define a ratio r which is the number of data elements carried by each signal ele-ment. Figure 4.2 shows several situations with different values of r.Figure 4.2 Signal element versus data elementI data element I data elemento o~-element 2 signalelementsa. One data element per one signalelement (r = 1)b. One data element per two signalelements (r= t)2 data elements 4 data elements1101---16_-3 signalelementsI signalelementII I 01 III----l=:Fc. Two data elements per one signalelement (r = 2)d. Four data elements per three signalelements (r= 1)In part a of the figure, one data element is carried by one signal element (r =1). Inpart b of the figure, we need two signal elements (two transitions) to carry each data
    • SECTION 4.1 DIGITAL-TO-DIGITAL CONVERSION 103element (r = ! ). We will see later that the extra signal element is needed to guarantee2synchronization. In part c of the figure, a signal element carries two data elements (r = 2).Finally, in part d, a group of 4 bits is being carried by a group of three signal elements(r = ~ ). For every line coding scheme we discuss, we will give the value of r.3 .An analogy may help here. Suppose each data element IS a person who needs to becarried from one place to another. We can think of a signal element as a vehicle that cancarry people. When r = 1, it means each person is driving a vehicle. When r > 1, itmeans more than one person is travelling in a vehicle (a carpool, for example). We canalso have the case where one person is driving a car and a trailer (r = ~ ).Data Rate Versus Signal Rate The d