Computer And Communication Networks

Transcription

Computer and CommunicationNetworksSecond Edition

This page intentionally left blank

ComputerOMPUTER andAND COMMUNICATIONCCommunicationNetworksETWORKSNSecond EditionNader F.F. MirNaderMirUpper SaddleRiver,NJ NJBostonIndianapolisSan FranciscoNew YorkUpperSaddleRiver, Boston Indianapolis San FranciscoParis MadridMunichTorontoNewYorkMontreal TorontoLondon Montreal LondonMunichCapetown Paris MadridSydney Tokyo Singapore Mexico CityCapetown Sydney Tokyo Singapore Mexico City.

Many of the designations used by manufacturers and sellers to distinguish theirproducts are claimed as trademarks. Where those designations appear in this book,and the publisher was aware of a trademark claim, the designations have beenprinted with initial capital letters or in all capitals.The author and publisher have taken care in the preparation of this book, but makeno expressed or implied warranty of any kind and assume no responsibility for errorsor omissions. No liability is assumed for incidental or consequential damages inconnection with or arising out of the use of the information or programs containedherein.For information about buying this title in bulk quantities, or for special salesopportunities (which may include electronic versions; custom cover designs; andcontent particular to your business, training goals, marketing focus, or brandinginterests), please contact our corporate sales department at corpsales@pearsoned.com or (800) 382-3419.For government sales inquiries, please contact governmentsales@pearsoned.com.For questions about sales outside the United States, please contact international@pearsoned.com.Visit us on the Web: informit.com/phLibrary of Congress Catalog-in-Publication DataMir, Nader F.Computer and communication networks / Nader F. Mir.—Second edition.pages cmIncludes bibliographical references and index.ISBN 978-0-13-381474-3 (hardcover : alk. paper)—ISBN 0-13-381474-2(hardcover : alk. paper)1. Computer networks. 2. Data transmission systems. I. Title.TK5105.5.M567 2015004.6—dc232014037209Copyright 2015 Pearson Education, Inc.All rights reserved. Printed in the United States of America. This publication isprotected by copyright, and permission must be obtained from the publisher priorto any prohibited reproduction, storage in a retrieval system, or transmission in anyform or by any means, electronic, mechanical, photocopying, recording, or likewise.To obtain permission to use material from this work, please submit a written requestto Pearson Education, Inc., Permissions Department, One Lake Street, UpperSaddle River, New Jersey 07458, or you may fax your request to (201) 236-3290.ISBN-13: 978-0-13-381474-3ISBN-10: 0-13-381474-2Text printed in the United States on recycled paper at Courier in Westford,Massachusetts.First printing, December 2014Editor-in-ChiefMark L. TaubSenior AcquisitionsEditorTrina MacDonaldDevelopment EditorSonglin QiuManaging EditorJohn FullerFull-ServiceProduction ManagerJulie B. NahilProject ManagerVicki RowlandIndexerTed LauxProofreaderAndrea FoxPublishingCoordinatorOlivia BasegioCover DesignerChuti PrasertsithCompositordiacriTech, Inc.

To Shahrzad and Navid

This page intentionally left blank

ContentsPreface xxiiiAbout the Author xxxviiPART I: Fundamental Concepts  11 Packet-Switched Networks1.11.21.31.41.53Basic Definitions in Networks 41.1.1 Packet Switching Versus Circuit Switching 51.1.2 Data, Packets, and Frames 61.1.3 The Internet and ISPs 71.1.4 Classification of ISPs 9Types of Packet-Switched Networks 111.2.1 Connectionless Networks 111.2.2 Connection-Oriented Networks 13Packet Size and Optimizations 15Foundation of Networking Protocols 171.4.1 Five-Layer TCP/IP Protocol Model 181.4.2 Seven-Layer OSI Model 20Addressing Scheme in the Internet 211.5.1 IP Addressing Scheme 221.5.2 Subnet Addressing and Masking 241.5.3 Classless Interdomain Routing (CIDR) 26vii

Contentsviii1.61.71.81.9Equal-Sized Packets Model 28Summary 28Exercises 29Computer Simulation Project 342 Overview of Networking Devices2.12.22.32.42.52.62.72.837Network Interface Cards (NICs) 39Switching and Routing Devices 402.2.1 Layer 1 Devices 412.2.2 Layer 2 Devices 422.2.3 Layer 3 Devices 44Wireless Switching and Routing Devices 472.3.1 Wireless Access Points and Base Stations 472.3.2 Wireless Routers and Switches 482.3.3 Antennas in Wireless Devices 49Modems 502.4.1 Basic Modulation: ASK, FSK, and PSK 512.4.2 Practical Modulation: 4-QAM and QPSK 532.4.3 Digital Subscriber Line (DSL) Modems 552.4.4 Cable Modems 57Multiplexers 582.5.1 Frequency-Division Multiplexing (FDM) 592.5.2 Time-Division Multiplexing 61Summary 66Exercises 67Computer Simulation Project 693 Data Links and Link Interfaces 713.13.23.33.4Data Links 723.1.1 Data Link Types 73Link Encoder 75Error Detection and Correction on Links 773.3.1 Error Detection Methods 783.3.2 Cyclic Redundancy Check (CRC) AlgorithmFlow Control on Links 853.4.1 Stop-and-Wait Flow Control 853.4.2 Sliding-Window Flow Control 8879

Contents3.53.63.73.83.93.10ixLink Access by Multiple Users 923.5.1 Carrier Sense Multiple Access (CSMA) 93Wireless Channel Access by Multiple Users 973.6.1 Frequency-Division Multiple Access 993.6.2 Time-Division Multiple Access 993.6.3 Orthogonal Frequency-Division Multiple Access 993.6.4 Single-Carrier Frequency-Division Multiple Access 1003.6.5 Code-Division Multiple Access 1003.6.6 Other Multiple-Access Methods 104Link Aggregation 1073.7.1 Link Aggregation Applications 1073.7.2 Link Aggregation Control Protocol (LACP) 108Summary 109Exercises 110Computer Simulation Project 1144 Local Area Networks and Networks of LANs 1154.14.24.34.44.54.64.7LANs and Basic Topologies 116LAN Protocols 1174.2.1 Logical-Link Control (LLC) 1184.2.2 Media Access Control (MAC) 118Networks of LANs 1214.3.1 LAN Networking with Layer 1 Devices 1214.3.2 LAN Networking with Layer 2 Devices 1234.3.3 Networking with Layer 2 and 3 Devices 128MAC/IP Address Conversion Protocols 1304.4.1 Address Resolution Protocol (ARP) 1304.4.2 Reverse Address Resolution Protocol (RARP) 132Spanning-Tree Protocol (STP) 133Virtual LANs (VLANs) 1364.6.1 VLAN Switches 1374.6.2 VLAN Trunking Protocol (VTP) and IEEE 802.1QWireless LANs 1394.7.1 Infrared LANs 1404.7.2 Spread-Spectrum LANs 1414.7.3 Narrowband RF LANs 1414.7.4 Home RF and Bluetooth LANs 141138

Contentsx4.84.94.104.114.12IEEE 802.11 Wireless LAN Standard 1424.8.1 IEEE 802.11 Physical Layer 1444.8.2 802.11 MAC Layer 1454.8.3 WiFi Networks 149Case Study: DOCSIS, a Cable TV Protocol 151Summary 152Exercises 153Computer Simulation Project 1575 Wide-Area Routing and Internetworking  1595.15.25.35.45.55.6IP Packets and Basic Routing Policies 1605.1.1 Packet Fragmentation and Reassembly 1635.1.2 Internet Control Message Protocol (ICMP) 1645.1.3 Obtaining and Assigning IP Addresses 1655.1.4 Dynamic Host Configuration Protocol (DHCP) 1675.1.5 Network Address Translation (NAT) 1695.1.6 Universal Plug and Play (UPnP) 172Path Selection Algorithms 1735.2.1 Dijkstra’s Algorithm 1745.2.2 Bellman-Ford Algorithm 1765.2.3 Packet Flooding Algorithm 1775.2.4 Deflection Routing Algorithm 178Intradomain Routing Protocols 1785.3.1 Open Shortest Path First (OSPF) Protocol 1805.3.2 Routing Information Protocol (RIP) 183Interdomain Routing Protocols 1885.4.1 Autonomous System (AS) 1895.4.2 Border Gateway Protocol (BGP) 189Internet Protocol Version 6 (IPv6) 1965.5.1 IPv6 Addressing Format 1975.5.2 Extension Header 1985.5.3 Packet Fragmentation 1985.5.4 Other Features of IPv6 199Congestion Control at the Network Layer 1995.6.1 Unidirectional Congestion Control   2015.6.2 Bidirectional Congestion Control 2025.6.3 Random Early Detection (RED) 2035.6.4 A Quick Estimation of Link Blocking 2055.6.5 Lee’s Serial and Parallel Connection Rules 206

Contents5.75.85.9xiSummary 207Exercises 209Computer Simulation Project6 Multicast Routing and Protocols6.16.26.36.46.56.66.7213215Basic Definitions and Techniques 2166.1.1 IP Multicast Addresses 2176.1.2 Basic Multicast Tree Algorithms 2186.1.3 Classification of Multicast Protocols 220Local and Membership Multicast Protocols 2216.2.1 Internet Group Management Protocol (IGMP) 221Intradomain Multicast Protocols 2236.3.1 Multicast Backbone (MBone) 2246.3.2 Distance Vector Multicast Routing Protocol (DVMRP)6.3.3 Multicast OSPF (MOSPF) Protocol 2256.3.4 Protocol-Independent Multicast (PIM) 2276.3.5 Core-Based Trees (CBT) Protocol 230Interdomain Multicast Protocols 2316.4.1 Multiprotocol BGP (MBGP) 2316.4.2 Multicast Source Discovery Protocol (MSDP) 2346.4.3 Border Gateway Multicast Protocol (BGMP) 236Summary 237Exercises 238Computer Simulation Project 2417 Wireless Wide Area Networks and LTE Technology7.17.27.37.4Infrastructure of Wireless Networks 244Cellular Networks 2467.2.1 Cellular Network Devices and Operation 2477.2.2 Handoff 253Mobile IP Management in Cellular Networks 2597.3.1 Home Agents and Foreign Agents 2607.3.2 Agent Discovery Phase 2617.3.3 Registration 2627.3.4 Mobile IP Routing 2637.3.5 Generations of Cellular Networks 267Long-Term Evolution (LTE) Technology 2687.4.1 LTE Networking Devices 2697.4.2 Call Establishment in LTE Cells 271243224

Contentsxii7.57.67.77.87.97.4.3 Handoff in LTE 2717.4.4 Downlink and Uplink Schemes in LTE 2737.4.5 Frequency Reuse 273Wireless Mesh Networks (WMNs) with LTE 2777.5.1 Applications of Mesh Networks 2777.5.2 Physical and MAC Layers of WMNs 279Characterization of Wireless Channels 2807.6.1 Capacity Limits of Wireless Channels 2837.6.2 Channel Coding 2837.6.3 Flat-Fading Countermeasures 2847.6.4 Intersymbol Interference Countermeasures 284Summary 285Exercises 286Computer Simulation Project 2888 Transport and End-to-End Protocols8.18.28.38.48.58.68.78.8289Overview of the Transport Layer 2908.1.1 Interaction of Transport Layer and Adjacent Layers 2918.1.2 Transport Layer Protocols 294User Datagram Protocol (UDP) 2958.2.1 UDP Segments 2958.2.2 Applications of UDP 297Transmission Control Protocol (TCP) 2988.3.1 TCP Segment 2998.3.2 A TCP Connection 3018.3.3 Window-Based Transmission and Sliding Window in TCP 3058.3.4 Applications of TCP 306Mobile Transport Protocols 3078.4.1 UDP for Mobility 3078.4.2 TCP for Mobility 307TCP Congestion Control 3098.5.1 Additive Increase, Multiplicative Decrease Control 3098.5.2 Slow-Start Method 3118.5.3 Fast Retransmit and Fast Recovery Methods 312Summary 315Exercises 316Computer Simulation Project 319

Contentsxiii9 Basic Network Applications and erview of the Application Layer 3229.1.1 Client/Server Model 3239.1.2 Graphical User Interface (GUI) 324Domain Name System (DNS) 3259.2.1 Domain Name Space 3259.2.2 Name/Address Mapping 3279.2.3 DNS Message Format 329Electronic Mail (E-Mail) 3309.3.1 Basic E-Mail Structure and Definitions 3309.3.2 Simple Mail Transfer Protocol (SMTP) 3339.3.3 Post Office Protocol, Version 3 (POP3) 3349.3.4 Internet Mail Access Protocol (IMAP) 335World Wide Web (WWW) 3359.4.1 Hypertext Transfer Protocol (HTTP) 3369.4.2 Web Caching (Proxy Server) 3419.4.3 Webmail 342Remote Login Protocols 3429.5.1 TELNET Protocol 3439.5.2 Secure Shell (SSH) Protocol 344File Transfer and FTP 3469.6.1 File Transfer Protocol (FTP) 3469.6.2 Secure Copy Protocol (SCP) 346Peer-to-Peer (P2P) Networking 3479.7.1 P2P File Sharing Protocols 3489.7.2 P2P Database Sharing Protocols 3539.7.3 Estimation of Peer Connection Efficiency 355Network Management 3569.8.1 Elements of Network Management 3589.8.2 Structure of Management Information (SMI) 3599.8.3 Management Information Base (MIB) 3599.8.4 Simple Network Management Protocol (SNMP) 360Summary 362Exercises 363Computer Simulation Projects 366

Contentsxiv10 Network Security36910.1Overview of Network Security 37010.1.1 Elements of Network Security 37010.1.2 Classification of Network Attacks 37110.2 Security Methods 37510.3 Symmetric-Key Cryptography 37710.3.1 Data Encryption Standard (DES) 37710.3.2 Advanced Encryption Standard (AES) 37910.4 Public-Key Cryptography 38010.4.1 RSA Algorithm 38110.4.2 Diffie-Hellman Key-Exchange Protocol 38210.5 Authentication 38310.5.1 Hash Function 38310.5.2 Secure Hash Algorithm (SHA) 38510.6 Digital Signatures 38710.7 Security of IP and Wireless Networks 38710.7.1 IP Security and IPsec 38710.7.2 Security of Wireless Networks and IEEE 802.1110.8 Firewalls and Packet Filtering 39110.8.1 Packet Filtering 39310.8.2 Proxy Server 39510.9 Summary 39610.10 Exercises 39710.11 Computer Simulation Project 399389PART II: Advanced Concepts  40111 Network Queues and Delay Analysis11.111.211.311.4403Little’s Theorem 404Birth-and-Death Process 406Queueing Disciplines 408Markovian FIFO Queueing Systems 40911.4.1 M/M/1 Queueing Systems 40911.4.2 Systems with Limited Queueing Space: M/M/ 1/b 41411.4.3 M/M/a Queueing Systems 41511.4.4 Models for Delay-Sensitive Traffic: M/M/a/a 42011.4.5 M/M/ Queueing Systems 422

Contents11.511.611.711.811.9xvNon-Markovian and Self-Similar Models 42411.5.1 Pollaczek-Khinchin Formula and M/G/ 1 42411.5.2 M/D/ 1 Models 42711.5.3 Self-Similarity and Batch-Arrival Models 427Networks of Queues 42811.6.1 Burke’s Theorem 42811.6.2 Jackson’s Theorem 433Summary 437Exercises 438Computer Simulation Project 44412 Advanced Router and Switch Architectures12.112.212.312.412.512.6445Overview of Router Architecture 446Input Port Processor (IPP) 44712.2.1 Packet Parser 44812.2.2 Packet Partitioner 44912.2.3 Input Buffer 45012.2.4 Routing Table (IPv4 and IPv6) 45012.2.5 Multicast Scheduler 45212.2.6 Forwarding Table and Packet Encapsulator 452Output Port Processor (OPP) 45312.3.1 Output Buffer 45312.3.2 Reassembler and Resequencer 45412.3.3 Error Control 454Central Controller 45412.4.1 Contention Resolution Unit 45512.4.2 Congestion Controller 457Switch Fabric 45712.5.1 Complexity of Switch Fabrics 45812.5.2 Crossbar Switch Fabrics 45912.5.3 Clos Switch Fabrics 46012.5.4 Concentration and Expansion Switch Fabrics 46512.5.5 Shared-Memory Switch Fabrics 46812.5.6 Performance Improvement in Switch Fabrics 469Multicasting Packets in Routers 47512.6.1 Tree-Based Multicast Algorithm 47612.6.2 Packet Recirculation Multicast Algorithm 479

Contentsxvi12.712.812.9Summary 480Exercises 481Computer Simulation Project48413 Quality of Service and Scheduling in Routers13.113.213.313.413.513.613.713.814 Tunneling, VPNs, and MPLS Networks14.114.214.3485Overview of Quality of Service (QoS) 486Integrated Services QoS 48613.2.1 Traffic Shaping 48813.2.2 Admission Control 49413.2.3 Resource Reservation Protocol (RSVP) 495Differentiated Services QoS 49513.3.1 Per-Hop Behavior (PHB) 497Resource Allocation 49713.4.1 Management of Resources 49813.4.2 Classification of Resource-Allocation Schemes13.4.3 Fairness in Resource Allocation 500Packet Scheduling 50113.5.1 First-In, First-Out Scheduler 50213.5.2 Priority Queueing Scheduler 50313.5.3 Fair Queueing Scheduler 50713.5.4 Weighted Fair Queueing Scheduler 50813.5.5 Deficit Round-Robin Scheduler 51113.5.6 Earliest Deadline First Scheduler 512Summary 512Exercises 513Computer Simulation Project 517519Tunneling 52014.1.1 Point-to-Point Protocol (PPP) 52114.1.2 IPv6 Tunneling and Dual-Stack Lite 522Virtual Private Networks (VPNs) 52414.2.1 Remote-Access VPN 52614.2.2 Site-to-Site VPN 52614.2.3 Security in VPNs 528Multiprotocol Label Switching (MPLS) 52814.3.1 Labels and Label Switch Routers (LSRs) 52914.3.2 Label Binding and Switching 531499

Contents14.414.514.6xvii14.3.3 Routing in MPLS Domains 53414.3.4 MPLS Packet Format 53614.3.5 Multi-Tunnel Routing 53714.3.6 Traffic Engineering 53814.3.7 MPLS-Based VPNs 539Summary 540Exercises 540Computer Simulation Project 54315 All-Optical Networks, WDM, and GMPLS15.1545Overview of Optical Networks 54615.1.1 Fiber Optic Links 54715.1.2 SONET/SDH Standards 54715.1.3 Generalized MPLS (GMPLS) Protocol 54815.1.4 Passive Optical Networks (PONs) 55115.2 Basic Optical Networking Devices 55315.2.1 Tunable Lasers 55315.2.2 Optical Buffers or Delay Elements 55315.2.3 Optical Amplifiers 55315.2.4 Optical Filters 55415.2.5 Wavelength-Division Multiplexer (WDM) 55515.2.6 Optical Switches 55615.3 Large-Scale Optical Switches 55815.3.1 Crossbar Optical Switches 55915.3.2 Spanke-Beneš Optical Switch 56015.4 Structure of Optical Cross Connects (OXCs) 56015.4.1 Structure of Wavelength Routing Nodes 56115.5 Routing in All-Optical Networks 56315.5.1 Wavelength Routing Versus Broadcasting 56415.5.2 Blocking Estimation over Lightpaths 56515.6 Wavelength Allocation in Networks 56715.6.1 Wavelength Allocation without Dependency 56815.6.2 Wavelength Allocation with Dependency 56915.7 Case Study: An All-Optical Switch 56915.7.1 Self-Routing in SSN 57115.7.2 Wavelength Assignment in SSN 57115.8 Summary 57215.9 Exercises 57315.10 Computer Simulation Project 575

Contentsxviii16 Cloud Computing and Network Virtualization16.116.216.316.416.516.616.7577Cloud Computing and Data Centers 57816.1.1 Platforms and APIs 58116.1.2 Cloud Computing Service Models 58116.1.3 Data Centers 58316.1.4 Virtualization in Data Centers 584Data Center Networks (DCNs) 58816.2.1 Load Balancer 58916.2.2 Traffic Engineering 59116.2.3 DCN Architectures 59116.2.4 Multicast Methods 594Network Virtualization 59516.3.1 Network Virtualization Components 596Overlay Networks 600Summary 601Exercises 602Computer Simulation Projects 60517 Software-Defined Networking (SDN) and Beyond17.117.217.317.417.5607Software-Defined Networking (SDN) 60817.1.1 Separation of Control and Data Planes 60917.1.2 Programmability of the Control Plane 61217.1.3 Standardization of Application Programming Interfaces(APIs) 613SDN-Based Network Model 61317.2.1 Control Plane 61417.2.2 Data Plane Interface (OpenFlow Protocol) 615Small-Size SDN Architectures 62017.3.1 Scalability of SDN 62017.3.2 Multicasting in SDN-Based Networks 621SDN Architectures for Clouds 62117.4.1 Software-Defined Compute and Storage 62117.4.2 Application Delivery in Data Centers by SDN 622Network Functions Virtualization (NFV) 62317.5.1 Abstract Model of NFV 62417.5.2 Distributed NFV-Based Networks 62617.5.3 Virtualized Services 627

Contentsxix17.6Information-Centric Networking (ICN) 62717.6.1 Named Objects 62817.6.2 ICN Routing and Network Management 62817.6.3 ICN Security 63117.7 Network Emulators for Advanced Networks 63217.7.1 Mininet 63217.8 Summary 63517.9 Exercises 63617.10 Computer Simulation Projects 63818 Voice over IP (VoIP) blic Switched Telephone Networks (PSTN) 64218.1.1 SS7 Network 64418.1.2 Circuit-Switched Networks 647Overview of Voice over IP (VoIP) 649H.323 Protocol 65218.3.1 Main Components of H.323 Protocol 65218.3.2 H.323 Protocol Organization 65318.3.3 RAS Signaling 65518.3.4 Call Signaling 65918.3.5 Control Signaling 66218.3.6 Conference Calling with H.323 Protocol 665Session Initiation Protocol (SIP) 66618.4.1 Main Components of SIP 66718.4.2 SIP Messages 66918.4.3 SIP Protocol Organization 67118.4.4 Registration Process 67218.4.5 Call Establishment 67318.4.6 Features and Extensions 674Softswitch Methods and MGCP 678VoIP and Multimedia Internetworking 67918.6.1 SIP to H.323 Internetworking 67918.6.2 SIP to PSTN Internetworking 68118.6.3 Wireless Cellular Multimedia Internetworking 682Summary 684Exercises 685Computer Simulation Projects 689

Contentsxx19 Media Exchange and Voice/Video CompressionOverview of Data Compression 694Digital Voice and Compression 69519.2.1 Sampling 69519.2.2 Quantization and Encoding 69619.3 Still Images and JPEG Compression 70119.3.1 Raw-Image Sampling and DCT 70219.3.2 Quantization 70519.3.3 Encoding 70619.4 Moving Images and MPEG Compression 70719.4.1 MP3 and Streaming Audio 70819.5 Compression Methods with Loss 70919.5.1 Basics of Information Theory 71019.5.2 Entropy of Information 71019.5.3 Shannon’s Coding Theorem 71119.5.4 Compression Ratio and Code Efficiency19.6 Compression Methods without Loss 71319.6.1 Run-Length Encoding 71419.6.2 Huffman Encoding 71519.6.3 Lempel-Ziv Encoding 71619.7 Scanned Document Compression 71719.8 Summary 71819.9 Exercises 71919.10 Computer Simulation Project 72469319.119.271320 Distributed and Cloud-Based Multimedia Networking20.120.2725Real-Time Media Exchange Protocols 72620.1.1 Real-Time Transport Protocol (RTP) 72720.1.2 Analysis of Jitter in RTP Traffic 73120.1.3 Real-Time Transport Control Protocol (RTCP) 73220.1.4 Real Time Streaming Protocol (RTSP) 73520.1.5 Stream Control Transmission Protocol (SCTP) 73520.1.6 HTTP-Based Streaming 740Distributed Multimedia Networking 74120.2.1 Content Distribution (Delivery) Networks (CDNs) 74120.2.2 IP Television (IPTV) and VoD 74520.2.3 Online Gaming 751

Contents20.320.420.520.620.7xxiCloud-Based Multimedia Networking 75120.3.1 Distributed Media Mini-Clouds 75220.3.2 Cloud-Based Interactive Voice Response (IVR) 754Self-Similarity and Non-Markovian Streaming 75620.4.1 Self-Similarity with Batch Arrival Models 757Summary 759Exercises 761Computer Simulation Project 76421 Mobile Ad-Hoc Networks21.121.221.321.421.521.621.7Overview of Wireless Ad-Hoc Networks 766Routing in Ad-Hoc Networks 76721.2.1 Classification of Routing Protocols 768Routing Protocols for Ad-Hoc Networks 76921.3.1 Destination-Sequenced Distance-Vector (DSDV) Protocol 76921.3.2 Cluster-Head Gateway Switch Routing (CGSR) Protocol 77121.3.3 Wireless Routing Protocol (WRP) 77221.3.4 Dynamic Source Routing (DSR) Protocol 77321.3.5 Temporally Ordered Routing Algorithm (TORA) 77421.3.6 Associativity-Based Routing (ABR) Protocol 77521.3.7 Ad-Hoc On-Demand Distance Vector (AODV) Protocol 776Security of Ad-Hoc Networks 78321.4.1 Types of Attacks 78321.4.2 Criteria for a Secure Routing Protocol 784Summary 785Exercises 786Computer Simulation Projects 78722 Wireless Sensor Networks22.1765789Sensor Networks and Protocol Structures 79022.1.1 Clustering in Sensor Networks 79022.1.2 Protocol Stack 79122.1.3 Sensor Node Structure 79322.2 Communication Energy Model 79422.3 Clustering Protocols 79922.3.1 Classification of Clustering Protocols 80022.3.2 LEACH Clustering Protocol 800

Contentsxxii22.3.3 DEEP Clustering Protocol 80122.3.4 Reclustering 80522.4 Routing Protocols 80522.4.1 Intracluster Routing Protocols 80622.4.2 Intercluster Routing Protocols 80822.5 Other Related Technologies 81122.5.1 ZigBee Technology and IEEE 802.15.4 81122.6 Case Study: Simulation of a Sensor Network 81222.6.1 Cluster-Head Constellation and Distribution of Load 81222.6.2 Optimum Percentage of Cluster Heads 81422.7 Summary 81422.8 Exercises 81522.9 Computer Simulation Projects 815A Glossary of Acronyms 817B RFCs 823C Probabilities and Stochastic ProcessesC.1C.2C.3C.4C.5827Probability Theory 827C.1.1 Bernoulli and Binomial Sequential Laws 828C.1.2 Counting and Sampling Methods 828Random Variables 828C.2.1 Basic Functions 829C.2.2 Conditional Functions 829C.2.3 Popular Random Variables 830C.2.4 Expected Value and Variance 831C.2.5 A Function of a Random Variable 832Multiple Random Variables 832C.3.1 Basic Functions of Two Random Variables 833C.3.2 Two Independent Random Variables 833Stochastic (Random) Processes 834C.4.1 IID Random Process 834C.4.2 Brownian Motion Random Process 834Theory of Markov Chains 835C.5.1 Continuous-Time Markov Chains 835D Erlang-B Blocking Probability TableIndex 841837

PrefaceThis textbook represents more than a decade of work. During this time, some materialbecame obsolete and had to be deleted. In my days as a telecommunication engineerand then a university professor, much has changed in the fields of data communications and computer networks. Nonetheless, this text covers both the foundations andthe latest advanced topics of computer communications and networking.The Internet is a revolutionary communication vehicle by which we all conveniently communicate every day and do business with one another. Because of itscomplexities at both hardware and software levels, the Internet is a challenge to thosewho want to study this field. The growing number and variety of communicationservices introduces other challenges to experts of computer networks. Such expertsare in need of effective references having in-depth balanced analysis, architecture,and description, and enabling them to better design emerging communication networks. This book fills the gaps in current available texts.ObjectivesThis textbook offers a mix of theory, architecture, and applications in computernetworking. The lack of computer communications books presenting moderateanalysis with detailed figures covering both wireline and wireless communicationtechnologies led me to write this book. The main objective of this book is to helpreaders learn the fundamentals and certain advanced concepts of computer and communication networks, using a unified set of symbols throughout a single textbook.The preparation of this book responds to the explosive demand for learning computercommunication science and engineering.xxiii

PrefacexxivThis book targets two groups of people. For people in academia, at both theundergraduate and graduate levels, the book provides a thorough design and performance evaluation of communication networks. The book can also give researchersthe ability to analyze and simulate complex communication networks. For engineerswho want to work in the communication and networking industry and need a reference covering various angles of computer networks, this book provides a varietyof learning techniques: exercises, case studies, and computer simulation projects.The book makes it easy and fun for an engineer to review and learn from a reliablenetworking reference covering all the necessary concepts and performance models.Organization of This BookThe range of topics presented in this text allows instructors to choose the topics bestsuited for their classes. Besides the explanations provided in each chapter, readers willlearn how to model a communication network and how to mathematically analyzeit. Readers of this text will benefit from the combination of theory and applicationspresented in each chapter, with the more theoretical portions of each chapter challenging those readers who are more ambitious.This book is organized into 22 chapters in two main parts, as follows. The tenchapters of Part I cover the fundamental topics in computer networking, with eachchapter serving as a base for the following chapter. Part I of the book begins withan overview of networking, focusing on TCP/IP schemes, describing routing andmulticasting in regular networks and wireless networks, and ending with a discussionof network applications, P2P networking, network management, and security. Part Iis most appropriate for readers with no experience in computer communications.The 12 chapters in Part II cover detailed analytical aspects and offer a closer perspective of advanced networking protocols: architectures of switches and routers, delayand congestion analysis, label switching, virtual private networks, optical networks,cloud computing, SDN, data compression, voice over IP (VoIP), multimedia networking, ad-hoc networking, and sensor networks. An overview of the 22 chaptersis as follows: Chapter 1, Packet-Switched Networks, introduces computer networks,touching on the need for networks, explaining relevant packet-switched networks, and giving an overview of today’s Internet. Fundamental concepts, suchas messages, packets, and frames and packet switching versus circuit switching, aredefined. Various types of packet-switched networks are defined, and how a

Prefacexxvmessage can be handled by either connection-oriented networks or connectionlessnetworks is explained. The second part of the chapter presents basics of thefive- and seven-layer Internet Protocol reference models, as well as Internet andaddressing scheme. Finally, this chapter presents a detailed analysis of packetsize and optimization. Chapter 2, Overview of Networking Devices, introduces the overall architectures of regular and wireless networking devices. The chapter starts withintroducing network interface cards (NICs), followed by switching and routingdevices, such as hubs, bridges, switches, and routers. These devices are used toswitch packets from one path to another. The devices include both wirelineand wireless devices used as user, server, or network equipment. Networkingmodems are used for access to the Internet from remote and residential areas.Finally, multiplexers are used in all layers of a network and are utilized to combine data from multiple lines into one line.Chapter 3, Data Links and Link Interfaces, focuses on the links and transmission interfaces, the two basic components that networking starts with. Thischapter presents both wired and wireless links and describes their characteristics, advantages, and channel access methods. This chapter also presents various error-detection and correction techniques at the link level and discusses theintegrity of transmitted data. The chapter further presents link-layer stop-andwait and sliding-window flow controls. We then proceed to presenting methodsof link and then channel access by multiple users, both in regular and wirelessenvironments. Finally, at the end of the chapter, the link aggregation method isdescribed. The method combines multiple network links to increase throughputbeyond what a single link can sustain. Link aggregation also has a second benefitof providing redundancy in case one of the links fails. We then introduce thewell-known Link Aggregation Control Protocol (LACP).Chapter 4, Local Area Networks and Networks of LANs, explores the implementation of small networks, using the functional aspects of the fundamentalknowledge gained in Chapters 1, 2, and 3 on basic protocols, devices, and links,respectively. The chapter provides some pointers for constructing a networkwith those devices and making connections, gives several examples of local areanetworks (LANs), and explains how such LANs are internetworked. Next, thechapter explo

4.8 IEEE 802.11 Wireless LAN Standard 142 4.8.1 IEEE 802.11 Physical Layer 144 4.8.2 802.11 MAC Layer 145 4.8.3 WiFi Networks 149 4.9 Case Study: DOCSIS, a Cable TV Protocol 151 4.10 Summary 152 4.11 Exercises 153 4.12 Computer Simulation Project 157 5 Wide-Area Routing and Internet