<?xml version="1.0" encoding="UTF-8"?>
<!-- This is built from a template for a generic Internet Draft. Suggestions for
     improvement welcome - write to Brian Carpenter, brian.e.carpenter @ gmail.com -->
<!-- This can be converted using the Web service at http://xml.resource.org/experimental.html
     (which supports the latest, sometimes undocumented and under-tested, features.) -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">[
<!ENTITY I-D.ietf-i2rs-yang-network-topo SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-yang-network-topo.xml">
<!ENTITY I-D.zhuang-i2rs-yang-dc-fabric-network-topology "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.zhuang-i2rs-yang-dc-fabric-network-topology.xml">
 <!ENTITY I-D.ietf-i2rs-usecase-reqs-summary SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-usecase-reqs-summary.xml">
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
]>     
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->

<rfc category="info" docName=" draft-cuspdt-rtgwg-cu-separation-bng-protocol-00" ipr="trust200902">

 <front>

  <!-- The abbreviated title is used in the page header- it is only
       necessary if the full title is longer than 39 characters -->
  <title abbrev="CU separation protocol">
Control-Plane and User-Plane separation BNG control channel Protocol
  </title>

  <author fullname="Shujun Hu" initials="S." surname="Hu">
      <organization>China Mobile</organization>
	  <address>
        <postal>
          <street>32 Xuanwumen West Ave, Xicheng District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>hushujun@chinamobile.com</email>
      </address>
  </author>
    <author initials="Z" surname="Wang" fullname="Zitao Wang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>wangzitao@huawei.com</email>
      </address>
  </author>  
  <author fullname="Fengwei Qin" initials="F." surname="Qin">
      <organization>China Mobile</organization>
	  <address>
        <postal>
          <street>32 Xuanwumen West Ave, Xicheng District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>qinfengwei@chinamobile.com</email>
      </address>
  </author>  
  <author fullname="Zhenqiang Li" initials="Z." surname="Li">
      <organization>China Mobile</organization>
	  <address>
        <postal>
          <street>32 Xuanwumen West Ave, Xicheng District</street>

          <city>Beijing</city>

          <region>Beijing</region>

          <code>100053</code>

          <country>China</country>
        </postal>

        <email>lizhenqiang@chinamobile.com</email>
      </address>
  </author>  
  <author initials="J" surname="Song" fullname="Jun Song">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>
		
      </address>
  </author>  
  <date month="June" year="2018"></date>
  <!-- If the month and year are both specified and are the current ones,
       xml2rfc will fill in the current day for you. If only the current
       year is specified, xml2rfc will fill in the current day and month
       for you. If the year is not the current one, it is necessary to
       specify at least a month (xml2rfc assumes day="1" if not specified
       for the purpose of calculating the expiry date).  With drafts it is
       normally sufficient to specify just the year. -->

  <!-- Meta-data Declarations -->

  <area>RTG Area</area>
  <workgroup>rtgwg</workgroup>

  <abstract>
    <t>This document specifies the CU Separation BNG control channel Protocol (CUSP) for communications between a Control Plane (CP) and a set of User Planes (UPs). CUSP is designed to be flexible and extensible so as to easily allow for the addition of further messages and objects, should further requirements be expressed in the future. </t>
  </abstract>

 </front>

 <middle>

  <!-- BEGIN 1. Introduction -->
  <section title="Introduction">
<t>
BNG is an Ethernet-centric IP edge router, and the aggregation point for the user traffic. To provide centralized session management, 
flexible address allocation, high scalability for subscriber management capacity, and cost-efficient redundancy, 
the CU separated BNG is introduced [TR-384].  The CU separated Service Control Plane could be virtualized and centralized, 
which is responsible for user access authentication and setting forwarding entries to user planes.  The routing control and 
forwarding plane, i.e. BNG user plane (local), could be distributed across the infrastructure.
</t>
<t>This document specifies the CU Separation BNG control channel Protocol (CUSP) for communications between a Control Plane (CP) and a set of User Planes (UPs). CUSP is designed to be flexible and extensible so as to easily allow for the addition of further messages and objects, should further requirements be expressed in the future. </t>
  
  </section>
  <!-- END 1. Introduction -->

<!-- BEGIN 2. Terminology -->
  <section title="Concept and Terminology">
    <t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" 
in this document are to be interpreted as described  
in <xref target="RFC2119" />.
    </t>
	<section title="Terminology">
        <t>BNG: Broadband Network Gateway. A broadband remote access server (BRAS, B-RAS or BBRAS) routes traffic to 
		and from broadband remote access devices such as digital subscriber line access multiplexers (DSLAM) on an Internet service provider's (ISP) network. 
		BRAS can also be referred to as a Broadband Network Gateway (BNG).</t>
		<t>CP: Control Plane. CP is a user control management component which supports the management of UP’s resources 
			such as the user entry and forwarding policy</t>
		<t>UP: User Plane. UP is a network edge and user policy implementation component. The traditional router's 
			Control Plane and Forwarding Plane are both preserved on BNG devices in the form of a user plane.</t>		
      </section>
   </section>
  <!-- END 2. Terminology -->  

  
  <section title="Protocol Overview">


<section title="Initialization Phase">
<figure>
<artwork><![CDATA[
         UP                              CP
          |                               |
          |                               |
          |                               |
          |         HELLO (version)       |
          |------------------------------>|
          |                               |
          |                               |
          |                               |
          |        HELLO (version)        |
          |<----------------------------- |
          |                               |
          |                               |
          |                               |

]]>	
</artwork>
</figure>

<t>The initialization phase consists of two successive steps:</t>
<t>   1)  Establishment of a TCP connection (3-way handshake) between the
       CP and the UP.
</t>
<t>   2)  Establishment of a CUSP session over the TCP connection.</t>
<t>   Once the TCP connection is established, the CP and the UP initiate CUSP session establishment during which the version negotiation are performed.  
The version's information are carried within Hello messages. If the CUSP session establishment phase fails because the CP or UP disagree on the version parameters or one of the CP or UP does not answer after the expiration of the establishment timer, the TCP connection is immediately closed.
</t>

<t>
Details about the Hello message can be found in Sections 6.2 respectively.
</t>
</section>
<section title="Network Resource Report ">
<t>
 The CP configures the BNG's access interface via NETCONF, and UPs report attributes of according interfaces and slots.
</t>
<figure>
<artwork><![CDATA[
       UP                              CP
        |                               |
        |        slot attributes report |
        |------------------------------>|
        |                               |
        |        port attributes report |
        |------------------------------>|		
        |         Configure BNG access  |
        |<-------interface via netconf->|
        |                               |
        |                               |
        |                               |


]]>	
</artwork>
</figure>
<t>Details about the Resource Report Message can be found in Sections 8 respectively.</t>
</section>

<section title="IPoE Session Establishment">
<figure>
<artwork><![CDATA[
   UP                              CP
    |    UP report the resources    |
    |----via CUSP------------------>|    
    |                               |
    |         Configur BNG access   |
    |<--------interface via netconf-|
    |                               |
    |    CP sends ACCESS_IF_INFO    |
    |<---to UPs via CUSP------------|
    |                               |
    |    User dialup via VXLAN      |
    |<----------------------------->|
    |                               |
    |    CP sends USER_BASEC_INFO   |
    |<---to UPs via CUSP------------|
    |                               |
    |    CP sends USER_IPV4_INFO    |
    |<---to UPs via CUSP------------|
    |                               |
    |    CP sends ROUTEV4 INFO      |
    |<---to UPs via CUSP------------|
    |                               |
    |    UP report the USER_DETECT_RESULT_INFO
    |----to CP via CUSP------------>|
    |                               |
    |                               |
    |    UP report the USER_TRAFFIC_INFO
    |----to CP via CUSP------------>|
    |                               |



]]>	
</artwork>
</figure>
<t>
Once a CUSP session has been established, if an IPoE session be required that the UPs report attributes of corresponding interfaces and slots via CUSP, and the CP initiate a NETCONF session to configure requested access interface of BNG.</t>
<t>
Once above process has been accomplished, the CP sends the ACCESS_IF_INFO (Access Interface Information) message to UPs that contains a variety of objects that specify the set of constrains and attributes for the BNG access interface. For example, ifname = 0001, BNG service enable, IPv4 connection trigger enable, neighbor detection enable, etc.
</t>
<t>
And then the user dialup via VXLAN, the CP sends the USER_BASIC_INFOR message USER_IPV4_INFOR, and USER_ROUTEV4_INFO to UPs that contains a variety of objects that specify the attributes for the user’s basic information, user’s ipv4 information, and routing information.
</t>
<t>
Upon receiving above messages from a CP, the UPs reports the user detection results and user’s traffic status via USER_DETECT_RESULT_INFO message and USER_TRAFFIC_INFO, etc.
</t>
</section>
<section title="PPPoE Session Establishment">
<figure>
<artwork><![CDATA[
   UP                              CP
    |                               |
    |    UP report the resources    |
    |----via CUSP------------------>|    
    |         Configur BNG access   |
    |<-------interface via netconf->|
    |                               |
    |    CP sends ACCESS_IF_INFO    |
    |<---to UPs via CUSP------------|
    |                               |
    |    User dialup via VXLAN      |
    |<----------------------------->|
    |                               |
    |    CP sends USER_BASEC_INFO   |
    |<---to UPs via CUSP------------|
    |                               |
    |    CP sends USER_IPV4_INFO    |
    |<---to UPs via CUSP------------|
    |                               |
    |    CP sends ROUTEV4 INFO      |
    |<---to UPs via CUSP------------|
    |                               |
    |    CP sends USER_PPP_INFO     |
    |<---to UPs via CUSP------------|
    |                               |
    |    UP report the USER_DETECT_RESULT_INFO
    |----to CP via CUSP------------>|
    |                               |
    |    UP report the USER_TRAFFIC_INFO
    |----to CP via CUSP------------>|
    |                               |

]]>	
</artwork>
</figure>
<t>
Once a CUSP session has been established, if an PPPoE session be required that the UPs report attributes of corresponding interfaces and slots via CUSP, and the CP initiate a NETCONF session to configure requested access interface of BNG.
</t>
<t>
Once above process has been accomplished, the CP sends the ACCESS_IF_INFO (Access Interface Information) message to UPs that contains a variety of objects that specify the set of constrains and attributes for the BNG access interface. For example, ifname = 0001, BNG service enable, IPv4 connection trigger enable, neighbor detection enable, etc.
</t>
<t>
And then the user dialup via VXLAN, the CP sends the USER_BASIC_INFOR message, USER_PPP_INFO message, USER_IPV4_INFOR message, and USER_ROUTEV4_INFO message to UPs that contains a variety of objects that specify the attributes for the user’s basic information, user’s PPP information, user’s ipv4 information, and routing information.
</t>
<t>Upon receiving above messages from a CP, the UPs reports the user detection results and user’s traffic status via USER_DETECT_RESULT_INFO message and USER_TRAFFIC_INFO, etc.</t>
</section>

<section title="Set User’s QoS Information">
<figure>
<artwork><![CDATA[
    UP                              CP
     |                               |
     |    UP report the resources    |
     |----via CUSP------------------>|
     |                               |
     |   Configure BNG Access interface
     |<-----via netconf--------------|
     |                               |
     |   Configure QOS template      |
     |<-----via netconf--------------|
     |                               |
     |    User dialup via VXLAN/     |
     |<---CP sends objecitve tlv/event
     |    report,etc.                |
     |                               |
     |    CP sends USER_QOS_INFO     |
     |<---to UPs via CUSP------------|
     |                               |


]]>	
</artwork>
</figure>
<t>Once a CUSP session has been established, if a user’s QoS needs to be set dynamically that the UPs report attributes of according interfaces and slots via CUSP, and the CP initiate a NETCONF session to configure requested access interface of BNG and User’s configuration template. And then the user dialup via VXLAN, the CP sends the USER_BASIC_INFOR message, USER_IPV4_INFOR message, and USER_ROUTEV4_INFO message to UP, the UPs reports the user detection results and user’s traffic status.
</t>
<t>Once above process has been accomplished, the CP sends the USER_QOS_AUTH_INFO message to UPs that contains a variety of objects that specify the set of constrains and attributes for the user’s required QoS.(Note that the format of these QoS attributes should synchronize with QoS configuration templates.)
</t>
</section>
<section title="CUSP session statistic">
<figure>
<artwork><![CDATA[
       UP                                CP
        |                                    |
        |                                    |
        |<-----statistic REQUEST ------------|
        |                                    |
        |------statistic_REQUEST (ACK)------>|
        |                                    |
        |------statistic_BEGIN-------------->|
        |                                    |
        |<-----statistic_BEGIN (ACK)---------|
        |                                    |
        |------statistic_DATA--------------->|
        |                                    |
        |------statistic_END---------------->|
        |                                    |
        |<-----statistic_END (ACK)-----------|
        |                                    |
        |                                    |

]]>	
</artwork>
</figure>
<t>
If the CUSP session down, the CU separation BNG required that the users’ information should be reserved. And if the CUSP session restart, the CP may request the UP to report the previous session’s statistics to synchronize user information. Above figure describe this process, and the details about the session statistic message can be found in Sections 6.3 respectively.
</t>
</section>
</section>

<section title="CUSP common header">
<t>
A CUSP message consists of a common header followed by a variable-length body made of a set of objects.  A CUSP message with a missing mandatory object MUST trigger an Error message (see Section 5.6). Conversely, if an object is optional, the object may or may not be present.
</t>
<t>Common header:</t>
<figure>
<artwork><![CDATA[
     0                   1                   2                   3
     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Message-Type |F|     Resv    |       Message-Length          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          Transaction id                       |                                      
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        CUSP Message Common Header

]]>	
</artwork>
</figure>
<t>   Message-Type (8 bits):  The following message types are currently
      defined:
</t>
<figure>
<artwork><![CDATA[
         Value    Meaning
           1        Update objective
           2        Hello 
           3        Smooth Request
           4        Smooth Begin 
           5        Smooth Data 
           6        Smooth End 
           7        Source Report
           8        Event Report
           9        Error
]]>	
</artwork>
</figure>
<t>Flags (1 bits): The control message ACK mode be enabled by setting it to one. </t>
<t>Resv (7 bits): Unassigned bits are considered as reserved.  They MUST be set to zero on transmission and MUST be ignored on receipt.</t>
<t>Message-Length (16 bits):  total length of the CUSP message including the common header, expressed in bytes.</t>
</section>

<section title="Objective Message Formats ">
 <t>CUSP objects have a common format.  They begin with a CUSP common header
 (see Section 4).  This is followed by object-specific fields defined for each different object.  The object may also include one or more type-length-value (TLV) encoded data sets.  Each TLV has the same structure as described in Section 5.1.
</t>
 
 <section title="Objective TLV Format">
 <t>A CUSP object may include a set of one or more optional TLVs.
All CUSP objective TLVs have the following format:
</t>
<t><figure>
          <artwork><![CDATA[
     0                   1                   2                   3
     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |             type              |       Message-Length          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                     Value                                     |              
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

	Type:   2 bytes
    Length: 2 bytes
    Value:  variable

]]>	  
		  </artwork>
          </figure>
		 </t>

<t>		 
A CUSP object TLV is comprised of 2 bytes for the type, 2 bytes specifying the TLV length, and a value field.
</t>
<t> 
The first 4 bits of Type field indicate the operation of this TLV, currently, there are two types: 0 – update the objectives; 1 – delete the objectives.</t>
<t>
The other bits of Type field indicate the TLV’s type (4-15 bits), the following message types are currently defined:
</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
0     USER_BASIC_INFO
1     USER_PPP_INFO
2     ACCESS_IFSRV_INFO
3     USER_IPV4_INFO
4     USER_IPV6_INFO
5     USER_QOS_AUTH_INFO
6     ROUTEV4_INFO
7     ROUTEV6_INFO
8     STATIC_USER_INFO


]]>	  
		  </artwork>
          </figure>
		 </t>
<t>The Length field defines the length of the value portion in bytes. The TLV is padded to 4-bytes alignment; padding is not included in the Length field (so a 3-byte value would have a length of 3, but the total size of the TLV would be 8 bytes).</t>
<t>Unrecognized TLVs MUST be ignored.</t>
<t>IANA management of the CUSP Object TLV type identifier codespace is described in Section 11.</t>
<t>The details about the attributes of Objective TLV are specified in [Section 4.1 of draft-cuspdt-rtgwg-cu-separation-infor-model-00]</t>

</section>
</section>

<section title="Control Message Format">
<t>
CUSP Control TLV have a common format.  They begin with a CUSP common header (see Section 3).  It is followed by control TLV fields defined for each different control operations.  It may also include one or more type-length-value (TLV) encoded control data sets.  Each TLV has the same structure as described in Section 6.1.
</t>
<t>For each CUSP message type, rules are defined that specify the set of objects that the message can carry.  We use the Backus-Naur Form (BNF) (see [RBNF]) to specify such rules.  Square brackets refer to optional sub-sequences.  An implementation MUST form the CUSP messages using the object ordering specified in this document.</t>
<section title="Control TLV Format">
<t>A CUSP control may include a set of one or more optional TLVs.
All CUSP control TLVs have the following format:
</t>
<t><figure>
          <artwork><![CDATA[
Type:   2 bytes
Length: 2 bytes
Value:  variable

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>A CUSP control TLV is comprised of 2 bytes for the type, 2 bytes specifying the TLV length, and a value field.</t>
<t>Control Type (8 bits):  The following message types are currently defined:</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
0     Hello
1     Smooth


]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
The Length field defines the length of the value portion in bytes. The TLV is padded to 4-bytes alignment; padding is not included in the Length field (so a 3-byte value would have a length of 3, but the total size of the TLV would be 8 bytes).
</t>
<t>
Unrecognized TLVs MUST be ignored.
</t>
<t>IANA management of the CUSP Object TLV type identifier codespace is described in Section 11.</t>		 
</section>

<section title="Hello Message">
<t>The Hello message is a CUSP message sent by a UP to a CP and by a CP to a UP in order to establish a CUSP session.  The Type field of the CUSP common header for the Hello message is set to 2.</t>
<t>Once the TCP connection has been successfully established, the first message sent by the UP to the CP or by the CP to the UP MUST be a Hello message.</t>
<t>Any message received prior to a Hello message MUST trigger a protocol error condition causing an ERROR message to be sent with Error-Type Version_ Negotiation_Failed and the CUSP session establishment attempt MUST be terminated by closing the TCP connection.</t>
<t>The Hello message is used to establish a CUSP session between the CUSP peers.  During the establishment phase, the CUSP peers exchange version information.  If both parties agree on such version negotiation, the CUSP session is successfully established.</t>
<t>The format of a Hello message is as follows:</t>
<t><figure>
          <artwork><![CDATA[
   <Hello Message>::= <Common Header>
                      <HELLO_TLV>
   <Hello_TLV>:: = <version>

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
Version (4 bytes) : specifies the CP/UP supported CUSP’s version, currently, the version is 1.
</t>
</section>
<section title="Smooth Message">
<t>
If the CUSP session down, the CU separation BNG required that the users’ information should be reserved. And if the CUSP session restart, the CP may request the UP to report the previous session’s statistics to synchronize user information.
</t>
<t>
The Type field of the CUSP common header for the Smooth message is set to 3/4/5/6.
</t>
<t>
The format of a Smooth message is as follows:
</t>

<t><figure>
          <artwork><![CDATA[
   <Hello Message>::= <Common Header>
                      <Smooth_TLV>
   <Smooth_TLV>::= <ClassID><Event><Resv>

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>ClassID (2 bytes): specified the statistics type of CUS session, the following statistics types are currently defined:</t>

<t><figure>
          <artwork><![CDATA[
Value    Meaning
0        objective message statistic
1	     Source report message statistic
2	     Event report message statistic

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>Event (2 bytes): specified the Smooth message’s subtypes, the following subtypes are currently defined:</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
0	     request smooth message
1	     begin smooth message
2	     Smooth data message
3	     End smooth message

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>Note that, the event value MUST be synchronized with the type of comment header. </t>
</section>
</section>
	
<section title="Event TLV Format">
<t>
CUSP Event TLV have a common format.  They begin with a CUSP common header (see Section 3).  It is followed by Event TLV fields defined for each different Events.  It may also include one or more type-length-value (TLV) encoded Event data sets.  Each TLV has the same structure as described in Section 7.1.
</t>

<t>
For each CUSP message type, rules are defined that specify the set of objects that the message can carry.  We use the Backus-Naur Form (BNF) (see [RBNF]) to specify such rules.  Square brackets refer to optional sub-sequences.  An implementation MUST form the CUSP messages using the object ordering specified in this document.
</t>

<section title="Event TLV Format">
<t>
A CUSP Event may include a set of one or more optional TLVs.
All CUSP Event TLVs have the following format:
</t>
<t><figure>
          <artwork><![CDATA[
Type:   2 bytes
Length: 2 bytes
Value:  variable


]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
A CUSP Event TLV is comprised of 2 bytes for the type, 2 bytes specifying the TLV length, and a value field.
</t>
<t>
Event Type (8 bits):  The following message types are currently defined:
</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
0        USER_TRAFFIC_INFORMATION
1        USER_DETECT_RESULT_ INFORMATION

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>The Length field defines the length of the value portion in bytes. The TLV is padded to 4-bytes alignment; padding is not included in the Length field (so a 3-byte value would have a length of 3, but the total size of the TLV would be 8 bytes).</t>
<t>Unrecognized TLVs MUST be ignored.</t>
<t>IANA management of the CUSP Object TLV type identifier codespace is described in Section 11.</t>
</section>
<section title="USER_TRAFFIC_INFORMATION Message">
<t>
The USER_TRAFFIC_INFORMATION Message be used to reported the user’s traffic statistics by UP.
</t>
<t>
The format of a USER_TRAFFIC_INFORMATION message is as follows:
</t>
<t><figure>
          <artwork><![CDATA[
  <USER_TRAFFIC_INFORMATION Message>::= <Common Header>
                                        <USER_TRAFFIC_INFORMATION_TLV>
  <USER_TRAFFIC_INFORMATION _TLV>::= <UserId><StatisticsType>
                                     <IngressPackets><IngressBytes>
                                     <EngressPackets>< EgressBytes >
]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
USER_ID (4 bytes): is the identifier of user.  This parameter is unique and
 mandatory.  This attribute is used to distinguish different users.
</t>
<t>
StatisticsType (4 bytes): be used to indicate the Statistics type, the following types are currently defined:
</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
0     IPv4 traffic statistic
1     IPv6 traffic statistic

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
IngressPackets (8 bytes): be used to present the ingress packets.
</t>
<t>
IngressBytes (8 bytes): be used to present the ingress bytes.
</t>
<t>
EgressPackets (8 bytes): be used to present the egress packets.
</t>
<t>
EgressBytes (8 bytes): be used to present the egress bytes.
</t>
</section>
<section title="USER_DETECT_RESULT_ INFORMATION Message">
<t>
The USER_TRAFFIC_INFORMATION Message be used to reported the user detect fail by UP.
</t>
<t>
The format of a USER_DETECT_RESULT_ INFORMATION message is as follows:
</t>
<t><figure>
          <artwork><![CDATA[
< USER_DETECT_RESULT_ INFORMATION Message>::= <Common Header>
                                              < USER_DETECT_RESULT_ INFORMATION _TLV>
< USER_DETECT_RESULT_ INFORMATION _TLV>::= <UserId><DetectFail>

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
USER_ID (4 bytes): is the identifier of user.  This parameter is unique and
 mandatory.  This attribute is used to distinguish different users.
</t>
<t>
 DetectFail (2 bytes): be used to indicate that the user detect fail.
</t>
</section>
</section>	 
<section title="Resource Report TLV Format">
<t>
CUSP Resource Report TLV have a common format.  They begin with a CUSP common header (see Section 3).  It is followed by Event TLV fields defined for each different Resources.  It may also include one or more type-length-value (TLV) encoded Resource Report data sets.  Each TLV has the same structure as described in Section 7.1.
</t>
<section title="Resource Report TLV Format">
<t>
A CUSP Resource Report may include a set of one or more optional TLVs.
All CUSP Resource Report TLVs have the following format:
</t>
<t><figure>
          <artwork><![CDATA[
Type:   2 bytes
Length: 2 bytes
Value:  variable

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
A CUSP Resource Report TLV is comprised of 2 bytes for the type, 2 bytes specifying the TLV length, and a value field.
</t>
<t>
Resource Type (8 bits):  The following message types are currently defined:
</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
0        RESOURCE_IF_INFO
1	     RESOURCE_SLOT_INFO
]]>	  
		  </artwork>
          </figure>
		 </t>
<t>
The Length field defines the length of the value portion in bytes. The TLV is padded to 4-bytes alignment; padding is not included in the Length field (so a 3-byte value would have a length of 3, but the total size of the TLV would be 8 bytes).
</t>
<t>
Unrecognized TLVs MUST be ignored.
</t>
<t>
IANA management of the CUSP Object TLV type identifier codespace is described in Section 11.
</t>
<t>
The details about the attributes of Resource Report TLV are specified in [Section 4.2 of draft-cuspdt-rtgwg-cu-separation-infor-model-00]
</t>
</section>
</section>
<section title="Error Message Format">
<t>
Error messages are used by the CP or UPs to notify the other side of the connection of problems. They are mostly used by the UPs to indicate a failure of a request initiated by the CP. 
</t>
<t>The format of an Error message is as follows:</t>
<t><figure>
          <artwork><![CDATA[
            <Err Message> ::= <Common Header>
                              <ERRID>

]]>	  
		  </artwork>
          </figure>
		 </t>
<t>ERRID (4 bytes): be used to indicate the error type, the following types are currently defined:</t>
<t><figure>
          <artwork><![CDATA[
Value    Meaning
00~1000  Reserved      
1001     version negotiation failed
1002     TLV type cannot be recognized
1003     TLV length Anomaly
1004     TLV objective Anomaly
1005     Smooth failed
1006     Smooth request not support


]]>	  
		  </artwork>
          </figure>
		 </t>

</section>  
  

  <section title="Security Considerations">
    <t>
      None.
    </t>
  </section>



  <section title="IANA Considerations">
    <t>
      None.
    </t>
  </section>


 </middle>

 <back>

  <references title="Normative References">

   <?rfc include="reference.RFC.2119.xml"?>
   <?rfc include="reference.RFC.2863.xml"?>
   <?rfc include="reference.RFC.5837.xml"?>
   <?rfc include="reference.RFC.5511.xml"?>
<?rfc include="reference.I-D.draft-cuspdt-rtgwg-cu-separation-bng-deployment-00"?>
<?rfc include="reference.I-D.draft-cuspdt-rtgwg-cusp-requirements-01"?>
<?rfc include="reference.I-D.draft-cuspdt-rtgwg-cu-separation-infor-model-00"?>
  </references>


 </back>

</rfc>
