1、TCP/IP IllustratedTCP/IP Illustrated,Volume 1 The Protocols W. Richard StevensContentsPreface Chapter 1. Introduction1.1 Introduction1.2 Layering1.3 TCP/IP Layering1.4 Internet Addresses1.5 The Domain Name System1.6 Encapsulation1.7 Demultiplexing1.8 Client-Server Model1.9 Port Numbers1.10 Standardi
2、zation Process1.11 RFCs1.12 Standard, Simple Services1.13 The Internet1.14 Implementations1.15 Application Programming Interfaces1.16 Test Network1.17 SummaryChapter 2. Link Layer2.1 Introduction2.2 Ethernet and IEEE 802 Encapsulation2.3 Trailer Encapsulationfile:/D|/Documents%20and%20Settings/bigin
3、i/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (1 of 9) 12/09/2001 14.46.27TCP/IP Illustrated2.4 SLIP: Serial Line IP2.5 Compressed SLIP2.6 PPP: Point-to-Point Protocol2.7 Loopback Interface2.8 MTU2.9 Path MTU2.10 Serial Line Throughput Calculations2.11 SummaryChapter 3. IP: Internet Pro
4、tocol3.1 Introduction3.2 IP Header3.3 IP Routing3.4 Subnet Addressing3.5 Subnet Mask3.6 Special Case IP Address3.7 A Subnet Example3.8 ifconfig Command3.9 netstat Command3.10 IP Futures3.11 SummaryChapter 4. ARP: Address Resolution Protocol4.1 Introduction4.2 An Example4.3 ARP Cache4.4 ARP Packet Fo
5、rmat4.5 ARP Examples4.6 Proxy ARP4.7 Gratuitous ARP4.8 arp Command4.9 SummaryChapter 5. RARP: Reverse Address Resolution Protocol5.1 Introduction5.2 RARP Packet Format5.3 RARP Examples5.4 RARP Server design5.5 Summaryfile:/D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illus
6、trated/index.htm (2 of 9) 12/09/2001 14.46.27TCP/IP IllustratedChapter 6. ICMP: Internet Control Message Protocol6.1 Introduction6.2 ICMP Message Types6.3 ICMP Address Mask Request and Reply6.4 ICMP Timestamp Request and Reply6.5 ICMP Port Unreachable Error6.6 4.4BSD Processing of ICMP Messages6.7 S
7、ummaryChapter 7. Ping Program7.1 Introduction7.2 Ping Program7.3 IP Record Route Option7.4 IP Timestamp Option7.5 SummaryChapter 8. Traceroute Program8.1 Introduction8.2 Traceroute Program operation8.3 LAN output8.4 WAN output8.5 IP Source Routing Option8.6 SummaryChapter 9. IP Routing9.1 Introducti
8、on9.2 Routing Principles9.3 ICMP Host and Network Unreachable Errors9.4 To Forward or Not to Forward9.5 ICMP Redirect Errors9.6 ICMP Router Discovery Messages9.7 SummaryChapter 10. Dynamic Routing Protocols10.1 Introduction10.2 Dynamic Routing10.3 Unix Routing Daemonsfile:/D|/Documents%20and%20Setti
9、ngs/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (3 of 9) 12/09/2001 14.46.27TCP/IP Illustrated10.4 RIP: Routing Information Protocol10.5 RIP Version 210.6 OSPF: Open Shortest Path First10.7 BGP: Border Gateway Protocol10.8 CIDR: Classless Interdomain Routing10.9 SummaryChapter 11
10、. UDP: User Datagram Protocol11.1 Introduction11.2 UDP Header11.3 UDP Checksum11.4 A Simple Example11.5 IP Fragmentation11.6 ICMP Unreachable Error (Fragmentation Required)11.7 Determining the Path MTU Using Traceroute11.8 Path MTU Discovery with UDP11.9 Interaction Between UDP and ARP11.10 Maximum
11、UDP Datagram Size11.11 ICMP Source Quench Error11.12 UDP Server Design11.13 SummaryChapter 12. Broadcasting and Multicasting12.1 Introduction12.2 Broadcasting12.3 Broadcasting Examples12.4 Multicasting12.5 SummaryChapter 13. IGMP: Internet Group Management Protocol13.1 Introduction13.2 IGMP Message1
12、3.3 IGMP Protocol13.4 An Example13.5 SummaryChapter 14. DNS: The Domain Name System14.1 Introduction14.2 DNS Basicsfile:/D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (4 of 9) 12/09/2001 14.46.27TCP/IP Illustrated14.3 DNS Message Format14.4 A Simple Ex
13、ample14.5 Pointer Quiries14.6 Resourse Records14.7 Caching14.8 UDP or TCP14.9 Another Example14.10 SummaryChapter 15. TFTP: Trivial File Transfer Protocol15.1 Introduction15.2 Protocol15.3 An Example15.4 Security15.5 SummaryChapter 16. BOOTP: Bootstrap Protocol16.1 Introduction16.2 BOOTP Packet Form
14、at16.3 An Example16.4 BOOTP Server Design16.5 BOOTP Through a Router16.6 Vendor-Specific Information16.7 SummaryChapter 17. TCP: Transmission Control Protocol17.1 Introduction17.2 TCP Services17.3 TCP Header17.4 SummaryChapter 18. TCP Connection Establishment and Termination18.1 Introduction18.2 Con
15、nection Establishment and Termination18.3 Timeout of Connection Establishment18.4 Maximum Segment Size18.5 TCP Half-Close18.6 TCP State Transition Diagram18.7 Reset Segmentsfile:/D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (5 of 9) 12/09/2001 14.46.2
16、7TCP/IP Illustrated18.8 Simultaneous Open18.9 Simultaneous Close18.10 TCP Options18.11 TCP Server Design18.12 SummaryChapter 19. TCP Interactive Data Flow19.1 Introduction19.2 Interactive Input19.3 Delayed Acknoledgements19.4 Nagle Algorithm19.5 Windows Size Advertisments19.6 SummaryChapter 20. TCP
17、Bulk Data Flow20.1 Introduction20.2 Normal Data Flow20.3 Sliding Windows20.4 Window Size20.5 PUSH Flag20.6 Slow Start20.7 Bulk Data Throughput20.8 Urgent Mode20.9 SummaryChapter 21. TCP Timeout and Retransmission21.1 Introduction21.2 Simple Timeout and Retransmission Example21.3 Round-Trip Time Meas
18、urement21.4 An RTT Example21.5 Congestion Example21.6 Congestion Avoidance Algorithm21.7 Fast Retransmit and Fast Recovery Algorithm21.8 Congestion Example (Continued)21.9 Per-Route Metrics21.10 ICMP Errors21.11 Repacketization21.12 Summaryfile:/D|/Documents%20and%20Settings/bigini/Documenti/homenet
19、2run/tcpip/tcp-ip-illustrated/index.htm (6 of 9) 12/09/2001 14.46.27TCP/IP IllustratedChapter 22. TCP Persist Timer22.1 Introduction22.2 An Example22.3 Silly Windows Syndrome22.4 SummaryChapter 23. TCP Keepalive Timer23.1 Introduction23.2 Description23.3 Keepalive Examples23.4 SummaryChapter 24. TCP
20、 Futures and Performance24.1 Introduction24.2 Path MTU Discovery24.3 Long Fat Pipes24.4 Windows Scale Option24.5 Timestamp Option24.6 PAWS: Protection Against Wrapped Sequence Numbers24.7 T/TCP: A TCP Extension for Transactions24.8 TCP Performance24.9 SummaryChapter 25. SNMP: Simple Network Manageme
21、nt Protocol25.1 Introduction25.2 Protocol25.3 Structure of Management Information25.4 Object Identifiers25.5 Introduction to the Management Information Base25.6 Instance Identification25.7 Simple Examples25.8 Management Information Base (Continued)25.9 Additional Examples25.10 Traps25.11 ASN.1 and B
22、ER25.12 SNMP Version 225.13 Summaryfile:/D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (7 of 9) 12/09/2001 14.46.27TCP/IP IllustratedChapter 26. Telnet and Rlogin: Remote Login26.1 Introduction26.2 Rlogin Protocol26.3 Rlogin Examples26.4 Telnet Protoco
23、l26.5 Telnet Examples26.6 SummaryChapter 27. FTP: File Transfer Protocol27.1 Introduction27.2 FTP Protocol27.3 FTP Examples27.4 SummaryChapter 28. SMTP: Simple Mail Transfer Protocol28.1 Introduction28.2 SMTP Protocol28.3 SMTP Examples28.4 SMTP Futures28.5 SummaryChapter 29. NFS: Network File System
24、29.1 Introduction29.2 Sun Remote Procedure Call29.3 XDR: External Data Representation29.4 Port Mapper29.5 NFS Protocol29.6 NFS Examples29.7 NFS Version 329.8 SummaryChapter 30. Other TCP/IP Applications30.1 Introduction30.2 Finger Protocol30.3 Whois Protocol30.4 Archie, WAIS, Gopher, Veronica and WW
25、W30.5 X Window System30.6 Summaryfile:/D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (8 of 9) 12/09/2001 14.46.27TCP/IP IllustratedAppendix A. The tcpdump ProgramA.1 BSD Packet FilterA.2 SunOS Network Interface TapA.3 SVR4 Data Link Provider InterfaceA
26、.4 tcpdump OutputA.5 Security ConsiderationsA.6 Socket Debug OptionAppendix B. Computer ClocksAppendix C. The sock ProgramAppendix D. Solutions to Selected ExercisesAppendix E. Configurable OptionsE.1 BSD/386 version 1.0E.2 SunOS 4.1.3E.3 System V Release 4E.4 Solaris 2.2E.5 AIX 3.2.2E.6 4.4BSDAppen
27、dix F. Source Code AvailabilityAcronyms You can write to the designer of this page. All critics are welcome. file:/D|/Documents%20and%20Settings/bigini/Documenti/homenet2run/tcpip/tcp-ip-illustrated/index.htm (9 of 9) 12/09/2001 14.46.27PrefacePrefaceIntroductionThis book describes the TCP/IP protoc
28、ol suite, but from a different perspective than other texts on TCP/IP. Instead of just describing the protocols and what they do, well use a popular diagnostic tool to watch the protocols in action. Seeing how the protocols operate in varying circumstances provides a greater understanding of how the
29、y work and why certain design decisions were made. It also provides a look into the implementation of the protocols, without having to wade through thousands of lines of source code. When networking protocols were being developed in the 1960s through the 1980s, expensive, dedicated hardware was requ
30、ired 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
31、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 pr
32、oblems, 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
33、 computer systems and networks utilizing TCP/IP, and users who deal with TCP/IP applications on a daily basis. Organization of the BookThe following figure shows the various protocols and applications that are covered. The italic number by each box indicates the chapter in which that protocol or application is described. file:/D|/Documents%20and%20Settings/bigini/Docum.i/homenet2run/tcpip/tcp-ip-illustrated/preface.htm (1 of 6) 12/09/2001 14.46.28