Table of Contents Introduction... xiii Chapter 1: Introduction to Computer Networks and Internet... 1 1.1 Computer Networks... 1 1.1.1 Advantages of Computer Networks... 2 1.1.2 Disadvantages of Computer Networks... 4 1.1.3 Uses of Computer Networks... 5 1.1.4 Types of Computer Network... 6 1.2 Internet... 10 1.2.1 Internet Architecture Board... 11 1.2.2 Internet Engineering Task Force... 12 1.2.3 Internet Research Task Force... 12 1.3 Network Edge... 13 1.3.1 Peer-to-Peer Network... 13 1.3.2 Client-Server Network... 14 1.3.3 Connection-Oriented Service... 16 1.3.4 Connectionless Service... 17 1.4 Network Core... 17 1.4.1 Circuit-Switched Network... 19 1.4.2 Packet-Switched Networks... 21 1.4.3 Message-Switched Network... 29 1.5 Access Networks... 30 1.5.1 Residential Access Network... 30 1.5.2 Institutional Access Network... 33
iv Table of Contents 1.5.3 Mobile Access Network... 35 1.6 Transmission Media... 36 1.6.1 Guided Media... 36 1.6.2 Unguided Media... 48 1.6.3 Common Cable Properties... 55 1.7 Delay, Loss, and Throughput in a Packet-Switched Network... 57 1.7.1 Delay in Packet-Switched Network... 57 1.7.2 Packet Loss... 59 1.7.3 Throughput... 59 1.8 Protocol Layers and Their Service Models... 59 1.8.1 The OSI Reference Model... 60 1.8.2 The TCP/IP Model... 67 1.8.3 Comparison between OSI and TCP/IP Reference Models... 72 1.9 History of Computer Network... 72 Summary... 85 Key Terms... 85 Review Exercise... 87 True or False... 87 Multiple Choice Questions... 88 Short Answer Questions... 90 Chapter 2: The Application Layer... 97 2.1 Principles of Computer Applications... 98 2.2 Understanding the Concept of the World Wide Web... 99 2.2.1 A Brief review about the History of World Wide Web... 99 2.2.2 Exploring the Architectural Overview of WWW... 100
Table of Contents v 2.2.3 Exploring the Hyper Text Transfer Protocol Used in WWW... 109 2.3 Understanding the Electronic Mail... 119 2.3.1 Functions of E-Mail... 121 2.3.2 Understanding the Architecture and Services of Electronic Mail.. 124 2.3.3 Exploring the User Agents of the Electronic Mail... 125 2.3.3 Exploring the Message Formats of Electronic Mail... 127 2.3.4 Understanding the Message Transfer in Electronic Mail... 131 2.3.5 Learning about the Final Delivery of the Electronic Mail... 136 2.4 Understanding the Domain Name System... 138 2.4.1 Exploring the DNS Name Space... 138 2.4.2 Exploring the Domain Name Resolution... 140 2.4.3 Exploring the Domain Resource Records... 141 2.4.4 Exploring the Name Servers... 143 2.5 Exploring Socket Programming... 143 2.5.1 Understanding Client and Server Communication... 144 2.5.2 Learning about Identification of Hosts and Service Ports... 146 2.5.3 Learning about Sockets and Socket- Based Communication... 147 2.5.4 Implementing TCP/IP Socket Programming in Java... 148 Summary... 154 Key Terms... 155 Review Exercise... 157 True or False... 157 Multiple Choice Questions... 158 Short Answer Questions... 159
vi Table of Contents Chapter 3: The Transport Layer... 163 3.1 Transport Service and Services Provided to the Upper Layers... 164 3.2 Transport Service Primitives... 165 3.3 Elements of Transport Protocols... 167 3.3.1 Addressing... 168 3.3.2 Connection Establishment... 168 3.3.3 Connection Termination... 171 3.3.4 Flow Control... 176 3.3.5 Multiplexing and Demultiplexing... 178 3.3.6 Crash Recovery... 180 3.4 Exploring the User Datagram Protocol... 182 3.4.1 Exploring Error Control in UDP... 185 3.5 Principle of Reliable Data Transfer... 190 3.5.1 Reliable Data Transfer Protocol... 191 3.6 Transmission Control Protocol... 199 3.6.1 Understanding the Features of TCP... 203 3.6.2 Using Segments, Streams, and Sequence Numbers in Transfer of Segments... 204 3.6.3 Understanding Variable Window Size, Flow Control, and Out of Sequence Urgent Data... 205 3.6.4 Understanding MSS and Optimum Size of Segment... 207 3.6.5 Computing Checksum Field of a Segment... 207 3.6.6 Understanding about Acknowledgment of Segments... 208 3.6.7 Understanding Timeout and Retransmission of Segments... 209 3.7 Understanding the TCP Connection... 211 3.7.1 Establishing a TCP Connection... 211
Table of Contents vii 3.7.2 Terminating a TCP Connection... 213 3.7.3 Resetting a TCP Connection... 215 3.8 Difference between TCP and UDP Protocols... 215 3.9 Congestion Control... 216 3.9.1 Categories of Congestion Control... 217 3.9.2 Congestion Control in TCP... 220 Summary... 224 Key Term... 224 Review Questions... 225 Multiple Choice Questions... 224 True and False... 226 Short Answer Questions... 227 Chapter 4: The Network Layer... 231 4.1 Network Layer Design Issues... 231 4.1.1 Services Provided to the Transport Layer... 232 4.1.2 Network Design... 232 4.2 Virtual Circuit Network... 234 4.3 Datagram Network... 239 4.4 Comparison of Virtual Circuit Networks and Datagram Networks... 240 4.5 Exploring Routers... 241 4.5.1 Input Ports... 243 4.5.2 Switching Fabric... 244 4.5.3 Output Ports... 246 4.5.4 Routing Processor... 246
viii Table of Contents 4.6 Routing Algorithms... 246 4.6.1 The Optimality Principle... 247 4.6.2 Distance Vector Routing... 247 4.6.3 Link State Routing... 252 4.6.4 Hierarchical Routing... 260 4.6.5 Broadcast Routing... 263 4.6.6 Multicast Routing... 267 4.6.7 Mobile Routing... 268 4.7 Difference between Distance Vector Routing and Link State Routing... 270 4.8 Congestion Control Algorithm... 271 4.8.1 Leaky Bucket... 272 4.8.2 Token Bucket... 273 4.8.3 Congestion Control in Virtual Circuit Network... 274 4.8.4 Congestion Control in Datagram Subnets... 275 4.8.5 Load Shedding... 278 4.8.6 Random Early Detection... 279 4.8.7 Jitter Control... 280 4.9 Internet Protocol (IP)... 281 4.9.1 IP Addressing... 282 4.9.2 IP Version 4 Protocol... 282 4.9.3 IP Version 6... 311 4.10 Comparison between IPv4 and IPv6... 322 4.11 Internet Control Protocols... 322 4.11.1 ICMP... 323 4.11.2 ARP... 326
Table of Contents ix 4.11.3 Reverse Address Resolution Protocol (RARP)... 331 4.11.4 DHCP... 333 Summary... 338 Key Terms... 338 Review Exercise... 340 True or False... 340 Multiple Choice Questions... 341 Short Answer Questions... 343 Chapter 5: The Link Layer and Local Area Networks... 347 5.1 Data Link Layer Functions... 348 5.1.1 Framing... 349 5.1.2 Error Control... 350 5.1.3 Flow Control... 353 5.1.4 Medium Access Control... 353 5.2 Defining Error Detection and Correction... 354 5.2.1 Need for Error Detection and Correction... 355 5.2.2 Types of Error... 356 5.2.3 Error-Detecting Codes... 358 5.2.4 Error-Correcting Codes... 363 5.3 Multiple Access Protocols... 368 5.3.1 ALOHA... 368 5.3.2 CSMA... 373 5.3.3 Collision Free Protocols... 377
x Table of Contents 5.3.4 Limited Contention Protocols... 380 5.3.5 Wavelength Division Multiple Access Protocols (WDMA Protocols)... 382 5.3.6 Wireless LAN Protocols... 383 5.4 LAN Addressing... 385 5.5 Wired LAN: Ethernet... 386 5.5.1 Traditional Ethernet... 387 5.5.2 Switched Ethernet... 387 5.5.3 Fast Ethernet... 388 5.5.4 Gigabit Ethernet... 389 5.6 Connecting LANs... 389 5.6.1 Repeaters... 390 5.6.2 Hub... 390 5.6.3 Bridges... 391 5.6.4 Switches... 394 5.6.5 Gateways... 395 5.6.6 Routers... 396 Summary... 397 Key Terms... 397 Review Questions... 398 True or False... 398 Multiple Choice Questions... 398 Short Answer Questions... 400
Table of Contents xi Lab 1: Solving the Travelling Salesman Problem (TSP) with Optimal and Shortest Routing Algorithm... 403 Lab 2: Compatibility issues between IPv6 and IPv4... 407 Lab 3: Wired Network Convergence with Wireless Network... 409 Index... 411
xii Table of Contents