Core                                                           P. Wang
Internet Draft                                                   C. Pu
Interned status: Standards Track                               H. Wang
Expires: July 29, 2017                                         Y. Yang
                                                               L. Shao
                                               Chongqing University of
                                          Posts and Telecommunications
                                                      January 25, 2017


               OPC UA Message Transmission Method over CoAP
                   draft-wang-core-opcua-transmission-00


Abstract

   In Industrial applications, it is very attractive to implement the
   exchange of semantic information utilizing OPC UA Transmitting in
   CoAP. This document provides some transmission methods for message
   of OPC UA over CoAP.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups. Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six
   months and may be updated, replaced, or obsoleted by other documents
   at any time. It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html

   This Internet-Draft will expire on July 29, 2017.

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors. All rights reserved.



Wang, et al.            Expires July 29, 2017                 [Page 1]


 Internet-Draft        OPC UA Message Transmission         January 2017


   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document. Please review these documents
   carefully, as they describe your rights and restrictions with
   respect to this document. Code Components extracted from this
   document must include Simplified BSD License text as described in
   Section 4.e of the Trust Legal Provisions and are provided without
   warranty as described in the Simplified BSD License.

Table of Contents


   1. Introduction ................................................ 2
   2. Transmission scheme ......................................... 3
      2.1. Proxy for OPC UA-CoAP................................... 3
      2.2. Direct transmission..................................... 4
      2.3. REST transmission for OPC UA............................ 4
   3. Publish subscription for OPC UA and CoAP .................... 6
   4. Security Considerations...................................... 6
   5. IANA Considerations ......................................... 6
   6. References .................................................. 6
      6.1. Normative References.................................... 6
      6.2. Informative References.................................. 6
   Authors' Addresses ............................................. 7

1. Introduction

   Internet of things is one of the attractive applications for CoAP.
   Utilizing OPC UA Transmitting over CoAP could meet the demand for
   industry 4.0 based on the exchange of semantic information[draft-
   wang-core-opcua-transmition-requirements-00]. Similar to OPC UA,
   CoAP message is exchanged in server/client mode. However, their
   transmission is not the same. Driven by this, to use OPC UA
   Transmitting over CoAP, the major problem to be solved is how OPC UA
   packets are transmitted over CoAP. For the transport layer of OPC UA,
   the main message transmission method is TCP or HTTP, and CoAP's
   design inspiration comes from HTTP, thus, there are some connections
   in transmission method between them. This proposal provides some
   transmission methods for message of OPC UA over CoAP, so that a
   communication could be established between client and server.








Wang, et al.            Expires July 29, 2017                 [Page 2]


 Internet-Draft        OPC UA Message Transmission         January 2017


2. Transmission scheme

2.1. Proxy for OPC UA-CoAP

   OPC UA is a protocol mainly for application layer, which defines
   many services for the different needs of industrial applications.
   Message is exchanged mainly through server/client mode, utilizing
   TCP or HTTPS. When security is ignored, OPC UA can be considered to
   support HTTP transmission. CoAP's design inspiration comes mainly
   from HTTP, the two can be mapped between each other to meet the
   needs of some special scenes [draft-ietf-core-http-mapping-17].
   Combined with the characteristics of OPC UA and CoAP, a CoAP proxy
   can be established between OPC UA client and OPC UA server. The
   architecture is shown in Figure 1.

                                           - - - - - - - - - - - - - - -
                                        //         + - - - - +            \\
                                       ||          | UA-CoAP |             ||
                                       ||      //  |  server |             ||
                                       ||     //   + - - - - +             ||
                                       ||    //                            ||
                                       ||   //                             ||
+ - - - - +   HTTP Request    + - - - - - - +  CoAP Request   + - - - - +  ||
|    UA   | - - - - - - - - > | UA-to-CoAP  | - - - - - - - > | UA-CoAP |  ||
|  client | < - - - - - - - - |    PROXY    | < - - - - - - - |  server |  ||
+ - - - - +   HTTP Response   + - - - - - - +  CoAP Response  + - - - - +  ||
                                       ||  \\                              ||
                                       ||   \\                             ||
                                       ||    \\                            ||
                                       ||     \\   + - - - - +             ||
                                       ||      \\  | UA-CoAP |             ||
                                       ||          |  server |             ||
                                        \\         + - - - - +            //
                                           - - - - - - - - - - - - - - - -
                    Figure 1. Proxy for OPC UA-to-CoAP

   As shown in Figure 1, assume all OPC UA servers are based on CoAP
   [draft-wang-core-opcua-transmition-requirements-00], and all OPC UA-
   CoAP server can be viewed as a network, introducing UA-to-CoAP proxy
   at the boundary of the network. When a traditional OPC UA client
   initiates an HTTP request to the UA-CoAP server in the network, the
   UA-to-CoAP proxy maps the http request to the corresponding CoAP
   request and sends it to the UA-CoAP server in the network. After
   receiving the request, the UA-CoAP server sends a response to the
   UA-CoAP proxy. The proxy maps the CoAP response to the HTTP response
   and returns it to the UA client. For the UA client, the network


Wang, et al.            Expires July 29, 2017                 [Page 3]


 Internet-Draft        OPC UA Message Transmission         January 2017


   proxy and conversion is transparent, in this way, the transfer of
   OPC UA in CoAP does not need to make any changes to the UA Client.

2.2. Direct transmission

   The transmission of OPC UA supports TCP protocol and HTTP protocol,
   when security is ignored, OPC UA can be considered to support HTTP
   transmission. On the other hand, CoAP is seen as a simplified HTTP
   protocol so that it can be applied to resource - constrained network.
   Therefore, this document considers the use of CoAP to directly
   transfer OPC UA messages. OPC UA packets are encoded in either
   binary or xml format, and the optional fields in the CoAP header
   specify parameters that support these two formats, and the option
   field in the CoAP header can specify parameters that support both
   formats. Therefore, according to the format specified by the CoAP
   header, the entire packet of the OPC UA can be encapsulated in the
   payload of the CoAP message for direct transmission, as shown in
   Figure 2. Noted that this method of transmission needs to be
   modified on the server side and the client side of the OPC UA
   according to CoAP.

          + - - - - - - +     CoAP  Request        + - - - - - - +
          | UA  client  |   - - - - - - - - - - >  | UA  server  |
          |             |   < - - - - - - - - - -  |             |
          + - - - - - - +     CoAP  Response       + - - - - - - +

           Figure 2. Direct transmission OPC UA based on CoAP


2.3. REST transmission for OPC UA

   OPC UA is a set of data exchange specifications for industrial
   communication, the core of the OPC UA protocol is information
   modeling and transmission, which marks each node in the address
   space with a unique identifier. A series of state interactions are
   needed before performing normal reading and writing, including
   message handshaking, opening a secure channel, creating a session,
   activating a session, etc. Besides, some states also need to be
   maintained during read and write operations.

   In OPC UA, each node has an independent identifier in the address
   space, and different types of nodes can establish contact with each
   other by reference. OPC UA defines a variety of services, and these
   services are fixed, the user cannot arbitrarily modify, each service
   is invoked through a single message, without relying on the previous
   message, the service response is also completed by a separate


Wang, et al.            Expires July 29, 2017                 [Page 4]


 Internet-Draft        OPC UA Message Transmission         January 2017


   message and do not rely on other messages. The above features are in
   line with the REST architecture, due to CoAP is based on the REST
   architecture. Therefore, it is possible to simplify the interaction
   before the OPC UA performs the normal communication, and carry the
   OPC UA message by using the communication mode of the CoAP.
   Communication process is shown in Figure 3.

   + - - - - +           + - - - - +             + - - - - +          + - - - - +
   | client  |           | server  |             | client  |          | server  |
   + - - - - +           + - - - - +             + - - - - +          + - - - - +
       |        Hello        |                       |                     |
       | - - - - - - - - - > |                       |                     |
       |      Acknowledge    |                       |                     |
       | < - - - - - - - - - |                       |                     |
       |OpenSecureChannelReq |                       |                     |
       | - - - - - - - - - > |                       |                     |
       |OpenSecureChannelRes |                       |                     |
       | < - - - - - - - - - |                       |                     |
       |   CreateSessionReq  |                       |                     |
       | - - - - - - - - - > |                       |                     |
       |   CreateSessionRes  |                       |                     |
       | < - - - - - - - - - |                       |                     |
       | ActivateSessionReq  |                       |                     |
       | - - - - - - - - - > |                       |                     |
       | ActivateSessionRes  |                       |                     |
       | < - - - - - - - - - |                       |                     |
       |       Request       |                       |    CoAPRequest      |
       | - - - - - - - - - > |                       | - - - - - - - - - > |
       |       Response      |                       |    CoAPResponse     |
       | < - - - - - - - - - |                       | < - - - - - - - - - |
    a Traditional OPC UA communication         b REST architecture communication
       Figure 3. The communication of traditional OPC UA and the REST
                               transmission

   In Figure 3(a), the traditional OPC UA requires a series of
   interactions between normal read and write operations. Figure 3 (b)
   shows that when using CoAP to carry OPC UA message, the interaction
   process is significantly reduced, which is conducive to the
   application of OPC UA in the restricted scene. The cost of
   simplifying the interaction process is that the secure channel
   number is set to 0 by default, how to conduct secure data
   interaction needs further discussion[RESTful Industrial
   Communication With OPC UA].






Wang, et al.            Expires July 29, 2017                 [Page 5]


 Internet-Draft        OPC UA Message Transmission         January 2017


3. Publish subscription for OPC UA and CoAP

   As an application sublayer, CoAP provides publish-subscribe
   functionality, primarily for resource or network-constrained
   scenarios. Introducing broker into the network [draft-ietf-core-
   coap-pubsub-00], when a node needs to sleep, the node information is
   sent to the broker agent, when a node requests to obtain information
   of this node, the broker release function can provide information.
   OPC UA defines the publish-and-subscribe function as a service in
   the service set. The client initiates the subscription request
   directly to the server, and the server periodically sends the
   information to the client. Comparing the characteristics of the two
   protocols, it is found that each of them has its own advantages.
   Joint design can be conducted for restricted devices.

4. Security Considerations

5. IANA Considerations

   This memo includes no request to IANA.

6. References

6.1. Normative References

6.2. Informative References

[I-D.wang-core-opcua-transmition-requirements]
           Wang, H., Pu, C., and Wang, P., " Requirements Analysis for
           OPC UA over CoAP", draft-wang-core-opcua-transmition-
           requirements-00 (work in progress), December 2016.

[I-D.ietf-core-http-mapping]
           Castellani, A., Loreto, S., and Rahman, A., " Guidelines for
           HTTP-to-CoAP Mapping Implementations", draft-ietf-core-http-
           mapping-17 (work in progress), November 2016.

[Gruer]
           Finn, N., Gruer, S., Pfrommer, J., and Palm, F., "RESTful
           Industrial Communication With OPC UA", IEEE Trans. Ind.
           Informat., Vol. 12, No. 5, October 2016.

[I-D.ietf-core-coap-pubsub]
           Koster, M., Keranen, A., and J. Jimenez, "Publish-Subscribe
           Broker for the Constrained Application Protocol(CoAP)",
           draft-ietf-core-coap-pubsub-00 (work in progress), October
           2016.


Wang, et al.            Expires July 29, 2017                 [Page 6]


 Internet-Draft        OPC UA Message Transmission         January 2017


Authors' Addresses

   Ping Wang
   Chongqing University of Posts and Telecommunications
   2 Chongwen Road
   Chongqing, 400065
   China

   Phone: (86)-23-6246-1061
   Email: wangping@cqupt.edu.cn


   Chenggen Pu
   Chongqing University of Posts and Telecommunications
   2 Chongwen Road
   Chongqing, 400065
   China

   Phone: (86)-23-6246-1061
   Email:  mentospcg@163.com


   Heng Wang
   Chongqing University of Posts and Telecommunications
   2 Chongwen Road
   Chongqing, 400065
   China

   Phone: (86)-23-6248-7845
   Email: wangheng@cqupt.edu.cn


   Yi Yang
   Chongqing University of Posts and Telecommunications
   2 Chongwen Road
   Chongqing, 400065
   China

   Phone: (86)-23-6248-7845
   Email: 382991208@qq.com


   Lun Shao
   Chongqing University of Posts and Telecommunications
   2 Chongwen Road
   Chongqing, 400065
   China


Wang, et al.            Expires July 29, 2017                 [Page 7]


 Internet-Draft        OPC UA Message Transmission         January 2017



   Phone: (86)-23-6246-1061
   Email: yjsslcqupt@163.com













































Wang, et al.            Expires July 29, 2017                 [Page 8]