📄 Page
1
The TCP/IP Guide Version 3.0 September 20, 2005 Charles M. Kozierok “aquarelle” © 2003 Charles M. Kozierok
📄 Page
2
The TCP/IP Guide - Version 3.0 (Contents) ii © 2001-2005 Charles M. Kozierok. All Rights Reserved. Copyright Notice and Disclaimers Copyright © 2001-2005 Charles M. Kozierok. All Rights Reserved. This electronic book is made available only under the terms and provisions of the TCPIPGuide.com Electronic Book License Agreement (http://www.tcpipguide.com/la.htm), and is protected under United States and international copyright law. No part of this document may be reproduced, distributed, stored in a retrieval system or transmitted in any form or by any means—be it electronic, mechanical, photographic, magnetic or otherwise— without the prior written permission of the author. Although every reasonable effort has been made to ensure that the information contained in this document is correct as of the time of publishing, there is always the possibility of error with any technical resource, either due to mistakes made by the author or the author’s sources. Accordingly, the author does not guarantee or warrant the accuracy or completeness of any of the information in this electronic book, and is not responsible for any errors or omissions. This document is designed as a general educational resource; the author is not rendering any professional service. Information contained in this book should be verified with an appropriate professional before undertaking any project. The information in this electronic book is provided on an “as is” basis. The author specifi- cally makes no representations or warranties of any kind regarding the accuracy, completeness, applicability, performance, merchantability, or fitness for any particular purpose of the content herein, even if the author has been informed in advance of such intended purpose. The author shall not be liable to any person or entity with respect to any damage or loss whatever, whether direct or indirect, whether incidental or consequential, resulting or alleged to have resulted from the use of the information in this electronic book. All trademarks and service marks used in this document are the property of their respective owners. All names and other terms used in this document that are believed to be trade- marks or service marks have been treated as proper nouns to distinguish them from non- trademarked terms. No claim is made or implied regarding the trademark status of any term based on its use in this document.
📄 Page
3
The TCP/IP Guide - Version 3.0 (Contents) iii © 2001-2005 Charles M. Kozierok. All Rights Reserved. Dedication This Guide is dedicated to my family: my wife Robyn and my three sons, Ryan, Matthew and Evan. I suppose that it’s a cliché to dedicate a book to your wife. If so, it’s for a very good reason: who plays a more important role in the life of an author than his or her spouse? Robyn is my partner; the person who is always there; the one who shares my life in so many ways. The expression about a great woman being behind every good man is true, yet my wife is deserving of recognition for reasons that go far beyond the usual reasons such as being “supportive”. Financially, she agreed to take on a regular working position to make it possible for me to spend time on a very long project with an uncertain payoff. She took on most of the tasks of taking our children to school and dealing with their needs, to give me time to write. She also gracefully agreed to “do without” many things that many other wives would not have been too happy about. But most of all, she deserves a world of credit for putting up with me. ☺ For constantly reassuring me that it was okay that I was spending years on a project that might not be successful. For listening to me talk for countless hours, and for giving her opinions on many portions of my writing, all on a subject that really doesn’t interest her at all. And most impor- tantly, for encouraging me when I felt this was a waste of time, and even kicking me in the butt when I felt like giving up. Without Robyn, this Guide simply would not exist. Thanks, R. My three boys deserve credit for similar reasons, but to a lesser extent. They have had to put up with my constantly sitting at the computer trying to tune them out so I could concen- trate; my too-frequent grouchy moods; and my reluctance to spend time with them when I had work on my plate. I am sure there were many times that they wished I just had a regular “day job”. Ryan, my big boy, has been very patient in waiting for me to finish this project so we can resume several activities that we used to engage in regularly. Matthew, my fun-loving and rambunctious middle son, has also had to deal with my not having as much time as I would have liked to spend time with him. And little Evan has had a father working on a long-term project for his entire life! All three of my boys have been very understanding, and provided me with much needed joy and laughter at times when I needed it most.
📄 Page
4
The TCP/IP Guide - Version 3.0 (Contents) iv © 2001-2005 Charles M. Kozierok. All Rights Reserved. Acknowledgments I dedicated this Guide to my wife and children to reflect the important role they have played in life in general terms, and in accomplishing this Guide in particular. However, there are many others who also contributed to the completion of this document, and I’d like to take a moment to acknowledge them. I want to thank my “original” family, my father Leon, and sisters Cari and Cindy, for being supportive and lending a helpful ear about various issues during the time that I’ve engaged in this project. Thanks also to my “adoptive” family, Eli, Marge, Larry and Steven. And I definitely want to thank the small group of close friends who have helped with ideas, advice and much needed laughs, especially Morley, Jeff, James and Jon, all of whom had to listen to far more of my blathering about this project over the last few years than any human being should have to tolerate. ☺ I would also like to specifically acknowledge the following individuals and organizations for their assistance: ☯ Adobe Systems Incorporated, for providing this relatively unknown author with two important pieces of software that I used in creating this Guide. First, Adobe Frame- maker, one of the best desktop publishing programs around, which was used to format and publish this document. Second, Adobe Photoshop, the industry standard program for photo and graphics editing, which was used for some of the graphics in this Guide, and will play a more central role in subsequent Guides containing more photographs. ☯ SmartDraw.com, for the excellent SmartDraw diagramming software that was used to create most of the over 300 illustrations that appear in this Guide. ☯ Harald Heim of The Plugin Site, for graciously providing me with two excellent Photoshop plugins that any serious photographer should consider: the FocalBlade sharpening tool and ColorWasher color-correction plugin. ☯ Fernando Gont and Barry Margolin, for their excellent technical review of The TCP/IP Guide, and their corrections and suggestions for improvement to the document. ☯ Bill Pollock, president and publisher of No Starch Press, for constantly expressing his faith in my abilities as an author, for answering questions about the business, for being a sounding board, and for agreeing to publish The TCP/IP Guide in book form. ☯ Tcat Houser, author and instructor, whose generosity, positive attitude and enthusiasm for my writing helped boost my confidence as I worked to complete this project. ☯ All the regulars at The PC Guide Discussion Forums, for creating a fun community, keeping the site active, and agreeing to provide opinions on my writing. Thanks especially to Paleo Pete and mjc for doing such a great job of moderating the forums. ☯ Christine Hylands of Junefire DTP, for assistance with creating certain graphics in this Guide, as well as designing its Web site (on short notice). ☯ Everyone who has supported The PC Guide and The TCP/IP Guide, financially and otherwise, which made it possible for me to spend time on this project. I’ve probably missed a few people who should be on this list; I hope all who are deserving of my appreciation will forgive their omission and accept my thanks.
📄 Page
5
The TCP/IP Guide - Version 3.0 (Contents) v © 2001-2005 Charles M. Kozierok. All Rights Reserved. About The Author I was born in 1966 in Windsor, Ontario, Canada and raised in nearby Toronto. I married my wife Robyn in 1990; we now live in southern Vermont with our three sons: Ryan (now 12), Matthew (9) and Evan (4). I have had an interest in the field of computers ever since my early years, starting at the age of 14 when I received my first computer, an Apple ][ that was a gift from my parents. Since that time I have worked in various computer-related fields in hardware and software. In 1989 I obtained a Bachelor of Applied Science from the University of Waterloo, in Waterloo, Ontario, Canada. I completed my formal education in 1993 with two Master’s degrees, in Management and in Electrical Engineering and Computer Science (EECS), from MIT. After a brief “conventional” technical career, I created and published The PC Guide, an extensive online reference work on personal computers and in 1998 I decided to devote myself to my writing projects full time. The TCP/IP Guide was part of a larger networking project that I spent time on earlier this decade. I continue to work in the technical writing and editing field on various projects, for myself and other companies. You may have noticed something missing here: no impressive listings of credentials. No, I’m not a New York Times best-selling author; I haven’t been a professor at a prestigious Ivy League university for a quarter-century; neither am I a top executive at a Silicon Valley giant. In some ways, I am a student of technology, just like you are. And my experience over the years has shown me that many of the people who know the most about how technology works also have rather limited success in explaining what they know in a way that will allow me to understand it. My interests, and I believe my skills, lie not in being an expert, but an educator; in presenting complex information in a form that is sensible, digestible and fun to read. When I am not working—all too rare these days—I spend time with my family and enjoy the peaceful quiet and natural beauty of the state of Vermont. I enjoy listening to many types of music, walking in the woods, hiking, and playing tennis. I am also an avid amateur photog- rapher, with particular interests in nature and landscapes.
📄 Page
6
The TCP/IP Guide - Version 3.0 (Contents) vi © 2001-2005 Charles M. Kozierok. All Rights Reserved. Table of Contents Copyright Notice and Disclaimers................................................ ii Dedication...................................................................................... iii Acknowledgments......................................................................... iv About The Author........................................................................... v Table of Contents .......................................................................... vi List of Figures............................................................................ xxiii List of Tables ............................................................................. xxxi The TCP/IP Guide: Introduction and "Guide To The Guide" .... 39 ☯ Introduction To The TCP/IP Guide.........................................................40 ☯ Goals of The TCP/IP Guide.....................................................................41 ☯ Scope of The TCP/IP Guide ....................................................................43 ☯ Structure and Organization of The TCP/IP Guide ................................44 ☯ TCP/IP Guide Features, Inserts and Icons ............................................47 ☯ Tips For Using Adobe Acrobat Reader To View The TCP/IP Guide ...49 ☯ Feedback and Suggestions....................................................................53 ☯ Version History........................................................................................54 Networking Fundamentals .......................................................... 56 ☯ Introduction to Networking ....................................................................57 ☯ What Is Networking? ...................................................................................57 ☯ The Advantages (Benefits) of Networking ................................................58 ☯ The Disadvantages (Costs) of Networking ...............................................60 ☯ Fundamental Network Characteristics..................................................62 ☯ Networking Layers, Models and Architectures ........................................62 ☯ Protocols: What Are They, Anyway?.........................................................64 ☯ Circuit Switching and Packet Switching Networks ..................................66 ☯ Connection-Oriented and Connectionless Protocols ..............................69 ☯ Messages: Packets, Frames, Datagrams and Cells .................................71 ☯ Message Formatting: Headers, Payloads and Footers............................73 ☯ Message Addressing and Transmission Methods: Unicast, Broadcast and Multicast Messages...........................................................74
📄 Page
7
The TCP/IP Guide - Version 3.0 (Contents) vii © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ Network Structural Models and Client/Server and Peer-to-Peer Networking ...................................................................................................77 ☯ Types and Sizes of Networks.................................................................81 ☯ Local Area Networks (LANs), Wireless LANs (WLANs) and Wide Area Networks (WANs) and Variants (CANs, MANs and PANs) .............81 ☯ Segments, Networks, Subnetworks and Internetworks...........................83 ☯ The Internet, Intranets and Extranets ........................................................86 ☯ Network Performance Issues and Concepts ........................................88 ☯ Putting Network Performance In Perspective...........................................88 ☯ Balancing Network Performance with Key Non-Performance Characteristics.............................................................................................89 ☯ Performance Measurements: Speed, Bandwidth, Throughput and Latency..................................................................................................91 ☯ Understanding Performance Measurement Units ....................................94 ☯ Theoretical and Real-World Throughput, and Factors Affecting Network Performance .................................................................................96 ☯ Simplex, Full-Duplex and Half-Duplex Operation.....................................99 ☯ Quality of Service (QoS) ...........................................................................101 ☯ Network Standards and Standards Organizations.............................103 ☯ Proprietary, Open and De Facto Standards ............................................103 ☯ Networking Standards ..............................................................................106 ☯ International Networking Standards Organizations...............................107 ☯ Networking Industry Groups ....................................................................109 ☯ Internet Standards Organizations (ISOC, IAB, IESG, IETF, IRSG, IRTF).................................................................................................110 ☯ Internet Registration Authorities and Registries (IANA, ICANN, APNIC, ARIN, LACNIC, RIPE NCC)...........................................................113 ☯ Internet Standards and the Request For Comment (RFC) Process......115 ☯ Backgrounder: Data Representation and the Mathematics of Computing .............................................................................................119 ☯ Binary Information and Representation: Bits, Bytes, Nibbles, Octets and Characters ..............................................................................120 ☯ Decimal, Binary, Octal and Hexadecimal Numbers................................123 ☯ Decimal, Binary, Octal and Hexadecimal Number Conversion.............127 ☯ Binary, Octal and Hexadecimal Arithmetic .............................................131 ☯ Boolean Logic and Logical Functions.....................................................132 ☯ Bit Masking (Setting, Clearing and Inverting) Using Boolean Logical Functions......................................................................................136 The Open System Interconnection (OSI) Reference Model.... 140 ☯ History of the OSI Reference Model ....................................................141
📄 Page
8
The TCP/IP Guide - Version 3.0 (Contents) viii © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ General Reference Model Issues .........................................................143 ☯ The Benefits of Networking Models.........................................................143 ☯ Why Understanding The OSI Reference Model Is Important To You ...144 ☯ How To Use The OSI Reference Model....................................................145 ☯ Comparing the OSI Reference Model to Network Architectures and Protocol Stacks ..................................................................................147 ☯ Key OSI Reference Model Concepts ...................................................148 ☯ OSI Reference Model Networking Layers, Sublayers and Layer Groupings ..................................................................................................148 ☯ "N" Notation and Other OSI Model Layer Terminology .........................151 ☯ Interfaces: Vertical (Adjacent Layer) Communication ...........................153 ☯ Protocols: Horizontal (Corresponding Layer) Communication ............156 ☯ Data Encapsulation, Protocol Data Units (PDUs) and Service Data Units (SDUs)......................................................................................157 ☯ Indirect Device Connection and Message Routing ................................162 ☯ Understanding The OSI Reference Model: An Analogy ....................165 ☯ OSI Reference Model Layers................................................................168 ☯ Physical Layer (Layer 1) ...........................................................................168 ☯ Data Link Layer (Layer 2)..........................................................................170 ☯ Network Layer (Layer 3)............................................................................172 ☯ Transport Layer (Layer 4) .........................................................................174 ☯ Session Layer (Layer 5) ............................................................................177 ☯ Presentation Layer (Layer 6) ....................................................................178 ☯ Application Layer (Layer 7) ......................................................................180 ☯ OSI Reference Model Layer Mnemonics .............................................182 ☯ OSI Reference Model Layer Summary ................................................184 TCP/IP Protocol Suite and Architecture................................... 186 ☯ TCP/IP Overview and History ...............................................................186 ☯ TCP/IP Services and Client/Server Operation ....................................190 ☯ TCP/IP Architecture and the TCP/IP Model.........................................193 ☯ TCP/IP Protocols ...................................................................................197 TCP/IP Lower-Layer (Interface, Internet and Transport) Protocols (OSI Layers 2, 3 and 4) ............................................. 203 ☯ TCP/IP Network Interface Layer (OSI Data Link Layer) Protocols ....204 ☯ TCP/IP Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP) ...........................................................................................205 ☯ SLIP and PPP Overview and Role In TCP/IP ................................................206 ☯ Serial Line Internet Protocol (SLIP) ..............................................................209 ☯ Point-to-Point Protocol (PPP)........................................................................213
📄 Page
9
The TCP/IP Guide - Version 3.0 (Contents) ix © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ PPP Fundamentals and Operation .....................................................................214 ☯ PPP Overview, History and Benefits .........................................................................214 ☯ PPP Components and General Operation ................................................................217 ☯ PPP Link Setup and Phases.......................................................................................219 ☯ PPP Standards ............................................................................................................223 ☯ PPP Core Protocols: Link Control, Network Control and Authentication ......228 ☯ PPP Link Control Protocol (LCP)...............................................................................228 ☯ PPP Network Control Protocols (IPCP, IPXCP, NBFCP and others) ......................233 ☯ PPP Authentication Protocols: Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP) ..................................236 ☯ PPP Feature Protocols.........................................................................................240 ☯ PPP Link Quality Monitoring/Reporting (LQM/LQR)................................................240 ☯ PPP Compression Control Protocol (CCP) and Compression Algorithms ...........242 ☯ PPP Encryption Control Protocol (ECP) and Encryption Algorithms....................245 ☯ PPP Multilink Protocol (MP/MLP/MLPPP) .................................................................248 ☯ PPP Bandwidth Allocation Protocol (BAP) and Bandwidth Allocation ☯ Control Protocol (BACP) ............................................................................................251 ☯ PPP Protocol Frame Formats..............................................................................254 ☯ PPP General Frame Format........................................................................................254 ☯ PPP General Control Protocol Frame Format and Option Format .........................260 ☯ PPP Link Control Protocol (LCP) Frame Formats....................................................264 ☯ PPP Authentication Protocol (PAP, CHAP) Frame Formats ...................................267 ☯ PPP Multilink Protocol (MP) Frame Format ..............................................................271 ☯ TCP/IP Network Interface / Internet "Layer Connection" Protocols................................................................................................277 ☯ Address Resolution and the TCP/IP Address Resolution Protocol (ARP)...........................................................................................................278 ☯ Address Resolution Concepts and Issues...................................................279 ☯ The Need For Address Resolution .....................................................................279 ☯ Address Resolution Through Direct Mapping...................................................282 ☯ Dynamic Address Resolution .............................................................................285 ☯ Dynamic Address Resolution Caching and Efficiency Issues.........................286 ☯ TCP/IP Address Resolution Protocol (ARP).................................................289 ☯ ARP Overview, Standards and History ..............................................................290 ☯ ARP Address Specification and General Operation .........................................291 ☯ ARP Message Format ..........................................................................................294 ☯ ARP Caching.........................................................................................................296 ☯ Proxy ARP.............................................................................................................298 ☯ TCP/IP Address Resolution For IP Multicast Addresses ............................301 ☯ TCP/IP Address Resolution For IP Version 6...............................................303 ☯ Reverse Address Resolution and the TCP/IP Reverse Address Resolution Protocol (RARP).....................................................................305 ☯ TCP/IP Internet Layer (OSI Network Layer) Protocols .......................309 ☯ Internet Protocol (IP/IPv4, IPng/IPv6) and IP-Related Protocols (IP NAT, IPSec, Mobile IP).........................................................................310 ☯ Internet Protocol Concepts and Overview ...................................................311 ☯ IP Overview and Key Operational Characteristics ............................................311 ☯ IP Functions..........................................................................................................313 ☯ IP History, Standards, Versions and Closely-Related Protocols.....................314
📄 Page
10
The TCP/IP Guide - Version 3.0 (Contents) x © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ Internet Protocol Version 4 (IP, IPv4)............................................................317 ☯ IP Addressing .......................................................................................................318 ☯ IP Addressing Concepts and Issues .........................................................................319 ☯ IP Addressing Overview and Fundamentals......................................................319 ☯ IP Address Size, Address Space and "Dotted Decimal" Notation ...................323 ☯ IP Basic Address Structure and Main Components: Network ID and Host ID............................................................................................................325 ☯ IP Addressing Categories (Classful, Subnetted and Classless) and IP Address Adjuncts (Subnet Mask and Default Gateway)...............................327 ☯ Number of IP Addresses and Multihoming ........................................................329 ☯ IP Address Management and Assignment Methods and Authorities..............332 ☯ IP "Classful" (Conventional) Addressing .................................................................334 ☯ IP "Classful" Addressing Overview and Address Classes...............................334 ☯ IP "Classful" Addressing Network and Host Identification and Address Ranges ...................................................................................................337 ☯ IP Address Class A, B and C Network and Host Capacities.............................341 ☯ IP Addresses With Special Meanings.................................................................343 ☯ IP Reserved, Loopback and Private Addresses ................................................345 ☯ IP Multicast Addressing .......................................................................................348 ☯ Problems With "Classful" IP Addressing ...........................................................351 ☯ IP Subnet Addressing ("Subnetting") Concepts......................................................354 ☯ IP Subnet Addressing Overview, Motivation, and Advantages........................355 ☯ IP Subnetting: "Three-Level" Hierarchical IP Subnet Addressing...................357 ☯ IP Subnet Masks, Notation and Subnet Calculations........................................359 ☯ IP Default Subnet Masks For Address Classes A, B and C ..............................364 ☯ IP Custom Subnet Masks.....................................................................................366 ☯ IP Subnet Identifiers, Subnet Addresses and Host Addresses........................370 ☯ IP Subnetting Summary Tables For Class A, Class B and Class C Networks................................................................................................................373 ☯ IP Variable Length Subnet Masking (VLSM) ......................................................377 ☯ IP Subnetting: Practical Subnet Design and Address Determination Example .......................................................................................................................382 ☯ IP Subnetting Step #1: Requirements Analysis.................................................383 ☯ IP Subnetting Step #2: The Key Design Trade-off: Partitioning Network Address Host Bits .................................................................................384 ☯ IP Subnetting Step #3: Determining The Custom Subnet Mask.......................388 ☯ IP Subnetting Step #4: Determining Subnet Identifiers and Subnet Addresses ................................................................................................391 ☯ IP Subnetting Step #5: Determining Host Addresses For Each Subnet..........397 ☯ IP Classless Addressing: Classless Inter-Domain Routing (CIDR) / "Supernetting".............................................................................................................402 ☯ IP Classless Addressing and "Supernetting" Overview, Motivation, Advantages and Disadvantages..........................................................................402 ☯ IP "Supernetting": Classless Inter-Domain Routing (CIDR) Hierarchical Addressing and Notation ...............................................................406 ☯ IP Classless Addressing Block Sizes and "Classful" Network Equivalents............................................................................................................409 ☯ IP CIDR Addressing Example ..............................................................................411 ☯ IP Datagram Encapsulation and Formatting......................................................417 ☯ IP Datagram Encapsulation........................................................................................417 ☯ IP Datagram General Format......................................................................................419 ☯ IP Datagram Options and Option Format .................................................................425 ☯ IP Datagram Size, Maximum Transmission Unit (MTU), Fragmentation and Reassembly ...................................................................................................430
📄 Page
11
The TCP/IP Guide - Version 3.0 (Contents) xi © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ IP Datagram Size, the Maximum Transmission Unit (MTU), and Fragmentation Overview ............................................................................................430 ☯ IP Message Fragmentation Process..........................................................................434 ☯ IP Message Reassembly Process..............................................................................438 ☯ IP Datagram Delivery and Routing .....................................................................441 ☯ IP Datagram Direct Delivery and Indirect Delivery (Routing)..................................441 ☯ IP Routing Concepts and the Process of Next-Hop Routing ..................................444 ☯ IP Routes and Routing Tables ...................................................................................447 ☯ IP Routing In A Subnet Or Classless Addressing (CIDR) Environment ................449 ☯ IP Multicasting ......................................................................................................452 ☯ Internet Protocol Version 6 (IPv6) / IP Next Generation (IPng)...................454 ☯ IPv6 Overview, Changes and Transition ............................................................455 ☯ IPv6 Motivation and Overview ...................................................................................455 ☯ Major Changes And Additions In IPv6 ......................................................................458 ☯ Transition from IPv4 to IPv6.......................................................................................459 ☯ IPv6 Addressing ...................................................................................................462 ☯ IPv6 Addressing Overview: Addressing Model and Address Types .....................462 ☯ IPv6 Address Size and Address Space.....................................................................464 ☯ IPv6 Address and Address Notation and Prefix Representation ...........................466 ☯ IPv6 Address Space Allocation .................................................................................470 ☯ IPv6 Global Unicast Address Format ........................................................................473 ☯ IPv6 Interface Identifiers and Physical Address Mapping ......................................479 ☯ IPv6 Special Addresses: Reserved, Private (Link-Local / Site-Local), Unspecified and Loopback ........................................................................................480 ☯ IPv6/IPv4 Address Embedding ..................................................................................484 ☯ IPv6 Multicast and Anycast Addressing ...................................................................486 ☯ IPv6 Autoconfiguration and Renumbering ...............................................................492 ☯ IPv6 Datagram Encapsulation and Formatting..................................................495 ☯ IPv6 Datagram Overview and General Structure .....................................................495 ☯ IPv6 Datagram Main Header Format..........................................................................497 ☯ IPv6 Datagram Extension Headers............................................................................501 ☯ IPv6 Datagram Options...............................................................................................507 ☯ IPv6 Datagram Size, Maximum Transmission Unit (MTU), Fragmentation and Reassembly .........................................................................511 ☯ IPv6 Datagram Delivery and Routing .................................................................516 ☯ IP Network Address Translation (NAT) Protocol .........................................518 ☯ IP NAT Overview, Motivation, Advantages and Disadvantages ......................518 ☯ IP NAT Address Terminology..............................................................................522 ☯ IP NAT Static and Dynamic Address Mappings ................................................525 ☯ IP NAT Unidirectional (Traditional/Outbound) Operation.................................527 ☯ IP NAT Bidirectional (Two-Way/Inbound) Operation ........................................531 ☯ IP NAT Port-Based ("Overloaded") Operation: Network Address Port Translation (NAPT) / Port Address Translation (PAT) ..............................535 ☯ IP NAT "Overlapping" / "Twice NAT" Operation ...............................................539 ☯ IP NAT Compatibility Issues and Special Handling Requirements .................542 ☯ IP Security (IPSec) Protocols ........................................................................545 ☯ IPSec Overview, History and Standards ............................................................545 ☯ IPSec General Operation, Components and Protocols ....................................548 ☯ IPSec Architectures and Implementation Methods...........................................550 ☯ IPSec Modes: Transport and Tunnel ..................................................................553
📄 Page
12
The TCP/IP Guide - Version 3.0 (Contents) xii © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ IPSec Security Associations and the Security Association Database (SAD); Security Policies and the Security Policy Database (SPD); Selectors; the Security Parameter Index (SPI) ..................................................557 ☯ IPSec Authentication Header (AH)......................................................................559 ☯ IPSec Encapsulating Security Payload (ESP) ...................................................564 ☯ IPSec Key Exchange (IKE)...................................................................................569 ☯ Internet Protocol Mobility Support (Mobile IP) ............................................572 ☯ Mobile IP Overview, History and Motivation......................................................572 ☯ Mobile IP Concepts and General Operation ......................................................576 ☯ Mobile IP Addressing: Home and "Care-Of" Addresses ..................................580 ☯ Mobile IP Agent Discovery, and Agent Advertisement and Solicitation Messages..........................................................................................583 ☯ Mobile IP Home Agent Registration and Registration Messages....................589 ☯ Mobile IP Data Encapsulation and Tunneling....................................................594 ☯ Mobile IP and TCP/IP Address Resolution Protocol (ARP) Operation ............597 ☯ Mobile IP Efficiency Issues .................................................................................600 ☯ Mobile IP Security Considerations .....................................................................602 ☯ Internet Control Message Protocol (ICMP/ICMPv4 and ICMPv6) ..........604 ☯ ICMP Concepts and General Operation........................................................605 ☯ ICMP Overview, History, Versions and Standards............................................605 ☯ ICMP General Operation ......................................................................................607 ☯ ICMP Message Classes, Types and Codes........................................................610 ☯ ICMP Message Creation and Processing Conventions and Rules..................614 ☯ ICMP Common Message Format and Data Encapsulation...............................616 ☯ ICMP Message Types and Formats...............................................................619 ☯ ICMP Version 4 (ICMPv4) Error Message Types and Formats.........................620 ☯ ICMPv4 Destination Unreachable Messages............................................................620 ☯ ICMPv4 Source Quench Messages ...........................................................................624 ☯ ICMPv4 Time Exceeded Messages............................................................................626 ☯ ICMPv4 Redirect Messages........................................................................................629 ☯ ICMPv4 Parameter Problem Messages .....................................................................633 ☯ ICMP Version 4 (ICMPv4) Informational Message Types and Formats...........636 ☯ ICMPv4 Echo (Request) and Echo Reply Messages................................................636 ☯ ICMPv4 Timestamp (Request) and Timestamp Reply Messages ...........................638 ☯ ICMPv4 Router Advertisement and Router Solicitation Messages ........................640 ☯ ICMPv4 Address Mask Request and Reply Messages ............................................644 ☯ ICMPv4 Traceroute Messages ...................................................................................646 ☯ ICMP Version 6 (ICMPv6) Error Message Types and Formats.........................649 ☯ ICMPv6 Destination Unreachable Messages............................................................649 ☯ ICMPv6 Packet Too Big Messages ............................................................................652 ☯ ICMPv6 Time Exceeded Messages............................................................................654 ☯ ICMPv6 Parameter Problem Messages .....................................................................657 ☯ ICMP Version 6 (ICMPv6) Informational Message Types and Formats...........660 ☯ ICMPv6 Echo Request and Echo Reply Messages ..................................................661 ☯ ICMPv6 Router Advertisement and Router Solicitation Messages ........................662 ☯ ICMPv6 Neighbor Advertisement and Neighbor Solicitation Messages................666 ☯ ICMPv6 Redirect Messages........................................................................................671 ☯ ICMPv6 Router Renumbering Messages ..................................................................673 ☯ ICMPv6 Informational Message Options...................................................................677 ☯ TCP/IP IPv6 Neighbor Discovery Protocol (ND) .....................................683 ☯ IPv6 ND Overview, History, Motivation and Standards...............................683
📄 Page
13
The TCP/IP Guide - Version 3.0 (Contents) xiii © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ IPv6 ND General Operational Overview: ND Functions, Functional Groups and Message Types.......................................................685 ☯ IPv6 ND Functions Compared to Equivalent IPv4 Functions .....................688 ☯ IPv6 ND Host-Router Discovery Functions: Router Discovery, Prefix Discovery, Parameter Discovery and Address Autoconfiguration ...........................................................................689 ☯ IPv6 ND Host-Host Communication Functions: Address Resolution, Next-Hop Determination, Neighbor Unreachability Detection and Duplicate Address Detection ................................................691 ☯ IPv6 ND Redirect Function.............................................................................693 ☯ TCP/IP Routing Protocols (Gateway Protocols) .....................................696 ☯ Overview Of Key Routing Protocol Concepts: Architectures, Protocol Types, Algorithms and Metrics......................................................698 ☯ TCP/IP Interior Routing Protocols (RIP, OSPF, GGP, HELLO, IGRP, EIGRP)...................................................................................................703 ☯ TCP/IP Routing Information Protocol (RIP, RIP-2 and RIPng) .........................704 ☯ RIP Fundamentals and General Operation ...............................................................705 ☯ RIP Overview, History, Standards and Versions ...............................................705 ☯ RIP Route Determination Algorithm and Metric ................................................707 ☯ RIP General Operation, Messaging and Timers.................................................711 ☯ RIP Protocol Limitations and Problems .............................................................714 ☯ RIP Special Features For Resolving RIP Algorithm Problems.........................718 ☯ RIP Version-Specific Message Formats and Features ............................................723 ☯ RIP Version 1 (RIP-1) Message Format...............................................................723 ☯ RIP Version 2 (RIP-2) Message Format and Features .......................................726 ☯ RIPng ("RIPv6") Message Format and Features................................................729 ☯ Open Shortest Path First (OSPF)........................................................................733 ☯ OSPF Overview, History, Standards and Versions..................................................733 ☯ OSPF Basic Topology and the Link State Database (LSDB) ..................................735 ☯ OSPF Hierarchical Topology, Areas and Router Roles...........................................738 ☯ OSPF Route Determination Using SPF Trees ..........................................................741 ☯ OSPF General Operation and Message Types .........................................................745 ☯ OSPF Message Formats .............................................................................................747 ☯ Other Interior Routing Protocols ........................................................................757 ☯ TCP/IP Gateway-to-Gateway Protocol (GGP) ...........................................................757 ☯ The HELLO Protocol (HELLO) ...................................................................................759 ☯ Interior Gateway Routing Protocol (IGRP)................................................................761 ☯ Enhanced Interior Gateway Routing Protocol (EIGRP) ...........................................763 ☯ TCP/IP Exterior Gateway/Routing Protocols (BGP and EGP) ....................765 ☯ TCP/IP Border Gateway Protocol (BGP/BGP-4) ................................................766 ☯ BGP Fundamentals and General Operation .............................................................767 ☯ BGP Overview, History, Standards and Versions .............................................767 ☯ BGP Topology, Speakers, Border Routers and Neighbor Relationships (Internal and External Peers) ...............................................................................771 ☯ BGP Autonomous System Types, Traffic Flows and Routing Policies...........773 ☯ BGP Route Storage and Advertisement, and BGP Routing Information Bases (RIBs)..........................................................................................................776 ☯ BGP Path Attributes and Algorithm Overview...................................................777 ☯ BGP Route Determination and the BGP Decision Process ..............................780 ☯ BGP General Operation and Messaging.............................................................782 ☯ BGP Detailed Messaging, Operation and Message Formats ..................................785
📄 Page
14
The TCP/IP Guide - Version 3.0 (Contents) xiv © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ BGP Message Generation and Transport, and General Message Format....................................................................................................................785 ☯ BGP Connection Establishment: Open Messages ............................................788 ☯ BGP Route Information Exchange: Update Messages .....................................791 ☯ BGP Connectivity Maintenance: Keepalive Messages .....................................796 ☯ BGP Error Reporting: Notification Messages ....................................................798 ☯ TCP/IP Exterior Gateway Protocol (EGP)...........................................................802 ☯ TCP/IP Transport Layer Protocols.......................................................805 ☯ Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) ...........................................................................................806 ☯ TCP and UDP Overview and Role In TCP/IP.................................................807 ☯ TCP/IP Transport Layer Protocol (TCP and UDP) Addressing: Ports and Sockets ..........................................................................................810 ☯ TCP/IP Processes, Multiplexing and Client/Server Application Roles............810 ☯ TCP/IP Ports: Transport Layer (TCP/UDP) Addressing ....................................813 ☯ TCP/IP Application Assignments and Server Port Number Ranges: Well-Known, Registered and Dynamic/Private Ports........................................816 ☯ TCP/IP Client (Ephemeral) Ports and Client/Server Application Port Use......818 ☯ TCP/IP Sockets and Socket Pairs: Process and Connection Identification ...821 ☯ Common TCP/IP Applications and Assigned Well-Known and Registered Port Numbers ....................................................................................823 ☯ TCP/IP User Datagram Protocol (UDP) .........................................................827 ☯ UDP Overview, History and Standards ..............................................................827 ☯ UDP Operation......................................................................................................828 ☯ UDP Message Format ..........................................................................................830 ☯ UDP Common Applications and Server Port Assignments .............................832 ☯ TCP/IP Transmission Control Protocol (TCP)..............................................836 ☯ TCP Overview, Functions and Characteristics..................................................837 ☯ TCP Overview, History and Standards......................................................................837 ☯ TCP Functions: What TCP Does................................................................................840 ☯ TCP Characteristics: How TCP Does What It Does .................................................842 ☯ TCP Fundamentals and General Operation .......................................................845 ☯ TCP Data Handling and Processing: Streams, Segments and Sequence Numbers.......................................................................................................................845 ☯ TCP Sliding Window Acknowledgment System For Data Transport, Reliability and Flow Control.......................................................................................849 ☯ TCP Ports, Connections and Connection Identification .........................................859 ☯ TCP Common Applications and Server Port Assignments ....................................861 ☯ TCP Basic Operation: Connection Establishment, Management and Termination...........................................................................................................864 ☯ TCP Operational Overview and the TCP Finite State Machine (FSM) ....................864 ☯ TCP Connection Preparation: Transmission Control Blocks (TCBs) and Passive and Active Socket OPENs............................................................................869 ☯ TCP Connection Establishment Process: The "Three-Way Handshake" ..............871 ☯ TCP Connection Establishment Sequence Number Synchronization and Parameter Exchange...................................................................................................876 ☯ TCP Connection Management and Problem Handling, the Connection Reset Function, and TCP "Keepalives" ....................................................................879 ☯ TCP Connection Termination.....................................................................................882 ☯ TCP Message Formatting and Data Transfer.....................................................889 ☯ TCP Message (Segment) Format ...............................................................................889
📄 Page
15
The TCP/IP Guide - Version 3.0 (Contents) xv © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ TCP Checksum Calculation and the TCP "Pseudo Header"...................................895 ☯ TCP Maximum Segment Size (MSS) and Relationship to IP Datagram Size .........898 ☯ TCP Sliding Window Data Transfer and Acknowledgement Mechanics ...............901 ☯ TCP Immediate Data Transfer: "Push" Function .....................................................912 ☯ TCP Priority Data Transfer: "Urgent" Function........................................................914 ☯ TCP Reliability and Flow Control Features and Protocol Modifications.........916 ☯ TCP Segment Retransmission Timers and the Retransmission Queue ................916 ☯ TCP Non-Contiguous Acknowledgment Handling and Selective Acknowledgment (SACK)...........................................................................................919 ☯ TCP Adaptive Retransmission and Retransmission Timer Calculations ..............925 ☯ TCP Window Size Adjustment and Flow Control .....................................................928 ☯ TCP Window Management Issues .............................................................................932 ☯ TCP "Silly Window Syndrome" and Changes To the Sliding Window System For Avoiding Small-Window Problems .......................................................936 ☯ TCP Congestion Handling and Congestion Avoidance Algorithms ......................940 ☯ Summary Comparison of TCP/IP Transport Layer Protocols (UDP and TCP) ..........................................................................................................945 TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7) ........................................ 946 ☯ Name Systems and TCP/IP Name Registration and Name Resolution..............................................................................................947 ☯ Name System Issues, Concepts and Techniques ..................................948 ☯ Name System Overview and Motivation.......................................................948 ☯ Name System Functions: Name Space, Name Registration and Name Resolution ............................................................................................952 ☯ Name Spaces and Name Architectures (Flat and Hierarchical) .................954 ☯ Name Registration Methods, Administration and Authorities ...................957 ☯ Name Resolution Techniques and Functional Elements of A Name Resolution System...............................................................................960 ☯ Efficiency, Reliability and Other Name Resolution Issues and Features..962 ☯ TCP/IP Name Systems: Host Tables and Domain Name System (DNS).............................................................................................964 ☯ Overview and History of TCP/IP Host Names and Name Systems ............965 ☯ TCP/IP Host Table Name System ..................................................................967 ☯ TCP/IP Domain Name System (DNS) ............................................................971 ☯ DNS Overview, Functions and Characteristics .................................................972 ☯ DNS Overview, History and Standards .....................................................................972 ☯ DNS Design Goals, Objectives and Assumptions ...................................................975 ☯ DNS Components and General Functions................................................................977 ☯ DNS Name Space, Architecture and Terminology ............................................981 ☯ DNS Domains and the DNS Hierarchical Name Architecture .................................981 ☯ DNS Structural Elements and Terminology: Domains, Subdomains, and Nodes; Roots, Leaves and Branches; Parents, Children and Siblings .................983 ☯ DNS Labels, Names and Syntax Rules .....................................................................987 ☯ Absolute (Fully-Qualified) and Relative (Partially-Qualified) Domain Name Specifications..............................................................................................................990 ☯ DNS Name Registration, Public Administration, Zones and Authorities........992 ☯ DNS Hierarchical Authority Structure and the Distributed Name Database .........992 ☯ DNS Organizational (Generic) Top Level Domains and Authorities ......................994
📄 Page
16
The TCP/IP Guide - Version 3.0 (Contents) xvi © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ DNS Geopolitical (Country Code) Top Level Domains and Authorities ................999 ☯ DNS Second-Level and Lower Domains, Delegation of Registration Authority and Public Registration ...........................................................................1002 ☯ DNS Public Registration Disputes (Conflicts, Cybersquatting, "Deceptive Naming", Etc.) and Dispute Resolution ..................................................................1003 ☯ DNS Name Space Administrative Hierarchy Partitioning: DNS Zones of Authority................................................................................................................1007 ☯ DNS Private Name Registration...............................................................................1010 ☯ DNS Name Servers and Name Resolution .......................................................1013 ☯ DNS Name Server Concepts and Operation...........................................................1014 ☯ DNS Name Server Functions, Name Server Architecture and General Operation ..............................................................................................1014 ☯ DNS Name Server Data Storage: Resource Records and Classes ................1017 ☯ DNS Name Server Types and Roles: Primary/Master, Secondary/Slave and Caching-Only Servers.................................................................................1020 ☯ DNS Zone Management, Contacts and Zone Transfers..................................1023 ☯ DNS Root Name Servers ....................................................................................1026 ☯ DNS Name Server Caching, Negative Caching and Data Persistence ..........1028 ☯ DNS Name Server Load Balancing ...................................................................1032 ☯ DNS Name Server Enhancements: DNS Notify, Incremental Zone Transfers, and DNS Update (Dynamic DNS) ....................................................1033 ☯ DNS Resolution Concepts and Resolver Operations ............................................1037 ☯ DNS Resolver Functions and General Operation ............................................1037 ☯ DNS Basic Name Resolution Techniques: Iterative and Recursive Resolution ...........................................................................................................1039 ☯ DNS Name Resolution Efficiency Improvements: Caching and Local Resolution.................................................................................................1043 ☯ DNS Name Resolution Process.........................................................................1046 ☯ DNS Reverse Name Resolution Using the IN-ADDR.ARPA Domain..............1049 ☯ DNS Electronic Mail Support and Mail Exchange (MX) Resource Records ...............................................................................................................1053 ☯ DNS Messaging and Message, Resource Record and Master File Formats .......1056 ☯ DNS Message Generation and Transport.........................................................1056 ☯ DNS Message Processing and General Message Format ..............................1058 ☯ DNS Message Header and Question Section Format......................................1061 ☯ DNS Message Resource Record Field Formats...............................................1066 ☯ DNS Name Notation and Message Compression Technique .........................1071 ☯ DNS Master File Format .....................................................................................1074 ☯ DNS Changes To Support IP Version 6............................................................1079 ☯ Network File and Resource Sharing Protocols and the TCP/IP Network File System (NFS) ....................................................1081 ☯ Overview of File and Resource Sharing Protocol Concepts and Operation ..........................................................................................1082 ☯ TCP/IP Network File System (NFS) ........................................................1084 ☯ NFS Overview, History, Versions and Standards......................................1084 ☯ NFS Architecture and Components............................................................1086 ☯ NFS Data Storage and Data Types, and the External Data Representation (XDR) Standard ..................................................................1089 ☯ NFS Client/Server Operation Using Remote Procedure Calls (RPCs).....1091 ☯ NFS Server Procedures and Operations ....................................................1094 ☯ NFS File System Model and the Mount Protocol .......................................1099
📄 Page
17
The TCP/IP Guide - Version 3.0 (Contents) xvii © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ TCP/IP Network Configuration and Management Protocols (BOOTP, DHCP, SNMP and RMON) ...................................................1101 ☯ Host Configuration and TCP/IP Host Configuration Protocols (BOOTP and DHCP).................................................................................1102 ☯ Host Configuration Concepts, Issues and Motivation ..............................1103 ☯ TCP/IP Bootstrap Protocol (BOOTP) ..........................................................1106 ☯ BOOTP Overview, History and Standards .......................................................1106 ☯ BOOTP Client/Server Messaging and Addressing..........................................1109 ☯ BOOTP Detailed Operation................................................................................1112 ☯ BOOTP Message Format ...................................................................................1115 ☯ BOOTP Vendor-Specific Area and Vendor Information Extensions .............1119 ☯ BOOTP Relay Agents (Forwarding Agents).....................................................1122 ☯ TCP/IP Dynamic Host Configuration Protocol (DHCP) .............................1127 ☯ DHCP Overview, Motivation, History and Standards......................................1128 ☯ DHCP Address Assignment and Dynamic Address Allocation and Management .......................................................................................................1131 ☯ DHCP Address Assignment and Allocation Mechanisms.....................................1131 ☯ DHCP Leases, Lease Length Policies and Management.......................................1134 ☯ DHCP Lease "Life Cycle" Overview (Allocation, Reallocation, Renewal, Rebinding and Release) and Lease Timers ............................................................1137 ☯ DHCP Lease Address Pools, Ranges (Scopes) and Address Management........1140 ☯ DHCP Configuration and Operation .................................................................1144 ☯ DHCP Overview of Client and Server Responsibilities .........................................1144 ☯ DHCP Configuration Parameters, Storage and Communication..........................1146 ☯ DHCP General Operation and Client Finite State Machine ...................................1148 ☯ DHCP Lease Allocation Process .............................................................................1151 ☯ DHCP Lease Reallocation Process .........................................................................1158 ☯ DHCP Lease Renewal and Rebinding Processes ..................................................1161 ☯ DHCP Early Lease Termination (Release) Process ...............................................1165 ☯ DHCP Parameter Configuration Process For Clients With Non-DHCP Addresses..................................................................................................................1166 ☯ DHCP Messaging, Message Types and Formats ............................................1169 ☯ DHCP Message Generation, Addressing, Transport and Retransmission..........1169 ☯ DHCP Message Format.............................................................................................1172 ☯ DHCP Options, Option Format and "Option Overloading" ...................................1175 ☯ Summary Of DHCP Options / BOOTP Vendor Information Fields........................1181 ☯ DHCP Client/Server Implementation, Features and Issues............................1190 ☯ DHCP Server General Implementation and Management Issues .........................1190 ☯ DHCP Client General Implementation and Management Issues ..........................1192 ☯ DHCP Message Relaying and BOOTP Relay Agents.............................................1193 ☯ DHCP Autoconfiguration / Automatic Private IP Addressing (APIPA).................1195 ☯ DHCP Server Conflict Detection ..............................................................................1198 ☯ DHCP and BOOTP Interoperability..........................................................................1199 ☯ DHCP Security Issues...............................................................................................1201 ☯ DHCP For IP Version 6 (DHCPv6) .....................................................................1203 ☯ TCP/IP Network Management Framework and Protocols (SNMP and RMON) ...............................................................................................1205 ☯ TCP/IP Internet Standard Management Framework Overview, Architecture, Components and Concepts..................................................1206 ☯ Overview and History of the TCP/IP Internet Standard Management Framework and Simple Network Management Protocol (SNMP) ..................1206
📄 Page
18
The TCP/IP Guide - Version 3.0 (Contents) xviii © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ TCP/IP SNMP Operational Model, Components and Terminology. ...............1209 ☯ TCP/IP Internet Standard Management Framework Architecture and Protocol Components........................................................................................1212 ☯ TCP/IP Internet Standard Management Framework and SNMP Versions (SNMPv1, SNMPv2 Variants, SNMPv3) ............................................1214 ☯ TCP/IP Internet Standard Management Framework and SNMP Standards............................................................................................................1217 ☯ TCP/IP Structure of Management Information (SMI) and Management Information Bases (MIBs) .....................................................1222 ☯ TCP/IP Structure of Management Information (SMI) and Management Information Bases (MIBs) Overview .................................................................1222 ☯ TCP/IP MIB Objects, Object Characteristics and Object Types.....................1226 ☯ TCP/IP MIB Object Descriptors and Identifiers and the Object Name Hierarchy and Name Notation ................................................................1230 ☯ TCP/IP MIB Modules and Object Groups .........................................................1234 ☯ TCP/IP Simple Network Management Protocol (SNMP) Protocol ............1239 ☯ SNMP Protocol Overview, History and General Concepts.............................1240 ☯ SNMP Protocol Operations ...............................................................................1242 ☯ SNMP Protocol General Operation, Communication Methods and Message Classes ......................................................................................................1242 ☯ SNMP Protocol Basic Request/Response Information Poll Using GetRequest and (Get)Response Messages............................................................1245 ☯ SNMP Protocol Table Traversal Using GetNextRequest and GetBulkRequest Messages ......................................................................................1246 ☯ SNMP Protocol Object Modification Using SetRequest Messages......................1248 ☯ SNMP Protocol Information Notification Using Trap(v2) and InformRequest Messages.........................................................................................1250 ☯ SNMP Protocol Security Issues and Methods........................................................1252 ☯ SNMP Protocol Messaging and Message Formats .........................................1255 ☯ SNMP Protocol Message Generation, Addressing, Transport and Retransmission .........................................................................................................1255 ☯ SNMP Message Field Definitions, General Message Format and Message Sections .....................................................................................................1257 ☯ SNMP Version 1 (SNMPv1) Message Format .........................................................1261 ☯ SNMP Version 2 (SNMPv2) Message Formats .......................................................1265 ☯ SNMP Version 3 (SNMPv3) Message Format .........................................................1274 ☯ TCP/IP Remote Network Monitoring (RMON).............................................1279 ☯ TCP/IP Key Applications and Application Protocols .......................1283 ☯ TCP/IP Application Layer Addressing: Uniform Resource Identifiers, Locators and Names (URIs, URLs and URNs)...................1284 ☯ Uniform Resource Identifiers, Locators and Names (URIs, URLs and URNs): Overview, History, Significance and Standards....................1285 ☯ Uniform Resource Locators (URLs)............................................................1288 ☯ URL General Syntax...........................................................................................1288 ☯ URL Schemes (Applications / Access Methods) and Scheme-Specific Syntaxes..............................................................................................................1292 ☯ URL Relative Syntax and Base URLs ...............................................................1296 ☯ URL Length and Complexity Issues .................................................................1300 ☯ URL Obscuration, Obfuscation and General Trickery ....................................1303 ☯ Uniform Resource Names (URNs)...............................................................1308
📄 Page
19
The TCP/IP Guide - Version 3.0 (Contents) xix © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher) .............1312 ☯ File and Message Transfer Overview and Application Categories ..........1313 ☯ TCP/IP General File Transfer Protocols (FTP and TFTP) ..........................1315 ☯ File Transfer Protocol (FTP) ..............................................................................1316 ☯ FTP Overview, History and Standards ....................................................................1317 ☯ FTP Concepts and General Operation ....................................................................1319 ☯ FTP Operational Model, Protocol Components and Key Terminology .........1319 ☯ FTP Control Connection Establishment, User Authentication and Anonymous FTP Access....................................................................................1323 ☯ FTP Data Connection Management, Normal (Active) and Passive Data Connections and Port Usage....................................................................1326 ☯ FTP General Data Communication and Transmission Modes .......................1330 ☯ FTP Data Representation: Data Types, Data Structures and Format Control .................................................................................................................1331 ☯ FTP Commands and Replies....................................................................................1335 ☯ FTP Internal Protocol Commands and Command Groups .............................1335 ☯ FTP Replies, Reply Code Format and Important Reply Codes ......................1339 ☯ FTP User Interface and User Commands.........................................................1344 ☯ FTP Sample User and Internal Command Dialog...................................................1348 ☯ Trivial File Transfer Protocol (TFTP) ................................................................1351 ☯ TFTP Overview, History and Standards..................................................................1351 ☯ TFTP General Operation, Connection Establishment and Client/Server Communication .........................................................................................................1354 ☯ TFTP Detailed Operation and Messaging ...............................................................1356 ☯ TFTP Options and Option Negotiation....................................................................1359 ☯ TFTP Message Formats............................................................................................1363 ☯ TCP/IP Electronic Mail System: Concepts and Protocols (RFC 822, MIME, SMTP, POP3, IMAP) .........................................................1369 ☯ TCP/IP Electronic Mail System Overview and Concepts................................1370 ☯ TCP/IP Electronic Mail System Overview and History...........................................1370 ☯ TCP/IP Electronic Mail Communication Overview: Message Composition, Submission, Delivery, Receipt, Processing and Access ..............1372 ☯ TCP/IP Electronic Mail Message Communication Model and Device and Protocol Roles ...................................................................................................1375 ☯ TCP/IP Electronic Mail Addresses and Addressing........................................1379 ☯ TCP/IP Electronic Mail Addressing and Address Resolution ...............................1379 ☯ TCP/IP Historical and Special Electronic Mail Addressing ...................................1382 ☯ TCP/IP Electronic Mail Aliases / Address Books, Multiple Recipient Addressing and Electronic Mailing Lists................................................................1384 ☯ TCP/IP Electronic Mail Message Formats and Message Processing: RFC 822 and MIME .............................................................................................1387 ☯ TCP/IP Electronic Mail Standard Message Format: RFC 822................................1388 ☯ TCP/IP Electronic Mail RFC 822 Standard Message Format Overview, Structure and General Formatting Rules .......................................1388 ☯ TCP/IP Electronic Mail RFC 822 Standard Message Format Header Field Definitions and Groups.............................................................................1391 ☯ TCP/IP Electronic Mail RFC 822 Standard Message Format Processing and Interpretation...........................................................................1395 ☯ TCP/IP Enhanced Electronic Mail Message Format: Multipurpose Internet Mail Extensions (MIME) ..............................................................................1398 ☯ MIME Message Format Overview, Motivation, History and Standards..........1398 ☯ MIME Basic Structures and Headers ................................................................1401
📄 Page
20
The TCP/IP Guide - Version 3.0 (Contents) xx © 2001-2005 Charles M. Kozierok. All Rights Reserved. ☯ MIME Content-Type Header and Discrete Media: Types, Subtypes and Parameters...................................................................................................1405 ☯ MIME Composite Media Types: Multipart and Encapsulated Message Structures............................................................................................1411 ☯ MIME Content-Transfer-Encoding Header and Encoding Methods...............1416 ☯ MIME Extension for Non-ASCII Mail Message Headers ..................................1420 ☯ TCP/IP Electronic Mail Delivery Protocol: The Simple Mail Transfer Protocol (SMTP) .................................................................................................1422 ☯ SMTP Overview, History and Standards.................................................................1422 ☯ SMTP Communication and Message Transport Methods, Client/Server Roles and Terminology ............................................................................................1424 ☯ SMTP Connection and Session Establishment and Termination.........................1426 ☯ SMTP Mail Transaction Process..............................................................................1430 ☯ SMTP Special Features, Capabilities and Extensions...........................................1434 ☯ SMTP Security Issues...............................................................................................1436 ☯ SMTP Commands......................................................................................................1439 ☯ SMTP Replies and Reply Codes ..............................................................................1441 ☯ TCP/IP Electronic Mail Access and Retrieval Protocols and Methods .........1446 ☯ TCP/IP Electronic Mail Mailbox Access Model, Method and Protocol Overview ....................................................................................................................1447 ☯ TCP/IP Post Office Protocol (POP/POP3) ...............................................................1450 ☯ POP Overview, History, Versions and Standards............................................1450 ☯ POP3 General Operation, Client/Server Communication and Session States...................................................................................................................1452 ☯ POP3 Authorization State: User Authentication Process and Commands ..........................................................................................................1453 ☯ POP3 Transaction State: Mail and Information Exchange Process and Commands...................................................................................................1456 ☯ POP3 Update State: Mailbox Update and Session Termination Process and Commands....................................................................................1461 ☯ TCP/IP Internet Message Access Protocol (IMAP/IMAP4).....................................1463 ☯ IMAP Overview, History, Versions and Standards ..........................................1463 ☯ IMAP General Operation, Client/Server Communication and Session States ....................................................................................................1466 ☯ IMAP Commands, Results and Responses......................................................1469 ☯ IMAP Not Authenticated State: User Authentication Process and Commands ..........................................................................................................1472 ☯ IMAP Authenticated State: Mailbox Manipulation/Selection Process and Commands...................................................................................................1474 ☯ IMAP Selected State: Message Manipulation Process and Commands........1476 ☯ Other TCP/IP Electronic Mail Access and Retrieval Methods...............................1479 ☯ TCP/IP Direct Server Electronic Mail Access...................................................1479 ☯ TCP/IP World Wide Web Electronic Mail Access.............................................1481 ☯ Usenet (Network News) and the TCP/IP Network News Transfer Protocol (NNTP) ............................................................................................1483 ☯ Usenet Overview, Concepts and General Operation ......................................1484 ☯ Usenet Overview, History and Standards...............................................................1484 ☯ Usenet Communication Model: Message Composition, Posting, Storage, Propagation and Access ..........................................................................................1487 ☯ Usenet Addressing: Newsgroups, Newsgroup Hierarchies and Types...............1490 ☯ Usenet Message Format and Special Headers.......................................................1494 ☯ TCP/IP Network News Transfer Protocol (NNTP) ............................................1499 ☯ NNTP Overview and General Operation..................................................................1499 ☯ NNTP Inter-Server Communication Process: News Article Propagation ............1501