home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc1112 < prev    next >
Text File  |  1991-04-21  |  39KB  |  955 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                        S. Deering
  8. Request for Comments: 1112                          Stanford University
  9. Obsoletes: RFCs 988, 1054                                   August 1989
  10.  
  11.  
  12.                   Host Extensions for IP Multicasting
  13.  
  14. 1. STATUS OF THIS MEMO
  15.  
  16.    This memo specifies the extensions required of a host implementation
  17.    of the Internet Protocol (IP) to support multicasting.  It is the
  18.    recommended standard for IP multicasting in the Internet.
  19.    Distribution of this memo is unlimited.
  20.  
  21. 2. INTRODUCTION
  22.  
  23.    IP multicasting is the transmission of an IP datagram to a "host
  24.    group", a set of zero or more hosts identified by a single IP
  25.    destination address.  A multicast datagram is delivered to all
  26.    members of its destination host group with the same "best-efforts"
  27.    reliability as regular unicast IP datagrams, i.e., the datagram is
  28.    not guaranteed to arrive intact at all members of the destination
  29.    group or in the same order relative to other datagrams.
  30.  
  31.    The membership of a host group is dynamic; that is, hosts may join
  32.    and leave groups at any time.  There is no restriction on the
  33.    location or number of members in a host group.  A host may be a
  34.    member of more than one group at a time.  A host need not be a member
  35.    of a group to send datagrams to it.
  36.  
  37.    A host group may be permanent or transient.  A permanent group has a
  38.    well-known, administratively assigned IP address.  It is the address,
  39.    not the membership of the group, that is permanent; at any time a
  40.    permanent group may have any number of members, even zero.  Those IP
  41.    multicast addresses that are not reserved for permanent groups are
  42.    available for dynamic assignment to transient groups which exist only
  43.    as long as they have members.
  44.  
  45.    Internetwork forwarding of IP multicast datagrams is handled by
  46.    "multicast routers" which may be co-resident with, or separate from,
  47.    internet gateways.  A host transmits an IP multicast datagram as a
  48.    local network multicast which reaches all immediately-neighboring
  49.    members of the destination host group.  If the datagram has an IP
  50.    time-to-live greater than 1, the multicast router(s) attached to the
  51.    local network take responsibility for forwarding it towards all other
  52.    networks that have members of the destination group.  On those other
  53.    member networks that are reachable within the IP time-to-live, an
  54.    attached multicast router completes delivery by transmitting the
  55.  
  56.  
  57.  
  58. Deering                                                         [Page 1]
  59.  
  60. RFC 1112          Host Extensions for IP Multicasting        August 1989
  61.  
  62.  
  63.    datagram as a local multicast.
  64.  
  65.    This memo specifies the extensions required of a host IP
  66.    implementation to support IP multicasting, where a "host" is any
  67.    internet host or gateway other than those acting as multicast
  68.    routers.  The algorithms and protocols used within and between
  69.    multicast routers are transparent to hosts and will be specified in
  70.    separate documents.  This memo also does not specify how local
  71.    network multicasting is accomplished for all types of network,
  72.    although it does specify the required service interface to an
  73.    arbitrary local network and gives an Ethernet specification as an
  74.    example.  Specifications for other types of network will be the
  75.    subject of future memos.
  76.  
  77. 3. LEVELS OF CONFORMANCE
  78.  
  79.    There are three levels of conformance to this specification:
  80.  
  81.       Level 0: no support for IP multicasting.
  82.  
  83.    There is, at this time, no requirement that all IP implementations
  84.    support IP multicasting.  Level 0 hosts will, in general, be
  85.    unaffected by multicast activity.  The only exception arises on some
  86.    types of local network, where the presence of level 1 or 2 hosts may
  87.    cause misdelivery of multicast IP datagrams to level 0 hosts.  Such
  88.    datagrams can easily be identified by the presence of a class D IP
  89.    address in their destination address field; they should be quietly
  90.    discarded by hosts that do not support IP multicasting.  Class D
  91.    addresses are described in section 4 of this memo.
  92.  
  93.       Level 1: support for sending but not receiving multicast IP
  94.       datagrams.
  95.  
  96.    Level 1 allows a host to partake of some multicast-based services,
  97.    such as resource location or status reporting, but it does not allow
  98.    a host to join any host groups.  An IP implementation may be upgraded
  99.    from level 0 to level 1 very easily and with little new code.  Only
  100.    sections 4, 5, and 6 of this memo are applicable to level 1
  101.    implementations.
  102.  
  103.       Level 2: full support for IP multicasting.
  104.  
  105.    Level 2 allows a host to join and leave host groups, as well as send
  106.    IP datagrams to host groups.  It requires implementation of the
  107.    Internet Group Management Protocol (IGMP) and extension of the IP and
  108.    local network service interfaces within the host.  All of the
  109.    following sections of this memo are applicable to level 2
  110.    implementations.
  111.  
  112.  
  113.  
  114. Deering                                                         [Page 2]
  115.  
  116. RFC 1112          Host Extensions for IP Multicasting        August 1989
  117.  
  118.  
  119. 4. HOST GROUP ADDRESSES
  120.  
  121.    Host groups are identified by class D IP addresses, i.e., those with
  122.    "1110" as their high-order four bits.  Class E IP addresses, i.e.,
  123.    those with "1111" as their high-order four bits, are reserved for
  124.    future addressing modes.
  125.  
  126.    In Internet standard "dotted decimal" notation, host group addresses
  127.    range from 224.0.0.0 to 239.255.255.255.  The address 224.0.0.0 is
  128.    guaranteed not to be assigned to any group, and 224.0.0.1 is assigned
  129.    to the permanent group of all IP hosts (including gateways).  This is
  130.    used to address all multicast hosts on the directly connected
  131.    network.  There is no multicast address (or any other IP address) for
  132.    all hosts on the total Internet.  The addresses of other well-known,
  133.    permanent groups are to be published in "Assigned Numbers".
  134.  
  135.    Appendix II contains some background discussion of several issues
  136.    related to host group addresses.
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Deering                                                         [Page 3]
  171.  
  172. RFC 1112          Host Extensions for IP Multicasting        August 1989
  173.  
  174.  
  175. 5. MODEL OF A HOST IP IMPLEMENTATION
  176.  
  177.    The multicast extensions to a host IP implementation are specified in
  178.    terms of the layered model illustrated below.  In this model, ICMP
  179.    and (for level 2 hosts) IGMP are considered to be implemented within
  180.    the IP module, and the mapping of IP addresses to local network
  181.    addresses is considered to be the responsibility of local network
  182.    modules.  This model is for expository purposes only, and should not
  183.    be construed as constraining an actual implementation.
  184.  
  185.          |                                                          |
  186.          |              Upper-Layer Protocol Modules                |
  187.          |__________________________________________________________|
  188.  
  189.       --------------------- IP Service Interface -----------------------
  190.           __________________________________________________________
  191.          |                            |              |              |
  192.          |                            |     ICMP     |     IGMP     |
  193.          |             IP             |______________|______________|
  194.          |           Module                                         |
  195.          |                                                          |
  196.          |__________________________________________________________|
  197.  
  198.       ---------------- Local Network Service Interface -----------------
  199.           __________________________________________________________
  200.          |                            |                             |
  201.          |           Local            | IP-to-local address mapping |
  202.          |          Network           |         (e.g., ARP)         |
  203.          |          Modules           |_____________________________|
  204.          |      (e.g., Ethernet)                                    |
  205.          |                                                          |
  206.  
  207.    To provide level 1 multicasting, a host IP implementation must
  208.    support the transmission of multicast IP datagrams.  To provide level
  209.    2 multicasting, a host must also support the reception of multicast
  210.    IP datagrams.  Each of these two new services is described in a
  211.    separate section, below.  For each service, extensions are specified
  212.    for the IP service interface, the IP module, the local network
  213.    service interface, and an Ethernet local network module.  Extensions
  214.    to local network modules other than Ethernet are mentioned briefly,
  215.    but are not specified in detail.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Deering                                                         [Page 4]
  227.  
  228. RFC 1112          Host Extensions for IP Multicasting        August 1989
  229.  
  230.  
  231. 6. SENDING MULTICAST IP DATAGRAMS
  232.  
  233. 6.1. Extensions to the IP Service Interface
  234.  
  235.    Multicast IP datagrams are sent using the same "Send IP" operation
  236.    used to send unicast IP datagrams; an upper-layer protocol module
  237.    merely specifies an IP host group address, rather than an individual
  238.    IP address, as the destination.  However, a number of extensions may
  239.    be necessary or desirable.
  240.  
  241.    First, the service interface should provide a way for the upper-layer
  242.    protocol to specify the IP time-to-live of an outgoing multicast
  243.    datagram, if such a capability does not already exist.  If the
  244.    upper-layer protocol chooses not to specify a time-to-live, it should
  245.    default to 1 for all multicast IP datagrams, so that an explicit
  246.    choice is required to multicast beyond a single network.
  247.  
  248.    Second, for hosts that may be attached to more than one network, the
  249.    service interface should provide a way for the upper-layer protocol
  250.    to identify which network interface is be used for the multicast
  251.    transmission.  Only one interface is used for the initial
  252.    transmission; multicast routers are responsible for forwarding to any
  253.    other networks, if necessary.  If the upper-layer protocol chooses
  254.    not to identify an outgoing interface, a default interface should be
  255.    used, preferably under the control of system management.
  256.  
  257.    Third (level 2 implementations only), for the case in which the host
  258.    is itself a member of a group to which a datagram is being sent, the
  259.    service interface should provide a way for the upper-layer protocol
  260.    to inhibit local delivery of the datagram; by default, a copy of the
  261.    datagram is looped back.  This is a performance optimization for
  262.    upper-layer protocols that restrict the membership of a group to one
  263.    process per host (such as a routing protocol), or that handle
  264.    loopback of group communication at a higher layer (such as a
  265.    multicast transport protocol).
  266.  
  267. 6.2. Extensions to the IP Module
  268.  
  269.    To support the sending of multicast IP datagrams, the IP module must
  270.    be extended to recognize IP host group addresses when routing
  271.    outgoing datagrams.  Most IP implementations include the following
  272.    logic:
  273.  
  274.         if IP-destination is on the same local network,
  275.            send datagram locally to IP-destination
  276.         else
  277.            send datagram locally to GatewayTo( IP-destination )
  278.  
  279.  
  280.  
  281.  
  282. Deering                                                         [Page 5]
  283.  
  284. RFC 1112          Host Extensions for IP Multicasting        August 1989
  285.  
  286.  
  287.    To allow multicast transmissions, the routing logic must be changed
  288.    to:
  289.  
  290.         if IP-destination is on the same local network
  291.         or IP-destination is a host group,
  292.            send datagram locally to IP-destination
  293.         else
  294.            send datagram locally to GatewayTo( IP-destination )
  295.  
  296.  
  297.    If the sending host is itself a member of the destination group on
  298.    the outgoing interface, a copy of the outgoing datagram must be
  299.    looped-back for local delivery, unless inhibited by the sender.
  300.    (Level 2 implementations only.)
  301.  
  302.    The IP source address of the outgoing datagram must be one of the
  303.    individual addresses corresponding to the outgoing interface.
  304.  
  305.    A host group address must never be placed in the source address field
  306.    or anywhere in a source route or record route option of an outgoing
  307.    IP datagram.
  308.  
  309. 6.3. Extensions to the Local Network Service Interface
  310.  
  311.    No change to the local network service interface is required to
  312.    support the sending of multicast IP datagrams.  The IP module merely
  313.    specifies an IP host group destination, rather than an individual IP
  314.    destination, when it invokes the existing "Send Local" operation.
  315.  
  316. 6.4. Extensions to an Ethernet Local Network Module
  317.  
  318.    The Ethernet directly supports the sending of local multicast packets
  319.    by allowing multicast addresses in the destination field of Ethernet
  320.    packets.  All that is needed to support the sending of multicast IP
  321.    datagrams is a procedure for mapping IP host group addresses to
  322.    Ethernet multicast addresses.
  323.  
  324.    An IP host group address is mapped to an Ethernet multicast address
  325.    by placing the low-order 23-bits of the IP address into the low-order
  326.    23 bits of the Ethernet multicast address 01-00-5E-00-00-00 (hex).
  327.    Because there are 28 significant bits in an IP host group address,
  328.    more than one host group address may map to the same Ethernet
  329.    multicast address.
  330.  
  331. 6.5. Extensions to Local Network Modules other than Ethernet
  332.  
  333.    Other networks that directly support multicasting, such as rings or
  334.    buses conforming to the IEEE 802.2 standard, may be handled the same
  335.  
  336.  
  337.  
  338. Deering                                                         [Page 6]
  339.  
  340. RFC 1112          Host Extensions for IP Multicasting        August 1989
  341.  
  342.  
  343.    way as Ethernet for the purpose of sending multicast IP datagrams.
  344.    For a network that supports broadcast but not multicast, such as the
  345.    Experimental Ethernet, all IP host group addresses may be mapped to a
  346.    single local broadcast address (at the cost of increased overhead on
  347.    all local hosts).  For a point-to-point link joining two hosts (or a
  348.    host and a multicast router), multicasts should be transmitted
  349.    exactly like unicasts.  For a store-and-forward network like the
  350.    ARPANET or a public X.25 network, all IP host group addresses might
  351.    be mapped to the well-known local address of an IP multicast router;
  352.    a router on such a network would take responsibility for completing
  353.    multicast delivery within the network as well as among networks.
  354.  
  355. 7. RECEIVING MULTICAST IP DATAGRAMS
  356.  
  357. 7.1. Extensions to the IP Service Interface
  358.  
  359.    Incoming multicast IP datagrams are received by upper-layer protocol
  360.    modules using the same "Receive IP" operation as normal, unicast
  361.    datagrams.  Selection of a destination upper-layer protocol is based
  362.    on the protocol field in the IP header, regardless of the destination
  363.    IP address.  However, before any datagrams destined to a particular
  364.    group can be received, an upper-layer protocol must ask the IP module
  365.    to join that group.  Thus, the IP service interface must be extended
  366.    to provide two new operations:
  367.  
  368.                  JoinHostGroup  ( group-address, interface )
  369.  
  370.                  LeaveHostGroup ( group-address, interface )
  371.  
  372.    The JoinHostGroup operation requests that this host become a member
  373.    of the host group identified by "group-address" on the given network
  374.    interface.  The LeaveGroup operation requests that this host give up
  375.    its membership in the host group identified by "group-address" on the
  376.    given network interface.  The interface argument may be omitted on
  377.    hosts that support only one interface.  For hosts that may be
  378.    attached to more than one network, the upper-layer protocol may
  379.    choose to leave the interface unspecified, in which case the request
  380.    will apply to the default interface for sending multicast datagrams
  381.    (see section 6.1).
  382.  
  383.    It is permissible to join the same group on more than one interface,
  384.    in which case duplicate multicast datagrams may be received.  It is
  385.    also permissible for more than one upper-layer protocol to request
  386.    membership in the same group.
  387.  
  388.    Both operations should return immediately (i.e., they are non-
  389.    blocking operations), indicating success or failure.  Either
  390.    operation may fail due to an invalid group address or interface
  391.  
  392.  
  393.  
  394. Deering                                                         [Page 7]
  395.  
  396. RFC 1112          Host Extensions for IP Multicasting        August 1989
  397.  
  398.  
  399.    identifier.  JoinHostGroup may fail due to lack of local resources.
  400.    LeaveHostGroup may fail because the host does not belong to the given
  401.    group on the given interface.  LeaveHostGroup may succeed, but the
  402.    membership persist, if more than one upper-layer protocol has
  403.    requested membership in the same group.
  404.  
  405. 7.2. Extensions to the IP Module
  406.  
  407.    To support the reception of multicast IP datagrams, the IP module
  408.    must be extended to maintain a list of host group memberships
  409.    associated with each network interface.  An incoming datagram
  410.    destined to one of those groups is processed exactly the same way as
  411.    datagrams destined to one of the host's individual addresses.
  412.  
  413.    Incoming datagrams destined to groups to which the host does not
  414.    belong are discarded without generating any error report or log
  415.    entry.  On hosts with more than one network interface, if a datagram
  416.    arrives via one interface, destined for a group to which the host
  417.    belongs only on a different interface, the datagram is quietly
  418.    discarded.  (These cases should occur only as a result of inadequate
  419.    multicast address filtering in a local network module.)
  420.  
  421.    An incoming datagram is not rejected for having an IP time-to-live of
  422.    1 (i.e., the time-to-live should not automatically be decremented on
  423.    arriving datagrams that are not being forwarded).  An incoming
  424.    datagram with an IP host group address in its source address field is
  425.    quietly discarded.  An ICMP error message (Destination Unreachable,
  426.    Time Exceeded, Parameter Problem, Source Quench, or Redirect) is
  427.    never generated in response to a datagram destined to an IP host
  428.    group.
  429.  
  430.    The list of host group memberships is updated in response to
  431.    JoinHostGroup and LeaveHostGroup requests from upper-layer protocols.
  432.    Each membership should have an associated reference count or similar
  433.    mechanism to handle multiple requests to join and leave the same
  434.    group.  On the first request to join and the last request to leave a
  435.    group on a given interface, the local network module for that
  436.    interface is notified, so that it may update its multicast reception
  437.    filter (see section 7.3).
  438.  
  439.    The IP module must also be extended to implement the IGMP protocol,
  440.    specified in Appendix I. IGMP is used to keep neighboring multicast
  441.    routers informed of the host group memberships present on a
  442.    particular local network.  To support IGMP, every level 2 host must
  443.    join the "all-hosts" group (address 224.0.0.1) on each network
  444.    interface at initialization time and must remain a member for as long
  445.    as the host is active.
  446.  
  447.  
  448.  
  449.  
  450. Deering                                                         [Page 8]
  451.  
  452. RFC 1112          Host Extensions for IP Multicasting        August 1989
  453.  
  454.  
  455.    (Datagrams addressed to the all-hosts group are recognized as a
  456.    special case by the multicast routers and are never forwarded beyond
  457.    a single network, regardless of their time-to-live.  Thus, the all-
  458.    hosts address may not be used as an internet-wide broadcast address.
  459.    For the purpose of IGMP, membership in the all-hosts group is really
  460.    necessary only while the host belongs to at least one other group.
  461.    However, it is specified that the host shall remain a member of the
  462.    all-hosts group at all times because (1) it is simpler, (2) the
  463.    frequency of reception of unnecessary IGMP queries should be low
  464.    enough that overhead is negligible, and (3) the all-hosts address may
  465.    serve other routing-oriented purposes, such as advertising the
  466.    presence of gateways or resolving local addresses.)
  467.  
  468. 7.3. Extensions to the Local Network Service Interface
  469.  
  470.    Incoming local network multicast packets are delivered to the IP
  471.    module using the same "Receive Local" operation as local network
  472.    unicast packets.  To allow the IP module to tell the local network
  473.    module which multicast packets to accept, the local network service
  474.    interface is extended to provide two new operations:
  475.  
  476.                       JoinLocalGroup  ( group-address )
  477.  
  478.                       LeaveLocalGroup ( group-address )
  479.  
  480.    where "group-address" is an IP host group address.  The
  481.    JoinLocalGroup operation requests the local network module to accept
  482.    and deliver up subsequently arriving packets destined to the given IP
  483.    host group address.  The LeaveLocalGroup operation requests the local
  484.    network module to stop delivering up packets destined to the given IP
  485.    host group address.  The local network module is expected to map the
  486.    IP host group addresses to local network addresses as required to
  487.    update its multicast reception filter.  Any local network module is
  488.    free to ignore LeaveLocalGroup requests, and may deliver up packets
  489.    destined to more addresses than just those specified in
  490.    JoinLocalGroup requests, if it is unable to filter incoming packets
  491.    adequately.
  492.  
  493.    The local network module must not deliver up any multicast packets
  494.    that were transmitted from that module; loopback of multicasts is
  495.    handled at the IP layer or higher.
  496.  
  497. 7.4. Extensions to an Ethernet Local Network Module
  498.  
  499.    To support the reception of multicast IP datagrams, an Ethernet
  500.    module must be able to receive packets addressed to the Ethernet
  501.    multicast addresses that correspond to the host's IP host group
  502.    addresses.  It is highly desirable to take advantage of any address
  503.  
  504.  
  505.  
  506. Deering                                                         [Page 9]
  507.  
  508. RFC 1112          Host Extensions for IP Multicasting        August 1989
  509.  
  510.  
  511.    filtering capabilities that the Ethernet hardware interface may have,
  512.    so that the host receives only those packets that are destined to it.
  513.  
  514.    Unfortunately, many current Ethernet interfaces have a small limit on
  515.    the number of addresses that the hardware can be configured to
  516.    recognize.  Nevertheless, an implementation must be capable of
  517.    listening on an arbitrary number of Ethernet multicast addresses,
  518.    which may mean "opening up" the address filter to accept all
  519.    multicast packets during those periods when the number of addresses
  520.    exceeds the limit of the filter.
  521.  
  522.    For interfaces with inadequate hardware address filtering, it may be
  523.    desirable (for performance reasons) to perform Ethernet address
  524.    filtering within the software of the Ethernet module.  This is not
  525.    mandatory, however, because the IP module performs its own filtering
  526.    based on IP destination addresses.
  527.  
  528. 7.5. Extensions to Local Network Modules other than Ethernet
  529.  
  530.    Other multicast networks, such as IEEE 802.2 networks, can be handled
  531.    the same way as Ethernet for the purpose of receiving multicast IP
  532.    datagrams.  For pure broadcast networks, such as the Experimental
  533.    Ethernet, all incoming broadcast packets can be accepted and passed
  534.    to the IP module for IP-level filtering.  On point-to-point or
  535.    store-and-forward networks, multicast IP datagrams will arrive as
  536.    local network unicasts, so no change to the local network module
  537.    should be necessary.
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Deering                                                        [Page 10]
  563.  
  564. RFC 1112          Host Extensions for IP Multicasting        August 1989
  565.  
  566.  
  567. APPENDIX I. INTERNET GROUP MANAGEMENT PROTOCOL (IGMP)
  568.  
  569.    The Internet Group Management Protocol (IGMP) is used by IP hosts to
  570.    report their host group memberships to any immediately-neighboring
  571.    multicast routers.  IGMP is an asymmetric protocol and is specified
  572.    here from the point of view of a host, rather than a multicast
  573.    router.  (IGMP may also be used, symmetrically or asymmetrically,
  574.    between multicast routers.  Such use is not specified here.)
  575.  
  576.    Like ICMP, IGMP is a integral part of IP.  It is required to be
  577.    implemented by all hosts conforming to level 2 of the IP multicasting
  578.    specification.  IGMP messages are encapsulated in IP datagrams, with
  579.    an IP protocol number of 2.  All IGMP messages of concern to hosts
  580.    have the following format:
  581.  
  582.        0                   1                   2                   3
  583.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  584.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  585.       |Version| Type  |    Unused     |           Checksum            |
  586.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  587.       |                         Group Address                         |
  588.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  589.  
  590.       Version
  591.  
  592.          This memo specifies version 1 of IGMP.  Version 0 is specified
  593.          in RFC-988 and is now obsolete.
  594.  
  595.       Type
  596.  
  597.          There are two types of IGMP message of concern to hosts:
  598.  
  599.             1 = Host Membership Query
  600.             2 = Host Membership Report
  601.  
  602.       Unused
  603.  
  604.          Unused field, zeroed when sent, ignored when received.
  605.  
  606.       Checksum
  607.  
  608.          The checksum is the 16-bit one's complement of the one's
  609.          complement sum of the 8-octet IGMP message.  For computing
  610.          the checksum, the checksum field is zeroed.
  611.  
  612.       Group Address
  613.  
  614.          In a Host Membership Query message, the group address field
  615.  
  616.  
  617.  
  618. Deering                                                        [Page 11]
  619.  
  620. RFC 1112          Host Extensions for IP Multicasting        August 1989
  621.  
  622.  
  623.          is zeroed when sent, ignored when received.
  624.  
  625.          In a Host Membership Report message, the group address field
  626.          holds the IP host group address of the group being reported.
  627.  
  628. Informal Protocol Description
  629.  
  630.    Multicast routers send Host Membership Query messages (hereinafter
  631.    called Queries) to discover which host groups have members on their
  632.    attached local networks.  Queries are addressed to the all-hosts
  633.    group (address 224.0.0.1), and carry an IP time-to-live of 1.
  634.  
  635.    Hosts respond to a Query by generating Host Membership Reports
  636.    (hereinafter called Reports), reporting each host group to which they
  637.    belong on the network interface from which the Query was received.
  638.    In order to avoid an "implosion" of concurrent Reports and to reduce
  639.    the total number of Reports transmitted, two techniques are used:
  640.  
  641.       1. When a host receives a Query, rather than sending Reports
  642.          immediately, it starts a report delay timer for each of its
  643.          group memberships on the network interface of the incoming
  644.          Query.  Each timer is set to a different, randomly-chosen
  645.          value between zero and D seconds.  When a timer expires, a
  646.          Report is generated for the corresponding host group.  Thus,
  647.          Reports are spread out over a D second interval instead of
  648.          all occurring at once.
  649.  
  650.       2. A Report is sent with an IP destination address equal to the
  651.          host group address being reported, and with an IP
  652.          time-to-live of 1, so that other members of the same group on
  653.          the same network can overhear the Report.  If a host hears a
  654.          Report for a group to which it belongs on that network, the
  655.          host stops its own timer for that group and does not generate
  656.          a Report for that group.  Thus, in the normal case, only one
  657.          Report will be generated for each group present on the
  658.          network, by the member host whose delay timer expires first.
  659.          Note that the multicast routers receive all IP multicast
  660.          datagrams, and therefore need not be addressed explicitly.
  661.          Further note that the routers need not know which hosts
  662.          belong to a group, only that at least one host belongs to a
  663.          group on a particular network.
  664.  
  665.    There are two exceptions to the behavior described above.  First, if
  666.    a report delay timer is already running for a group membership when a
  667.    Query is received, that timer is not reset to a new random value, but
  668.    rather allowed to continue running with its current value.  Second, a
  669.    report delay timer is never set for a host's membership in the all-
  670.    hosts group (224.0.0.1), and that membership is never reported.
  671.  
  672.  
  673.  
  674. Deering                                                        [Page 12]
  675.  
  676. RFC 1112          Host Extensions for IP Multicasting        August 1989
  677.  
  678.  
  679.    If a host uses a pseudo-random number generator to compute the
  680.    reporting delays, one of the host's own individual IP address should
  681.    be used as part of the seed for the generator, to reduce the chance
  682.    of multiple hosts generating the same sequence of delays.
  683.  
  684.    A host should confirm that a received Report has the same IP host
  685.    group address in its IP destination field and its IGMP group address
  686.    field, to ensure that the host's own Report is not cancelled by an
  687.    erroneous received Report.  A host should quietly discard any IGMP
  688.    message of type other than Host Membership Query or Host Membership
  689.    Report.
  690.  
  691.    Multicast routers send Queries periodically to refresh their
  692.    knowledge of memberships present on a particular network.  If no
  693.    Reports are received for a particular group after some number of
  694.    Queries, the routers assume that that group has no local members and
  695.    that they need not forward remotely-originated multicasts for that
  696.    group onto the local network.  Queries are normally sent infrequently
  697.    (no more than once a minute) so as to keep the IGMP overhead on hosts
  698.    and networks very low.  However, when a multicast router starts up,
  699.    it may issue several closely-spaced Queries in order to build up its
  700.    knowledge of local memberships quickly.
  701.  
  702.    When a host joins a new group, it should immediately transmit a
  703.    Report for that group, rather than waiting for a Query, in case it is
  704.    the first member of that group on the network.  To cover the
  705.    possibility of the initial Report being lost or damaged, it is
  706.    recommended that it be repeated once or twice after short delays.  (A
  707.    simple way to accomplish this is to act as if a Query had been
  708.    received for that group only, setting the group's random report delay
  709.    timer.  The state transition diagram below illustrates this
  710.    approach.)
  711.  
  712.    Note that, on a network with no multicast routers present, the only
  713.    IGMP traffic is the one or more Reports sent whenever a host joins a
  714.    new group.
  715.  
  716. State Transition Diagram
  717.  
  718.    IGMP behavior is more formally specified by the state transition
  719.    diagram below.  A host may be in one of three possible states, with
  720.    respect to any single IP host group on any single network interface:
  721.  
  722.       - Non-Member state, when the host does not belong to the group
  723.         on the interface.  This is the initial state for all
  724.         memberships on all network interfaces; it requires no storage
  725.         in the host.
  726.  
  727.  
  728.  
  729.  
  730. Deering                                                        [Page 13]
  731.  
  732. RFC 1112          Host Extensions for IP Multicasting        August 1989
  733.  
  734.  
  735.       - Delaying Member state, when the host belongs to the group on
  736.         the interface and has a report delay timer running for that
  737.         membership.
  738.  
  739.       - Idle Member state, when the host belongs to the group on the
  740.         interface and does not have a report delay timer running for
  741.         that membership.
  742.  
  743.    There are five significant events that can cause IGMP state
  744.    transitions:
  745.  
  746.       - "join group" occurs when the host decides to join the group on
  747.         the interface.  It may occur only in the Non-Member state.
  748.  
  749.       - "leave group" occurs when the host decides to leave the group
  750.         on the interface.  It may occur only in the Delaying Member
  751.         and Idle Member states.
  752.  
  753.       - "query received" occurs when the host receives a valid IGMP
  754.         Host Membership Query message.  To be valid, the Query message
  755.         must be at least 8 octets long, have a correct IGMP
  756.         checksum and have an IP destination address of 224.0.0.1.
  757.         A single Query applies to all memberships on the
  758.         interface from which the Query is received.  It is ignored for
  759.         memberships in the Non-Member or Delaying Member state.
  760.  
  761.       - "report received" occurs when the host receives a valid IGMP
  762.         Host Membership Report message.  To be valid, the Report
  763.         message must be at least 8 octets long, have a correct IGMP
  764.         checksum, and contain the same IP host group address in its IP
  765.         destination field and its IGMP group address field.  A Report
  766.         applies only to the membership in the group identified by the
  767.         Report, on the interface from which the Report is received.
  768.         It is ignored for memberships in the Non-Member or Idle Member
  769.         state.
  770.  
  771.       - "timer expired" occurs when the report delay timer for the
  772.         group on the interface expires.  It may occur only in the
  773.         Delaying Member state.
  774.  
  775.    All other events, such as receiving invalid IGMP messages, or IGMP
  776.    messages other than Query or Report, are ignored in all states.
  777.  
  778.    There are three possible actions that may be taken in response to the
  779.    above events:
  780.  
  781.       - "send report" for the group on the interface.
  782.  
  783.  
  784.  
  785.  
  786. Deering                                                        [Page 14]
  787.  
  788. RFC 1112          Host Extensions for IP Multicasting        August 1989
  789.  
  790.  
  791.       - "start timer" for the group on the interface, using a random
  792.         delay value between 0 and D seconds.
  793.  
  794.       - "stop timer" for the group on the interface.
  795.  
  796.    In the following diagram, each state transition arc is labelled with
  797.    the event that causes the transition, and, in parentheses, any
  798.    actions taken during the transition.
  799.  
  800.                               ________________
  801.                              |                |
  802.                              |                |
  803.                              |                |
  804.                              |                |
  805.                    --------->|   Non-Member   |<---------
  806.                   |          |                |          |
  807.                   |          |                |          |
  808.                   |          |                |          |
  809.                   |          |________________|          |
  810.                   |                   |                  |
  811.                   | leave group       | join group       | leave group
  812.                   | (stop timer)      |(send report,     |
  813.                   |                   | start timer)     |
  814.           ________|________           |          ________|________
  815.          |                 |<---------          |                 |
  816.          |                 |                    |                 |
  817.          |                 |<-------------------|                 |
  818.          |                 |   query received   |                 |
  819.          | Delaying Member |    (start timer)   |   Idle Member   |
  820.          |                 |------------------->|                 |
  821.          |                 |   report received  |                 |
  822.          |                 |    (stop timer)    |                 |
  823.          |_________________|------------------->|_________________|
  824.                                 timer expired
  825.                                 (send report)
  826.  
  827.    The all-hosts group (address 224.0.0.1) is handled as a special case.
  828.    The host starts in Idle Member state for that group on every
  829.    interface, never transitions to another state, and never sends a
  830.    report for that group.
  831.  
  832. Protocol Parameters
  833.  
  834.    The maximum report delay, D, is 10 seconds.
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842. Deering                                                        [Page 15]
  843.  
  844. RFC 1112          Host Extensions for IP Multicasting        August 1989
  845.  
  846.  
  847. APPENDIX II. HOST GROUP ADDRESS ISSUES
  848.  
  849.    This appendix is not part of the IP multicasting specification, but
  850.    provides background discussion of several issues related to IP host
  851.    group addresses.
  852.  
  853. Group Address Binding
  854.  
  855.    The binding of IP host group addresses to physical hosts may be
  856.    considered a generalization of the binding of IP unicast addresses.
  857.    An IP unicast address is statically bound to a single local network
  858.    interface on a single IP network.  An IP host group address is
  859.    dynamically bound to a set of local network interfaces on a set of IP
  860.    networks.
  861.  
  862.    It is important to understand that an IP host group address is NOT
  863.    bound to a set of IP unicast addresses.  The multicast routers do not
  864.    need to maintain a list of individual members of each host group.
  865.    For example, a multicast router attached to an Ethernet need
  866.    associate only a single Ethernet multicast address with each host
  867.    group having local members, rather than a list of the members'
  868.    individual IP or Ethernet addresses.
  869.  
  870. Allocation of Transient Host Group Addresses
  871.  
  872.    This memo does not specify how transient group address are allocated.
  873.    It is anticipated that different portions of the IP transient host
  874.    group address space will be allocated using different techniques.
  875.    For example, there may be a number of servers that can be contacted
  876.    to acquire a new transient group address.  Some higher-level
  877.    protocols (such as VMTP, specified in RFC-1045) may generate higher-
  878.    level transient "process group" or "entity group" addresses which are
  879.    then algorithmically mapped to a subset of the IP transient host
  880.    group addresses, similarly to the way that IP host group addresses
  881.    are mapped to Ethernet multicast addresses.  A portion of the IP
  882.    group address space may be set aside for random allocation by
  883.    applications that can tolerate occasional collisions with other
  884.    multicast users, perhaps generating new addresses until a suitably
  885.    "quiet" one is found.
  886.  
  887.    In general, a host cannot assume that datagrams sent to any host
  888.    group address will reach only the intended hosts, or that datagrams
  889.    received as a member of a transient host group are intended for the
  890.    recipient.  Misdelivery must be detected at a level above IP, using
  891.    higher-level identifiers or authentication tokens.  Information
  892.    transmitted to a host group address should be encrypted or governed
  893.    by administrative routing controls if the sender is concerned about
  894.    unwanted listeners.
  895.  
  896.  
  897.  
  898. Deering                                                        [Page 16]
  899.  
  900. RFC 1112          Host Extensions for IP Multicasting        August 1989
  901.  
  902.  
  903. Author's Address
  904.  
  905.    Steve Deering
  906.    Stanford University
  907.    Computer Science Department
  908.    Stanford, CA 94305-2140
  909.  
  910.    Phone: (415) 723-9427
  911.  
  912.    EMail: deering@PESCADERO.STANFORD.EDU
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Deering                                                        [Page 17]
  955.