Internet Core Protocols The Definitive Guide Internet Core Protocols The Definitive Guide Eric A. Hall Beijing• Cambridge• Farnham• Köln• Paris• Sebastopol• Taipei• Tokyo Internet Core Protocols: The Definitive Guide by Eric A. Hall Copyright © 2000 O’Reilly & Associates, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. Editor:Mike Loukides Production Editor:Nicole Arigo Cover Designer:Edie Freedman Printing History: February 2000: First Edition. Shomiti, Surveyor, and Surveyor-Lite are trademarks of Shomiti Systems, Inc. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly & Associates, Inc.Internet Core Protocols: The Definitive Guide, the imageoftrout,andrelatedtradedressaretrademarksofO’Reilly&Associates,Inc.Manyof thedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimed astrademarks.Wherethosedesignationsappearinthisbook,andO’Reilly&Associates,Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. Whileeveryprecautionhasbeentakeninthepreparationofthisbookandtheaccompanying CD,thepublisherassumesnoresponsibilityforerrorsoromissions,orfordamagesresulting from the use of the information contained herein. Library of Congress Cataloging-in-Publication Data: Hall, Eric A. Internet core protocols : the definitive guide / Eric A. Hall. p. cm. Includes bibliographical references. ISBN 1-56592-572-6 (alk. paper) 1. Internet (Computer network) 2. Computer network protocols. I. Title. TK5105.875.I57 H355 2000 004.6'2--dc21 99-089559 ISBN: 1-56592-572-6 [02/04] [M] Table of Contents Foreword ............................................................................................................... vii Preface ..................................................................................................................... xi 1. An Introduction to TCP/IP ..................................................................... 1 A Brief History of the Internet ......................................................................... 1 TCP/IP’s Architecture ....................................................................................... 6 TCP/IP Protocols and Services In-Depth ...................................................... 11 How Application Protocols Communicate Over IP ..................................... 26 2. The Internet Protocol ............................................................................ 31 The IP Standard .............................................................................................. 32 The IP Header ................................................................................................ 56 IP in Action ..................................................................................................... 86 Troubleshooting IP ........................................................................................ 94 3. The Address Resolution Protocol ...................................................... 97 The ARP Standard .......................................................................................... 98 The ARP Packet ............................................................................................ 113 ARP in Action ............................................................................................... 126 Debugging ARP Problems ........................................................................... 132 4. Multicasting and the Internet Group Management Protocol .....................................................................................................135 The IP Multicasting and IGMP Specifications ............................................. 137 IGMP Messages ............................................................................................ 150 v Oracle 8i Internal Services for Waits, Latches, Locks, and Memory, eMatter Edition Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved. vi Table of Contents Multicasting and IGMP in Action ................................................................ 165 Troubleshooting Multicasts and IGMP ........................................................ 168 5. The Internet Control Message Protocol ........................................ 172 The ICMP Specification ................................................................................ 173 ICMP Messages ............................................................................................. 195 ICMP in Action ............................................................................................. 229 Troubleshooting ICMP ................................................................................. 245 6. The User Datagram Protocol ........................................................... 250 The UDP Standard ....................................................................................... 251 The UDP Header .......................................................................................... 258 Troubleshooting UDP .................................................................................. 263 7. The Transmission Control Protocol ............................................... 268 The TCP Standard ........................................................................................ 269 The TCP Header ........................................................................................... 327 TCP in Action ............................................................................................... 360 Troubleshooting TCP ................................................................................... 384 A. The Internet Standardization Process .......................................... 399 B. IP Addressing Fundamentals ........................................................... 407 C. Using the CD-ROM ................................................................................ 417 Bibliography ..................................................................................................... 425 Index .................................................................................................................... 429 Oracle 8i Internal Services for Waits, Latches, Locks, and Memory, eMatter Edition Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved. Foreword The Internet began as a research effort to link different kinds of packet-switched networks in such a way that the computers that were attached to each of the packet networks did not need to know anything about the nature of or the exist- ence of any networks other than the ones to which the host was directly con- nected. What emerged was a layered design that used encapsulation to carry end- to-end “Internet” packets from the source host, through intermediate networks and gateways to the destination host. The first Internet incorporated three wide/ medium area networks including the ARPAnet, the Atlantic Packet Satellite net (SATNET), and a ground mobile Packet Radio network (PRNET). Eventually it also included the first 3 MB/s Ethernet developed at Xerox PARC in 1973. Now, some twenty-five years after the first designs, there are hundreds of thou- sands of networks comprising the Internet, serving an estimated 45 million com- puters and 150 million users. Moreover, the original speeds of the trunking circuits in the constituent networks have increased from thousands of bits per second to billions of bits per second, with trillions of bits per second lurking in laboratory demonstrations. As the Internet has grown, its complexity and the number of peo- ple dependent on it have both increased substantially. But the number of people with detailed understanding of the protocols and systems that allow the Internet to work represent a declining fraction of the total population of users or even opera- tors of such networks. Worse still is the fact that the number of protocols and services in use on those networks has also increased from a handful to hundreds. While it used to be that a single super-administrator could manage the routers, domain name servers, mail servers, and other resources on the network, we are now faced with so much spe- cialization that it seems impossible for any one person to follow everything. At many of the larger firms, there are entire departments that do nothing but manage vii This is the Title of the Book, eMatter Edition Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved. viii Foreword the network routers, while other groups manage the dial-up servers and still oth- ers manage the web and mail systems, domain name systems, and newsgroups. This is a serious problem. Large corporations can afford to hire specialists who understand their respective parts of the overall picture, but most companies can’t afford an army of specialists, and have to make do with a handful of network engineers who have to know “whatever’s necessary.” Furthermore, debugging and analyzing Internet problems defies specialization. Problems often arise because of the interactions between different parts of the network. If email isn’t being deliv- ered, is the problem with the mail server itself? Or has something gone wrong with routing, the domain name system, or with the low-level protocols that map Ether- net addresses to Internet addresses? It may be unrealistic to expect one person to diagnose problems in all of these areas (plus a dozen more), but many network operators face this challenge daily. When problems do occur, administrators have a variety of tools available for debugging purposes. This includes packet analyzers that can show you the inner core of the network traffic, although they won’t tell you what that traffic means. Another set of tools is the vendor’s own documentation, although more often than not the vendor’s documentation is based on the same misreading of the specs as the problematic software. One of the last alternatives is for the administrator to prowl through the protocol’s technical specifications in order to determine where the problem really lies. But when it’s 4 a.m. and the web server in Chicago keeps dropping its connection to the database server in Atlanta, these specifications are of limited use. These documents were written largely as strict definitions of behav- ior that should occur, and generally do not describe ways in which the protocols might be made to fail. That’s why these books were written. Throughout this series, Eric Hall takes you behind the scenes to discover the function and rationale behind the protocols used on IP networks, offering thorough examinations of the theory behind how things are supposed to work. Furthermore, Hall backs up the tutorial-oriented discussion with packet captures from real-world monitoring tools, providing an indispens- able reference for when you need to know what a particular field in a specific packet is supposed to look like. In addition, Hall also discusses the common symptoms of what things look like when they break, providing detailed clues and discussions on the most common interoperability problems. This three-way combination of tutorial/reference/debugging-guide essentially makes these books all-inclusive “owner’s manuals” for IP-based networks. They are attractive volumes for any network manager who works with Internet technol- ogies, particularly as the Internet continues to go through the growing pains result- ing from near-exponential growth. Even though there are already more than 44 million devices connected now, all indications point to there being nearly a billion This is the Title of the Book, eMatter Edition Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Description: