tcp ip guilde

Upload: nga-nguyen-duy

Post on 04-Jun-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Tcp Ip guilde

    1/39

    THE TCP/IP GUIDEA Comprehensive, IllustratedInternet ProtocolA Reference

    by CharlesM.Kozierok

    N O S T A R C HP R E S S

    San rancisco

  • 8/14/2019 Tcp Ip guilde

    2/39

    B R I E F C O N T E N T S

    inDetail xiiiListof Figures xlvListof Tables Iv

    Ixvbout the Author Ixvii

    Introduction Ixix

    SECTIONI:TCP/IP OVERVIEW AND BACKGROUND INFORMATION

    PART I - 1 : N E T W O R KI N G F U N D A M E N T A L SChapter 1:Ne twork ing Introduction, Characteristics, and Types 5Chapter2: Network Performance Issues andConcepts 31Chapter3: Network Standards and Standards Organizations 45Chapter 4:A Review ofData Representation and theMathematicsof Computing 61

    PART 1 -2 : THE O PE N SYSTEMS INTE R CO N NE CT IO N OS I ) REFERENCE MO D ELChapter5:General OSI Reference Model Issues and Concepts 81Chapter 6: OSI Reference Model Layers 101Chapter 7: OSI Reference Model Summary 113PART 1 -3 : TCP/ IP PR OT OCOL SU ITE A N D ARCHITECTUREChapter8:TCP/IP Protocol Suiteand Architecture 121

  • 8/14/2019 Tcp Ip guilde

    3/39

    SECT ION I I : TCP / I P LOW ER -LAYER CORE PRO TO COL SPART I I - 1 :T CP / I P NE TW O R K INTERFACE LAYER PROTO COLSChapter 9: TCP/IP Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)

    Overview and Fundamentals ...13 9Chapter 10: PPP Core Protocols: Link Co ntrol, Ne two rk Co ntrol, and Authentication 155Chapter 1 1 : PPP Feature Protocols 16 7Chapter 12 : PPP Protocol Frame Formats 181PART 11-2: TCP /I P NETW OR K INTERFA CE /INTERN ET LAYER CO N N ECT IO N PROTO COLSChapter 13 : Address Resolution and the TCP/IP Address Resolution Protocol (ARP) 203Chapter 14 : Reverse Address Resolution an d the TCP/IP Reverse Add ress Resolution

    Protoco l (RARP) 2 2 7PART 11-3: INTERNET PRO TOCOL VE RS ION 4 I P / I PV4 )Chapter 15 : Internet Protocol Versions, Concepts, and Overview 235Chapter 16 : IPv4 Addressing Concepts an d Issues 241Chapter 17 : Classful (Conventional) Add ressing 255Chapter 18: IP Subnet Addressing (Subnetting) Concepts 273Chapter 1 9: IP Subnetting: Practical Subnet Design and Address Determination Example 2 9 7Chapter 20: IP Classless AddressingClassless Inter-Domain Routing

    (CIDR)/Supernetting 315Chapter 2 1 : Internet Protocol Datagram Encapsulation and Formatting 3 29Chap ter 2 2 : IP Datagram Size, Fragmentation, an d Reassembly 3 39Chapter 2 3 : IP Routing and Multicasting 35 1PART 11-4: INTERN ET PRO TOCOL VE RS ION 6 IPV6)Chapter 2 4 : IPv6 Ove rview, Changes, and Transition 36 5Chapter 2 5 : IPv6 Addressing 37 3Chapter 26 : IPv6 Datagram Encapsulation and Formatting 401Chapter 27 : IPv6 Datagram Size, Fragmentation, Reassembly, and Routing 41 5Vl ii Brief Contents

  • 8/14/2019 Tcp Ip guilde

    4/39

    P A R T 1 1 - 5 : I P - R E L A T E D F E A T U R E P R O T O C O L Shapter 28 : IP Network Address Translation (NAT) Protocol 425hapter 2 9 : IP Security (IPsec) Protocols 4 4 9

    Chapter 30: Internet Protocol Mobility Support (Mobile IP) ...:A75P A R T 1 1 - 6 : I P S U P P O R T P R O T O C O L SChapter 3 : ICMP Concepts and General Ope ration 5 0 7Chapter 32 : ICMPv4 Error Message Types and Formats 521Chapter 3 3 : ICMPv4 Informational Message Types and Formats 535Chapter 34 : ICMPv6 Error Message Types and Formats 5 4 7Chapter 35: ICMPv6 Informational Message Types and Formats 557Chapter 36: IPv6 Neighbor Discovery (ND) Protocol 575P A R T 1 1 - 7: T C P / I P R O U T I N G P R O T O C O L S G A T E W A Y P R O T O C O L S )Chapter 37 : Ov erview of Key Routing Protocol Concepts 5 91Chapter 3 8 : Routing Information Protocol (RIP, RIP-2, and RIPng) 5 9 7Chapter 39 : Ope n Shortest Path First (OSPF) 625Chapter 4 0 : Border Ga tew ay Protocol (BGP/BGP-4) 64 7Chapter 4 : Other Routing Protocols 6 7 7

    P A R T 1 1 - 8 : T C P / I P T R A N S P O R T L A Y E R P R O T O C O L SChapter 42: Overview and Comparison of T C P and UDP 68 9Chapter 4 3 : TCP and UDP Add ressing : Ports and Sockets 69 5Chapter 4 4 : TCP/IP User Datagram Protocol (UDP) 711Chapter 4 5 : TCP Ov erview, Functions, an d Characteristics 71 9Chapter 4 6 : Transmission Control Protocol (TCP) Fundamentals and General Operation 7 2 7Chapter 47: TCP Basic Operation: Connection Establishment, Management, and

    Termination 745Chapter 4 8 : TCP Message Formatting and Data Transfer 769Chapter 4 9 : TCP Reliability and Flow Con trol Features 79 3

    Brief Contents

  • 8/14/2019 Tcp Ip guilde

    5/39

    SE CT ION I I I: TCP / IP AP PL ICA T ION LAYER PRO TOCOLSP AR T I II -1 r N A M E S Y ST EM S A N D T CP / IP N A M E R E G IS T R A TIO N A N D N A M E R E S O L U T IO NChapter 5 0 : Nam e System Issues, Concepts, and Techniques 82 5Chapter 5 1 : TCP/IP Nam e Systems Overview and the Host Table Name System 84 1Chap ter 5 2 : Dom ain Name System (DNS) Ov erview, Functions, and Characteristics 84 7Chapter 5 3 : DNS Name Space, Architecture, and Terminology..... 85 7Chapter 5 4 : DNS Nam e Registration, Public Adm inistration, Zones, and Authorities 86 7Chapter55: DNS Nam e Server Concepts and Op eration 88 7Chapter 5 6 : DNS Resolution Concepts and Resolver Operations 909Chapter57: D NS Messaging and Message , Resource Record, an d Master File Formats 9 2 7PART 111-2: NE TW OR K FILE A N D RESOURCE S HA R ING PROTOCOLSChapter 58: Network File and Resource Sharing and the TCP/IP

    Ne two rk File System (NFS) 953

    PART 111-3: H O S T CO N F I G U R A T I O N A N D T CP / IP H O S T CO N F I G U R A T I O N P R O TO CO L SChapter 5 9 : Host Configuration Concepts, Issues, and Motivation 97 3Chap ter 6 0 : TCP/IP Bootstrap Protocol (BOOTP) 9 7 7Chapter 6 1 : DHCP Overview and Address Allocation Concepts 9 9 7Chapter 6 2 : DHCP Configuration and Op eration 1013Chapter 6 3 : DHCP Mes saging, Message Types, and Formats 103 5Chapter 64 : DHCP Clien t/Server Implementation, Features, and IPv6 Support 105 3

    PART 111-4: T CP / IP N E T W O R K M A N A G E M E N T F R A M E W O R K A N D P R O T O CO L SChapter 65 : TCP/IP Internet Standard Managemen t Framework Ove rview 1069Chapter 66: TCP/IP Structure of Management Information (SMI) and

    Manage men t Information Bases (MIBs) 10 83Chapter 6 7 : TCP/IP Simple Netwo rk M anagem ent Protocol (SNMP)

    Concepts and Operation 1099Chapter 6 8 : SNM P Protocol Messaging and Message Formats 11 13X Brie f Contents

  • 8/14/2019 Tcp Ip guilde

    6/39

    Chapter 69 : TCP/IP Remote Ne twork Mo nitoring (RMON) 113 3P A R T 1 1 1 -5 : T C P / I P A P P U C A T I O N L A Y E R A D D R E S S I N G A N D A P P L I C A T I O N C A T E G O R I E SChapter 7 0 : TCP/IP Ap plication Layer Add ressing : Uniform Resource Identifiers,

    Locators, and Nam es (URIs, URLs, and URNs) 11 39Chapter 7 : File and Message Transfer Ove rview and Ap plica tion Categories 1163

    P A R T 11 1 -6 : T C P / I P G E N E R A L FIL E T R A N S F E R P R O T O C O L SChapter 72 : File Transfer Protocol (FTP) 1169Chapter 73: Trivial File Transfer Protocol (TFTP) 199

    P A R T 1 1 1 - 7 : T C P / I P E L E C T R O N I C M A I L S Y S T E M : C O N C E P T S A N D P R O T O C O L SChapter 74: TCP/IP Electronic Mail System Overview and Concepts 2 7Chapter 75: TCP/IP Electronic M ai l Addresses and Addressing 1225Chapter 7 6: TCP/IP Electronic M ai l M essage Formats and Message Processing:

    RFC 822 and MIME 1233Chapter 77: TCP/IP E lectronic M ai l Delivery P rotocol: The Simple M ail Transfer

    Protocol (SMTP) 1263Chapter 78: TCP/IP Electronic M ai l Access and Retrieval Protocols and Methods 1285P A R T 1 1 1 - 8 : T C P / I P W O R L D W I D E W E B A N D T H E H Y P E R T E X T T R A N S F E R P R O T O C O L H T T P )Chapter 79: W orld W ide W eb and Hypertext Overview and Concepts 131 7Chapter 80 : HTTP General Op era tion and Connections 13 29Chapter 8 : HTTP Messages, Me thods, and Status Codes 1341Chapter 82 : HTTP Message Headers 13 57Chapter 83 : HTTP Entities, Transfers, Co ding Me thods, and Content Managem ent 13 69Chapter 84 : HTTP Features, Ca pabilities, and Issues 1381P A R T 111-9= O T H E R F IL E A N D M E S S A G E T R A N S F E R A P P L I C A T I O N SChapter 85: Usenet (Network News) and the TCP/IP Network News Transfer

    Protocol (NNTP) 139 7Chapter 86: Gopher Protocol (Gopher) 143 1

    Brief Contents

  • 8/14/2019 Tcp Ip guilde

    7/39

    P A R T 11 1-10: IN T E R A CT IV E A N D A D M IN I S T R A T IV E U T IL IT IE S A N D P R O T O CO L SChapter 87 : TCP/IP Interactive and Remote App lication Protocols 14 37Chapter 8 8 : TCP/IP Adm inistration and Troubleshooting Utilities and Protocols 146 1

    INDEX 1491R F Cs BY N U M BE R 1537

    XI I Rri= r .

  • 8/14/2019 Tcp Ip guilde

    8/39

    CONTENTS IN DETAIL

    IST OF FIGURES xlv Iv

    IxvTHEAUTHOR Ixvii

    Goals ofThe TCP IPGuide IxixScope of TheTCP IPGuide IxxiThe TCP IPGuide Features IxxiiThe TCP/IP Guide On line IxxiiiYour Feedback and Suggestions Ixxiii

    ECTIONIP/IP OVERVIEW AND BACKGROUND INFORMATION

    ART 1-1 NE TW OR KIN G FUNDA MEN TALS 3

    1 N etwo rking Introduction, Characteristics, an d T ypes 5 6What Is Networking? 6

    The Advantages and Benefits of Networking 7The Disadvantages and Costs of Networking 8amental Ne twork Characteristics 1Networking Layers, Models, and Architectures 1Protocols: Wh at Are They, Anyw ay? 11Circuit-Switching and Packet-Switching Networks 13Connec tion-Oriented a nd Connectionless Protocols 15

    17Message Formatting: Headers, Payloads, and Footers 19Message Addressing and Transmission Methods: Unicast, Broadcast, and Multicast 2 23

    pes and Sizes of Networks 25ments, Netw orks, Subnetworks, an d Internetworks 27 29

    N etwo rk P erformance Issues an d Concepts 31 32

    33formance Measurements: Speed, Ban dwidth, Throughput, and Latency 34Speed 34Bandwidth 35Throughput 35Latency 35Summary of Performance Measurements 36

    37Bits and Bytes 37Baud 38

  • 8/14/2019 Tcp Ip guilde

    9/39

    Theoretical and Real-World Throughput, and Factors Affecting Netw ork Performance 39Normal Network Overhead 39External Performance Limiters 40Network Configuration Problems 40Asymmetry 41Simplex, Full-Duplex, and Half-Duplex Op era tion 41Simplex Ope ration 42Half-Duplex Ope ration 42Full-Duplex Op era tion 42Qu ality of Service (QoS) 43

    3 N etwork S tandards and S tandards O rganizations 45Proprietary, Op en , and De Facto Standards 46Proprietary Standards 46Ope n Standards 47De Facto Standards 48Networking Standards 48International Netwo rking Standards Organ izations 49Netw orking Industry Groups 51Internet Standards Organizations (ISOC, IAB, IESG, IETF, IRSG, and IRTF) 52Internet Registration Authorities and Registries (IA NA , IC A N N , APN IC, AR IN, LAC NIC, and

    RIPENCC) 55Internet Centralized Registration Authorities 55Mo dern Hiera rchy of Registration Authorities 56Internet Standards and the Request for Comment (RFC) Process 57RFC Catego ries 1 58The Internet Stand ardization Process 58

    4 A R eview of D ata R epresentation and the M athematics of Computing 61Binary Information and Representation: Bits, Bytes, Nib bles , Octets, and Characters 62Binary Information 62Binary Information Representation and Grou ps 63Byte Versus Octet 64Decimal,Binary, Oc tal, and Hexadecimal Numbers 65Binary Numbers and Their Decimal Equivalents 65

    Ma king Binary Numbers Easier to Use by Gro uping Bits 66Octal Numbers 66Hexadec imal Numbers 67Decimal, Binary, Oc tal, and Hexadecimal Num ber Conversion 68Binary, Oc tal, and Hexadecima l Conversions 68Conversion from Binary, Oc tal, or Hexadecimal to Decimal -. 69Conversion from Decimal to Binary, Oc tal, or Hexadecimal 70Binary, Oc tal, and Hexadecimal Arithmetic 71Binary Arithmetic 72Oc tal and Hexadecima l Arithmetic 72Boolean Logic and Logical Functions 73Boolean Logica l Functions 73Com bining Boolean Expressions 75

    Bit Masking (Setting, Clearing, and Inverting) Using Boolean Logical Functions 75Setting Groups of Bits with OR 76Clearing Bits with A ND 76Inverting Bits with XOR 77

    XIV Contents in Detoil

  • 8/14/2019 Tcp Ip guilde

    10/39

    AR T 1 -2 T HE O P E N SY S TE M S I N T E R C O N N E C T I O N O S I )R E F E R EN CE M O D E L 79

    G eneral O S I R eference M odel Issues and Concepts 81History of the OSI Reference Mo de l 82eneral Reference Mod el Issues 83The Benefits of Ne two rking Models 83W hy Understanding the OSI Reference M od el Is Important to You 84How to Use the OSI Reference M od el 85

    Other Netw ork Architectures and Protocol Stacks 86Key OSI Reference Mo del Concepts 87OSI Reference Mo de l Ne two rking Layers, Sublayers, and Layer Grouping s 87" N " Notation and Other OSI Mo del Layer Terminology 89Interfaces: Vertical (Adjacent Layer) Com mun ication 91Protocols: Ho rizontal (Correspond ing Layer) Com mun ication 93Data Encapsu lation, Protocol Data Units (PDUs), and Service Data Units (SDUs) 95Indirect Device Connection and Message Routing 98

    6 O S I R eference M odel Layers 1 01Physical Layer (Layer 1) 10 2Data Link Layer (Layer 2) 103Network Layer (Layer 3) 105Transport Layer (Layer 4) : 10 6Session Layer (Layer 5) 10 9Presentation Layer (Layer 6) 10Application Layer (Layer 7) I l l

    7 O S I R eference M odel S ummary 1 1 3Understanding the OSI M od el: An An alogy 113Remembering the OSI M odel Layers: Some Mnem onics 16Summarizing the OSI Model Layers: A Summary Chart 17

    PA RT 1-3 T C P / IP P R O T O CO L S U IT E A N D A R CH I T E CT U R E 1 1 9

    8 TCP /IP P rotocol S uite and A rchitecture 1 2 1TCP/IP Overview and History 122TCP/IP History and Developmen t 122Important Factors in the Success of TCP/IP 23TCP/IP Services 125The TCP/IP Client/Se rver Structural Mo de l 125Hardware and Software Roles '. 12 7

    Transactional Roles 12 7TCP/IP Architecture and the TCP/IP Mo de l 128Network Interface Layer 128Internet Layer 29Host-to-Host Transport Layer 30App lication Layer 13 0TCP/IP Protocols 131

    Contents in Detail XV

  • 8/14/2019 Tcp Ip guilde

    11/39

    SECTION IITCP/IP LOWER-LAYER CORE PROTOCOLSP A R T I I - 1 T C P / IP N E T W O R K IN T E R F A CE L A YE R P R O T O C O L S 137

    9 TCP/ IP erialL ine Internet Protocol SL IP) an d P oint-to-Point P rotocol P PP )O verview and F undamentals 139SLIP versus PPP 140Serial Line Internet Protocol{SUP} 141SLIP Data Framing Me thod a nd G eneral O peration 141Problems and Limitations o fSLIP 142Point-to-Point Protocol (PPP) Overview and Fundamentals 144Development and Standardization 144Function and Architecture 145Advantages and Benefits 145PPPMain Components 146PPP Functional Groups 147General Operation 147PPP Link Setup an d Phases 148PPPStandards 151

    1 0 PPPCore P rotocols: L ink Control, N etwork Control, and A uthentication 155Link Control Protocol (LCP) 155LCP Packets 156LCP Link C onfigu ration 157LCP Link M ainten ance 159LCP Link Termination 159Other LCP Messages 1 159The Ne twork Con trol Protocols (IPCP, IPXCP, NBFCP, an d Others) 159Operation of NCPs 160

    The Internet Protocol Control Protocol (IPCP): An Example N CP 162PPPAuthentication Protocols: PAP and CHAP 162PAP 162CHAP 163

    1 1 PPPFeature Protocols 167PPP Link Quality Monitoring and Reporting (LQM, LQR) 168LQR Setup 168Using Link Qua lity Reports 169PPP Compression Control Protocol (CCP) and Compression Algorithms 169CCP Ope ration : Compression Setup 170

    CCP Configuration Options an d Compression Algorithms 171Compression Algorithm Operation: Compressing and Decompressing Data 171PPP Encryption Con trol Protocol (ECP) and Encryption Algorithm s 172ECP Operation: Encryption Setup 173ECP Configuration Options and Encryption Algorithms 173Encryption Algorithm Operation: Encrypting and Decrypting Data 174PPPMultilink Protocol (MP, MLP, MLPPP) 175

    PPPMultilink Protocol Architecture 176PPP Multilink Protocol Setup and Configuration 177PPPM ultilink Protocol Operation 177

    Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    12/39

    PPP Bandwidth Alloca tion Protocol (BAP) and Ban dwidth Alloc ation Control Protocol (BACP) 178BACP Op eration: Con figuring the Use of BAP 179BAP Op eration : Ad ding and Removing Links 179

    12 PPP P rotocol F rame F ormats 1 81PPPGeneral Frame Format , 182Protocol Field Ranges 183Protocol Field Values 184PPP Field Com pression 185PPPGeneral Control Protocol Frame Format and Option Format 86

    PPPControl Messages and Code Values 187PPPControl Message Op tion Format 88Summary ofPPP Con trol Message Formatting 190

    PPP Link Control Protoco l (LCP) Frame Formats 19 0PAPand CHAP Frame Formats 192

    PPPPAP Con trol Frame Formats 192PPPCHAP Control Frame Formats 194

    PPPMu ltilink Protocol (MP) Frame Format 195PPPMP Frame Fragmentation Process 19 6PPPMP Fragment Frame Format 196PPPMP Fragmentation Demonstration 198

    PA RT 11-2 T C P / I P N E T W O R K IN T E R F A CE / IN T E R N E T LA Y E RC O N N E C T I O N P R O T O CO L S 2 0 1

    13 A ddress R esolution and the T CP /IP A ddress R esolution P rotocol A R P ) 2 03Address Resolution Concepts and Issues 204The Need for Address Resolution 204Address Resolution Through Direct M ap pin g 20 6Dynamic Address Resolution 20 9TCP/IP Address Resolution Protocol (ARP) 212ARP Address Specification and General Ope ration 21 3

    ARP Message Format 21 6ARP Caching 21 8ProxyARP

  • 8/14/2019 Tcp Ip guilde

    13/39

    IP History, Standards , Versions, and Closely Related Protocols 23 9IP Versions and Version Numb ers 23 9IP-Related Protocols 2 4 0

    1 6 IP v4 A ddressing Concepts an d Issues .- 2 41IPAddressing Ove rview an d Fundamentals 24 2Numb er of IP Addresses Per Device 24 3Address Uniqueness an d Netw ork Specificity 24 3Contrasting IP Addresses and Data Link Layer Addresses 244Private and Public IP Ne twork Addresses 24 4

    IP Address Con figuration and Addressing Types 24 4IPAddress Size, Address Space, and Notation 24 5IP Address Size and Binary Notation 24 5IP Address Dotted Decimal Nota tion 24 5IP Address Space 24 6IP Basic Address Structure and M ain Components 2 4 7Network ID and Host ID 24 7Location of the Division Between Network ID and Host ID 24 8IP Addressing Categories and IP Address Adjuncts 24 9

    Conventional (Classful) Addressing 25 0Subnetted Classful Addressing 25 0Classless Addressing 25 0Subnet Mask and Default Ga tewa y 25 1Number of IP Addresses and Multihom ing 25 1IPAddress Mana geme nt and Assignment Methods and Authorities 25 2

    1 7 Classful Conventional) A ddressing 2 55IP Classful Addressing Ove rview and Address Classes 25 6

    IP Address Classes .-.-.. 256Rationale for Classful Addressing 257IP Classful Addressing Netw ork and Host Identification an d Address Ranges 25 8

    Classful Addressing Class Determination Algorithm 25 8Determining Address Class from the First Octe t Bit Pattern 26 0IPAddress Class A , B, and C Netwo rk and Host Capacities 26 2IPAddresses with Special Meanings 26 3IP Reserved, Private, and Loopback Addresses 26 5

    Reserved Addresses 26 5Private, Unregistered, Non routable Addresses 26 5Loopback Addresses 26 6Reserved, Private, and Loopback Add ressing Blocks 2 6 7

    IPMulticast Addressing 26 8Multicast Address Types and Ranges 26 8Well-Know n Multicast Addresses 26 9Problems with Classful IP Addressing 26 91 8 IP S ubnet A ddressing S ubnetting) Concepts 2 73IP Subnet Addressing Overview, Mo tivation, and Advantages 27 4IP Subne tting: Three-Level Hiera rchica l IP Subnet Add ressing 27 6IP Subnet Masks, Nota tion, and Subnet Calculations 27 7Function of the Subnet Mask 27 7Subnet Mask Notation 27 8App lying the Subnet Mask: An Example 27 9Rationale for Subnet Mask Notation 28 0

    Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    14/39

    IP Default Subnet Masks for Address Classes A , B, and C 28 1IPCustom Subnet Masks 28 3Deciding How Ma ny Subnet Bits to Use 28 3Determining the Custom Subnet Mask 28 4Subtracting Two from the Number o f Hosts per Subnet and (Possibly) Subnets per Netwo rk .... 28 5IP Subnet Identifiers, Subnet Addresses, and Host Addresses 28 6Subnet Identifiers ~. 286Subnet Addresses 2 87Host Addresses W ithin Each Subnet 28 8IP Subnetting Summary Tables for Class A, Class B, and Class C Networks 28 8IPVariab le Length Subnet Mas king (VLSM) 29 2The Solution: Va riable Length Subnet Ma sking 294Multiple-Level Subnetting Using VLSM 294

    19 IP Subnetting: P ractical Subnet D esign and Address D etermination Example 2 9 7IP Subnetting Step 1: An alyzing Requirements 29 8IPSubnetting Step 2: Partitioning Netw ork Address Host Bits 299Class C Subnetting Design Example 300Class B Subnetting Design Example 30 1IPSubnetting Step 3: Determining the Custom Subnet Mask 30 2Calculating the Custom Subnet Mask 30 3Determining the Custom Subnet Mask Using Subnetting Tables 30 5IPSubnetting Step 4 : Determining Subnet Identifiers and Subnet Addresses 30 5Class C Subnet ID and Address Determination Example 30 6Class B Subnet ID and Address Determination Example 30 7Using Subnet Address Formulas to Calcu late Subnet Addresses 309IPSubnetting Step 5: Determining Host Addresses for Each Subnet 310

    Class C Host Address Determination Example 310Class B Host Address Determination Example 31 3Shortcuts for Com puting Host Addresses 31 3

    2 0 IP Classless A ddressing Classless Inter-D omain R outing CID R )/S upemetting 3 1 5IPClassless Addressing and Supernetting Overview 31 6The Ma in Problem with Classful Address ing .;. 31 6The Solution: Eliminate Address Classes 317The Many Benefits of Classless Addressing and Routing 31 7IPSupernetting: CIDR Hierarchical Addressing and Nota tion 31 9CIDR (Slash) No tation 31 9Supernetting: Subnetting the Internet 320Common Aspects of Classful and Classless Add ressing 32 1IPClassless Addressing Block Sizes and Classful Netw ork Equivalents 32 2IPCIDR Addressing Example 32 4First Level of Division 324Second Level of Division 32 7Third Level of Division 32 7

    2 1 Internet P rotocol D atagram Encapsulation and Formatting 3 2 9IP Datagram Encapsulation 330IP Datagram Gen eral Format 33 2IP Datag ram Time to Live (TTL) Field 33 5IP Datagram Type of Service (TOS) Field 33 5IP Datagram Options and Option Format 33 6

    Contents in Detail XIX

  • 8/14/2019 Tcp Ip guilde

    15/39

    2 2 IP D atagram S ize, F ragmentation, and R eassembly 3 3 9IP Datagram Size, MTU , and Fragmentation Overview 34 0IP Datagram Size and the Underlying Netwo rk Frame Size 34 0MTU and Datagram Fragmentation 34 1Multiple-Stage Fragmentation 34 2Internet Minimum MT U: 5 7 6 Bytes 34 3MTU Path Discovery 34 3IP Message Fragmentation Process 344The IP Fragmentation Process 3 4 4Fragmentation-Related IP Datagram Header Fields 3 4 6IP Message Reassembly 3 4 7

    2 3 IP R outing and M ulticasting 3 51IP Datagram Delivery 35 2Direct Datagram Delivery 35 3Indirect Datagram Delivery (Routing) 35 3The Relationship Between Datagram Routing and Addressing 35 4IP Routing Concepts and the Process of Next-Hop Routing 35 5IP Routes and Routing Tables 3 5 7IP Routing in a Subnet or Classless Addressing (CIDR) Environment 359IP Multicasting 36 0Multicast Addressing 36 1Multicast Group Management 36 1Multicast Datagram Processing and Routing 36 1

    P A R T 11 -4 IN T E R N E T P R O T O CO L V E R S I O N 6 I P V 6 ) 3 6 3

    2 4 IPv6 O verview, Changes, and T ransition 3 65IPv6 Motivation and Overview 36 6IPv6 Standards 3 66

    Design Goals of IPv6 3 6 7Ma jor Changes and Additions in IPv6 36 8Transition from IPv4 to IPv6 3 7 0IPv4 to IPv6 Transition: Differences of Op inion 3 7 0IPv4 to IPv6 Transition Methods 37 1

    2 5 IPv6 A ddressing 3 73IPv6 Addressing Overview : Addressing Mo del, Address Types, and Address Size 37 4IPv6 Addressing Mo del Characteristics 37 4IPv6 Supported Address Types 37 5IPv6 Address Size and Address Space 37 6IPv6 Address and Address No tation and Prefix Representation 37 8IPv6 Address Hexadecimal Notation 37 8Zero Compression in IPv6 Addresses 37 9IPv6 Mix ed Notation 38 0IPv6 Address Prefix Length Representation 38 1IPv6 Address Space Alloca tion 38 1IPv6 G lob al Unicast Address Format 38 3Rationale for a Structured Unicast Address Block 38 3Gene ric Division of the Unicast Address Space 3 8 4

    XX Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    16/39

    IPv6 Implementation of the Unicast Address Space 384Original Divisionof the Glob al Routing Prefix: Aggregators 385A Sample Division of theGlobal Routing Prefix into Levels 386IPv6 Interface Identifiers and Physical Address Mapping 388IPv6 Spe cial Addresses: Reserved, Private, Uns pecified, andLoopback 389Special Address Types 390IPv6 Private Addresses Type Scopes 391IPv6/IPv4 Address Embedding 392IPv6 MulticastandAnycast Addressing 394IPv6 Multicast Addresses 394IPv6 A nycast Addresses 398IPv6 A utocon figuration andRenumbering . 398IPv6 Stateless Autoconfiguration 399IPv6 Device Renumbering 400

    26 IPv6 Datagram Encapsulation and Formatting 401IPv6 Datagram Overview andGene ral Structure 402IPv6 Datagram Main Header Format 404IPv6 Next Header Field 405Key Changes to the Main Header Between IPv4 andIPv6 406IPv6 Datagram Extension Headers 407IPv6 Header Chaining Using theNext Header Field 407Summaryof IPv6 Extension Headers 409IPv6 Routing Extension Header 410IPv6 Fragment Extension Header 411IPv6 Extension Header Order 411IPv6 Datagram Options 412

    2 7 IP v6 D atagram S ize, F ragmentat ion, R eassembly,andR outing 415Overviewof IPv6 Datagram Sizing andFragm entation 416Implications of IPv6's Source-Only Fragmentation Rule 417The IPv6 Fragmentation Process 418IPv6 Datagram Delivery andRouting 420

    PART 11-5 IP-RELATED FEATURE PROTOCOLS 423

    28 IP Network Address Translation NAT) Protocol 425IP NATOverview 426Advantages of IP NAT . . 428Disadvantagesof IP NAT 429IP NATAddress Terminology 430IP NATStaticandDynamic Address Mappings 433Static Mappings 433Dynamic Mappings 433Choosing Between Static andDynamic M apping 433IP NATUnidirectional (Traditional/Outbo und) Op eration 434IP NATBidirectional (Two-Wa y/Inbound) Ope ration 437IP NATPort-Based (O verloaded) Op eratio n 439IP NATOverlapping/Twice NATO peration 442IP NATCompatibility Issues andSpecial Handling Requirements 445

    Contents in Detail XXI

  • 8/14/2019 Tcp Ip guilde

    17/39

    2 9 IP S ecurity IPsec) Protocols 4 4 9IPsec Ov ervie w, History, and Standards 4 5 0Ov erv iew of IPsec Services and Functions 45 1IPsec Standards 45 1IPsec Gen eral Operatio n, Com ponents, and Protocols 45 2IPsec Core Protocols 45 3IPsec Support Components 4 5 3IPsec Architectures and Implementation Methods 4 5 4Integrated Architecture 4 5 5Bump in the Stack (BITS) Architec ture 455

    Bump in the W ire (BITVV) Architec ture 4 5 6IPsec Mo des: Transport and Tunnel : 4 5 7Transport Mode 45 7Tunnel Mode 45 7Com paring Transport and Tunnel Modes 4 5 7IPsec Security Constructs 4 6 0Security Policies, Security Associations, and Associated Databases 4 6 0Selectors 461Security Association Triples and Security Parameter Index (SPI) 461IPsec Authentication Header (AH) 46 1AH Datagram Placement and Linking 4 6 2AH Format 46 5IPsec Encapsulating Security Pay load (ESP) 4 6 6ESP Fields 4 6 6

    ESPOperations and Field Use 4 6 7ESP Format 4 7 0IPsec Internet Key Exchange (IKE) 4 71IKE Overview 4 72IKE Opera tion 47 2

    3 0 Internet P rotocol M obility S upport M obile IP) 47 5Mo bile IP Ove rview, History, and Motivation 47 6The Problem with Mo bile Nodes in TCP/IP 4 7 6The Solution: Mo bile IP 47 8Limitations of M ob ile IP 4 7 9Mobile IPConcepts and General Opera tion 4 8 0M ob ile IP Device Roles 48 1M ob ile IP Functions 48 2Mobile IPAddressing: Home and Care-Of Addresses 48 3Foreign Agent Care-Of Address 4 8 4Co-Located Care-O f Address 48 5Advantage s an d Disadvantages of the Care-O f Address Types 4 8 5Mobile IPAgen t Discovery 48 6Agent Discovery Process 4 8 6

    Agent Advertisement and Age nt Solicitation Messages 4 8 7Mo bile IP Home Age nt Registration and Registration Messages 49 1M ob ile No de Registration Events 4 91Registration Request and Registration Reply Messages 491Registration Process 4 9 2Registration Request Message Format 4 93Registration Reply Message Format 4 9 5Mo bile IP Data Encapsulation an d Tunneling 49 5Mo bile IP Conve ntional Tunneling 4 9 6M ob ile IP Reverse Tunneling 4 9 8Mo bile IP an d TCP/IP Address Resolution Protocol (ARP) Op eration 49 8

    XXi Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    18/39

    Mo bile IP Efficiency Issues 5 0 0Mo bile IP Security Considerations 50 3

    P A R T 1 1-6 IP S U P P O R T P R O T O CO L S 5 05

    3 1 ICM P Concepts and G eneral O peration 50 7ICMP Ov erview , History, Versions, and Standards 50 8ICMP General Ope ration 51 0

    The ICMP Message-Passing Service 5 1 0ICMP Error Reporting Limited to the Datagram Source 51 1ICMP Message Classes, Types, and Codes 51 2ICMP Message Classes 51 2ICMP Message Types 51 2ICMP Message Codes 51 3ICMP Message Class and Type Summary 51 3ICMP Message Crea tion an d Processing Conventions an d Rules 51 5Limitations on ICMP Message Responses 51 6ICMP Message Processing Conventions .. .. 51 7ICMP Common Message Format and Data Encapsulation 51 8ICMP Common Message Format 51 8Origin al Datagram Inclusion in ICMP Error Messages 5 19ICMP Data Encapsulation 5 20

    3 2 ICM F V 4 E r ror M essage Types and Formats 52 1ICMPv4 Destination Unreacha ble Messages 5 22ICMPv4 Destination Unreac hable Message Format 52 2ICMFV4 Destination Unreacha ble Message Subtypes 52 3Interpretation of Destination Unreachable Messages 5 24ICMPv4 Source Quenc h Messages 52 5ICMFV4 Source Quench Message Format 52 6Problems with Source Quench Messages 52 6ICMPv4 Time Exceeded Messages 5 2 7ICMFV4 Time Exceeded Message Format 52 8App lications of Time Exceeded Messages 52 9ICMPv4 Redirect Messages 5 3 0ICMFV4 Redirect Message Format 5 30Redirect Message Interpretation Codes 53 2

    Limitations of Redirect Messages 53 2ICMFV4 Parameter Problem Messages 53 3ICMFV4 Parameter Problem Message Format 53 3Parameter Problem Message Interpretation Codes and the Pointer Field 5 34

    3 3 ICM P v4 Informational M essage T ypes and Formats 53 5ICMPv4 Echo (Request) an d Echo Reply Messages 5 3 6ICMFV4 Echo and Echo Reply Message Format 53 6App lication of Echo and Echo Reply Messages 5 3 7ICMPv4 Timestamp (Request) and Timestamp Reply Messages 5 37ICMFV4 Timestamp and Timestamp Reply Message Format 53 8Issues Using Timestamp and Timestamp Reply Messages 53 9ICMPv4 Router Advertisemen t and Router So licitation Messages 539The Router Discovery Process 5 4 0ICMFV4 Router Advertisement Message Format 5 40

    Contents in Detail XX ifi

  • 8/14/2019 Tcp Ip guilde

    19/39

    ICMFV4 Router Solicitation Message Format 5 42Address ing and Use of Router Advertisement and Router Solicitation Messages 5 42ICMPv4 Address Mask Request an d Reply Messages 54 3ICMPv4 Address Mask Request and Address Mask Reply Message Format 543Use of Address Mask Request and Address Mask Reply Messages 5 44ICMPv4 Traceroute Messages 5 4 4ICMFV4 Traceroute Message Format 545Use of Traceroute Messages 5 46

    3 4 ICMPv6 Error Message TypesandFormats 5 4 7ICMPv6 Destination Unreachable Messages 54 8ICMPv6 Destination Unreachable Message Format 54 8ICMPv6 Destination Unreachable Message Subtypes 5 49Processing of Destination Unreachable Messages 550ICMPv6 Packet Too Big Messages 5 5 0ICMFV6 Packet Too Big Message Format 5 5 0App lications of Packet Too Big Messages 551ICMPv6 Time Exceeded Messages 552ICMFV6 Time Exceeded Message Format 55 3Applications of Time Exceeded Messages 5 5 4ICMPvo Parameter Problem Messages 5 5 4ICMFV6 Parameter Problem Message Format 55 5Parameter Problem Message Interpretation Codes and the Pointer Field 55 5

    3 5 ICMPvo Informational Message TypesandFormats 5 5 7ICMFV6 Echo Request and Echo Reply Messages 5 58ICMPv6 Echo and Echo Reply Message Format 55 8Application of Echo and Echo Reply Messages 55 9ICMFV6 Router Advertisement and Router Solicitation Messages 5 6 0ICMPv6 Router Advertisement Message Format 5 6 0ICMPv6 Router Solicitation Message Format 562Addressing of Router Advertisement and Router Solicitation Messages 562ICMPv6 Neighb or Advertisement and Neigh bor Solicitation Messages 56 3ICMPv6 Neigh bor Advertisement Message Format 56 3ICMPv6 Neighb or Solicitation Message Format 5 6 4Addressing of Neigh bor Advertisement and Neig hbo r Solicitation Messages 56 5ICMPv6 Redirect Messages 5 66ICMPv6 Redirect Message Format 5 6 6App lication of Redirect Messages 5 68ICMPv6 Router Renumbering Messages 5 6 8IPv6 Router Renumbering 5 68ICMPv6 Router Renumbering Message Format 5 6 9Addressing of Router Renumbering Messages 571ICMPv6 Informational Message Options 57 1

    Source Link-Layer Address Optio n Format 571Target Link-Layer Address Op tion Format 57 2Prefix Information Optio n Format 572Redirected Header Op tion Format 57 3MTU Option Format 57 4

    3 6 IP v6 N eighbor D iscovery N D ) P rotocol 575IPv6 ND Overview 57 6Formalizing Local Network Functions: The Neigh bor Concept 57 7Neig hbo r Discovery Standards 57 7XX iv Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    20/39

    IPv6 ND General Operational Overview 57 8Host-Router Discovery Functions 579Host-Host Com munication Functions 57 9Redirect Function 579Relationships Between Functions 580ICMFV6 Messages Used by ND 58 0IPv6 ND Functions Co mp ared to Equivalent IPv4 Functions 5 8 0IPv6 ND Host-Router Discovery Functions 58 2Host-Router Discovery Functions Performed by Routers 582Host-Router Discovery Functions Performed by Hosts 58 3

    IPv6 ND Host-Host Com munication Functions 58 3Next-Hop Determination 58 4Address Resolution 584Updating Neighbors Using Neighbo r Advertisement Messages 58 5Neigh bor Unreacha bility Detection and the Ne ighbor Cache 58 5Duplicate Address Detection 58 6IPv6 ND Redirect Function 586

    PA RT 11 -7 T C P / IP R O U T I N G P R O T O CO L S G A T E W A Y P R O T O C O L S ) 58 93 7 O verview of Key R outing P rotocol Concepts 591Routing Protocol Architec tures 59 1Core Architecture , 59 2Autonomous System (AS) Architecture 59 2Mode rn Protocol Types: Interior and Exterior Routing Protocols 59 3Routing Protocol Algorithms and Metrics 5 94Distance-Vector (Bellman-Ford) Routing Protocol Algo rithm 5 9 4Link-State (Shortest-Path First) Routing Protocol Alg orithm 595Hybrid Routing Protocol Algorithms 59 5Static and Dynamic Routing Protocols 5 953 8 R outing Information P rotocol R IP , R IP -2 , and R IPng) 59 7RIPOverview 59 8RIP Stand ardization 59 8RIP Operational Overview , Advantages, and Limitations 59 9Development ofRIPVersion 2 (RIP-2) an d RIPng for IPv6 6 0 0RIP Route Determination Algorithm and Metric 60 0RIP Routing Informa tion and Route Distance Me tric 6 00RIP Route Dete rmination Algo rithm 60 1RIP Route Determination and Information Propaga tion 60 1Default Routes 60 4RIPGeneral Op eration, Mess aging, and Timers 60 4

    RIPMessages and Basic Message Types 6 0 4RIP Update Mes saging and the 30-Second Timer 60 5Preventing Stale Information: The Timeout Timer 60 5Removing Stale Information: The Ga rbage-C ollection Timer 60 6Triggered Updates 60 6RIP Problems and Some Resolutions 606Issues with RIP's Algorith m 6 0 7Issues with RIP's Me tric 6 1 0RIP Special Features for ResolvingRIPAlgorithm Problems 61 0

    RIPVersion-Specific Message Formats an d Features 6 14RIPVersion 1 (RIP-1) Message Format an d Features 61 4RIP Version 2 (RIP-2) Message Format an d Features 617RIPng (RIPv6) Message Format and Features 62 0

    Contents in Detail XXV

  • 8/14/2019 Tcp Ip guilde

    21/39

    3 9 O pen S hortest P ath First O SP F) 62 5OSPF Overview 62 6Development and Standardization of OSPF 62 6Overview of OSPF Operation 62 7

    OSPF Features and Drawb acks 6 2 7OSPF Basic Topology an d the Link-State Database (LSDB) 6 28OSPF Basic Top ology 62 8LSDB Information Storage and Propagation 6 2 9OSPF Hierarchical Topology .< 6 3 0OSPF Areas 63 0Router Roles in OSPF Hierarc hical Topo logy 63 1OSPF Route De termina tion Using SPF Trees 633The SPF Tree 633OSPF Route Determination 6 3 4OSPF General Op eration 63 7OSPF Message Types 6 38OSPF Messaging 63 8OSPF Message Authentication 63 9OSPF Message Formats 6 3 9OSPF Common Header Format .. 63 9OSPF Hello Message Format 64 1OSPF Database Description Message Format 64 1OSPF Link State Request Message Format 643OSPF Link State Upd ate Message Format 64 3OSPF Link State Ackn owled gme nt Message Format 6 4 4OSPF Link State Advertisements and the LSA Header Format 6 4 4

    40 Border G ateway P rotocol BG P /BG P -4) 64 7BGP Overview 64 8BGP Versions and Defining Standards 6 49Ov erview of BGP Functions and Features 6 5 0BGP Topology 65 1

    BGP Speakers, Router Roles, Ne ighb ors , and Peers 65 2BGP AS Types, Traffic Flows, and Routing Policies 65 3BGP Route Storage and Advertisement 6 5 6BGP Route Information Man agem ent Functions 6 56BGP Routing Inform ation Bases (RIBs) 6 5 6BGP Path Attributes and Algorithm Overview 6 5 7BGP Path Attribute Classes 65 8BGP Path Attribute Characteristics 6 59BGP Route Determination and the BGP Decision Process 6 59BGP Decision Process Phases 6 6 0Criteria for Assigning Preferences to Routes 6 6 0Limitations on BGP's Ab ility to Select Efficient Routes 66 1Orig inating New Routes and W ithdr aw ing Unreachable Routes 66 1BGP General Ope ration and Messaging 66 2Speaker Designation and Conn ection Establishment 66 2Route Information Exchange 66 2Connectivity Maintenance 66 3Error Reporting 66 3BGP Detailed Mes saging, Op eration , and Message Formats 66 3BGP Message Generation and Transport 66 3BGP General Message Format 66 4BGP Connection Establishment: Op en Messages 66 6BGP Route Information Exchange: Update Messages 6 6 7BGP Connectivity Maintenance : Keepalive Messages 67 2BGP Error Repo rting: No tificatio n Messages 67 3

    XXV i Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    22/39

    41 O ther R outing P rotocols 67 7TCP/IP Gatew ay-to-Gatew ay Protocol (GGP) 67 8The HELLO Protocol (HELLO) 679Interior Ga tew ay Routing Protocol (IGRP) 68 1Enhanced Interior Gate way Routing Protocol (EIGRP) 68 2TCP/IP Exterior Gate wa y Protocol (EGP) 684

    P A RT 11 -8 T C P / IP T R A N S P O R T L A Y ER P R O T O CO L S 6 8 7

    42 O verview and Comparison ofT Pand UDP 689Two Protocols for TCP/IP Transport Layer Requirements 6 90Applications of TCP and UDP 69 1TCP Applications 691UDP Applications 69 2Summary Com parison of UDP and TCP 69 2

    43 TCP and U D P A ddressing: Ports and Sockets 69 5TCP/IP Processes, M ultiple xing , and Client/S erver Ap plica tion Roles 69 6Multiplexing and Demultiplexing 69 6TCP/IP Client Processes and Server Processes 69 7TCP/IP Ports: TCP/UDP Address ing 69 8Mu ltiplexing and Dem ultiplexing Using Ports 69 9Source Port and Destination Port Num bers 69 9

    Summary of Port Use for Datagram Transmission and Reception 70 1TCP/IP Ap plicat ion Assignments an d Server Port Num ber Ranges 70 1Reserved Port Num bers 70 2TCP/UDP Port Num ber Ranges 70 2TCP/IP Client (Ephemeral) Ports and Client/S erver Ap plica tion Port Use 70 3Ephemeral Port Num ber Assignment 70 4Ephemeral Port Num ber Ranges 70 4Port Numb er Use During a Client/S erver Exchange 70 5TCP/IP Sockets an d Socket Pairs: Process and Conn ection Identification 7 0 6Common TCP/IP App lications and We ll-Known and Registered Port Numbers 70 7

    44 T CP/IP U ser D atagram Protocol U DP ) 71 1UDP Ove rview, History, and Standards 71 2UDP Ope ration 71 3W hat UDP Does 71 3W hat UDP Does Not Do 71 3UDP Message Format 7 1 4UDPCommon App lications and Server Port Assignments 71 6W hy Some TCP/IP Applications Use UDP 71 6Common UDP App lications and Server Port Use 7 1 7Applications That Use Both UDP and TCP 71 8

    45 T PO verview, Functions, and Characteristics 71 9TCP Ove rview, History, and Standards 72 0TCP History 7 2 0Overview of TCP Ope ration 721

    TCP Standards 72 1Contents in Detail XXVH

  • 8/14/2019 Tcp Ip guilde

    23/39

    TCP Functions 722Functions That TCP Performs 723Functions That TCP Doesn't Perform 723TCP Characteristics 7 2 4The Robustness Principle 726

    46 Transmission Control P rotocol TCP) F undamentals and G eneral O peration 72 7TCP Data Handling and Processing 72 8Increasing the Flexibility of App lication Data Han dling: TCP's Stream Orientation 72 8

    TCP Data Packa ging: Segments 72 8TCP Data Identification: Sequence Numbers 729The Nee d for App lication Data Delimiting 73 1TCP Sliding W ind ow Acknowledgm ent System 73 1The Problem with Unreliab le Protocols: Lack of Feedback 732Providing Basic Reliability Using Positive Acknowledgmen t with Retransmission (PAR) 73 2Improving PAR 73 4TCP's Stream-Oriented Sliding W ind ow Acknowledgment System 73 4More Information on TCP Sliding Win dows 7 4 0TCP Ports, Connections, and Connection Identification 741TCP Common App lications and Server Port Assignments 74 2

    4 7 TCP Basic O peration: Connection E stablishment, M anag eme nt, and T ermination 7 4 5TCP Op eration al Overview and the TCP Finite State Ma chine (FSM) 7 4 6Basic FSM Concepts 7 4 6The Simplified TCP FSM 7 4 7TCP Connection Preparation 7 5 0Storing Connection Data: The Transmission Con trol Block (TCB) 75 1Active and Passive Opens 75 1Preparation for Connection 7 52TCP Connection Establishment Process: The Three-Way Handshake 75 2Connec tion Establishment Functions 75 2Control Messages Used for Connection Establishment: SYN and ACK 75 3Norm al Conn ection Establishment: The Three-Way Handshake 75 3Simultaneous Open Connection Establishment 75 5TCP Connection Establishment Sequence Number Synchronization and Parameter Exchange 75 7Initial Sequence Number Selection 7 5 7TCP Sequence Number Synchronization 75 8

    TCP Parameter Exchange 759TCP Connection Manag ement and Problem Handling 7 6 0The TCP Reset Function 7 6 0Handling Reset Segments 761Idle Connection Managem ent and Keepalive Messages 76 1TCP Connection Termination 76 2Requirements and Issues In Connection Termination 76 2Norm al Connection Termination 76 3The TIME-WAIT State 765Simultaneous Connec tion Termination 766

    48 T PM essage Formatting and D ata T ransfer 76 9TCP Message (Segment) Format 7 7 0TCP Checksum Calcu lation and the TCP Pseudo Header 77 4Detecting Transmission Errors Using Checksums 7 7 4Increasing the Scope of Defected Errors: The TCP Pseudo Header 77 4Advantages of the Pseudo Header Meth od 7 76XXViH Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    24/39

    TCPMaximum Segment Size (MSS)MSS Selection 778TCP Default MSS 778Nondefault MSS Value Specification 779TCP Sliding Win do w Data Transfer and A cknowledgment Mechanics 78Sliding Window Transmit and Receive Categories 78Send (SND) and Receive (RCV) Pointers 781TCP Segment Fields Used to Exchange Pointer Information 783An Example ofTCPSliding Window Mechanics 784Real-World-Complications of the Sliding Window Mechanism 789TCP Immediate D ata Transfer: Push Function 79TCP Priority Data Transfer: Urgent Function 791

    49 TCP R eliability and F low Control F eatures 793TCP Segment Retransmission Timers and the Retransmission Queue 794M ana ging Retransmissions U sing the Retransmission Q ueue 794

    Recognizing When a Segment Is Fully Acknowledged 795TCP Noncontiguous Acknowledgment Handling and Selective Acknowledgment (SACK) 798Policies for Dealing with Outstanding Unacknowledged Segments 799A Better Solution: Selective Acknowledgment (SACK) 8 1TCP Adaptive Retransmission and Retransmission Timer Calculations 8 3Adaptive Retransmission Based on RTTCalculations 8 3Acknowledgment Ambiguity 8 4Refinements to RTT Calculation and Karn's Algorithm 8 4TCP W indo w Size Adjustment and Flow Control 8 5Reducing Send W in do w Size to Reduce the Rate Data Is Sent 8 6Reducing Send W ind ow Size to Stop the Sending of N ew Data 8 8Closing the Send Window 8 8TCP Window Management Issues 8 9Problems Associated with Shrinking the TCP Window 8 9Reducing Buffer Size Without Shrinking the Window 81Handling a Closed Window and Sending Probe Segments 811TCP Silly Window Syndrome 812How Silly Window Syndrome Occurs 812Silly Window Syndrome Avoidance Algorithms 815TCP C ongestion Handling and C ongestion A voidance Algorithms 816

    Congestion Considerations 816TCP Congestion-Handling Mechanisms 817

    SECTION IIITCP/IP APPLICATION LAYER PROTOCOLS

    PA RT I l l - l N A M E S Y S TE M S A N D T C P / I P N A M E R E G IS T R A T I O NA N D N A M E R E S O L U T IO N 823

    50 N ame S ystem Issues, Concepts, and Techniques 825Name System Overview 826Symbolic Names for Addressing 826A Paradox: Nam e Systems Are Both Essential and Unnecessary 826Factors That Determine the Necessity of a Na me System 828Basic Name System Functions: Name Space, Name Registration, and Name Resolution 829

    Contents in Detail XXIX

  • 8/14/2019 Tcp Ip guilde

    25/39

    Name Spaces and Nam e Architectures 83 1Name Space Functions 83 1Flat Name Architecture (Flat Nam e Space) 83 2Hierarch ical Name Architecture (Structured Na me Space) 83 2Com paring Nam e Architectures 83 3Nam e Registration Method s, Adm inistration, and Authorities 8 34Nam e Registration Functions 83 4Hierarchical Nam e Registration 83 5Name Registration Methods 83 5Nam e Resolution Techniques an d Elements 836Nam e Resolution Methods 83 7Clien t/Serve r Nam e Resolution Functional Elements 83 8Efficiency, Reliability, and Other Nam e Resolution Considerations 83 8Efficiency Considerations 83 9Reliability Considerations 83 9Other Considerations 84 0

    5 1 TCP/IP Name Systems Overview and theHost Table Name System 8 4 1A Brief History of TCP/IP Host Names an d Nam e Systems 84 2Developing the First Nam e System: ARPAnet Host Nam e Lists 842Storing Host Names in a Host Table File 842Outgro wing the Host Table Name System and Mov ing to DNS 843The TCP/IP Host Table Nam e System 843Host Table Nam e Resolution 84 4Host Table Name Registration 84 4Weaknesses of the Host Table Na me System 84 5Use of the Host Table Nam e System in Mo dern Netwo rking 84 6

    5 2 Domain Name System D N S ) Overview,Functions,an dCharacteristics 8 4 7DNS Ove rview, History, and Standards 84 8Early DNS Development and the Mo ve to Hierarchical Domains 84 8

    Standardization of DNS an d Initial Defining Standards 84 9DNS Evolution and Important Add itiona l Standards 85 0DNS Adapta tion for Internet Protocol Version 6 85 0DNS Design Goals, Objectives, and Assumptions 851DNS Design Goals and Objectives 851DNS Design Assumptions 85 2DNS Components and General Functions 85 3DNS Name Space 85 4Nam e Registration (Including Adm inistration an d Authorities) 8 5 4Nam e Resolution 8 54

    5 3 D N S NameSpace, Architecture,and Terminology 8 5 7DNS Domains and the DNS Hierarchical Nam e Architecture 85 8The Essential Concept in the DNS Nam e Space : Domains 85 8The DNS Hierarchical Tree Structure of Names 85 8DNS Structural Elements and Terminology 86 0

    DNS Tree-Related Terminology 86 0DNS Domain-Related Terminology 8 6 0DNS Family-Related Terminology 86 1DNS Labels, Nam es, and Syntax Rules 86 3DNS Labels and Label Syntax Rules 86 3Domain Name Construction 86 4

    XXX Contents in Delail

  • 8/14/2019 Tcp Ip guilde

    26/39

    Absolute (Fully Qu alified) and Relative (Partially Qu alified) Domain Nam e Specifications 86 5Fully Qu alified Domain Names 86 5Partially Qua lified Domain Names 86 6

    54 D N S N am e R egistrat ion, P ublic A dministration, Zones, and A uthor it ies 86 7DNS Hierarch ical Authority Structure and the Distributed Na me Database 86 8The DNS Root Dom ain Central Autho rity 86 8TLD Authorities 86 9Lower-Level Autho rity Delegation 86 9Authority Hierarchy's Relationship to the Na me Hierarchy 86 9The DNS Distributed Na me Database 86 9DNS Org anizationa l (Generic) TLDs an d Authorities 87 0Or igina l Gene ric TLDs 87 0Ne w Generic TLDs 871DNS Ge opolitical (Country Code) TLDs and Authorities 87 4Country Cod e Designations 87 4Country Cod e TLD Authorities 87 5

    Leasing/Sale of Country Code Domains 87 5Drawbacks of the Ge opo litical TLDs 87 6Public Registration for Second-Level and Lower Dom ains 87 6Registration Authority 8 77Registration Co ordin ation 87 8DNS Public Registration Disputes and Dispute Resolution 87 8Public Registration Disputes 87 8Methods of Registration Dispute Resolution 88 0The Uniform Domain Na me Dispute Resolution Policy 88 0DNS Nam e Space Adm inistrative Hierarchy Partitioning: DNS Zones of Autho rity 881Methods of Dividing a Nam e Space into Zones of Authority 88 2The Impact of Zones on Nam e Resolution: Authoritative Servers 88 2DNS Private Na me Registration 88 4Using Publicly Accessible Private Names 8 84Using Private Nam es for Internal Use 88 5Using Private Names on Netw orks No t Connected to the Internet 88 5

    55 D N S N am e S erver Concepts and O perat ion 88 7DNS General Ope ration 888

    DNS Na me Server Architecture and the Distributed Na me Database 88 8DNS Server Support Functions 88 9The Logical Nature of the DNS Nam e Server Hierarchy 89 0DNS Nam e Server Data Storage 89 0Binary and Text Representations of Resource Records 89 0Use of RRsand Mas ter Files 89 1CommonRRTypes 89 2

    RRClasses 89 3DNS Nam e Server Types and Roles 89 3Master (Primary)/Slave (Secondary) Servers 89 3Nam e Server Roles 89 5Cach ing-Only Nam e Servers 89 5DNS Zone Management, Contacts, and Zone Transfers 895Domain Contacts 89 6Zone Transfers 89 6DNS Root Nam e Servers 89 9Root Nam e Server Redundancy 89 9Current Root Nam e Servers 90 0

    Contents in Detail XXXJ

  • 8/14/2019 Tcp Ip guilde

    27/39

    DNS Name Server Caching 901Name Server Caching 90 2Ca chin g Data Persistence and the Time to Live Interval 90 2Negative Caching 90 4DNS Nam e Server Load Balancing 90 4Using Mu ltiple Address Records to Sprea d Ou t Requests to a Domain 9 04Using Mu ltiple DNS Servers to Spread Ou t DNS Requests 90 5DNS Na me Server Enhancements 90 5Automating Zone Transfers: DNS Notify 90 6Improving Zone Transfer Efficiency: Incremental Transfers 9 0 7Dealing with Dynamic IP Addresses: DNS Upd ate/Dyna mic DNS 90 7

    56 D N S R esolution Concepts and R esolver O perations 90 9DNS Resolver Functions and Gen eral Op eratio n 91 0Nam e Resolution Services 91 0

    Functions Performed by Nam e Resolvers 91 0DNS Na me Resolution Techniques: Iterative an d Recursive Resolution 91 1Iterative Resolution 912Recursive Resolution 91 3Contras ting Iterative and Recursive Resolution 91 3DNS Na me Resolution Efficiency Improvements: Ca chin g and Local Resolution 91 5The Mo tivation for Ca chin g: Locality of Reference 91 5Nam e Resolver Caching 91 6Local Resolution 91 6DNS Na me Resolution Process 91 7A Simple Example of DNS Nam e Resolution 9 1 7Changes to Resolution to Hand le Aliases (CN AM E Records) 92 0

    DNS Reverse Na me Resolution Using the IN-ADDR.ARPA Domain 92 0The Orig inal Me thod: Inverse Query ing 921The IN-ADDR.ARPA Na me Structure for Reverse Resolution 92 1RR Setup for Reverse Resolution 922DNS Electronic M ai l Support and M ai l Exchange (MX) Resource Records 92 4Spec ial Requirements for Email Nam e Resolution 9 2 4The Mail Exchange (MX) Record and Its Use 92 5

    5 7 D N S Messaginga n dMessage, Resource Record,an dMaster File Formats 9 2 7DNS Message Generation and Transport 92 8

    DNS Client/Server Messaging Overview 92 8DNS Message Transport Using UDP and TCP 92 9DNS Message Processing and General Message Format 93 0DNS Message Header Format 93 2DNS Question Section Format 93 5DNS Message Resource Record Field Formats 93 5DNS Comm on RR Format 93 6RData Field Formats for Common RRs 93 6DNS Nam e Notation and Message Compression 94 0Standard DNS Name Notation 94 0DNS Electronic M ai l Address Notation 94 1DNS Message Compression 94 1DNS Master File Format 94 3DNS Comm on Master File Record Format 94 4Use and Interpretation of Partially Qu alified Domain Names (PQDNs) 94 4Mas ter File Directives 94 5Syntax Rules for Mas ter Files 94 5SpecificRR Syntax and Examples 94 6Sample Master File 94 8

    XXXK Contents in Deta il

  • 8/14/2019 Tcp Ip guilde

    28/39

    DNS Changes to Support IPv6 94 8IPv6 DNS Extensions 949Proposed Changes to the IPv6 DNS Extensions 94 9

    PA RT I I 1 -2 N E T W O R K F IL E A N D R E S O U R CE S H A R I N G P R O T O C O L S 9 51

    58 N etwork F ile and R esource S haring and the T CP /IP N etwork F ile System N FS ) 95 3File and Resource Sharing Concepts and Components 9 5 4

    The Power of File an d Resource Sharing Protocols 9 54Components of a File and Resource Sharing Protocol 95 4NFS Design Go als, Versions, and Standards 95 5NFS Design Goals 95 5NFS Versions and Standards 9 56NFS Architecture and Components 95 7NFS Ma in Components 95 7Other Important NFS Functions 95 8NFS Data De finition wi th the External Data Representation (XDR) Standard 9 59A Metho d of Universal Data Exchange: XDR 95 9XDR Data Types 9 6 0NFS Client/Se rver Op eratio n Using Remote Procedure Calls (RPCs) 96 1

    RPC Op eratio n and Transport Protocol Usage 96 2Client and Server Responsibilities in NFS 96 3Client and Server Cach ing 963NFS Server Procedures and Ope rations 96 4NFS Version 2 and Version 3 Server Procedures 96 4NFS Version 4 Server Procedures and Ope rations 9 66NFS File System M od el and the Mou nt Protocol 96 8The NFS File System Mo del 96 8The Mount Protocol 96 8

    PART 111-3 H O S T C O N F I G U R A T I O N A N D T C P / I P H O S TC O N F I G U R A T I O N P R O T O CO L S 971

    59 H ost Configuration Concepts, Issues, and M otivation 97 3The Purpose of Host Con figuration 97 3The Problems with Man ual Host Configuration 97 4Automating the Process: Host Co nfigu ration Protocols 975The Role of Host Co nfigura tion Protocols in TCP/IP 975

    60 T CP /IP Bootstrap P rotocol BOO TP ) 9 7 7BOOTP Ov erview, History, and Standards 97 8BOOTP: Correcting the Weaknesses of RARP 97 8Vendor-Specific Parameters 979Changes to BOOTP and the Development of DHCP 9 80BOOTP Client/Server Messaging and Addressing 98 0BOOTP Messaging and Transport 98 1

    BOOTP Use of Broadcasts and Ports 98 1Retransmission of Lost Messages 982BOOTP Detailed Op eration 98 3BOOTP Bootstrapping Procedure 98 3Interpretation of the Client IP Address (ClAddr) Field 98 4BOOTP Message Format 98 5Contents in D etail XXXM J

  • 8/14/2019 Tcp Ip guilde

    29/39

    BOOTP Vendor-Specific Area and Vendor Information Extensions 9 88BOOTP Vendor Information Extensions 9 8 9BOOTP Vendor Information Fields 9 9 0BOOTP Relay Agents (Forwa rding Agents) 9 91The Function of BOOTP Relay Agents 99 2Norm al BOOTP Ope ration Using a Relay Agent 99 3Relaying BOOTP Requests Using Broadcasts 9 9 4

    6 1 DHCP Overviewan dAddress Allocation Concepts 9 9 7DHCP Ove rview, History, and Standards 99 8DHCP: Building on BOOTP's Strengths 9 9 9Ove rview of DHCP Features 9 9 9DHCP Address Assignment and Allocation Mechanisms 100 0DHCP Address Allocation 10 00DHCP Man ual Allocation 1001DHCP Dynamic Allocation 1001DHCP Automatic Allocation 100 2DHCP Leases 1003DHCP Lease Length Policy 10 03Issues with Infinite Leases 10 05DHCP Lease Life Cyc le and Lease Timers 10 05DHCP Lease Life Cycle Phases 10 06Renewal and Rebinding Timers 100 8DHCP Lease Address Pools, Ranges, and Address Man agem ent 10 08

    Address Pool Size Selection 10 09Lease Address Ranges (Scopes) 10 09Other Issues with Address Man agem ent 101 1

    6 2 DHCP Configurationa ndOperation 1 0 1 3DHCP Ov erview of Client and Server Responsibilities 10 14DHCP Server Responsibilities 10 14

    DHCP Client Responsibilities 10 15DHCP Client/S erve r Roles 10 15DHCP Relay Agents 10 16DHCP Configuration Parameters, Storage, and Comm unication 101 6Configuration Parameter Managem ent 101 6Parameter Storage 10 17Configuration Parameter Comm unication 10 17DHCP General Ope ration and the Client Finite State Mach ine 101 7DHCP Lease Alloc ation , Reallocation, and Renewal 102 1Initial Lease Allocat ion Process 1021DHCP Lease Reallocation Process 10 26DHCP Lease Renewal and Rebinding Processes 10 28DHCP Early Lease Term ination (Release) Process 10 31DHCP Parameter Con figuration Process for Clients with Non-DHCP Addresses 103 3

    6 3 DHCPMessaging,MessageTypes,andFormats 1 0 3 5DHCP Message Ge nera tion, Addre ssing, Transport, and Retransmission 10 36Message Generation and General Formatting 103 6

    Message Transport 10 36Retransmission of Lost Messages 10 37DHCP Message Format 103 8DHCP Options 1041Options and Op tion Format 104 2XXXIV Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    30/39

    Op tion Categories 1043Option Overloading 1044Summary of DHCP Op tions/BO OT P Vendor Information Fields 104 5RFC 14 97 Vendor Extensions 104 5IP Layer Parameters per Host 10 46IP Layer Parameters per Interface 10 47Link Layer Parameters per Interface 10 48TCP Parameters 1048App lication and Service Parameters 104 8DHCP Extensions 10 50

    64 D H CP Cl ient/S erver Implementation, F eatures, and IP v6 S upport 1 05 3DHCP Server and Client Implemen tation and Ma nag ement Issues 10 54DHCP Server Implementations 10 54

    DHCP Client Implementations 10 56DHCP Message Relaying and BOOTP Relay Agents 105 6BOOTP Relay Agents for DHCP 10 57DHCP Relaying Process 10 57DHCP Au toco nfiguratio n/A utom atic Private IP Add ressing (APIPA) 105 8APIPA Op eration 105 9APIPA Limitations 10 60

    DHCP Server Con flict Detection 106 1DHCP and BOOTP Interoperability 106 2BOOTP Clients Connecting to a DHCP Server 106 3DHCP Clients Conn ecting to a BOOTP Server 106 3DHCP Security Issues 1063DHCP Security Concerns 1064DHCP Authentication 10 64DHCP for IP Version 6 (DHCPv6) 1065Two Methods for Autoc onfiguration in IPv6 106 5DHCPv6 Ope ration Overview 1065DHCPv6 Message Exchanges 106 6

    P A RT 111-4 T C P / IP N E T W O R K M A N A G E M E N T F R A M E W O R K A N DP R O T O C O L S 1 0 6 7

    65 T CP/IP Internet S tandard M anagement F ramework O verview 1 069Overview and History of the TCP/IP Internet Standard M anagem ent Framework a ndSimple Netwo rk Manage ment Protocol (SNMP) 107 0Early Development of SNMP 10 70The Two Meanings of SNMP 1071Design Goals of SNMP 1071Further Development of SNMP and the Problem of SNMP Variation s 1072TCP/IP SNMP Op eratio nal Mo de l, Components, and Terminology 1072

    SNMP Device Types 107 2SNMP Entities 107 3SNMP Ope rational Mod el Summary 1073TCP/IP Internet Standa rd Manage ment Framework Architecture and Protocol Components 1075SNMP Framework Components 1075SNMP Framework Architecture 107 6

    TCP/IP Internet Standard Management Framework and SNMP Versions(SNMPvl, SNMPv2 Variants, and SNMPv3) 1076SNMPvl 1077SNMPsec 1077Contents in Detail XXXV

  • 8/14/2019 Tcp Ip guilde

    31/39

    SNMPv2 1078SNMPv2 Variants 107 8SNMPv3 1079TCP/IP Internet Standard Management Framework and SNMP Standards 10 79

    66 T CP / IP S t ructure of M anagement In formation S M I ) andM anagem ent Information Bases M IBs) 1 08 3

    TCP/IP SMI and MIBs Overview 10 84SNM P's Information-Oriented Design 10 84MIB and MIB Objects 108 5Defining MIB Objects: SMI 10 86TCP/IP MIB Objects, Object Characteristics, and Ob ject Types 108 7MIB Objec t Characteristics 10 87SMI Data Types 10 89TCP/IP MIB Object Descriptors and Identifiers and the Objec t Nam e Hierarchy 109 0Ob ject Descriptors 109 1Ob ject Identifiers 109 1Structure of the MIB Object Name Hierarchy 1092Recursive Definition of MIB Ob ject Identifiers 10 94TCP/IP MIB Modules and Ob ject Groups 109 4The Org aniza tion of MIB Objects into Object Groups 109 4MIB Modules 109 6MIB Modu le Format 109 7

    6 7 T CP / I P S imp le N e t work M a na ge me nt P r otoco l S N M P )Concepts and O perat ion 1 09 9

    SNMP Protocol Overview 110 0Early Development of SN MP vl 110 0SNMPv2 and the Division of SNMP into Protocol Operations and Transport Ma ppings 1101SNMP Comm unication Methods 1102SNMP Protocol Operations 1102SNMP PDU Classes 110 3Basic Request/Response Information Poll Using GetRequest and (Get)Response Messages .... 1104Table Traversal Using GetNextRequest and GetBulkRequest Messages 11 05Ob ject M odific ation Using SetRequest Messages 11 07Information No tification Using Trap and InformRequest Messages 11 09SNM P Protocol Security Issues and Methods 11 10Problems with SN MP vl Security 111 1SN MP v2/v 3 Security Methods 1111

    68 S N M P P rotocol M essaging and M essage Formats 1 1 1 3SNMP Protocol Message Generation 111 4SNMP Transport Mappings 1114UDP Message Size Issues 11 15Lost Transm ission Issues 11 15SNMP General Message Format 111 6The Difference Between SNMP Messages and PDUs 11 17

    General PDU Format 111 7SNMP Version 1 (SN MP vl) Message Format 111 9SN MP vl General Message Format 11 19SN MP vl PDU Formats 112 0SNM P Version 2 (SNMPv2) Message Formats 11 22SNMP Version 2 (SNMPv2p) Message Format 1123Community-Based SNMP Version 2 (SNMPv2c) Message Format 11 24

    XXXVi Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    32/39

    User-Based SNM P V ersion2 (SNMPv2u) Message Format 1124SNMPv2 PDU Formats 1126

    SNMP Version3 (SNMPv3) Message Format 1129

    69 TCP/IP Remote Network Monitoring RMON) 1133RMON Standards 1134RMON MIB Hierarchy andObject Groups 1134RMO N A larms, Events,and Statistics 11 36

    PART 111-5 TCP/IP APPLICATION LAYER ADDRESSING ANDAPPLICATION CATEGORIES 1137

    70 TCP/IP Application Layer Addressing: Uniform ResourceIdentifiers, Locators, and Names URIs, URLs, and URNs) 1139

    URI Ove rview and Standards 1140URI Categories: URLsandURNs 1141URI Standards 1142URL General Syntax 1142Common Internet Scheme Syntax 1143Omissionof URL Syntax Elements 1144URL Fragm ents 1145Unsafe Characters and Special Encodings 1145URL Schemesa nd Scheme-Specific Syntaxes 1146World Wide Web/Hypertext Transfer Protocol Syntax (http) 1146File Transfer Protocol Syntax (ftp) 1147Electronic Mail Syntax (mailto) 1147Gopher Protocol Syntax (gopher) 1148Network News/Usenet Syntax (news) 1148Network News Transfer Protocol Syntax (nttp) 1148Telnet Syntax (telnet) 1149Local File Syntax (file) 1149Special Syntax Rules 1149

    URL Relative Syntaxand Base URLs 1150Interpretation RulesforRelative URLs 1151Practical Interpretationof Relative URLs 1152URL Lengtha ndComplexity Issues 1154URL Wrapping andDelimiting 1155Explicit URL Delim iting and RedirectorsURL A bbrev iation

    URL Obscu ration, Ob fuscation, andGeneral TrickeryURNsThe Problem with URLs .Overviewof URNs

    56565659596

    URN NamespacesandSyntax 1160URN Resolutionand Implementation Difficulties ?. 1161

    71 File and Message Transfer Overview and Application Categories 1163File Concepts 1164Application Categories 1164General File Transfer Applications 1164

    Message Transfer Applications 1164The M erging of Filea ndMessage Transfer M ethods 1165

    Contents inDetail XXXVfi

  • 8/14/2019 Tcp Ip guilde

    33/39

    P A R T 111-6 T C P / IP G E N E R A L F IL E T R A N S F E R P R O T O C O L S 1 1 6 7

    72 File T ransfer P rotocol FTP) 1 1 69FTP Ov ervie w, History, and Standards 11 70FTP Development and Standa rdization 11 70Overview of FTP Opera tion 1171FTP Ope rational M od el, Protocol Components, and Key Terminology 117 2The Server-FTP Process an d User-FTP Process 11 72

    FTPControl Connection and Data Connection 117 2FTP Process Components and Terminology 117 3Server-FTP Process Com ponen ts 11 73User-FTP Process Com ponents 11 74Third-Party File Transfer (Proxy FTP) 11 74FTPControl Connection Establishment, User Authentication, and Anonymous FTPAccess 117 5FTP Login Sequence and Authen tication 11 75

    FTPSecurity Extensions 11 76Anonymous FTP 11 77FTP Data Connection Ma nagem ent 11 77No rmal (Active) Data Connections 117 8Passive Data Connections 117 8Efficiency and Security Issues Related to the Conne ction Methods 11 79FTP Gen eral Data Com mun ication an d Transmission Mo des 118 1Stream Mo de 1181Block Mo de 1182Compressed Mo de 1182FTP Data Represen tation: Data Types, Format Co ntro l, and Data Structures 11 82FTP Data Types 11 83ASCII Data Type Line-Delimiting Issues 11 84FTP Format Control 11 84FTP Data Structures 11 85FTP Internal Command Groups and Protocol Comm ands 118 5FTP Comm and Groups and Commands 118 5FTP Replies 11 88Advantages of Using Both Text and Numeric Replies 1188Reply Co de Structure a nd D igit Interpretation 1188FTPMultiple-Line Text Replies 11 92

    FTP User Interface and User Comm ands 119 3Command-Line an d Graph ical FTP Interfaces 119 3Typical FTP User Comm ands 119 4Sample FTP Session 11 96

    73 T rivial F ile T ransfer P rotocol TFTP ) 1 1 9 9TFTP Ov ervie w, History, and Standards 12 00W hyTFTPWas Needed 1200Comparing FTPan d TFTP 1201Overview ofTFTPOperation 1201TFTP Gene ral Op era tion , Connection Establishment, an d Client/S erver Com munication 1202Connection Establishment and Identification 120 3

    Lock-Step Client/S erver Mes saging 120 3Difficulties with TFTP's Simplified Mes saging Mechan ism 120 4TFTP Detailed Opera tion and Messaging 120 4Initial Message Exchange 120 4Data Block Num bering 1205TFTP Read Process Steps 12 05TFTP W rite Process Steps 12 06XXX Viii Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    34/39

    TFTPOptions and Option Negotiation 1208TFTP Op tion Ne go tiation Process 12 08TFTP Op tions 121 1TFTP Message Formats 12 11Read Request an d W rit e Request Messages 121 1Data Messages 1212Acknowledgment Messages 1213Error Messages 121 3Option Acknowledgment Messages 1214

    P A RT 111-7 T C P / I P E L E CT R O N IC M A I L S Y S T E M :CO N C E P T S A N D P R O T O CO L S 1 2 1 5

    74 T CP /IP E lectronic M ail S ystem O verview and Concepts 1 2 1 7TCP/IP Electronic M ai l System Ov ervie w and History 12 18The Early Days of Email 121 8

    History of TCP/IP Email 12 19Ove rview of the TCP/IP Email System 12 19TCP/IP Email Com munication Ove rview 122 0TCP/IP Email Message Com munication Mo del 122 2Protocol Roles in Email Com mun ication 12 24

    75 T CP / IP E lectronic M ai l A ddresses and A ddressing 1 2 2 5TCP/IP Email Add ressing and Address Resolution 12 26Standard DNS-Based Email Addresses 12 26Special Requirements of Email Addresses 12 27TCP/IP Historical and Special Email Add ressing 12 28FidoNet Addressing 122 8UUCP-Style Add ressing 12 29Addressing for Ga tewa ying 12 29TCP/IP Email Aliases and Address Books 12 30Multiple Recipient Addressing 12 30Ma iling Lists 123 1

    76 T CP / IP E lectronic M ai l M essage F ormats and M essage Processing:R FC 8 2 2 a nd M I M E 1 2 3 3

    TCP/IP Email RFC 82 2 Standard Message Format Ov erview 12 34Development of the RFC 82 2 Message Format Stand ard 12 35Overview of RFC 82 2 Messages 123 5General RFC 82 2 Message Structure 12 36TCP/IP Email RFC 82 2 Standa rd Message Format Head er Fields and Grou ps 12 37Header Field Structure 12 37Header Field Groups 123 7Common Header Field Groups and Header Fields 12 38TCP/IP Email RFC 82 2 Standa rd Message Format Processing and Interpretation 124 1

    MIME Overview 1242MIME Cap abilities 1243MIME Standards 124 4MIME Basic Structures and Headers 124 5Basic Structures 12 46MIME Entities 12 46Primary MIME Headers 12 46Additional MIME Headers 124 7

    Contents in Deta i l XXXJX

  • 8/14/2019 Tcp Ip guilde

    35/39

    MIM E Content-Type Header and Discrete M edia 124 8Content-Type Heade r Syntax 12 48Discrete Med ia Types and Subtypes 12 49MIM E Composite M edia Types: Mu ltipart and Encapsulated Message Structures 125 3MIME Multipart Message Type 1253Mu ltipart Message Encoding 12 54MIME Encapsulated Message Type 12 57MIM E Content-Transfer-Encoding Header and Encoding Methods 12 577-Bitand 8-Bit Encoding 125 8Quofed-Printable Encoding 125 8Base64 Encoding 125 8MIM E Extension for non-ASCII M ai l Message Headers 126 1

    TCP /IP E lectronic M ail D elivery P rotocol: The S imple M ail Transfer P rotocol SM TP ) 1 2 6 3SMTP Ove rview, History, and Standards 12 64SMTP Standards 12 64SMTP Comm unication and Message Transport Methods 126 5Terminology: Client/Server and Sender/Receiver 12 67SMTP Conne ction and Session Establishment and Termination 12 67

    Overview of Connection Establishment an d Termination 12 68Connection Establishment and Gree ting Exchange 12 68Conn ection Establishment Using SMTP Extensions 12 69Connection Termination 12 70SMTP M ai l Transaction Process 12 71Overv iew of SMTP M ail Transaction 1271SMTP M ai l Transaction Details 127 2

    SMTP Special Features, Ca pab ilities, and Extensions 12 74SMTP Special Features and Cap abilities 127 5SMTP Extensions 12 76SMTP Security Issues 12 77SMTP Commands 127 9SMTP Replies and Reply Codes 128 1

    Reply Cod e Structure and Digit Interpretation 128 1SMTP Multiple-Line Text Replies 12 84Enhanced Status Co de Replies 12 84

    78 T CP /IP E lectronic M ail Access and R etrieval Protocolsand M ethods 1 2 8 5TCP/IP Email Ma ilbox Access Mo del, Me thod, and Protocol Overview 1286

    Email Access and Retrieval Mo dels 12 87TCP/IP Post Offic e Protocol (POP/POP3) 12 88POP Ove rview, History, Versions, and Standards 128 8POP3 General Opera tion 129 0POP3 Session States 12 90TCP/IP Internet Message Access Protocol (IMA P/IMAP4 ) 12 97IMAP Ove rview, History, Versions, and Standards 129 8IMAP General Operation 1300IMAP Session States 13 00IMAP Com mands, Results, and Responses 13 02IMAP Not Authenticated State: User Authentication Process and Comm ands 13 06IMAP Authenticated State: Ma ilbox Ma nipulation /Selection Process and Commands 13 07IMAP Selected State: Message Manip ulatio n Process and Comm ands 13 09TCP/IP Direct Server Email Access 13 11TCP/IP W orld W ide W eb Email Access 1313

    Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    36/39

    P AR T 111-8 T C P / I P W O R L D W I D E W E B A N D T H E H Y P E R T E XTT R A N S F E R P R O T O CO L H T T P ) 1 3 1 5

    79 W orld W ide W eb and H ypertext O verview and Concepts 1 3 1 7World W ide W eb and Hypertext Overview and History 1318History of Hypertext 131 8The Wo rld W ide W eb Today .. . , 1319Wo rld W ide W eb System Concepts and Components 132 0Ma jor Functional Components of the W eb 132 0W eb Servers and W eb Browsers 1321World W ide W eb Med ia and the Hypertext Markup Language 1322Overview of HTML 1322HTML Elements and Tags 132 3Common HTML Elements 13 24Common Text Formatting Tags 13 26Wo rld W ide W e b Addressing: HTTP Uniform Resource Locators 13 26HTTP URL Syntax 13 27Resource Paths and Direc tory Listings 13 28

    80 HTTPG eneral O peration and Connections 1 3 2 9HTTPVersions and Standards . 133 0HTTP/0.9 1330HTTP/1.0 1330HTTP/1.1 1331Future HTTP Versions 13 32HTTP Ope rational Mo del and Client/Server Comm unication 1333Basic HTTP Clien t/Serv er Communication 133 3Intermediaries and the HTTP Request/Response Ch ain 13 34The Impact of Cac hing on HTTP Communication 133 5

    HTTPTransitory and Persistent Connections and Pipelining 13 36Persistent Connections 13 37Pipelining 1337HTTP Persistent Connection Establishment and Managem ent 1338

    81 HT TP M essages, M ethods, and S tatus Codes 1 3 41HTTP Generic Message Format 13 42HTTP Request Message Format 1343Request Line 13 44

    Headers 1346HTTP Response Message Format 13 46Status Line 13 47Headers 1348HTTPMethods 134 9Common Methods 134 9Other Methods 1350Safe and Idempotent Methods 1351HTTP Status Codes and Reason Phrases 13 52Status Cod e Format 135 2Reason Phrases 13 53The 100 (Continue) Preliminary Reply 135 6

    Contents in Detail Xl l

  • 8/14/2019 Tcp Ip guilde

    37/39

    82 HTTPM essage H eaders 1 3 57HTTP Ge nera l Headers 135 8Cache-Control Headers 13 58Warning 1359Other HTTP Gen eral Headers 13 60HTTP Request Headers 13 61HTTP Response Headers 13 64HTTP Entity Headers 13 65

    83 HTTP E ntities, T ransfers, Coding M ethods, and Content M anagement 1 3 69HTTP Entities and Internet M ed ia Types 13 70Me dia Types and Subtypes 13 70HTTP's Use of M ed ia Types 13 71Differences in HTTP and MIM E Constructs 13 71HTTP Content an d Transfer Encodings 13 72HTTP's Two-Level Encoding Scheme 13 73

    Use of Content an d Transfer Encodings 13 73HTTP Data Length Issues, Chunked Transfers, an d Messag e Trailers 13 74Dynamic Data Length 13 75Chunk ed Transfers and Message Trailers 13 75HTTP Content Neg otiation and Qu ality Values 137 8Content Neg otiation Techniques 137 8Qua lity Values for Preference We ights 13 80

    84 HTTPF eatures, Capabilities, and Issues 1 3 81HTTP Ca ch ing Features and Issues 13 82Benefits of HTTP Cac hing 13 82Cache Locations 138 3Cache Control 13 84Important Cac hing Issues 13 85HTTP Proxy Servers and Proxying 13 86Benefits of Proxies 13 86Com paring Proxies and Caches 13 87Important Proxying Issues 13 87HTTP Security and Privacy 13 88HTTP Authentication Methods 13 89Security and Privacy Concerns and Issues 13 89Method s for Ensuring Privacy in HTTP 13 90HTTP State Ma nage men t Using Cookies 13 90Issues with Cookies 13 91Man aging Cookie Use 1393

    P A R T 111-9 O T H E R F IL E A N D M E S S A G E T R A N S F E R A P P L I CA T IO N S 1 3 95

    8 5 U s enet N e tw ork N e w s) a nd the T CP / I P N e t w ork N e w s T ra ns fe r P ro toco l N N TP ) 1 3 9 7Usenet Overvie w, History, and Ope ration 139 8History of Usenet 13 98Usenet Op era tion and Characteristics 13 99Usenet Transport Methods 14 00Usenet Communication Mod el 1401Usenet's Public Distribution Orie ntation 14 02Usenet Com mun ication Process 14 02xlH Contents in Detail

  • 8/14/2019 Tcp Ip guilde

    38/39

    Message Propagation and Server Org aniz ation 140 4Usenet Addressing: Newsgroups 140 4Usenet Message Format and Special Headers 140 8Usenet Header Categories and Comm on Headers 140 8Add itional Usenet Headers 141 0Usenet MIM E Messages 141 1NNTP Overview and Gen eral Ope ration 1411NNTP Interserver Com mun ication Process: New s Article Propagation 141 3The Usenet Server Structure 1413Basic NNTP Propagation Methods 14 14NNTP Client-Server Commun ication Process: New s Posting and Access 14 16News Posting, Access, and Reading 14 17News Access Methods 1418Other Clien t/Server Functions 14181 Article Threading ... . 1419NNTP Commands and Command Extensions 14 20

    Command Syntax 14 20Base Command Set 142 0NNTP Comm and Extensions 142 2NNTP Status Responses an d Response Codes 14 26

    86 G opher P rotocol G opher) 1 43 1Gopher Overview and General Operation 1431Information Storage on Gop her Servers 1432Gopher Client/Server Op eration 1432Important Differences Between Gophe r and the W eb 143 3Gopher's Role in the Mo dern Internet 143 3

    P AR T 1 11 -1 0 IN T E R A C T IV E A N D A D M I N I S T R A T I V E U T IL IT IE SA N D P R O T O CO L S 1 43 5

    87 TCP /IP Interactive and R emote A pplication P rotocols 1 43 7Telnet Protocol 14 38Telnet Ove rview, History, and Standards 1438Telnet Connections and Client/Server Ope ration 1441Telnet Communications Mo de l and the Netw ork Virtual Terminal (NVT) 144 3Telnet Protocol Comm ands 14 46Telnet Interrupt Han dling 14 49Telnet Options and Op tion Neg otiation 145 0Berkeley Remote (r) Commands 14 54Berkeley Remote Login (rlogin) 1455Berkeley Remote Shell (rsh) 14 56Other Berkeley Remote Commands 1457Internet Relay Chat Protocol (IRC) 14 58IRC Communication Mo del and Client/Server Ope ration 1459Messaging and IRC Channels 145 9IRC and the Mo dern Internet 14 60

    88 T CP /IP A dministration and T roubleshooting U tilities and P rotocols 1 461TCP/IP Host Name Utility (hostname) 146 2TCP/IP Comm unication Verifica tion Utility (ping) 146 3Operation of the ping Utility 146 4Basic Use of ping 1464

    Contents in Detail x ll ll

  • 8/14/2019 Tcp Ip guilde

    39/39

    Methods of Diagnosing Connectivity Problems Using ping 146 5ping Options and Parameters 146 6TCP/IP Route Tracing Utility (traceroute) 14 67Op eration of the traceroute Utility 146 8Basic Use of the traceroute Utility 14 69traceroute Options and Parameters 14 70TCP/IP Address Resolution Protocol Utility (arp) 1471TCP/IP DNS Nam e Resolution and Lookup Utilities (nslookup, host, and dig) 14 72The nslookup Utility 1473The host Utility 14 75The dig Utility 14 76TCP/IP DNS Registry Database Lookup Utility (whois/nicnam e) 14 77TCP/IP Ne twork Status Utility (netstat) 14 79The UNIX netstat Utility 14 80The W ind ow s netstat Utility 148 2TCP/IP Configuration Utilities (ifconfig, ipco nfig, and winipc fg) 14 84The ifconfig Utility for UNIX 14 84The ipconfig for Wind ows NT, 20 00 , and XP 148 6The winipcfg Utility for W indow s 95 , 98 , and M e 1488Miscellaneous TCP/IP Troubleshooting Protocols 14 89

    I NDE X 1491RFCs BY NU M BER 1 537