+ All Categories
Home > Documents > TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and...

TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and...

Date post: 22-Mar-2018
Category:
Upload: buinhu
View: 215 times
Download: 3 times
Share this document with a friend
36
THE TCP/IP GUIDE by Charles M. Kozierok SECTION I TCP/IP OVERVIEW AND BACKGROUND INFORMATION PART I-1 NETWORKING FUNDAMENTALS 1 NETWORKING INTRODUCTION, CHARACTERISTICS, AND TYPES 5 Introduction to Networking ................................................................................................ 6 What Is Networking? ................................................................................................. 6 The Advantages and Benefits of Networking ................................................................. 7 The Disadvantages and Costs of Networking ................................................................ 9 Fundamental Network Characteristics ............................................................................... 10 Networking Layers, Models, and Architectures ............................................................ 10 Protocols: What Are They, Anyway? .......................................................................... 11 Circuit-Switching and Packet-Switching Networks ........................................................ 13 Connection-Oriented and Connectionless Protocols ...................................................... 16 Messages: Packets, Frames, Datagrams, and Cells ............................................................. 17 Message Formatting: Headers, Payloads, and Footers ................................................. 19 Message Addressing and Transmission Methods: Unicast, Broadcast, and Multicast ........ 20 Network Structural Models and Client-Server and Peer-to-Peer Networking ............................ 23 Types and Sizes of Networks ........................................................................................... 26 Segments, Networks, Subnetworks, and Internetworks ........................................................ 27 The Internet, Intranets, and Extranets ................................................................................. 30 2 NETWORK PERFORMANCE ISSUES AND CONCEPTS 33 Putting Network Performance in Perspective ....................................................................... 34 Balancing Network Performance with Key Nonperformance Characteristics .......................... 35 Performance Measurements: Speed, Bandwidth, Throughput, and Latency ............................ 36 Speed .................................................................................................................... 36 Bandwidth .............................................................................................................. 37 Throughput ............................................................................................................. 37 Latency .................................................................................................................. 37 Summary of Performance Measurements .................................................................... 38 Understanding Performance Measurement Units ................................................................. 39 Bits and Bytes ......................................................................................................... 39 Baud ..................................................................................................................... 40 Theoretical and Real-World Throughput, and Factors Affecting Network Performance ............. 41 Normal Network Overhead ...................................................................................... 41 External Performance Limiters .................................................................................... 42 Network Configuration Problems ............................................................................... 42 Asymmetry ............................................................................................................. 43 Simplex, Full-Duplex, and Half-Duplex Operation ............................................................... 43 Simplex Operation .................................................................................................. 44 Half-Duplex Operation ............................................................................................. 44 Full-Duplex Operation .............................................................................................. 44 Quality of Service (QoS) ................................................................................................. 45
Transcript
Page 1: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

T H E T C P / I P G U I D Eby Charles M. Kozierok

SECTION ITCP/IP OVERVIEW AND BACKGROUND INFORMATION

PART I-1NETWORKING FUNDAMENTALS

1NETWORKING INTRODUCTION, CHARACTERISTICS, AND TYPES 5

Introduction to Networking ................................................................................................6What Is Networking? .................................................................................................6The Advantages and Benefits of Networking .................................................................7The Disadvantages and Costs of Networking ................................................................9

Fundamental Network Characteristics ...............................................................................10Networking Layers, Models, and Architectures ............................................................10Protocols: What Are They, Anyway? ..........................................................................11Circuit-Switching and Packet-Switching Networks ........................................................13Connection-Oriented and Connectionless Protocols ......................................................16

Messages: Packets, Frames, Datagrams, and Cells .............................................................17Message Formatting: Headers, Payloads, and Footers .................................................19Message Addressing and Transmission Methods: Unicast, Broadcast, and Multicast ........20

Network Structural Models and Client-Server and Peer-to-Peer Networking ............................23Types and Sizes of Networks ...........................................................................................26Segments, Networks, Subnetworks, and Internetworks ........................................................27The Internet, Intranets, and Extranets .................................................................................30

2NETWORK PERFORMANCE ISSUES AND CONCEPTS 33

Putting Network Performance in Perspective .......................................................................34Balancing Network Performance with Key Nonperformance Characteristics ..........................35Performance Measurements: Speed, Bandwidth, Throughput, and Latency ............................36

Speed ....................................................................................................................36Bandwidth ..............................................................................................................37Throughput .............................................................................................................37Latency ..................................................................................................................37Summary of Performance Measurements ....................................................................38

Understanding Performance Measurement Units .................................................................39Bits and Bytes .........................................................................................................39Baud .....................................................................................................................40

Theoretical and Real-World Throughput, and Factors Affecting Network Performance .............41Normal Network Overhead ......................................................................................41External Performance Limiters ....................................................................................42Network Configuration Problems ...............................................................................42Asymmetry .............................................................................................................43

Simplex, Full-Duplex, and Half-Duplex Operation ...............................................................43Simplex Operation ..................................................................................................44Half-Duplex Operation .............................................................................................44Full-Duplex Operation ..............................................................................................44

Quality of Service (QoS) .................................................................................................45

TCPIP_01TOC.fm Page i Thursday, June 9, 2005 11:16 AM

Page 2: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

ii Conten t s in Detai l

3NETWORK STANDARDS AND STANDARDS ORGANIZATIONS 47

Proprietary, Open, and De Facto Standards ......................................................................48Proprietary Standards ..............................................................................................48Open Standards .....................................................................................................49De Facto Standards .................................................................................................50

Networking Standards ....................................................................................................50International Networking Standards Organizations ............................................................51Networking Industry Groups ............................................................................................53Internet Standards Organizations (ISOC, IAB, IESG, IETF, IRSG, and IRTF) ............................54Internet Registration Authorities and Registries

(IANA, ICANN, APNIC, ARIN, LACNIC, and RIPE NCC) ......................................57Internet Centralized Registration Authorities ................................................................57Modern Hierarchy of Registration Authorities ..............................................................58

Internet Standards and the Request for Comment (RFC) Process ............................................59RFC Categories .......................................................................................................60The Internet Standardization Process ..........................................................................60

4A REVIEW OF DATA REPRESENTATION ANDTHE MATHEMATICS OF COMPUTING 63

Binary Information and Representation: Bits, Bytes, Nibbles, Octets, and Characters ..............64Binary Information ...................................................................................................64Binary Information Representation and Groups ...........................................................65Byte Versus Octet ....................................................................................................66

Decimal, Binary, Octal, and Hexadecimal Numbers ...........................................................67Binary Numbers and Their Decimal Equivalents ...........................................................67Making Binary Numbers Easier to Use by Grouping Bits ..............................................68Octal Numbers .......................................................................................................68Hexadecimal Numbers ............................................................................................69

Decimal, Binary, Octal, and Hexadecimal Number Conversion ...........................................70Binary, Octal, and Hexadecimal Conversions .............................................................70Conversion from Binary, Octal, or Hexadecimal to Decimal .........................................71Conversion from Decimal to Binary, Octal or Hexadecimal ..........................................72

Binary, Octal, and Hexadecimal Arithmetic .......................................................................73Binary Arithmetic .....................................................................................................74Octal and Hexadecimal Arithmetic ............................................................................74

Boolean Logic and Logical Functions ................................................................................75Boolean Logical Functions ........................................................................................75Combining Boolean Expressions ...............................................................................77

Bit Masking (Setting, Clearing, and Inverting) Using Boolean Logical Functions ......................77Setting Groups of Bits with OR ..................................................................................78Clearing Bits with AND ............................................................................................78Inverting Bits with XOR .............................................................................................79

TCPIP_01TOC.fm Page ii Thursday, June 9, 2005 11:16 AM

Page 3: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Content s i n De ta i l iii

PART I-2THE OPEN SYSTEM INTERCONNECTION (OSI)REFERENCE MODEL

5GENERAL OSI REFERENCE MODEL ISSUES AND CONCEPTS 83

History of the OSI Reference Model ..................................................................................84General Reference Model Issues ......................................................................................85

The Benefits of Networking Models ...........................................................................85Why Understanding the OSI Reference Model Is Important to You .................................86How to Use the OSI Reference Model ........................................................................87Other Network Architectures and Protocol Stacks ........................................................88

Key OSI Reference Model Concepts .................................................................................89OSI Reference Model Networking Layers, Sublayers, and Layer Groupings ....................89“N” Notation and Other OSI Model Layer Terminology ...............................................91Interfaces: Vertical (Adjacent Layer) Communication ....................................................93Protocols: Horizontal (Corresponding Layer) Communication ........................................95Data Encapsulation, Protocol Data Units (PDUs), and Service Data Units (SDUs) ..............97Indirect Device Connection and Message Routing ..................................................... 100

6OSI REFERENCE MODEL LAYERS 103

Physical Layer (Layer 1) ................................................................................................. 104Data Link Layer (Layer 2) ............................................................................................... 105Network Layer (Layer 3) ................................................................................................ 107Transport Layer (Layer 4) ............................................................................................... 108Session Layer (Layer 5) ................................................................................................. 111Presentation Layer (Layer 6) ...........................................................................................112Application Layer (Layer 7) ............................................................................................113

7OSI REFERENCE MODEL SUMMARY 115

Understanding the OSI Model: An Analogy ..................................................................... 115Remembering the OSI Model Layers: Some Mnemonics .................................................... 118Summarizing the OSI Model Layers: A Summary Chart ..................................................... 119

PART I-3TCP/IP PROTOCOL SUITE AND ARCHITECTURE

8TCP/IP PROTOCOL SUITE AND ARCHITECTURE 123

TCP/IP Overview and History ........................................................................................ 124TCP/IP History and Development ............................................................................. 124Important Factors in the Success of TCP/IP ................................................................ 125

TCP/IP Services ........................................................................................................... 127The TCP/IP Client/Server Structural Model ......................................................................127

Hardware and Software Roles ................................................................................ 129Transactional Roles ................................................................................................ 129

TCP/IP Architecture and the TCP/IP Model ......................................................................130

TCPIP_01TOC.fm Page iii Thursday, June 9, 2005 11:16 AM

Page 4: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

iv Conten t s in Deta i l

Network Interface Layer ......................................................................................... 131Internet Layer ........................................................................................................ 131Host-to-Host Transport Layer .................................................................................... 132Application Layer .................................................................................................. 132

TCP/IP Protocols .......................................................................................................... 133

SECTION IITCP/IP LOWER-LAYER CORE PROTOCOLS

PART II -1TCP/IP NETWORK INTERFACE LAYER PROTOCOLS

9TCP/IP SERIAL LINE INTERNET PROTOCOL (SLIP)AND POINT-TO-POINT PROTOCOL PPP OVERVIEWAND FUNDAMENTALS 141

SLIP versus PPP ............................................................................................................. 142Serial Line Internet Protocol (SLIP) ................................................................................... 143

SLIP Data Framing Method and General Operation ................................................... 143Problems and Limitations of SLIP .............................................................................. 144

Point-to-Point Protocol (PPP) Overview and Fundamentals ................................................... 146Development and Standardization ........................................................................... 146Function and Architecture ....................................................................................... 147Advantages and Benefits ........................................................................................ 147PPP Main Components ...........................................................................................148PPP Functional Groups ...........................................................................................149General Operation ................................................................................................ 149PPP Link Setup and Phases ...................................................................................... 150PPP Standards .......................................................................................................153

10PPP CORE PROTOCOLS: LINK CONTROL, NETWORKCONTROL, AND AUTHENTICATION 157

Link Control Protocol (LCP) .............................................................................................157LCP Packets .......................................................................................................... 158LCP Link Configuration ...........................................................................................159LCP Link Maintenance ............................................................................................161LCP Link Termination .............................................................................................. 161Other LCP Messages .............................................................................................. 161

The Network Control Protocols (IPCP, IPXCP, NBFCP, and Others) .....................................161Operation of NCPs ................................................................................................ 162The Internet Protocol Control Protocol (IPCP): An Example NCP ................................... 164

PPP Authentication Protocols: PAP and CHAP ................................................................... 164PAP ..................................................................................................................... 164CHAP ..................................................................................................................165

11PPP FEATURE PROTOCOLS 169

PPP Link Quality Monitoring and Reporting (LQM, LQR) .................................................... 170LQR Setup ............................................................................................................ 170

TCPIP_01TOC.fm Page iv Thursday, June 9, 2005 11:16 AM

Page 5: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten t s in Detai l v

Using Link Quality Reports ...................................................................................... 171PPP Compression Control Protocol (CCP) and Compression Algorithms ............................... 171

CCP Operation: Compression Setup ........................................................................ 172CCP Configuration Options and Compression Algorithms .......................................... 173Compression Algorithm Operation: Compressing and Decompressing Data .................173

PPP Encryption Control Protocol (ECP) and Encryption Algorithms ....................................... 174ECP Operation: Encryption Setup ............................................................................ 175ECP Configuration Options and Encryption Algorithms .............................................. 175Encryption Algorithm Operation: Encrypting and Decrypting Data ............................... 176

PPP Multilink Protocol (MP, MLP, MLPPP) ......................................................................... 177PPP Multilink Protocol Architecture ........................................................................... 178PPP Multilink Protocol Setup and Configuration ......................................................... 179PPP Multilink Protocol Operation ............................................................................. 179

PPP Bandwidth Allocation Protocol (BAP) and Bandwidth Allocation Control Protocol (BACP) . 180BACP Operation: Configuring the Use of BAP ...........................................................181BAP Operation: Adding and Removing Links ............................................................181

12PPP PROTOCOL FRAME FORMATS 183

PPP General Frame Format ............................................................................................184Protocol Field Ranges .............................................................................................185Protocol Field Values .............................................................................................186PPP Field Compression ...........................................................................................187

PPP General Control Protocol Frame Format and Option Format ........................................ 188PPP Control Messages and Code Values .................................................................. 189PPP Control Message Option Format .......................................................................190Summary of PPP Control Message Formatting ...........................................................192

PPP Link Control Protocol (LCP) Frame Formats ................................................................. 192PAP and CHAP Frame Formats ...................................................................................... 194

PPP PAP Control Frame Formats .............................................................................. 194PPP CHAP Control Frame Formats ........................................................................... 196

PPP Multilink Protocol (MP) Frame Format ........................................................................ 197PPP MP Frame Fragmentation Process ......................................................................198PPP MP Fragment Frame Format .............................................................................. 198PPP MP Fragmentation Demonstration ......................................................................200

PART II -2TCP/IP NETWORK INTERFACE/INTERNET LAYER CONNECTION PRO TOCOLS

13ADDRESS RESOLUTION AND THE TCP/IP ADDRESSRESOLUTION PROTOCOL (ARP) 205

Address Resolution Concepts and Issues .......................................................................... 206The Need for Address Resolution ............................................................................. 206Address Resolution Through Direct Mapping ............................................................. 208Dynamic Address Resolution ................................................................................... 211

TCP/IP Address Resolution Protocol (ARP) ........................................................................ 214ARP Address Specification and General Operation ................................................... 215ARP Message Format .............................................................................................218ARP Caching ........................................................................................................ 220

TCPIP_01TOC.fm Page v Thursday, June 9, 2005 11:16 AM

Page 6: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

vi Conten t s in Deta i l

Proxy ARP ............................................................................................................ 223TCP/IP Address Resolution for IP Multicast Addresses ....................................................... 225TCP/IP Address Resolution for IP Version 6 ......................................................................226

14REVERSE ADDRESS RESOLUTION AND THE TCP/IPREVERSE ADDRESS RESOLUTION PROTOCOL (RARP) 229

The Reverse Address Resolution Protocol (RARP) ............................................................... 230RARP General Operation .............................................................................................. 231Limitations of RARP .......................................................................................................232

PART II -3INTERNET PROTOCOL VERSION 4 ( IP/IPV4)

15INTERNET PROTOCOL VERSIONS: CONCEPTS AND OVERVIEW 237

IP Overview and Key Operational Characteristics ............................................................238IP Functions .................................................................................................................240IP History, Standards, Versions, and Closely Related Protocols ........................................... 241

IP Versions and Version Numbers ............................................................................ 241IP-Related Protocols ................................................................................................ 242

16IPV4 ADDRESSING CONCEPTS AND ISSUES 243

IP Addressing Overview and Fundamentals ..................................................................... 244Number of IP Addresses Per Device ......................................................................... 245Address Uniqueness and Network Specificity ............................................................245Contrasting IP Addresses and Data Link Layer Addresses ........................................... 246Private and Public IP Network Addresses .................................................................. 246IP Address Configuration and Addressing Types ....................................................... 246

IP Address Size, Address Space, and Notation ................................................................ 247IP Address Size and Binary Notation .......................................................................247IP Address Dotted Decimal Notation ........................................................................ 247IP Address Space .................................................................................................. 248

IP Basic Address Structure and Main Components ............................................................249Network ID and Host ID ......................................................................................... 249Location of the Division Between Network ID and Host ID ........................................... 250

IP Addressing Categories and IP Address Adjuncts ...........................................................251Conventional (Classful) Addressing .......................................................................... 252Subnetted Classful Addressing ................................................................................ 252Classless Addressing .............................................................................................252Subnet Mask and Default Gateway ......................................................................... 253

Number of IP Addresses and Multihoming .......................................................................253IP Address Management and Assignment Methods and Authorities .................................... 255

17CLASSFUL (CONVENTIONAL) ADDRESSING 257

IP Classful Addressing Overview and Address Classes ...................................................... 258IP Address Classes ................................................................................................ 258

TCPIP_01TOC.fm Page vi Thursday, June 9, 2005 11:16 AM

Page 7: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Content s in Deta i l vii

Rationale for Classful Addressing ............................................................................ 259IP Classful Addressing Network and Host Identification and Address Ranges ....................... 260

Classful Addressing Class Determination Algorithm ................................................... 260Determining Address Class from the First Octet Bit Pattern .......................................... 262

IP Address Class A, B, and C Network and Host Capacities .............................................. 264IP Addresses with Special Meanings ............................................................................... 265IP Reserved, Private, and Loopback Addresses ................................................................. 267

Reserved Addresses ............................................................................................... 267Private, Unregistered, Nonroutable Addresses .......................................................... 267Loopback Addresses .............................................................................................. 268Reserved, Private, and Loopback Addressing Blocks .................................................. 269

IP Multicast Addressing ................................................................................................. 270Multicast Address Types and Ranges ......................................................................270Well-Known Multicast Addresses ............................................................................. 271

Problems with Classful IP Addressing .............................................................................. 271

18IP SUBNET ADDRESSING (SUBNETTING) CONCEPTS 275

IP Subnet Addressing Overview, Motivation, and Advantages ........................................... 276IP Subnetting: Three-Level Hierarchical IP Subnet Addressing ............................................ 278IP Subnet Masks, Notation, and Subnet Calculations ........................................................ 279

Function of the Subnet Mask ................................................................................... 279Subnet Mask Notation ...........................................................................................280Applying the Subnet Mask: An Example ................................................................... 281Rationale for Subnet Mask Notation ........................................................................ 283

IP Default Subnet Masks for Address Classes A, B, and C .................................................283IP Custom Subnet Masks ............................................................................................... 285

Deciding How Many Subnet Bits to Use ................................................................... 285Determining the Custom Subnet Mask ......................................................................286Subtracting Two from the Number of Hosts per Subnet and

(Possibly) Subnets per Network ........................................................................ 288IP Subnet Identifiers, Subnet Addresses, and Host Addresses ............................................. 289

Subnet Identifiers ................................................................................................... 289Subnet Addresses .................................................................................................. 289Host Addresses Within Each Subnet ........................................................................ 290

IP Subnetting Summary Tables for Class A, Class B, and Class C Networks ......................... 291IP Variable Length Subnet Masking (VLSM) ......................................................................294

The Solution: Variable Length Subnet Masking .......................................................... 296Multiple-Level Subnetting Using VLSM ......................................................................296

19IP SUBNETTING PRACTICAL SUBNET DESIGN ANDADDRESS DETERMINATION EXAMPLE 299

IP Subnetting Step 1: Analyzing Requirements ................................................................. 300IP Subnetting Step 2: Partitioning Network Address Host Bits ............................................. 301

Class C Subnetting Design Example ........................................................................ 302Class B Subnetting Design Example ......................................................................... 303

IP Subnetting Step 3: Determining the Custom Subnet Mask ............................................... 304Calculating the Custom Subnet Mask .......................................................................305Determining the Custom Subnet Mask Using Subnetting Tables ................................... 307

IP Subnetting Step 4: Determining Subnet Identifiers and Subnet Addresses ......................... 307Class C Subnet ID and Address Determination Example ............................................. 308

TCPIP_01TOC.fm Page vii Thursday, June 9, 2005 11:16 AM

Page 8: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

viii Conten t s in Detai l

Class B Subnet ID and Address Determination Example ............................................. 309Using Subnet Address Formulas to Calculate Subnet Addresses ................................... 311

IP Subnetting Step 5: Determining Host Addresses for Each Subnet .....................................312Class C Host Address Determination Example ...........................................................312Class B Host Address Determination Example ...........................................................315Shortcuts for Computing Host Addresses .................................................................. 315

20IP CLASSLESS ADDRESSING—CLASSLESSINTER-DOMAIN ROUTING (CIDR)/SUPERNETTING 317

IP Classless Addressing and Supernetting Overview ......................................................... 318The Main Problem with Classful Addressing .............................................................. 318The Solution: Eliminate Address Classes ................................................................... 319The Many Benefits of Classless Addressing and Routing ............................................. 319

IP Supernetting: CIDR Hierarchical Addressing and Notation ............................................. 321CIDR (Slash) Notation ............................................................................................321Supernetting: Subnetting the Internet ........................................................................ 322Common Aspects of Classful and Classless Addressing .............................................. 323

IP Classless Addressing Block Sizes and Classful Network Equivalents ................................ 324IP CIDR Addressing Example ......................................................................................... 326

First Level of Division .............................................................................................. 326Second Level of Division ......................................................................................... 327Third Level of Division ............................................................................................329

21INTERNET PROTOCOL DATAGRAM ENCAPSULATIONAND FORMATTING 331

IP Datagram Encapsulation ............................................................................................332IP Datagram General Format ......................................................................................... 334

IP Datagram Time to Live (TTL) Field ......................................................................... 337IP Datagram Type of Service (TOS) Field .................................................................. 337

IP Datagram Options and Option Format ........................................................................ 338

22IP DATAGRAM SIZE, FRAGMENTATION, ANDREASSEMBLY 341

IP Datagram Size, MTU, and Fragmentation Overview ..................................................... 342IP Datagram Size and the Underlying Network Frame Size ........................................ 342MTU and Datagram Fragmentation ......................................................................... 343Multiple-Stage Fragmentation ..................................................................................344Internet Minimum MTU: 576 Bytes ........................................................................... 345MTU Path Discovery .............................................................................................. 345

IP Message Fragmentation Process .................................................................................346The IP Fragmentation Process ..................................................................................346Fragmentation-Related IP Datagram Header Fields ..................................................... 348

IP Message Reassembly ............................................................................................... 349

23IP ROUTING AND MULTICASTING 353

IP Datagram Delivery .................................................................................................... 354

TCPIP_01TOC.fm Page viii Thursday, June 9, 2005 11:16 AM

Page 9: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten ts in Detai l ix

Direct Datagram Delivery ....................................................................................... 355Indirect Datagram Delivery (Routing) ........................................................................ 355The Relationship Between Datagram Routing and Addressing .....................................356

IP Routing Concepts and the Process of Next-Hop Routing .................................................357IP Routes and Routing Tables ......................................................................................... 359IP Routing in a Subnet or Classless Addressing (CIDR) Environment .................................... 361IP Multicasting ............................................................................................................. 362

Multicast Addressing .............................................................................................363Multicast Group Management .................................................................................363Multicast Datagram Processing and Routing ............................................................. 363

PART II -4INTERNET PROTOCOL VERSION 6 ( IPV6)

24IPV6 OVERVIEW, CHANGES, AND TRANSITION 367

IPv6 Motivation and Overview ....................................................................................... 368IPv6 Standards ......................................................................................................368Design Goals of IPv6 .............................................................................................369

Major Changes and Additions in IPv6 ............................................................................ 370Transition from IPv4 to IPv6 ...........................................................................................372

IPv4 to IPv6 Transition: Differences of Opinion .......................................................... 372IPv4 to IPv6 Transition Methods ............................................................................... 373

25IPV6 ADDRESSING 375

IPv6 Addressing Overview: Addressing Model, Address Types, and Address Size ............... 376IPv6 Addressing Model Characteristics .................................................................... 376IPv6 Supported Address Types ................................................................................ 377IPv6 Address Size and Address Space ..................................................................... 378

IPv6 Address and Address Notation and Prefix Representation .......................................... 380IPv6 Address Hexadecimal Notation ........................................................................ 380Zero Compression in IPv6 Addresses .......................................................................381IPv6 Mixed Notation .............................................................................................. 382IPv6 Address Prefix Length Representation ................................................................ 383

IPv6 Address Space Allocation ...................................................................................... 383IPv6 Global Unicast Address Format ............................................................................... 385

Rationale for a Structured Unicast Address Block ....................................................... 385Generic Division of the Unicast Address Space ......................................................... 386IPv6 Implementation of the Unicast Address Space .................................................... 386Original Division of the Global Routing Prefix: Aggregators ....................................... 387A Sample Division of the Global Routing Prefix into Levels .......................................... 388

IPv6 Interface Identifiers and Physical Address Mapping ................................................... 390IPv6 Special Addresses: Reserved, Private, Unspecified, and Loopback .............................. 391

Special Address Types ...........................................................................................392IPv6 Private Addresses Type Scopes ........................................................................ 393

IPv6/IPv4 Address Embedding ....................................................................................... 394IPv6 Multicast and Anycast Addressing ........................................................................... 396

IPv6 Multicast Addresses ........................................................................................ 396IPv6 Anycast Addresses ......................................................................................... 400

IPv6 Autoconfiguration and Renumbering ........................................................................ 400IPv6 Stateless Autoconfiguration .............................................................................. 401

TCPIP_01TOC.fm Page ix Thursday, June 9, 2005 11:16 AM

Page 10: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

x Conten ts in Detai l

IPv6 Device Renumbering ....................................................................................... 402

26IPV6 DATAGRAM ENCAPSULATION AND FORMATTING 403

IPv6 Datagram Overview and General Structure .............................................................. 404IPv6 Datagram Main Header Format .............................................................................. 406

IPv6 Next Header Field .......................................................................................... 407Key Changes to the Main Header Between IPv4 and IPv6 .......................................... 408

IPv6 Datagram Extension Headers ..................................................................................409IPv6 Header Chaining Using the Next Header Field .................................................. 409Summary of IPv6 Extension Headers ........................................................................ 411IPv6 Routing Extension Header ................................................................................ 412IPv6 Fragment Extension Header ............................................................................. 413IPv6 Extension Header Order ..................................................................................413

IPv6 Datagram Options ................................................................................................ 414

27IPV6 DATAGRAM SIZE, FRAGMENTATION,REASSEMBLY, AND ROUTING 417

Overview of IPv6 Datagram Sizing and Fragmentation ..................................................... 418Implications of IPv6’s Source-Only Fragmentation Rule ...................................................... 419The IPv6 Fragmentation Process ..................................................................................... 420IPv6 Datagram Delivery and Routing .............................................................................. 422

PART II -5IP-RELATED FEATURE PROTOCOLS

28IP NETWORK ADDRESS TRANSLATION (NAT) PROTOCOL 427

IP NAT Overview ......................................................................................................... 428Advantages of IP NAT ...........................................................................................430Disadvantages of IP NAT ....................................................................................... 431

IP NAT Address Terminology ......................................................................................... 432IP NAT Static and Dynamic Address Mappings ................................................................ 435

Static Mappings .................................................................................................... 435Dynamic Mappings ............................................................................................... 435Choosing Between Static and Dynamic Mapping ...................................................... 435

IP NAT Unidirectional (Traditional/Outbound) Operation .................................................. 436IP NAT Bidirectional (Two-Way/Inbound) Operation ........................................................ 439IP NAT Port-Based (Overloaded) Operation ..................................................................... 442IP NAT Overlapping/Twice NAT Operation .................................................................... 445IP NAT Compatibility Issues and Special Handling Requirements ........................................ 449

29IP SECURITY (IPSEC) PROTOCOLS 451

IPsec Overview, History, and Standards .......................................................................... 452Overview of IPsec Services and Functions ................................................................. 453IPsec Standards ..................................................................................................... 453

IPsec General Operation, Components, and Protocols ...................................................... 454

TCPIP_01TOC.fm Page x Thursday, June 9, 2005 11:16 AM

Page 11: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten ts in Detai l xi

IPsec Core Protocols .............................................................................................. 455IPsec Support Components ..................................................................................... 455

IPsec Architectures and Implementation Methods .............................................................. 456Integrated Architecture ...........................................................................................457Bump in the Stack (BITS) Architecture .......................................................................457Bump in the Wire (BITW) Architecture ......................................................................458

IPsec Modes: Transport and Tunnel .................................................................................459Transport Mode .................................................................................................... 459Tunnel Mode ........................................................................................................ 459Comparing Transport and Tunnel Modes .................................................................. 459

IPsec Security Constructs ............................................................................................... 462Security Policies, Security Associations, and Associated Databases ............................. 462Selectors .............................................................................................................. 463Security Association Triples and Security Parameter Index (SPI) ................................... 463

IPsec Authentication Header (AH) ................................................................................... 463AH Datagram Placement and Linking .......................................................................464AH Format ............................................................................................................ 467

IPsec Encapsulating Security Payload (ESP) ......................................................................468ESP Fields ............................................................................................................. 468ESP Operations and Field Use ................................................................................ 469ESP Format ........................................................................................................... 472

IPsec Internet Key Exchange (IKE) ................................................................................... 473IKE Overview ........................................................................................................ 474IKE Operation .......................................................................................................474

30INTERNET PROTOCOL MOBIL ITY SUPPORT (MOBILE IP) 477

Mobile IP Overview, History, and Motivation ................................................................... 478The Problem with Mobile Nodes in TCP/IP ............................................................... 478The Solution: Mobile IP .......................................................................................... 480Limitations of Mobile IP .......................................................................................... 481

Mobile IP Concepts and General Operation .................................................................... 482Mobile IP Device Roles ...........................................................................................483Mobile IP Functions ................................................................................................ 484

Mobile IP Addressing: Home and Care-Of Addresses ....................................................... 485Foreign Agent Care-Of Address .............................................................................. 486

Mobile IP Agent Discovery ............................................................................................488Agent Discovery Process ........................................................................................ 488Agent Advertisement and Agent Solicitation Messages ............................................... 488

Mobile IP Home Agent Registration and Registration Messages .......................................... 493Mobile Node Registration Events ............................................................................. 493Registration Request and Registration Reply Messages ............................................... 493Registration Process ............................................................................................... 494Registration Request Message Format ......................................................................495Registration Reply Message Format ......................................................................... 497

Mobile IP Data Encapsulation and Tunneling ................................................................... 497Mobile IP Conventional Tunneling ........................................................................... 498Mobile IP Reverse Tunneling ................................................................................... 500

Mobile IP and TCP/IP Address Resolution Protocol (ARP) Operation ................................... 500Mobile IP Efficiency Issues .............................................................................................502Mobile IP Security Considerations ..................................................................................505

TCPIP_01TOC.fm Page xi Thursday, June 9, 2005 11:16 AM

Page 12: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xii Content s i n De ta i l

PART II -6IP SUPPORT PROTOCOLS

31ICMP CONCEPTS AND GENERAL OPERATION 509

ICMP Overview, History, Versions, and Standards ...........................................................510ICMP General Operation .............................................................................................. 512

The ICMP Message-Passing Service ......................................................................... 512ICMP Error-Reporting Limited to the Datagram Source ................................................513

ICMP Message Classes, Types, and Codes ..................................................................... 514ICMP Message Classes .......................................................................................... 514ICMP Message Types ............................................................................................514ICMP Message Codes ...........................................................................................515ICMP Message Class and Type Summary ................................................................. 515

ICMP Message Creation and Processing Conventions and Rules ........................................ 517Limitations on ICMP Message Responses .................................................................. 518ICMP Message Processing Conventions ................................................................... 519

ICMP Common Message Format and Data Encapsulation .................................................520ICMP Common Message Format ............................................................................. 520Original Datagram Inclusion in ICMP Error Messages ................................................521ICMP Data Encapsulation ....................................................................................... 522

32ICMPV4 ERROR MESSAGE TYPES AND FORMATS 523

ICMPv4 Destination Unreachable Messages .................................................................... 524ICMPv4 Destination Unreachable Message Format .................................................... 524ICMPv4 Destination Unreachable Message Subtypes .................................................525Interpretation of Destination Unreachable Messages .................................................. 526

ICMPv4 Source Quench Messages .................................................................................527ICMPv4 Source Quench Message Format ................................................................. 528Problems with Source Quench Messages .................................................................. 528

ICMPv4 Time Exceeded Messages .................................................................................529ICMPv4 Time Exceeded Message Format ................................................................. 530Applications of Time Exceeded Messages ................................................................ 531

ICMPv4 Redirect Messages ...........................................................................................532ICMPv4 Redirect Message Format ........................................................................... 533Redirect Message Interpretation Codes .................................................................... 534Limitations of Redirect Messages ............................................................................. 535

ICMPv4 Parameter Problem Messages ............................................................................ 535ICMPv4 Parameter Problem Message Format ............................................................536Parameter Problem Message Interpretation Codes and the Pointer Field ....................... 536

33ICMPV4 INFORMATIONAL MESSAGE TYPESAND FORMATS 539

ICMPv4 Echo (Request) and Echo Reply Messages ...........................................................540ICMPv4 Echo and Echo Reply Message Format ......................................................... 540Application of Echo and Echo Reply Messages ......................................................... 541

ICMPv4 Timestamp (Request) and Timestamp Reply Messages ........................................... 541ICMPv4 Timestamp and Timestamp Reply Message Format ........................................ 542Issues Using Timestamp and Timestamp Reply Messages ............................................ 543

TCPIP_01TOC.fm Page xii Thursday, June 9, 2005 11:16 AM

Page 13: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten t s in Detai l xiii

ICMPv4 Router Advertisement and Router Solicitation Messages ........................................ 543The Router Discovery Process ..................................................................................544ICMPv4 Router Advertisement Message Format ......................................................... 544ICMPv4 Router Solicitation Message Format ............................................................. 546Addressing and Use of Router Advertisement and Router Solicitation Messages ............ 546

ICMPv4 Address Mask Request and Reply Messages ........................................................ 547ICMPv4 Address Mask Request and Address Mask Reply Message Format ................... 547Use of Address Mask Request and Address Mask Reply Messages .............................. 548

ICMPv4 Traceroute Messages ........................................................................................ 548ICMPv4 Traceroute Message Format ........................................................................ 549Use of Traceroute Messages ................................................................................... 550

34ICMPV6 ERROR MESSAGE TYPES AND FORMATS 551

ICMPv6 Destination Unreachable Messages .................................................................... 552ICMPv6 Destination Unreachable Message Format .................................................... 552ICMPv6 Destination Unreachable Message Subtypes .................................................553Processing of Destination Unreachable Messages ...................................................... 554

ICMPv6 Packet Too Big Messages ..................................................................................554ICMPv6 Packet Too Big Message Format .................................................................. 555Applications of Packet Too Big Messages ................................................................. 555

ICMPv6 Time Exceeded Messages .................................................................................556ICMPv6 Time Exceeded Message Format ................................................................. 557Applications of Time Exceeded Messages ................................................................ 558

ICMPv6 Parameter Problem Messages ............................................................................ 558ICMPv6 Parameter Problem Message Format ............................................................559Parameter Problem Message Interpretation Codes and the Pointer Field ....................... 559

35ICMPV6 INFORMATIONAL MESSAGE TYPES AND FORMATS 561

ICMPv6 Echo Request and Echo Reply Messages ............................................................. 562ICMPv6 Echo and Echo Reply Message Format ......................................................... 562Application of Echo and Echo Reply Messages ......................................................... 563

ICMPv6 Router Advertisement and Router Solicitation Messages ........................................ 564ICMPv6 Router Advertisement Message Format ......................................................... 564ICMPv6 Router Solicitation Message Format ............................................................. 566Addressing of Router Advertisement and Router Solicitation Messages ......................... 566

ICMPv6 Neighbor Advertisement and Neighbor Solicitation Messages ............................... 567ICMPv6 Neighbor Advertisement Message Format .................................................... 567ICMPv4 Neighbor Solicitation Message Format ........................................................ 568Addressing of Neighbor Advertisement and Neighbor Solicitation Messages ............... 570

ICMPv6 Redirect Messages ...........................................................................................570ICMPv6 Redirect Message Format ........................................................................... 570Application of Redirect Messages ............................................................................ 571

ICMPv6 Router Renumbering Messages .......................................................................... 572IPv6 Router Renumbering ........................................................................................ 572ICMPv6 Router Renumbering Message Format .......................................................... 573Addressing of Router Renumbering Messages ...........................................................574

ICMPv6 Informational Message Options ......................................................................... 574Source Link-Layer Address Option Format ................................................................. 575Target Link-Layer Address Option Format .................................................................. 576Prefix Information Option Format ............................................................................. 576

TCPIP_01TOC.fm Page xiii Thursday, June 9, 2005 11:16 AM

Page 14: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xiv Content s i n De ta i l

Redirected Header Option Format ........................................................................... 578MTU Option Format ............................................................................................... 579

36IPV6 NEIGHBOR DISCOVERY (ND) PROTOCOL 581

IPv6 ND Overview .......................................................................................................582Formalizing Local Network Functions: The Neighbor Concept .....................................583Neighbor Discovery Standards ............................................................................... 583

IPv6 ND General Operational Overview ......................................................................... 584Host-Router Discovery Functions .............................................................................. 585Host-Host Communication Functions ......................................................................... 585Redirect Function ................................................................................................... 585Relationships Between Functions .............................................................................. 586ICMPv6 Messages Used by ND .............................................................................. 586

IPv6 ND Functions Compared to Equivalent IPv4 Functions ................................................586IPv6 ND Host-Router Discovery Functions ......................................................................... 588

Host-Router Discovery Functions Performed by Routers ................................................588Host-Router Discovery Functions Performed by Hosts .................................................. 589

IPv6 ND Host-Host Communication Functions ................................................................... 589Next-Hop Determination ......................................................................................... 590Address Resolution ................................................................................................ 590Updating Neighbors Using Neighbor Advertisement Messages ................................... 591Neighbor Unreachability Detection and the Neighbor Cache .....................................591Duplicate Address Detection ................................................................................... 592

IPv6 ND Redirect Function .............................................................................................592

PART II -7TCP/IP ROUTING PROTOCOLS (GATEWAY PROTOCOLS)

37OVERVIEW OF KEY ROUTING PROTOCOL CONCEPTS 597

Routing Protocol Architectures ........................................................................................ 597Core Architecture .................................................................................................. 598Autonomous System (AS) Architecture ......................................................................598Modern Protocol Types: Interior and Exterior Routing Protocols ................................... 599

Routing Protocol Algorithms and Metrics ......................................................................... 600Distance-Vector (Bellman-Ford) Routing Protocol Algorithm .......................................... 600Link-State (Shortest Path First) Routing Protocol Algorithm ............................................ 601Hybrid Routing Protocol Algorithms ......................................................................... 601

Static and Dynamic Routing Protocols ............................................................................. 601

38ROUTING INFORMATION PROTOCOL (RIP, RIP-2, AND RIPNG) 603

RIP Overview ............................................................................................................... 604RIP Standardization ............................................................................................... 604RIP Operational Overview, Advantages, and Limitations ............................................ 605Development of RIP Version 2 (RIP-2) and RIPng for IPv6 ............................................. 606

RIP Route Determination Algorithm and Metric ................................................................. 606RIP Routing Information and Route Distance Metric .................................................... 606RIP Route Determination Algorithm ........................................................................... 607

TCPIP_01TOC.fm Page xiv Thursday, June 9, 2005 11:16 AM

Page 15: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten ts i n Detai l xv

RIP Route Determination and Information Propagation ................................................607Default Routes .......................................................................................................610

RIP General Operation, Messaging, and Timers ............................................................... 610RIP Messages and Basic Message Types .................................................................. 610RIP Update Messaging and the 30-Second Timer ...................................................... 611Preventing Stale Information: The Timeout Timer ........................................................ 611Removing Stale Information: The Garbage-Collection Timer ........................................ 612Triggered Updates ................................................................................................. 612

RIP Problems and Some Resolutions ................................................................................ 612Issues with RIP’s Algorithm ...................................................................................... 613Issues with RIP’s Metric ...........................................................................................616RIP Special Features for Resolving RIP Algorithm Problems .......................................... 617

RIP Version-Specific Message Formats and Features .......................................................... 620RIP Version 1 (RIP-1) Message Format and Features ................................................... 620RIP Version 2 (RIP-2) Message Format and Features ................................................... 623RIPng (RIPv6) Message Format and Features ............................................................. 626

39OPEN SHORTEST PATH FIRST (OSPF) 631

OSPF Overview ........................................................................................................... 632Development and Standardization of OSPF .............................................................. 632Overview of OSPF Operation .................................................................................633OSPF Features and Drawbacks ............................................................................... 633

OSPF Basic Topology and the Link-State Database ...........................................................634OSPF Basic Topology ............................................................................................634LSDB Information Storage and Propagation .............................................................. 635

OSPF Hierarchical Topology .......................................................................................... 636OSPF Areas .......................................................................................................... 636Router Roles in OSPF Hierarchical Topology ............................................................. 637

OSPF Route Determination Using SPF Trees ..................................................................... 639The SPF Tree ......................................................................................................... 639OSPF Route Determination ...................................................................................... 640

OSPF General Operation .............................................................................................. 643OSPF Message Types ............................................................................................644OSPF Messaging ................................................................................................... 644OSPF Message Authentication ................................................................................ 645

OSPF Message Formats ................................................................................................ 645OSPF Common Header Format ............................................................................... 645OSPF Hello Message Format ..................................................................................647OSPF Database Description Message Format ............................................................647OSPF Link State Request Message Format ................................................................. 649OSPF Link State Update Message Format ................................................................. 649OSPF Link State Acknowledgment Message Format ................................................... 650OSPF Link State Advertisements and the LSA Header Format ....................................... 650

40BORDER GATEWAY PROTOCOL (BGP/BGP-4) 653

BGP Overview ............................................................................................................. 654BGP Versions and Defining Standards ..................................................................... 655Overview of BGP Functions and Features ................................................................. 656

BGP Topology ............................................................................................................. 657BGP Speakers, Router Roles, Neighbors, and Peers ................................................... 658

TCPIP_01TOC.fm Page xv Thursday, June 9, 2005 11:16 AM

Page 16: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xvi Content s i n De ta i l

BGP AS Types, Traffic Flows, and Routing Policies ..................................................... 659BGP Route Storage and Advertisement ............................................................................ 662

BGP Route Information Management Functions .......................................................... 662BGP Routing Information Bases (RIBs) .......................................................................662

BGP Path Attributes and Algorithm Overview ................................................................... 663BGP Path Attribute Classes ..................................................................................... 664BGP Path Attribute Characteristics ........................................................................... 665

BGP Route Determination and the BGP Decision Process ................................................... 666BGP Decision Process Phases ..................................................................................666Criteria for Assigning Preferences to Routes .............................................................. 666Limitations on BGP’s Ability to Select Efficient Routes .................................................. 667Originating New Routes and Withdrawing Unreachable Routes ................................. 668

BGP General Operation and Messaging ......................................................................... 668Speaker Designation and Connection Establishment .................................................. 668Route Information Exchange ................................................................................... 669Connectivity Maintenance ...................................................................................... 669Error Reporting ..................................................................................................... 669

BGP Detailed Messaging, Operation, and Message Formats ............................................. 670BGP Message Generation and Transport .................................................................. 670BGP General Message Format ................................................................................ 670BGP Connection Establishment: Open Messages ....................................................... 672BGP Route Information Exchange: Update Messages ................................................674BGP Connectivity Maintenance: Keepalive Messages ............................................... 677BGP Error Reporting: Notification Messages ............................................................. 680

41OTHER INTERIOR ROUTING PROTOCOLS 685

TCP/IP Gateway-to-Gateway Protocol (GGP) ................................................................... 686The HELLO Protocol (HELLO) .......................................................................................... 687Interior Gateway Routing Protocol (IGRP) ........................................................................ 689Enhanced Interior Gateway Routing Protocol (EIGRP) ........................................................ 691TCP/IP Exterior Gateway Protocol (EGP) ......................................................................... 692

PART II -8TCP/IP TRANSPORT LAYER PROTOCOLS

42OVERVIEW AND COMPARISON OF TCP AND UDP 697

Two Protocols for TCP/IP Transport Layer Requirements ..................................................... 698Applications of TCP and UDP ........................................................................................ 699

TCP Applications ................................................................................................... 699UDP Applications .................................................................................................. 700

Summary Comparison of UDP and TCP ........................................................................... 700

43TCP AND UDP ADDRESSING: PORTS AND SOCKETS 703

TCP/IP Processes, Multiplexing, and Client/Server Application Roles ................................. 704Multiplexing and Demultiplexing ............................................................................. 704TCP/IP Client Processes and Server Processes ...........................................................705

TCP/IP Ports: TCP/UDP Addressing ................................................................................ 707

TCPIP_01TOC.fm Page xvi Thursday, June 9, 2005 11:16 AM

Page 17: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten t s in Detai l xvii

Multiplexing and Demultiplexing Using Ports ............................................................. 707Source Port and Destination Port Numbers ................................................................ 707Summary of Port Use for Datagram Transmission and Reception .................................. 709

TCP/IP Application Assignments and Server Port Number Ranges ......................................709Reserved Port Numbers .......................................................................................... 710TCP/UDP Port Number Ranges ............................................................................... 710

TCP/IP Client (Ephemeral) Ports and Client/Server Application Port Use ............................. 711Ephemeral Port Number Assignment ........................................................................ 712Ephemeral Port Number Ranges .............................................................................. 713Port Number Use During a Client/Server Exchange ................................................... 713

TCP/IP Sockets and Socket Pairs: Process and Connection Identification ............................. 714Common TCP/IP Applications and Well-Known and Registered Port Numbers ..................... 715

44TCP/IP USER DATAGRAM PROTOCOL (UDP) 719

UDP Overview, History, and Standards ........................................................................... 720UDP Operation ............................................................................................................ 721

What UDP Does .................................................................................................... 721What UDP Does Not Do ........................................................................................ 721

UDP Message Format ................................................................................................... 722UDP Common Applications and Server Port Assignments .................................................. 724

Why Some TCP/IP Applications Use UDP ................................................................. 725Common UDP Applications and Server Port Use ........................................................ 726Applications That Use Both UDP and TCP ................................................................. 727

45TCP OVERVIEW, FUNCTIONS, AND CHARACTERISTICS 729

TCP Overview, History, and Standards ........................................................................... 730TCP History .......................................................................................................... 730Overview of TCP Operation ................................................................................... 731TCP Standards ......................................................................................................731

TCP Functions .............................................................................................................. 732Functions That TCP Performs ................................................................................... 733Functions That TCP Doesn’t Perform ......................................................................... 733

TCP Characteristics .......................................................................................................734The Robustness Principle ................................................................................................ 736

46TRANSMISSION CONTROL PROTOCOL (TCP)FUNDAMENTALS AND GENERAL OPERATION 737

TCP Data Handling and Processing ................................................................................ 738Increasing the Flexibility of Application Data Handling:

TCP’s Stream Orientation ................................................................................ 738TCP Data Packaging: Segments .............................................................................. 738TCP Data Identification: Sequence Numbers ............................................................. 739The Need for Application Data Delimiting ................................................................ 741

TCP Sliding Window Acknowledgment System ................................................................ 741The Problem with Unreliable Protocols: Lack of Feedback ........................................... 742Providing Basic Reliability Using Positive Acknowledgment with

Retransmission (PAR) ....................................................................................... 742Improving PAR ......................................................................................................744

TCPIP_01TOC.fm Page xvii Thursday, June 9, 2005 11:16 AM

Page 18: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xviii Conten t s in Deta i l

TCP’s Stream-Oriented Sliding Window Acknowledgment System ............................... 744More Information on TCP Sliding Windows .............................................................. 750

TCP Ports, Connections, and Connection Identification ...................................................... 751TCP Common Applications and Server Port Assignments ................................................... 752

47TCP BASIC OPERATION: CONNECTION ESTABLISHMENT,MANAGEMENT, AND TERMINATION 755

TCP Operational Overview and the TCP Finite State Machine (FSM) ................................... 756Basic FSM Concepts .............................................................................................. 756The Simplified TCP FSM ......................................................................................... 757

TCP Connection Preparation .......................................................................................... 760Storing Connection Data: The Transmission Control Block (TCB) .................................. 761Active and Passive OPENs ..................................................................................... 761Preparation for Connection ..................................................................................... 762

TCP Connection Establishment Process: The Three-Way Handshake .................................... 762Connection Establishment Functions ......................................................................... 762Control Messages Used for Connection Establishment: SYN and ACK ......................... 763Normal Connection Establishment: The Three-Way Handshake ................................... 763Simultaneous Open Connection Establishment .......................................................... 765

TCP Connection Establishment Sequence Number Synchronizationand Parameter Exchange ................................................................................ 767

Initial Sequence Number Selection .......................................................................... 767TCP Sequence Number Synchronization .................................................................. 768TCP Parameter Exchange ....................................................................................... 769

TCP Connection Management and Problem Handling ....................................................... 770The TCP Reset Function .......................................................................................... 770Handling Reset Segments ....................................................................................... 771Idle Connection Management and Keepalive Messages ............................................. 771

TCP Connection Termination .......................................................................................... 772Requirements and Issues In Connection Termination ................................................... 772Normal Connection Termination .............................................................................. 773The TIME-WAIT State .............................................................................................775Simultaneous Connection Termination ......................................................................776

48TCP MESSAGE FORMATTING AND DATA TRANSFER 779

TCP Message (Segment) Format ..................................................................................... 780TCP Checksum Calculation and the TCP Pseudo Header ................................................... 784

Detecting Transmission Errors Using Checksums ........................................................ 784Increasing the Scope of Detected Errors: The TCP Pseudo Header ............................... 784Advantages of the Pseudo Header Method ............................................................... 786

TCP Maximum Segment Size (MSS) ................................................................................ 787MSS Selection .......................................................................................................788TCP Default MSS ................................................................................................... 788Nondefault MSS Value Specification .......................................................................789

TCP Sliding Window Data Transfer and Acknowledgment Mechanics ................................ 790Sliding Window Transmit and Receive Categories ..................................................... 790Send (SND) and Receive (RCV) Pointers ................................................................... 791TCP Segment Fields Used to Exchange Pointer Information ......................................... 793An Example of TCP Sliding Window Mechanics ....................................................... 794Real-World Complications of the Sliding Window Mechanism .................................... 797

TCPIP_01TOC.fm Page xviii Thursday, June 9, 2005 11:16 AM

Page 19: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Content s i n De ta i l xix

TCP Immediate Data Transfer: Push Function .................................................................... 799TCP Priority Data Transfer: Urgent Function ..................................................................... 800

49TCP RELIABILITY AND FLOW-CONTROL FEATURES 803

TCP Segment Retransmission Timers and the Retransmission Queue .................................... 804Managing Retransmissions Using the Retransmission Queue ....................................... 804Recognizing When a Segment Is Fully Acknowledged ............................................... 805

TCP Noncontiguous Acknowledgment Handlingand Selective Acknowledgment (SACK) ....... 808Policies for Dealing with Outstanding Unacknowledged Segments ............................... 809A Better Solution: Selective Acknowledgment (SACK) .................................................811

TCP Adaptive Retransmission and Retransmission Timer Calculations .................................. 813Adaptive Retransmission Based on RTT Calculations .................................................. 813Acknowledgment Ambiguity ................................................................................... 814Refinements to RTT Calculation and Karn’s Algorithm .................................................814

TCP Window Size Adjustment and Flow Control .............................................................. 815Reducing Send Window Size to Reduce the Rate Data Is Sent .................................... 816Reducing Send Window Size to Stop the Sending of New Data ................................. 818Closing the Send Window ...................................................................................... 818

TCP Window-Management Issues ................................................................................... 819Problems Associated with Shrinking the TCP Window ................................................819Reducing Buffer Size Without Shrinking the Window .................................................820Handling a Closed Window and Sending Probe Segments ........................................ 821

TCP Silly Window Syndrome ......................................................................................... 822How Silly Window Syndrome Occurs ......................................................................822Silly Window Syndrome Avoidance Algorithms ......................................................... 825

TCP Congestion Handling and Congestion Avoidance Algorithms ......................................826Congestion Considerations ..................................................................................... 827TCP Congestion-Handling Mechanisms .................................................................... 828

SECTION II ITCP/IP APPLICATION LAYER PROTOCOLS

PART II I -1NAME SYSTEMS AND TCP/IP NAME REGISTRATION AND NAME RES OLUTION

50NAME SYSTEM ISSUES, CONCEPTS, AND TECHNIQUES 835

Name System Overview ................................................................................................ 836Symbolic Names for Addressing ............................................................................. 836A Paradox: Name Systems Are Both Essential and Unnecessary .................................. 836Basic Name System Functions: Name Space, Name Registration, and Name Resolution 839

Name Spaces and Name Architectures ........................................................................... 841Name Space Functions .......................................................................................... 841Flat Name Architecture (Flat Name Space) ............................................................... 842Hierarchical Name Architecture .............................................................................. 842Comparing Name Architectures .............................................................................. 843

Name Registration Methods, Administration, and Authorities ............................................. 844Name Registration Functions ................................................................................... 844Hierarchical Name Registration .............................................................................. 845

TCPIP_01TOC.fm Page xix Thursday, June 9, 2005 11:16 AM

Page 20: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xx Conten t s in Detai l

Name Registration Methods .................................................................................... 845Name Resolution Techniques and Elements ......................................................................846

Name Resolution Methods ...................................................................................... 847Client/Server Resolution Functional Elements ............................................................848

Efficiency, Reliability, and Other Name Resolution Considerations .....................................848Efficiency Considerations ....................................................................................... 849Reliability Considerations ....................................................................................... 849Other Considerations .............................................................................................850

51TCP/IP NAME SYSTEMS OVERVIEW ANDTHE HOST TABLE NAME SYSTEM 851

A Brief History of TCP/IP Host Names and Name Systems ................................................852Developing the First Name System: ARPAnet Host Name Lists .....................................852Storing Host Names in a Host Table File .................................................................. 852Outgrowing the Host Table Name System and Moving to DNS ................................... 853

The TCP/IP Host Table Name System .............................................................................. 853Host Table Name Resolution ................................................................................... 854Host Table Name Registration .................................................................................854Weaknesses of the Host Table Name System ............................................................855Use of the Host Table Name System in Modern Networking ....................................... 856

52DOMAIN NAME SYSTEM (DNS) OVERVIEW, FUNCTIONS,AND CHARACTERISTICS 857

DNS Overview, History, and Standards .......................................................................... 858Early DNS Development and the Move to Hierarchical Domains ................................. 858Standardization of DNS and Initial Defining Standards .............................................. 859DNS Evolution and Important Additional Standards ................................................... 860DNS Adaptation for Internet Protocol Version 6 ......................................................... 860

DNS Design Goals, Objectives, and Assumptions ............................................................861DNS Design Goals and Objectives .......................................................................... 861DNS Design Assumptions ....................................................................................... 862

DNS Components and General Functions ........................................................................ 863DNS Name Space ................................................................................................ 863Name Registration (Including Administration and Authorities) .....................................864Name Resolution ................................................................................................... 864

53DNS NAME SPACE, ARCHITECTURE, AND TERMINOLOGY 867

DNS Domains and the DNS Hierarchical Name Architecture ............................................. 868The Essential Concept in the DNS Name Space: Domains .......................................... 868The DNS Hierarchical Tree Structure of Names ......................................................... 868

DNS Structural Elements and Terminology .......................................................................870DNS Tree-Related Terminology ................................................................................ 870DNS Domain-Related Terminology ........................................................................... 870DNS Family-Related Terminology ............................................................................. 871

DNS Labels, Names, and Syntax Rules ........................................................................... 873DNS Labels and Label Syntax Rules ......................................................................... 873Domain Name Construction .................................................................................... 874

Absolute (Fully Qualified) and Relative (Partially Qualified) Domain Name Specifications .....875

TCPIP_01TOC.fm Page xx Thursday, June 9, 2005 11:16 AM

Page 21: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Content s i n De ta i l xxi

Fully Qualified Domain Names ............................................................................... 875Partially Qualified Domain Names .......................................................................... 876

54DNS NAME REGISTRATION, PUBLIC ADMINISTRATION,ZONES, AND AUTHORITIES 877

DNS Hierarchical Authority Structure and the Distributed Name Database ..........................878The DNS Root Domain Central Authority .................................................................. 878TLD Authorities ......................................................................................................879Lower-Level Authority Delegation ............................................................................. 879Authority Hierarchy’s Relationship to the Name Hierarchy ......................................... 879The DNS Distributed Name Database ......................................................................880

DNS Organizational (Generic) TLDs and Authorities ......................................................... 880Original Generic TLDs ...........................................................................................881New Generic TLDs ................................................................................................ 881

DNS Geopolitical (Country Code) TLDs and Authorities ..................................................... 884Country Code Designations .................................................................................... 884Country Code TLD Authorities .................................................................................885Leasing/Sale of Country Code Domains ................................................................... 885Drawbacks of the Geopolitical TLDs ......................................................................... 886

Public Registration for Second-Level and Lower Domains ................................................... 886Registration Authority .............................................................................................887Registration Coordination ....................................................................................... 888

DNS Public Registration Disputes and Dispute Resolution ................................................... 888Public Registration Disputes .................................................................................... 888Methods of Registration Dispute Resolution ............................................................... 890The Uniform Domain Name Dispute Resolution Policy ................................................890

DNS Name Space Administrative Hierarchy Partitioning: DNS Zones of Authority ............... 891Methods of Dividing a Name Space into Zones of Authority ....................................... 892The Impact of Zones on Name Resolution: Authoritative Servers .................................. 892

DNS Private Name Registration ..................................................................................... 894Using Publicly Accessible Private Names ................................................................. 894Using Private Names for Internal Use .......................................................................895Using Private Names on Networks Not Connected to the Internet ................................ 895

55DNS NAME SERVER CONCEPTS AND OPERATION 897

DNS General Operation ............................................................................................... 898DNS Name Server Architecture and the Distributed Name Database ...........................898DNS Server Support Functions ................................................................................ 899The Logical Nature of the DNS Name Server Hierarchy ............................................. 900

DNS Name Server Data Storage .................................................................................... 900Binary and Text Representations of Resource Records (RRs) ......................................... 900Use of RRs and Master Files .................................................................................... 901Common RR Types ................................................................................................. 902RR Classes ............................................................................................................ 903

DNS Name Server Types and Roles ............................................................................... 903Master (Primary)/Slave (Secondary) Servers ............................................................. 903Name Server Roles ................................................................................................ 905Caching-Only Name Servers ..................................................................................905

DNS Zone Management, Contacts, and Zone Transfers .................................................... 905Domain Contacts ................................................................................................... 906

TCPIP_01TOC.fm Page xxi Thursday, June 9, 2005 11:16 AM

Page 22: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxii Conten ts in Detai l

Zone Transfers ......................................................................................................906DNS Root Name Servers ............................................................................................... 909

Root Name Server Redundancy ............................................................................... 909Current Root Name Servers .................................................................................... 910

DNS Name Server Caching .......................................................................................... 911Name Server Caching ...........................................................................................912Caching Data Persistence and the Time to Live Interval ............................................... 912Negative Caching ................................................................................................. 914

DNS Name Server Load Balancing ................................................................................ 914Using Multiple Address Records to Spread Out Requests to a Domain ..........................914Using Multiple DNS Servers to Spread Out DNS Requests .......................................... 915

DNS Name Server Enhancements ..................................................................................915Automating Zone Transfers: DNS Notify ................................................................... 916Improving Zone Transfer Efficiency: Incremental Transfers ........................................... 917Dealing with Dynamic IP Addresses: DNS Update/Dynamic DNS ............................... 917

56DNS RESOLUTION CONCEPTS AND RESOLVER OPERATIONS 919

DNS Resolver Functions and General Operation .............................................................. 920Name Resolution Services ...................................................................................... 920Functions Performed by Name Resolvers .................................................................. 920

DNS Name Resolution Techniques: Iterative and Recursive Resolution ................................. 922Iterative Resolution ................................................................................................. 923Recursive Resolution ............................................................................................... 924Contrasting Iterative and Recursive Resolution ...........................................................924

DNS Name Resolution Efficiency Improvements: Caching and Local Resolution .................... 925The Motivation for Caching: Locality of Reference ..................................................... 926Name Resolver Caching ........................................................................................ 926Local Resolution .................................................................................................... 927

DNS Name Resolution Process ....................................................................................... 928A Simple Example of DNS Name Resolution ............................................................928Changes to Resolution to Handle Aliases (CNAME Records) ....................................... 930

DNS Reverse Name Resolution Using the IN-ADDR.ARPA Domain ......................................931The Original Method: Inverse Querying ................................................................... 931The IN-ADDR.ARPA Name Structure for Reverse Resolution ......................................... 932RR Setup for Reverse Resolution ............................................................................... 932

DNS Electronic Mail Support and Mail Exchange (MX) ResourceRecords ............................934Special Requirements for Email Name Resolution ...................................................... 935The Mail Exchange (MX) Record and Its Use ............................................................. 935

57DNS MESSAGING AND MESSAGE, RESOURCE RECORD,AND MASTER FILE FORMATS 937

DNS Message Generation and Transport ........................................................................ 938DNS Client/Server Messaging Overview ................................................................. 938DNS Message Transport Using UDP and TCP ...........................................................939DNS Message Processing and General Message Format ........................................... 940

DNS Message Header Format ....................................................................................... 942DNS Question Section Format ....................................................................................... 945DNS Message Resource Record Field Formats ................................................................. 945

DNS Common RR Format ....................................................................................... 946RData Field Formats for Common RRs ......................................................................946

TCPIP_01TOC.fm Page xxii Thursday, June 9, 2005 11:16 AM

Page 23: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten ts in Detai l xxiii

DNS Name Notation and Message Compression ............................................................950Standard DNS Name Notation ............................................................................... 950DNS Electronic Mail Address Notation .................................................................... 951DNS Message Compression ................................................................................... 951

DNS Master File Format ................................................................................................ 953DNS Common Master File Record Format ................................................................ 954Use and Interpretation of Partially Qualified Domain Names (PQDNs) ......................... 954Master File Directives .............................................................................................955Syntax Rules for Master Files ................................................................................... 955Specific RR Syntax and Examples ............................................................................ 956Sample Master File ................................................................................................ 958

DNS Changes to Support IPv6 ....................................................................................... 958IPv6 DNS Extensions .............................................................................................. 959Proposed Changes to the IPv6 DNS Extensions ......................................................... 959

PART II I -2NETWORK FILE AND RESOURCE SHARING PROTOCOLS AND THE TCP/IP NETWORK FILE SYSTEM (NFS)

58NETWORK FILE AND RESOURCE SHARING ANDTHE TCP/IP NETWORK FILE SYSTEM (NFS) 963

File and Resource Sharing Concepts and Components ...................................................... 964The Power of File and Resource Sharing Protocols ..................................................... 964Components of a File and Resource Sharing Protocol .................................................964

NFS Design Goals, Versions, and Standards ................................................................... 965NFS Design Goals ................................................................................................. 965NFS Versions and Standards ..................................................................................966

NFS Architecture and Components .................................................................................967NFS Main Components .......................................................................................... 967Other Important NFS Functions ............................................................................... 968

NFS Data Definition with the External Data Representation (XDR) Standard ......................... 969A Method of Universal Data Exchange: XDR ............................................................. 969XDR Data Types .................................................................................................... 970

NFS Client/Server Operation Using Remote Procedure Calls (RPCs) ................................... 971RPC Operation and Transport Protocol Usage ...........................................................972Client and Server Responsibilities in NFS ................................................................. 973Client and Server Caching ..................................................................................... 973

NFS Server Procedures and Operations .......................................................................... 974NFS Version 2 and Version 3 Server Procedures ....................................................... 974NFS Version 4 Server Procedures and Operations ..................................................... 976

NFS File System Model and the Mount Protocol ............................................................... 978The NFS File System Model .................................................................................... 978The Mount Protocol ................................................................................................ 978

TCPIP_01TOC.fm Page xxiii Thursday, June 9, 2005 11:16 AM

Page 24: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxiv Conten t s in Detai l

PART II I -3HOST CONFIGURATION AND TCP/IP HOST CONFIGURATION PROTO COLS

59HOST CONFIGURATION CONCEPTS, ISSUES, AND MOTIVATION 983

The Purpose of Host Configuration .................................................................................983The Problems with Manual Host Configuration ................................................................. 984Automating the Process: Host Configuration Protocols ....................................................... 985The Role of Host Configuration Protocols in TCP/IP ...........................................................985

60TCP/IP BOOTSTRAP PROTOCOL (BOOTP) 987

BOOTP Overview, History, and Standards ......................................................................988BOOTP: Correcting the Weaknesses of RARP ...........................................................988Vendor-Specific Parameters .................................................................................... 989Changes to BOOTP and the Development of DHCP ................................................... 990

BOOTP Client/Server Messaging and Addressing ............................................................990BOOTP Messaging and Transport ........................................................................... 991BOOTP Use of Broadcasts and Ports ........................................................................ 991Retransmission of Lost Messages ............................................................................. 992

BOOTP Detailed Operation ...........................................................................................993BOOTP Bootstrapping Procedure ............................................................................. 993Interpretation of the Client IP Address (CIAddr) Field .................................................. 994

BOOTP Message Format ............................................................................................... 995BOOTP Vendor-Specific Area and Vendor Information Extensions ......................................998

BOOTP Vendor Information Extensions ..................................................................... 999BOOTP Vendor Information Fields ......................................................................... 1000

BOOTP Relay Agents (Forwarding Agents) ....................................................................1001The Function of BOOTP Relay Agents .....................................................................1002Normal BOOTP Operation Using a Relay Agent ..................................................... 1002Relaying BOOTP Requests Using Broadcasts ........................................................... 1003

61DHCP OVERVIEW AND ADDRESS ALLOCATIONCONCEPTS 1007

DHCP Overview, History, and Standards ...................................................................... 1008DHCP: Building on BOOTP’s Strengths ................................................................... 1009Overview of DHCP Features ................................................................................. 1009

DHCP Address Assignment and Allocation Mechanisms .................................................. 1010DHCP Address Allocation ..................................................................................... 1010DHCP Manual Allocation ..................................................................................... 1011DHCP Dynamic Allocation .................................................................................... 1011DHCP Automatic Allocation .................................................................................. 1012

DHCP Leases ............................................................................................................. 1013DHCP Lease Length Policy .................................................................................... 1013Issues with Infinite Leases ...................................................................................... 1015

DHCP Lease Life Cycle and Lease Timers ....................................................................... 1015DHCP Lease Life Cycle Phases .............................................................................. 1016Renewal and Rebinding Timers ............................................................................. 1016

DHCP Lease Address Pools, Ranges, and Address Management ...................................... 1018

TCPIP_01TOC.fm Page xxiv Thursday, June 9, 2005 11:16 AM

Page 25: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Content s in De ta i l xxv

Address Pool Size Selection .................................................................................. 1018Lease Address Ranges (Scopes) ............................................................................ 1019Other Issues with Address Management ................................................................. 1020

62DHCP CONFIGURATION AND OPERATION 1023

DHCP Overview of Client and Server Responsibilities ..................................................... 1024DHCP Server Responsibilities ................................................................................1024DHCP Client Responsibilities ................................................................................. 1025DHCP Client/Server Roles .................................................................................... 1025DHCP Relay Agents ............................................................................................. 1026

DHCP Configuration Parameters, Storage, and Communication ....................................... 1026Configuration Parameter Management ................................................................... 1026Parameter Storage ............................................................................................... 1027Configuration Parameter Communication ............................................................... 1027

DHCP General Operation and the Client Finite State Machine ......................................... 1027DHCP Lease Allocation, Reallocation, and Renewal ........................................................ 1031

Initial Lease Allocation Process .............................................................................. 1031DHCP Lease Reallocation Process .......................................................................... 1036DHCP Lease Renewal and Rebinding Processes ....................................................... 1038DHCP Early Lease Termination (Release) Process ..................................................... 1041

DHCP Parameter Configuration Process for Clients with Non-DHCP Addresses ................... 1043

63DHCP MESSAGING, MESSAGE TYPES, AND FORMATS 1045

DHCP Message Generation, Addressing, Transport, and Retransmission ........................... 1046Message Generation and General Formatting ........................................................ 1046Message Transport .............................................................................................. 1046Retransmission of Lost Messages ........................................................................... 1047

DHCP Message Format ............................................................................................... 1048DHCP Options ........................................................................................................... 1051

Options and Option Format .................................................................................. 1052Option Categories ............................................................................................... 1053Option Overloading ............................................................................................ 1054

Summary of DHCP Options/BOOTP Vendor Information Fields ........................................ 1055RFC 1497 Vendor Extensions ...............................................................................1055IP Layer Parameters Per Host ................................................................................. 1057IP Layer Parameters Per Interface ........................................................................... 1057Link Layer Parameters Per Interface ........................................................................ 1058TCP Parameters ................................................................................................... 1058Application and Service Parameters ...................................................................... 1058DHCP Extensions ................................................................................................. 1060

64DHCP CLIENT/SERVER IMPLEMENTATION, FEATURES,AND IPV6 SUPPORT 1063

DHCP Server and Client Implementation and Management Issues ....................................1064DHCP Server Implementations ...............................................................................1064DHCP Client Implementations ................................................................................1066

DHCP Message Relaying and BOOTP Relay Agents ....................................................... 1066Use of BOOTP Relay Agents for DHCP ................................................................... 1067

TCPIP_01TOC.fm Page xxv Thursday, June 9, 2005 11:16 AM

Page 26: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxvi Conten t s in Detai l

DHCP Relaying Process ........................................................................................ 1067DHCP Autoconfiguration/Automatic Private IP Addressing (APIPA) ...................................1068

APIPA Operation ................................................................................................. 1069APIPA Limitations ................................................................................................. 1070

DHCP Server Conflict Detection .................................................................................... 1071DHCP and BOOTP Interoperability ...............................................................................1072

BOOTP Clients Connecting to a DHCP Server .........................................................1073DHCP Clients Connecting to a BOOTP Server .........................................................1073

DHCP Security Issues .................................................................................................. 1073DHCP Security Concerns ...................................................................................... 1074DHCP Authentication ...........................................................................................1074

DHCP for IP Version 6 (DHCPv6) .................................................................................. 1075Two Methods for Autoconfiguration in IPv6 ............................................................. 1075DHCPv6 Operation Overview ...............................................................................1075DHCPv6 Message Exchanges ...............................................................................1076

PART II I -4TCP/IP NETWORK MANAGEMENT FRAMEWORK AND PROTOCOLS

65TCP/IP INTERNET STANDARD MANAGEMENTFRAMEWORK OVERVIEW 1079

Overview and History of the TCP/IP Internet Standard Management Frameworkand Simple Network Management Protocol (SNMP) ......................................... 1080

Early Development of SNMP ................................................................................. 1080The Two Meanings of SNMP ................................................................................1081Design Goals of SNMP ........................................................................................ 1081Further Development of SNMP and the Problem of SNMP Variations .........................1082

TCP/IP SNMP Operational Model, Components, and Terminology .................................. 1082SNMP Device Types ............................................................................................ 1082SNMP Entities .....................................................................................................1083SNMP Operational Model Summary .....................................................................1083

TCP/IP Internet Standard Management Framework Architecture and Protocol Components .. 1085SNMP Framework Components ............................................................................. 1085SNMP Framework Architecture ............................................................................. 1086

TCP/IP Internet Standard Management Framework and SNMP Versions(SNMPv1, SNMPv2 Variants, and SNMPv3) ................................................... 1087

SNMPv1 ............................................................................................................ 1087SNMPsec ........................................................................................................... 1088SNMPv2 ............................................................................................................ 1088SNMPv2 Variants ................................................................................................ 1088SNMPv3 ............................................................................................................ 1089

TCP/IP Internet Standard Management Framework and SNMP Standards .........................1090

66TCP/IP STRUCTURE OF MANAGEMENT INFORMATION(SMI) AND MANAGEMENT INFORMATION BASES (MIBS) 1095

SNMP’s Information-Oriented Design .....................................................................1096MIB and MIB Objects ..........................................................................................1097Defining MIB Objects: SMI ................................................................................... 1098

TCP/IP MIB Objects, Object Characteristics, and Object Types ....................................... 1099

TCPIP_01TOC.fm Page xxvi Thursday, June 9, 2005 11:16 AM

Page 27: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten ts i n Detai l xxvii

MIB Object Characteristics ................................................................................... 1099SMI Data Types ................................................................................................... 1101

TCP/IP MIB Object Descriptors and Identifiers and the Object Name Hierarchy ................. 1102Object Descriptors ............................................................................................... 1103Object Identifiers ................................................................................................. 1103Structure of the MIB Object Name Hierarchy ..........................................................1104Recursive Definition of MIB Object Identifiers ..........................................................1106

TCP/IP MIB Modules and Object Groups ...................................................................... 1106The Organization of MIB Objects into Object Groups ..............................................1106MIB Modules ...................................................................................................... 1108MIB Module Format ............................................................................................. 1109

67TCP/IP SIMPLE NETWORK MANAGEMENT PROTOCOL(SNMP) CONCEPTS AND OPERATION 1111

SNMP Protocol Overview ............................................................................................ 1112Early Development of SNMPv1 ............................................................................. 1112SNMPv2 and the Division of SNMP into Protocol Operations and Transport Mappings 1113SNMP Communication Methods ............................................................................ 1114

SNMP Protocol Operations ..........................................................................................1114SNMP PDU Classes ............................................................................................. 1115Basic Request/Response Information Poll Using GetRequest

and (Get)Response Messages ........................................................................ 1116Table Traversal Using GetNextRequest and GetBulkRequest Messages ....................... 1117Object Modification Using SetRequest Messages ..................................................... 1119Information Notification Using Trap and InformRequest Messages ............................. 1121

SNMP Protocol Security Issues and Methods .................................................................. 1122Problems with SNMPv1 Security ............................................................................ 1123SNMPv2/v3 Security Methods .............................................................................. 1123

68SNMP PROTOCOL MESSAGING AND MESSAGE FORMATS 1125

SNMP Protocol Message Generation ............................................................................ 1126SNMP Transport Mappings .........................................................................................1126

UDP Message Size Issues ..................................................................................... 1127Lost Transmission Issues ........................................................................................ 1127

SNMP General Message Format .................................................................................. 1128The Difference Between SNMP Messages and PDUs ................................................ 1129General PDU Format ............................................................................................ 1129

SNMP Version 1 (SNMPv1) Message Format ................................................................ 1131SNMPv1 General Message Format ....................................................................... 1131SNMPv1 PDU Formats .........................................................................................1132

SNMP Version 2 (SNMPv2) Message Formats ............................................................... 1134SNMP Version 2 (SNMPv2p) Message Format ........................................................ 1135Community-Based SNMP Version 2 (SNMPv2c) Message Format .............................. 1136User-Based SNMP Version 2 (SNMPv2u) Message Format ....................................... 1136SNMPv2 PDU Formats .........................................................................................1138

SNMP Version 3 (SNMPv3) Message Format ................................................................ 1141

TCPIP_01TOC.fm Page xxvii Thursday, June 9, 2005 11:16 AM

Page 28: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxviii Content s i n De ta i l

69TCP/IP REMOTE NETWORK MONITORING (RMON) 1145

RMON Standards ...................................................................................................... 1146RMON MIB Hierarchy and Object Groups ....................................................................1146RMON Alarms, Events, and Statistics ............................................................................ 1148

PART II I -5TCP/IP APPLICATION LAYER ADDRESSING AND APPLICATION CATE GORIES

70TCP/IP APPLICATION LAYER ADDRESSING:UNIFORM RESOURCE IDENTIFIERS, LOCATORS,AND NAMES (URIS, URLS, AND URNS) 1151

URI Overview and Standards ....................................................................................... 1152URI Categories: URLs and URNs ............................................................................ 1153URI Standards .....................................................................................................1154

URL General Syntax ....................................................................................................1154Common Internet Scheme Syntax .......................................................................... 1155Omission of URL Syntax Elements .......................................................................... 1156URL Fragments ....................................................................................................1157Unsafe Characters and Special Encodings .............................................................. 1157

URL Schemes and Scheme-Specific Syntaxes .................................................................. 1158World Wide Web/Hypertext Transfer Protocol Syntax (http) ....................................1158File Transfer Protocol Syntax (ftp) ........................................................................... 1159Electronic Mail Syntax (mailto) .............................................................................. 1159Gopher Protocol Syntax (gopher) .......................................................................... 1160Network News/Usenet Syntax (news) ....................................................................1160Network News Transfer Protocol Syntax (nttp) .........................................................1160Telnet Syntax (telnet) ............................................................................................ 1161Local File Syntax (file) ..........................................................................................1161Special Syntax Rules ............................................................................................ 1161

URL Relative Syntax and Base URLs .............................................................................. 1162Interpretation Rules for Relative URLs ...................................................................... 1163Practical Interpretation of Relative URLs .................................................................. 1164

URL Length and Complexity Issues ................................................................................1166URL Wrapping and Delimiting .............................................................................. 1167Explicit URL Delimiting and Redirectors ................................................................... 1168URL Abbreviation ................................................................................................ 1168

URL Obscuration, Obfuscation, and General Trickery ..................................................... 1168URNs ........................................................................................................................ 1171

The Problem With URLs ........................................................................................ 1171Overview of URNs .............................................................................................. 1172URN Namespaces and Syntax .............................................................................. 1172URN Resolution and Implementation Difficulties ....................................................... 1173

71FILE AND MESSAGE TRANSFER OVERVIEW ANDAPPLICATION CATEGORIES 1175

File Concepts ............................................................................................................. 1176Application Categories ............................................................................................... 1176

TCPIP_01TOC.fm Page xxviii Thursday, June 9, 2005 11:16 AM

Page 29: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten t s in Deta i l xxix

General File Transfer Applications ......................................................................... 1176Message Transfer Applications ............................................................................. 1176The Merging of File and Message Transfer Methods ................................................ 1177

PART II I -6TCP/IP GENERAL FILE TRANSFER PROTOCOLS

72FILE TRANSFER PROTOCOL (FTP) 1181

FTP Overview, History, and Standards .......................................................................... 1182FTP Development and Standardization ................................................................... 1182Overview of FTP Operation .................................................................................. 1183

FTP Operational Model, Protocol Components, and Key Terminology ............................... 1184The Server-FTP Process and User-FTP Process ........................................................... 1184FTP Control Connection and Data Connection .........................................................1184FTP Process Components and Terminology ............................................................. 1185Server-FTP Process Components ............................................................................. 1185User-FTP Process Components ...............................................................................1186Third-Party File Transfer (Proxy FTP) ........................................................................ 1186

FTP Control Connection Establishment, User Authentication, and Anonymous FTP Access ....1187FTP Login Sequence and Authentication ................................................................. 1187FTP Security Extensions ........................................................................................ 1188Anonymous FTP ................................................................................................... 1189

FTP Data Connection Management ...............................................................................1189Normal (Active) Data Connections ......................................................................... 1190Passive Data Connections ..................................................................................... 1190Efficiency and Security Issues Related to the Connection Methods .............................. 1191

FTP General Data Communication and Transmission Modes ............................................ 1193Stream Mode ...................................................................................................... 1193Block Mode ........................................................................................................ 1194Compressed Mode .............................................................................................. 1194

FTP Data Representation: Data Types, Format Control, and Data Structures ....................... 1194FTP Data Types ................................................................................................... 1195ASCII Data Type Line-Delimiting Issues ................................................................... 1196FTP Format Control .............................................................................................. 1196FTP Data Structures .............................................................................................. 1197

FTP Internal Command Groups and Protocol Commands ................................................. 1197FTP Command Groups and Commands .................................................................. 1197

FTP Replies ................................................................................................................1200Advantages of Using Both Text and Numeric Replies ...............................................1200Reply Code Structure and Digit Interpretation ..........................................................1201FTP Multiple-Line Text Replies ................................................................................1204

FTP User Interface and User Commands ........................................................................ 1205Command-Line and Graphical FTP Interfaces ..........................................................1205Typical FTP User Commands ................................................................................. 1206

Sample FTP Session ....................................................................................................1208

73TRIVIAL FILE TRANSFER PROTOCOL (TFTP) 1211

TFTP Overview, History, and Standards ........................................................................ 1212Why TFTP Was Needed ...................................................................................... 1212Comparing FTP and TFTP ..................................................................................... 1213

TCPIP_01TOC.fm Page xxix Thursday, June 9, 2005 11:16 AM

Page 30: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxx Content s i n De ta i l

Overview of TFTP Operation ................................................................................. 1213TFTP General Operation, Connection Establishment, and Client/Server Communication ..... 1214

Connection Establishment and Identification ........................................................... 1215Lock-Step Client/Server Messaging ........................................................................ 1215Difficulties with TFTP’s Simplified Messaging Mechanism .......................................... 1216

TFTP Detailed Operation and Messaging ...................................................................... 1216Initial Message Exchange ..................................................................................... 1216Data Block Numbering .........................................................................................1217TFTP Read Process Steps ...................................................................................... 1217TFTP Write Process Steps ...................................................................................... 1218

TFTP Options and Option Negotiation .......................................................................... 1220TFTP Option Negotiation Process ........................................................................... 1220TFTP Options ...................................................................................................... 1223

TFTP Message Formats ................................................................................................ 1223Read Request and Write Request Messages ............................................................ 1223Data Messages ................................................................................................... 1224Acknowledgment Messages .................................................................................. 1225Error Messages ................................................................................................... 1225Option Acknowledgment Messages ....................................................................... 1226

PART II I -7TCP/IP ELECTRONIC MAIL SYSTEM: CONCEPTS AND PROTOCOLS

74TCP/IP ELECTRONIC MAIL SYSTEM OVERVIEW ANDCONCEPTS 1229

TCP/IP Electronic Mail System Overview and History ..................................................... 1230The Early Days of Email ....................................................................................... 1230History of TCP/IP Email ........................................................................................ 1231Overview of the TCP/IP Email System ....................................................................1231

TCP/IP Email Communication Overview ........................................................................ 1232TCP/IP Email Message Communication Model ............................................................... 1234Protocol Roles in Email Communication ......................................................................... 1236

75TCP/IP ELECTRONIC MAIL ADDRESSES AND ADDRESSING 1237

TCP/IP Email Addressing and Address Resolution ..........................................................1238Standard DNS-Based Email Addresses ................................................................... 1238Special Requirements of Email Addresses ............................................................... 1239

TCP/IP Historical and Special Email Addressing ............................................................ 1240FidoNet Addressing ............................................................................................. 1240UUCP-Style Addressing ........................................................................................ 1241Addressing for Gatewaying .................................................................................. 1241

TCP/IP Email Aliases and Address Books ...................................................................... 1242Multiple Recipient Addressing ...................................................................................... 1242Mailing Lists .............................................................................................................. 1243

TCPIP_01TOC.fm Page xxx Thursday, June 9, 2005 11:16 AM

Page 31: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten t s in Deta i l xxxi

76TCP/IP ELECTRONIC MAIL MESSAGE FORMATS ANDMESSAGE PROCESSING: RFC 822 AND MIME 1245

TCP/IP Email RFC 822 Standard Message Format Overview .......................................... 1246Development of the RFC 822 Message Format Standard .......................................... 1247Overview of RFC 822 Messages ........................................................................... 1247General RFC 822 Message Structure .....................................................................1248

TCP/IP Email RFC 822 Standard Message Format Header Fields and Groups ................... 1249Header Field Structure .........................................................................................1249Header Field Groups ...........................................................................................1249Common Header Field Groups and Header Fields .................................................. 1250

TCP/IP Email RFC 822 Standard Message Format Processing and Interpretation ................ 1253MIME Overview ......................................................................................................... 1254

MIME Capabilities ............................................................................................... 1255MIME Standards ................................................................................................. 1256

MIME Basic Structures and Headers ............................................................................. 1257Basic Structures ................................................................................................... 1258MIME Entities ...................................................................................................... 1258Primary MIME Headers ........................................................................................ 1258Additional MIME Headers .................................................................................... 1259

MIME Content-Type Header and Discrete Media ............................................................ 1260Content-Type Header Syntax ................................................................................. 1260Discrete Media Types and Subtypes ...................................................................... 1261

MIME Composite Media Types: Multipart and Encapsulated Message Structures ...............1265MIME Multipart Message Type .............................................................................. 1265Multipart Message Encoding ................................................................................1266MIME Encapsulated Message Type ....................................................................... 1269MIME Content-Transfer-Encoding Header and Encoding Methods .............................. 12697-Bit and 8-Bit Encoding ....................................................................................... 1270Quoted-Printable Encoding ................................................................................... 1270Base64 Encoding ................................................................................................ 1270

MIME Extension for Non-ASCII Mail Message Headers ................................................... 1273

77TCP/IP ELECTRONIC MAIL DELIVERY PROTOCOL:THE SIMPLE MAIL TRANSFER PROTOCOL (SMTP) 1275

SMTP Overview, History, and Standards ....................................................................... 1276SMTP Standards .................................................................................................. 1276SMTP Communication and Message Transport Methods ........................................... 1277Terminology: Client/Server and Sender/Receiver .................................................... 1279

SMTP Connection and Session Establishment and Termination ......................................... 1279Overview of Connection Establishment and Termination ........................................... 1280Connection Establishment and Greeting Exchange .................................................. 1280Connection Establishment Using SMTP Extensions .................................................... 1281Connection Termination ....................................................................................... 1282

SMTP Mail Transaction Process .................................................................................... 1283Overview of SMTP Mail Transaction ...................................................................... 1283SMTP Mail Transaction Details .............................................................................. 1284

SMTP Special Features, Capabilities, and Extensions ...................................................... 1286SMTP Special Features and Capabilities ................................................................. 1287SMTP Extensions ................................................................................................. 1288

SMTP Security Issues ................................................................................................... 1289SMTP Commands ....................................................................................................... 1291

TCPIP_01TOC.fm Page xxxi Thursday, June 9, 2005 11:16 AM

Page 32: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxxii Conten t s in Detai l

SMTP Replies and Reply Codes .................................................................................... 1293Reply Code Structure and Digit Interpretation ..........................................................1293SMTP Multiple-Line Text Replies ............................................................................. 1296Enhanced Status Code Replies .............................................................................. 1296

78TCP/IP ELECTRONIC MAIL ACCESS AND RETRIEVALPROTOCOLS AND METHODS 1297

TCP/IP Email Mailbox Access Model, Method, and Protocol Overview ............................. 1298Email Access and Retrieval Models ........................................................................ 1299

TCP/IP Post Office Protocol (POP/POP3) ....................................................................... 1300POP Overview, History, Versions, and Standards .................................................... 1300POP3 General Operation ..................................................................................... 1302POP3 Session States ............................................................................................ 1302

TCP/IP Internet Message Access Protocol (IMAP/IMAP4) ................................................ 1309IMAP Overview, History, Versions, and Standards .................................................. 1310IMAP4 General Operation ................................................................................... 1312IMAP Session States ............................................................................................ 1312IMAP Commands, Results, and Responses .............................................................. 1314IMAP4 Not Authenticated State: User Authentication Process and Commands ............. 1318IMAP4 Authenticated State: Mailbox Manipulation/Selection Process and Commands 1319IMAP4 Selected State: Message Manipulation Process and Commands ..................... 1321

TCP/IP Direct Server Email Access ................................................................................1323TCP/IP World Wide Web Email Access ....................................................................... 1325

PART II I -8TCP/IP WORLD WIDE WEB AND THE HYPERTEXT TRANSFER PROTO COL (HTTP)

79WORLD WIDE WEB AND HYPERTEXT OVERVIEW ANDCONCEPTS 1329

World Wide Web and Hypertext Overview and History ................................................. 1330History of Hypertext ............................................................................................. 1330The World Wide Web Today ...............................................................................1331

World Wide Web System Concepts and Components .................................................... 1332Major Functional Components of the Web ............................................................. 1332Web Servers and Web Browsers .......................................................................... 1333

World Wide Web Media and the Hypertext Markup Language ...................................... 1334Overview of HTML .............................................................................................. 1334HTML Elements and Tags ...................................................................................... 1335Common HTML Elements ...................................................................................... 1336Common Text Formatting Tags .............................................................................. 1338

World Wide Web Addressing: HTTP Uniform Resource Locators ...................................... 1338HTTP URL Syntax ................................................................................................. 1339Resource Paths and Directory Listings .....................................................................1340

80HTTP GENERAL OPERATION AND CONNECTIONS 1341

HTTP Versions and Standards ...................................................................................... 1342

TCPIP_01TOC.fm Page xxxii Thursday, June 9, 2005 11:16 AM

Page 33: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Content s i n De ta i l xxxiii

HTTP/0.9 ........................................................................................................... 1342HTTP/1.0 ........................................................................................................... 1342HTTP/1.1 ........................................................................................................... 1343Future HTTP Versions ............................................................................................ 1344

HTTP Operational Model and Client/Server Communication ........................................... 1345Basic HTTP Client/Server Communication ............................................................... 1345Intermediaries and the HTTP Request/Response Chain ............................................. 1346The Impact of Caching on HTTP Communication ..................................................... 1347

HTTP Transitory and Persistent Connections and Pipelining ..............................................1348Persistent Connections ..........................................................................................1349Pipelining ........................................................................................................... 1349HTTP Persistent Connection Establishment and Management ..................................... 1350

81HTTP MESSAGES, METHODS, AND STATUS CODES 1353

HTTP Generic Message Format ................................................................................... 1354HTTP Request Message Format ..................................................................................... 1355

Request Line ........................................................................................................ 1356Headers ............................................................................................................. 1358

HTTP Response Message Format .................................................................................. 1358Status Line .......................................................................................................... 1359Headers ............................................................................................................. 1360

HTTP Methods ............................................................................................................ 1361Common Methods ............................................................................................... 1361Other Methods ....................................................................................................1362Safe and Idempotent Methods .............................................................................. 1363

HTTP Status Codes and Reason Phrases ........................................................................ 1364Status Code Format ............................................................................................. 1364Reason Phrases ................................................................................................... 1365The 100 (Continue) Preliminary Reply ....................................................................1368

82HTTP MESSAGE HEADERS 1369

HTTP General Headers ............................................................................................... 1370Cache-Control Headers ........................................................................................ 1370Warning ............................................................................................................ 1371Other HTTP General Headers ...............................................................................1372

HTTP Request Headers ................................................................................................ 1373HTTP Response Headers .............................................................................................. 1376HTTP Entity Headers ................................................................................................... 1377

83HTTP ENTITIES, TRANSFERS, CODING METHODS,AND CONTENT MANAGEMENT 1381

HTTP Entities and Internet Media Types ......................................................................... 1382Media Types and Subtypes .................................................................................. 1382HTTP’s Use of Media Types .................................................................................. 1383Differences in HTTP and MIME Constructs ............................................................... 1383

HTTP Content and Transfer Encodings ........................................................................... 1384HTTP’s Two-Level Encoding Scheme ....................................................................... 1385Use of Content and Transfer Encodings .................................................................. 1385

TCPIP_01TOC.fm Page xxxiii Thursday, June 9, 2005 11:16 AM

Page 34: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxxiv Conten t s in Deta i l

HTTP Data Length Issues, Chunked Transfers, and Message Trailers .................................. 1386Dynamic Data Length ...........................................................................................1387Chunked Transfers and Message Trailers ................................................................ 1387

HTTP Content Negotiation and Quality Values ............................................................... 1390Content Negotiation Techniques ............................................................................ 1390Quality Values for Preference Weights ................................................................... 1392

84HTTP FEATURES, CAPABILITIES, AND ISSUES 1393

HTTP Caching Features and Issues ................................................................................1394Benefits of HTTP Caching .................................................................................... 1394Cache Locations .................................................................................................. 1395Cache Control ....................................................................................................1396Important Caching Issues ...................................................................................... 1397

HTTP Proxy Servers and Proxying ................................................................................. 1398Benefits of Proxies ............................................................................................... 1398Comparing Proxies and Caches ............................................................................ 1399Important Proxying Issues ..................................................................................... 1399

HTTP Security and Privacy ...........................................................................................1400HTTP Authentication Methods ................................................................................1400Security and Privacy Concerns and Issues .............................................................. 1401Methods for Ensuring Privacy in HTTP ....................................................................1402

HTTP State Management Using Cookies ........................................................................ 1402Issues with Cookies .............................................................................................. 1403Managing Cookie Use .........................................................................................1404

PART II I -9OTHER FILE AND MESSAGE TRANSFER APPLICATIONS

85USENET (NETWORK NEWS) AND THE TCP/IPNETWORK NEWS TRANSFER PROTOCOL (NNTP) 1409

Usenet Overview, History, and Operation ....................................................................1410History of Usenet ................................................................................................. 1410Usenet Operation and Characteristics ....................................................................1411Usenet Transport Methods .................................................................................... 1412

Usenet Communication Model ..................................................................................... 1413Usenet’s Public Distribution Orientation .................................................................. 1414Usenet Communication Process ............................................................................. 1414Message Propagation and Server Organization ...................................................... 1416Usenet Addressing: Newsgroups ........................................................................... 1416

Usenet Message Format and Special Headers ............................................................... 1420Usenet Header Categories and Common Headers ................................................... 1420Additional Usenet Headers ................................................................................... 1422Usenet MIME Messages ....................................................................................... 1423

NNTP Overview and General Operation ...................................................................... 1423NNTP Interserver Communication Process: News Article Propagation ............................... 1425

The Usenet Server Structure .................................................................................. 1425Basic NNTP Propagation Methods ........................................................................ 1426

NNTP Client-Server Communication Process: News Posting and Access ............................ 1428News Posting, Access, and Reading ...................................................................... 1429News Access Methods .........................................................................................1430

TCPIP_01TOC.fm Page xxxiv Thursday, June 9, 2005 11:16 AM

Page 35: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

Conten t s in Detai l xxxv

Other Client/Server Functions ...............................................................................1430Article Threading ................................................................................................. 1431

NNTP Commands and Command Extensions ................................................................. 1432Command Syntax ................................................................................................ 1432Base Command Set ............................................................................................. 1432NNTP Command Extensions ................................................................................. 1434

NNTP Status Responses and Response Codes ................................................................ 1438

86GOPHER PROTOCOL (GOPHER) 1443

Gopher Overview and General Operation ....................................................................1443Information Storage on Gopher Servers ................................................................. 1444Gopher Client/Server Operation ........................................................................... 1444

Important Differences Between Gopher and the Web ..................................................... 1445Gopher’s Role in the Modern Internet ........................................................................... 1445

PART II I -10INTERACTIVE AND ADMINISTRATIVE UTILITIES AND PROTOCOLS

87TCP/IP INTERACTIVE AND REMOTE APPLICATIONPROTOCOLS 1449

Telnet Protocol ........................................................................................................... 1450Telnet Overview, History, and Standards ................................................................ 1450Telnet Connections and Client/Server Operation ..................................................... 1453Telnet Communications Model and the Network Virtual Terminal (NVT) ..................... 1455Telnet Protocol Commands ................................................................................... 1458Telnet Interrupt Handling ...................................................................................... 1461Telnet Options and Option Negotiation ................................................................. 1462

Berkeley Remote (r) Commands .................................................................................... 1466Berkeley Remote Login (rlogin) .............................................................................. 1467Berkeley Remote Shell (rsh) ................................................................................... 1468Other Berkeley Remote Commands ........................................................................ 1469

Internet Relay Chat Protocol (IRC) ................................................................................. 1470IRC Communication Model and Client/Server Operation ......................................... 1471Messaging and IRC Channels ...............................................................................1471IRC and the Modern Internet ................................................................................. 1472

88TCP/IP ADMINISTRATION AND TROUBLESHOOTINGUTIL ITIES AND PROTOCOLS 1473

TCP/IP Host Name Utility (hostname) ............................................................................ 1474TCP/IP Communication Verification Utility (ping) ............................................................ 1475

Operation of the ping Utility ................................................................................. 1476Basic Use of ping ................................................................................................ 1476Methods of Diagnosing Connectivity Problems Using ping ........................................ 1477ping Options and Parameters ...............................................................................1478

TCP/IP Route Tracing Utility (traceroute) ........................................................................ 1479Operation of the traceroute Utility .......................................................................... 1480Basic Use of the traceroute Utility .......................................................................... 1481

TCPIP_01TOC.fm Page xxxv Thursday, June 9, 2005 11:16 AM

Page 36: TCPIP 01TOC.fm Page i Thursday, June 9, 2005 11:16 AM … TOC_detail.pdf · The Disadvantages and Costs of Networking ... THE OPEN SYSTEM INTERCONNECTION ... IP Classful Addressing

xxxvi Conten t s in Deta i l

traceroute Options and Parameters ........................................................................ 1482TCP/IP Address Resolution Protocol Utility (arp) .............................................................. 1483TCP/IP DNS Name Resolution and Lookup Utilities (nslookup, host, and dig) ..................... 1484

The nslookup Utility .............................................................................................. 1485The host Utility ....................................................................................................1487The dig Utility .....................................................................................................1488

TCP/IP DNS Registry Database Lookup Utility (whois/nicname) ....................................... 1489TCP/IP Network Status Utility (netstat) ........................................................................... 1491

The UNIX netstat Utility .........................................................................................1492The Windows netstat Utility .................................................................................. 1494

TCP/IP Configuration Utilities (ifconfig, ipconfig, and winipcfg) ....................................... 1496The ifconfig Utility for UNIX .................................................................................. 1496The ipconfig for Windows NT, 2000, and XP .........................................................1498The winipcfg Utility for Windows 95, 98, and Me .................................................. 1500

Miscellaneous TCP/IP Troubleshooting Protocols ............................................................ 1501

TCPIP_01TOC.fm Page xxxvi Thursday, June 9, 2005 11:16 AM


Recommended