Tech-invite3GPPspaceIETF RFCsSIP
in Index   Prev   Next

RFC 7390

Group Communication for the Constrained Application Protocol (CoAP)

Pages: 46
Part 2 of 3 – Pages 17 to 35
First   Prev   Next

Top   ToC   RFC7390 - Page 17   prevText

2.7. Request Acceptance and Response Suppression Rules

CoRE Link Format [RFC6690] and Section 8 of CoAP [RFC7252] define behaviors for the following: 1. IP multicast request acceptance -- in which cases a CoAP request is accepted and executed, and when it is not. 2. IP multicast response suppression -- in which cases the CoAP response to an already executed request is returned to the requesting endpoint, and when it is not. A CoAP response differs from a CoAP ACK; ACKs are never sent by servers in response to an IP multicast CoAP request. This section first summarizes these behaviors and then presents additional guidelines for response suppression. Also, a number of IP multicast example applications are given to illustrate the overall approach. To apply any rules for request and/or response suppression, a CoAP server must be aware that an incoming request arrived via IP multicast by making use of APIs such as IPV6_RECVPKTINFO [RFC3542]. For IP multicast request acceptance, the behaviors are as follows: o A server should not accept an IP multicast request that cannot be "authenticated" in some way (i.e, cryptographically or by some multicast boundary limiting the potential sources); see Section 11.3 of [RFC7252]. See Section 5.3 for examples of multicast boundary limiting methods. o A server should not accept an IP multicast discovery request with a query string (as defined in CoRE Link Format [RFC6690]) if filtering [RFC6690] is not supported by the server. o A server should not accept an IP multicast request that acts on a specific resource for which IP multicast support is not required. (Note that for the resource "/.well-known/core", IP multicast support is required if "multicast resource discovery" is supported as specified in Section 1.2.1 of [RFC6690].) Implementers are advised to disable IP multicast support by default on any other resource, until explicitly enabled by an application or by configuration.
Top   ToC   RFC7390 - Page 18
   o  Otherwise, accept the IP multicast request.

   For IP multicast response suppression, the behaviors are as follows:

   o  A server should not respond to an IP multicast discovery request
      if the filter specified by the request's query string does not

   o  A server may choose not to respond to an IP multicast request if
      there's nothing useful to respond back (e.g., error or empty

   The above response suppression behaviors are complemented by the
   following guidelines.  CoAP servers should implement configurable
   response suppression, enabling at least the following options per
   resource that supports IP multicast requests:

   o  Suppression of all 2.xx success responses;

   o  Suppression of all 4.xx client errors;

   o  Suppression of all 5.xx server errors; and

   o  Suppression of all 2.05 responses with empty payload.

   A number of CoAP group communication example applications are given
   below to illustrate how to make use of response suppression:

   o  CoAP resource discovery: Suppress 2.05 responses with empty
      payload and all 4.xx and 5.xx errors.

   o  Lighting control: Suppress all 2.xx responses after a lighting
      change command.

   o  Update configuration data in a group of devices using group
      communication PUT: No suppression at all.  The client uses
      collected responses to identify which group members did not
      receive the new configuration and then attempts using CoAP CON
      unicast to update those specific group members.  Note that in this
      case, the client implements a "reliable group communication" (as
      defined in Section 1.3) function using additional, non-
      standardized functions above the CoAP layer.

   o  IP multicast firmware update by sending blocks of data: Suppress
      all 2.xx and 5.xx responses.  After having sent all IP multicast
      blocks, the client checks each endpoint by unicast to identify
      which data blocks are still missing in each endpoint.
Top   ToC   RFC7390 - Page 19
   o  Conditional reporting for a group (e.g., sensors) based on a group
      URI query: Suppress all 2.05 responses with empty payload (i.e.,
      if a query produces no matching results).

2.8. Congestion Control

CoAP group communication requests may result in a multitude of responses from different nodes, potentially causing congestion. Therefore, both the sending of IP multicast requests and the sending of the unicast CoAP responses to these multicast requests should be conservatively controlled. CoAP [RFC7252] reduces IP multicast-specific congestion risks through the following measures: o A server may choose not to respond to an IP multicast request if there's nothing useful to respond to (e.g., error or empty response); see Section 8.2 of [RFC7252]. See Section 2.7 for more detailed guidelines on response suppression. o A server should limit the support for IP multicast requests to specific resources where multicast operation is required (Section 11.3 of [RFC7252]). o An IP multicast request must be Non-confirmable (Section 8.1 of [RFC7252]). o A response to an IP multicast request should be Non-confirmable (Section 5.2.3 of [RFC7252]). o A server does not respond immediately to an IP multicast request and should first wait for a time that is randomly picked within a predetermined time interval called the Leisure (Section 8.2 of [RFC7252]). Additional guidelines to reduce congestion risks defined in this document are as follows: o A server in an LLN should only support group communication GET for resources that are small. For example, the payload of the response is limited to approximately 5% of the IP Maximum Transmit Unit (MTU) size, so it fits into a single link-layer frame in case IPv6 over Low-Power Wireless Personal Area Networks (6LoWPAN) (see Section 4 of [RFC4944]) is used.
Top   ToC   RFC7390 - Page 20
   o  A server can minimize the payload length in response to a group
      communication GET on "/.well-known/core" by using hierarchy in
      arranging link descriptions for the response.  An example of this
      is given in Section 5 of [RFC6690].

   o  A server can also minimize the payload length of a response to a
      group communication GET (e.g., on "/.well-known/core") using CoAP
      blockwise transfers [BLOCKWISE-CoAP], returning only a first block
      of the CoRE Link Format description.  For this reason, a CoAP
      client sending an IP multicast CoAP request to "/.well-known/core"
      should support core-block.

   o  A client should use CoAP group communication with the smallest
      possible IP multicast scope that fulfills the application needs.
      As an example, site-local scope is always preferred over global
      scope IP multicast if this fulfills the application needs.
      Similarly, realm-local scope is always preferred over site-local
      scope if this fulfills the application needs.

   More guidelines specific to the use of CoAP in 6LoWPAN networks
   [RFC4919] are given in Section 4.5 of this document.

2.9. Proxy Operation

CoAP (Section 5.7.2 of [RFC7252]) allows a client to request a forward-proxy to process its CoAP request. For this purpose, the client specifies either the request group URI as a string in the Proxy-URI option or the Proxy-Scheme option with the group URI constructed from the usual Uri-* options. This approach works well for unicast requests. However, there are certain issues and limitations of processing the (unicast) responses to a CoAP group communication request made in this manner through a proxy. A proxy may buffer all the individual (unicast) responses to a CoAP group communication request and then send back only a single (aggregated) response to the client. However, there are some issues with this aggregation approach: o Aggregation of (unicast) responses to a CoAP group communication request in a proxy is difficult. This is because the proxy does not know how many members there are in the group or how many group members will actually respond. Also, the proxy does not know how long to wait before deciding to send back the aggregated response to the client. o There is no default format defined in CoAP for aggregation of multiple responses into a single response.
Top   ToC   RFC7390 - Page 21
   Alternatively, if a proxy follows directly the specification for a
   CoAP Proxy (Section 5.7.2 of [RFC7252]), the proxy would simply
   forward all the individual (unicast) responses to a CoAP group
   communication request to the client (i.e., no aggregation).  There
   are also issues with this approach:

   o  The client may be confused as it may not have known that the
      Proxy-URI contained a group URI target.  That is, the client may
      be expecting only one (unicast) response but instead receives
      multiple (unicast) responses, potentially leading to fault
      conditions in the application.

   o  Each individual CoAP response will appear to originate (IP source
      address) from the CoAP Proxy, and not from the server that
      produced the response.  This makes it impossible for the client to
      identify the server that produced each response.

   Due to the above issues, a CoAP Proxy SHOULD NOT support processing
   an IP multicast CoAP request but rather return a 501 (Not
   Implemented) response in such case.  The exception case here (i.e.,
   to process it) is allowed if all the following conditions are met:

   o  The CoAP Proxy MUST be explicitly configured (whitelist) to allow
      proxied IP multicast requests by a specific client(s).

   o  The proxy SHOULD return individual (unicast) CoAP responses to the
      client (i.e., not aggregated).  The exception case here occurs
      when a (future) standardized aggregation format is being used.

   o  It MUST be known to the person/entity doing the configuration of
      the proxy, or otherwise verified in some way, that the client
      configured in the whitelist supports receiving multiple responses
      to a proxied unicast CoAP request.

2.10. Exceptions

CoAP group communication using IP multicast offers improved network efficiency and latency among other benefits. However, group communication may not always be implementable in a given network. The primary reason for this will be that IP multicast is not (fully) supported in the network. For example, if only RPL [RFC6550] is used in a network with its optional multicast support disabled, there will be no IP multicast routing at all. The only multicast that works in this case is link- local IPv6 multicast. This implies that any CoAP group communication request will be delivered to nodes on the local link only, regardless of the scope value used in the IPv6 destination address.
Top   ToC   RFC7390 - Page 22
   CoAP Observe [OBSERVE-CoAP] is a feature for a client to "observe"
   resources (i.e., to retrieve a representation of a resource and keep
   this representation updated by the server over a period of time).
   CoAP Observe does not support a group communication mode.  CoAP
   Observe only supports a unicast mode of operation.

3. Use Cases and Corresponding Protocol Flows

3.1. Introduction

The use of CoAP group communication is shown in the context of the following two use cases and corresponding protocol flows: o Discovery of RD [CoRE-RD]: discovering the local CoAP RD, which contains links to resources stored on other CoAP servers [RFC6690]. o Lighting Control: synchronous operation of a group of IPv6-connected lights (e.g., 6LoWPAN [RFC4944] lights).

3.2. Network Configuration

To illustrate the use cases, we define two IPv6 network configurations. Both are based on the topology as shown in Figure 1. The two configurations using this topology are as follows: 1. Subnets are 6LoWPAN networks; the routers Rtr-1 and Rtr-2 are 6LoWPAN Border Routers (6LBRs) [RFC6775]. 2. Subnets are Ethernet links; the routers Rtr-1 and Rtr-2 are multicast-capable Ethernet routers. Both configurations are further specified by the following: o A large room (Room-A) with three lights (Light-1, Light-2, Light- 3) controlled by a light switch (Light Switch). The devices are organized into two subnets. In reality, there could be more lights (up to several hundreds) but, for clarity, only three are shown. o Light-1 and the light switch are connected to a router (Rtr-1). o Light-2 and Light-3 are connected to another router (Rtr-2).
Top   ToC   RFC7390 - Page 23
   o  The routers are connected to an IPv6 network backbone (Network
      Backbone) that is also multicast enabled.  In the general case,
      this means the network backbone and Rtr-1/Rtr-2 support a PIM-
      based multicast routing protocol and Multicast Listener Discovery
      (MLD) for forming groups.

   o  A CoAP RD is connected to the network backbone.

   o  The DNS server (DNS Server) is optional.  If the server is there
      (connected to the network backbone), then certain DNS-based
      features are available (e.g., DNS resolution of the hostname to
      the IP multicast address).  If the DNS server is not there, then
      different provisioning of the network is required (e.g., IP
      multicast addresses are hard-coded into devices, or manually
      configured, or obtained via a service discovery method).

   o  A controller (CoAP client) is connected to the backbone, which is
      able to control various building functions including lighting.
Top   ToC   RFC7390 - Page 24
     #         **********************        Room-A #
     #       **  Subnet-1            **             #           Network
     #     *                           **           #          Backbone
     #    *     +----------+             *          #                 |
     #   *      |  Light   |-------+      *         #                 |
     #  *       |  Switch  |       |       *        #                 |
     #  *       +----------+  +---------+  *        #                 |
     #  *                     |  Rtr-1  |-----------------------------+
     #  *                     +---------+  *        #                 |
     #  *       +----------+        |      *        #                 |
     #   *      |  Light-1 |--------+     *         #                 |
     #    *     +----------+             *          #                 |
     #     **                          **           #                 |
     #       **************************             #                 |
     #                                              #                 |
     #         **********************               # +------------+  |
     #       **  Subnet-2            **             # | DNS Server |  |
     #     *                           **           # | (Optional) |--+
     #    *     +----------+             *          # +------------+  |
     #   *      |  Light-2 |-------+      *         #                 |
     #  *       |          |       |       *        #                 |
     #  *       +----------+  +---------+  *        #                 |
     #  *                     |  Rtr-2  |-----------------------------+
     #  *                     +---------+  *        #                 |
     #  *       +----------+        |      *        #                 |
     #   *      |  Light-3 |--------+     *         #                 |
     #    *     +----------+             *          # +------------+  |
     #     **                          **           # | Controller |--+
     #       **************************             # | Client     |  |
     ################################################ +------------+  |
                                       +------------+                 |
                                       |   CoAP     |                 |
                                       |  Resource  |-----------------+
                                       |  Directory |

            Figure 1: Network Topology of a Large Room (Room-A)
Top   ToC   RFC7390 - Page 25

3.3. Discovery of Resource Directory

The protocol flow for discovery of the CoAP RD for the given network (of Figure 1) is shown in Figure 2: o Light-2 is installed and powered on for the first time. o Light-2 will then search for the local CoAP RD by sending out a group communication GET request (with the "/.well-known/ core?rt=core.rd" request URI) to the site-local "All CoAP Nodes" multicast address (ff05:::fd). o This multicast message will then go to each node in Subnet-2. Rtr-2 will then forward it into the network backbone where it will be received by the CoAP RD. All other nodes in Subnet-2 will ignore the group communication GET request because it is qualified by the query string "?rt=core.rd" (which indicates it should only be processed by the endpoint if it contains a resource of type "core.rd"). o The CoAP RD will then send back a unicast response containing the requested content, which is a CoRE Link Format representation of a resource of type "core.rd". o Note that the flow is shown only for Light-2 for clarity. Similar flows will happen for Light-1, Light-3, and light switch when they are first installed. The CoAP RD may also be discovered by other means such as by assuming a default location (e.g., on a 6LBR), using DHCP, anycast address, etc. However, these approaches do not invoke CoAP group communication so are not further discussed here. (See [CoRE-RD] for more details.) For other discovery use cases such as discovering local CoAP servers, services, or resources, CoAP group communication can be used in a similar fashion as in the above use case. For example, link-local, realm-local, admin-local, or site-local scoped discovery can be done this way.
Top   ToC   RFC7390 - Page 26
                                    Light                           CoAP
   Light-1   Light-2    Light-3     Switch     Rtr-1     Rtr-2       RD
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    **********************************          |          |          |
    *   Light-2 is installed         *          |          |          |
    *   and powers on for first time *          |          |          |
    **********************************          |          |          |
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    |          | COAP NON Mcast(GET                        |          |
    |          |           /.well-known/core?rt=core.rd)   |          |
    |          |--------->-------------------------------->|          |
    |          |          |          |          |          |--------->|
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    |          | COAP NON (2.05 Content                    |          |
    |          |         </rd>;rt="core.rd";ins="Primary") |<---------|
    |          |<------------------------------------------|          |
    |          |          |          |          |          |          |

       Figure 2: Resource Directory Discovery via Multicast Request

3.4. Lighting Control

The protocol flow for a building automation lighting control scenario for the network (Figure 1) is shown in Figure 3. The network is assumed to be in a 6LoWPAN configuration. Also, it is assumed that the CoAP servers in each light are configured to suppress CoAP responses for any IP multicast CoAP requests related to lighting control. (See Section 2.7 for more details on response suppression by a server.) In addition, Figure 4 shows a protocol flow example for the case that servers do respond to a lighting control IP multicast request with (unicast) CoAP NON responses. There are two success responses and one 5.00 error response. In this particular case, the light switch does not check that all lights in the group received the IP multicast request by examining the responses. This is because the light switch is not configured with an exhaustive list of the IP addresses of all lights belonging to the group. However, based on received error responses, it could take additional action such as logging a fault or alerting the user via its LCD display. In case a CoAP message is delivered multiple times to a light, the subsequent CoAP messages can be filtered out as duplicates, based on the CoAP Message ID.
Top   ToC   RFC7390 - Page 27
   Reliability of IP multicast is not guaranteed.  Therefore, one or
   more lights in the group may not have received the CoAP control
   request due to packet loss.  In this use case, there is no detection
   nor correction of such situations: the application layer expects that
   the IP multicast forwarding/routing will be of sufficient quality to
   provide on average a very high probability of packet delivery to all
   CoAP endpoints in an IP multicast group.  An example protocol to
   accomplish this using randomized retransmission is the MPL forwarding
   protocol for LLNs [MCAST-MPL].

   We assume the following steps have already occurred before the
   illustrated flows:

   1)  Startup phase: 6LoWPANs are formed.  IPv6 addresses are assigned
       to all devices.  The CoAP network is formed.

   2)  Network configuration (application independent): 6LBRs are
       configured with IP multicast addresses, or address blocks, to
       filter out or to pass through to/from the 6LoWPAN.

   3a) Commissioning phase (application related): The IP multicast
       address of the group (Room-A-Lights) has been configured in all
       the lights and in the light switch.

   3b) As an alternative to the previous step, when a DNS server is
       available, the light switch and/or the lights have been
       configured with a group hostname that each node resolves to the
       above IP multicast address of the group.

   Note for the Commissioning phase: the switch's 6LoWPAN/CoAP software
   stack supports sending unicast, multicast, or proxied unicast CoAP
   requests, including processing of the multiple responses that may be
   generated by an IP multicast CoAP request.
Top   ToC   RFC7390 - Page 28
                                    Light                       Network
   Light-1   Light-2    Light-3     Switch    Rtr-1      Rtr-2  Backbone
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    |          |          ***********************          |          |
    |          |          *   User flips on     *          |          |
    |          |          *   light switch to   *          |          |
    |          |          *   turn on all the   *          |          |
    |          |          *   lights in Room-A  *          |          |
    |          |          ***********************          |          |
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    |          |          |    COAP NON Mcast(PUT,         |          |
    |          |          |    Payload=lights ON)          |          |
    |<-------------------------------+--------->|          |          |
    ON         |          |          |          |-------------------->|
    |          |          |          |          |          |<---------|
    |          |<---------|<-------------------------------|          |
    |          ON         ON         |          |          |          |
    ^          ^          ^          |          |          |          |
    ***********************          |          |          |          |
    *   Lights in Room-A  *          |          |          |          |
    *   turn on (nearly   *          |          |          |          |
    *   simultaneously)   *          |          |          |          |
    ***********************          |          |          |          |
    |          |          |          |          |          |          |

          Figure 3: Light Switch Sends Multicast Control Message
Top   ToC   RFC7390 - Page 29
                                    Light                       Network
   Light-1   Light-2    Light-3     Switch    Rtr-1      Rtr-2  Backbone
    |          |          |          |          |          |          |
    |     COAP NON (2.04 Changed)    |          |          |          |
    |------------------------------->|          |          |          |
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    |          COAP NON (2.04 Changed)          |          |          |
    |          |------------------------------------------>|          |
    |          |          |          |          |          |--------->|
    |          |          |          |          |<--------------------|
    |          |          |          |<---------|          |          |
    |          |          |          |          |          |          |
    |          |        COAP NON (5.00 Internal Server Error)         |
    |          |          |------------------------------->|          |
    |          |          |          |          |          |--------->|
    |          |          |          |          |<--------------------|
    |          |          |          |<---------|          |          |
    |          |          |          |          |          |          |

      Figure 4: Lights (Optionally) Respond to Multicast CoAP Request

   Another, but similar, lighting control use case is shown in Figure 5.
   In this case, a controller connected to the network backbone sends a
   CoAP group communication request to turn on all lights in Room-A.
   Every light sends back a CoAP response to the controller after being
   turned on.
Top   ToC   RFC7390 - Page 30
  Light-1   Light-2    Light-3     Rtr-1      Rtr-2  Backbone Controller
   |          |          |           |          |          |        |
   |          |          |           |          |    COAP NON Mcast(PUT,
   |          |          |           |          |    Payload=lights ON)
   |          |          |           |          |          |<-------|
   |          |          |           |<----------<---------|        |
   |<--------------------------------|          |          |        |
   ON         |          |           |          |          |        |
   |          |<----------<---------------------|          |        |
   |          ON         ON          |          |          |        |
   ^          ^          ^           |          |          |        |
   ***********************           |          |          |        |
   *   Lights in Room-A  *           |          |          |        |
   *   turn on (nearly   *           |          |          |        |
   *   simultaneously)   *           |          |          |        |
   ***********************           |          |          |        |
   |          |          |           |          |          |        |
   |          |          |           |          |          |        |
   |    COAP NON (2.04 Changed)      |          |          |        |
   |-------------------------------->|          |          |        |
   |          |          |           |-------------------->|        |
   |          |  COAP NON (2.04 Changed)        |          |------->|
   |          |-------------------------------->|          |        |
   |          |          |           |          |--------->|        |
   |          |          | COAP NON (2.04 Changed)         |------->|
   |          |          |--------------------->|          |        |
   |          |          |           |          |--------->|        |
   |          |          |           |          |          |------->|
   |          |          |           |          |          |        |

     Figure 5: Controller on Backbone Sends Multicast Control Message

3.5. Lighting Control in MLD-Enabled Network

The use case in the previous section can also apply in networks where nodes support the MLD protocol [RFC3810]. The lights then take on the role of MLDv2 listener, and the routers (Rtr-1 and Rtr-2) are MLDv2 routers. In the Ethernet-based network configuration, MLD may be available on all involved network interfaces. Use of MLD in the 6LoWPAN-based configuration is also possible but requires MLD support in all nodes in the 6LoWPAN. In current 6LoWPAN implementations, MLD is, however, not supported. The resulting protocol flow is shown in Figure 6. This flow is executed after the commissioning phase, as soon as lights are configured with a group address to listen to. The (unicast) MLD
Top   ToC   RFC7390 - Page 31
   Reports may require periodic refresh activity as specified by the MLD
   protocol.  In the figure, 'LL' denotes link-local communication.

   After the shown sequence of MLD Report messages has been executed,
   both Rtr-1 and Rtr-2 are automatically configured to forward IP
   multicast traffic destined to Room-A-Lights onto their connected
   subnet.  Hence, no manual network configuration of routers, as
   previously indicated in Section 3.4, step 2, is needed anymore.

                                    Light                       Network
   Light-1   Light-2    Light-3     Switch    Rtr-1      Rtr-2  Backbone
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |
    | MLD Report: Join    |          |          |          |          |
    | Group (Room-A-Lights)          |          |          |          |
    |---LL------------------------------------->|          |          |
    |          |          |          |          |MLD Report: Join     |
    |          |          |          |          |Group (Room-A-Lights)|
    |          |          |          |          |---LL---->----LL---->|
    |          |          |          |          |          |          |
    |          | MLD Report: Join    |          |          |          |
    |          | Group (Room-A-Lights)          |          |          |
    |          |---LL------------------------------------->|          |
    |          |          |          |          |          |          |
    |          |          | MLD Report: Join    |          |          |
    |          |          | Group (Room-A-Lights)          |          |
    |          |          |---LL-------------------------->|          |
    |          |          |          |          |          |          |
    |          |          |          |          |MLD Report: Join     |
    |          |          |          |          |Group (Room-A-Lights)|
    |          |          |          |          |<--LL-----+---LL---->|
    |          |          |          |          |          |          |
    |          |          |          |          |          |          |

                Figure 6: Joining Lighting Groups Using MLD

3.6. Commissioning the Network Based on Resource Directory

This section outlines how devices in the lighting use case (both switches and lights) can be commissioned, making use of the RD [CoRE-RD] and its group configuration feature. Once the RD is discovered, the Switches and lights need to be discovered and their groups need to be defined. For the commissioning of these devices, a commissioning tool can be used that
Top   ToC   RFC7390 - Page 32
   defines the entries in the RD.  The commissioning tool has the
   authority to change the contents of the RD and the light/switch
   nodes.  DTLS-based unicast security is used by the commissioning tool
   to modify operational data in RD, switches, and lights.

   In our particular use case, a group of three lights is defined with
   one IP multicast address and hostname:


   The commissioning tool has a list of the three lights and the
   associated IP multicast address.  For each light in the list, the
   tool learns the IP address of the light and instructs the RD with
   three (unicast) POST commands to store the endpoints associated with
   the three lights as prescribed by the RD specification [CoRE-RD].
   Finally, the commissioning tool defines the group in the RD to
   contain these three endpoints.  Also the commissioning tool writes
   the IP multicast address in the light endpoints with, for example,
   the (unicast) POST command discussed in Section

   The light switch can discover the group in RD and thus learn the IP
   multicast address of the group.  The light switch will use this
   address to send CoAP group communication requests to the members of
   the group.  When the message arrives, the lights should recognize the
   IP multicast address and accept the message.

4. Deployment Guidelines

This section provides guidelines on how IP multicast-based CoAP group communication can be deployed in various network configurations.

4.1. Target Network Topologies

CoAP group communication can be deployed in various network topologies. First, the target network may be a traditional IP network, or an LLN such as a 6LoWPAN network, or consist of mixed traditional/constrained network segments. Second, it may be a single subnet only or a multi-subnet, e.g., multiple 6LoWPAN networks joined by a single backbone LAN. Third, a wireless network segment may have all its nodes reachable in a single IP hop (fully connected), or it may require multiple IP hops for some pairs of nodes to reach each other. Each topology may pose different requirements on the configuration of routers and protocol(s), in order to enable efficient CoAP group communication. To enable all the above target network topologies, an implementation of CoAP group communication needs to allow the following:
Top   ToC   RFC7390 - Page 33
   1.  Routing/forwarding of IP multicast packets over multiple hops.

   2.  Routing/forwarding of IP multicast packets over subnet boundaries
       between traditional and constrained (e.g., LLN) networks.

   The remainder of this section discusses solutions to enable both

4.2. Networks Using the MLD Protocol

CoAP nodes that are IP hosts (i.e., not IP routers) are generally unaware of the specific IP multicast routing/forwarding protocol being used. When such a host needs to join a specific (CoAP) multicast group, it requires a way to signal to IP multicast routers which IP multicast traffic it wants to receive. The MLD protocol [RFC3810] (see Appendix A of this document) is the standard IPv6 method to achieve this; therefore, this approach should be used on traditional IP networks. CoAP server nodes would then act in the role of MLD Multicast Address Listener. The guidelines from [RFC6636] on the tuning of MLD for mobile and wireless networks may be useful when implementing MLD in LLNs. However, on LLNs and 6LoWPAN networks, the use of MLD may not be feasible at all due to constraints on code size, memory, or network capacity.

4.3. Networks Using RPL Multicast without MLD

It is assumed in this section that the MLD protocol is not implemented in a network, for example, due to resource constraints. The RPL routing protocol (see Section 12 of [RFC6550]) defines the advertisement of IP multicast destinations using Destination Advertisement Object (DAO) messages and routing of multicast IPv6 packets based on this. It requires the RPL mode of operation to be 3 (Storing mode with multicast support). Hence, RPL DAO can be used by CoAP nodes that are RPL routers, or are RPL Leaf Nodes, to advertise IP multicast group membership to parent routers. Then, RPL is used to route IP multicast CoAP requests over multiple hops to the correct CoAP servers. The same DAO mechanism can be used to convey IP multicast group membership information to an edge router (e.g., 6LBR), in case the edge router is also the root of the RPL Destination-Oriented Directed Acyclic Graph (DODAG). This is useful because the edge router then learns which IP multicast traffic it needs to pass through from the backbone network into the LLN subnet. In 6LoWPAN networks, such
Top   ToC   RFC7390 - Page 34
   selective "filtering" helps to avoid congestion of a 6LoWPAN subnet
   by IP multicast traffic from the traditional backbone IP network.

4.4. Networks Using MPL Forwarding without MLD

The MPL forwarding protocol [MCAST-MPL] can be used for propagation of IPv6 multicast packets to all MPL Forwarders within a predefined network domain, over multiple hops. MPL is designed to work in LLNs. In this section, it is again assumed that MLD is not implemented in the network, for example, due to resource limitations in an LLN. The purpose of MPL is to let a predefined group of Forwarders collectively work towards the goal of distributing an IPv6 multicast packet throughout an MPL Domain. (A Forwarder node may be associated to multiple MPL Domains at the same time.) So, it would appear that there is no need for CoAP servers to advertise their multicast group membership, since any IP multicast packet that enters the MPL Domain is distributed to all MPL Forwarders without regard to what multicast addresses the individual nodes are listening to. However, if an IP multicast request originates just outside the MPL Domain, the request will not be propagated by MPL. An example of such a case is the network topology of Figure 1 where the subnets are 6LoWPAN subnets and for each 6LoWPAN subnet, one Realm-Local ([RFC7346]) MPL Domain is defined. The backbone network in this case is not part of any MPL Domain. This situation can become a problem in building control use cases, for example, when the controller client needs to send a single IP multicast request to the group Room-A-Lights. By default, the request would be blocked by Rtr-1 and by Rtr-2 and not enter the Realm-Local MPL Domains associated to Subnet-1 and Subnet-2. The reason is that Rtr-1 and Rtr-2 do not have the knowledge that devices in Subnet-1/2 want to listen for IP packets destined to IP multicast group Room-A-Lights. To solve the above issue, the following solutions could be applied: 1. Extend the MPL Domain, e.g., in the above example, include the network backbone to be part of each of the two MPL Domains. Or, in the above example, create just a single MPL Domain that includes both 6LoWPAN subnets plus the backbone link, which is possible since MPL is not tied to a single link-layer technology. 2. Manual configuration of an edge router(s) as an MPL Seed(s) for specific IP multicast traffic. In the above example, this could be done through the following three steps: First, configure Rtr-1 and Rtr-2 to act as MLD Address Listeners for the Room-A-Lights
Top   ToC   RFC7390 - Page 35
       IP multicast group.  This step allows any (other) routers on the
       backbone to learn that at least one node on the backbone link is
       interested in receiving any IP multicast traffic to
       Room-A-Lights.  Second, configure both routers to "inject" any IP
       multicast packets destined to group Room-A-Lights into the
       (Realm-Local) MPL Domain that is associated to that router.
       Third, configure both routers to propagate any IPv6 multicast
       packets originating from within their associated MPL Domain to
       the backbone, if at least one node on the backbone has indicated
       interest in receiving such IPv6 packets (for which MLD is used on
       the backbone).

   3.  Use an additional protocol/mechanism for injection of IP
       multicast traffic from outside an MPL Domain into that MPL
       Domain, based on IP multicast group subscriptions of Forwarders
       within the MPL Domain.  Such a protocol is currently not defined
       in [MCAST-MPL].

   In conclusion, MPL can be used directly in case all sources of IP
   multicast CoAP requests (CoAP clients) and also all the destinations
   (CoAP servers) are inside a single MPL Domain.  Then, each source
   node acts as an MPL Seed.  In all other cases, MPL can only be used
   with additional protocols and/or configuration on how IP multicast
   packets can be injected from outside into an MPL Domain.

4.5. 6LoWPAN Specific Guidelines for the 6LBR

To support multi-subnet scenarios for CoAP group communication, it is recommended that a 6LBR will act in an MLD router role on the backbone link. If this is not possible, then the 6LBR should be configured to act as an MLD Multicast Address Listener (see Appendix A) on the backbone link.

(page 35 continued on part 3)

Next Section