|
|
George V. Neville-Neil courtesy. Published with permission.
TCP-IP FAQ
Archive-name:tcp-ip/FAQ
Last-modified: 1996/4/1
Internet Protocol Frequently Asked Questions
Maintained by: George V. Neville-Neil (gnn@wrs.com)
Contributions from:
Ran Atkinson
Mark Bergman
Stephane Bortzmeyer
Rodney Brown
Dr. Charles E. Campbell Jr.
Phill Conrad
Alan Cox
Rick Jones
Jon Kay
Jay Kreibrich
William Manning
Barry Margolin
Jim Muchow
Subu Rama
W. Richard Stevens
Version 3.3
************************************************************************
The following is a list of Frequently Asked Questions, and
their answers, for people interested in the Internet Protocols,
including TCP, UDP, ICMP and others. Please send all additions,
corrections, complaints and kudos to the above address. This FAQ will
be posted on or about the first of every month.
This FAQ is available for anonymous ftp from :
ftp.netcom.com:/pub/gnn/tcp-ip.faq . You may get it from my home page at
ftp://ftp.netcom.com/pub/gnn/gnn.html
You can read the FAQ in HTMl format on Netcom or from the mirror
site http://web.cnam.fr/Network/TCP-IP/tcp-ip.html
************************************************************************
Table of Contents:
Glossary
1) Are there any good books on IP?
2) Where can I find example source code for TCP/UDP/IP?
3) Are there any public domain programs to check the performance of an
IP link?
4) Where do I find RFCs?
5) How can I detect that the other end of a TCP connection has
crashed? Can I use "keepalives" for this?
6) Can the keepalive timeouts be configured?
7) Can I set up a gateway to the Internet that translates IP
addresses, so that I don't have to change all our internal addresses
to an official network?
8) Are there object-oriented network programming tools?
9) What other FAQs are related to this one?
10) What newsgroups contain information on networks/protocols?
11) Van Jacobson explains TCP congestion avoidance.
12) Can I use a single bit subnet?
Glossary:
I felt this should be first given the plethora of acronyms used in the
rest of this FAQ.
IP: Internet Protocol. The lowest layer protocol defined in TCP/IP.
This is the base layer on which all other protocols mentioned herein
are built. IP is often referred to as TCP/IP as well.
UDP: User Datagram Protocol. This is a connectionless protocol built
on top of IP. It does not provide any guarantees on the ordering or
delivery of messages. This protocol is layered on top of IP.
TCP: Transmission Control Protocol. TCP is a connection oriented
protocol that guarantees that messages are delivered in the order in
which they were sent and that all messages are delivered. If a TCP
connection cannot deliver a message it closes the connection and
informs the entity that created it. This protocol is layered on top
of IP.
ICMP: Internet Control Message Protocol. ICMP is used for
diagnostics in the network. The Unix program, ping, uses ICMP
messages to detect the status of other hosts in the net. ICMP
messages can either be queries (in the case of ping) or error reports,
such as when a network is unreachable.
RFC: Request For Comment. RFCs are documents that define the
protocols used in the IP Internet. Some are only suggestions, some
are even jokes, and others are published standards. Several sites in
the Internet store RFCs and make them available for anonymous ftp.
SLIP: Serial Line IP. An implementation of IP for use over a serial
link (modem). CSLIP is an optimized (compressed) version of SLIP that
gives better throughput.
Bandwidth: The amount of data that can be pushed through a link in
unit time. Usually measured in bits or bytes per second.
Latency: The amount of time that a message spends in a network going
from point A to point B.
Jitter: The effect seen when latency is not a constant. That is, if
messages experience a different latencies between two points in a
network.
RPC: Remote Procedure Call. RPC is a method of making network access
to resource transparent to the application programmer by supplying a
"stub" routine that is called in the same way as a regular procedure
call. The stub actually performs the call across the network to
another computer.
Marshalling: The process of taking arbitrary data (characters,
integers, structures) and packing them up for transmission across a
network.
MBONE: A virtual network that is a Multicast backBONE. It is still a
research prototype, but it extends through most of the core of the
Internet (including North America, Europe, and Australia). It uses IP
Multicasting which is defined in RFC-1112. An MBONE FAQ is available
via anonymous ftp from: ftp.isi.edu" There are frequent broadcasts of
multimedia programs (audio and low bandwidth video) over the MBONE.
Though the MBONE is used for mutlicasting, the long haul parts of the
MBONE use point-to-point connections through unicast tunnels to
connect the various multicast networks worldwide.
1) Are there any good books on IP?
A) Yes. Please see the following:
Internetworking with TCP/IP Volume I
(Principles, Protocols, and Architecture)
Douglas E. Comer
Prentice Hall 1991 ISBN 0-13-468505-9
This volume covers all of the protocols, including IP, UDP, TCP, and
the gateway protocols. It also includes discussions of higher level
protocols such as FTP, TELNET, and NFS.
Internetworking with TCP/IP Volume II
(Design, Implementation, and Internals)
Douglas E. Comer / David L. Stevens
Prentice Hall 1991 ISBN 0-13-472242-6
Discusses the implementation of the protocols and gives numerous code
examples.
Internetworking with TCP/IP Volume III (BSD Socket Version)
(Client - Server Programming and Applications)
Douglas E. Comer / David L. Stevens
Prentice Hall 1993 ISBN 0-13-474222-2
This book discusses programming applications that use the internet
protocols. It includes examples of telnet, ftp clients and servers.
Discusses RPC and XDR at length.
TCP/IP Illustrated, Volume 1: The Protocols,
W. Richard Stevens
(c) Addison-Wesley, 1994 ISBN 0-201-63346-9
An excellent introduction to the entire TCP/IP protocol suite,
covering all the major protocols, plus several important applications.
"TCP/IP Illustrated, Volume 2: The Implementation",
by Gary R. Wright and W. Richard Stevens
(c) Addison-Wesley, 1995
ISBN 0-201-63354-X
This is a complete, and lenthy, discussion of the internals of TCP/IP
based on the Net/2 release of BSD.
Unix Network Programming
W. Richard Stevens
Prentice Hall 1990 ISBN 0-13-949876
An excellent introduction to network programming under Unix.
The Design and Implementation of the 4.3 BSD Operating System
Samuel J. Leffler, Marshall Kirk McKusick, Michael J. Karels, John S.
Quarterman
Addison-Wesley 1989 ISBN 0-201-06196-1
Though this book is a reference for the entire operating system, the
eleventh and twelfth chapters completely explain how the networking
protocols are implemented in the kernel.
Stevens, W. Richard, Unix Network Programming. 1990, Prentice-Hall.
An excellent introduction to network programming under Unix. Widely
cited on the Usenet bulliten boards as the "best place to start" if you
want to actually learn how to write Unix programs that communicate over
a network.
Rago, Steven A. Unix System V. Network Programming. 1993, Addison-Wesley.
A book that covers the same kinds of topics as W. Richard Stevens Unix
Network Programming, but is more specific to Unix System V Release 4
(SVR4), and so perhaps is more useful and up to date if you are
working specifically with that implementation. (Stevens book covers
Unix System V release 3.x). There is a much more extensive coverage
of Streams in Rago's book; 4 chapters, where Stevens only provides a
couple of subsections. The design project at the end of the book is
an implementation of SLIP.
2) Where can I find example source code for TCP/UDP/IP?
A) Code from the Internetworking with TCP/IP Volume III is available
for anonymous ftp from:
arthur.cs.purdue.edu:/pub/dls
Code used in the Net-2 version of Berkeley Unix is available for
anonymous ftp from:
ftp.uu.net:systems/unix/bsd-sources/sys/netinet
and
gatekeeper.dec.com:/pub/BSD/net2/sys/netinet
Code from Richard Steven's book is available on:
ftp.uu.net:/published/books/stevens.*
Example source code and libraries to make coding quicker is available
in the Simple Sockets Library written at NASA. The Simple Sockets
Library makes sockets easy to use! And, it comes as source code. It
has been tested on: Unix (SGI, DecStation, AIX, Sun 3, Sparcstation;
version 2.02+: Solaris 2.1, SCO), VMS, and MSDOS (client only since
there's no background there). It is provided in source code form, of
course, and sits atop Berkeley sockets and tcp/ip.
You can order the "Simple Sockets Library" from
Austin Code Works
11100 Leafwood Lane
Austin, TX 78750-3464 USA
Phone (512) 258-0785
Ask for the "SSL - The Simple Sockets Library". Last I checked, they
were asking $20 US for it.
For DOS there is WATTCP.ZIP (numerous sites):
WATTCP is a DOS TCP/IP stack derived from the NCSA Telnet program and
much enhanced. It comes with some example programs and complete source
code. The interface isn't BSD sockets but is well suited to PC type
work. It is also written so that it can be used and memory
allocation).
3) Are there any public domain programs to check the performance of
an IP link?
A)
TTCP: Available for anonymous ftp from....
wuarchive.wustl.edu:/graphics/graphics/mirrors/sgi.com/sgi/src/ttcp
On ftp.sgi.com are netperf (from Rick Jones at HP) and nettest
(from Dave Borman at Cray). ttcp is also availabel at ftp.sgi.com.
You can get to the NetPerf home page via:
http://www.cup.hp.com/netperf/NetperfPage.html
There is suite of Bandwidth Measuring programs from gnn@netcom.com.
Available for anonymous ftp from ftp.netcom.com in
~ftp/gnn/bwmeas-0.3.tar.Z These are several programs that meausre
bandwidth and jitter over several kinds of IPC links, including TCP
and UDP.
4) Where do I find RFCs?
A) This is the latest info on obtaining RFCs:
Details on obtaining RFCs via FTP or EMAIL may be obtained by sending
an EMAIL message to rfc-info@ISI.EDU with the message body
help: ways_to_get_rfcs. For example:
To: rfc-info@ISI.EDU
Subject: getting rfcs
help: ways_to_get_rfcs
The response to this mail query is quite long and has been omitted.
RFCs can be obtained via FTP from DS.INTERNIC.NET, NIS.NSF.NET,
NISC.JVNC.NET, FTP.ISI.EDU, WUARCHIVE.WUSTL.EDU, SRC.DOC.IC.AC.UK,
FTP.CONCERT.NET, or FTP.SESQUI.NET.
Using Web, WAIS, and gopher:
Web:
http://web.nexor.co.uk/rfc-index/rfc-index-search-form.html
WAIS access by keyword:
wais://wais.cnam.fr/RFC
Excellent presentation with a full-text search too:
http://www.cis.ohio-state.edu/hypertext/information/rfc.html
With Gopher:
gopher://r2d2.jvnc.net/11/Internet%20Resources/RFC
gopher://muspin.gsfc.nasa.gov:4320/1g2go4%20ds.internic.net%2070%201%201/.ds/
.internetdocs
5) How can I detect that the other end of a TCP connection has crashed?
Can I use "keepalives" for this?
A) Detecting crashed systems over TCP/IP is difficult. TCP doesn't require
any transmission over a connection if the application isn't sending
anything, and many of the media over which TCP/IP is used (e.g. ethernet)
don't provide a reliable way to determine whether a particular host is up.
If a server doesn't hear from a client, it could be because it has nothing
to say, some network between the server and client may be down, the server
or client's network interface may be disconnected, or the client may have
crashed. Network failures are often temporary (a thin ethernet will appear
down while someone is adding a link to the daisy chain, and it often takes
a few minutes for new routes to stabilize when a router goes down), and TCP
connections shouldn't be dropped as a result.
Keepalives are a feature of the sockets API that requests that an empty
packet be sent periodically over an idle connection; this should evoke an
acknowledgement from the remote system if it is still up, a reset if it has
rebooted, and a timeout if it is down. These are not normally sent until
the connection has been idle for a few hours. The purpose isn't to detect
a crash immediately, but to keep unnecessary resources from being allocated
forever.
If more rapid detection of remote failures is required, this should be
implemented in the application protocol. There is no standard mechanism
for this, but an example is requiring clients to send a "no-op" message
every minute or two. An example protocol that uses this is X Display
Manager Control Protocol (XDMCP), part of the X Window System, Version 11;
the XDM server managing a session periodically sends a Sync command to the
display server, which should evoke an application-level response, and
resets the session if it doesn't get a response (this is actually an
example of a poor implementation, as a timeout can occur if another client
"grabs" the server for too long).
6) Can the keepalive timeouts be configured?
A) This varies by operating system. There is a program that works on
many Unices (though not Linux or Solaris), called netconfig, that
allows one to do this and documents many of the variables. It is
available by anonymous FTP from
cs.ucsd.edu:pub/csl/Netconfig/netconfig2.2.tar.Z
In addition, Richard Stevens' TCP/IP Illustrated, Volume 1 includes a
good discussion of setting the most useful variables on many
platforms.
7) Can I set up a gateway to the Internet that translates IP addresses, so
that I don't have to change all our internal addresses to an official
network?
A) There's no general solution to this. Many protocols include IP
addresses in the application-level data (FTP's "PORT" command is the most
notable), so it isn't simply a matter of translating addresses in the IP
header. Also, if the network number(s) you're using match those assigned
to another organization, your gateway won't be able to communicate with
that organization (RFC 1597 proposes network numbers that are reserved for
private use, to avoid such conflicts, but if you're already using a
different network number this won't help you).
However, if you're willing to live with limited access to the Internet from
internal hosts, the "proxy" servers developed for firewalls can be used as
a substitute for an address-translating gateway. See the firewall FAQ.
8) Are there object-oriented network programming tools?
A) Yes, and one such system is called ACE (ADAPTIVE Communication
Environment). Here is how to get more information and the software:
OBTAINING ACE
An HTML version of this README file is available at URL
http://www.cs.wustl.edu/~schmidt/ACE.html. All software and
documentation is available via both anonymous ftp and the Web.
ACE is available for anonymous ftp from the ics.uci.edu (128.195.1.1)
host in the gnu/C++_wrappers.tar.Z file (approximately .5 meg
compressed). This release contains contains the source code,
documentation, and example test drivers for C++ wrapper libras.
9) What other FAQs might you want to look in?
comp.protocols.tcp-ip.ibmpc
Aboba, Bernard D.(1994) "comp.protocols.tcp-ip.ibmpc Frequently
Asked Questions (FAQ)" Usenet news.answers, available via
file://ftp.netcom.com/pub/ma/mailcom/IBMTCP/ibmtcp.zip,
57 pages.
comp.protocols.ppp
Archive-name: ppp-faq/part[1-8]
URL: http://cs.uni-bonn.de/ppp/part[1-8].html
comp.dcom.lans.ethernet
ftp site: dorm.rutgers.edu, pub/novell/DOCS
Ethernet Network Questions and Answers
Summarized from UseNet group comp.dcom.lans.ethernet
10) What other newsgroups deal with networking?
comp.dcom.cabling Cabling selection, installation and use.
comp.dcom.isdn The Integrated Services Digital Network
(ISDN).
comp.dcom.lans.ethernet Discussions of the Ethernet/IEEE 802.3
protocols.
comp.dcom.lans.fddi Discussions of the FDDI protocol suite.
comp.dcom.lans.misc Local area network hardware and software.
comp.dcom.lans.token-ring Installing and using token ring
networks.
comp.dcom.servers Selecting and operating data communications
servers.
comp.dcom.sys.cisco Info on Cisco routers and bridges.
comp.dcom.sys.wellfleet Wellfleet bridge & router systems hardware &
software.
comp.protocols.ibm Networking with IBM mainframes.
comp.protocols.iso The ISO protocol stack.
comp.protocols.kerberos The Kerberos authentication server.
comp.protocols.misc Various forms and types of protocol.
comp.protocols.nfs Discussion about the Network File System
protocol.
comp.protocols.ppp Discussion of the Internet Point to Point
Protocol.
comp.protocols.smb SMB file sharing protocol and Samba SMB
server/client.
comp.protocols.tcp-ip TCP and IP network protocols.
comp.protocols.tcp-ip.ibmpc TCP/IP for IBM(-like) personal
computers.
comp.security.misc Security isuipment for the PC.
comp.os.ms-windows.networking.misc Windows and other networks.
comp.os.ms-windows.networking.tcp-ip Windows and TCP/IP networking.
comp.os.ms-windows.networking.windows Windows' built-in networking.
comp.os.os2.networking.misc Miscellaneous networking issues of
OS/2.
comp.os.os2.networking.tcp-ip TCP/IP under OS/2.
comp.sys.novell Discussion of Novell Netware products.
11) Van Jacobson explains TCP congestion avoidance.
I've attached Van J's original posting on it (I seem to repost this every
6 months or so). If you want to see some real examples of this in action,
take a look at Chapter 21 of my "TCP/IP Illustrated, Volume 1".
Rich Stevens
---------------------------------------------------------------------------
>From van@helios.ee.lbl.gov Mon Apr 30 01:44:05 1990
To: end2end-interest@ISI.EDU
Subject: modified TCP congestion avoidance algorithm
Date: Mon, 30 Apr 90 01:40:59 PDT
From: Van Jacobson