Chapter 1 Computer Networks and the Internet 1
1.1 What Is the Internet? 2
1.1.1 A Nuts-and-Bolts Description 2
1.1.2 A Service Description 5
1.1.3 What Is a Protocol? 6
1.2 The Network Edge 9
1.2.1 End Systems,Clients,and Servers 9
1.2.2 Connectionless and Connection-Oriented Service 11
1.3 The Network Core 14
1.3.1 Circuit Switching and Packet Switching 14
1.3.2 Packet-Switched Networks:Datagram Networks and Virtual-Circuit Networks 21
1.4 Access Networks and Physical Media 24
1.4.1 Access Networks 25
1.4.2 Physical Media 31
1.5 ISPs and Internet Backbones 34
1.6 Delay and Loss in Packet-Switched Networks 37
1.6.1 Types of Delay 37
1.6.2 Queuing Delay and Packet Loss 40
1.6.3 Delay and Routes in the Internet 43
1.7 Protocol Layers and Their Service Models 44
1.7.1 Layered Architecture 45
1.7.2 Layers,Messages,Segments,Datagrams,and Frames 50
1.8 History of Computer Networking and the Internet 52
1.8.1 The Development of Packet Switching:1961-1972 52
1.8.2 Proprietary Networks and Internetworking:1972-1980 53
1.8.3 A Proliferation of Networks:1980-1990 56
1.8.4 The Internet Explosion:The 1990s 56
1.8.5 Recent Developments 58
1.9 Summary 59
Road-Mapping This Book 60
Homework Problems and Questions 61
Problems 62
Discussion Questions 68
Ethereal Lab 1 69
Interview:Leonard Kleinrock 71
Chapter 2 Application Layer 73
2.1 Principles of Network Applications 74
2.1.1 Network Application Architectures 75
2.1.2 Processes Communicating 78
2.1.3 Application-Layer Protocols 81
2.1.4 What Services Does an Application Need? 82
2.1.5 Services Provided by the Internet Transport Protocols 84
2.1.6 Network Applications Covered in This Book 87
2.2 The Web and HTTP 87
2.2.1 Overview of HTTP 88
2.2.2 Nonpersistent and Persistent Connections 90
2.2.3 HTTP Message Format 93
2.2.4 User-Server Interaction:Cookies 98
2.2.5 HTTP Content 100
2.2.6 Web Caching 100
2.2.7 The Conditional GET 105
2.3 File Transfer:FTP 106
2.3.1 FTP Commands and Replies 108
2.4 Electronic Mail in the Internet 109
2.4.1 SMTP 112
2.4.2 Comparison with HTTP 115
2.4.3 Mail Message Formats and MIME 115
2.4.4 Mail Access Protocols 118
2.5 DNS—The Internet’s Directory Service 123
2.5.1 Services Provided by DNS 123
2.5.2 Overview of How DNS Works 126
2.5.3 DNS Records and Messages 132
2.6 P2P File Sharing 136
2.7 Socket Programming with TCP 146
2.7.1 Socket Programming with TCP 147
2.7.2 An Example Client/Server Application in Java 149
2.8 Socket Programming with UDP 156
2.9 Building a Simple Web Server 164
2.9.1 Web Server Functions 164
2.10 Summary 169
Homework Problems and Questions 170
Problems 171
Discussion Questions 177
Socket Programming Assignments 178
Ethereal Labs 180
Interview:Tim Berners-Lee 181
Chapter 3 Transport Layer 183
3.1 Introduction and Transport-Layer Services 184
3.1.1 Relationship Between Transport and Network Layers 184
3.1.2 Overview of the Transport Layer in the Internet 187
3.2 Multiplexing and Demultiplexing 189
3.3 Connectionless Transport:UDP 196
3.3.1 UDP Segment Structure 199
3.3.2 UDP Checksum 200
3.4 Principles of Reliable Data Transfer 201
3.4.1 Building a Reliable Data Transfer Protocol 203
3.4.2 Pipelined Reliable Data Transfer Protocols 214
3.4.3 Go-Back-N (GBN) 217
3.4.4 Selective Repeat (SR) 221
3.5 Connection-Oriented Transport:TCP 228
3.5.1 The TCP Connection 228
3.5.2 TCP Segment Structure 231
3.5.3 Round-Trip Time Estimation and Timeout 236
3.5.4 Reliable Data Transfer 239
3.5.5 Flow Control 246
3.5.6 TCP Connection Management 249
3.6 Principles of Congestion Control 254
3.6.1 The Causes and the Costs of Congestion 254
3.6.2 Approaches to Congestion Control 260
3.6.3 Network-Assisted Congestion-Control Example:ATM ABR Congestion Control 261
3.7 TCP Congestion Control 264
3.7.1 Fairness 271
3.7.2 TCP Delay Modeling 275
3.8 Summary 284
Homework Problems and Questions 285
Problems 287
Discussion Questions 294
Programming Assignments 295
Ethereal Lab:Exploring TCP 295
Interview:Sally Floyd 297
Chapter 4 The Network Layer 299
4.1 Introduction 300
4.1.1 Forwarding and Routing 301
4.1.2 Network Service Models 304
4.2 Virtual Circuit and Datagram Networks 307
4.2.1 Virtual-Circuit Networks 307
4.2.2 Datagram Networks 310
4.2.3 Origins of VC and Datagram Networks 313
4.3 What’s Inside a Router? 314
4.3.1 Input Ports 315
4.3.2 Switching Fabric 318
4.3.3 Output Ports 320
4.3.4 Where Does Queuing Occur? 320
4.4 The Internet Protocol (IP):Forwarding and Addressing in the Internet 323
4.4.1 Datagram Format 325
4.4.2 IPv4 Addressing 331
4.4.3 Internet Control Message Protocol (ICMP) 342
4.4.4 IPv6 344
4.5 Routing Algorithms 351
4.5.1 The Link-State (LS) Routing Algorithm 354
4.5.2 The Distance-Vector (DV) Routing Algorithm 358
4.5.3 Hierarchical Routing 366
4.6 Routing in the Internet 370
4.6.1 Intra-AS Routing in the Internet:RIP 371
4.6.2 Intra-AS Routing in the Internet:OSPF 374
4.6.3 Inter-Autonomous System Routing:BGP 378
4.7 Broadcast and Multicast Routing 384
4.7.1 Broadcast Routing Algorithms 385
4.7.2 Multicast 391
4.8 Summary 399
Homework Problems and Questions 400
Problems 403
Discussion Questions 412
Programming Assignment 412
Ethereal Lab 413
Interview:Vinton G.Cerf 414
Chapter 5 The Link Layer and Local Area Networks 417
5.1 Link Layer:Introduction and Services 419
5.1.1 The Services Provided by the Link Layer 419
5.1.2 Adapters Communicating 422
5.2 Error-Detection and -Correction Techniques 423
5.2.1 Parity Checks 425
5.2.2 Checksumming Methods 427
5.2.3 Cyclic Redundancy Check (CRC) 428
5.3 Multiple Access Protocols 430
5.3.1 Channel Partitioning Protocols 433
5.3.2 Random Access Protocols 435
5.3.3 Taking-Turns Protocols 442
5.3.4 Local Area Networks (LANs) 443
5.4 Link-Layer Addressing 445
5.4.1 MAC Addresses 445
5.4.2 Address Resolution Protocol (ARP) 447
5.4.3 Dynamic Host Configuration Protocol 451
5.5 Ethernet 455
5.5.1 Ethernet Frame Structure 456
5.5.2 CSMA/CD:Ethernet’s Multiple Access Protocol 460
5.5.3 Ethernet Technologies 463
5.6 Interconnections:Hubs and Switches 465
5.6.1 Hubs 465
5.6.2 Link-Layer Switches 467
5.7 PPP:The Point-to-Point Protocol 477
5.7.1 PPP Data Framing 479
5.7.2 PPP Link-Control Protocol (LCP) and Network-Control Protocols 480
5.8 Link Virtualization:A Network as a Link Layer 482
5.8.1 Asynchronous Transfer Mode (ATM) Networks 483
5.8.2 Multiprotocol Label Switching (MPLS) 488
5.9 Summary 491
Homework Problems and Questions 493
Problems 494
Discussion Questions 498
Ethereal Lab 499
Interview:Simon S.Lam 500
Chapter 6 Wireless and Mobile Networks 503
6.1 Introduction 504
6.2 Wireless Links and Network Characteristics 508
6.2.1 CDMA 509
6.3 Wi-Fi:802.11 Wireless LANs 513
6.3.1 The 802.11 Architecture 514
6.3.2 The 802.11 MAC Protocol 517
6.3.3 The IEEE 802.11 Frame 523
6.3.4 Mobility in the Same IP Subnet 526
6.3.5 802.15 and Bluetooth 528
6.4 Cellular Internet Access 529
6.4.1 An Overview of Cellular Architecture 531
6.4.2 Cellular Standards and Technologies:A Brief Survey 532
6.5 Mobility Management:Principles 536
6.5.1 Addressing 538
6.5.2 Routing to a Mobile Node 540
6.6 Mobile IP 546
6.7 Managing Mobility in Cellular Networks 551
6.7.1 Routing Calls to a Mobile User 552
6.7.2 Handoffs in GSM 553
6.8 Wireless and Mobility:Impact on Higher-layer Protocols 556
6.9 Summary 559
Homework Problems and Questions 559
Problems 560
Discussion Questions 562
Ethereal Lab 562
Interview:Charlie Perkins 563
Chapter 7 Multimedia Networking 565
7.1 Multimedia Networking Applications 566
7.1.1 Examples of Multimedia Applications 566
7.1.2 Hurdles for Multimedia in Today’s Internet 569
7.1.3 How Should the Internet Evolve to Support Multimedia Better? 571
7.1.4 Audio and Video Compression 572
7.2 Streaming Stored Audio and Video 574
7.2.1 Accessing Audio and Video Through a Web Server 576
7.2.2 Sending Multimedia from a Streaming Server to a Helper Application 578
7.2.3 Real-Time Streaming Protocol (RTSP) 580
7.3 Making the Best of the Best-Effort Service:An Internet Phone Example 584
7.3.1 The Limitations of a Best-Eggort Service 585
7.3.2 Removing Jitter at the Receiver for Audio 587
7.3.3 Recovering from Packet Loss 590
7.3.4 Streaming Stored Audio and Video 594
7.4 Protocols for Real-Time Interactive Applications 594
7.4.1 RTP 594
7.4.2 RTP Control Protocol (RTCP) 599
7.4.3 SIP 602
7.4.4 H.323 608
7.5 Distributing Multimedia:Content Distribution Networks 610
7.6 Beyond Best Effort 614
7.6.1 Scenario 1:A 1 Mbps Audio Application and an FTP Transfer 615
7.6.2 Scenario 2:A 1 Mbps Audio Application and a High-Priority FTP Transfer 616
7.6.3 Scenario 3:A Misbehaving Audio Application and an FTP Transfer 617
7.6.4 Scenario 4:Two 1 Mbps Audio Applications over an Overloaded 1.5 Mbps Link 619
7.7 Scheduling and Policing Mechanisms 620
7.7.1 Scheduling Mechanisms 621
7.7.2 Policing:The Leaky Bucket 625
7.8 Integrated Services and Differentiated Services 628
7.8.1 Intserv 628
7.8.2 Diffserv 631
7.9 RSVP 636
7.9.1 The Essence of RSVP 637
7.9.2 A Few Simple Examples 639
7.10 Summary 643
Homework Problems and Questions 644
Problems 645
Discussion Questions 649
Programming Assignment 649
Interview:Henning Schulzrinne 651
Chapter 8 Security in Computer Networks 653
8.1 What Is Network Security? 654
8.2 Principles of Cryptography 657
8.2.1 Symmetric Key Cryptography 660
8.2.2 Public Key Encryption 664
8.3 Authentication 670
8.3.1 Authentication Protocol ap1.0 670
8.3.2 Authentication Protocol ap2.0 671
8.3.3 Authentication Protocol ap3.0 672
8.3.4 Authentication Protocol ap3.1 672
8.3.5 Authentication Protocol ap4.0 673
8.3.6 Authentication Protocol ap5.0 674
8.4 Integrity 678
8.4.1 Generating Digital Signatures 678
8.4.2 Message Digests 679
8.4.3 Hash Function Algorithms 681
8.5 Key Distribution and Certification 684
8.5.1 The Key Distribution Center 686
8.5.2 Public Key Certification 687
8.6 Access Control:Firewalls 691
8.6.1 Packet Filtering 692
8.6.2 Application Gateway 695
8.7 Attacks and Countermeasures 697
8.7.1 Mapping 697
8.7.2 Packet Sniffing 698
8.7.3 Spoofing 699
8.7.4 Denial-of-Service and Distributed Denial-of-Service Attacks 700
8.7.5 Hijacking 701
8.8 Security in Many Layers:Case Studies 702
8.8.1 Secure E-mail 703
8.8.2 Secure Sockets Layer (SSL) and Transport Layer Security (TLS) 708
8.8.3 Network-Layer Security:IPsec 712
8.8.4 Security in IEEE 802.11 716
8.9 Summary 721
Homework Problems and Questions 722
Problems 723
Discussion Questions 725
Interview:Steven M.Bellovin 726
Chapter 9 Network Management 729
9.1 What Is Network Management? 730
9.2 The Infrastructure for Network Management 734
9.3 The Internet-Standard Management Framework 738
9.3.1 Structure of Management Information:SMI 740
9.3.2 Management Information Base:MIB 743
9.3.3 SNMP Protocol Operations and Transport Mappings 745
9.3.4 Security and Administration 749
9.4 ASN.1 753
9.5 Conclusion 757
Homework Problems and Questions 758
Problems 759
Discussion Questions 760
Interview:Jeff Case 761
References 763
Index 797