home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_n_r / draft-rfced-exp-rupp-02.txt < prev    next >
Text File  |  1997-06-10  |  20KB  |  527 lines

  1.  
  2.  
  3. INTERNET-DRAFT                EXPIRES DECEMBER 1997    INTERNET-DRAFT
  4. Network Working Group                                     Heiko W.Rupp
  5. INTERNET-DRAFT
  6. Experimental                                                 8.06.1997
  7.  
  8.  
  9.          A Protocol for the Transmission of Net News Articles
  10.                            over IP multicast.
  11.                    <draft-rfced-exp-rupp-02.txt>
  12.  
  13.  
  14. Status of this Memo
  15.  
  16.    This document is an Internet-Draft.  Internet-Drafts are working
  17.    documents of the Internet Engineering task Force (IETF), its areas,
  18.    and its working groups.  Note that other groups may also distribute
  19.    working documents as Internet-Drafts.
  20.  
  21.    Internet-Drafts are draft documents valid for a maximum of six
  22.    months and may be updated, replaced, or obsoleted by other
  23.    documents at any time.  It is inappropriate to use Internet-Drafts
  24.    as reference material or to cite them other than as "work in
  25.    progress".
  26.  
  27.    To learn the current status of any Internet-Draft, please check the
  28.    "1id-abstract.txt" listing contained in the Internet-Drafts Shadow
  29.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  30.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  31.    ftp.isi.edu (US West Coast).
  32.  
  33. Abstract
  34.  
  35.    This protocol provides a way to use the IP multicast infrastructure
  36.    to transmit NetNews articles between news servers. Doing so will
  37.    reduce the bandwidth that is actually needed for transmission via
  38.    NNTP. This does not affect how news reading clients communicate with
  39.    servers.
  40.  
  41. Overview and Rationale
  42.  
  43.    NetNews are bulk data that are produced in large quantities every day
  44.    around the world. Distribution of NetNews on the Internet are usually
  45.    distributed with NNTP[1]. In order to get a fast and redundant
  46.    distribution many news servers communicate with many others, thus
  47.    imposing a higher load on the underlying network than necessary.
  48.  
  49.    Assume the following scenario:
  50.  
  51.                              +---------  R1
  52.                             /
  53.              S -- A ------- B  --------  R2
  54.                             \
  55.                               +--------- R3
  56.  
  57.    A sender S which wants to transmit articles via NNTP to receivers
  58.    R1...R3 will thus transmit them three times across the link from A to
  59.    B.
  60.  
  61.    With IP Multicast[2], an efficient way to distribute datagrams to
  62.    groups of users exists in the Internet. Thus articles would traverse
  63.    the link A to B only once, thus reducing load on that link.
  64.  
  65.    This cannot be done with existing news transfer technology, as it is
  66.  
  67.  
  68.  
  69. Rupp                                                            [Page 1]
  70.  
  71.  
  72. I/D                 NETNEWS OVER IP MULTICAST             8 June 1997
  73.  
  74.  
  75.    based on TCP[10] which cannot be multicasted.  The protocol described
  76.    in this memo is designed to put news articles into datagrams and
  77.    distribute them via IP multicast to receivers that are interested in
  78.    the specific newsgroup. For more information about NetNews, refer to
  79.    [7] and [1].
  80.  
  81.    In the rest of this memo I will refer to the protocol as ``Multicast
  82.    News Transport Protocol'' (Mcntp).
  83.  
  84. Protocol overview
  85.  
  86.    This paragraph will show how news articles are propagated with Mcntp.
  87.    Basically, three parties are involved:
  88.  
  89.  
  90.    +    Multicast directory service, MD, coordinates the assignment
  91.         between multicast and news groups.
  92.  
  93.    +    A Multicast sender, MS, that sends news articles over an
  94.         IP multicast infrastructure
  95.  
  96.    +    A Multicast receiver, MR, gets packets from the IP multicast
  97.         infrastructure and processes them further.
  98.  
  99.    So this can be seen as follows:
  100.  
  101.                directory       +---------+    directory
  102.              +------------- >  |         | ----------------+
  103.             \|/                |   MD    |                \|/
  104.          +---------+           |         |             +--------+
  105.          |         |           +---------+             |        |
  106.          |   MS    |                                   |   MR   |
  107.          |         | ------------ articles ------->    |        |
  108.          +---------+                                   +--------+
  109.  
  110.    MS and MR can be implemented into existing news server software, or
  111.    can be implemented as separate processes that communicate with the
  112.    news servers (e.g. via NNTP); this does not matter to the protocol.
  113.  
  114.    MD can either be implemented within MS, or as separate processes that
  115.    communicate with each other. A practical way is to have on MD per
  116.    sender host so that communication between MD and MS is fast and
  117.    reliable, while not too many resources are needed.
  118.  
  119.    The protocol itself consist of two parts that will be presented in
  120.    the next two chapters -- Distribution of articles and the directory
  121.    service.
  122.  
  123.  
  124.  
  125.  
  126. Rupp                                                            [Page 2]
  127.  
  128.  
  129. I/D                 NETNEWS OVER IP MULTICAST             8 June 1997
  130.  
  131.  
  132. Packet format -- Distribution of articles
  133.  
  134.    To send articles via IP multicast, they have to be encapsulated into
  135.    UDP packets. The following diagram shows how this can be done:
  136.  
  137.          +---------------------------------------+
  138.          |                 Magic                 |
  139.          +----+----+----+----+---------+---------+
  140.          | Ver|Rev |Comp|Cryp|Reserved |  Offset |
  141.          +----+----+----+----+---------+---------+
  142.          |            Original length            |
  143.          +---------------------------------------+
  144.          |             Length as sent            |
  145.          +---------------------------------------+
  146.          |               Sender-ID               |
  147.          +---------------------------------------+
  148.          |              Message-id               |
  149.          +---------------------------------------+
  150.          |               Data                    |
  151.          +---------------------------------------+
  152.  
  153.    All entries are in network byte order.  The fields have the following
  154.    meaning and types:
  155.  
  156.  
  157.     +    Magic (32-bit): The String ``McNt''
  158.  
  159.     +    Ver (4-bit): Protocol version -- currently 1
  160.  
  161.     +    Rev (4-bit): Protocol revision -- currently 1
  162.  
  163.     +    Comp (4-bit): Compression method used. Currently are only 2
  164.          methods defined:
  165.  
  166.           0    Article is not compressed
  167.  
  168.           1    Article is compressed via zlib [8]
  169.  
  170.     +    Cryp (4-bit): Encryption method used. See below
  171.  
  172.     +    Reserved (8-bit): Reserved for future extensions.
  173.  
  174.     +    Offset (8-bit): Offset of article data from packet start
  175.  
  176.     +    Original length (32-bit): Length of article before compression,
  177.          encryption and signing.
  178.  
  179.     +    Length as sent (including digital signature) (32-bit): Size of
  180.  
  181.  
  182.  
  183. Rupp                                                            [Page 3]
  184.  
  185.  
  186. I/D                  NETNEWS OVER IP MULTICAST             8 June 1997
  187.  
  188.  
  189.          the ``Data'' field (see below)
  190.  
  191.     +    Sender-ID: Identification of the sender host terminated by a
  192.          null byte (see below).
  193.  
  194.     +    Message-ID: The message id of the article in the form it is
  195.          defined in RFC 1036 [7], terminated by a null byte.
  196.  
  197.     +    Data: The signed article data after possible compression and
  198.          encryption.
  199.  
  200.    This memo does not specify a encryption method for the case that the
  201.    field ``Crypt'' is set to anything other than 0; the involved parties
  202.    (i.e. the senders of encrypted news and their receivers) have to
  203.    agree on a method they want to use. If encryption and compression is
  204.    used then the article data is first to be compressed and then the
  205.    result to be encrypted.
  206.  
  207.    All articles must be signed before sending them off the net. This is
  208.    accomplished by running the RIPEMD-160 message digest [11] algorithm
  209.    over the (possibly compressed and encrypted) article and then RSA-
  210.    encrypting the message digest with the private key that is suitable
  211.    for sender-id.  The receiver decrypts the signature of the article
  212.    with the public key of sender-id and runs RIPEMD-160 over the data to
  213.    see if it has been altered on the way. An article with an invalid
  214.    signature or a non matching message digest has to be thrown away. The
  215.    sender-id can be the path entry or the hostname of the sending site;
  216.    there can also be more than one key pair per site e.g. to have dif-
  217.    ferent keys for different newsgroups.  The sender-id has to be
  218.    treated in a case independent manner.
  219.  
  220.    Encryption of the message digest is done the following way. The 20
  221.    Bytes RIPEMD-160 message digest and the first 28 bytes of the
  222.    (possibly compressed and encrypted) message are tacked together to
  223.    form a 48 Bytes buffer. This buffer is then encrypted with the right
  224.    RSA private key and prepended to the original message without the
  225.    first 28 bytes:
  226.  
  227.          +----------------+---------------------------------+
  228.          | Message digest | message                         |
  229.          +----------------+-----------+---------------------+
  230.                            1         28                     n
  231.          |                    \
  232.  
  233.          +-----------------------+----------------------------------+
  234.          | Signature             |  message without first 28 Bytes  |
  235.          +-----------------------+----------------------------------+
  236.  
  237.  
  238.  
  239.  
  240. Rupp                                                            [Page 4]
  241.  
  242.  
  243. I/D                  NETNEWS OVER IP MULTICAST             8 June 1997
  244.  
  245.  
  246.    To send an article off, it is encapsulated and then just sent to the
  247.    appropriate multicast group. There is no feedback from the receiver
  248.    to the sender when an article is received.
  249.  
  250. Directory service
  251.  
  252.    In order to get a relation between newsgroups and multicast groups, a
  253.    directory service exists; this has been referenced as MD above.  When
  254.    a sender MS wants to propagate a news group, it asks the directory
  255.    service for a multicast group it can use to distribute articles,
  256.    waits for the reply, and starts to send. The directory server
  257.    registers this group in its tables and periodically distributes this
  258.    table over IP multicast. For this purpose, the multicast group
  259.    ``mcntp-directory.mcast.net'' has been officially been assigned by
  260.    the IANA. The UDP port which announcements are sent to, has
  261.    officially been assigned by the IANA as UDP port number 5418 with the
  262.    name ``mcntp''.
  263.  
  264.    Announcements should not be sent too often to keep traffic low, but
  265.    often enough that new receivers don't have to wait to long to be able
  266.    to receive articles. Once a minute is assumed to be a good value
  267.    here.  Announcements can be sent less often if they are transmitted
  268.    immediately after a change in the directory.
  269.  
  270.    If more than one directory server is involved (e.g. if there is more
  271.    than one sender site), the directory servers have to listen to
  272.    announcement packets on ``mcntp-directory.mcast.net''. If it does not
  273.    receive a packet after five times the waiting period (e.g., five
  274.    minutes) it can consider itself alone on the net and can choose the
  275.    multicast groups as it wishes. If it does receive a packet, it must
  276.    register the contained groups in its tables and has to select new
  277.    groups so that different newsgroups are not mapped on the same
  278.    multicast group.
  279.  
  280.    When a receiver (MR) wants to receive a newsgroup, it listens on
  281.    ``mcntp-directory.mcast.net'' for announcements, parses them, and
  282.    then joins the appropriate multicast groups.
  283.  
  284.    Multicast groups that are no longer in use (e.g. because the sender
  285.    has stopped working) must be removed from the announcement.
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297. Rupp                                                            [Page 5]
  298.  
  299.  
  300. I/D                NETNEWS OVER IP MULTICAST             8 June 1997
  301.  
  302.  
  303.    The format of those announcement packets is:
  304.  
  305.          +-----------+------+-----+--------+
  306.          |   Magic   | Vers | Rev | Offset |
  307.          +-----------+------+-----+--------+
  308.          |             Length              |
  309.          +---------------------------------+
  310.          |            rmd160               |
  311.          +---------------------------------+------+
  312.          |            Sender-ID            | pad1 |
  313.          +-----------------+------+---+-----------+---+      -+
  314.          | Multicast group | Port |TTL| Newsgroup |pad|       |
  315.          +-----------------+------+---+-----------+---+       |
  316.           ...  repeat ...                                     |  NG lines
  317.          +-----------------+------+---+-----------+---+       |
  318.          | Multicast group | Port |TTL| Newsgroup |pad|       |
  319.          +-----------------+------+---+-----------+---+      -+
  320.  
  321.    All numbers are in network byte order.  The fields have the following
  322.    meaning and types:
  323.  
  324.  
  325.        +    Magic (16-bit): The Bytes 0xabba.
  326.  
  327.        +    Vers (4-bit): Protocol version (see below).
  328.  
  329.        +    Rev (4-bit): Protocol revision (currently 1).
  330.  
  331.        +    Offset (8-bit): Offset of NG-lines from packet start.
  332.  
  333.        +    Length (32-bit): Total packet length.
  334.  
  335.        +    rmd160 (160-bit): RIPEMD-160 message digest over the rest of
  336.             the packet.
  337.  
  338.        +    Sender-ID  : Identification of sender host, terminated by a
  339.             null byte (see below).
  340.  
  341.        +    Pad1: Padding to next 4-Byte boundary filled with null
  342.             bytes.
  343.  
  344.        +    Multicast group (32-bit *): The associated multicast group.
  345.  
  346.        +    Port (16-bit): UDP Port to use for this group.
  347.  
  348.        +    TTL (8-bit): Time to live for multicast packets.
  349.  
  350.        +    Newsgroup: Name of the Newsgroup in wildmat(3) format,
  351.  
  352.  
  353.  
  354. Rupp                                                            [Page 6]
  355.  
  356.  
  357. I/D                  NETNEWS OVER IP MULTICAST             8 June 1997
  358.  
  359.  
  360.             terminated by a null byte.
  361.  
  362.        +    Pad: Padding of the string to the next 4-bytes boundary
  363.             filled with null bytes.
  364.  
  365.    The protocol version (Vers) is currently 1 for IPv4 and 11 for IPv6.
  366.    The multicast group field (*) is 32 bit in size for IPv4 and 128-bit
  367.    for IPv6 in size.
  368.  
  369.    The length field is 32 bit in size to support IPv6 jumbo datagrams.
  370.  
  371.    The sender-ID is normally the fully qualified domain name of the
  372.    hosts that sends the announcement. As is common practice with
  373.    NetNews, this can also be the (possibly shorter) entry that the host
  374.    puts in the ``Path:'' header when an article passes through it. This
  375.    entry has to be treated in a case independent manner.
  376.  
  377.    The rmd160 is computed over the sender-id field and all lines with
  378.    newsgroup to multicast group relations in the packet with the
  379.    RIPEMD-160 message digest algorithm.
  380.  
  381.    The lines with newsgroup to multicast group relations are repeated as
  382.    often as needed to announce all groups. The TTL can be used by
  383.    clients to find out if packets that come from this source can reach
  384.    them, or if the sender is too far away.  Note that all entries have
  385.    to fit into one UDP packet.
  386.  
  387.    The sender-id and the newsgroups entries are padded to the next
  388.    4-bytes boundary in order to make processing easier.
  389.  
  390.    TTL values of articles have to be chosen, especially for use on the
  391.    MBONE, in a way that newsgroups that are only of local relevance
  392.    (e.g. campus groups or groups local to a town) are not distributed
  393.    out of their normal distribution area.
  394.  
  395. Reliability Considerations
  396.  
  397.    As UDP is a unreliable service, provisions for reliable distribution
  398.    of articles are needed. There exist some approaches to reliable
  399.    multicast (XTP [4], KLG [5] RMTP [6] and others) which all suffer
  400.    from some problem or other. Specifically, additional hard- or
  401.    software is needed and usually requires kernel modification.
  402.  
  403.    As there is already a reliable transport of NetNews via NNTP, there
  404.    is no need for a reliable transport via IP multicast: articles need
  405.    not be in order, so it is no problem if one is missing in the
  406.    multicast. Since articles need not arrive in order, lost or missing
  407.    articles can easily be transmitted via an additional NNTP feed.
  408.  
  409.  
  410.  
  411. Rupp                                                            [Page 7]
  412.  
  413.  
  414. I/D                  NETNEWS OVER IP MULTICAST             8 June 1997
  415.  
  416.  
  417.    As UDP packets can be at maximum 64kBytes in size and every Mcntp
  418.    packet has to fit in one UDP packet, there is no provision given to
  419.    distribute news articles larger than about 63kBytes in size (other
  420.    than compressing them). This does not matter much in practise as
  421.    recent research has shown that more than 95% off all news articles
  422.    are smaller 64kBytes [9]. The remaining 5% can still be transferred
  423.    via NNTP. Some hosts may have problems in receiving UDP packets as
  424.    large as 64kBytes, so in practical use article sizes of 16kBytes
  425.    would be appropriate.
  426.  
  427. Summary
  428.  
  429.    The distribution of NetNews articles via IP multicast can be a way to
  430.    decrease the network bandwidth used to distribute them.  Articles are
  431.    delivered fast via a nonreliable protocol; later, the holes are
  432.    filled via a reliable, already existing protocol. Compression of
  433.    articles can further reduce the network Load. With encryption private
  434.    news groups can be established on a public IP multicast
  435.    infrastructure. A prototype of a reference implementation already
  436.    shows that Mcntp is fast and can be used as an alternative to
  437.    classical transports.
  438.  
  439. Security Considerations
  440.  
  441.    With the classical NNTP based distribution, every host on the path of
  442.    an article keeps track of it in the logfiles, making it possible to
  443.    find the sender of forged or abusive articles with the aid of the
  444.    administrators of the newshosts along the path.  For the distribution
  445.    of NetNews over IP multicast, this is no longer true: routers don't
  446.    log packets flowing by and as the sender address of IP packets can be
  447.    forged, a sender can't be traced. This fact can be used to inject
  448.    forged news articles without being traceable.
  449.  
  450.    To prevent the unnoticed injection of articles, a mcntp receiver only
  451.    accepts articles from senders that it trusts. This trust is build by
  452.    digitally signing the article with the private key of the sender and
  453.    verifying the signature at the receiver site.  Receivers have to
  454.    accept only articles with good signatures
  455.  
  456.    The RIPEMD-160 message digest algorithm has been chosen, as it is
  457.    more secure than MD5 while still being fast enough. The RSA
  458.    encryption algorithm has been chosen as there exist reference
  459.    implementations for usage inside US (from RSA Inc.) and outside
  460.    (rsaeuro by J.S.A.Kapp).
  461.  
  462.    The key size for the RSA algorithm must be at least 512 bit in size
  463.    to prevent cracking of the key.
  464.  
  465.  
  466.  
  467.  
  468. Rupp                                                            [Page 8]
  469.  
  470.  
  471. I/D                  NETNEWS OVER IP MULTICAST             8 June 1997
  472.  
  473.  
  474. References
  475.  
  476.  
  477. [1]  RFC 977 -- B. Kantor, P. Lapsley, "Network News Transfer Protocol:
  478.      A Proposed Standard for the Stream-Based Transmission of News".
  479.  
  480. [2]  RFC 1112 -- S. Deering, "Host extensions for IP multicasting",
  481.      08/01/1989.
  482.  
  483. [3]  RFC 768 -- J. Postel, "User Datagram Protocol", 08/28/1980.
  484.  
  485. [4]  XTP -- W. T. Strayer, D.J. Dmepsey, B.C. Weaver, "XTP: The Xpress
  486.      Transfer Protocol", Addison-Wesley
  487.  
  488. [5]  KLG -- M. Hofmann, "Zuverlaessige Kommunikation in heterogenen
  489.      Netzen", Thesis at "Institut fuer Telematik, CS Dept. Univ
  490.      Karlsruhe"
  491.  
  492. [6]  RMTP -- Lin, John C., Paul Sanjoy, "RMTP: A Reliable Multicast
  493.      Transport Protocol".
  494.  
  495. [7]  RFC 1036 -- M. Horton, R. Adams, "Standard for interchange of
  496.      USENET messages", 12/01/1987.
  497.  
  498. [8]  RFC 1950 -- L. Deutsch, J. Gailly, "ZLIB Compressed Data Format
  499.      Specification version 3.3", 05/23/1996.
  500.  
  501. [9]  http://www.xlink.net/~hwr/histo/ -- Some Statistics about size dis-
  502.      tribution of NetNews
  503.  
  504. [10] RFC 793 -- J. Postel, "Transmission Control Protocol", 09/01/1981.
  505.  
  506. [11] H. Dobbertin, A. Bosselaers, B. Preneel, "RIPEMD-160: A
  507.      Strengthened Version of RIPEMD" 04/18/1996. An earlier version
  508.      appeared in "Fast Software Encryption,LNCS 1039" Springer Verlag,
  509.      1996, pp. 71-82.
  510.  
  511. Author's Address
  512.  
  513.    Heiko W.Rupp
  514.    Gerwigstr. 5
  515.    D-76131 Karlsruhe
  516.  
  517.    Phone: +49 721 9661524
  518.  
  519.    EMail: hwr@pilhuhn.de
  520.  
  521.  
  522.  
  523.  
  524.  
  525. Rupp                                                            [Page 9]
  526. INTERNET-DRAFT           EXPIRES DECEMBER 1997            INTERNET-DRAFT
  527.