home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / standards / rfc / rfc1123.Z / rfc1123
Encoding:
Internet Message Format  |  1992-10-18  |  234.5 KB

  1. Path: spinifex!elecvax!usage!basser!munnari.oz.au!murtoa.cs.mu.oz.au!uunet!wuarchive!gem.mps.ohio-state.edu!usc!ucsd!brian
  2. From: brian@ucsd.Edu (Brian Kantor)
  3. Newsgroups: comp.doc
  4. Subject: RFC1123 - Requirements for Internet Hosts -- Application and Support
  5. Message-ID: <10043@ucsd.Edu>
  6. Date: 7 Oct 89 12:07:05 GMT
  7. Organization: The Avant-Garde of the Now, Ltd.
  8. Lines: 5782
  9. Approved: brian@cyberpunk.ucsd.edu
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. Network Working Group                    Internet Engineering Task Force
  18. Request for Comments: 1123                             R. Braden, Editor
  19.                                                             October 1989
  20.  
  21.  
  22.        Requirements for Internet Hosts -- Application and Support
  23.  
  24. Status of This Memo
  25.  
  26.    This RFC is an official specification for the Internet community.  It
  27.    incorporates by reference, amends, corrects, and supplements the
  28.    primary protocol standards documents relating to hosts.  Distribution
  29.    of this document is unlimited.
  30.  
  31. Summary
  32.  
  33.    This RFC is one of a pair that defines and discusses the requirements
  34.    for Internet host software.  This RFC covers the application and
  35.    support protocols; its companion RFC-1122 covers the communication
  36.    protocol layers: link layer, IP layer, and transport layer.
  37.  
  38.  
  39.  
  40.                            Table of Contents
  41.  
  42.  
  43.  
  44.  
  45.    1.  INTRODUCTION ...............................................    5
  46.       1.1  The Internet Architecture ..............................    6
  47.       1.2  General Considerations .................................    6
  48.          1.2.1  Continuing Internet Evolution .....................    6
  49.          1.2.2  Robustness Principle ..............................    7
  50.          1.2.3  Error Logging .....................................    8
  51.          1.2.4  Configuration .....................................    8
  52.       1.3  Reading this Document ..................................   10
  53.          1.3.1  Organization ......................................   10
  54.          1.3.2  Requirements ......................................   10
  55.          1.3.3  Terminology .......................................   11
  56.       1.4  Acknowledgments ........................................   12
  57.  
  58.    2.  GENERAL ISSUES .............................................   13
  59.       2.1  Host Names and Numbers .................................   13
  60.       2.2  Using Domain Name Service ..............................   13
  61.       2.3  Applications on Multihomed hosts .......................   14
  62.       2.4  Type-of-Service ........................................   14
  63.       2.5  GENERAL APPLICATION REQUIREMENTS SUMMARY ...............   15
  64.  
  65.  
  66.  
  67.  
  68. Internet Engineering Task Force                                 [Page 1]
  69.  
  70.  
  71.  
  72.  
  73. RFC1123                       INTRODUCTION                  October 1989
  74.  
  75.  
  76.    3.  REMOTE LOGIN -- TELNET PROTOCOL ............................   16
  77.       3.1  INTRODUCTION ...........................................   16
  78.       3.2  PROTOCOL WALK-THROUGH ..................................   16
  79.          3.2.1  Option Negotiation ................................   16
  80.          3.2.2  Telnet Go-Ahead Function ..........................   16
  81.          3.2.3  Control Functions .................................   17
  82.          3.2.4  Telnet "Synch" Signal .............................   18
  83.          3.2.5  NVT Printer and Keyboard ..........................   19
  84.          3.2.6  Telnet Command Structure ..........................   20
  85.          3.2.7  Telnet Binary Option ..............................   20
  86.          3.2.8  Telnet Terminal-Type Option .......................   20
  87.       3.3  SPECIFIC ISSUES ........................................   21
  88.          3.3.1  Telnet End-of-Line Convention .....................   21
  89.          3.3.2  Data Entry Terminals ..............................   23
  90.          3.3.3  Option Requirements ...............................   24
  91.          3.3.4  Option Initiation .................................   24
  92.          3.3.5  Telnet Linemode Option ............................   25
  93.       3.4  TELNET/USER INTERFACE ..................................   25
  94.          3.4.1  Character Set Transparency ........................   25
  95.          3.4.2  Telnet Commands ...................................   26
  96.          3.4.3  TCP Connection Errors .............................   26
  97.          3.4.4  Non-Default Telnet Contact Port ...................   26
  98.          3.4.5  Flushing Output ...................................   26
  99.       3.5.  TELNET REQUIREMENTS SUMMARY ...........................   27
  100.  
  101.    4.  FILE TRANSFER ..............................................   29
  102.       4.1  FILE TRANSFER PROTOCOL -- FTP ..........................   29
  103.          4.1.1  INTRODUCTION ......................................   29
  104.          4.1.2.  PROTOCOL WALK-THROUGH ............................   29
  105.             4.1.2.1  LOCAL Type ...................................   29
  106.             4.1.2.2  Telnet Format Control ........................   30
  107.             4.1.2.3  Page Structure ...............................   30
  108.             4.1.2.4  Data Structure Transformations ...............   30
  109.             4.1.2.5  Data Connection Management ...................   31
  110.             4.1.2.6  PASV Command .................................   31
  111.             4.1.2.7  LIST and NLST Commands .......................   31
  112.             4.1.2.8  SITE Command .................................   32
  113.             4.1.2.9  STOU Command .................................   32
  114.             4.1.2.10  Telnet End-of-line Code .....................   32
  115.             4.1.2.11  FTP Replies .................................   33
  116.             4.1.2.12  Connections .................................   34
  117.             4.1.2.13  Minimum Implementation; RFC-959 Section .....   34
  118.          4.1.3  SPECIFIC ISSUES ...................................   35
  119.             4.1.3.1  Non-standard Command Verbs ...................   35
  120.             4.1.3.2  Idle Timeout .................................   36
  121.             4.1.3.3  Concurrency of Data and Control ..............   36
  122.             4.1.3.4  FTP Restart Mechanism ........................   36
  123.          4.1.4  FTP/USER INTERFACE ................................   39
  124.  
  125.  
  126.  
  127. Internet Engineering Task Force                                 [Page 2]
  128.  
  129.  
  130.  
  131.  
  132. RFC1123                       INTRODUCTION                  October 1989
  133.  
  134.  
  135.             4.1.4.1  Pathname Specification .......................   39
  136.             4.1.4.2  "QUOTE" Command ..............................   40
  137.             4.1.4.3  Displaying Replies to User ...................   40
  138.             4.1.4.4  Maintaining Synchronization ..................   40
  139.          4.1.5   FTP REQUIREMENTS SUMMARY .........................   41
  140.       4.2  TRIVIAL FILE TRANSFER PROTOCOL -- TFTP .................   44
  141.          4.2.1  INTRODUCTION ......................................   44
  142.          4.2.2  PROTOCOL WALK-THROUGH .............................   44
  143.             4.2.2.1  Transfer Modes ...............................   44
  144.             4.2.2.2  UDP Header ...................................   44
  145.          4.2.3  SPECIFIC ISSUES ...................................   44
  146.             4.2.3.1  Sorcerer's Apprentice Syndrome ...............   44
  147.             4.2.3.2  Timeout Algorithms ...........................   46
  148.             4.2.3.3  Extensions ...................................   46
  149.             4.2.3.4  Access Control ...............................   46
  150.             4.2.3.5  Broadcast Request ............................   46
  151.          4.2.4  TFTP REQUIREMENTS SUMMARY .........................   47
  152.  
  153.    5.  ELECTRONIC MAIL -- SMTP and RFC-822 ........................   48
  154.       5.1  INTRODUCTION ...........................................   48
  155.       5.2  PROTOCOL WALK-THROUGH ..................................   48
  156.          5.2.1  The SMTP Model ....................................   48
  157.          5.2.2  Canonicalization ..................................   49
  158.          5.2.3  VRFY and EXPN Commands ............................   50
  159.          5.2.4  SEND, SOML, and SAML Commands .....................   50
  160.          5.2.5  HELO Command ......................................   50
  161.          5.2.6  Mail Relay ........................................   51
  162.          5.2.7  RCPT Command ......................................   52
  163.          5.2.8  DATA Command ......................................   53
  164.          5.2.9  Command Syntax ....................................   54
  165.          5.2.10  SMTP Replies .....................................   54
  166.          5.2.11  Transparency .....................................   55
  167.          5.2.12  WKS Use in MX Processing .........................   55
  168.          5.2.13  RFC-822 Message Specification ....................   55
  169.          5.2.14  RFC-822 Date and Time Specification ..............   55
  170.          5.2.15  RFC-822 Syntax Change ............................   56
  171.          5.2.16  RFC-822  Local-part ..............................   56
  172.          5.2.17  Domain Literals ..................................   57
  173.          5.2.18  Common Address Formatting Errors .................   58
  174.          5.2.19  Explicit Source Routes ...........................   58
  175.       5.3  SPECIFIC ISSUES ........................................   59
  176.          5.3.1  SMTP Queueing Strategies ..........................   59
  177.             5.3.1.1 Sending Strategy ..............................   59
  178.             5.3.1.2  Receiving strategy ...........................   61
  179.          5.3.2  Timeouts in SMTP ..................................   61
  180.          5.3.3  Reliable Mail Receipt .............................   63
  181.          5.3.4  Reliable Mail Transmission ........................   63
  182.          5.3.5  Domain Name Support ...............................   65
  183.  
  184.  
  185.  
  186. Internet Engineering Task Force                                 [Page 3]
  187.  
  188.  
  189.  
  190.  
  191. RFC1123                       INTRODUCTION                  October 1989
  192.  
  193.  
  194.          5.3.6  Mailing Lists and Aliases .........................   65
  195.          5.3.7  Mail Gatewaying ...................................   66
  196.          5.3.8  Maximum Message Size ..............................   68
  197.       5.4  SMTP REQUIREMENTS SUMMARY ..............................   69
  198.  
  199.    6. SUPPORT SERVICES ............................................   72
  200.       6.1 DOMAIN NAME TRANSLATION .................................   72
  201.          6.1.1 INTRODUCTION .......................................   72
  202.          6.1.2  PROTOCOL WALK-THROUGH .............................   72
  203.             6.1.2.1  Resource Records with Zero TTL ...............   73
  204.             6.1.2.2  QCLASS Values ................................   73
  205.             6.1.2.3  Unused Fields ................................   73
  206.             6.1.2.4  Compression ..................................   73
  207.             6.1.2.5  Misusing Configuration Info ..................   73
  208.          6.1.3  SPECIFIC ISSUES ...................................   74
  209.             6.1.3.1  Resolver Implementation ......................   74
  210.             6.1.3.2  Transport Protocols ..........................   75
  211.             6.1.3.3  Efficient Resource Usage .....................   77
  212.             6.1.3.4  Multihomed Hosts .............................   78
  213.             6.1.3.5  Extensibility ................................   79
  214.             6.1.3.6  Status of RR Types ...........................   79
  215.             6.1.3.7  Robustness ...................................   80
  216.             6.1.3.8  Local Host Table .............................   80
  217.          6.1.4  DNS USER INTERFACE ................................   81
  218.             6.1.4.1  DNS Administration ...........................   81
  219.             6.1.4.2  DNS User Interface ...........................   81
  220.             6.1.4.3 Interface Abbreviation Facilities .............   82
  221.          6.1.5  DOMAIN NAME SYSTEM REQUIREMENTS SUMMARY ...........   84
  222.       6.2  HOST INITIALIZATION ....................................   87
  223.          6.2.1  INTRODUCTION ......................................   87
  224.          6.2.2  REQUIREMENTS ......................................   87
  225.             6.2.2.1  Dynamic Configuration ........................   87
  226.             6.2.2.2  Loading Phase ................................   89
  227.       6.3  REMOTE MANAGEMENT ......................................   90
  228.          6.3.1  INTRODUCTION ......................................   90
  229.          6.3.2  PROTOCOL WALK-THROUGH .............................   90
  230.          6.3.3  MANAGEMENT REQUIREMENTS SUMMARY ...................   92
  231.  
  232.    7.  REFERENCES .................................................   93
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245. Internet Engineering Task Force                                 [Page 4]
  246.  
  247.  
  248.  
  249.  
  250. RFC1123                       INTRODUCTION                  October 1989
  251.  
  252.  
  253. 1.  INTRODUCTION
  254.  
  255.    This document is one of a pair that defines and discusses the
  256.    requirements for host system implementations of the Internet protocol
  257.    suite.  This RFC covers the applications layer and support protocols.
  258.    Its companion RFC, "Requirements for Internet Hosts -- Communications
  259.    Layers" [INTRO:1] covers the lower layer protocols: transport layer,
  260.    IP layer, and link layer.
  261.  
  262.    These documents are intended to provide guidance for vendors,
  263.    implementors, and users of Internet communication software.  They
  264.    represent the consensus of a large body of technical experience and
  265.    wisdom, contributed by members of the Internet research and vendor
  266.    communities.
  267.  
  268.    This RFC enumerates standard protocols that a host connected to the
  269.    Internet must use, and it incorporates by reference the RFCs and
  270.    other documents describing the current specifications for these
  271.    protocols.  It corrects errors in the referenced documents and adds
  272.    additional discussion and guidance for an implementor.
  273.  
  274.    For each protocol, this document also contains an explicit set of
  275.    requirements, recommendations, and options.  The reader must
  276.    understand that the list of requirements in this document is
  277.    incomplete by itself; the complete set of requirements for an
  278.    Internet host is primarily defined in the standard protocol
  279.    specification documents, with the corrections, amendments, and
  280.    supplements contained in this RFC.
  281.  
  282.    A good-faith implementation of the protocols that was produced after
  283.    careful reading of the RFC's and with some interaction with the
  284.    Internet technical community, and that followed good communications
  285.    software engineering practices, should differ from the requirements
  286.    of this document in only minor ways.  Thus, in many cases, the
  287.    "requirements" in this RFC are already stated or implied in the
  288.    standard protocol documents, so that their inclusion here is, in a
  289.    sense, redundant.  However, they were included because some past
  290.    implementation has made the wrong choice, causing problems of
  291.    interoperability, performance, and/or robustness.
  292.  
  293.    This document includes discussion and explanation of many of the
  294.    requirements and recommendations.  A simple list of requirements
  295.    would be dangerous, because:
  296.  
  297.    o    Some required features are more important than others, and some
  298.         features are optional.
  299.  
  300.    o    There may be valid reasons why particular vendor products that
  301.  
  302.  
  303.  
  304. Internet Engineering Task Force                                 [Page 5]
  305.  
  306.  
  307.  
  308.  
  309. RFC1123                       INTRODUCTION                  October 1989
  310.  
  311.  
  312.         are designed for restricted contexts might choose to use
  313.         different specifications.
  314.  
  315.    However, the specifications of this document must be followed to meet
  316.    the general goal of arbitrary host interoperation across the
  317.    diversity and complexity of the Internet system.  Although most
  318.    current implementations fail to meet these requirements in various
  319.    ways, some minor and some major, this specification is the ideal
  320.    towards which we need to move.
  321.  
  322.    These requirements are based on the current level of Internet
  323.    architecture.  This document will be updated as required to provide
  324.    additional clarifications or to include additional information in
  325.    those areas in which specifications are still evolving.
  326.  
  327.    This introductory section begins with general advice to host software
  328.    vendors, and then gives some guidance on reading the rest of the
  329.    document.  Section 2 contains general requirements that may be
  330.    applicable to all application and support protocols.  Sections 3, 4,
  331.    and 5 contain the requirements on protocols for the three major
  332.    applications: Telnet, file transfer, and electronic mail,
  333.    respectively. Section 6 covers the support applications: the domain
  334.    name system, system initialization, and management.  Finally, all
  335.    references will be found in Section 7.
  336.  
  337.    1.1  The Internet Architecture
  338.  
  339.       For a brief introduction to the Internet architecture from a host
  340.       viewpoint, see Section 1.1 of [INTRO:1].  That section also
  341.       contains recommended references for general background on the
  342.       Internet architecture.
  343.  
  344.    1.2  General Considerations
  345.  
  346.       There are two important lessons that vendors of Internet host
  347.       software have learned and which a new vendor should consider
  348.       seriously.
  349.  
  350.       1.2.1  Continuing Internet Evolution
  351.  
  352.          The enormous growth of the Internet has revealed problems of
  353.          management and scaling in a large datagram-based packet
  354.          communication system.  These problems are being addressed, and
  355.          as a result there will be continuing evolution of the
  356.          specifications described in this document.  These changes will
  357.          be carefully planned and controlled, since there is extensive
  358.          participation in this planning by the vendors and by the
  359.          organizations responsible for operations of the networks.
  360.  
  361.  
  362.  
  363. Internet Engineering Task Force                                 [Page 6]
  364.  
  365.  
  366.  
  367.  
  368. RFC1123                       INTRODUCTION                  October 1989
  369.  
  370.  
  371.          Development, evolution, and revision are characteristic of
  372.          computer network protocols today, and this situation will
  373.          persist for some years.  A vendor who develops computer
  374.          communication software for the Internet protocol suite (or any
  375.          other protocol suite!) and then fails to maintain and update
  376.          that software for changing specifications is going to leave a
  377.          trail of unhappy customers.  The Internet is a large
  378.          communication network, and the users are in constant contact
  379.          through it.  Experience has shown that knowledge of
  380.          deficiencies in vendor software propagates quickly through the
  381.          Internet technical community.
  382.  
  383.       1.2.2  Robustness Principle
  384.  
  385.          At every layer of the protocols, there is a general rule whose
  386.          application can lead to enormous benefits in robustness and
  387.          interoperability:
  388.  
  389.                 "Be liberal in what you accept, and
  390.                  conservative in what you send"
  391.  
  392.          Software should be written to deal with every conceivable
  393.          error, no matter how unlikely; sooner or later a packet will
  394.          come in with that particular combination of errors and
  395.          attributes, and unless the software is prepared, chaos can
  396.          ensue.  In general, it is best to assume that the network is
  397.          filled with malevolent entities that will send in packets
  398.          designed to have the worst possible effect.  This assumption
  399.          will lead to suitable protective design, although the most
  400.          serious problems in the Internet have been caused by
  401.          unenvisaged mechanisms triggered by low-probability events;
  402.          mere human malice would never have taken so devious a course!
  403.  
  404.          Adaptability to change must be designed into all levels of
  405.          Internet host software.  As a simple example, consider a
  406.          protocol specification that contains an enumeration of values
  407.          for a particular header field -- e.g., a type field, a port
  408.          number, or an error code; this enumeration must be assumed to
  409.          be incomplete.  Thus, if a protocol specification defines four
  410.          possible error codes, the software must not break when a fifth
  411.          code shows up.  An undefined code might be logged (see below),
  412.          but it must not cause a failure.
  413.  
  414.          The second part of the principle is almost as important:
  415.          software on other hosts may contain deficiencies that make it
  416.          unwise to exploit legal but obscure protocol features.  It is
  417.          unwise to stray far from the obvious and simple, lest untoward
  418.          effects result elsewhere.  A corollary of this is "watch out
  419.  
  420.  
  421.  
  422. Internet Engineering Task Force                                 [Page 7]
  423.  
  424.  
  425.  
  426.  
  427. RFC1123                       INTRODUCTION                  October 1989
  428.  
  429.  
  430.          for misbehaving hosts"; host software should be prepared, not
  431.          just to survive other misbehaving hosts, but also to cooperate
  432.          to limit the amount of disruption such hosts can cause to the
  433.          shared communication facility.
  434.  
  435.       1.2.3  Error Logging
  436.  
  437.          The Internet includes a great variety of host and gateway
  438.          systems, each implementing many protocols and protocol layers,
  439.          and some of these contain bugs and mis-features in their
  440.          Internet protocol software.  As a result of complexity,
  441.          diversity, and distribution of function, the diagnosis of user
  442.          problems is often very difficult.
  443.  
  444.          Problem diagnosis will be aided if host implementations include
  445.          a carefully designed facility for logging erroneous or
  446.          "strange" protocol events.  It is important to include as much
  447.          diagnostic information as possible when an error is logged.  In
  448.          particular, it is often useful to record the header(s) of a
  449.          packet that caused an error.  However, care must be taken to
  450.          ensure that error logging does not consume prohibitive amounts
  451.          of resources or otherwise interfere with the operation of the
  452.          host.
  453.  
  454.          There is a tendency for abnormal but harmless protocol events
  455.          to overflow error logging files; this can be avoided by using a
  456.          "circular" log, or by enabling logging only while diagnosing a
  457.          known failure.  It may be useful to filter and count duplicate
  458.          successive messages.  One strategy that seems to work well is:
  459.          (1) always count abnormalities and make such counts accessible
  460.          through the management protocol (see Section 6.3); and (2)
  461.          allow the logging of a great variety of events to be
  462.          selectively enabled.  For example, it might useful to be able
  463.          to "log everything" or to "log everything for host X".
  464.  
  465.          Note that different managements may have differing policies
  466.          about the amount of error logging that they want normally
  467.          enabled in a host.  Some will say, "if it doesn't hurt me, I
  468.          don't want to know about it", while others will want to take a
  469.          more watchful and aggressive attitude about detecting and
  470.          removing protocol abnormalities.
  471.  
  472.       1.2.4  Configuration
  473.  
  474.          It would be ideal if a host implementation of the Internet
  475.          protocol suite could be entirely self-configuring.  This would
  476.          allow the whole suite to be implemented in ROM or cast into
  477.          silicon, it would simplify diskless workstations, and it would
  478.  
  479.  
  480.  
  481. Internet Engineering Task Force                                 [Page 8]
  482.  
  483.  
  484.  
  485.  
  486. RFC1123                       INTRODUCTION                  October 1989
  487.  
  488.  
  489.          be an immense boon to harried LAN administrators as well as
  490.          system vendors.  We have not reached this ideal; in fact, we
  491.          are not even close.
  492.  
  493.          At many points in this document, you will find a requirement
  494.          that a parameter be a configurable option.  There are several
  495.          different reasons behind such requirements.  In a few cases,
  496.          there is current uncertainty or disagreement about the best
  497.          value, and it may be necessary to update the recommended value
  498.          in the future.  In other cases, the value really depends on
  499.          external factors -- e.g., the size of the host and the
  500.          distribution of its communication load, or the speeds and
  501.          topology of nearby networks -- and self-tuning algorithms are
  502.          unavailable and may be insufficient.  In some cases,
  503.          configurability is needed because of administrative
  504.          requirements.
  505.  
  506.          Finally, some configuration options are required to communicate
  507.          with obsolete or incorrect implementations of the protocols,
  508.          distributed without sources, that unfortunately persist in many
  509.          parts of the Internet.  To make correct systems coexist with
  510.          these faulty systems, administrators often have to "mis-
  511.          configure" the correct systems.  This problem will correct
  512.          itself gradually as the faulty systems are retired, but it
  513.          cannot be ignored by vendors.
  514.  
  515.          When we say that a parameter must be configurable, we do not
  516.          intend to require that its value be explicitly read from a
  517.          configuration file at every boot time.  We recommend that
  518.          implementors set up a default for each parameter, so a
  519.          configuration file is only necessary to override those defaults
  520.          that are inappropriate in a particular installation.  Thus, the
  521.          configurability requirement is an assurance that it will be
  522.          POSSIBLE to override the default when necessary, even in a
  523.          binary-only or ROM-based product.
  524.  
  525.          This document requires a particular value for such defaults in
  526.          some cases.  The choice of default is a sensitive issue when
  527.          the configuration item controls the accommodation to existing
  528.          faulty systems.  If the Internet is to converge successfully to
  529.          complete interoperability, the default values built into
  530.          implementations must implement the official protocol, not
  531.          "mis-configurations" to accommodate faulty implementations.
  532.          Although marketing considerations have led some vendors to
  533.          choose mis-configuration defaults, we urge vendors to choose
  534.          defaults that will conform to the standard.
  535.  
  536.          Finally, we note that a vendor needs to provide adequate
  537.  
  538.  
  539.  
  540. Internet Engineering Task Force                                 [Page 9]
  541.  
  542.  
  543.  
  544.  
  545. RFC1123                       INTRODUCTION                  October 1989
  546.  
  547.  
  548.          documentation on all configuration parameters, their limits and
  549.          effects.
  550.  
  551.  
  552.    1.3  Reading this Document
  553.  
  554.       1.3.1  Organization
  555.  
  556.          In general, each major section is organized into the following
  557.          subsections:
  558.  
  559.          (1)  Introduction
  560.  
  561.          (2)  Protocol Walk-Through -- considers the protocol
  562.               specification documents section-by-section, correcting
  563.               errors, stating requirements that may be ambiguous or
  564.               ill-defined, and providing further clarification or
  565.               explanation.
  566.  
  567.          (3)  Specific Issues -- discusses protocol design and
  568.               implementation issues that were not included in the walk-
  569.               through.
  570.  
  571.          (4)  Interfaces -- discusses the service interface to the next
  572.               higher layer.
  573.  
  574.          (5)  Summary -- contains a summary of the requirements of the
  575.               section.
  576.  
  577.          Under many of the individual topics in this document, there is
  578.          parenthetical material labeled "DISCUSSION" or
  579.          "IMPLEMENTATION".  This material is intended to give
  580.          clarification and explanation of the preceding requirements
  581.          text.  It also includes some suggestions on possible future
  582.          directions or developments.  The implementation material
  583.          contains suggested approaches that an implementor may want to
  584.          consider.
  585.  
  586.          The summary sections are intended to be guides and indexes to
  587.          the text, but are necessarily cryptic and incomplete.  The
  588.          summaries should never be used or referenced separately from
  589.          the complete RFC.
  590.  
  591.       1.3.2  Requirements
  592.  
  593.          In this document, the words that are used to define the
  594.          significance of each particular requirement are capitalized.
  595.          These words are:
  596.  
  597.  
  598.  
  599. Internet Engineering Task Force                                [Page 10]
  600.  
  601.  
  602.  
  603.  
  604. RFC1123                       INTRODUCTION                  October 1989
  605.  
  606.  
  607.          *    "MUST"
  608.  
  609.               This word or the adjective "REQUIRED" means that the item
  610.               is an absolute requirement of the specification.
  611.  
  612.          *    "SHOULD"
  613.  
  614.               This word or the adjective "RECOMMENDED" means that there
  615.               may exist valid reasons in particular circumstances to
  616.               ignore this item, but the full implications should be
  617.               understood and the case carefully weighed before choosing
  618.               a different course.
  619.  
  620.          *    "MAY"
  621.  
  622.               This word or the adjective "OPTIONAL" means that this item
  623.               is truly optional.  One vendor may choose to include the
  624.               item because a particular marketplace requires it or
  625.               because it enhances the product, for example; another
  626.               vendor may omit the same item.
  627.  
  628.  
  629.          An implementation is not compliant if it fails to satisfy one
  630.          or more of the MUST requirements for the protocols it
  631.          implements.  An implementation that satisfies all the MUST and
  632.          all the SHOULD requirements for its protocols is said to be
  633.          "unconditionally compliant"; one that satisfies all the MUST
  634.          requirements but not all the SHOULD requirements for its
  635.          protocols is said to be "conditionally compliant".
  636.  
  637.       1.3.3  Terminology
  638.  
  639.          This document uses the following technical terms:
  640.  
  641.          Segment
  642.               A segment is the unit of end-to-end transmission in the
  643.               TCP protocol.  A segment consists of a TCP header followed
  644.               by application data.  A segment is transmitted by
  645.               encapsulation in an IP datagram.
  646.  
  647.          Message
  648.               This term is used by some application layer protocols
  649.               (particularly SMTP) for an application data unit.
  650.  
  651.          Datagram
  652.               A [UDP] datagram is the unit of end-to-end transmission in
  653.               the UDP protocol.
  654.  
  655.  
  656.  
  657.  
  658. Internet Engineering Task Force                                [Page 11]
  659.  
  660.  
  661.  
  662.  
  663. RFC1123                       INTRODUCTION                  October 1989
  664.  
  665.  
  666.          Multihomed
  667.               A host is said to be multihomed if it has multiple IP
  668.               addresses to connected networks.
  669.  
  670.  
  671.  
  672.    1.4  Acknowledgments
  673.  
  674.       This document incorporates contributions and comments from a large
  675.       group of Internet protocol experts, including representatives of
  676.       university and research labs, vendors, and government agencies.
  677.       It was assembled primarily by the Host Requirements Working Group
  678.       of the Internet Engineering Task Force (IETF).
  679.  
  680.       The Editor would especially like to acknowledge the tireless
  681.       dedication of the following people, who attended many long
  682.       meetings and generated 3 million bytes of electronic mail over the
  683.       past 18 months in pursuit of this document: Philip Almquist, Dave
  684.       Borman (Cray Research), Noel Chiappa, Dave Crocker (DEC), Steve
  685.       Deering (Stanford), Mike Karels (Berkeley), Phil Karn (Bellcore),
  686.       John Lekashman (NASA), Charles Lynn (BBN), Keith McCloghrie (TWG),
  687.       Paul Mockapetris (ISI), Thomas Narten (Purdue), Craig Partridge
  688.       (BBN), Drew Perkins (CMU), and James Van Bokkelen (FTP Software).
  689.  
  690.       In addition, the following people made major contributions to the
  691.       effort: Bill Barns (Mitre), Steve Bellovin (AT&T), Mike Brescia
  692.       (BBN), Ed Cain (DCA), Annette DeSchon (ISI), Martin Gross (DCA),
  693.       Phill Gross (NRI), Charles Hedrick (Rutgers), Van Jacobson (LBL),
  694.       John Klensin (MIT), Mark Lottor (SRI), Milo Medin (NASA), Bill
  695.       Melohn (Sun Microsystems), Greg Minshall (Kinetics), Jeff Mogul
  696.       (DEC), John Mullen (CMC), Jon Postel (ISI), John Romkey (Epilogue
  697.       Technology), and Mike StJohns (DCA).  The following also made
  698.       significant contributions to particular areas: Eric Allman
  699.       (Berkeley), Rob Austein (MIT), Art Berggreen (ACC), Keith Bostic
  700.       (Berkeley), Vint Cerf (NRI), Wayne Hathaway (NASA), Matt Korn
  701.       (IBM), Erik Naggum (Naggum Software, Norway), Robert Ullmann
  702.       (Prime Computer), David Waitzman (BBN), Frank Wancho (USA), Arun
  703.       Welch (Ohio State), Bill Westfield (Cisco), and Rayan Zachariassen
  704.       (Toronto).
  705.  
  706.       We are grateful to all, including any contributors who may have
  707.       been inadvertently omitted from this list.
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717. Internet Engineering Task Force                                [Page 12]
  718.  
  719.  
  720.  
  721.  
  722. RFC1123              APPLICATIONS LAYER -- GENERAL          October 1989
  723.  
  724.  
  725. 2.  GENERAL ISSUES
  726.  
  727.    This section contains general requirements that may be applicable to
  728.    all application-layer protocols.
  729.  
  730.    2.1  Host Names and Numbers
  731.  
  732.       The syntax of a legal Internet host name was specified in RFC-952
  733.       [DNS:4].  One aspect of host name syntax is hereby changed: the
  734.       restriction on the first character is relaxed to allow either a
  735.       letter or a digit.  Host software MUST support this more liberal
  736.       syntax.
  737.  
  738.       Host software MUST handle host names of up to 63 characters and
  739.       SHOULD handle host names of up to 255 characters.
  740.  
  741.       Whenever a user inputs the identity of an Internet host, it SHOULD
  742.       be possible to enter either (1) a host domain name or (2) an IP
  743.       address in dotted-decimal ("#.#.#.#") form.  The host SHOULD check
  744.       the string syntactically for a dotted-decimal number before
  745.       looking it up in the Domain Name System.
  746.  
  747.       DISCUSSION:
  748.            This last requirement is not intended to specify the complete
  749.            syntactic form for entering a dotted-decimal host number;
  750.            that is considered to be a user-interface issue.  For
  751.            example, a dotted-decimal number must be enclosed within
  752.            "[ ]" brackets for SMTP mail (see Section 5.2.17).  This
  753.            notation could be made universal within a host system,
  754.            simplifying the syntactic checking for a dotted-decimal
  755.            number.
  756.  
  757.            If a dotted-decimal number can be entered without such
  758.            identifying delimiters, then a full syntactic check must be
  759.            made, because a segment of a host domain name is now allowed
  760.            to begin with a digit and could legally be entirely numeric
  761.            (see Section 6.1.2.4).  However, a valid host name can never
  762.            have the dotted-decimal form #.#.#.#, since at least the
  763.            highest-level component label will be alphabetic.
  764.  
  765.    2.2  Using Domain Name Service
  766.  
  767.       Host domain names MUST be translated to IP addresses as described
  768.       in Section 6.1.
  769.  
  770.       Applications using domain name services MUST be able to cope with
  771.       soft error conditions.  Applications MUST wait a reasonable
  772.       interval between successive retries due to a soft error, and MUST
  773.  
  774.  
  775.  
  776. Internet Engineering Task Force                                [Page 13]
  777.  
  778.  
  779.  
  780.  
  781. RFC1123              APPLICATIONS LAYER -- GENERAL          October 1989
  782.  
  783.  
  784.       allow for the possibility that network problems may deny service
  785.       for hours or even days.
  786.  
  787.       An application SHOULD NOT rely on the ability to locate a WKS
  788.       record containing an accurate listing of all services at a
  789.       particular host address, since the WKS RR type is not often used
  790.       by Internet sites.  To confirm that a service is present, simply
  791.       attempt to use it.
  792.  
  793.    2.3  Applications on Multihomed hosts
  794.  
  795.       When the remote host is multihomed, the name-to-address
  796.       translation will return a list of alternative IP addresses.  As
  797.       specified in Section 6.1.3.4, this list should be in order of
  798.       decreasing preference.  Application protocol implementations
  799.       SHOULD be prepared to try multiple addresses from the list until
  800.       success is obtained.  More specific requirements for SMTP are
  801.       given in Section 5.3.4.
  802.  
  803.       When the local host is multihomed, a UDP-based request/response
  804.       application SHOULD send the response with an IP source address
  805.       that is the same as the specific destination address of the UDP
  806.       request datagram.  The "specific destination address" is defined
  807.       in the "IP Addressing" section of the companion RFC [INTRO:1].
  808.  
  809.       Similarly, a server application that opens multiple TCP
  810.       connections to the same client SHOULD use the same local IP
  811.       address for all.
  812.  
  813.    2.4  Type-of-Service
  814.  
  815.       Applications MUST select appropriate TOS values when they invoke
  816.       transport layer services, and these values MUST be configurable.
  817.       Note that a TOS value contains 5 bits, of which only the most-
  818.       significant 3 bits are currently defined; the other two bits MUST
  819.       be zero.
  820.  
  821.       DISCUSSION:
  822.            As gateway algorithms are developed to implement Type-of-
  823.            Service, the recommended values for various application
  824.            protocols may change.  In addition, it is likely that
  825.            particular combinations of users and Internet paths will want
  826.            non-standard TOS values.  For these reasons, the TOS values
  827.            must be configurable.
  828.  
  829.            See the latest version of the "Assigned Numbers" RFC
  830.            [INTRO:5] for the recommended TOS values for the major
  831.            application protocols.
  832.  
  833.  
  834.  
  835. Internet Engineering Task Force                                [Page 14]
  836.  
  837.  
  838.  
  839.  
  840. RFC1123              APPLICATIONS LAYER -- GENERAL          October 1989
  841.  
  842.  
  843.    2.5  GENERAL APPLICATION REQUIREMENTS SUMMARY
  844.  
  845.                                                |          | | | |S| |
  846.                                                |          | | | |H| |F
  847.                                                |          | | | |O|M|o
  848.                                                |          | |S| |U|U|o
  849.                                                |          | |H| |L|S|t
  850.                                                |          |M|O| |D|T|n
  851.                                                |          |U|U|M| | |o
  852.                                                |          |S|L|A|N|N|t
  853.                                                |          |T|D|Y|O|O|t
  854. FEATURE                                        |SECTION   | | | |T|T|e
  855. -----------------------------------------------|----------|-|-|-|-|-|--
  856.                                                |          | | | | | |
  857. User interfaces:                               |          | | | | | |
  858.   Allow host name to begin with digit          |2.1       |x| | | | |
  859.   Host names of up to 635 characters           |2.1       |x| | | | |
  860.   Host names of up to 255 characters           |2.1       | |x| | | |
  861.   Support dotted-decimal host numbers          |2.1       | |x| | | |
  862.   Check syntactically for dotted-dec first     |2.1       | |x| | | |
  863.                                                |          | | | | | |
  864. Map domain names per Section 6.1               |2.2       |x| | | | |
  865. Cope with soft DNS errors                      |2.2       |x| | | | |
  866.    Reasonable interval between retries         |2.2       |x| | | | |
  867.    Allow for long outages                      |2.2       |x| | | | |
  868. Expect WKS records to be available             |2.2       | | | |x| |
  869.                                                |          | | | | | |
  870. Try multiple addr's for remote multihomed host |2.3       | |x| | | |
  871. UDP reply src addr is specific dest of request |2.3       | |x| | | |
  872. Use same IP addr for related TCP connections   |2.3       | |x| | | |
  873. Specify appropriate TOS values                 |2.4       |x| | | | |
  874.   TOS values configurable                      |2.4       |x| | | | |
  875.   Unused TOS bits zero                         |2.4       |x| | | | |
  876.                                                |          | | | | | |
  877.                                                |          | | | | | |
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894. Internet Engineering Task Force                                [Page 15]
  895.  
  896.  
  897.  
  898.  
  899. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  900.  
  901.  
  902. 3.  REMOTE LOGIN -- TELNET PROTOCOL
  903.  
  904.    3.1  INTRODUCTION
  905.  
  906.       Telnet is the standard Internet application protocol for remote
  907.       login.  It provides the encoding rules to link a user's
  908.       keyboard/display on a client ("user") system with a command
  909.       interpreter on a remote server system.  A subset of the Telnet
  910.       protocol is also incorporated within other application protocols,
  911.       e.g., FTP and SMTP.
  912.  
  913.       Telnet uses a single TCP connection, and its normal data stream
  914.       ("Network Virtual Terminal" or "NVT" mode) is 7-bit ASCII with
  915.       escape sequences to embed control functions.  Telnet also allows
  916.       the negotiation of many optional modes and functions.
  917.  
  918.       The primary Telnet specification is to be found in RFC-854
  919.       [TELNET:1], while the options are defined in many other RFCs; see
  920.       Section 7 for references.
  921.  
  922.    3.2  PROTOCOL WALK-THROUGH
  923.  
  924.       3.2.1  Option Negotiation: RFC-854, pp. 2-3
  925.  
  926.          Every Telnet implementation MUST include option negotiation and
  927.          subnegotiation machinery [TELNET:2].
  928.  
  929.          A host MUST carefully follow the rules of RFC-854 to avoid
  930.          option-negotiation loops.  A host MUST refuse (i.e, reply
  931.          WONT/DONT to a DO/WILL) an unsupported option.  Option
  932.          negotiation SHOULD continue to function (even if all requests
  933.          are refused) throughout the lifetime of a Telnet connection.
  934.  
  935.          If all option negotiations fail, a Telnet implementation MUST
  936.          default to, and support, an NVT.
  937.  
  938.          DISCUSSION:
  939.               Even though more sophisticated "terminals" and supporting
  940.               option negotiations are becoming the norm, all
  941.               implementations must be prepared to support an NVT for any
  942.               user-server communication.
  943.  
  944.       3.2.2  Telnet Go-Ahead Function: RFC-854, p. 5, and RFC-858
  945.  
  946.          On a host that never sends the Telnet command Go Ahead (GA),
  947.          the Telnet Server MUST attempt to negotiate the Suppress Go
  948.          Ahead option (i.e., send "WILL Suppress Go Ahead").  A User or
  949.          Server Telnet MUST always accept negotiation of the Suppress Go
  950.  
  951.  
  952.  
  953. Internet Engineering Task Force                                [Page 16]
  954.  
  955.  
  956.  
  957.  
  958. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  959.  
  960.  
  961.          Ahead option.
  962.  
  963.          When it is driving a full-duplex terminal for which GA has no
  964.          meaning, a User Telnet implementation MAY ignore GA commands.
  965.  
  966.          DISCUSSION:
  967.               Half-duplex ("locked-keyboard") line-at-a-time terminals
  968.               for which the Go-Ahead mechanism was designed have largely
  969.               disappeared from the scene.  It turned out to be difficult
  970.               to implement sending the Go-Ahead signal in many operating
  971.               systems, even some systems that support native half-duplex
  972.               terminals.  The difficulty is typically that the Telnet
  973.               server code does not have access to information about
  974.               whether the user process is blocked awaiting input from
  975.               the Telnet connection, i.e., it cannot reliably determine
  976.               when to send a GA command.  Therefore, most Telnet Server
  977.               hosts do not send GA commands.
  978.  
  979.               The effect of the rules in this section is to allow either
  980.               end of a Telnet connection to veto the use of GA commands.
  981.  
  982.               There is a class of half-duplex terminals that is still
  983.               commercially important: "data entry terminals," which
  984.               interact in a full-screen manner.  However, supporting
  985.               data entry terminals using the Telnet protocol does not
  986.               require the Go Ahead signal; see Section 3.3.2.
  987.  
  988.       3.2.3  Control Functions: RFC-854, pp. 7-8
  989.  
  990.          The list of Telnet commands has been extended to include EOR
  991.          (End-of-Record), with code 239 [TELNET:9].
  992.  
  993.          Both User and Server Telnets MAY support the control functions
  994.          EOR, EC, EL, and Break, and MUST support AO, AYT, DM, IP, NOP,
  995.          SB, and SE.
  996.  
  997.          A host MUST be able to receive and ignore any Telnet control
  998.          functions that it does not support.
  999.  
  1000.          DISCUSSION:
  1001.               Note that a Server Telnet is required to support the
  1002.               Telnet IP (Interrupt Process) function, even if the server
  1003.               host has an equivalent in-stream function (e.g., Control-C
  1004.               in many systems).  The Telnet IP function may be stronger
  1005.               than an in-stream interrupt command, because of the out-
  1006.               of-band effect of TCP urgent data.
  1007.  
  1008.               The EOR control function may be used to delimit the
  1009.  
  1010.  
  1011.  
  1012. Internet Engineering Task Force                                [Page 17]
  1013.  
  1014.  
  1015.  
  1016.  
  1017. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1018.  
  1019.  
  1020.               stream.  An important application is data entry terminal
  1021.               support (see Section 3.3.2).  There was concern that since
  1022.               EOR had not been defined in RFC-854, a host that was not
  1023.               prepared to correctly ignore unknown Telnet commands might
  1024.               crash if it received an EOR.  To protect such hosts, the
  1025.               End-of-Record option [TELNET:9] was introduced; however, a
  1026.               properly implemented Telnet program will not require this
  1027.               protection.
  1028.  
  1029.       3.2.4  Telnet "Synch" Signal: RFC-854, pp. 8-10
  1030.  
  1031.          When it receives "urgent" TCP data, a User or Server Telnet
  1032.          MUST discard all data except Telnet commands until the DM (and
  1033.          end of urgent) is reached.
  1034.  
  1035.          When it sends Telnet IP (Interrupt Process), a User Telnet
  1036.          SHOULD follow it by the Telnet "Synch" sequence, i.e., send as
  1037.          TCP urgent data the sequence "IAC IP IAC DM".  The TCP urgent
  1038.          pointer points to the DM octet.
  1039.  
  1040.          When it receives a Telnet IP command, a Server Telnet MAY send
  1041.          a Telnet "Synch" sequence back to the user, to flush the output
  1042.          stream.  The choice ought to be consistent with the way the
  1043.          server operating system behaves when a local user interrupts a
  1044.          process.
  1045.  
  1046.          When it receives a Telnet AO command, a Server Telnet MUST send
  1047.          a Telnet "Synch" sequence back to the user, to flush the output
  1048.          stream.
  1049.  
  1050.          A User Telnet SHOULD have the capability of flushing output
  1051.          when it sends a Telnet IP; see also Section 3.4.5.
  1052.  
  1053.          DISCUSSION:
  1054.               There are three possible ways for a User Telnet to flush
  1055.               the stream of server output data:
  1056.  
  1057.               (1)  Send AO after IP.
  1058.  
  1059.                    This will cause the server host to send a "flush-
  1060.                    buffered-output" signal to its operating system.
  1061.                    However, the AO may not take effect locally, i.e.,
  1062.                    stop terminal output at the User Telnet end, until
  1063.                    the Server Telnet has received and processed the AO
  1064.                    and has sent back a "Synch".
  1065.  
  1066.               (2)  Send DO TIMING-MARK [TELNET:7] after IP, and discard
  1067.                    all output locally until a WILL/WONT TIMING-MARK is
  1068.  
  1069.  
  1070.  
  1071. Internet Engineering Task Force                                [Page 18]
  1072.  
  1073.  
  1074.  
  1075.  
  1076. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1077.  
  1078.  
  1079.                    received from the Server Telnet.
  1080.  
  1081.                    Since the DO TIMING-MARK will be processed after the
  1082.                    IP at the server, the reply to it should be in the
  1083.                    right place in the output data stream.  However, the
  1084.                    TIMING-MARK will not send a "flush buffered output"
  1085.                    signal to the server operating system.  Whether or
  1086.                    not this is needed is dependent upon the server
  1087.                    system.
  1088.  
  1089.               (3)  Do both.
  1090.  
  1091.               The best method is not entirely clear, since it must
  1092.               accommodate a number of existing server hosts that do not
  1093.               follow the Telnet standards in various ways.  The safest
  1094.               approach is probably to provide a user-controllable option
  1095.               to select (1), (2), or (3).
  1096.  
  1097.       3.2.5  NVT Printer and Keyboard: RFC-854, p. 11
  1098.  
  1099.          In NVT mode, a Telnet SHOULD NOT send characters with the
  1100.          high-order bit 1, and MUST NOT send it as a parity bit.
  1101.          Implementations that pass the high-order bit to applications
  1102.          SHOULD negotiate binary mode (see Section 3.2.6).
  1103.  
  1104.  
  1105.          DISCUSSION:
  1106.               Implementors should be aware that a strict reading of
  1107.               RFC-854 allows a client or server expecting NVT ASCII to
  1108.               ignore characters with the high-order bit set.  In
  1109.               general, binary mode is expected to be used for
  1110.               transmission of an extended (beyond 7-bit) character set
  1111.               with Telnet.
  1112.  
  1113.               However, there exist applications that really need an 8-
  1114.               bit NVT mode, which is currently not defined, and these
  1115.               existing applications do set the high-order bit during
  1116.               part or all of the life of a Telnet connection.  Note that
  1117.               binary mode is not the same as 8-bit NVT mode, since
  1118.               binary mode turns off end-of-line processing.  For this
  1119.               reason, the requirements on the high-order bit are stated
  1120.               as SHOULD, not MUST.
  1121.  
  1122.               RFC-854 defines a minimal set of properties of a "network
  1123.               virtual terminal" or NVT; this is not meant to preclude
  1124.               additional features in a real terminal.  A Telnet
  1125.               connection is fully transparent to all 7-bit ASCII
  1126.               characters, including arbitrary ASCII control characters.
  1127.  
  1128.  
  1129.  
  1130. Internet Engineering Task Force                                [Page 19]
  1131.  
  1132.  
  1133.  
  1134.  
  1135. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1136.  
  1137.  
  1138.               For example, a terminal might support full-screen commands
  1139.               coded as ASCII escape sequences; a Telnet implementation
  1140.               would pass these sequences as uninterpreted data.  Thus,
  1141.               an NVT should not be conceived as a terminal type of a
  1142.               highly-restricted device.
  1143.  
  1144.       3.2.6  Telnet Command Structure: RFC-854, p. 13
  1145.  
  1146.          Since options may appear at any point in the data stream, a
  1147.          Telnet escape character (known as IAC, with the value 255) to
  1148.          be sent as data MUST be doubled.
  1149.  
  1150.       3.2.7  Telnet Binary Option: RFC-856
  1151.  
  1152.          When the Binary option has been successfully negotiated,
  1153.          arbitrary 8-bit characters are allowed.  However, the data
  1154.          stream MUST still be scanned for IAC characters, any embedded
  1155.          Telnet commands MUST be obeyed, and data bytes equal to IAC
  1156.          MUST be doubled.  Other character processing (e.g., replacing
  1157.          CR by CR NUL or by CR LF) MUST NOT be done.  In particular,
  1158.          there is no end-of-line convention (see Section 3.3.1) in
  1159.          binary mode.
  1160.  
  1161.          DISCUSSION:
  1162.               The Binary option is normally negotiated in both
  1163.               directions, to change the Telnet connection from NVT mode
  1164.               to "binary mode".
  1165.  
  1166.               The sequence IAC EOR can be used to delimit blocks of data
  1167.               within a binary-mode Telnet stream.
  1168.  
  1169.       3.2.8  Telnet Terminal-Type Option: RFC-1091
  1170.  
  1171.          The Terminal-Type option MUST use the terminal type names
  1172.          officially defined in the Assigned Numbers RFC [INTRO:5], when
  1173.          they are available for the particular terminal.  However, the
  1174.          receiver of a Terminal-Type option MUST accept any name.
  1175.  
  1176.          DISCUSSION:
  1177.               RFC-1091 [TELNET:10] updates an earlier version of the
  1178.               Terminal-Type option defined in RFC-930.  The earlier
  1179.               version allowed a server host capable of supporting
  1180.               multiple terminal types to learn the type of a particular
  1181.               client's terminal, assuming that each physical terminal
  1182.               had an intrinsic type.  However, today a "terminal" is
  1183.               often really a terminal emulator program running in a PC,
  1184.               perhaps capable of emulating a range of terminal types.
  1185.               Therefore, RFC-1091 extends the specification to allow a
  1186.  
  1187.  
  1188.  
  1189. Internet Engineering Task Force                                [Page 20]
  1190.  
  1191.  
  1192.  
  1193.  
  1194. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1195.  
  1196.  
  1197.               more general terminal-type negotiation between User and
  1198.               Server Telnets.
  1199.  
  1200.    3.3  SPECIFIC ISSUES
  1201.  
  1202.       3.3.1  Telnet End-of-Line Convention
  1203.  
  1204.          The Telnet protocol defines the sequence CR LF to mean "end-
  1205.          of-line".  For terminal input, this corresponds to a command-
  1206.          completion or "end-of-line" key being pressed on a user
  1207.          terminal; on an ASCII terminal, this is the CR key, but it may
  1208.          also be labelled "Return" or "Enter".
  1209.  
  1210.          When a Server Telnet receives the Telnet end-of-line sequence
  1211.          CR LF as input from a remote terminal, the effect MUST be the
  1212.          same as if the user had pressed the "end-of-line" key on a
  1213.          local terminal.  On server hosts that use ASCII, in particular,
  1214.          receipt of the Telnet sequence CR LF must cause the same effect
  1215.          as a local user pressing the CR key on a local terminal.  Thus,
  1216.          CR LF and CR NUL MUST have the same effect on an ASCII server
  1217.          host when received as input over a Telnet connection.
  1218.  
  1219.          A User Telnet MUST be able to send any of the forms: CR LF, CR
  1220.          NUL, and LF.  A User Telnet on an ASCII host SHOULD have a
  1221.          user-controllable mode to send either CR LF or CR NUL when the
  1222.          user presses the "end-of-line" key, and CR LF SHOULD be the
  1223.          default.
  1224.  
  1225.          The Telnet end-of-line sequence CR LF MUST be used to send
  1226.          Telnet data that is not terminal-to-computer (e.g., for Server
  1227.          Telnet sending output, or the Telnet protocol incorporated
  1228.          another application protocol).
  1229.  
  1230.          DISCUSSION:
  1231.               To allow interoperability between arbitrary Telnet clients
  1232.               and servers, the Telnet protocol defined a standard
  1233.               representation for a line terminator.  Since the ASCII
  1234.               character set includes no explicit end-of-line character,
  1235.               systems have chosen various representations, e.g., CR, LF,
  1236.               and the sequence CR LF.  The Telnet protocol chose the CR
  1237.               LF sequence as the standard for network transmission.
  1238.  
  1239.               Unfortunately, the Telnet protocol specification in RFC-
  1240.               854 [TELNET:1] has turned out to be somewhat ambiguous on
  1241.               what character(s) should be sent from client to server for
  1242.               the "end-of-line" key.  The result has been a massive and
  1243.               continuing interoperability headache, made worse by
  1244.               various faulty implementations of both User and Server
  1245.  
  1246.  
  1247.  
  1248. Internet Engineering Task Force                                [Page 21]
  1249.  
  1250.  
  1251.  
  1252.  
  1253. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1254.  
  1255.  
  1256.               Telnets.
  1257.  
  1258.               Although the Telnet protocol is based on a perfectly
  1259.               symmetric model, in a remote login session the role of the
  1260.               user at a terminal differs from the role of the server
  1261.               host.  For example, RFC-854 defines the meaning of CR, LF,
  1262.               and CR LF as output from the server, but does not specify
  1263.               what the User Telnet should send when the user presses the
  1264.               "end-of-line" key on the terminal; this turns out to be
  1265.               the point at issue.
  1266.  
  1267.               When a user presses the "end-of-line" key, some User
  1268.               Telnet implementations send CR LF, while others send CR
  1269.               NUL (based on a different interpretation of the same
  1270.               sentence in RFC-854).  These will be equivalent for a
  1271.               correctly-implemented ASCII server host, as discussed
  1272.               above.  For other servers, a mode in the User Telnet is
  1273.               needed.
  1274.  
  1275.               The existence of User Telnets that send only CR NUL when
  1276.               CR is pressed creates a dilemma for non-ASCII hosts: they
  1277.               can either treat CR NUL as equivalent to CR LF in input,
  1278.               thus precluding the possibility of entering a "bare" CR,
  1279.               or else lose complete interworking.
  1280.  
  1281.               Suppose a user on host A uses Telnet to log into a server
  1282.               host B, and then execute B's User Telnet program to log
  1283.               into server host C.  It is desirable for the Server/User
  1284.               Telnet combination on B to be as transparent as possible,
  1285.               i.e., to appear as if A were connected directly to C.  In
  1286.               particular, correct implementation will make B transparent
  1287.               to Telnet end-of-line sequences, except that CR LF may be
  1288.               translated to CR NUL or vice versa.
  1289.  
  1290.          IMPLEMENTATION:
  1291.               To understand Telnet end-of-line issues, one must have at
  1292.               least a general model of the relationship of Telnet to the
  1293.               local operating system.  The Server Telnet process is
  1294.               typically coupled into the terminal driver software of the
  1295.               operating system as a pseudo-terminal.  A Telnet end-of-
  1296.               line sequence received by the Server Telnet must have the
  1297.               same effect as pressing the end-of-line key on a real
  1298.               locally-connected terminal.
  1299.  
  1300.               Operating systems that support interactive character-at-
  1301.               a-time applications (e.g., editors) typically have two
  1302.               internal modes for their terminal I/O: a formatted mode,
  1303.               in which local conventions for end-of-line and other
  1304.  
  1305.  
  1306.  
  1307. Internet Engineering Task Force                                [Page 22]
  1308.  
  1309.  
  1310.  
  1311.  
  1312. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1313.  
  1314.  
  1315.               formatting rules have been applied to the data stream, and
  1316.               a "raw" mode, in which the application has direct access
  1317.               to every character as it was entered.  A Server Telnet
  1318.               must be implemented in such a way that these modes have
  1319.               the same effect for remote as for local terminals.  For
  1320.               example, suppose a CR LF or CR NUL is received by the
  1321.               Server Telnet on an ASCII host.  In raw mode, a CR
  1322.               character is passed to the application; in formatted mode,
  1323.               the local system's end-of-line convention is used.
  1324.  
  1325.       3.3.2  Data Entry Terminals
  1326.  
  1327.          DISCUSSION:
  1328.               In addition to the line-oriented and character-oriented
  1329.               ASCII terminals for which Telnet was designed, there are
  1330.               several families of video display terminals that are
  1331.               sometimes known as "data entry terminals" or DETs.  The
  1332.               IBM 3270 family is a well-known example.
  1333.  
  1334.               Two Internet protocols have been designed to support
  1335.               generic DETs: SUPDUP [TELNET:16, TELNET:17], and the DET
  1336.               option [TELNET:18, TELNET:19].  The DET option drives a
  1337.               data entry terminal over a Telnet connection using (sub-)
  1338.               negotiation.  SUPDUP is a completely separate terminal
  1339.               protocol, which can be entered from Telnet by negotiation.
  1340.               Although both SUPDUP and the DET option have been used
  1341.               successfully in particular environments, neither has
  1342.               gained general acceptance or wide implementation.
  1343.  
  1344.               A different approach to DET interaction has been developed
  1345.               for supporting the IBM 3270 family through Telnet,
  1346.               although the same approach would be applicable to any DET.
  1347.               The idea is to enter a "native DET" mode, in which the
  1348.               native DET input/output stream is sent as binary data.
  1349.               The Telnet EOR command is used to delimit logical records
  1350.               (e.g., "screens") within this binary stream.
  1351.  
  1352.          IMPLEMENTATION:
  1353.               The rules for entering and leaving native DET mode are as
  1354.               follows:
  1355.  
  1356.               o    The Server uses the Terminal-Type option [TELNET:10]
  1357.                    to learn that the client is a DET.
  1358.  
  1359.               o    It is conventional, but not required, that both ends
  1360.                    negotiate the EOR option [TELNET:9].
  1361.  
  1362.               o    Both ends negotiate the Binary option [TELNET:3] to
  1363.  
  1364.  
  1365.  
  1366. Internet Engineering Task Force                                [Page 23]
  1367.  
  1368.  
  1369.  
  1370.  
  1371. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1372.  
  1373.  
  1374.                    enter native DET mode.
  1375.  
  1376.               o    When either end negotiates out of binary mode, the
  1377.                    other end does too, and the mode then reverts to
  1378.                    normal NVT.
  1379.  
  1380.  
  1381.       3.3.3  Option Requirements
  1382.  
  1383.          Every Telnet implementation MUST support the Binary option
  1384.          [TELNET:3] and the Suppress Go Ahead option [TELNET:5], and
  1385.          SHOULD support the Echo [TELNET:4], Status [TELNET:6], End-of-
  1386.          Record [TELNET:9], and Extended Options List [TELNET:8]
  1387.          options.
  1388.  
  1389.          A User or Server Telnet SHOULD support the Window Size Option
  1390.          [TELNET:12] if the local operating system provides the
  1391.          corresponding capability.
  1392.  
  1393.          DISCUSSION:
  1394.               Note that the End-of-Record option only signifies that a
  1395.               Telnet can receive a Telnet EOR without crashing;
  1396.               therefore, every Telnet ought to be willing to accept
  1397.               negotiation of the End-of-Record option.  See also the
  1398.               discussion in Section 3.2.3.
  1399.  
  1400.       3.3.4  Option Initiation
  1401.  
  1402.          When the Telnet protocol is used in a client/server situation,
  1403.          the server SHOULD initiate negotiation of the terminal
  1404.          interaction mode it expects.
  1405.  
  1406.          DISCUSSION:
  1407.               The Telnet protocol was defined to be perfectly
  1408.               symmetrical, but its application is generally asymmetric.
  1409.               Remote login has been known to fail because NEITHER side
  1410.               initiated negotiation of the required non-default terminal
  1411.               modes.  It is generally the server that determines the
  1412.               preferred mode, so the server needs to initiate the
  1413.               negotiation; since the negotiation is symmetric, the user
  1414.               can also initiate it.
  1415.  
  1416.          A client (User Telnet) SHOULD provide a means for users to
  1417.          enable and disable the initiation of option negotiation.
  1418.  
  1419.          DISCUSSION:
  1420.               A user sometimes needs to connect to an application
  1421.               service (e.g., FTP or SMTP) that uses Telnet for its
  1422.  
  1423.  
  1424.  
  1425. Internet Engineering Task Force                                [Page 24]
  1426.  
  1427.  
  1428.  
  1429.  
  1430. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1431.  
  1432.  
  1433.               control stream but does not support Telnet options.  User
  1434.               Telnet may be used for this purpose if initiation of
  1435.               option negotiation is  disabled.
  1436.  
  1437.       3.3.5  Telnet Linemode Option
  1438.  
  1439.          DISCUSSION:
  1440.               An important new Telnet option, LINEMODE [TELNET:12], has
  1441.               been proposed.  The LINEMODE option provides a standard
  1442.               way for a User Telnet and a Server Telnet to agree that
  1443.               the client rather than the server will perform terminal
  1444.               character processing.  When the client has prepared a
  1445.               complete line of text, it will send it to the server in
  1446.               (usually) one TCP packet.  This option will greatly
  1447.               decrease the packet cost of Telnet sessions and will also
  1448.               give much better user response over congested or long-
  1449.               delay networks.
  1450.  
  1451.               The LINEMODE option allows dynamic switching between local
  1452.               and remote character processing.  For example, the Telnet
  1453.               connection will automatically negotiate into single-
  1454.               character mode while a full screen editor is running, and
  1455.               then return to linemode when the editor is finished.
  1456.  
  1457.               We expect that when this RFC is released, hosts should
  1458.               implement the client side of this option, and may
  1459.               implement the server side of this option.  To properly
  1460.               implement the server side, the server needs to be able to
  1461.               tell the local system not to do any input character
  1462.               processing, but to remember its current terminal state and
  1463.               notify the Server Telnet process whenever the state
  1464.               changes.  This will allow password echoing and full screen
  1465.               editors to be handled properly, for example.
  1466.  
  1467.    3.4  TELNET/USER INTERFACE
  1468.  
  1469.       3.4.1  Character Set Transparency
  1470.  
  1471.          User Telnet implementations SHOULD be able to send or receive
  1472.          any 7-bit ASCII character.  Where possible, any special
  1473.          character interpretations by the user host's operating system
  1474.          SHOULD be bypassed so that these characters can conveniently be
  1475.          sent and received on the connection.
  1476.  
  1477.          Some character value MUST be reserved as "escape to command
  1478.          mode"; conventionally, doubling this character allows it to be
  1479.          entered as data.  The specific character used SHOULD be user
  1480.          selectable.
  1481.  
  1482.  
  1483.  
  1484. Internet Engineering Task Force                                [Page 25]
  1485.  
  1486.  
  1487.  
  1488.  
  1489. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1490.  
  1491.  
  1492.          On binary-mode connections, a User Telnet program MAY provide
  1493.          an escape mechanism for entering arbitrary 8-bit values, if the
  1494.          host operating system doesn't allow them to be entered directly
  1495.          from the keyboard.
  1496.  
  1497.          IMPLEMENTATION:
  1498.               The transparency issues are less pressing on servers, but
  1499.               implementors should take care in dealing with issues like:
  1500.               masking off parity bits (sent by an older, non-conforming
  1501.               client) before they reach programs that expect only NVT
  1502.               ASCII, and properly handling programs that request 8-bit
  1503.               data streams.
  1504.  
  1505.       3.4.2  Telnet Commands
  1506.  
  1507.          A User Telnet program MUST provide a user the capability of
  1508.          entering any of the Telnet control functions IP, AO, or AYT,
  1509.          and SHOULD provide the capability of entering EC, EL, and
  1510.          Break.
  1511.  
  1512.       3.4.3  TCP Connection Errors
  1513.  
  1514.          A User Telnet program SHOULD report to the user any TCP errors
  1515.          that are reported by the transport layer (see "TCP/Application
  1516.          Layer Interface" section in [INTRO:1]).
  1517.  
  1518.       3.4.4  Non-Default Telnet Contact Port
  1519.  
  1520.          A User Telnet program SHOULD allow the user to optionally
  1521.          specify a non-standard contact port number at the Server Telnet
  1522.          host.
  1523.  
  1524.       3.4.5  Flushing Output
  1525.  
  1526.          A User Telnet program SHOULD provide the user the ability to
  1527.          specify whether or not output should be flushed when an IP is
  1528.          sent; see Section 3.2.4.
  1529.  
  1530.          For any output flushing scheme that causes the User Telnet to
  1531.          flush output locally until a Telnet signal is received from the
  1532.          Server, there SHOULD be a way for the user to manually restore
  1533.          normal output, in case the Server fails to send the expected
  1534.          signal.
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543. Internet Engineering Task Force                                [Page 26]
  1544.  
  1545.  
  1546.  
  1547.  
  1548. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1549.  
  1550.  
  1551.    3.5.  TELNET REQUIREMENTS SUMMARY
  1552.  
  1553.  
  1554.                                                  |        | | | |S| |
  1555.                                                  |        | | | |H| |F
  1556.                                                  |        | | | |O|M|o
  1557.                                                  |        | |S| |U|U|o
  1558.                                                  |        | |H| |L|S|t
  1559.                                                  |        |M|O| |D|T|n
  1560.                                                  |        |U|U|M| | |o
  1561.                                                  |        |S|L|A|N|N|t
  1562.                                                  |        |T|D|Y|O|O|t
  1563. FEATURE                                          |SECTION | | | |T|T|e
  1564. -------------------------------------------------|--------|-|-|-|-|-|--
  1565.                                                  |        | | | | | |
  1566. Option Negotiation                               |3.2.1   |x| | | | |
  1567.   Avoid negotiation loops                        |3.2.1   |x| | | | |
  1568.   Refuse unsupported options                     |3.2.1   |x| | | | |
  1569.   Negotiation OK anytime on connection           |3.2.1   | |x| | | |
  1570.   Default to NVT                                 |3.2.1   |x| | | | |
  1571.   Send official name in Term-Type option         |3.2.8   |x| | | | |
  1572.   Accept any name in Term-Type option            |3.2.8   |x| | | | |
  1573.   Implement Binary, Suppress-GA options          |3.3.3   |x| | | | |
  1574.   Echo, Status, EOL, Ext-Opt-List options        |3.3.3   | |x| | | |
  1575.   Implement Window-Size option if appropriate    |3.3.3   | |x| | | |
  1576.   Server initiate mode negotiations              |3.3.4   | |x| | | |
  1577.   User can enable/disable init negotiations      |3.3.4   | |x| | | |
  1578.                                                  |        | | | | | |
  1579. Go-Aheads                                        |        | | | | | |
  1580.   Non-GA server negotiate SUPPRESS-GA option     |3.2.2   |x| | | | |
  1581.   User or Server accept SUPPRESS-GA option       |3.2.2   |x| | | | |
  1582.   User Telnet ignore GA's                        |3.2.2   | | |x| | |
  1583.                                                  |        | | | | | |
  1584. Control Functions                                |        | | | | | |
  1585.   Support SE NOP DM IP AO AYT SB                 |3.2.3   |x| | | | |
  1586.   Support EOR EC EL Break                        |3.2.3   | | |x| | |
  1587.   Ignore unsupported control functions           |3.2.3   |x| | | | |
  1588.   User, Server discard urgent data up to DM      |3.2.4   |x| | | | |
  1589.   User Telnet send "Synch" after IP, AO, AYT     |3.2.4   | |x| | | |
  1590.   Server Telnet reply Synch to IP                |3.2.4   | | |x| | |
  1591.   Server Telnet reply Synch to AO                |3.2.4   |x| | | | |
  1592.   User Telnet can flush output when send IP      |3.2.4   | |x| | | |
  1593.                                                  |        | | | | | |
  1594. Encoding                                         |        | | | | | |
  1595.   Send high-order bit in NVT mode                |3.2.5   | | | |x| |
  1596.   Send high-order bit as parity bit              |3.2.5   | | | | |x|
  1597.   Negot. BINARY if pass high-ord. bit to applic  |3.2.5   | |x| | | |
  1598.   Always double IAC data byte                    |3.2.6   |x| | | | |
  1599.  
  1600.  
  1601.  
  1602. Internet Engineering Task Force                                [Page 27]
  1603.  
  1604.  
  1605.  
  1606.  
  1607. RFC1123                  REMOTE LOGIN -- TELNET             October 1989
  1608.  
  1609.  
  1610.   Double IAC data byte in binary mode            |3.2.7   |x| | | | |
  1611.   Obey Telnet cmds in binary mode                |3.2.7   |x| | | | |
  1612.   End-of-line, CR NUL in binary mode             |3.2.7   | | | | |x|
  1613.                                                  |        | | | | | |
  1614. End-of-Line                                      |        | | | | | |
  1615.   EOL at Server same as local end-of-line        |3.3.1   |x| | | | |
  1616.   ASCII Server accept CR LF or CR NUL for EOL    |3.3.1   |x| | | | |
  1617.   User Telnet able to send CR LF, CR NUL, or LF  |3.3.1   |x| | | | |
  1618.     ASCII user able to select CR LF/CR NUL       |3.3.1   | |x| | | |
  1619.     User Telnet default mode is CR LF            |3.3.1   | |x| | | |
  1620.   Non-interactive uses CR LF for EOL             |3.3.1   |x| | | | |
  1621.                                                  |        | | | | | |
  1622. User Telnet interface                            |        | | | | | |
  1623.   Input & output all 7-bit characters            |3.4.1   | |x| | | |
  1624.   Bypass local op sys interpretation             |3.4.1   | |x| | | |
  1625.   Escape character                               |3.4.1   |x| | | | |
  1626.      User-settable escape character              |3.4.1   | |x| | | |
  1627.   Escape to enter 8-bit values                   |3.4.1   | | |x| | |
  1628.   Can input IP, AO, AYT                          |3.4.2   |x| | | | |
  1629.   Can input EC, EL, Break                        |3.4.2   | |x| | | |
  1630.   Report TCP connection errors to user           |3.4.3   | |x| | | |
  1631.   Optional non-default contact port              |3.4.4   | |x| | | |
  1632.   Can spec: output flushed when IP sent          |3.4.5   | |x| | | |
  1633.   Can manually restore output mode               |3.4.5   | |x| | | |
  1634.                                                  |        | | | | | |
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661. Internet Engineering Task Force                                [Page 28]
  1662.  
  1663.  
  1664.  
  1665.  
  1666. RFC1123                   FILE TRANSFER -- FTP              October 1989
  1667.  
  1668.  
  1669. 4.  FILE TRANSFER
  1670.  
  1671.    4.1  FILE TRANSFER PROTOCOL -- FTP
  1672.  
  1673.       4.1.1  INTRODUCTION
  1674.  
  1675.          The File Transfer Protocol FTP is the primary Internet standard
  1676.          for file transfer.  The current specification is contained in
  1677.          RFC-959 [FTP:1].
  1678.  
  1679.          FTP uses separate simultaneous TCP connections for control and
  1680.          for data transfer.  The FTP protocol includes many features,
  1681.          some of which are not commonly implemented.  However, for every
  1682.          feature in FTP, there exists at least one implementation.  The
  1683.          minimum implementation defined in RFC-959 was too small, so a
  1684.          somewhat larger minimum implementation is defined here.
  1685.  
  1686.          Internet users have been unnecessarily burdened for years by
  1687.          deficient FTP implementations.  Protocol implementors have
  1688.          suffered from the erroneous opinion that implementing FTP ought
  1689.          to be a small and trivial task.  This is wrong, because FTP has
  1690.          a user interface, because it has to deal (correctly) with the
  1691.          whole variety of communication and operating system errors that
  1692.          may occur, and because it has to handle the great diversity of
  1693.          real file systems in the world.
  1694.  
  1695.       4.1.2.  PROTOCOL WALK-THROUGH
  1696.  
  1697.          4.1.2.1  LOCAL Type: RFC-959 Section 3.1.1.4
  1698.  
  1699.             An FTP program MUST support TYPE I ("IMAGE" or binary type)
  1700.             as well as TYPE L 8 ("LOCAL" type with logical byte size 8).
  1701.             A machine whose memory is organized into m-bit words, where
  1702.             m is not a multiple of 8, MAY also support TYPE L m.
  1703.  
  1704.             DISCUSSION:
  1705.                  The command "TYPE L 8" is often required to transfer
  1706.                  binary data between a machine whose memory is organized
  1707.                  into (e.g.) 36-bit words and a machine with an 8-bit
  1708.                  byte organization.  For an 8-bit byte machine, TYPE L 8
  1709.                  is equivalent to IMAGE.
  1710.  
  1711.                  "TYPE L m" is sometimes specified to the FTP programs
  1712.                  on two m-bit word machines to ensure the correct
  1713.                  transfer of a native-mode binary file from one machine
  1714.                  to the other.  However, this command should have the
  1715.                  same effect on these machines as "TYPE I".
  1716.  
  1717.  
  1718.  
  1719.  
  1720. Internet Engineering Task Force                                [Page 29]
  1721.  
  1722.  
  1723.  
  1724.  
  1725. RFC1123                   FILE TRANSFER -- FTP              October 1989
  1726.  
  1727.  
  1728.          4.1.2.2  Telnet Format Control: RFC-959 Section 3.1.1.5.2
  1729.  
  1730.             A host that makes no distinction between TYPE N and TYPE T
  1731.             SHOULD implement TYPE T to be identical to TYPE N.
  1732.  
  1733.             DISCUSSION:
  1734.                  This provision should ease interoperation with hosts
  1735.                  that do make this distinction.
  1736.  
  1737.                  Many hosts represent text files internally as strings
  1738.                  of ASCII characters, using the embedded ASCII format
  1739.                  effector characters (LF, BS, FF, ...) to control the
  1740.                  format when a file is printed.  For such hosts, there
  1741.                  is no distinction between "print" files and other
  1742.                  files.  However, systems that use record structured
  1743.                  files typically need a special format for printable
  1744.                  files (e.g., ASA carriage control).   For the latter
  1745.                  hosts, FTP allows a choice of TYPE N or TYPE T.
  1746.  
  1747.          4.1.2.3  Page Structure: RFC-959 Section 3.1.2.3 and Appendix I
  1748.  
  1749.             Implementation of page structure is NOT RECOMMENDED in
  1750.             general. However, if a host system does need to implement
  1751.             FTP for "random access" or "holey" files, it MUST use the
  1752.             defined page structure format rather than define a new
  1753.             private FTP format.
  1754.  
  1755.          4.1.2.4  Data Structure Transformations: RFC-959 Section 3.1.2
  1756.  
  1757.             An FTP transformation between record-structure and file-
  1758.             structure SHOULD be invertible, to the extent possible while
  1759.             making the result useful on the target host.
  1760.  
  1761.             DISCUSSION:
  1762.                  RFC-959 required strict invertibility between record-
  1763.                  structure and file-structure, but in practice,
  1764.                  efficiency and convenience often preclude it.
  1765.                  Therefore, the requirement is being relaxed.  There are
  1766.                  two different objectives for transferring a file:
  1767.                  processing it on the target host, or just storage.  For
  1768.                  storage, strict invertibility is important.  For
  1769.                  processing, the file created on the target host needs
  1770.                  to be in the format expected by application programs on
  1771.                  that host.
  1772.  
  1773.                  As an example of the conflict, imagine a record-
  1774.                  oriented operating system that requires some data files
  1775.                  to have exactly 80 bytes in each record.  While STORing
  1776.  
  1777.  
  1778.  
  1779. Internet Engineering Task Force                                [Page 30]
  1780.  
  1781.  
  1782.  
  1783.  
  1784. RFC1123                   FILE TRANSFER -- FTP              October 1989
  1785.  
  1786.  
  1787.                  a file on such a host, an FTP Server must be able to
  1788.                  pad each line or record to 80 bytes; a later retrieval
  1789.                  of such a file cannot be strictly invertible.
  1790.  
  1791.          4.1.2.5  Data Connection Management: RFC-959 Section 3.3
  1792.  
  1793.             A User-FTP that uses STREAM mode SHOULD send a PORT command
  1794.             to assign a non-default data port before each transfer
  1795.             command is issued.
  1796.  
  1797.             DISCUSSION:
  1798.                  This is required because of the long delay after a TCP
  1799.                  connection is closed until its socket pair can be
  1800.                  reused, to allow multiple transfers during a single FTP
  1801.                  session.  Sending a port command can avoided if a
  1802.                  transfer mode other than stream is used, by leaving the
  1803.                  data transfer connection open between transfers.
  1804.  
  1805.          4.1.2.6  PASV Command: RFC-959 Section 4.1.2
  1806.  
  1807.             A server-FTP MUST implement the PASV command.
  1808.  
  1809.             If multiple third-party transfers are to be executed during
  1810.             the same session, a new PASV command MUST be issued before
  1811.             each transfer command, to obtain a unique port pair.
  1812.  
  1813.             IMPLEMENTATION:
  1814.                  The format of the 227 reply to a PASV command is not
  1815.                  well standardized.  In particular, an FTP client cannot
  1816.                  assume that the parentheses shown on page 40 of RFC-959
  1817.                  will be present (and in fact, Figure 3 on page 43 omits
  1818.                  them).  Therefore, a User-FTP program that interprets
  1819.                  the PASV reply must scan the reply for the first digit
  1820.                  of the host and port numbers.
  1821.  
  1822.                  Note that the host number h1,h2,h3,h4 is the IP address
  1823.                  of the server host that is sending the reply, and that
  1824.                  p1,p2 is a non-default data transfer port that PASV has
  1825.                  assigned.
  1826.  
  1827.          4.1.2.7  LIST and NLST Commands: RFC-959 Section 4.1.3
  1828.  
  1829.             The data returned by an NLST command MUST contain only a
  1830.             simple list of legal pathnames, such that the server can use
  1831.             them directly as the arguments of subsequent data transfer
  1832.             commands for the individual files.
  1833.  
  1834.             The data returned by a LIST or NLST command SHOULD use an
  1835.  
  1836.  
  1837.  
  1838. Internet Engineering Task Force                                [Page 31]
  1839.  
  1840.  
  1841.  
  1842.  
  1843. RFC1123                   FILE TRANSFER -- FTP              October 1989
  1844.  
  1845.  
  1846.             implied TYPE AN, unless the current type is EBCDIC, in which
  1847.             case an implied TYPE EN SHOULD be used.
  1848.  
  1849.             DISCUSSION:
  1850.                  Many FTP clients support macro-commands that will get
  1851.                  or put files matching a wildcard specification, using
  1852.                  NLST to obtain a list of pathnames.  The expansion of
  1853.                  "multiple-put" is local to the client, but "multiple-
  1854.                  get" requires cooperation by the server.
  1855.  
  1856.                  The implied type for LIST and NLST is designed to
  1857.                  provide compatibility with existing User-FTPs, and in
  1858.                  particular with multiple-get commands.
  1859.  
  1860.          4.1.2.8  SITE Command: RFC-959 Section 4.1.3
  1861.  
  1862.             A Server-FTP SHOULD use the SITE command for non-standard
  1863.             features, rather than invent new private commands or
  1864.             unstandardized extensions to existing commands.
  1865.  
  1866.          4.1.2.9  STOU Command: RFC-959 Section 4.1.3
  1867.  
  1868.             The STOU command stores into a uniquely named file.  When it
  1869.             receives an STOU command, a Server-FTP MUST return the
  1870.             actual file name in the "125 Transfer Starting" or the "150
  1871.             Opening Data Connection" message that precedes the transfer
  1872.             (the 250 reply code mentioned in RFC-959 is incorrect).  The
  1873.             exact format of these messages is hereby defined to be as
  1874.             follows:
  1875.  
  1876.                 125 FILE: pppp
  1877.                 150 FILE: pppp
  1878.  
  1879.             where pppp represents the unique pathname of the file that
  1880.             will be written.
  1881.  
  1882.          4.1.2.10  Telnet End-of-line Code: RFC-959, Page 34
  1883.  
  1884.             Implementors MUST NOT assume any correspondence between READ
  1885.             boundaries on the control connection and the Telnet EOL
  1886.             sequences (CR LF).
  1887.  
  1888.             DISCUSSION:
  1889.                  Thus, a server-FTP (or User-FTP) must continue reading
  1890.                  characters from the control connection until a complete
  1891.                  Telnet EOL sequence is encountered, before processing
  1892.                  the command (or response, respectively).  Conversely, a
  1893.                  single READ from the control connection may include
  1894.  
  1895.  
  1896.  
  1897. Internet Engineering Task Force                                [Page 32]
  1898.  
  1899.  
  1900.  
  1901.  
  1902. RFC1123                   FILE TRANSFER -- FTP              October 1989
  1903.  
  1904.  
  1905.                  more than one FTP command.
  1906.  
  1907.          4.1.2.11  FTP Replies: RFC-959 Section 4.2, Page 35
  1908.  
  1909.             A Server-FTP MUST send only correctly formatted replies on
  1910.             the control connection.  Note that RFC-959 (unlike earlier
  1911.             versions of the FTP spec) contains no provision for a
  1912.             "spontaneous" reply message.
  1913.  
  1914.             A Server-FTP SHOULD use the reply codes defined in RFC-959
  1915.             whenever they apply.  However, a server-FTP MAY use a
  1916.             different reply code when needed, as long as the general
  1917.             rules of Section 4.2 are followed. When the implementor has
  1918.             a choice between a 4xx and 5xx reply code, a Server-FTP
  1919.             SHOULD send a 4xx (temporary failure) code when there is any
  1920.             reasonable possibility that a failed FTP will succeed a few
  1921.             hours later.
  1922.  
  1923.             A User-FTP SHOULD generally use only the highest-order digit
  1924.             of a 3-digit reply code for making a procedural decision, to
  1925.             prevent difficulties when a Server-FTP uses non-standard
  1926.             reply codes.
  1927.  
  1928.             A User-FTP MUST be able to handle multi-line replies.  If
  1929.             the implementation imposes a limit on the number of lines
  1930.             and if this limit is exceeded, the User-FTP MUST recover,
  1931.             e.g., by ignoring the excess lines until the end of the
  1932.             multi-line reply is reached.
  1933.  
  1934.             A User-FTP SHOULD NOT interpret a 421 reply code ("Service
  1935.             not available, closing control connection") specially, but
  1936.             SHOULD detect closing of the control connection by the
  1937.             server.
  1938.  
  1939.             DISCUSSION:
  1940.                  Server implementations that fail to strictly follow the
  1941.                  reply rules often cause FTP user programs to hang.
  1942.                  Note that RFC-959 resolved ambiguities in the reply
  1943.                  rules found in earlier FTP specifications and must be
  1944.                  followed.
  1945.  
  1946.                  It is important to choose FTP reply codes that properly
  1947.                  distinguish between temporary and permanent failures,
  1948.                  to allow the successful use of file transfer client
  1949.                  daemons.  These programs depend on the reply codes to
  1950.                  decide whether or not to retry a failed transfer; using
  1951.                  a permanent failure code (5xx) for a temporary error
  1952.                  will cause these programs to give up unnecessarily.
  1953.  
  1954.  
  1955.  
  1956. Internet Engineering Task Force                                [Page 33]
  1957.  
  1958.  
  1959.  
  1960.  
  1961. RFC1123                   FILE TRANSFER -- FTP              October 1989
  1962.  
  1963.  
  1964.                  When the meaning of a reply matches exactly the text
  1965.                  shown in RFC-959, uniformity will be enhanced by using
  1966.                  the RFC-959 text verbatim.  However, a Server-FTP
  1967.                  implementor is encouraged to choose reply text that
  1968.                  conveys specific system-dependent information, when
  1969.                  appropriate.
  1970.  
  1971.          4.1.2.12  Connections: RFC-959 Section 5.2
  1972.  
  1973.             The words "and the port used" in the second paragraph of
  1974.             this section of RFC-959 are erroneous (historical), and they
  1975.             should be ignored.
  1976.  
  1977.             On a multihomed server host, the default data transfer port
  1978.             (L-1) MUST be associated with the same local IP address as
  1979.             the corresponding control connection to port L.
  1980.  
  1981.             A user-FTP MUST NOT send any Telnet controls other than
  1982.             SYNCH and IP on an FTP control connection. In particular, it
  1983.             MUST NOT attempt to negotiate Telnet options on the control
  1984.             connection.  However, a server-FTP MUST be capable of
  1985.             accepting and refusing Telnet negotiations (i.e., sending
  1986.             DONT/WONT).
  1987.  
  1988.             DISCUSSION:
  1989.                  Although the RFC says: "Server- and User- processes
  1990.                  should follow the conventions for the Telnet
  1991.                  protocol...[on the control connection]", it is not the
  1992.                  intent that Telnet option negotiation is to be
  1993.                  employed.
  1994.  
  1995.          4.1.2.13  Minimum Implementation; RFC-959 Section 5.1
  1996.  
  1997.             The following commands and options MUST be supported by
  1998.             every server-FTP and user-FTP, except in cases where the
  1999.             underlying file system or operating system does not allow or
  2000.             support a particular command.
  2001.  
  2002.                  Type: ASCII Non-print, IMAGE, LOCAL 8
  2003.                  Mode: Stream
  2004.                  Structure: File, Record*
  2005.                  Commands:
  2006.                     USER, PASS, ACCT,
  2007.                     PORT, PASV,
  2008.                     TYPE, MODE, STRU,
  2009.                     RETR, STOR, APPE,
  2010.                     RNFR, RNTO, DELE,
  2011.                     CWD,  CDUP, RMD,  MKD,  PWD,
  2012.  
  2013.  
  2014.  
  2015. Internet Engineering Task Force                                [Page 34]
  2016.  
  2017.  
  2018.  
  2019.  
  2020. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2021.  
  2022.  
  2023.                     LIST, NLST,
  2024.                     SYST, STAT,
  2025.                     HELP, NOOP, QUIT.
  2026.  
  2027.             *Record structure is REQUIRED only for hosts whose file
  2028.             systems support record structure.
  2029.  
  2030.             DISCUSSION:
  2031.                  Vendors are encouraged to implement a larger subset of
  2032.                  the protocol.  For example, there are important
  2033.                  robustness features in the protocol (e.g., Restart,
  2034.                  ABOR, block mode) that would be an aid to some Internet
  2035.                  users but are not widely implemented.
  2036.  
  2037.                  A host that does not have record structures in its file
  2038.                  system may still accept files with STRU R, recording
  2039.                  the byte stream literally.
  2040.  
  2041.       4.1.3  SPECIFIC ISSUES
  2042.  
  2043.          4.1.3.1  Non-standard Command Verbs
  2044.  
  2045.             FTP allows "experimental" commands, whose names begin with
  2046.             "X".  If these commands are subsequently adopted as
  2047.             standards, there may still be existing implementations using
  2048.             the "X" form.  At present, this is true for the directory
  2049.             commands:
  2050.  
  2051.                 RFC-959   "Experimental"
  2052.  
  2053.                   MKD        XMKD
  2054.                   RMD        XRMD
  2055.                   PWD        XPWD
  2056.                   CDUP       XCUP
  2057.                   CWD        XCWD
  2058.  
  2059.             All FTP implementations SHOULD recognize both forms of these
  2060.             commands, by simply equating them with extra entries in the
  2061.             command lookup table.
  2062.  
  2063.             IMPLEMENTATION:
  2064.                  A User-FTP can access a server that supports only the
  2065.                  "X" forms by implementing a mode switch, or
  2066.                  automatically using the following procedure: if the
  2067.                  RFC-959 form of one of the above commands is rejected
  2068.                  with a 500 or 502 response code, then try the
  2069.                  experimental form; any other response would be passed
  2070.                  to the user.
  2071.  
  2072.  
  2073.  
  2074. Internet Engineering Task Force                                [Page 35]
  2075.  
  2076.  
  2077.  
  2078.  
  2079. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2080.  
  2081.  
  2082.          4.1.3.2  Idle Timeout
  2083.  
  2084.             A Server-FTP process SHOULD have an idle timeout, which will
  2085.             terminate the process and close the control connection if
  2086.             the server is inactive (i.e., no command or data transfer in
  2087.             progress) for a long period of time.  The idle timeout time
  2088.             SHOULD be configurable, and the default should be at least 5
  2089.             minutes.
  2090.  
  2091.             A client FTP process ("User-PI" in RFC-959) will need
  2092.             timeouts on responses only if it is invoked from a program.
  2093.  
  2094.             DISCUSSION:
  2095.                  Without a timeout, a Server-FTP process may be left
  2096.                  pending indefinitely if the corresponding client
  2097.                  crashes without closing the control connection.
  2098.  
  2099.          4.1.3.3  Concurrency of Data and Control
  2100.  
  2101.             DISCUSSION:
  2102.                  The intent of the designers of FTP was that a user
  2103.                  should be able to send a STAT command at any time while
  2104.                  data transfer was in progress and that the server-FTP
  2105.                  would reply immediately with status -- e.g., the number
  2106.                  of bytes transferred so far.  Similarly, an ABOR
  2107.                  command should be possible at any time during a data
  2108.                  transfer.
  2109.  
  2110.                  Unfortunately, some small-machine operating systems
  2111.                  make such concurrent programming difficult, and some
  2112.                  other implementers seek minimal solutions, so some FTP
  2113.                  implementations do not allow concurrent use of the data
  2114.                  and control connections.  Even such a minimal server
  2115.                  must be prepared to accept and defer a STAT or ABOR
  2116.                  command that arrives during data transfer.
  2117.  
  2118.          4.1.3.4  FTP Restart Mechanism
  2119.  
  2120.             The description of the 110 reply on pp. 40-41 of RFC-959 is
  2121.             incorrect; the correct description is as follows.  A restart
  2122.             reply message, sent over the control connection from the
  2123.             receiving FTP to the User-FTP, has the format:
  2124.  
  2125.                 110 MARK ssss = rrrr
  2126.  
  2127.             Here:
  2128.  
  2129.             *    ssss is a text string that appeared in a Restart Marker
  2130.  
  2131.  
  2132.  
  2133. Internet Engineering Task Force                                [Page 36]
  2134.  
  2135.  
  2136.  
  2137.  
  2138. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2139.  
  2140.  
  2141.                  in the data stream and encodes a position in the
  2142.                  sender's file system;
  2143.  
  2144.             *    rrrr encodes the corresponding position in the
  2145.                  receiver's file system.
  2146.  
  2147.             The encoding, which is specific to a particular file system
  2148.             and network implementation, is always generated and
  2149.             interpreted by the same system, either sender or receiver.
  2150.  
  2151.             When an FTP that implements restart receives a Restart
  2152.             Marker in the data stream, it SHOULD force the data to that
  2153.             point to be written to stable storage before encoding the
  2154.             corresponding position rrrr.  An FTP sending Restart Markers
  2155.             MUST NOT assume that 110 replies will be returned
  2156.             synchronously with the data, i.e., it must not await a 110
  2157.             reply before sending more data.
  2158.  
  2159.             Two new reply codes are hereby defined for errors
  2160.             encountered in restarting a transfer:
  2161.  
  2162.               554 Requested action not taken: invalid REST parameter.
  2163.  
  2164.                  A 554 reply may result from a FTP service command that
  2165.                  follows a REST command.  The reply indicates that the
  2166.                  existing file at the Server-FTP cannot be repositioned
  2167.                  as specified in the REST.
  2168.  
  2169.               555 Requested action not taken: type or stru mismatch.
  2170.  
  2171.                  A 555 reply may result from an APPE command or from any
  2172.                  FTP service command following a REST command.  The
  2173.                  reply indicates that there is some mismatch between the
  2174.                  current transfer parameters (type and stru) and the
  2175.                  attributes of the existing file.
  2176.  
  2177.             DISCUSSION:
  2178.                  Note that the FTP Restart mechanism requires that Block
  2179.                  or Compressed mode be used for data transfer, to allow
  2180.                  the Restart Markers to be included within the data
  2181.                  stream.  The frequency of Restart Markers can be low.
  2182.  
  2183.                  Restart Markers mark a place in the data stream, but
  2184.                  the receiver may be performing some transformation on
  2185.                  the data as it is stored into stable storage.  In
  2186.                  general, the receiver's encoding must include any state
  2187.                  information necessary to restart this transformation at
  2188.                  any point of the FTP data stream.  For example, in TYPE
  2189.  
  2190.  
  2191.  
  2192. Internet Engineering Task Force                                [Page 37]
  2193.  
  2194.  
  2195.  
  2196.  
  2197. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2198.  
  2199.  
  2200.                  A transfers, some receiver hosts transform CR LF
  2201.                  sequences into a single LF character on disk.   If a
  2202.                  Restart Marker happens to fall between CR and LF, the
  2203.                  receiver must encode in rrrr that the transfer must be
  2204.                  restarted in a "CR has been seen and discarded" state.
  2205.  
  2206.                  Note that the Restart Marker is required to be encoded
  2207.                  as a string of printable ASCII characters, regardless
  2208.                  of the type of the data.
  2209.  
  2210.                  RFC-959 says that restart information is to be returned
  2211.                  "to the user".  This should not be taken literally.  In
  2212.                  general, the User-FTP should save the restart
  2213.                  information (ssss,rrrr) in stable storage, e.g., append
  2214.                  it to a restart control file.  An empty restart control
  2215.                  file should be created when the transfer first starts
  2216.                  and deleted automatically when the transfer completes
  2217.                  successfully.  It is suggested that this file have a
  2218.                  name derived in an easily-identifiable manner from the
  2219.                  name of the file being transferred and the remote host
  2220.                  name; this is analogous to the means used by many text
  2221.                  editors for naming "backup" files.
  2222.  
  2223.                  There are three cases for FTP restart.
  2224.  
  2225.                  (1)  User-to-Server Transfer
  2226.  
  2227.                       The User-FTP puts Restart Markers <ssss> at
  2228.                       convenient places in the data stream.  When the
  2229.                       Server-FTP receives a Marker, it writes all prior
  2230.                       data to disk, encodes its file system position and
  2231.                       transformation state as rrrr, and returns a "110
  2232.                       MARK ssss = rrrr" reply over the control
  2233.                       connection.  The User-FTP appends the pair
  2234.                       (ssss,rrrr) to its restart control file.
  2235.  
  2236.                       To restart the transfer, the User-FTP fetches the
  2237.                       last (ssss,rrrr) pair from the restart control
  2238.                       file, repositions its local file system and
  2239.                       transformation state using ssss, and sends the
  2240.                       command "REST rrrr" to the Server-FTP.
  2241.  
  2242.                  (2)  Server-to-User Transfer
  2243.  
  2244.                       The Server-FTP puts Restart Markers <ssss> at
  2245.                       convenient places in the data stream.  When the
  2246.                       User-FTP receives a Marker, it writes all prior
  2247.                       data to disk, encodes its file system position and
  2248.  
  2249.  
  2250.  
  2251. Internet Engineering Task Force                                [Page 38]
  2252.  
  2253.  
  2254.  
  2255.  
  2256. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2257.  
  2258.  
  2259.                       transformation state as rrrr, and appends the pair
  2260.                       (rrrr,ssss) to its restart control file.
  2261.  
  2262.                       To restart the transfer, the User-FTP fetches the
  2263.                       last (rrrr,ssss) pair from the restart control
  2264.                       file, repositions its local file system and
  2265.                       transformation state using rrrr, and sends the
  2266.                       command "REST ssss" to the Server-FTP.
  2267.  
  2268.                  (3)  Server-to-Server ("Third-Party") Transfer
  2269.  
  2270.                       The sending Server-FTP puts Restart Markers <ssss>
  2271.                       at convenient places in the data stream.  When it
  2272.                       receives a Marker, the receiving Server-FTP writes
  2273.                       all prior data to disk, encodes its file system
  2274.                       position and transformation state as rrrr, and
  2275.                       sends a "110 MARK ssss = rrrr" reply over the
  2276.                       control connection to the User.  The User-FTP
  2277.                       appends the pair (ssss,rrrr) to its restart
  2278.                       control file.
  2279.  
  2280.                       To restart the transfer, the User-FTP fetches the
  2281.                       last (ssss,rrrr) pair from the restart control
  2282.                       file, sends "REST ssss" to the sending Server-FTP,
  2283.                       and sends "REST rrrr" to the receiving Server-FTP.
  2284.  
  2285.  
  2286.       4.1.4  FTP/USER INTERFACE
  2287.  
  2288.          This section discusses the user interface for a User-FTP
  2289.          program.
  2290.  
  2291.          4.1.4.1  Pathname Specification
  2292.  
  2293.             Since FTP is intended for use in a heterogeneous
  2294.             environment, User-FTP implementations MUST support remote
  2295.             pathnames as arbitrary character strings, so that their form
  2296.             and content are not limited by the conventions of the local
  2297.             operating system.
  2298.  
  2299.             DISCUSSION:
  2300.                  In particular, remote pathnames can be of arbitrary
  2301.                  length, and all the printing ASCII characters as well
  2302.                  as space (0x20) must be allowed.  RFC-959 allows a
  2303.                  pathname to contain any 7-bit ASCII character except CR
  2304.                  or LF.
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310. Internet Engineering Task Force                                [Page 39]
  2311.  
  2312.  
  2313.  
  2314.  
  2315. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2316.  
  2317.  
  2318.          4.1.4.2  "QUOTE" Command
  2319.  
  2320.             A User-FTP program MUST implement a "QUOTE" command that
  2321.             will pass an arbitrary character string to the server and
  2322.             display all resulting response messages to the user.
  2323.  
  2324.             To make the "QUOTE" command useful, a User-FTP SHOULD send
  2325.             transfer control commands to the server as the user enters
  2326.             them, rather than saving all the commands and sending them
  2327.             to the server only when a data transfer is started.
  2328.  
  2329.             DISCUSSION:
  2330.                  The "QUOTE" command is essential to allow the user to
  2331.                  access servers that require system-specific commands
  2332.                  (e.g., SITE or ALLO), or to invoke new or optional
  2333.                  features that are not implemented by the User-FTP.  For
  2334.                  example, "QUOTE" may be used to specify "TYPE A T" to
  2335.                  send a print file to hosts that require the
  2336.                  distinction, even if the User-FTP does not recognize
  2337.                  that TYPE.
  2338.  
  2339.          4.1.4.3  Displaying Replies to User
  2340.  
  2341.             A User-FTP SHOULD display to the user the full text of all
  2342.             error reply messages it receives.  It SHOULD have a
  2343.             "verbose" mode in which all commands it sends and the full
  2344.             text and reply codes it receives are displayed, for
  2345.             diagnosis of problems.
  2346.  
  2347.          4.1.4.4  Maintaining Synchronization
  2348.  
  2349.             The state machine in a User-FTP SHOULD be forgiving of
  2350.             missing and unexpected reply messages, in order to maintain
  2351.             command synchronization with the server.
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369. Internet Engineering Task Force                                [Page 40]
  2370.  
  2371.  
  2372.  
  2373.  
  2374. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2375.  
  2376.  
  2377.       4.1.5   FTP REQUIREMENTS SUMMARY
  2378.  
  2379.                                            |               | | | |S| |
  2380.                                            |               | | | |H| |F
  2381.                                            |               | | | |O|M|o
  2382.                                            |               | |S| |U|U|o
  2383.                                            |               | |H| |L|S|t
  2384.                                            |               |M|O| |D|T|n
  2385.                                            |               |U|U|M| | |o
  2386.                                            |               |S|L|A|N|N|t
  2387.                                            |               |T|D|Y|O|O|t
  2388. FEATURE                                    |SECTION        | | | |T|T|e
  2389. -------------------------------------------|---------------|-|-|-|-|-|--
  2390. Implement TYPE T if same as TYPE N         |4.1.2.2        | |x| | | |
  2391. File/Record transform invertible if poss.  |4.1.2.4        | |x| | | |
  2392. User-FTP send PORT cmd for stream mode     |4.1.2.5        | |x| | | |
  2393. Server-FTP implement PASV                  |4.1.2.6        |x| | | | |
  2394.   PASV is per-transfer                     |4.1.2.6        |x| | | | |
  2395. NLST reply usable in RETR cmds             |4.1.2.7        |x| | | | |
  2396. Implied type for LIST and NLST             |4.1.2.7        | |x| | | |
  2397. SITE cmd for non-standard features         |4.1.2.8        | |x| | | |
  2398. STOU cmd return pathname as specified      |4.1.2.9        |x| | | | |
  2399. Use TCP READ boundaries on control conn.   |4.1.2.10       | | | | |x|
  2400.                                            |               | | | | | |
  2401. Server-FTP send only correct reply format  |4.1.2.11       |x| | | | |
  2402. Server-FTP use defined reply code if poss. |4.1.2.11       | |x| | | |
  2403.   New reply code following Section 4.2     |4.1.2.11       | | |x| | |
  2404. User-FTP use only high digit of reply      |4.1.2.11       | |x| | | |
  2405. User-FTP handle multi-line reply lines     |4.1.2.11       |x| | | | |
  2406. User-FTP handle 421 reply specially        |4.1.2.11       | | | |x| |
  2407.                                            |               | | | | | |
  2408. Default data port same IP addr as ctl conn |4.1.2.12       |x| | | | |
  2409. User-FTP send Telnet cmds exc. SYNCH, IP   |4.1.2.12       | | | | |x|
  2410. User-FTP negotiate Telnet options          |4.1.2.12       | | | | |x|
  2411. Server-FTP handle Telnet options           |4.1.2.12       |x| | | | |
  2412. Handle "Experimental" directory cmds       |4.1.3.1        | |x| | | |
  2413. Idle timeout in server-FTP                 |4.1.3.2        | |x| | | |
  2414.     Configurable idle timeout              |4.1.3.2        | |x| | | |
  2415. Receiver checkpoint data at Restart Marker |4.1.3.4        | |x| | | |
  2416. Sender assume 110 replies are synchronous  |4.1.3.4        | | | | |x|
  2417.                                            |               | | | | | |
  2418. Support TYPE:                              |               | | | | | |
  2419.   ASCII - Non-Print (AN)                   |4.1.2.13       |x| | | | |
  2420.   ASCII - Telnet (AT) -- if same as AN     |4.1.2.2        | |x| | | |
  2421.   ASCII - Carriage Control (AC)            |959 3.1.1.5.2  | | |x| | |
  2422.   EBCDIC - (any form)                      |959 3.1.1.2    | | |x| | |
  2423.   IMAGE                                    |4.1.2.1        |x| | | | |
  2424.   LOCAL 8                                  |4.1.2.1        |x| | | | |
  2425.  
  2426.  
  2427.  
  2428. Internet Engineering Task Force                                [Page 41]
  2429.  
  2430.  
  2431.  
  2432.  
  2433. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2434.  
  2435.  
  2436.   LOCAL m                                  |4.1.2.1        | | |x| | |2
  2437.                                            |               | | | | | |
  2438. Support MODE:                              |               | | | | | |
  2439.   Stream                                   |4.1.2.13       |x| | | | |
  2440.   Block                                    |959 3.4.2      | | |x| | |
  2441.                                            |               | | | | | |
  2442. Support STRUCTURE:                         |               | | | | | |
  2443.   File                                     |4.1.2.13       |x| | | | |
  2444.   Record                                   |4.1.2.13       |x| | | | |3
  2445.   Page                                     |4.1.2.3        | | | |x| |
  2446.                                            |               | | | | | |
  2447. Support commands:                          |               | | | | | |
  2448.   USER                                     |4.1.2.13       |x| | | | |
  2449.   PASS                                     |4.1.2.13       |x| | | | |
  2450.   ACCT                                     |4.1.2.13       |x| | | | |
  2451.   CWD                                      |4.1.2.13       |x| | | | |
  2452.   CDUP                                     |4.1.2.13       |x| | | | |
  2453.   SMNT                                     |959 5.3.1      | | |x| | |
  2454.   REIN                                     |959 5.3.1      | | |x| | |
  2455.   QUIT                                     |4.1.2.13       |x| | | | |
  2456.                                            |               | | | | | |
  2457.   PORT                                     |4.1.2.13       |x| | | | |
  2458.   PASV                                     |4.1.2.6        |x| | | | |
  2459.   TYPE                                     |4.1.2.13       |x| | | | |1
  2460.   STRU                                     |4.1.2.13       |x| | | | |1
  2461.   MODE                                     |4.1.2.13       |x| | | | |1
  2462.                                            |               | | | | | |
  2463.   RETR                                     |4.1.2.13       |x| | | | |
  2464.   STOR                                     |4.1.2.13       |x| | | | |
  2465.   STOU                                     |959 5.3.1      | | |x| | |
  2466.   APPE                                     |4.1.2.13       |x| | | | |
  2467.   ALLO                                     |959 5.3.1      | | |x| | |
  2468.   REST                                     |959 5.3.1      | | |x| | |
  2469.   RNFR                                     |4.1.2.13       |x| | | | |
  2470.   RNTO                                     |4.1.2.13       |x| | | | |
  2471.   ABOR                                     |959 5.3.1      | | |x| | |
  2472.   DELE                                     |4.1.2.13       |x| | | | |
  2473.   RMD                                      |4.1.2.13       |x| | | | |
  2474.   MKD                                      |4.1.2.13       |x| | | | |
  2475.   PWD                                      |4.1.2.13       |x| | | | |
  2476.   LIST                                     |4.1.2.13       |x| | | | |
  2477.   NLST                                     |4.1.2.13       |x| | | | |
  2478.   SITE                                     |4.1.2.8        | | |x| | |
  2479.   STAT                                     |4.1.2.13       |x| | | | |
  2480.   SYST                                     |4.1.2.13       |x| | | | |
  2481.   HELP                                     |4.1.2.13       |x| | | | |
  2482.   NOOP                                     |4.1.2.13       |x| | | | |
  2483.                                            |               | | | | | |
  2484.  
  2485.  
  2486.  
  2487. Internet Engineering Task Force                                [Page 42]
  2488.  
  2489.  
  2490.  
  2491.  
  2492. RFC1123                   FILE TRANSFER -- FTP              October 1989
  2493.  
  2494.  
  2495. User Interface:                            |               | | | | | |
  2496.   Arbitrary pathnames                      |4.1.4.1        |x| | | | |
  2497.   Implement "QUOTE" command                |4.1.4.2        |x| | | | |
  2498.   Transfer control commands immediately    |4.1.4.2        | |x| | | |
  2499.   Display error messages to user           |4.1.4.3        | |x| | | |
  2500.     Verbose mode                           |4.1.4.3        | |x| | | |
  2501.   Maintain synchronization with server     |4.1.4.4        | |x| | | |
  2502.  
  2503. Footnotes:
  2504.  
  2505. (1)  For the values shown earlier.
  2506.  
  2507. (2)  Here m is number of bits in a memory word.
  2508.  
  2509. (3)  Required for host with record-structured file system, optional
  2510.      otherwise.
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546. Internet Engineering Task Force                                [Page 43]
  2547.  
  2548.  
  2549.  
  2550.  
  2551. RFC1123                  FILE TRANSFER -- TFTP              October 1989
  2552.  
  2553.  
  2554.    4.2  TRIVIAL FILE TRANSFER PROTOCOL -- TFTP
  2555.  
  2556.       4.2.1  INTRODUCTION
  2557.  
  2558.          The Trivial File Transfer Protocol TFTP is defined in RFC-783
  2559.          [TFTP:1].
  2560.  
  2561.          TFTP provides its own reliable delivery with UDP as its
  2562.          transport protocol, using a simple stop-and-wait acknowledgment
  2563.          system.  Since TFTP has an effective window of only one 512
  2564.          octet segment, it can provide good performance only over paths
  2565.          that have a small delay*bandwidth product.  The TFTP file
  2566.          interface is very simple, providing no access control or
  2567.          security.
  2568.  
  2569.          TFTP's most important application is bootstrapping a host over
  2570.          a local network, since it is simple and small enough to be
  2571.          easily implemented in EPROM [BOOT:1, BOOT:2].  Vendors are
  2572.          urged to support TFTP for booting.
  2573.  
  2574.       4.2.2  PROTOCOL WALK-THROUGH
  2575.  
  2576.          The TFTP specification [TFTP:1] is written in an open style,
  2577.          and does not fully specify many parts of the protocol.
  2578.  
  2579.          4.2.2.1  Transfer Modes: RFC-783, Page 3
  2580.  
  2581.             The transfer mode "mail" SHOULD NOT be supported.
  2582.  
  2583.          4.2.2.2  UDP Header: RFC-783, Page 17
  2584.  
  2585.             The Length field of a UDP header is incorrectly defined; it
  2586.             includes the UDP header length (8).
  2587.  
  2588.       4.2.3  SPECIFIC ISSUES
  2589.  
  2590.          4.2.3.1  Sorcerer's Apprentice Syndrome
  2591.  
  2592.             There is a serious bug, known as the "Sorcerer's Apprentice
  2593.             Syndrome," in the protocol specification.  While it does not
  2594.             cause incorrect operation of the transfer (the file will
  2595.             always be transferred correctly if the transfer completes),
  2596.             this bug may cause excessive retransmission, which may cause
  2597.             the transfer to time out.
  2598.  
  2599.             Implementations MUST contain the fix for this problem: the
  2600.             sender (i.e., the side originating the DATA packets) must
  2601.             never resend the current DATA packet on receipt of a
  2602.  
  2603.  
  2604.  
  2605. Internet Engineering Task Force                                [Page 44]
  2606.  
  2607.  
  2608.  
  2609.  
  2610. RFC1123                  FILE TRANSFER -- TFTP              October 1989
  2611.  
  2612.  
  2613.             duplicate ACK.
  2614.  
  2615.             DISCUSSION:
  2616.                  The bug is caused by the protocol rule that either
  2617.                  side, on receiving an old duplicate datagram, may
  2618.                  resend the current datagram.  If a packet is delayed in
  2619.                  the network but later successfully delivered after
  2620.                  either side has timed out and retransmitted a packet, a
  2621.                  duplicate copy of the response may be generated.  If
  2622.                  the other side responds to this duplicate with a
  2623.                  duplicate of its own, then every datagram will be sent
  2624.                  in duplicate for the remainder of the transfer (unless
  2625.                  a datagram is lost, breaking the repetition).  Worse
  2626.                  yet, since the delay is often caused by congestion,
  2627.                  this duplicate transmission will usually causes more
  2628.                  congestion, leading to more delayed packets, etc.
  2629.  
  2630.                  The following example may help to clarify this problem.
  2631.  
  2632.                      TFTP A                  TFTP B
  2633.  
  2634.                  (1)  Receive ACK X-1
  2635.                       Send DATA X
  2636.                  (2)                          Receive DATA X
  2637.                                               Send ACK X
  2638.                         (ACK X is delayed in network,
  2639.                          and  A times out):
  2640.                  (3)  Retransmit DATA X
  2641.  
  2642.                  (4)                          Receive DATA X again
  2643.                                               Send ACK X again
  2644.                  (5)  Receive (delayed) ACK X
  2645.                       Send DATA X+1
  2646.                  (6)                          Receive DATA X+1
  2647.                                               Send ACK X+1
  2648.                  (7)  Receive ACK X again
  2649.                       Send DATA X+1 again
  2650.                  (8)                          Receive DATA X+1 again
  2651.                                               Send ACK X+1 again
  2652.                  (9)  Receive ACK X+1
  2653.                       Send DATA X+2
  2654.                  (10)                         Receive DATA X+2
  2655.                                               Send ACK X+3
  2656.                  (11) Receive ACK X+1 again
  2657.                       Send DATA X+2 again
  2658.                  (12)                         Receive DATA X+2 again
  2659.                                               Send ACK X+3 again
  2660.  
  2661.  
  2662.  
  2663.  
  2664. Internet Engineering Task Force                                [Page 45]
  2665.  
  2666.  
  2667.  
  2668.  
  2669. RFC1123                  FILE TRANSFER -- TFTP              October 1989
  2670.  
  2671.  
  2672.                  Notice that once the delayed ACK arrives, the protocol
  2673.                  settles down to duplicate all further packets
  2674.                  (sequences 5-8 and 9-12).  The problem is caused not by
  2675.                  either side timing out, but by both sides
  2676.                  retransmitting the current packet when they receive a
  2677.                  duplicate.
  2678.  
  2679.                  The fix is to break the retransmission loop, as
  2680.                  indicated above.  This is analogous to the behavior of
  2681.                  TCP.  It is then possible to remove the retransmission
  2682.                  timer on the receiver, since the resent ACK will never
  2683.                  cause any action; this is a useful simplification where
  2684.                  TFTP is used in a bootstrap program.  It is OK to allow
  2685.                  the timer to remain, and it may be helpful if the
  2686.                  retransmitted ACK replaces one that was genuinely lost
  2687.                  in the network.  The sender still requires a retransmit
  2688.                  timer, of course.
  2689.  
  2690.          4.2.3.2  Timeout Algorithms
  2691.  
  2692.             A TFTP implementation MUST use an adaptive timeout.
  2693.  
  2694.             IMPLEMENTATION:
  2695.                  TCP retransmission algorithms provide a useful base to
  2696.                  work from.  At least an exponential backoff of
  2697.                  retransmission timeout is necessary.
  2698.  
  2699.          4.2.3.3  Extensions
  2700.  
  2701.             A variety of non-standard extensions have been made to TFTP,
  2702.             including additional transfer modes and a secure operation
  2703.             mode (with passwords).  None of these have been
  2704.             standardized.
  2705.  
  2706.          4.2.3.4  Access Control
  2707.  
  2708.             A server TFTP implementation SHOULD include some
  2709.             configurable access control over what pathnames are allowed
  2710.             in TFTP operations.
  2711.  
  2712.          4.2.3.5  Broadcast Request
  2713.  
  2714.             A TFTP request directed to a broadcast address SHOULD be
  2715.             silently ignored.
  2716.  
  2717.             DISCUSSION:
  2718.                  Due to the weak access control capability of TFTP,
  2719.                  directed broadcasts of TFTP requests to random networks
  2720.  
  2721.  
  2722.  
  2723. Internet Engineering Task Force                                [Page 46]
  2724.  
  2725.  
  2726.  
  2727.  
  2728. RFC1123                  FILE TRANSFER -- TFTP              October 1989
  2729.  
  2730.  
  2731.                  could create a significant security hole.
  2732.  
  2733.       4.2.4  TFTP REQUIREMENTS SUMMARY
  2734.  
  2735.                                                  |        | | | |S| |
  2736.                                                  |        | | | |H| |F
  2737.                                                  |        | | | |O|M|o
  2738.                                                  |        | |S| |U|U|o
  2739.                                                  |        | |H| |L|S|t
  2740.                                                  |        |M|O| |D|T|n
  2741.                                                  |        |U|U|M| | |o
  2742.                                                  |        |S|L|A|N|N|t
  2743.                                                  |        |T|D|Y|O|O|t
  2744. FEATURE                                          |SECTION | | | |T|T|e
  2745. -------------------------------------------------|--------|-|-|-|-|-|--
  2746. Fix Sorcerer's Apprentice Syndrome               |4.2.3.1 |x| | | | |
  2747. Transfer modes:                                  |        | | | | | |
  2748.   netascii                                       |RFC-783 |x| | | | |
  2749.   octet                                          |RFC-783 |x| | | | |
  2750.   mail                                           |4.2.2.1 | | | |x| |
  2751.   extensions                                     |4.2.3.3 | | |x| | |
  2752. Use adaptive timeout                             |4.2.3.2 |x| | | | |
  2753. Configurable access control                      |4.2.3.4 | |x| | | |
  2754. Silently ignore broadcast request                |4.2.3.5 | |x| | | |
  2755. -------------------------------------------------|--------|-|-|-|-|-|--
  2756. -------------------------------------------------|--------|-|-|-|-|-|--
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782. Internet Engineering Task Force                                [Page 47]
  2783.  
  2784.  
  2785.  
  2786.  
  2787. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  2788.  
  2789.  
  2790. 5.  ELECTRONIC MAIL -- SMTP and RFC-822
  2791.  
  2792.    5.1  INTRODUCTION
  2793.  
  2794.       In the TCP/IP protocol suite, electronic mail in a format
  2795.       specified in RFC-822 [SMTP:2] is transmitted using the Simple Mail
  2796.       Transfer Protocol (SMTP) defined in RFC-821 [SMTP:1].
  2797.  
  2798.       While SMTP has remained unchanged over the years, the Internet
  2799.       community has made several changes in the way SMTP is used.  In
  2800.       particular, the conversion to the Domain Name System (DNS) has
  2801.       caused changes in address formats and in mail routing.  In this
  2802.       section, we assume familiarity with the concepts and terminology
  2803.       of the DNS, whose requirements are given in Section 6.1.
  2804.  
  2805.       RFC-822 specifies the Internet standard format for electronic mail
  2806.       messages.  RFC-822 supercedes an older standard, RFC-733, that may
  2807.       still be in use in a few places, although it is obsolete.  The two
  2808.       formats are sometimes referred to simply by number ("822" and
  2809.       "733").
  2810.  
  2811.       RFC-822 is used in some non-Internet mail environments with
  2812.       different mail transfer protocols than SMTP, and SMTP has also
  2813.       been adapted for use in some non-Internet environments.  Note that
  2814.       this document presents the rules for the use of SMTP and RFC-822
  2815.       for the Internet environment only; other mail environments that
  2816.       use these protocols may be expected to have their own rules.
  2817.  
  2818.    5.2  PROTOCOL WALK-THROUGH
  2819.  
  2820.       This section covers both RFC-821 and RFC-822.
  2821.  
  2822.       The SMTP specification in RFC-821 is clear and contains numerous
  2823.       examples, so implementors should not find it difficult to
  2824.       understand.  This section simply updates or annotates portions of
  2825.       RFC-821 to conform with current usage.
  2826.  
  2827.       RFC-822 is a long and dense document, defining a rich syntax.
  2828.       Unfortunately, incomplete or defective implementations of RFC-822
  2829.       are common.  In fact, nearly all of the many formats of RFC-822
  2830.       are actually used, so an implementation generally needs to
  2831.       recognize and correctly interpret all of the RFC-822 syntax.
  2832.  
  2833.       5.2.1  The SMTP Model: RFC-821 Section 2
  2834.  
  2835.          DISCUSSION:
  2836.               Mail is sent by a series of request/response transactions
  2837.               between a client, the "sender-SMTP," and a server, the
  2838.  
  2839.  
  2840.  
  2841. Internet Engineering Task Force                                [Page 48]
  2842.  
  2843.  
  2844.  
  2845.  
  2846. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  2847.  
  2848.  
  2849.               "receiver-SMTP".  These transactions pass (1) the message
  2850.               proper, which is composed of header and body, and (2) SMTP
  2851.               source and destination addresses, referred to as the
  2852.               "envelope".
  2853.  
  2854.               The SMTP programs are analogous to Message Transfer Agents
  2855.               (MTAs) of X.400.  There will be another level of protocol
  2856.               software, closer to the end user, that is responsible for
  2857.               composing and analyzing RFC-822 message headers; this
  2858.               component is known as the "User Agent" in X.400, and we
  2859.               use that term in this document.  There is a clear logical
  2860.               distinction between the User Agent and the SMTP
  2861.               implementation, since they operate on different levels of
  2862.               protocol.  Note, however, that this distinction is may not
  2863.               be exactly reflected the structure of typical
  2864.               implementations of Internet mail.  Often there is a
  2865.               program known as the "mailer" that implements SMTP and
  2866.               also some of the User Agent functions; the rest of the
  2867.               User Agent functions are included in a user interface used
  2868.               for entering and reading mail.
  2869.  
  2870.               The SMTP envelope is constructed at the originating site,
  2871.               typically by the User Agent when the message is first
  2872.               queued for the Sender-SMTP program.  The envelope
  2873.               addresses may be derived from information in the message
  2874.               header, supplied by the user interface (e.g., to implement
  2875.               a bcc: request), or derived from local configuration
  2876.               information (e.g., expansion of a mailing list).  The SMTP
  2877.               envelope cannot in general be re-derived from the header
  2878.               at a later stage in message delivery, so the envelope is
  2879.               transmitted separately from the message itself using the
  2880.               MAIL and RCPT commands of SMTP.
  2881.  
  2882.               The text of RFC-821 suggests that mail is to be delivered
  2883.               to an individual user at a host.  With the advent of the
  2884.               domain system and of mail routing using mail-exchange (MX)
  2885.               resource records, implementors should now think of
  2886.               delivering mail to a user at a domain, which may or may
  2887.               not be a particular host.  This DOES NOT change the fact
  2888.               that SMTP is a host-to-host mail exchange protocol.
  2889.  
  2890.       5.2.2  Canonicalization: RFC-821 Section 3.1
  2891.  
  2892.          The domain names that a Sender-SMTP sends in MAIL and RCPT
  2893.          commands MUST have been  "canonicalized," i.e., they must be
  2894.          fully-qualified principal names or domain literals, not
  2895.          nicknames or domain abbreviations.  A canonicalized name either
  2896.          identifies a host directly or is an MX name; it cannot be a
  2897.  
  2898.  
  2899.  
  2900. Internet Engineering Task Force                                [Page 49]
  2901.  
  2902.  
  2903.  
  2904.  
  2905. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  2906.  
  2907.  
  2908.          CNAME.
  2909.  
  2910.       5.2.3  VRFY and EXPN Commands: RFC-821 Section 3.3
  2911.  
  2912.          A receiver-SMTP MUST implement VRFY and SHOULD implement EXPN
  2913.          (this requirement overrides RFC-821).  However, there MAY be
  2914.          configuration information to disable VRFY and EXPN in a
  2915.          particular installation; this might even allow EXPN to be
  2916.          disabled for selected lists.
  2917.  
  2918.          A new reply code is defined for the VRFY command:
  2919.  
  2920.               252 Cannot VRFY user (e.g., info is not local), but will
  2921.                   take message for this user and attempt delivery.
  2922.  
  2923.          DISCUSSION:
  2924.               SMTP users and administrators make regular use of these
  2925.               commands for diagnosing mail delivery problems.  With the
  2926.               increasing use of multi-level mailing list expansion
  2927.               (sometimes more than two levels), EXPN has been
  2928.               increasingly important for diagnosing inadvertent mail
  2929.               loops.  On the other hand,  some feel that EXPN represents
  2930.               a significant privacy, and perhaps even a security,
  2931.               exposure.
  2932.  
  2933.       5.2.4  SEND, SOML, and SAML Commands: RFC-821 Section 3.4
  2934.  
  2935.          An SMTP MAY implement the commands to send a message to a
  2936.          user's terminal: SEND, SOML, and SAML.
  2937.  
  2938.          DISCUSSION:
  2939.               It has been suggested that the use of mail relaying
  2940.               through an MX record is inconsistent with the intent of
  2941.               SEND to deliver a message immediately and directly to a
  2942.               user's terminal.  However, an SMTP receiver that is unable
  2943.               to write directly to the user terminal can return a "251
  2944.               User Not Local" reply to the RCPT following a SEND, to
  2945.               inform the originator of possibly deferred delivery.
  2946.  
  2947.       5.2.5  HELO Command: RFC-821 Section 3.5
  2948.  
  2949.          The sender-SMTP MUST ensure that the <domain> parameter in a
  2950.          HELO command is a valid principal host domain name for the
  2951.          client host.  As a result, the receiver-SMTP will not have to
  2952.          perform MX resolution on this name in order to validate the
  2953.          HELO parameter.
  2954.  
  2955.          The HELO receiver MAY verify that the HELO parameter really
  2956.  
  2957.  
  2958.  
  2959. Internet Engineering Task Force                                [Page 50]
  2960.  
  2961.  
  2962.  
  2963.  
  2964. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  2965.  
  2966.  
  2967.          corresponds to the IP address of the sender.  However, the
  2968.          receiver MUST NOT refuse to accept a message, even if the
  2969.          sender's HELO command fails verification.
  2970.  
  2971.          DISCUSSION:
  2972.               Verifying the HELO parameter requires a domain name lookup
  2973.               and may therefore take considerable time.  An alternative
  2974.               tool for tracking bogus mail sources is suggested below
  2975.               (see "DATA Command").
  2976.  
  2977.               Note also that the HELO argument is still required to have
  2978.               valid <domain> syntax, since it will appear in a Received:
  2979.               line; otherwise, a 501 error is to be sent.
  2980.  
  2981.          IMPLEMENTATION:
  2982.               When HELO parameter validation fails, a suggested
  2983.               procedure is to insert a note about the unknown
  2984.               authenticity of the sender into the message header (e.g.,
  2985.               in the "Received:"  line).
  2986.  
  2987.       5.2.6  Mail Relay: RFC-821 Section 3.6
  2988.  
  2989.          We distinguish three types of mail (store-and-) forwarding:
  2990.  
  2991.          (1)  A simple forwarder or "mail exchanger" forwards a message
  2992.               using private knowledge about the recipient; see section
  2993.               3.2 of RFC-821.
  2994.  
  2995.          (2)  An SMTP mail "relay" forwards a message within an SMTP
  2996.               mail environment as the result of an explicit source route
  2997.               (as defined in section 3.6 of RFC-821).  The SMTP relay
  2998.               function uses the "@...:" form of source route from RFC-
  2999.               822 (see Section 5.2.19 below).
  3000.  
  3001.          (3)  A mail "gateway" passes a message between different
  3002.               environments.  The rules for mail gateways are discussed
  3003.               below in Section 5.3.7.
  3004.  
  3005.          An Internet host that is forwarding a message but is not a
  3006.          gateway to a different mail environment (i.e., it falls under
  3007.          (1) or (2)) SHOULD NOT alter any existing header fields,
  3008.          although the host will add an appropriate Received: line as
  3009.          required in Section 5.2.8.
  3010.  
  3011.          A Sender-SMTP SHOULD NOT send a RCPT TO: command containing an
  3012.          explicit source route using the "@...:" address form.  Thus,
  3013.          the relay function defined in section  3.6 of RFC-821 should
  3014.          not be used.
  3015.  
  3016.  
  3017.  
  3018. Internet Engineering Task Force                                [Page 51]
  3019.  
  3020.  
  3021.  
  3022.  
  3023. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3024.  
  3025.  
  3026.          DISCUSSION:
  3027.               The intent is to discourage all source routing and to
  3028.               abolish explicit source routing for mail delivery within
  3029.               the Internet environment.  Source-routing is unnecessary;
  3030.               the simple target address "user@domain" should always
  3031.               suffice.  This is the result of an explicit architectural
  3032.               decision to use universal naming rather than source
  3033.               routing for mail.  Thus, SMTP provides end-to-end
  3034.               connectivity, and the DNS provides globally-unique,
  3035.               location-independent names.  MX records handle the major
  3036.               case where source routing might otherwise be needed.
  3037.  
  3038.          A receiver-SMTP MUST accept the explicit source route syntax in
  3039.          the envelope, but it MAY implement the relay function as
  3040.          defined in section 3.6 of RFC-821.  If it does not implement
  3041.          the relay function, it SHOULD attempt to deliver the message
  3042.          directly to the host to the right of the right-most "@" sign.
  3043.  
  3044.          DISCUSSION:
  3045.               For example, suppose a host that does not implement the
  3046.               relay function receives a message with the SMTP command:
  3047.               "RCPT TO:<@ALPHA,@BETA:joe@GAMMA>", where ALPHA, BETA, and
  3048.               GAMMA represent domain names.  Rather than immediately
  3049.               refusing the message with a 550 error reply as suggested
  3050.               on page 20 of RFC-821, the host should try to forward the
  3051.               message to GAMMA directly, using: "RCPT TO:<joe@GAMMA>".
  3052.               Since this host does not support relaying, it is not
  3053.               required to update the reverse path.
  3054.  
  3055.               Some have suggested that source routing may be needed
  3056.               occasionally for manually routing mail around failures;
  3057.               however, the reality and importance of this need is
  3058.               controversial.  The use of explicit SMTP mail relaying for
  3059.               this purpose is discouraged, and in fact it may not be
  3060.               successful, as many host systems do not support it.  Some
  3061.               have used the "%-hack" (see Section 5.2.16) for this
  3062.               purpose.
  3063.  
  3064.       5.2.7  RCPT Command: RFC-821 Section 4.1.1
  3065.  
  3066.          A host that supports a receiver-SMTP MUST support the reserved
  3067.          mailbox "Postmaster".
  3068.  
  3069.          The receiver-SMTP MAY verify RCPT parameters as they arrive;
  3070.          however, RCPT responses MUST NOT be delayed beyond a reasonable
  3071.          time (see Section 5.3.2).
  3072.  
  3073.          Therefore, a "250 OK" response to a RCPT does not necessarily
  3074.  
  3075.  
  3076.  
  3077. Internet Engineering Task Force                                [Page 52]
  3078.  
  3079.  
  3080.  
  3081.  
  3082. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3083.  
  3084.  
  3085.          imply that the delivery address(es) are valid.  Errors found
  3086.          after message acceptance will be reported by mailing a
  3087.          notification message to an appropriate address (see Section
  3088.          5.3.3).
  3089.  
  3090.          DISCUSSION:
  3091.               The set of conditions under which a RCPT parameter can be
  3092.               validated immediately is an engineering design choice.
  3093.               Reporting destination mailbox errors to the Sender-SMTP
  3094.               before mail is transferred is generally desirable to save
  3095.               time and network bandwidth, but this advantage is lost if
  3096.               RCPT verification is lengthy.
  3097.  
  3098.               For example, the receiver can verify immediately any
  3099.               simple local reference, such as a single locally-
  3100.               registered mailbox.  On the other hand, the "reasonable
  3101.               time" limitation generally implies deferring verification
  3102.               of a mailing list until after the message has been
  3103.               transferred and accepted, since verifying a large mailing
  3104.               list can take a very long time.  An implementation might
  3105.               or might not choose to defer validation of addresses that
  3106.               are non-local and therefore require a DNS lookup.  If a
  3107.               DNS lookup is performed but a soft domain system error
  3108.               (e.g., timeout) occurs, validity must be assumed.
  3109.  
  3110.       5.2.8  DATA Command: RFC-821 Section 4.1.1
  3111.  
  3112.          Every receiver-SMTP (not just one that "accepts a message for
  3113.          relaying or for final delivery" [SMTP:1]) MUST insert a
  3114.          "Received:" line at the beginning of a message.  In this line,
  3115.          called a "time stamp line" in RFC-821:
  3116.  
  3117.          *    The FROM field SHOULD contain both (1) the name of the
  3118.               source host as presented in the HELO command and (2) a
  3119.               domain literal containing the IP address of the source,
  3120.               determined from the TCP connection.
  3121.  
  3122.          *    The ID field MAY contain an "@" as suggested in RFC-822,
  3123.               but this is not required.
  3124.  
  3125.          *    The FOR field MAY contain a list of <path> entries when
  3126.               multiple RCPT commands have been given.
  3127.  
  3128.  
  3129.          An Internet mail program MUST NOT change a Received: line that
  3130.          was previously added to the message header.
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136. Internet Engineering Task Force                                [Page 53]
  3137.  
  3138.  
  3139.  
  3140.  
  3141. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3142.  
  3143.  
  3144.          DISCUSSION:
  3145.               Including both the source host and the IP source address
  3146.               in the Received: line may provide enough information for
  3147.               tracking illicit mail sources and eliminate a need to
  3148.               explicitly verify the HELO parameter.
  3149.  
  3150.               Received: lines are primarily intended for humans tracing
  3151.               mail routes, primarily of diagnosis of faults.  See also
  3152.               the discussion under 5.3.7.
  3153.  
  3154.          When the receiver-SMTP makes "final delivery" of a message,
  3155.          then it MUST pass the MAIL FROM: address from the SMTP envelope
  3156.          with the message, for use if an error notification message must
  3157.          be sent later (see Section 5.3.3).  There is an analogous
  3158.          requirement when gatewaying from the Internet into a different
  3159.          mail environment; see Section 5.3.7.
  3160.  
  3161.          DISCUSSION:
  3162.               Note that the final reply to the DATA command depends only
  3163.               upon the successful transfer and storage of the message.
  3164.               Any problem with the destination address(es) must either
  3165.               (1) have been reported in an SMTP error reply to the RCPT
  3166.               command(s), or (2) be reported in a later error message
  3167.               mailed to the originator.
  3168.  
  3169.          IMPLEMENTATION:
  3170.               The MAIL FROM: information may be passed as a parameter or
  3171.               in a Return-Path: line inserted at the beginning of the
  3172.               message.
  3173.  
  3174.       5.2.9  Command Syntax: RFC-821 Section 4.1.2
  3175.  
  3176.          The syntax shown in RFC-821 for the MAIL FROM: command omits
  3177.          the case of an empty path:  "MAIL FROM: <>" (see RFC-821 Page
  3178.          15).  An empty reverse path MUST be supported.
  3179.  
  3180.       5.2.10  SMTP Replies:  RFC-821 Section 4.2
  3181.  
  3182.          A receiver-SMTP SHOULD send only the reply codes listed in
  3183.          section 4.2.2 of RFC-821 or in this document.  A receiver-SMTP
  3184.          SHOULD use the text shown in examples in RFC-821 whenever
  3185.          appropriate.
  3186.  
  3187.          A sender-SMTP MUST determine its actions only by the reply
  3188.          code, not by the text (except for 251 and 551 replies); any
  3189.          text, including no text at all, must be acceptable.  The space
  3190.          (blank) following the reply code is considered part of the
  3191.          text.  Whenever possible, a sender-SMTP SHOULD test only the
  3192.  
  3193.  
  3194.  
  3195. Internet Engineering Task Force                                [Page 54]
  3196.  
  3197.  
  3198.  
  3199.  
  3200. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3201.  
  3202.  
  3203.          first digit of the reply code, as specified in Appendix E of
  3204.          RFC-821.
  3205.  
  3206.          DISCUSSION:
  3207.               Interoperability problems have arisen with SMTP systems
  3208.               using reply codes that are not listed explicitly in RFC-
  3209.               821 Section 4.3 but are legal according to the theory of
  3210.               reply codes explained in Appendix E.
  3211.  
  3212.       5.2.11  Transparency: RFC-821 Section 4.5.2
  3213.  
  3214.          Implementors MUST be sure that their mail systems always add
  3215.          and delete periods to ensure message transparency.
  3216.  
  3217.       5.2.12  WKS Use in MX Processing: RFC-974, p. 5
  3218.  
  3219.          RFC-974 [SMTP:3] recommended that the domain system be queried
  3220.          for WKS ("Well-Known Service") records, to verify that each
  3221.          proposed mail target does support SMTP.  Later experience has
  3222.          shown that WKS is not widely supported, so the WKS step in MX
  3223.          processing SHOULD NOT be used.
  3224.  
  3225.       The following are notes on RFC-822, organized by section of that
  3226.       document.
  3227.  
  3228.       5.2.13  RFC-822 Message Specification: RFC-822 Section 4
  3229.  
  3230.          The syntax shown for the Return-path line omits the possibility
  3231.          of a null return path, which is used to prevent looping of
  3232.          error notifications (see Section 5.3.3).  The complete syntax
  3233.          is:
  3234.  
  3235.              return = "Return-path"  ":" route-addr
  3236.                     / "Return-path"  ":" "<" ">"
  3237.  
  3238.          The set of optional header fields is hereby expanded to include
  3239.          the Content-Type field defined in RFC-1049 [SMTP:7].  This
  3240.          field "allows mail reading systems to automatically identify
  3241.          the type of a structured message body and to process it for
  3242.          display accordingly".  [SMTP:7]  A User Agent MAY support this
  3243.          field.
  3244.  
  3245.       5.2.14  RFC-822 Date and Time Specification: RFC-822 Section 5
  3246.  
  3247.          The syntax for the date is hereby changed to:
  3248.  
  3249.             date = 1*2DIGIT month 2*4DIGIT
  3250.  
  3251.  
  3252.  
  3253.  
  3254. Internet Engineering Task Force                                [Page 55]
  3255.  
  3256.  
  3257.  
  3258.  
  3259. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3260.  
  3261.  
  3262.          All mail software SHOULD use 4-digit years in dates, to ease
  3263.          the transition to the next century.
  3264.  
  3265.          There is a strong trend towards the use of numeric timezone
  3266.          indicators, and implementations SHOULD use numeric timezones
  3267.          instead of timezone names.  However, all implementations MUST
  3268.          accept either notation.  If timezone names are used, they MUST
  3269.          be exactly as defined in RFC-822.
  3270.  
  3271.          The military time zones are specified incorrectly in RFC-822:
  3272.          they count the wrong way from UT (the signs are reversed).  As
  3273.          a result, military time zones in RFC-822 headers carry no
  3274.          information.
  3275.  
  3276.          Finally, note that there is a typo in the definition of "zone"
  3277.          in the syntax summary of appendix D; the correct definition
  3278.          occurs in Section 3 of RFC-822.
  3279.  
  3280.       5.2.15  RFC-822 Syntax Change: RFC-822 Section 6.1
  3281.  
  3282.          The syntactic definition of "mailbox" in RFC-822 is hereby
  3283.          changed to:
  3284.  
  3285.             mailbox =  addr-spec            ; simple address
  3286.                     / [phrase] route-addr   ; name & addr-spec
  3287.  
  3288.          That is, the phrase preceding a route address is now OPTIONAL.
  3289.          This change makes the following header field legal, for
  3290.          example:
  3291.  
  3292.              From: <craig@nnsc.nsf.net>
  3293.  
  3294.       5.2.16  RFC-822  Local-part: RFC-822 Section 6.2
  3295.  
  3296.          The basic mailbox address specification has the form: "local-
  3297.          part@domain".  Here "local-part", sometimes called the "left-
  3298.          hand side" of the address, is domain-dependent.
  3299.  
  3300.          A host that is forwarding the message but is not the
  3301.          destination host implied by the right-hand side "domain" MUST
  3302.          NOT interpret or modify the "local-part" of the address.
  3303.  
  3304.          When mail is to be gatewayed from the Internet mail environment
  3305.          into a foreign mail environment (see Section 5.3.7), routing
  3306.          information for that foreign environment MAY be embedded within
  3307.          the "local-part" of the address.  The gateway will then
  3308.          interpret this local part appropriately for the foreign mail
  3309.          environment.
  3310.  
  3311.  
  3312.  
  3313. Internet Engineering Task Force                                [Page 56]
  3314.  
  3315.  
  3316.  
  3317.  
  3318. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3319.  
  3320.  
  3321.          DISCUSSION:
  3322.               Although source routes are discouraged within the Internet
  3323.               (see Section 5.2.6), there are non-Internet mail
  3324.               environments whose delivery mechanisms do depend upon
  3325.               source routes.  Source routes for extra-Internet
  3326.               environments can generally be buried in the "local-part"
  3327.               of the address (see Section 5.2.16) while mail traverses
  3328.               the Internet.  When the mail reaches the appropriate
  3329.               Internet mail gateway, the gateway will interpret the
  3330.               local-part and build the necessary address or route for
  3331.               the target mail environment.
  3332.  
  3333.               For example, an Internet host might send mail to:
  3334.               "a!b!c!user@gateway-domain".  The complex local part
  3335.               "a!b!c!user" would be uninterpreted within the Internet
  3336.               domain, but could be parsed and understood by the
  3337.               specified mail gateway.
  3338.  
  3339.               An embedded source route is sometimes encoded in the
  3340.               "local-part" using "%" as a right-binding routing
  3341.               operator.  For example, in:
  3342.  
  3343.                  user%domain%relay3%relay2@relay1
  3344.  
  3345.               the "%" convention implies that the mail is to be routed
  3346.               from "relay1" through "relay2", "relay3", and finally to
  3347.               "user" at "domain".  This is commonly known as the "%-
  3348.               hack".  It is suggested that "%" have lower precedence
  3349.               than any other routing operator (e.g., "!") hidden in the
  3350.               local-part; for example, "a!b%c" would be interpreted as
  3351.               "(a!b)%c".
  3352.  
  3353.               Only the target host (in this case, "relay1") is permitted
  3354.               to analyze the local-part "user%domain%relay3%relay2".
  3355.  
  3356.       5.2.17  Domain Literals: RFC-822 Section 6.2.3
  3357.  
  3358.          A mailer MUST be able to accept and parse an Internet domain
  3359.          literal whose content ("dtext"; see RFC-822) is a dotted-
  3360.          decimal host address.  This satisfies the requirement of
  3361.          Section 2.1 for the case of mail.
  3362.  
  3363.          An SMTP MUST accept and recognize a domain literal for any of
  3364.          its own IP addresses.
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372. Internet Engineering Task Force                                [Page 57]
  3373.  
  3374.  
  3375.  
  3376.  
  3377. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3378.  
  3379.  
  3380.       5.2.18  Common Address Formatting Errors: RFC-822 Section 6.1
  3381.  
  3382.          Errors in formatting or parsing 822 addresses are unfortunately
  3383.          common.  This section mentions only the most common errors.  A
  3384.          User Agent MUST accept all valid RFC-822 address formats, and
  3385.          MUST NOT generate illegal address syntax.
  3386.  
  3387.          o    A common error is to leave out the semicolon after a group
  3388.               identifier.
  3389.  
  3390.          o    Some systems fail to fully-qualify domain names in
  3391.               messages they generate.  The right-hand side of an "@"
  3392.               sign in a header address field MUST be a fully-qualified
  3393.               domain name.
  3394.  
  3395.               For example, some systems fail to fully-qualify the From:
  3396.               address; this prevents a "reply" command in the user
  3397.               interface from automatically constructing a return
  3398.               address.
  3399.  
  3400.               DISCUSSION:
  3401.                    Although RFC-822 allows the local use of abbreviated
  3402.                    domain names within a domain, the application of
  3403.                    RFC-822 in Internet mail does not allow this.  The
  3404.                    intent is that an Internet host must not send an SMTP
  3405.                    message header containing an abbreviated domain name
  3406.                    in an address field.  This allows the address fields
  3407.                    of the header to be passed without alteration across
  3408.                    the Internet, as required in Section 5.2.6.
  3409.  
  3410.          o    Some systems mis-parse multiple-hop explicit source routes
  3411.               such as:
  3412.  
  3413.                   @relay1,@relay2,@relay3:user@domain.
  3414.  
  3415.  
  3416.          o    Some systems over-qualify domain names by adding a
  3417.               trailing dot to some or all domain names in addresses or
  3418.               message-ids.  This violates RFC-822 syntax.
  3419.  
  3420.  
  3421.       5.2.19  Explicit Source Routes: RFC-822 Section 6.2.7
  3422.  
  3423.          Internet host software SHOULD NOT create an RFC-822 header
  3424.          containing an address with an explicit source route, but MUST
  3425.          accept such headers for compatibility with earlier systems.
  3426.  
  3427.          DISCUSSION:
  3428.  
  3429.  
  3430.  
  3431. Internet Engineering Task Force                                [Page 58]
  3432.  
  3433.  
  3434.  
  3435.  
  3436. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3437.  
  3438.  
  3439.               In an understatement, RFC-822 says "The use of explicit
  3440.               source routing is discouraged".  Many hosts implemented
  3441.               RFC-822 source routes incorrectly, so the syntax cannot be
  3442.               used unambiguously in practice.  Many users feel the
  3443.               syntax is ugly.  Explicit source routes are not needed in
  3444.               the mail envelope for delivery; see Section 5.2.6.  For
  3445.               all these reasons, explicit source routes using the RFC-
  3446.               822 notations are not to be used in Internet mail headers.
  3447.  
  3448.               As stated in Section 5.2.16, it is necessary to allow an
  3449.               explicit source route to be buried in the local-part of an
  3450.               address, e.g., using the "%-hack", in order to allow mail
  3451.               to be gatewayed into another environment in which explicit
  3452.               source routing is necessary.  The vigilant will observe
  3453.               that there is no way for a User Agent to detect and
  3454.               prevent the use of such implicit source routing when the
  3455.               destination is within the Internet.  We can only
  3456.               discourage source routing of any kind within the Internet,
  3457.               as unnecessary and undesirable.
  3458.  
  3459.    5.3  SPECIFIC ISSUES
  3460.  
  3461.       5.3.1  SMTP Queueing Strategies
  3462.  
  3463.          The common structure of a host SMTP implementation includes
  3464.          user mailboxes, one or more areas for queueing messages in
  3465.          transit, and one or more daemon processes for sending and
  3466.          receiving mail.  The exact structure will vary depending on the
  3467.          needs of the users on the host and the number and size of
  3468.          mailing lists supported by the host.  We describe several
  3469.          optimizations that have proved helpful, particularly for
  3470.          mailers supporting high traffic levels.
  3471.  
  3472.          Any queueing strategy MUST include:
  3473.  
  3474.          o    Timeouts on all activities.  See Section 5.3.2.
  3475.  
  3476.          o    Never sending error messages in response to error
  3477.               messages.
  3478.  
  3479.  
  3480.          5.3.1.1 Sending Strategy
  3481.  
  3482.             The general model of a sender-SMTP is one or more processes
  3483.             that periodically attempt to transmit outgoing mail.  In a
  3484.             typical system, the program that composes a message has some
  3485.             method for requesting immediate attention for a new piece of
  3486.             outgoing mail, while mail that cannot be transmitted
  3487.  
  3488.  
  3489.  
  3490. Internet Engineering Task Force                                [Page 59]
  3491.  
  3492.  
  3493.  
  3494.  
  3495. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3496.  
  3497.  
  3498.             immediately MUST be queued and periodically retried by the
  3499.             sender.  A mail queue entry will include not only the
  3500.             message itself but also the envelope information.
  3501.  
  3502.             The sender MUST delay retrying a particular destination
  3503.             after one attempt has failed.  In general, the retry
  3504.             interval SHOULD be at least 30 minutes; however, more
  3505.             sophisticated and variable strategies will be beneficial
  3506.             when the sender-SMTP can determine the reason for non-
  3507.             delivery.
  3508.  
  3509.             Retries continue until the message is transmitted or the
  3510.             sender gives up; the give-up time generally needs to be at
  3511.             least 4-5 days.  The parameters to the retry algorithm MUST
  3512.             be configurable.
  3513.  
  3514.             A sender SHOULD keep a list of hosts it cannot reach and
  3515.             corresponding timeouts, rather than just retrying queued
  3516.             mail items.
  3517.  
  3518.             DISCUSSION:
  3519.                  Experience suggests that failures are typically
  3520.                  transient (the target system has crashed), favoring a
  3521.                  policy of two connection attempts in the first hour the
  3522.                  message is in the queue, and then backing off to once
  3523.                  every two or three hours.
  3524.  
  3525.                  The sender-SMTP can shorten the queueing delay by
  3526.                  cooperation with the receiver-SMTP.  In particular, if
  3527.                  mail is received from a particular address, it is good
  3528.                  evidence that any mail queued for that host can now be
  3529.                  sent.
  3530.  
  3531.                  The strategy may be further modified as a result of
  3532.                  multiple addresses per host (see Section 5.3.4), to
  3533.                  optimize delivery time vs. resource usage.
  3534.  
  3535.                  A sender-SMTP may have a large queue of messages for
  3536.                  each unavailable destination host, and if it retried
  3537.                  all these messages in every retry cycle, there would be
  3538.                  excessive Internet overhead and the daemon would be
  3539.                  blocked for a long period.  Note that an SMTP can
  3540.                  generally determine that a delivery attempt has failed
  3541.                  only after a timeout of a minute or more; a one minute
  3542.                  timeout per connection will result in a very large
  3543.                  delay if it is repeated for dozens or even hundreds of
  3544.                  queued messages.
  3545.  
  3546.  
  3547.  
  3548.  
  3549. Internet Engineering Task Force                                [Page 60]
  3550.  
  3551.  
  3552.  
  3553.  
  3554. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3555.  
  3556.  
  3557.             When the same message is to be delivered to several users on
  3558.             the same host, only one copy of the message SHOULD be
  3559.             transmitted.  That is, the sender-SMTP should use the
  3560.             command sequence: RCPT, RCPT,... RCPT, DATA instead of the
  3561.             sequence: RCPT, DATA, RCPT, DATA,... RCPT, DATA.
  3562.             Implementation of this efficiency feature is strongly urged.
  3563.  
  3564.             Similarly, the sender-SMTP MAY support multiple concurrent
  3565.             outgoing mail transactions to achieve timely delivery.
  3566.             However, some limit SHOULD be imposed to protect the host
  3567.             from devoting all its resources to mail.
  3568.  
  3569.             The use of the different addresses of a multihomed host is
  3570.             discussed below.
  3571.  
  3572.          5.3.1.2  Receiving strategy
  3573.  
  3574.             The receiver-SMTP SHOULD attempt to keep a pending listen on
  3575.             the SMTP port at all times.  This will require the support
  3576.             of multiple incoming TCP connections for SMTP.  Some limit
  3577.             MAY be imposed.
  3578.  
  3579.             IMPLEMENTATION:
  3580.                  When the receiver-SMTP receives mail from a particular
  3581.                  host address, it could notify the sender-SMTP to retry
  3582.                  any mail pending for that host address.
  3583.  
  3584.       5.3.2  Timeouts in SMTP
  3585.  
  3586.          There are two approaches to timeouts in the sender-SMTP:  (a)
  3587.          limit the time for each SMTP command separately, or (b) limit
  3588.          the time for the entire SMTP dialogue for a single mail
  3589.          message.  A sender-SMTP SHOULD use option (a), per-command
  3590.          timeouts.  Timeouts SHOULD be easily reconfigurable, preferably
  3591.          without recompiling the SMTP code.
  3592.  
  3593.          DISCUSSION:
  3594.               Timeouts are an essential feature of an SMTP
  3595.               implementation.  If the timeouts are too long (or worse,
  3596.               there are no timeouts), Internet communication failures or
  3597.               software bugs in receiver-SMTP programs can tie up SMTP
  3598.               processes indefinitely.  If the timeouts are too short,
  3599.               resources will be wasted with attempts that time out part
  3600.               way through message delivery.
  3601.  
  3602.               If option (b) is used, the timeout has to be very large,
  3603.               e.g., an hour, to allow time to expand very large mailing
  3604.               lists.  The timeout may also need to increase linearly
  3605.  
  3606.  
  3607.  
  3608. Internet Engineering Task Force                                [Page 61]
  3609.  
  3610.  
  3611.  
  3612.  
  3613. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3614.  
  3615.  
  3616.               with the size of the message, to account for the time to
  3617.               transmit a very large message.  A large fixed timeout
  3618.               leads to two problems:  a failure can still tie up the
  3619.               sender for a very long time, and very large messages may
  3620.               still spuriously time out (which is a wasteful failure!).
  3621.  
  3622.               Using the recommended option (a), a timer is set for each
  3623.               SMTP command and for each buffer of the data transfer.
  3624.               The latter means that the overall timeout is inherently
  3625.               proportional to the size of the message.
  3626.  
  3627.          Based on extensive experience with busy mail-relay hosts, the
  3628.          minimum per-command timeout values SHOULD be as follows:
  3629.  
  3630.          o    Initial 220 Message: 5 minutes
  3631.  
  3632.               A Sender-SMTP process needs to distinguish between a
  3633.               failed TCP connection and a delay in receiving the initial
  3634.               220 greeting message.  Many receiver-SMTPs will accept a
  3635.               TCP connection but delay delivery of the 220 message until
  3636.               their system load will permit more mail to be processed.
  3637.  
  3638.          o    MAIL Command: 5 minutes
  3639.  
  3640.  
  3641.          o    RCPT Command: 5 minutes
  3642.  
  3643.               A longer timeout would be required if processing of
  3644.               mailing lists and aliases were not deferred until after
  3645.               the message was accepted.
  3646.  
  3647.          o    DATA Initiation: 2 minutes
  3648.  
  3649.               This is while awaiting the "354 Start Input" reply to a
  3650.               DATA command.
  3651.  
  3652.          o    Data Block: 3 minutes
  3653.  
  3654.               This is while awaiting the completion of each TCP SEND
  3655.               call transmitting a chunk of data.
  3656.  
  3657.          o    DATA Termination: 10 minutes.
  3658.  
  3659.               This is while awaiting the "250 OK" reply. When the
  3660.               receiver gets the final period terminating the message
  3661.               data, it typically performs processing to deliver the
  3662.               message to a user mailbox.  A spurious timeout at this
  3663.               point would be very wasteful, since the message has been
  3664.  
  3665.  
  3666.  
  3667. Internet Engineering Task Force                                [Page 62]
  3668.  
  3669.  
  3670.  
  3671.  
  3672. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3673.  
  3674.  
  3675.               successfully sent.
  3676.  
  3677.          A receiver-SMTP SHOULD have a timeout of at least 5 minutes
  3678.          while it is awaiting the next command from the sender.
  3679.  
  3680.       5.3.3  Reliable Mail Receipt
  3681.  
  3682.          When the receiver-SMTP accepts a piece of mail (by sending a
  3683.          "250 OK" message in response to DATA), it is accepting
  3684.          responsibility for delivering or relaying the message.  It must
  3685.          take this responsibility seriously, i.e., it MUST NOT lose the
  3686.          message for frivolous reasons, e.g., because the host later
  3687.          crashes or because of a predictable resource shortage.
  3688.  
  3689.          If there is a delivery failure after acceptance of a message,
  3690.          the receiver-SMTP MUST formulate and mail a notification
  3691.          message.  This notification MUST be sent using a null ("<>")
  3692.          reverse path in the envelope; see Section 3.6 of RFC-821.  The
  3693.          recipient of this notification SHOULD be the address from the
  3694.          envelope return path (or the Return-Path: line).  However, if
  3695.          this address is null ("<>"),  the receiver-SMTP MUST NOT send a
  3696.          notification.  If the address is an explicit source route, it
  3697.          SHOULD be stripped down to its final hop.
  3698.  
  3699.          DISCUSSION:
  3700.               For example, suppose that an error notification must be
  3701.               sent for a message that arrived with:
  3702.               "MAIL FROM:<@a,@b:user@d>".  The notification message
  3703.               should be sent to: "RCPT TO:<user@d>".
  3704.  
  3705.               Some delivery failures after the message is accepted by
  3706.               SMTP will be unavoidable.  For example, it may be
  3707.               impossible for the receiver-SMTP to validate all the
  3708.               delivery addresses in RCPT command(s) due to a "soft"
  3709.               domain system error or because the target is a mailing
  3710.               list (see earlier discussion of RCPT).
  3711.  
  3712.          To avoid receiving duplicate messages as the result of
  3713.          timeouts, a receiver-SMTP MUST seek to minimize the time
  3714.          required to respond to the final "." that ends a message
  3715.          transfer.  See RFC-1047 [SMTP:4] for a discussion of this
  3716.          problem.
  3717.  
  3718.       5.3.4  Reliable Mail Transmission
  3719.  
  3720.          To transmit a message, a sender-SMTP determines the IP address
  3721.          of the target host from the destination address in the
  3722.          envelope.  Specifically, it maps the string to the right of the
  3723.  
  3724.  
  3725.  
  3726. Internet Engineering Task Force                                [Page 63]
  3727.  
  3728.  
  3729.  
  3730.  
  3731. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3732.  
  3733.  
  3734.          "@" sign into an IP address.  This mapping or the transfer
  3735.          itself may fail with a soft error, in which case the sender-
  3736.          SMTP will requeue the outgoing mail for a later retry, as
  3737.          required in Section 5.3.1.1.
  3738.  
  3739.          When it succeeds, the mapping can result in a list of
  3740.          alternative delivery addresses rather than a single address,
  3741.          because of (a) multiple MX records, (b) multihoming, or both.
  3742.          To provide reliable mail transmission, the sender-SMTP MUST be
  3743.          able to try (and retry) each of the addresses in this list in
  3744.          order, until a delivery attempt succeeds.  However, there MAY
  3745.          also be a configurable limit on the number of alternate
  3746.          addresses that can be tried.  In any case, a host SHOULD try at
  3747.          least two addresses.
  3748.  
  3749.          The following information is to be used to rank the host
  3750.          addresses:
  3751.  
  3752.          (1)  Multiple MX Records -- these contain a preference
  3753.               indication that should be used in sorting.  If there are
  3754.               multiple destinations with the same preference and there
  3755.               is no clear reason to favor one (e.g., by address
  3756.               preference), then the sender-SMTP SHOULD pick one at
  3757.               random to spread the load across multiple mail exchanges
  3758.               for a specific organization; note that this is a
  3759.               refinement of the procedure in [DNS:3].
  3760.  
  3761.          (2)  Multihomed host -- The destination host (perhaps taken
  3762.               from the preferred MX record) may be multihomed, in which
  3763.               case the domain name resolver will return a list of
  3764.               alternative IP addresses.  It is the responsibility of the
  3765.               domain name resolver interface (see Section 6.1.3.4 below)
  3766.               to have ordered this list by decreasing preference, and
  3767.               SMTP MUST try them in the order presented.
  3768.  
  3769.          DISCUSSION:
  3770.               Although the capability to try multiple alternative
  3771.               addresses is required, there may be circumstances where
  3772.               specific installations want to limit or disable the use of
  3773.               alternative addresses.  The question of whether a sender
  3774.               should attempt retries using the different addresses of a
  3775.               multihomed host has been controversial.  The main argument
  3776.               for using the multiple addresses is that it maximizes the
  3777.               probability of timely delivery, and indeed sometimes the
  3778.               probability of any delivery; the counter argument is that
  3779.               it may result in unnecessary resource use.
  3780.  
  3781.               Note that resource use is also strongly determined by the
  3782.  
  3783.  
  3784.  
  3785. Internet Engineering Task Force                                [Page 64]
  3786.  
  3787.  
  3788.  
  3789.  
  3790. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3791.  
  3792.  
  3793.               sending strategy discussed in Section 5.3.1.
  3794.  
  3795.       5.3.5  Domain Name Support
  3796.  
  3797.          SMTP implementations MUST use the mechanism defined in Section
  3798.          6.1 for mapping between domain names and IP addresses.  This
  3799.          means that every Internet SMTP MUST include support for the
  3800.          Internet DNS.
  3801.  
  3802.          In particular, a sender-SMTP MUST support the MX record scheme
  3803.          [SMTP:3].  See also Section 7.4 of [DNS:2] for information on
  3804.          domain name support for SMTP.
  3805.  
  3806.       5.3.6  Mailing Lists and Aliases
  3807.  
  3808.          An SMTP-capable host SHOULD support both the alias and the list
  3809.          form of address expansion for multiple delivery.  When a
  3810.          message is delivered or forwarded to each address of an
  3811.          expanded list form, the return address in the envelope
  3812.          ("MAIL FROM:") MUST be changed to be the address of a person
  3813.          who administers the list, but the message header MUST be left
  3814.          unchanged; in particular, the "From" field of the message is
  3815.          unaffected.
  3816.  
  3817.          DISCUSSION:
  3818.               An important mail facility is a mechanism for multi-
  3819.               destination delivery of a single message, by transforming
  3820.               or "expanding" a pseudo-mailbox address into a list of
  3821.               destination mailbox addresses.  When a message is sent to
  3822.               such a pseudo-mailbox (sometimes called an "exploder"),
  3823.               copies are forwarded or redistributed to each mailbox in
  3824.               the expanded list.  We classify such a pseudo-mailbox as
  3825.               an "alias" or a "list", depending upon the expansion
  3826.               rules:
  3827.  
  3828.               (a)  Alias
  3829.  
  3830.                    To expand an alias, the recipient mailer simply
  3831.                    replaces the pseudo-mailbox address in the envelope
  3832.                    with each of the expanded addresses in turn; the rest
  3833.                    of the envelope and the message body are left
  3834.                    unchanged.  The message is then delivered or
  3835.                    forwarded to each expanded address.
  3836.  
  3837.               (b)  List
  3838.  
  3839.                    A mailing list may be said to operate by
  3840.                    "redistribution" rather than by "forwarding".  To
  3841.  
  3842.  
  3843.  
  3844. Internet Engineering Task Force                                [Page 65]
  3845.  
  3846.  
  3847.  
  3848.  
  3849. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3850.  
  3851.  
  3852.                    expand a list, the recipient mailer replaces the
  3853.                    pseudo-mailbox address in the envelope with each of
  3854.                    the expanded addresses in turn. The return address in
  3855.                    the envelope is changed so that all error messages
  3856.                    generated by the final deliveries will be returned to
  3857.                    a list administrator, not to the message originator,
  3858.                    who generally has no control over the contents of the
  3859.                    list and will typically find error messages annoying.
  3860.  
  3861.  
  3862.       5.3.7  Mail Gatewaying
  3863.  
  3864.          Gatewaying mail between different mail environments, i.e.,
  3865.          different mail formats and protocols, is complex and does not
  3866.          easily yield to standardization.  See for example [SMTP:5a],
  3867.          [SMTP:5b].  However, some general requirements may be given for
  3868.          a gateway between the Internet and another mail environment.
  3869.  
  3870.          (A)  Header fields MAY be rewritten when necessary as messages
  3871.               are gatewayed across mail environment boundaries.
  3872.  
  3873.               DISCUSSION:
  3874.                    This may involve interpreting the local-part of the
  3875.                    destination address, as suggested in Section 5.2.16.
  3876.  
  3877.                    The other mail systems gatewayed to the Internet
  3878.                    generally use a subset of RFC-822 headers, but some
  3879.                    of them do not have an equivalent to the SMTP
  3880.                    envelope.  Therefore, when a message leaves the
  3881.                    Internet environment, it may be necessary to fold the
  3882.                    SMTP envelope information into the message header.  A
  3883.                    possible solution would be to create new header
  3884.                    fields to carry the envelope information (e.g., "X-
  3885.                    SMTP-MAIL:" and "X-SMTP-RCPT:"); however, this would
  3886.                    require changes in mail programs in the foreign
  3887.                    environment.
  3888.  
  3889.          (B)  When forwarding a message into or out of the Internet
  3890.               environment, a gateway MUST prepend a Received: line, but
  3891.               it MUST NOT alter in any way a Received: line that is
  3892.               already in the header.
  3893.  
  3894.               DISCUSSION:
  3895.                    This requirement is a subset of the general
  3896.                    "Received:" line requirement of Section 5.2.8; it is
  3897.                    restated here for emphasis.
  3898.  
  3899.                    Received: fields of messages originating from other
  3900.  
  3901.  
  3902.  
  3903. Internet Engineering Task Force                                [Page 66]
  3904.  
  3905.  
  3906.  
  3907.  
  3908. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3909.  
  3910.  
  3911.                    environments may not conform exactly to RFC822.
  3912.                    However, the most important use of Received: lines is
  3913.                    for debugging mail faults, and this debugging can be
  3914.                    severely hampered by well-meaning gateways that try
  3915.                    to "fix" a Received: line.
  3916.  
  3917.                    The gateway is strongly encouraged to indicate the
  3918.                    environment and protocol in the "via" clauses of
  3919.                    Received field(s) that it supplies.
  3920.  
  3921.          (C)  From the Internet side, the gateway SHOULD accept all
  3922.               valid address formats in SMTP commands and in RFC-822
  3923.               headers, and all valid RFC-822 messages.  Although a
  3924.               gateway must accept an RFC-822 explicit source route
  3925.               ("@...:" format) in either the RFC-822 header or in the
  3926.               envelope, it MAY or may not act on the source route; see
  3927.               Sections 5.2.6 and 5.2.19.
  3928.  
  3929.               DISCUSSION:
  3930.                    It is often tempting to restrict the range of
  3931.                    addresses accepted at the mail gateway to simplify
  3932.                    the translation into addresses for the remote
  3933.                    environment.  This practice is based on the
  3934.                    assumption that mail users have control over the
  3935.                    addresses their mailers send to the mail gateway.  In
  3936.                    practice, however, users have little control over the
  3937.                    addresses that are finally sent; their mailers are
  3938.                    free to change addresses into any legal RFC-822
  3939.                    format.
  3940.  
  3941.          (D)  The gateway MUST ensure that all header fields of a
  3942.               message that it forwards into the Internet meet the
  3943.               requirements for Internet mail.  In particular, all
  3944.               addresses in "From:", "To:", "Cc:", etc., fields must be
  3945.               transformed (if necessary) to satisfy RFC-822 syntax, and
  3946.               they must be effective and useful for sending replies.
  3947.  
  3948.  
  3949.          (E)  The translation algorithm used to convert mail from the
  3950.               Internet protocols to another environment's protocol
  3951.               SHOULD try to ensure that error messages from the foreign
  3952.               mail environment are delivered to the return path from the
  3953.               SMTP envelope, not to the sender listed in the "From:"
  3954.               field of the RFC-822 message.
  3955.  
  3956.               DISCUSSION:
  3957.                    Internet mail lists usually place the address of the
  3958.                    mail list maintainer in the envelope but leave the
  3959.  
  3960.  
  3961.  
  3962. Internet Engineering Task Force                                [Page 67]
  3963.  
  3964.  
  3965.  
  3966.  
  3967. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  3968.  
  3969.  
  3970.                    original message header intact (with the "From:"
  3971.                    field containing the original sender).  This yields
  3972.                    the behavior the average recipient expects: a reply
  3973.                    to the header gets sent to the original sender, not
  3974.                    to a mail list maintainer; however, errors get sent
  3975.                    to the maintainer (who can fix the problem) and not
  3976.                    the sender (who probably cannot).
  3977.  
  3978.          (F)  Similarly, when forwarding a message from another
  3979.               environment into the Internet, the gateway SHOULD set the
  3980.               envelope return path in accordance with an error message
  3981.               return address, if any, supplied by the foreign
  3982.               environment.
  3983.  
  3984.  
  3985.       5.3.8  Maximum Message Size
  3986.  
  3987.          Mailer software MUST be able to send and receive messages of at
  3988.          least 64K bytes in length (including header), and a much larger
  3989.          maximum size is highly desirable.
  3990.  
  3991.          DISCUSSION:
  3992.               Although SMTP does not define the maximum size of a
  3993.               message, many systems impose implementation limits.
  3994.  
  3995.               The current de facto minimum limit in the Internet is 64K
  3996.               bytes.  However, electronic mail is used for a variety of
  3997.               purposes that create much larger messages.  For example,
  3998.               mail is often used instead of FTP for transmitting ASCII
  3999.               files, and in particular to transmit entire documents.  As
  4000.               a result, messages can be 1 megabyte or even larger.  We
  4001.               note that the present document together with its lower-
  4002.               layer companion contains 0.5 megabytes.
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021. Internet Engineering Task Force                                [Page 68]
  4022.  
  4023.  
  4024.  
  4025.  
  4026. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  4027.  
  4028.  
  4029.    5.4  SMTP REQUIREMENTS SUMMARY
  4030.  
  4031.                                                |          | | | |S| |
  4032.                                                |          | | | |H| |F
  4033.                                                |          | | | |O|M|o
  4034.                                                |          | |S| |U|U|o
  4035.                                                |          | |H| |L|S|t
  4036.                                                |          |M|O| |D|T|n
  4037.                                                |          |U|U|M| | |o
  4038.                                                |          |S|L|A|N|N|t
  4039.                                                |          |T|D|Y|O|O|t
  4040. FEATURE                                        |SECTION   | | | |T|T|e
  4041. -----------------------------------------------|----------|-|-|-|-|-|--
  4042.                                                |          | | | | | |
  4043. RECEIVER-SMTP:                                 |          | | | | | |
  4044.   Implement VRFY                               |5.2.3     |x| | | | |
  4045.   Implement EXPN                               |5.2.3     | |x| | | |
  4046.     EXPN, VRFY configurable                    |5.2.3     | | |x| | |
  4047.   Implement SEND, SOML, SAML                   |5.2.4     | | |x| | |
  4048.   Verify HELO parameter                        |5.2.5     | | |x| | |
  4049.     Refuse message with bad HELO               |5.2.5     | | | | |x|
  4050.   Accept explicit src-route syntax in env.     |5.2.6     |x| | | | |
  4051.   Support "postmaster"                         |5.2.7     |x| | | | |
  4052.   Process RCPT when received (except lists)    |5.2.7     | | |x| | |
  4053.       Long delay of RCPT responses             |5.2.7     | | | | |x|
  4054.                                                |          | | | | | |
  4055.   Add Received: line                           |5.2.8     |x| | | | |
  4056.       Received: line include domain literal    |5.2.8     | |x| | | |
  4057.   Change previous Received: line               |5.2.8     | | | | |x|
  4058.   Pass Return-Path info (final deliv/gwy)      |5.2.8     |x| | | | |
  4059.   Support empty reverse path                   |5.2.9     |x| | | | |
  4060.   Send only official reply codes               |5.2.10    | |x| | | |
  4061.   Send text from RFC-821 when appropriate      |5.2.10    | |x| | | |
  4062.   Delete "." for transparency                  |5.2.11    |x| | | | |
  4063.   Accept and recognize self domain literal(s)  |5.2.17    |x| | | | |
  4064.                                                |          | | | | | |
  4065.   Error message about error message            |5.3.1     | | | | |x|
  4066.   Keep pending listen on SMTP port             |5.3.1.2   | |x| | | |
  4067.   Provide limit on recv concurrency            |5.3.1.2   | | |x| | |
  4068.   Wait at least 5 mins for next sender cmd     |5.3.2     | |x| | | |
  4069.   Avoidable delivery failure after "250 OK"    |5.3.3     | | | | |x|
  4070.   Send error notification msg after accept     |5.3.3     |x| | | | |
  4071.     Send using null return path                |5.3.3     |x| | | | |
  4072.     Send to envelope return path               |5.3.3     | |x| | | |
  4073.     Send to null address                       |5.3.3     | | | | |x|
  4074.     Strip off explicit src route               |5.3.3     | |x| | | |
  4075.   Minimize acceptance delay (RFC-1047)         |5.3.3     |x| | | | |
  4076. -----------------------------------------------|----------|-|-|-|-|-|--
  4077.  
  4078.  
  4079.  
  4080. Internet Engineering Task Force                                [Page 69]
  4081.  
  4082.  
  4083.  
  4084.  
  4085. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  4086.  
  4087.  
  4088.                                                |          | | | | | |
  4089. SENDER-SMTP:                                   |          | | | | | |
  4090.   Canonicalized domain names in MAIL, RCPT     |5.2.2     |x| | | | |
  4091.   Implement SEND, SOML, SAML                   |5.2.4     | | |x| | |
  4092.   Send valid principal host name in HELO       |5.2.5     |x| | | | |
  4093.   Send explicit source route in RCPT TO:       |5.2.6     | | | |x| |
  4094.   Use only reply code to determine action      |5.2.10    |x| | | | |
  4095.   Use only high digit of reply code when poss. |5.2.10    | |x| | | |
  4096.   Add "." for transparency                     |5.2.11    |x| | | | |
  4097.                                                |          | | | | | |
  4098.   Retry messages after soft failure            |5.3.1.1   |x| | | | |
  4099.     Delay before retry                         |5.3.1.1   |x| | | | |
  4100.     Configurable retry parameters              |5.3.1.1   |x| | | | |
  4101.     Retry once per each queued dest host       |5.3.1.1   | |x| | | |
  4102.   Multiple RCPT's for same DATA                |5.3.1.1   | |x| | | |
  4103.   Support multiple concurrent transactions     |5.3.1.1   | | |x| | |
  4104.     Provide limit on concurrency               |5.3.1.1   | |x| | | |
  4105.                                                |          | | | | | |
  4106.   Timeouts on all activities                   |5.3.1     |x| | | | |
  4107.     Per-command timeouts                       |5.3.2     | |x| | | |
  4108.     Timeouts easily reconfigurable             |5.3.2     | |x| | | |
  4109.     Recommended times                          |5.3.2     | |x| | | |
  4110.   Try alternate addr's in order                |5.3.4     |x| | | | |
  4111.     Configurable limit on alternate tries      |5.3.4     | | |x| | |
  4112.     Try at least two alternates                |5.3.4     | |x| | | |
  4113.   Load-split across equal MX alternates        |5.3.4     | |x| | | |
  4114.   Use the Domain Name System                   |5.3.5     |x| | | | |
  4115.     Support MX records                         |5.3.5     |x| | | | |
  4116.     Use WKS records in MX processing           |5.2.12    | | | |x| |
  4117. -----------------------------------------------|----------|-|-|-|-|-|--
  4118.                                                |          | | | | | |
  4119. MAIL FORWARDING:                               |          | | | | | |
  4120.   Alter existing header field(s)               |5.2.6     | | | |x| |
  4121.   Implement relay function: 821/section 3.6    |5.2.6     | | |x| | |
  4122.     If not, deliver to RHS domain              |5.2.6     | |x| | | |
  4123.   Interpret 'local-part' of addr               |5.2.16    | | | | |x|
  4124.                                                |          | | | | | |
  4125. MAILING LISTS AND ALIASES                      |          | | | | | |
  4126.   Support both                                 |5.3.6     | |x| | | |
  4127.   Report mail list error to local admin.       |5.3.6     |x| | | | |
  4128.                                                |          | | | | | |
  4129. MAIL GATEWAYS:                                 |          | | | | | |
  4130.   Embed foreign mail route in local-part       |5.2.16    | | |x| | |
  4131.   Rewrite header fields when necessary         |5.3.7     | | |x| | |
  4132.   Prepend Received: line                       |5.3.7     |x| | | | |
  4133.   Change existing Received: line               |5.3.7     | | | | |x|
  4134.   Accept full RFC-822 on Internet side         |5.3.7     | |x| | | |
  4135.   Act on RFC-822 explicit source route         |5.3.7     | | |x| | |
  4136.  
  4137.  
  4138.  
  4139. Internet Engineering Task Force                                [Page 70]
  4140.  
  4141.  
  4142.  
  4143.  
  4144. RFC1123                  MAIL -- SMTP & RFC-822             October 1989
  4145.  
  4146.  
  4147.   Send only valid RFC-822 on Internet side     |5.3.7     |x| | | | |
  4148.   Deliver error msgs to envelope addr          |5.3.7     | |x| | | |
  4149.   Set env return path from err return addr     |5.3.7     | |x| | | |
  4150.                                                |          | | | | | |
  4151. USER AGENT -- RFC-822                          |          | | | | | |
  4152.   Allow user to enter <route> address          |5.2.6     | | | |x| |
  4153.   Support RFC-1049 Content Type field          |5.2.13    | | |x| | |
  4154.   Use 4-digit years                            |5.2.14    | |x| | | |
  4155.   Generate numeric timezones                   |5.2.14    | |x| | | |
  4156.   Accept all timezones                         |5.2.14    |x| | | | |
  4157.   Use non-num timezones from RFC-822           |5.2.14    |x| | | | |
  4158.   Omit phrase before route-addr                |5.2.15    | | |x| | |
  4159.   Accept and parse dot.dec. domain literals    |5.2.17    |x| | | | |
  4160.   Accept all RFC-822 address formats           |5.2.18    |x| | | | |
  4161.   Generate invalid RFC-822 address format      |5.2.18    | | | | |x|
  4162.   Fully-qualified domain names in header       |5.2.18    |x| | | | |
  4163.   Create explicit src route in header          |5.2.19    | | | |x| |
  4164.   Accept explicit src route in header          |5.2.19    |x| | | | |
  4165.                                                |          | | | | | |
  4166. Send/recv at least 64KB messages               |5.3.8     |x| | | | |
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.  
  4178.  
  4179.  
  4180.  
  4181.  
  4182.  
  4183.  
  4184.  
  4185.  
  4186.  
  4187.  
  4188.  
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.  
  4196.  
  4197.  
  4198. Internet Engineering Task Force                                [Page 71]
  4199.  
  4200.  
  4201.  
  4202.  
  4203. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4204.  
  4205.  
  4206. 6. SUPPORT SERVICES
  4207.  
  4208.    6.1 DOMAIN NAME TRANSLATION
  4209.  
  4210.       6.1.1 INTRODUCTION
  4211.  
  4212.          Every host MUST implement a resolver for the Domain Name System
  4213.          (DNS), and it MUST implement a mechanism using this DNS
  4214.          resolver to convert host names to IP addresses and vice-versa
  4215.          [DNS:1, DNS:2].
  4216.  
  4217.          In addition to the DNS, a host MAY also implement a host name
  4218.          translation mechanism that searches a local Internet host
  4219.          table.  See Section 6.1.3.8 for more information on this
  4220.          option.
  4221.  
  4222.          DISCUSSION:
  4223.               Internet host name translation was originally performed by
  4224.               searching local copies of a table of all hosts.  This
  4225.               table became too large to update and distribute in a
  4226.               timely manner and too large to fit into many hosts, so the
  4227.               DNS was invented.
  4228.  
  4229.               The DNS creates a distributed database used primarily for
  4230.               the translation between host names and host addresses.
  4231.               Implementation of DNS software is required.  The DNS
  4232.               consists of two logically distinct parts: name servers and
  4233.               resolvers (although implementations often combine these
  4234.               two logical parts in the interest of efficiency) [DNS:2].
  4235.  
  4236.               Domain name servers store authoritative data about certain
  4237.               sections of the database and answer queries about the
  4238.               data.  Domain resolvers query domain name servers for data
  4239.               on behalf of user processes.  Every host therefore needs a
  4240.               DNS resolver; some host machines will also need to run
  4241.               domain name servers.  Since no name server has complete
  4242.               information, in general it is necessary to obtain
  4243.               information from more than one name server to resolve a
  4244.               query.
  4245.  
  4246.       6.1.2  PROTOCOL WALK-THROUGH
  4247.  
  4248.          An implementor must study references [DNS:1] and [DNS:2]
  4249.          carefully.  They provide a thorough description of the theory,
  4250.          protocol, and implementation of the domain name system, and
  4251.          reflect several years of experience.
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257. Internet Engineering Task Force                                [Page 72]
  4258.  
  4259.  
  4260.  
  4261.  
  4262. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4263.  
  4264.  
  4265.          6.1.2.1  Resource Records with Zero TTL: RFC-1035 Section 3.2.1
  4266.  
  4267.             All DNS name servers and resolvers MUST properly handle RRs
  4268.             with a zero TTL: return the RR to the client but do not
  4269.             cache it.
  4270.  
  4271.             DISCUSSION:
  4272.                  Zero TTL values are interpreted to mean that the RR can
  4273.                  only be used for the transaction in progress, and
  4274.                  should not be cached; they are useful for extremely
  4275.                  volatile data.
  4276.  
  4277.          6.1.2.2  QCLASS Values: RFC-1035 Section 3.2.5
  4278.  
  4279.             A query with "QCLASS=*" SHOULD NOT be used unless the
  4280.             requestor is seeking data from more than one class.  In
  4281.             particular, if the requestor is only interested in Internet
  4282.             data types, QCLASS=IN MUST be used.
  4283.  
  4284.          6.1.2.3  Unused Fields: RFC-1035 Section 4.1.1
  4285.  
  4286.             Unused fields in a query or response message MUST be zero.
  4287.  
  4288.          6.1.2.4  Compression: RFC-1035 Section 4.1.4
  4289.  
  4290.             Name servers MUST use compression in responses.
  4291.  
  4292.             DISCUSSION:
  4293.                  Compression is essential to avoid overflowing UDP
  4294.                  datagrams; see Section 6.1.3.2.
  4295.  
  4296.          6.1.2.5  Misusing Configuration Info: RFC-1035 Section 6.1.2
  4297.  
  4298.             Recursive name servers and full-service resolvers generally
  4299.             have some configuration information containing hints about
  4300.             the location of root or local name servers.  An
  4301.             implementation MUST NOT include any of these hints in a
  4302.             response.
  4303.  
  4304.             DISCUSSION:
  4305.                  Many implementors have found it convenient to store
  4306.                  these hints as if they were cached data, but some
  4307.                  neglected to ensure that this "cached data" was not
  4308.                  included in responses.  This has caused serious
  4309.                  problems in the Internet when the hints were obsolete
  4310.                  or incorrect.
  4311.  
  4312.  
  4313.  
  4314.  
  4315.  
  4316. Internet Engineering Task Force                                [Page 73]
  4317.  
  4318.  
  4319.  
  4320.  
  4321. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4322.  
  4323.  
  4324.       6.1.3  SPECIFIC ISSUES
  4325.  
  4326.          6.1.3.1  Resolver Implementation
  4327.  
  4328.             A name resolver SHOULD be able to multiplex concurrent
  4329.             requests if the host supports concurrent processes.
  4330.  
  4331.             In implementing a DNS resolver, one of two different models
  4332.             MAY optionally be chosen: a full-service resolver, or a stub
  4333.             resolver.
  4334.  
  4335.  
  4336.             (A)  Full-Service Resolver
  4337.  
  4338.                  A full-service resolver is a complete implementation of
  4339.                  the resolver service, and is capable of dealing with
  4340.                  communication failures, failure of individual name
  4341.                  servers, location of the proper name server for a given
  4342.                  name, etc.  It must satisfy the following requirements:
  4343.  
  4344.                  o    The resolver MUST implement a local caching
  4345.                       function to avoid repeated remote access for
  4346.                       identical requests, and MUST time out information
  4347.                       in the cache.
  4348.  
  4349.                  o    The resolver SHOULD be configurable with start-up
  4350.                       information pointing to multiple root name servers
  4351.                       and multiple name servers for the local domain.
  4352.                       This insures that the resolver will be able to
  4353.                       access the whole name space in normal cases, and
  4354.                       will be able to access local domain information
  4355.                       should the local network become disconnected from
  4356.                       the rest of the Internet.
  4357.  
  4358.  
  4359.             (B)  Stub Resolver
  4360.  
  4361.                  A "stub resolver" relies on the services of a recursive
  4362.                  name server on the connected network or a "nearby"
  4363.                  network.  This scheme allows the host to pass on the
  4364.                  burden of the resolver function to a name server on
  4365.                  another host.  This model is often essential for less
  4366.                  capable hosts, such as PCs, and is also recommended
  4367.                  when the host is one of several workstations on a local
  4368.                  network, because it allows all of the workstations to
  4369.                  share the cache of the recursive name server and hence
  4370.                  reduce the number of domain requests exported by the
  4371.                  local network.
  4372.  
  4373.  
  4374.  
  4375. Internet Engineering Task Force                                [Page 74]
  4376.  
  4377.  
  4378.  
  4379.  
  4380. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4381.  
  4382.  
  4383.                  At a minimum, the stub resolver MUST be capable of
  4384.                  directing its requests to redundant recursive name
  4385.                  servers.  Note that recursive name servers are allowed
  4386.                  to restrict the sources of requests that they will
  4387.                  honor, so the host administrator must verify that the
  4388.                  service will be provided.  Stub resolvers MAY implement
  4389.                  caching if they choose, but if so, MUST timeout cached
  4390.                  information.
  4391.  
  4392.  
  4393.          6.1.3.2  Transport Protocols
  4394.  
  4395.             DNS resolvers and recursive servers MUST support UDP, and
  4396.             SHOULD support TCP, for sending (non-zone-transfer) queries.
  4397.             Specifically, a DNS resolver or server that is sending a
  4398.             non-zone-transfer query MUST send a UDP query first.  If the
  4399.             Answer section of the response is truncated and if the
  4400.             requester supports TCP, it SHOULD try the query again using
  4401.             TCP.
  4402.  
  4403.             DNS servers MUST be able to service UDP queries and SHOULD
  4404.             be able to service TCP queries.  A name server MAY limit the
  4405.             resources it devotes to TCP queries, but it SHOULD NOT
  4406.             refuse to service a TCP query just because it would have
  4407.             succeeded with UDP.
  4408.  
  4409.             Truncated responses MUST NOT be saved (cached) and later
  4410.             used in such a way that the fact that they are truncated is
  4411.             lost.
  4412.  
  4413.             DISCUSSION:
  4414.                  UDP is preferred over TCP for queries because UDP
  4415.                  queries have much lower overhead, both in packet count
  4416.                  and in connection state.  The use of UDP is essential
  4417.                  for heavily-loaded servers, especially the root
  4418.                  servers.  UDP also offers additional robustness, since
  4419.                  a resolver can attempt several UDP queries to different
  4420.                  servers for the cost of a single TCP query.
  4421.  
  4422.                  It is possible for a DNS response to be truncated,
  4423.                  although this is a very rare occurrence in the present
  4424.                  Internet DNS.  Practically speaking, truncation cannot
  4425.                  be predicted, since it is data-dependent.  The
  4426.                  dependencies include the number of RRs in the answer,
  4427.                  the size of each RR, and the savings in space realized
  4428.                  by the name compression algorithm.  As a rule of thumb,
  4429.                  truncation in NS and MX lists should not occur for
  4430.                  answers containing 15 or fewer RRs.
  4431.  
  4432.  
  4433.  
  4434. Internet Engineering Task Force                                [Page 75]
  4435.  
  4436.  
  4437.  
  4438.  
  4439. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4440.  
  4441.  
  4442.                  Whether it is possible to use a truncated answer
  4443.                  depends on the application.  A mailer must not use a
  4444.                  truncated MX response, since this could lead to mail
  4445.                  loops.
  4446.  
  4447.                  Responsible practices can make UDP suffice in the vast
  4448.                  majority of cases.  Name servers must use compression
  4449.                  in responses.  Resolvers must differentiate truncation
  4450.                  of the Additional section of a response (which only
  4451.                  loses extra information) from truncation of the Answer
  4452.                  section (which for MX records renders the response
  4453.                  unusable by mailers).  Database administrators should
  4454.                  list only a reasonable number of primary names in lists
  4455.                  of name servers, MX alternatives, etc.
  4456.  
  4457.                  However, it is also clear that some new DNS record
  4458.                  types defined in the future will contain information
  4459.                  exceeding the 512 byte limit that applies to UDP, and
  4460.                  hence will require TCP.  Thus, resolvers and name
  4461.                  servers should implement TCP services as a backup to
  4462.                  UDP today, with the knowledge that they will require
  4463.                  the TCP service in the future.
  4464.  
  4465.             By private agreement, name servers and resolvers MAY arrange
  4466.             to use TCP for all traffic between themselves.  TCP MUST be
  4467.             used for zone transfers.
  4468.  
  4469.             A DNS server MUST have sufficient internal concurrency that
  4470.             it can continue to process UDP queries while awaiting a
  4471.             response or performing a zone transfer on an open TCP
  4472.             connection [DNS:2].
  4473.  
  4474.             A server MAY support a UDP query that is delivered using an
  4475.             IP broadcast or multicast address.  However, the Recursion
  4476.             Desired bit MUST NOT be set in a query that is multicast,
  4477.             and MUST be ignored by name servers receiving queries via a
  4478.             broadcast or multicast address.  A host that sends broadcast
  4479.             or multicast DNS queries SHOULD send them only as occasional
  4480.             probes, caching the IP address(es) it obtains from the
  4481.             response(s) so it can normally send unicast queries.
  4482.  
  4483.             DISCUSSION:
  4484.                  Broadcast or (especially) IP multicast can provide a
  4485.                  way to locate nearby name servers without knowing their
  4486.                  IP addresses in advance.  However, general broadcasting
  4487.                  of recursive queries can result in excessive and
  4488.                  unnecessary load on both network and servers.
  4489.  
  4490.  
  4491.  
  4492.  
  4493. Internet Engineering Task Force                                [Page 76]
  4494.  
  4495.  
  4496.  
  4497.  
  4498. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4499.  
  4500.  
  4501.          6.1.3.3  Efficient Resource Usage
  4502.  
  4503.             The following requirements on servers and resolvers are very
  4504.             important to the health of the Internet as a whole,
  4505.             particularly when DNS services are invoked repeatedly by
  4506.             higher level automatic servers, such as mailers.
  4507.  
  4508.             (1)  The resolver MUST implement retransmission controls to
  4509.                  insure that it does not waste communication bandwidth,
  4510.                  and MUST impose finite bounds on the resources consumed
  4511.                  to respond to a single request.  See [DNS:2] pages 43-
  4512.                  44 for specific recommendations.
  4513.  
  4514.             (2)  After a query has been retransmitted several times
  4515.                  without a response, an implementation MUST give up and
  4516.                  return a soft error to the application.
  4517.  
  4518.             (3)  All DNS name servers and resolvers SHOULD cache
  4519.                  temporary failures, with a timeout period of the order
  4520.                  of minutes.
  4521.  
  4522.                  DISCUSSION:
  4523.                       This will prevent applications that immediately
  4524.                       retry soft failures (in violation of Section 2.2
  4525.                       of this document) from generating excessive DNS
  4526.                       traffic.
  4527.  
  4528.             (4)  All DNS name servers and resolvers SHOULD cache
  4529.                  negative responses that indicate the specified name, or
  4530.                  data of the specified type, does not exist, as
  4531.                  described in [DNS:2].
  4532.  
  4533.             (5)  When a DNS server or resolver retries a UDP query, the
  4534.                  retry interval SHOULD be constrained by an exponential
  4535.                  backoff algorithm, and SHOULD also have upper and lower
  4536.                  bounds.
  4537.  
  4538.                  IMPLEMENTATION:
  4539.                       A measured RTT and variance (if available) should
  4540.                       be used to calculate an initial retransmission
  4541.                       interval.  If this information is not available, a
  4542.                       default of no less than 5 seconds should be used.
  4543.                       Implementations may limit the retransmission
  4544.                       interval, but this limit must exceed twice the
  4545.                       Internet maximum segment lifetime plus service
  4546.                       delay at the name server.
  4547.  
  4548.             (6)  When a resolver or server receives a Source Quench for
  4549.  
  4550.  
  4551.  
  4552. Internet Engineering Task Force                                [Page 77]
  4553.  
  4554.  
  4555.  
  4556.  
  4557. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4558.  
  4559.  
  4560.                  a query it has issued, it SHOULD take steps to reduce
  4561.                  the rate of querying that server in the near future.  A
  4562.                  server MAY ignore a Source Quench that it receives as
  4563.                  the result of sending a response datagram.
  4564.  
  4565.                  IMPLEMENTATION:
  4566.                       One recommended action to reduce the rate is to
  4567.                       send the next query attempt to an alternate
  4568.                       server, if there is one available.  Another is to
  4569.                       backoff the retry interval for the same server.
  4570.  
  4571.  
  4572.          6.1.3.4  Multihomed Hosts
  4573.  
  4574.             When the host name-to-address function encounters a host
  4575.             with multiple addresses, it SHOULD rank or sort the
  4576.             addresses using knowledge of the immediately connected
  4577.             network number(s) and any other applicable performance or
  4578.             history information.
  4579.  
  4580.             DISCUSSION:
  4581.                  The different addresses of a multihomed host generally
  4582.                  imply different Internet paths, and some paths may be
  4583.                  preferable to others in performance, reliability, or
  4584.                  administrative restrictions.  There is no general way
  4585.                  for the domain system to determine the best path.  A
  4586.                  recommended approach is to base this decision on local
  4587.                  configuration information set by the system
  4588.                  administrator.
  4589.  
  4590.             IMPLEMENTATION:
  4591.                  The following scheme has been used successfully:
  4592.  
  4593.                  (a)  Incorporate into the host configuration data a
  4594.                       Network-Preference List, that is simply a list of
  4595.                       networks in preferred order.  This list may be
  4596.                       empty if there is no preference.
  4597.  
  4598.                  (b)  When a host name is mapped into a list of IP
  4599.                       addresses, these addresses should be sorted by
  4600.                       network number, into the same order as the
  4601.                       corresponding networks in the Network-Preference
  4602.                       List.  IP addresses whose networks do not appear
  4603.                       in the Network-Preference List should be placed at
  4604.                       the end of the list.
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611. Internet Engineering Task Force                                [Page 78]
  4612.  
  4613.  
  4614.  
  4615.  
  4616. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4617.  
  4618.  
  4619.          6.1.3.5  Extensibility
  4620.  
  4621.             DNS software MUST support all well-known, class-independent
  4622.             formats [DNS:2], and SHOULD be written to minimize the
  4623.             trauma associated with the introduction of new well-known
  4624.             types and local experimentation with non-standard types.
  4625.  
  4626.             DISCUSSION:
  4627.                  The data types and classes used by the DNS are
  4628.                  extensible, and thus new types will be added and old
  4629.                  types deleted or redefined.  Introduction of new data
  4630.                  types ought to be dependent only upon the rules for
  4631.                  compression of domain names inside DNS messages, and
  4632.                  the translation between printable (i.e., master file)
  4633.                  and internal formats for Resource Records (RRs).
  4634.  
  4635.                  Compression relies on knowledge of the format of data
  4636.                  inside a particular RR.  Hence compression must only be
  4637.                  used for the contents of well-known, class-independent
  4638.                  RRs, and must never be used for class-specific RRs or
  4639.                  RR types that are not well-known.  The owner name of an
  4640.                  RR is always eligible for compression.
  4641.  
  4642.                  A name server may acquire, via zone transfer, RRs that
  4643.                  the server doesn't know how to convert to printable
  4644.                  format.  A resolver can receive similar information as
  4645.                  the result of queries.  For proper operation, this data
  4646.                  must be preserved, and hence the implication is that
  4647.                  DNS software cannot use textual formats for internal
  4648.                  storage.
  4649.  
  4650.                  The DNS defines domain name syntax very generally -- a
  4651.                  string of labels each containing up to 63 8-bit octets,
  4652.                  separated by dots, and with a maximum total of 255
  4653.                  octets.  Particular applications of the DNS are
  4654.                  permitted to further constrain the syntax of the domain
  4655.                  names they use, although the DNS deployment has led to
  4656.                  some applications allowing more general names.  In
  4657.                  particular, Section 2.1 of this document liberalizes
  4658.                  slightly the syntax of a legal Internet host name that
  4659.                  was defined in RFC-952 [DNS:4].
  4660.  
  4661.          6.1.3.6  Status of RR Types
  4662.  
  4663.             Name servers MUST be able to load all RR types except MD and
  4664.             MF from configuration files.  The MD and MF types are
  4665.             obsolete and MUST NOT be implemented; in particular, name
  4666.             servers MUST NOT load these types from configuration files.
  4667.  
  4668.  
  4669.  
  4670. Internet Engineering Task Force                                [Page 79]
  4671.  
  4672.  
  4673.  
  4674.  
  4675. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4676.  
  4677.  
  4678.             DISCUSSION:
  4679.                  The RR types MB, MG, MR, NULL, MINFO and RP are
  4680.                  considered experimental, and applications that use the
  4681.                  DNS cannot expect these RR types to be supported by
  4682.                  most domains.  Furthermore these types are subject to
  4683.                  redefinition.
  4684.  
  4685.                  The TXT and WKS RR types have not been widely used by
  4686.                  Internet sites; as a result, an application cannot rely
  4687.                  on the the existence of a TXT or WKS RR in most
  4688.                  domains.
  4689.  
  4690.          6.1.3.7  Robustness
  4691.  
  4692.             DNS software may need to operate in environments where the
  4693.             root servers or other servers are unavailable due to network
  4694.             connectivity or other problems.  In this situation, DNS name
  4695.             servers and resolvers MUST continue to provide service for
  4696.             the reachable part of the name space, while giving temporary
  4697.             failures for the rest.
  4698.  
  4699.             DISCUSSION:
  4700.                  Although the DNS is meant to be used primarily in the
  4701.                  connected Internet, it should be possible to use the
  4702.                  system in networks which are unconnected to the
  4703.                  Internet.  Hence implementations must not depend on
  4704.                  access to root servers before providing service for
  4705.                  local names.
  4706.  
  4707.          6.1.3.8  Local Host Table
  4708.  
  4709.             DISCUSSION:
  4710.                  A host may use a local host table as a backup or
  4711.                  supplement to the DNS.  This raises the question of
  4712.                  which takes precedence, the DNS or the host table; the
  4713.                  most flexible approach would make this a configuration
  4714.                  option.
  4715.  
  4716.                  Typically, the contents of such a supplementary host
  4717.                  table will be determined locally by the site.  However,
  4718.                  a publically-available table of Internet hosts is
  4719.                  maintained by the DDN Network Information Center (DDN
  4720.                  NIC), with a format documented in [DNS:4].  This table
  4721.                  can be retrieved from the DDN NIC using a protocol
  4722.                  described in [DNS:5].  It must be noted that this table
  4723.                  contains only a small fraction of all Internet hosts.
  4724.                  Hosts using this protocol to retrieve the DDN NIC host
  4725.                  table should use the VERSION command to check if the
  4726.  
  4727.  
  4728.  
  4729. Internet Engineering Task Force                                [Page 80]
  4730.  
  4731.  
  4732.  
  4733.  
  4734. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4735.  
  4736.  
  4737.                  table has changed before requesting the entire table
  4738.                  with the ALL command.  The VERSION identifier should be
  4739.                  treated as an arbitrary string and tested only for
  4740.                  equality; no numerical sequence may be assumed.
  4741.  
  4742.                  The DDN NIC host table includes administrative
  4743.                  information that is not needed for host operation and
  4744.                  is therefore not currently included in the DNS
  4745.                  database; examples include network and gateway entries.
  4746.                  However, much of this additional information will be
  4747.                  added to the DNS in the future.  Conversely, the DNS
  4748.                  provides essential services (in particular, MX records)
  4749.                  that are not available from the DDN NIC host table.
  4750.  
  4751.       6.1.4  DNS USER INTERFACE
  4752.  
  4753.          6.1.4.1  DNS Administration
  4754.  
  4755.             This document is concerned with design and implementation
  4756.             issues in host software, not with administrative or
  4757.             operational issues.  However, administrative issues are of
  4758.             particular importance in the DNS, since errors in particular
  4759.             segments of this large distributed database can cause poor
  4760.             or erroneous performance for many sites.  These issues are
  4761.             discussed in [DNS:6] and [DNS:7].
  4762.  
  4763.          6.1.4.2  DNS User Interface
  4764.  
  4765.             Hosts MUST provide an interface to the DNS for all
  4766.             application programs running on the host.  This interface
  4767.             will typically direct requests to a system process to
  4768.             perform the resolver function [DNS:1, 6.1:2].
  4769.  
  4770.             At a minimum, the basic interface MUST support a request for
  4771.             all information of a specific type and class associated with
  4772.             a specific name, and it MUST return either all of the
  4773.             requested information, a hard error code, or a soft error
  4774.             indication.  When there is no error, the basic interface
  4775.             returns the complete response information without
  4776.             modification, deletion, or ordering, so that the basic
  4777.             interface will not need to be changed to accommodate new
  4778.             data types.
  4779.  
  4780.             DISCUSSION:
  4781.                  The soft error indication is an essential part of the
  4782.                  interface, since it may not always be possible to
  4783.                  access particular information from the DNS; see Section
  4784.                  6.1.3.3.
  4785.  
  4786.  
  4787.  
  4788. Internet Engineering Task Force                                [Page 81]
  4789.  
  4790.  
  4791.  
  4792.  
  4793. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4794.  
  4795.  
  4796.             A host MAY provide other DNS interfaces tailored to
  4797.             particular functions, transforming the raw domain data into
  4798.             formats more suited to these functions.  In particular, a
  4799.             host MUST provide a DNS interface to facilitate translation
  4800.             between host addresses and host names.
  4801.  
  4802.          6.1.4.3 Interface Abbreviation Facilities
  4803.  
  4804.             User interfaces MAY provide a method for users to enter
  4805.             abbreviations for commonly-used names.  Although the
  4806.             definition of such methods is outside of the scope of the
  4807.             DNS specification, certain rules are necessary to insure
  4808.             that these methods allow access to the entire DNS name space
  4809.             and to prevent excessive use of Internet resources.
  4810.  
  4811.             If an abbreviation method is provided, then:
  4812.  
  4813.             (a)  There MUST be some convention for denoting that a name
  4814.                  is already complete, so that the abbreviation method(s)
  4815.                  are suppressed.  A trailing dot is the usual method.
  4816.  
  4817.             (b)  Abbreviation expansion MUST be done exactly once, and
  4818.                  MUST be done in the context in which the name was
  4819.                  entered.
  4820.  
  4821.  
  4822.             DISCUSSION:
  4823.                  For example, if an abbreviation is used in a mail
  4824.                  program for a destination, the abbreviation should be
  4825.                  expanded into a full domain name and stored in the
  4826.                  queued message with an indication that it is already
  4827.                  complete.  Otherwise, the abbreviation might be
  4828.                  expanded with a mail system search list, not the
  4829.                  user's, or a name could grow due to repeated
  4830.                  canonicalizations attempts interacting with wildcards.
  4831.  
  4832.             The two most common abbreviation methods are:
  4833.  
  4834.             (1)  Interface-level aliases
  4835.  
  4836.                  Interface-level aliases are conceptually implemented as
  4837.                  a list of alias/domain name pairs. The list can be
  4838.                  per-user or per-host, and separate lists can be
  4839.                  associated with different functions, e.g. one list for
  4840.                  host name-to-address translation, and a different list
  4841.                  for mail domains.  When the user enters a name, the
  4842.                  interface attempts to match the name to the alias
  4843.                  component of a list entry, and if a matching entry can
  4844.  
  4845.  
  4846.  
  4847. Internet Engineering Task Force                                [Page 82]
  4848.  
  4849.  
  4850.  
  4851.  
  4852. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4853.  
  4854.  
  4855.                  be found, the name is replaced by the domain name found
  4856.                  in the pair.
  4857.  
  4858.                  Note that interface-level aliases and CNAMEs are
  4859.                  completely separate mechanisms; interface-level aliases
  4860.                  are a local matter while CNAMEs are an Internet-wide
  4861.                  aliasing mechanism which is a required part of any DNS
  4862.                  implementation.
  4863.  
  4864.             (2)  Search Lists
  4865.  
  4866.                  A search list is conceptually implemented as an ordered
  4867.                  list of domain names.  When the user enters a name, the
  4868.                  domain names in the search list are used as suffixes to
  4869.                  the user-supplied name, one by one, until a domain name
  4870.                  with the desired associated data is found, or the
  4871.                  search list is exhausted.  Search lists often contain
  4872.                  the name of the local host's parent domain or other
  4873.                  ancestor domains.  Search lists are often per-user or
  4874.                  per-process.
  4875.  
  4876.                  It SHOULD be possible for an administrator to disable a
  4877.                  DNS search-list facility.  Administrative denial may be
  4878.                  warranted in some cases, to prevent abuse of the DNS.
  4879.  
  4880.                  There is danger that a search-list mechanism will
  4881.                  generate excessive queries to the root servers while
  4882.                  testing whether user input is a complete domain name,
  4883.                  lacking a final period to mark it as complete.  A
  4884.                  search-list mechanism MUST have one of, and SHOULD have
  4885.                  both of, the following two provisions to prevent this:
  4886.  
  4887.                  (a)  The local resolver/name server can implement
  4888.                       caching  of negative responses (see Section
  4889.                       6.1.3.3).
  4890.  
  4891.                  (b)  The search list expander can require two or more
  4892.                       interior dots in a generated domain name before it
  4893.                       tries using the name in a query to non-local
  4894.                       domain servers, such as the root.
  4895.  
  4896.                  DISCUSSION:
  4897.                       The intent of this requirement is to avoid
  4898.                       excessive delay for the user as the search list is
  4899.                       tested, and more importantly to prevent excessive
  4900.                       traffic to the root and other high-level servers.
  4901.                       For example, if the user supplied a name "X" and
  4902.                       the search list contained the root as a component,
  4903.  
  4904.  
  4905.  
  4906. Internet Engineering Task Force                                [Page 83]
  4907.  
  4908.  
  4909.  
  4910.  
  4911. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4912.  
  4913.  
  4914.                       a query would have to consult a root server before
  4915.                       the next search list alternative could be tried.
  4916.                       The resulting load seen by the root servers and
  4917.                       gateways near the root would be multiplied by the
  4918.                       number of hosts in the Internet.
  4919.  
  4920.                       The negative caching alternative limits the effect
  4921.                       to the first time a name is used.  The interior
  4922.                       dot rule is simpler to implement but can prevent
  4923.                       easy use of some top-level names.
  4924.  
  4925.  
  4926.       6.1.5  DOMAIN NAME SYSTEM REQUIREMENTS SUMMARY
  4927.  
  4928.                                                |           | | | |S| |
  4929.                                                |           | | | |H| |F
  4930.                                                |           | | | |O|M|o
  4931.                                                |           | |S| |U|U|o
  4932.                                                |           | |H| |L|S|t
  4933.                                                |           |M|O| |D|T|n
  4934.                                                |           |U|U|M| | |o
  4935.                                                |           |S|L|A|N|N|t
  4936.                                                |           |T|D|Y|O|O|t
  4937. FEATURE                                        |SECTION    | | | |T|T|e
  4938. -----------------------------------------------|-----------|-|-|-|-|-|--
  4939. GENERAL ISSUES                                 |           | | | | | |
  4940.                                                |           | | | | | |
  4941. Implement DNS name-to-address conversion       |6.1.1      |x| | | | |
  4942. Implement DNS address-to-name conversion       |6.1.1      |x| | | | |
  4943. Support conversions using host table           |6.1.1      | | |x| | |
  4944. Properly handle RR with zero TTL               |6.1.2.1    |x| | | | |
  4945. Use QCLASS=* unnecessarily                     |6.1.2.2    | |x| | | |
  4946.   Use QCLASS=IN for Internet class             |6.1.2.2    |x| | | | |
  4947. Unused fields zero                             |6.1.2.3    |x| | | | |
  4948. Use compression in responses                   |6.1.2.4    |x| | | | |
  4949.                                                |           | | | | | |
  4950. Include config info in responses               |6.1.2.5    | | | | |x|
  4951. Support all well-known, class-indep. types     |6.1.3.5    |x| | | | |
  4952. Easily expand type list                        |6.1.3.5    | |x| | | |
  4953. Load all RR types (except MD and MF)           |6.1.3.6    |x| | | | |
  4954. Load MD or MF type                             |6.1.3.6    | | | | |x|
  4955. Operate when root servers, etc. unavailable    |6.1.3.7    |x| | | | |
  4956. -----------------------------------------------|-----------|-|-|-|-|-|--
  4957. RESOLVER ISSUES:                               |           | | | | | |
  4958.                                                |           | | | | | |
  4959. Resolver support multiple concurrent requests  |6.1.3.1    | |x| | | |
  4960. Full-service resolver:                         |6.1.3.1    | | |x| | |
  4961.   Local caching                                |6.1.3.1    |x| | | | |
  4962.  
  4963.  
  4964.  
  4965. Internet Engineering Task Force                                [Page 84]
  4966.  
  4967.  
  4968.  
  4969.  
  4970. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  4971.  
  4972.  
  4973.   Information in local cache times out         |6.1.3.1    |x| | | | |
  4974.   Configurable with starting info              |6.1.3.1    | |x| | | |
  4975. Stub resolver:                                 |6.1.3.1    | | |x| | |
  4976.   Use redundant recursive name servers         |6.1.3.1    |x| | | | |
  4977.   Local caching                                |6.1.3.1    | | |x| | |
  4978.   Information in local cache times out         |6.1.3.1    |x| | | | |
  4979. Support for remote multi-homed hosts:          |           | | | | | |
  4980.   Sort multiple addresses by preference list   |6.1.3.4    | |x| | | |
  4981.                                                |           | | | | | |
  4982. -----------------------------------------------|-----------|-|-|-|-|-|--
  4983. TRANSPORT PROTOCOLS:                           |           | | | | | |
  4984.                                                |           | | | | | |
  4985. Support UDP queries                            |6.1.3.2    |x| | | | |
  4986. Support TCP queries                            |6.1.3.2    | |x| | | |
  4987.   Send query using UDP first                   |6.1.3.2    |x| | | | |1
  4988.   Try TCP if UDP answers are truncated         |6.1.3.2    | |x| | | |
  4989. Name server limit TCP query resources          |6.1.3.2    | | |x| | |
  4990.   Punish unnecessary TCP query                 |6.1.3.2    | | | |x| |
  4991. Use truncated data as if it were not           |6.1.3.2    | | | | |x|
  4992. Private agreement to use only TCP              |6.1.3.2    | | |x| | |
  4993. Use TCP for zone transfers                     |6.1.3.2    |x| | | | |
  4994. TCP usage not block UDP queries                |6.1.3.2    |x| | | | |
  4995. Support broadcast or multicast queries         |6.1.3.2    | | |x| | |
  4996.   RD bit set in query                          |6.1.3.2    | | | | |x|
  4997.   RD bit ignored by server is b'cast/m'cast    |6.1.3.2    |x| | | | |
  4998.   Send only as occasional probe for addr's     |6.1.3.2    | |x| | | |
  4999. -----------------------------------------------|-----------|-|-|-|-|-|--
  5000. RESOURCE USAGE:                                |           | | | | | |
  5001.                                                |           | | | | | |
  5002. Transmission controls, per [DNS:2]             |6.1.3.3    |x| | | | |
  5003.   Finite bounds per request                    |6.1.3.3    |x| | | | |
  5004. Failure after retries => soft error            |6.1.3.3    |x| | | | |
  5005. Cache temporary failures                       |6.1.3.3    | |x| | | |
  5006. Cache negative responses                       |6.1.3.3    | |x| | | |
  5007. Retries use exponential backoff                |6.1.3.3    | |x| | | |
  5008.   Upper, lower bounds                          |6.1.3.3    | |x| | | |
  5009. Client handle Source Quench                    |6.1.3.3    | |x| | | |
  5010. Server ignore Source Quench                    |6.1.3.3    | | |x| | |
  5011. -----------------------------------------------|-----------|-|-|-|-|-|--
  5012. USER INTERFACE:                                |           | | | | | |
  5013.                                                |           | | | | | |
  5014. All programs have access to DNS interface      |6.1.4.2    |x| | | | |
  5015. Able to request all info for given name        |6.1.4.2    |x| | | | |
  5016. Returns complete info or error                 |6.1.4.2    |x| | | | |
  5017. Special interfaces                             |6.1.4.2    | | |x| | |
  5018.   Name<->Address translation                   |6.1.4.2    |x| | | | |
  5019.                                                |           | | | | | |
  5020. Abbreviation Facilities:                       |6.1.4.3    | | |x| | |
  5021.  
  5022.  
  5023.  
  5024. Internet Engineering Task Force                                [Page 85]
  5025.  
  5026.  
  5027.  
  5028.  
  5029. RFC1123               SUPPORT SERVICES -- DOMAINS           October 1989
  5030.  
  5031.  
  5032.   Convention for complete names                |6.1.4.3    |x| | | | |
  5033.   Conversion exactly once                      |6.1.4.3    |x| | | | |
  5034.   Conversion in proper context                 |6.1.4.3    |x| | | | |
  5035.   Search list:                                 |6.1.4.3    | | |x| | |
  5036.     Administrator can disable                  |6.1.4.3    | |x| | | |
  5037.     Prevention of excessive root queries       |6.1.4.3    |x| | | | |
  5038.       Both methods                             |6.1.4.3    | |x| | | |
  5039. -----------------------------------------------|-----------|-|-|-|-|-|--
  5040. -----------------------------------------------|-----------|-|-|-|-|-|--
  5041.  
  5042. 1.   Unless there is private agreement between particular resolver and
  5043.      particular server.
  5044.  
  5045.  
  5046.  
  5047.  
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083. Internet Engineering Task Force                                [Page 86]
  5084.  
  5085.  
  5086.  
  5087.  
  5088. RFC1123            SUPPORT SERVICES -- INITIALIZATION       October 1989
  5089.  
  5090.  
  5091.    6.2  HOST INITIALIZATION
  5092.  
  5093.       6.2.1  INTRODUCTION
  5094.  
  5095.          This section discusses the initialization of host software
  5096.          across a connected network, or more generally across an
  5097.          Internet path.  This is necessary for a diskless host, and may
  5098.          optionally be used for a host with disk drives.  For a diskless
  5099.          host, the initialization process is called "network booting"
  5100.          and is controlled by a bootstrap program located in a boot ROM.
  5101.  
  5102.          To initialize a diskless host across the network, there are two
  5103.          distinct phases:
  5104.  
  5105.          (1)  Configure the IP layer.
  5106.  
  5107.               Diskless machines often have no permanent storage in which
  5108.               to store network configuration information, so that
  5109.               sufficient configuration information must be obtained
  5110.               dynamically to support the loading phase that follows.
  5111.               This information must include at least the IP addresses of
  5112.               the host and of the boot server.  To support booting
  5113.               across a gateway, the address mask and a list of default
  5114.               gateways are also required.
  5115.  
  5116.          (2)  Load the host system code.
  5117.  
  5118.               During the loading phase, an appropriate file transfer
  5119.               protocol is used to copy the system code across the
  5120.               network from the boot server.
  5121.  
  5122.          A host with a disk may perform the first step, dynamic
  5123.          configuration.  This is important for microcomputers, whose
  5124.          floppy disks allow network configuration information to be
  5125.          mistakenly duplicated on more than one host.  Also,
  5126.          installation of new hosts is much simpler if they automatically
  5127.          obtain their configuration information from a central server,
  5128.          saving administrator time and decreasing the probability of
  5129.          mistakes.
  5130.  
  5131.       6.2.2  REQUIREMENTS
  5132.  
  5133.          6.2.2.1  Dynamic Configuration
  5134.  
  5135.             A number of protocol provisions have been made for dynamic
  5136.             configuration.
  5137.  
  5138.             o    ICMP Information Request/Reply messages
  5139.  
  5140.  
  5141.  
  5142. Internet Engineering Task Force                                [Page 87]
  5143.  
  5144.  
  5145.  
  5146.  
  5147. RFC1123            SUPPORT SERVICES -- INITIALIZATION       October 1989
  5148.  
  5149.  
  5150.                  This obsolete message pair was designed to allow a host
  5151.                  to find the number of the network it is on.
  5152.                  Unfortunately, it was useful only if the host already
  5153.                  knew the host number part of its IP address,
  5154.                  information that hosts requiring dynamic configuration
  5155.                  seldom had.
  5156.  
  5157.             o    Reverse Address Resolution Protocol (RARP) [BOOT:4]
  5158.  
  5159.                  RARP is a link-layer protocol for a broadcast medium
  5160.                  that allows a host to find its IP address given its
  5161.                  link layer address.  Unfortunately, RARP does not work
  5162.                  across IP gateways and therefore requires a RARP server
  5163.                  on every network.  In addition, RARP does not provide
  5164.                  any other configuration information.
  5165.  
  5166.             o    ICMP Address Mask Request/Reply messages
  5167.  
  5168.                  These ICMP messages allow a host to learn the address
  5169.                  mask for a particular network interface.
  5170.  
  5171.             o    BOOTP Protocol [BOOT:2]
  5172.  
  5173.                  This protocol allows a host to determine the IP
  5174.                  addresses of the local host and the boot server, the
  5175.                  name of an appropriate boot file, and optionally the
  5176.                  address mask and list of default gateways.  To locate a
  5177.                  BOOTP server, the host broadcasts a BOOTP request using
  5178.                  UDP.  Ad hoc gateway extensions have been used to
  5179.                  transmit the BOOTP broadcast through gateways, and in
  5180.                  the future the IP Multicasting facility will provide a
  5181.                  standard mechanism for this purpose.
  5182.  
  5183.  
  5184.             The suggested approach to dynamic configuration is to use
  5185.             the BOOTP protocol with the extensions defined in "BOOTP
  5186.             Vendor Information Extensions" RFC-1084 [BOOT:3].  RFC-1084
  5187.             defines some important general (not vendor-specific)
  5188.             extensions.  In particular, these extensions allow the
  5189.             address mask to be supplied in BOOTP; we RECOMMEND that the
  5190.             address mask be supplied in this manner.
  5191.  
  5192.             DISCUSSION:
  5193.                  Historically, subnetting was defined long after IP, and
  5194.                  so a separate mechanism (ICMP Address Mask messages)
  5195.                  was designed to supply the address mask to a host.
  5196.                  However, the IP address mask and the corresponding IP
  5197.                  address conceptually form a pair, and for operational
  5198.  
  5199.  
  5200.  
  5201. Internet Engineering Task Force                                [Page 88]
  5202.  
  5203.  
  5204.  
  5205.  
  5206. RFC1123            SUPPORT SERVICES -- INITIALIZATION       October 1989
  5207.  
  5208.  
  5209.                  simplicity they ought to be defined at the same time
  5210.                  and by the same mechanism, whether a configuration file
  5211.                  or a dynamic mechanism like BOOTP.
  5212.  
  5213.                  Note that BOOTP is not sufficiently general to specify
  5214.                  the configurations of all interfaces of a multihomed
  5215.                  host.  A multihomed host must either use BOOTP
  5216.                  separately for each interface, or configure one
  5217.                  interface using BOOTP to perform the loading, and
  5218.                  perform the complete initialization from a file later.
  5219.  
  5220.                  Application layer configuration information is expected
  5221.                  to be obtained from files after loading of the system
  5222.                  code.
  5223.  
  5224.          6.2.2.2  Loading Phase
  5225.  
  5226.             A suggested approach for the loading phase is to use TFTP
  5227.             [BOOT:1] between the IP addresses established by BOOTP.
  5228.  
  5229.             TFTP to a broadcast address SHOULD NOT be used, for reasons
  5230.             explained in Section 4.2.3.4.
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260. Internet Engineering Task Force                                [Page 89]
  5261.  
  5262.  
  5263.  
  5264.  
  5265. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5266.  
  5267.  
  5268.    6.3  REMOTE MANAGEMENT
  5269.  
  5270.       6.3.1  INTRODUCTION
  5271.  
  5272.          The Internet community has recently put considerable effort
  5273.          into the development of network management protocols.  The
  5274.          result has been a two-pronged approach [MGT:1, MGT:6]:  the
  5275.          Simple Network Management Protocol (SNMP) [MGT:4] and the
  5276.          Common Management Information Protocol over TCP (CMOT) [MGT:5].
  5277.  
  5278.          In order to be managed using SNMP or CMOT, a host will need to
  5279.          implement an appropriate management agent.  An Internet host
  5280.          SHOULD include an agent for either SNMP or CMOT.
  5281.  
  5282.          Both SNMP and CMOT operate on a Management Information Base
  5283.          (MIB) that defines a collection of management values.  By
  5284.          reading and setting these values, a remote application may
  5285.          query and change the state of the managed system.
  5286.  
  5287.          A standard MIB [MGT:3] has been defined for use by both
  5288.          management protocols, using data types defined by the Structure
  5289.          of Management Information (SMI) defined in [MGT:2].  Additional
  5290.          MIB variables can be introduced under the "enterprises" and
  5291.          "experimental" subtrees of the MIB naming space [MGT:2].
  5292.  
  5293.          Every protocol module in the host SHOULD implement the relevant
  5294.          MIB variables.  A host SHOULD implement the MIB variables as
  5295.          defined in the most recent standard MIB, and MAY implement
  5296.          other MIB variables when appropriate and useful.
  5297.  
  5298.       6.3.2  PROTOCOL WALK-THROUGH
  5299.  
  5300.          The MIB is intended to cover both hosts and gateways, although
  5301.          there may be detailed differences in MIB application to the two
  5302.          cases.  This section contains the appropriate interpretation of
  5303.          the MIB for hosts.  It is likely that later versions of the MIB
  5304.          will include more entries for host management.
  5305.  
  5306.          A managed host must implement the following groups of MIB
  5307.          object definitions: System, Interfaces, Address Translation,
  5308.          IP, ICMP, TCP, and UDP.
  5309.  
  5310.          The following specific interpretations apply to hosts:
  5311.  
  5312.          o    ipInHdrErrors
  5313.  
  5314.               Note that the error "time-to-live exceeded" can occur in a
  5315.               host only when it is forwarding a source-routed datagram.
  5316.  
  5317.  
  5318.  
  5319. Internet Engineering Task Force                                [Page 90]
  5320.  
  5321.  
  5322.  
  5323.  
  5324. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5325.  
  5326.  
  5327.          o    ipOutNoRoutes
  5328.  
  5329.               This object counts datagrams discarded because no route
  5330.               can be found.  This may happen in a host if all the
  5331.               default gateways in the host's configuration are down.
  5332.  
  5333.          o    ipFragOKs, ipFragFails, ipFragCreates
  5334.  
  5335.               A host that does not implement intentional fragmentation
  5336.               (see "Fragmentation" section of [INTRO:1]) MUST return the
  5337.               value zero for these three objects.
  5338.  
  5339.          o    icmpOutRedirects
  5340.  
  5341.               For a host, this object MUST always be zero, since hosts
  5342.               do not send Redirects.
  5343.  
  5344.          o    icmpOutAddrMaskReps
  5345.  
  5346.               For a host, this object MUST always be zero, unless the
  5347.               host is an authoritative source of address mask
  5348.               information.
  5349.  
  5350.          o    ipAddrTable
  5351.  
  5352.               For a host, the "IP Address Table" object is effectively a
  5353.               table of logical interfaces.
  5354.  
  5355.          o    ipRoutingTable
  5356.  
  5357.               For a host, the "IP Routing Table" object is effectively a
  5358.               combination of the host's Routing Cache and the static
  5359.               route table described in "Routing Outbound Datagrams"
  5360.               section of [INTRO:1].
  5361.  
  5362.               Within each ipRouteEntry, ipRouteMetric1...4 normally will
  5363.               have no meaning for a host and SHOULD always be -1, while
  5364.               ipRouteType will normally have the value "remote".
  5365.  
  5366.               If destinations on the connected network do not appear in
  5367.               the Route Cache (see "Routing Outbound Datagrams section
  5368.               of [INTRO:1]), there will be no entries with ipRouteType
  5369.               of "direct".
  5370.  
  5371.  
  5372.          DISCUSSION:
  5373.               The current MIB does not include Type-of-Service in an
  5374.               ipRouteEntry, but a future revision is expected to make
  5375.  
  5376.  
  5377.  
  5378. Internet Engineering Task Force                                [Page 91]
  5379.  
  5380.  
  5381.  
  5382.  
  5383. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5384.  
  5385.  
  5386.               this addition.
  5387.  
  5388.               We also expect the MIB to be expanded to allow the remote
  5389.               management of applications (e.g., the ability to partially
  5390.               reconfigure mail systems).  Network service applications
  5391.               such as mail systems should therefore be written with the
  5392.               "hooks" for remote management.
  5393.  
  5394.       6.3.3  MANAGEMENT REQUIREMENTS SUMMARY
  5395.  
  5396.                                                |           | | | |S| |
  5397.                                                |           | | | |H| |F
  5398.                                                |           | | | |O|M|o
  5399.                                                |           | |S| |U|U|o
  5400.                                                |           | |H| |L|S|t
  5401.                                                |           |M|O| |D|T|n
  5402.                                                |           |U|U|M| | |o
  5403.                                                |           |S|L|A|N|N|t
  5404.                                                |           |T|D|Y|O|O|t
  5405. FEATURE                                        |SECTION    | | | |T|T|e
  5406. -----------------------------------------------|-----------|-|-|-|-|-|--
  5407. Support SNMP or CMOT agent                     |6.3.1      | |x| | | |
  5408. Implement specified objects in standard MIB    |6.3.1      | |x| | | |
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437. Internet Engineering Task Force                                [Page 92]
  5438.  
  5439.  
  5440.  
  5441.  
  5442. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5443.  
  5444.  
  5445. 7.  REFERENCES
  5446.  
  5447.    This section lists the primary references with which every
  5448.    implementer must be thoroughly familiar.  It also lists some
  5449.    secondary references that are suggested additional reading.
  5450.  
  5451.    INTRODUCTORY REFERENCES:
  5452.  
  5453.  
  5454.    [INTRO:1] "Requirements for Internet Hosts -- Communication Layers,"
  5455.         IETF Host Requirements Working Group, R. Braden, Ed., RFC-1122,
  5456.         October 1989.
  5457.  
  5458.    [INTRO:2]  "DDN Protocol Handbook," NIC-50004, NIC-50005, NIC-50006,
  5459.         (three volumes), SRI International, December 1985.
  5460.  
  5461.    [INTRO:3]  "Official Internet Protocols," J. Reynolds and J. Postel,
  5462.         RFC-1011, May 1987.
  5463.  
  5464.         This document is republished periodically with new RFC numbers;
  5465.         the latest version must be used.
  5466.  
  5467.    [INTRO:4]  "Protocol Document Order Information," O. Jacobsen and J.
  5468.         Postel, RFC-980, March 1986.
  5469.  
  5470.    [INTRO:5]  "Assigned Numbers," J. Reynolds and J. Postel, RFC-1010,
  5471.         May 1987.
  5472.  
  5473.         This document is republished periodically with new RFC numbers;
  5474.         the latest version must be used.
  5475.  
  5476.  
  5477.    TELNET REFERENCES:
  5478.  
  5479.  
  5480.    [TELNET:1]  "Telnet Protocol Specification," J. Postel and J.
  5481.         Reynolds, RFC-854, May 1983.
  5482.  
  5483.    [TELNET:2]  "Telnet Option Specification," J. Postel and J. Reynolds,
  5484.         RFC-855, May 1983.
  5485.  
  5486.    [TELNET:3]  "Telnet Binary Transmission," J. Postel and J. Reynolds,
  5487.         RFC-856, May 1983.
  5488.  
  5489.    [TELNET:4]  "Telnet Echo Option," J. Postel and J. Reynolds, RFC-857,
  5490.         May 1983.
  5491.  
  5492.    [TELNET:5]  "Telnet Suppress Go Ahead Option," J. Postel and J.
  5493.  
  5494.  
  5495.  
  5496. Internet Engineering Task Force                                [Page 93]
  5497.  
  5498.  
  5499.  
  5500.  
  5501. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5502.  
  5503.  
  5504.         Reynolds, RFC-858, May 1983.
  5505.  
  5506.    [TELNET:6]  "Telnet Status Option," J. Postel and J. Reynolds, RFC-
  5507.         859, May 1983.
  5508.  
  5509.    [TELNET:7]  "Telnet Timing Mark Option," J. Postel and J. Reynolds,
  5510.         RFC-860, May 1983.
  5511.  
  5512.    [TELNET:8]  "Telnet Extended Options List," J. Postel and J.
  5513.         Reynolds, RFC-861, May 1983.
  5514.  
  5515.    [TELNET:9]  "Telnet End-Of-Record Option," J. Postel, RFC-855,
  5516.         December 1983.
  5517.  
  5518.    [TELNET:10] "Telnet Terminal-Type Option," J. VanBokkelen, RFC-1091,
  5519.         February 1989.
  5520.  
  5521.         This document supercedes RFC-930.
  5522.  
  5523.    [TELNET:11] "Telnet Window Size Option," D. Waitzman, RFC-1073,
  5524.         October 1988.
  5525.  
  5526.    [TELNET:12] "Telnet Linemode Option," D. Borman, RFC-1116, August
  5527.         1989.
  5528.  
  5529.    [TELNET:13] "Telnet Terminal Speed Option," C. Hedrick, RFC-1079,
  5530.         December 1988.
  5531.  
  5532.    [TELNET:14] "Telnet Remote Flow Control Option," C. Hedrick, RFC-
  5533.         1080, November 1988.
  5534.  
  5535.  
  5536.    SECONDARY TELNET REFERENCES:
  5537.  
  5538.  
  5539.    [TELNET:15] "Telnet Protocol," MIL-STD-1782, U.S. Department of
  5540.         Defense, May 1984.
  5541.  
  5542.         This document is intended to describe the same protocol as RFC-
  5543.         854.  In case of conflict, RFC-854 takes precedence, and the
  5544.         present document takes precedence over both.
  5545.  
  5546.    [TELNET:16] "SUPDUP Protocol," M. Crispin, RFC-734, October 1977.
  5547.  
  5548.    [TELNET:17] "Telnet SUPDUP Option," M. Crispin, RFC-736, October
  5549.         1977.
  5550.  
  5551.    [TELNET:18] "Data Entry Terminal Option," J. Day, RFC-732, June 1977.
  5552.  
  5553.  
  5554.  
  5555. Internet Engineering Task Force                                [Page 94]
  5556.  
  5557.  
  5558.  
  5559.  
  5560. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5561.  
  5562.  
  5563.    [TELNET:19] "TELNET Data Entry Terminal option -- DODIIS
  5564.         Implementation," A. Yasuda and T. Thompson, RFC-1043, February
  5565.         1988.
  5566.  
  5567.  
  5568.    FTP REFERENCES:
  5569.  
  5570.  
  5571.    [FTP:1]  "File Transfer Protocol," J. Postel and J. Reynolds, RFC-
  5572.         959, October 1985.
  5573.  
  5574.    [FTP:2]  "Document File Format Standards," J. Postel, RFC-678,
  5575.         December 1974.
  5576.  
  5577.    [FTP:3]  "File Transfer Protocol," MIL-STD-1780, U.S. Department of
  5578.         Defense, May 1984.
  5579.  
  5580.         This document is based on an earlier version of the FTP
  5581.         specification (RFC-765) and is obsolete.
  5582.  
  5583.  
  5584.    TFTP REFERENCES:
  5585.  
  5586.  
  5587.    [TFTP:1]  "The TFTP Protocol Revision 2," K. Sollins, RFC-783, June
  5588.         1981.
  5589.  
  5590.  
  5591.    MAIL REFERENCES:
  5592.  
  5593.  
  5594.    [SMTP:1]  "Simple Mail Transfer Protocol," J. Postel, RFC-821, August
  5595.         1982.
  5596.  
  5597.    [SMTP:2]  "Standard For The Format of ARPA Internet Text Messages,"
  5598.         D. Crocker, RFC-822, August 1982.
  5599.  
  5600.         This document obsoleted an earlier specification, RFC-733.
  5601.  
  5602.    [SMTP:3]  "Mail Routing and the Domain System," C. Partridge, RFC-
  5603.         974, January 1986.
  5604.  
  5605.         This RFC describes the use of MX records, a mandatory extension
  5606.         to the mail delivery process.
  5607.  
  5608.    [SMTP:4]  "Duplicate Messages and SMTP," C. Partridge, RFC-1047,
  5609.         February 1988.
  5610.  
  5611.  
  5612.  
  5613.  
  5614. Internet Engineering Task Force                                [Page 95]
  5615.  
  5616.  
  5617.  
  5618.  
  5619. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5620.  
  5621.  
  5622.    [SMTP:5a]  "Mapping between X.400 and RFC 822," S. Kille, RFC-987,
  5623.         June 1986.
  5624.  
  5625.    [SMTP:5b]  "Addendum to RFC-987," S. Kille, RFC-???, September 1987.
  5626.  
  5627.         The two preceding RFC's define a proposed standard for
  5628.         gatewaying mail between the Internet and the X.400 environments.
  5629.  
  5630.    [SMTP:6]  "Simple Mail Transfer Protocol,"  MIL-STD-1781, U.S.
  5631.         Department of Defense, May 1984.
  5632.  
  5633.         This specification is intended to describe the same protocol as
  5634.         does RFC-821.  However, MIL-STD-1781 is incomplete; in
  5635.         particular, it does not include MX records [SMTP:3].
  5636.  
  5637.    [SMTP:7]  "A Content-Type Field for Internet Messages," M. Sirbu,
  5638.         RFC-1049, March 1988.
  5639.  
  5640.  
  5641.    DOMAIN NAME SYSTEM REFERENCES:
  5642.  
  5643.  
  5644.    [DNS:1]  "Domain Names - Concepts and Facilities," P. Mockapetris,
  5645.         RFC-1034, November 1987.
  5646.  
  5647.         This document and the following one obsolete RFC-882, RFC-883,
  5648.         and RFC-973.
  5649.  
  5650.    [DNS:2]  "Domain Names - Implementation and Specification," RFC-1035,
  5651.         P. Mockapetris, November 1987.
  5652.  
  5653.  
  5654.    [DNS:3]  "Mail Routing and the Domain System," C. Partridge, RFC-974,
  5655.         January 1986.
  5656.  
  5657.  
  5658.    [DNS:4]  "DoD Internet Host Table Specification," K. Harrenstein,
  5659.         RFC-952, M. Stahl, E. Feinler, October 1985.
  5660.  
  5661.         SECONDARY DNS REFERENCES:
  5662.  
  5663.  
  5664.    [DNS:5]  "Hostname Server," K. Harrenstein, M. Stahl, E. Feinler,
  5665.         RFC-953, October 1985.
  5666.  
  5667.    [DNS:6]  "Domain Administrators Guide," M. Stahl, RFC-1032, November
  5668.         1987.
  5669.  
  5670.  
  5671.  
  5672.  
  5673. Internet Engineering Task Force                                [Page 96]
  5674.  
  5675.  
  5676.  
  5677.  
  5678. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5679.  
  5680.  
  5681.    [DNS:7]  "Domain Administrators Operations Guide," M. Lottor, RFC-
  5682.         1033, November 1987.
  5683.  
  5684.    [DNS:8]  "The Domain Name System Handbook," Vol. 4 of Internet
  5685.         Protocol Handbook, NIC 50007, SRI Network Information Center,
  5686.         August 1989.
  5687.  
  5688.  
  5689.    SYSTEM INITIALIZATION REFERENCES:
  5690.  
  5691.  
  5692.    [BOOT:1] "Bootstrap Loading Using TFTP," R. Finlayson, RFC-906, June
  5693.         1984.
  5694.  
  5695.    [BOOT:2] "Bootstrap Protocol (BOOTP)," W. Croft and J. Gilmore, RFC-
  5696.         951, September 1985.
  5697.  
  5698.    [BOOT:3] "BOOTP Vendor Information Extensions," J. Reynolds, RFC-
  5699.         1084, December 1988.
  5700.  
  5701.         Note: this RFC revised and obsoleted RFC-1048.
  5702.  
  5703.    [BOOT:4] "A Reverse Address Resolution Protocol," R. Finlayson, T.
  5704.         Mann, J. Mogul, and M. Theimer, RFC-903, June 1984.
  5705.  
  5706.  
  5707.    MANAGEMENT REFERENCES:
  5708.  
  5709.  
  5710.    [MGT:1]  "IAB Recommendations for the Development of Internet Network
  5711.         Management Standards," V. Cerf, RFC-1052, April 1988.
  5712.  
  5713.    [MGT:2]  "Structure and Identification of Management Information for
  5714.         TCP/IP-based internets," M. Rose and K. McCloghrie, RFC-1065,
  5715.         August 1988.
  5716.  
  5717.    [MGT:3]  "Management Information Base for Network Management of
  5718.         TCP/IP-based internets," M. Rose and K. McCloghrie, RFC-1066,
  5719.         August 1988.
  5720.  
  5721.    [MGT:4]  "A Simple Network Management Protocol," J. Case, M. Fedor,
  5722.         M. Schoffstall, and C. Davin, RFC-1098, April 1989.
  5723.  
  5724.    [MGT:5]  "The Common Management Information Services and Protocol
  5725.         over TCP/IP," U. Warrier and L. Besaw, RFC-1095, April 1989.
  5726.  
  5727.    [MGT:6]  "Report of the Second Ad Hoc Network Management Review
  5728.         Group," V. Cerf, RFC-1109, August 1989.
  5729.  
  5730.  
  5731.  
  5732. Internet Engineering Task Force                                [Page 97]
  5733.  
  5734.  
  5735.  
  5736.  
  5737. RFC1123              SUPPORT SERVICES -- MANAGEMENT         October 1989
  5738.  
  5739.  
  5740. Security Considerations
  5741.  
  5742.    There are many security issues in the application and support
  5743.    programs of host software, but a full discussion is beyond the scope
  5744.    of this RFC.  Security-related issues are mentioned in sections
  5745.    concerning TFTP (Sections 4.2.1, 4.2.3.4, 4.2.3.5), the SMTP VRFY and
  5746.    EXPN commands (Section 5.2.3), the SMTP HELO command (5.2.5), and the
  5747.    SMTP DATA command (Section 5.2.8).
  5748.  
  5749. Author's Address
  5750.  
  5751.    Robert Braden
  5752.    USC/Information Sciences Institute
  5753.    4676 Admiralty Way
  5754.    Marina del Rey, CA 90292-6695
  5755.  
  5756.    Phone: (213) 822 1511
  5757.  
  5758.    EMail: Braden@ISI.EDU
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791. Internet Engineering Task Force                                [Page 98]
  5792.  
  5793.