LET'S CONNECT!
Enter for a chance to win an eBook of your choice from InformIT. Fill out the form.
Register your product to gain access to bonus material or receive a coupon.
TCP/IP Illustrated is a complete and detailed guide to the entire TCP/IP protocol suite-with an important difference from other books on the subject. Rather than just describing what the RFCs say the protocol suite should do, this unique book uses a popular diagnostic tool so you may actually watch the protocols in action.By forcing various conditions to occur-such as connection establishment, timeout and retransmission, and fragmentation-and then displaying the results, TCP/IP Illustrated gives you a much greater understanding of these concepts than words alone could provide. Whether you are new to TCP/IP or you have read other books on the subject, you will come away with an increased understanding of how and why TCP/IP works the way it does, as well as enhanced skill at developing applications that run over TCP/IP.
With this unique approach, TCP/IP Illustrated presents the structure and function of TCP/IP from the link layer up through the network, transport, and application layers. You will learn about the protocols that belong to each of these layers and how they operate under numerous implementations, including Sun OS 4.1.3, Solaris 2.2, System V Release 4, BSD/386TM, AIX 3.2.2, and 4.4BSD.In TCP/IP Illustrated you will find the most thorough coverage of TCP available - 8 entire chapters. You will also find coverage of the newest TCP/IP features, including multicasting, path MTU discovery, and long fat pipes.
"While all of Stevens' books are excellent, this new opus (TCP/IP Illustrated, Volume 1) is awesome. Although many books describe the TCP/IP protocols, the author provides a level of depth and real-world detail lacking from the competition."
- Unix Review
"This book (TCP/IP Illustrated, Volume 1) is a stone jewel...Written by W. Richard Stevens, this book probably provides the most comprehensive view of TCP/IP available today in print."
- Boardwatch
"The diagrams he uses are excellent and his writing style is clear and readable. Please read it (TCP/IP Illustrated, Volume 1) and keep it on your bookshelf."
- Sys Admin
"The word 'illustrated' distinguishes this book (TCP/IP Illustrated, Volume 1) from its many rivals. Stevens uses the Lawrence Berkeley Laboratories tcdump program to capture packets in promiscuous mode under a variety of OS and TCP/IP implementations. Studying tcdump output helps you understand how the various protocols work."
- Unix Review
Introducing the Java Apache Mail Enterprise Server (a.k.a. James)
Click for Web Resources related to
this title.
Posters
1. Introduction.
Introduction.
Layering.
TCP/IP Layering.
Internet Addresses.
The Domain Name System.
Encapsulation.
Demultiplexing.
Client-Server Model.
Port Numbers.
Standardization Process.
RFCs.
Standard, Simple Services.
The Internet.
Implementations.
Application Programming Interfaces.
Test Network.
Summary.
Introduction.
Ethernet and IEEE 802 Encapsulation.
Trailer Encapsulation.
SLIP: Serial Line IP.
Compressed SLIP.
PPP: Point-to-Point Protocol.
Loopback Interface.
MTU.
Path MTU.
Serial Line Throughput Calculations.
Summary.
Introduction.
IP Header.
IP Routing.
Subnet Addressing.
Subnet Mask.
Special Case IP Addresses.
A Subnet Example.
ifconfig Command.
netstat Command.
IP Futures.
Summary.
Introduction.
An Example.
ARP Cache.
ARP Packet Format.
ARP Examples.
Proxy ARP.
Gratuitous ARP.
arp Command.
Summary.
Introduction.
RARP Packet Format.
RARP Examples.
RARP Server Design.
Summary.
Introduction.
ICMP Message Types.
ICMP Address Mask Request and Reply.
ICMP Timestamp Request and Reply.
ICMP Port Unreachable Error.
4.4BSD Processing of ICMP Messages.
Summary.
Introduction.
Ping Program.
IP Record Route Option.
IP Timestamp Option.
Summary.
Introduction.
Traceroute Program Operation.
LAN Output.
WAN Output.
IP Source Routing Option.
Summary.
Introduction.
Routing Principles.
ICMP Host and Network Unreachable Errors.
To Forward or Not to Forward.
ICMP Redirect Errors.
ICMP Router Discovery Messages.
Summary.
Introduction.
Dynamic Routing.
Unix Routing Daemons.
RIP: Routing Information Protocol.
RIP Version 2.
OSPF: Open Shortest Path First.
BGP: Border Gateway Protocol.
CIDR: Classless Interdomain Routing.
Summary.
Introduction.
UDP Header.
UDP Checksum.
A Simple Example.
IP Fragmentation.
ICMP Unreachable Error (Fragmentation Required).
Determining the Path MTU Using Traceroute.
Path MTU Discovery with UDP.
Interaction Between UDP and ARP.
Maximum UDP Datagram Size.
ICMP Source Quench Error.
UDP Server Design.
Summary.
Introduction.
Broadcasting.
Broadcasting Examples.
Multicasting.
Summary.
Introduction.
IGMP Message.
IGMP Protocol.
An Example.
Summary.
Introduction.
DNS Basics.
DNS Message Format.
A Simple Example.
Pointer Queries.
Resource Records.
Caching.
UDP or TCP.
Another Example.
Summary.
Introduction.
Protocol.
An Example.
Security.
Summary.
Introduction.
BOOTP Packet Format.
An Example.
BOOTP Server Design.
BOOTP Through a Router.
Vendor-Specific Information.
Summary.
Introduction.
TCP Services.
TCP Header.
Summary.
Introduction.
Connection Establishment and Termination.
Timeout of Connection Establishment.
Maximum Segment Size.
TCP Half-Close.
TCP State Transition Diagram.
Reset Segments.
Simultaneous Open.
Simultaneous Close.
TCP Options.
TCP Server Design.
Summary.
Introduction.
Interactive Input.
Delayed Acknowledgments.
Nagle Algorithm.
Window Size Advertisements.
Summary.
Introduction.
Normal Data Flow.
Sliding Windows.
Window Size.
PUSH Flag.
Slow Start.
Bulk Data Throughput.
Urgent Mode.
Summary.
Introduction.
Simple Timeout and Retransmission Example.
Round-Trip Time Measurement.
An RTT Example.
Congestion Example.
Congestion Avoidance Algorithm.
Fast Retransmit and Fast Recovery Algorithms.
Congestion Example (Continued).
Per-Route Metrics.
ICMP Errors.
Repacketization.
Summary.
Introduction.
An Example.
Silly Window Syndrome.
Summary.
Introduction.
Description.
Keepalive Examples.
Summary.
Introduction.
Path MTU Discovery.
Long Fat Pipes.
Window Scale Option.
Timestamp Option.
PAWS: Protection Against Wrapped Sequence Numbers.
T/TCP: A TCP Extension for Transactions.
TCP Performance.
Summary.
Introduction.
Protocol.
Structure of Management Information.
Object Identifiers.
Introduction to the Management Information Base.
Instance Identification.
Simple Examples.
Management Information Base (Continued).
Additional Examples.
Traps.
ASN.1 and BER.
SNMP Version 2.
Summary.
Introduction.
Rlogin Protocol.
Rlogin Examples.
Telnet Protocol.
Telnet Examples.
Summary.
Introduction.
FTP Protocol.
FTP Examples.
Summary.
Introduction.
SMTP Protocol.
SMTP Examples.
SMTP Futures.
Summary.
Introduction.
Sun Remote Procedure Call.
XDR: External Data Representation.
Port Mapper.
NFS Protocol.
NFS Examples.
NFS Version 3.
Summary.
Introduction.
Finger Protocol.
Whois Protocol.
Archie, WAIS, Gopher, Veronica, and WWW.
X Window System.
Summary.
BSD Packet Filter.
SunOS Network Interface Tap.
SVR4 Data Link Provider Interface.
tcpdump Output.
Security Considerations.
Socket Debug Option.
BSD/386 Version 1.0.
SunOS 4.1.3.
System V Release 4.
Solaris 2.2.
AIX 3.2.2.
4.4BSD.
When networking protocols were being developed in the 1960s through the 1980s, expensive, dedicated hardware was required to see the packets going "across the wire." Extreme familiarity with the protocols was also required to comprehend the packets displayed by the hardware. Functionality of the hardware analyzers was limited to that built in by the hardware designers.
Today this has changed dramatically with the ability of the ubiquitous workstation to monitor a local area network Mogul 1990. Just attach a workstation to your network, run some publicly available software (described in Appendix A), and watch what goes by on the wire. While many people consider this a tool to be used for diagnosing network problems, it is also a powerful tool for understanding how the network protocols operate, which is the goal of this book.
This book is intended for anyone wishing to understand how the TCP/IP protocols operate: programmers writing network applications, system administrators responsible for maintaining computer systems and networks utilizing TCP/IP, and users who deal with TCP/IP applications on a daily basis.
This book also uses a functional approach instead of following a strict bottom-to-top order. For example, Chapter 3 describes the IP layer and the IP header. But there are numerous fields in the IP header that are best described in the context of an application that uses or is affected by a particular field. Fragmentation, for example, is best understood in terms of UDP (Chapter 11), the protocol often affected by it. The time-to-live field is fully described when we look at the Traceroute program in Chapter 8, because this field is the basis for the operation of the program. Similarly, many features of ICMP are described in the later chapters, in terms of how a particular ICMP message is used by a protocol or an application.
We also don't want to save all the good stuff until the end, so we describe TCP/IP applications as soon as we have the foundation to understand them. Ping and Traceroute are described after IP and ICMP have been discussed. The applications built on UDP (multicasting, the DNS, TFTP, and BOOTP) are described after UDP has been examined. The TCP applications, however, along with network management, must be saved until the end, after we've thoroughly described TCP. This text focuses on how these applications use the TCP/IP protocols. We do not provide all the details on running these applications.
This book can be used in many ways. It can be used as a self-study reference and covered from start to finish by someone interested in all the details on the TCP/IP protocol suite. Readers with some TCP/IP background might want to skip ahead and start with Chapter 7, and then focus on the specific chapters in which they're interested. Exercises are provided at the end of the chapters, and most solutions are in Appendix D. This is to maximize the usefulness of the text as a self-study reference.
When used as part of a one- or two-semester course in computer networking, the focus should be on IP (Chapters 3 and 9), UDP (Chapter 11), and TCP (Chapters 17-24), along with some of the application chapters.
Many forward and backward references are provided throughout the text, along with a thorough index, to allow individual chapters to be studied by themselves. A list of all the acronyms used throughout the text, along with the compound term for the acronym, appears on the inside back covers.
If you have access to a network you are encouraged to obtain the software used in this book (Appendix F) and experiment on your own. Hands-on experimentation with the protocols will provide the greatest knowledge (and make it more fun).
Most of the systems have a name that indicates the type of software being used: bsdi, svr4, sun, solaris, aix, slip, and so on. In this way we can identify the type of software that we're dealing with by looking at the system name in the printed output.
A wide range of different operating systems and TCP/IP implementations are used:
Also, we always include the name of the system as part of the shell prompt (bsdi in this example) to show on which host the command was run.
Throughout the text we'll use indented, parenthetical notes such as this to describe historical points or implementation details.We sometimes refer to the complete description of a command in the Unix manual as in ifconfig(8). This notation, the name of the command followed by a number in parentheses, is the normal way of referring to Unix commands. The number in parentheses is the section number in the Unix manual of the "manual page" for the command, where additional information can be located. Unfortunately not all Unix systems organize their manuals the same, with regard to the section numbers used for various groupings of commands. We'll use the BSD-style section numbers (which is the same for BSD-derived systems such as SunOS 4.1.3), but your manuals may be organized differently.
The consulting editor, Brian Kernighan, is undoubtedly the best in the business. He was the first one to read various drafts of the manuscript and mark it up with his infinite supply of red pens. His attention to detail, his continual prodding for readable prose, and his thorough reviews of the manuscript are an immense resource to a writer.
Technical reviewers provide a different point of view and keep the author honest by catching technical mistakes. Their comments, suggestions, and (most importantly) criticisms add greatly to the final product. My thanks to Steve Bellovin, Jon Crowcroft, Pete Haverlock, and Doug Schmidt for comments on the entire manuscript. Equally valuable comments were provided on portions of the manuscript by Dave Borman, Tony DeSimone, Bob Gilligan, Jeff Gitlin, John Gulbenkian, Tom Herbert, Mukesh Kacker, Barry Margolin, Paul Mockapetris, Burr Nelson, Steve Rago, James Risner, Chris Walquist, Phil Winterbottom, and Gary Wright. A special thanks to Dave Borman for his thorough review of all the TCP chapters, and to Bob Gilligan who should be listed as a coauthor for Appendix E.
An author cannot work in isolation, so I would like to thank the following persons for lots of small favors, especially by answering my numerous e-mail questions: Joe Godsil, Jim Hogue, Mike Karels, Paul Lucchina, Craig Partridge, Thomas Skibo, and Jerry Toporek.
This book is the result of my being asked lots of questions on TCP/IP for which I could find no quick, immediate answer. It was then that I realized that the easiest way to obtain the answers was to run small tests, forcing certain conditions to occur, and just watch what happens. I thank Pete Haverlock for asking the probing questions and Van Jacobson for providing so much of the publicly available software that is used in this book to answer the questions.
A book on networking needs a real network to work with along with access to the Internet. My thanks to the National Optical Astronomy Observatories (NOAO), especially Sidney Wolff, Richard Wolff, and Steve Grandi, for providing access to their networks and hosts. A special thanks to Steve Grandi for answering lots of questions and providing accounts on various hosts. My thanks also to Keith Bostic and Kirk McKusick at the U.C. Berkeley CSRG for access to the latest 4.4BSD system.
Finally, it is the publisher that pulls everything together and does whatever is required to deliver the final product to the readers. This all revolves around the editor, and John Wait is simply the best there is. Working with John and the rest of the professionals at Addison-Wesley is a pleasure. Their professionalism and attention to detail show in the end result.
Camera-ready copy of the book was produced by the author, a Troff die-hard, using the Groff package written by James Clark. I welcome electronic mail from any readers with comments, suggestions, or bug fixes.
W. Richard Stevens
rstevens@noao.edu
Tucson, Arizona
October 1993
0201633469P04062001
Quotes of Note"While all of Stevens' books are excellent, this new opus (TCP/IP Illustrated, Volume 1) is awesome. Although many books describe the TCP/IP protocols, the author provides a level of depth and real-world detail lacking from the competition."
"This book (TCP/IP Illustrated, Volume 1) is a stone jewel...Written by W. Richard Stevens, this book probably provides the most comprehensive view of TCP/IP available today in print."
"The diagrams he uses are excellent and his writing style is clear and readable. Please read it (TCP/IP Illustrated, Volume 1) and keep it on your bookshelf."
"The word 'illustrated' distinguishes this book (TCP/IP Illustrated, Volume 1) from its many rivals. Stevens uses the Lawrence Berkeley Laboratories tcdump program to capture packets in promiscuous mode under a variety of OS and TCP/IP implementations. Studying tcdump output helps you understand how the various protocols work."
Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.
This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.
To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:
For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.
For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.
Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.
Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.
If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.
On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.
We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.
Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.
Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.
This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.
This site currently does not respond to Do Not Track signals.
Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.
This site is not directed to children under the age of 13.
Pearson may send or direct marketing communications to users, provided that
Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.
If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.
Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.
Pearson does not rent or sell personal information in exchange for any payment of money.
While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.
California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.
Pearson may disclose personal information, as follows:
This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.
Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.
We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.
Last Update: November 17, 2020