<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5222 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5222.xml">
<!ENTITY RFC5031 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5031.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?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="std" docName="draft-wei-paws-database-discovery-00" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <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="Abbreviated Title">PAWS Database Discovery</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Xinpeng Wei" initials="X.W." surname="Wei">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street></street>

          <!-- Reorder these if your country does things differently -->

          <city></city>

          <region></region>

          <code></code>

          <country></country>
        </postal>

        <phone>+86 134 3682 2355</phone>

        <email>weixinpeng@huawei.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <author fullname="Lei Zhu" initials="L.Z" role="" surname="Zhu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street></street>

          <!-- Reorder these if your country does things differently -->

          <city></city>

          <region></region>

          <code></code>

          <country></country>
        </postal>

        <phone>+86 139 1015 7020</phone>

        <email>lei.zhu@huawei.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
    <date month="February" year="2013" />

    <!-- 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>General</area>

    <workgroup>Internet Engineering Task Force</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>PAWS</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>This document provides a Database Discovery mechanism for PAWS. By this mechanism the master device gets the available WSDBs it can communicate to and the regulatory domain information. The mechanism is based on LoST protocol .</t>
    </abstract>
  </front>

  <middle>
  
  
  	<section title="Introduction">
		<t>In PAWS protocol, the master device queries the database for available spectrum, but the device MUST determine the URI for the database before it can send any PAWS messages. </t>

		<t>The URI of database can be pre-configured manually in the device before it sends any PAWS messages, for example, the owner of the device can configure the URI when he/she wants to use the master device in certain area. This method needs the owner of the device to know the available database that can be used in the regulatory domain.</t>

		<t>The URI of database can also be obtained by a dynamic discovery process, and this is where this document focuses. Before the device sends any PAWS messages to the database, it first starts a Database Discovery Procedure to retrieve the available database(s) and applicable regulatory domain information. This document provides an optional method for the master device to find an available WSDB. </t>

		<t>In discovery procedure, the URI for the database SHOULD be obtained from an authorized and authenticated entity. The master device provides its current geo-location information to the entity in Database Discovery Request message, and the entity will return a list of available databases and the regulatory body that has jurisdiction over the master device's location. </t>

		<t>When the master device gets the information about available database and regulatory body, it can choose the proper database for querying white space spectrum by PAWS procedures.</t>

		<t>The database discovery mechanism is based on LoST protocol <xref target="RFC5222"> RFC5222</xref>.</t>


  	</section>
  	
  	<section anchor="Terminology and Conventions" title="Terminology and Conventions">
  	
 
	<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">RFC2119</xref>.</t>

	<t>The terminology from PAWS: problem statement, use cases and requirements <xref target="PAWS RQMTS">PAWS RQMTS</xref> is applicable to this document.</t>

<t>White Space Database (WSDB)</t>
<t>In the context of white space and cognitive radio technologies, the database is an entity which contains, but is not limited to, current information as required by the regulatory policies about available spectrum at any given location and time, and other types of related (to the white space spectrum) or relevant information.</t>

<t>White Space Database Discovery Server (WSDB DS)</t>
<t>A server function provided to a white space device, the client. The white space device contacts a white space database discovery server to receive the service of discovering or identifying one or more white space databases. The white space database discovery server is a known entity to the white space device, which knows at least a useable internet address for the white space database discovery server. The white space database discovery server takes as input positioning information from the white space device and returns both address information which allows the white space device to contact a trusted, regulatory-authorized white space database, suitable for service at the white space device's current location and indication of the regulatory domain governing at the white space device's current location. A single white space database discovery server may have global scope, serving clients located globally.</t>

<t>Service boundary</t>
<t>A service boundary circumscribes the region within which all locations map to the same service URI or set of URIs for a given service. A service boundary may consist of several non-contiguous geometric shapes.</t>

<t>Mapping</t>
<t>Mapping is a process that takes a location and a service identifier as inputs and returns one or more URIs. Those URIs can point either to a host providing that service or to a host that in turn routes the request to the final destination. </t>

</section>


<section anchor="Overview of Architecture" title="Overview of Architecture ">
<t>Before the WSD can query a trusted WSDB for a list of available frequencies or channels for use in the white space spectrum, the WSD must first discover the available databases and addresses serving the regulatory domain in which the device is currently located. At power-up the WSD does not reliably know the regulatory domain corresponding to its current location, and therefore does not reliably know with which white space database(s) it can communicate. Furthermore it is essential that the WSD connect with a trusted WSDB for proper operation and indeed regulatory compliance.</t>

<t>While it is possible that a WSD knows its location, or information which may be used to derive its location, it is not reasonable for every WSD to be capable to translate this information into the current regulatory domain, i.e. the WSD needs assistance to know what is the regulatory environment with jurisdiction at its current location.</t>

<t>A WSDB Discovery Server (DS) takes as input location information from the WSD and returns to the WSD one or more addresses of WSDBs (or WSDB listing servers as appropriate) to the WSD.  If the address or addresses of these WSDB DSs are included in the WSD firmware, a secure starting point for a trusted relationship is established.</t>

<t>Figure 1 shows at a high level how white space master devices discover a suitable trusted white space database. In this document we describe how the master device may collect the addresses of one or more white space database. Steps and criteria to sort multiple addresses into a priority order is left to implementation and not specified.  Procedures to contact a white space database are specified in <xref target="PAWS PROTOCOL">PAWS PROTOCOL</xref>. Steps and criteria to determine the suitability of a particular white space database are also not considered in this document.</t>
<figure  anchor="fig:1" title="High level view of white space database discovery">
<artwork><![CDATA[
                                 +-----------------------+
                                 | collect addresses of  |
                                 | white space databases |
                                 |                       |
                                 +-----------------------+
                                             |
                                             |
                                 +-----------------------+
                                 |     sort multiple     |
                                 | addresses in priority |
                                 |         order         |
                                 +-----------------------+
                                             |
                            repeat as needed |
                            ---------------->|
                            |                |
                            |    +-----------------------+
                            |    | contact top priority  |
                            ---- | database to determine |
                                 |    suitability for    |
                                 |       service         |
                                 +-----------------------+
                                             |
                                             |
                                            end
]]></artwork>

</figure>
<t>After master device has selected a suitable database for service, it can then use the PAWS protocol <xref target="PAWS PROTOCOL">PAWS PROTOCOL</xref> to retrieve the available spectrum for its location. </t>

<t>An overview of procedures of how master device gets available spectrum from WSDB is depicted in Figure 2.</t>

<figure anchor="fig:2" title="An overview of procedures of how master device gets available spectrum from WSDB">
<artwork><![CDATA[
  +-----------+                +-----------+             +----------+
  |           |                |   WSDB    |             |          |
  |    WSD    |                | Discovery |             |   WSDB   |
  |           |                |   Server  |             |          |
  +-----------+                +-----------+             +----------+
        |                            |                         |
        |     Discovery Request      |                         |
        |(location information, etc) |                         |
        |--------------------------->|                         |
        |                            |                         |
        |     Discovery Response     |                         |
        | (address information, etc) |                         |
        |<---------------------------|                         |
        |                            |                         |
        |                            |                         |
        | /--------------------------|-----------------------\ |
        |/       channel request     |                        \|
        |\       channel response    |         (PAWS)         /|
        | \--------------------------|-----------------------/ |
        |                            |                         |
        |                            |                         |
]]></artwork>
</figure>

<t>(1) Discovery Request procedure. This message is used by master device to query available WSDB from WSDB DS; it conveys master's location and some other related information to WSDB DS.</t>
<t>(2) Discovery Response procedure. This procedure conveys the regulatory domain and either the address of a listing server or the address of one or more WSDB authorized to provide service where the WSD is physically located to the master device. If spectrum access is not authorized at the WSD physical location, the response will contain an error code and no address information.</t>

<t>After WSDB discovery procedure, the master device can query available white space spectrum from the WSDB using PAWS protocol.</t>


<section title="System Architecture">
<t>The discovery system is based on client-server model; the basic model is shown as Figure 3, where WSDB DB plays the role of server.</t>
<figure anchor="fig:3" align="center" title="DB discovery system model">
<artwork><![CDATA[
+----------+                +----------+
| Master   |   <-------->   | WSDB DS  |
+----------+                +----------+
]]></artwork>
</figure>

<t>For the discovery mechanism to work well, some assumptions have to be considered:</t>
<t>(1) Master device can get its geo-location directly or indirectly. </t>
<t>(2) Master device has gotten the URL (or IP address) of a trusted WSDB DS before starting the discovery procedure.</t>

<t>By including contact information of a trusted WSDB DS in the WSD's programmed instructions or firmware, the WSD can reliably determine the address of a trusted database listing server, as appropriate for its current physical location. Because the WSDB DS is selected by the WSD manufacturer, a foundation is set to ensure the WSD will be able to discover a trusted WSDB in every regulatory domain where the manufacturer expects the WSD to be used. The address of at least one WSDB DS is included in the WSD operating instructions or firmware by the manufacturer for example or provisioned using device configuration mechanisms.  </t>

<t>When the WSD does not have the address of a serviceable WSDB (e.g. at power-up), the WSD sends a Discovery Request message to a WSDB DS. The WSD includes in the Discovery Request information about its current location. The WSDB DS uses this location information to determine the regulatory domain where the WSD is located, and returns a Discovery Response message which includes the address of one or more WSDBs (or WSDB listing server as appropriate) to the WSD. </t> 

</section>
</section>

<section title="Specification">
<t>LoST (Location to Service Translation Protocol) is a protocol for mapping a service identifier (URN) and location information to one or more service URLs and associated information. LoST mapping queries can contain either civic or geodetic location information. LoST queries can be resolved recursively or iteratively.</t>

<t>LoST messages are carried in HTTP and HTTPS protocol exchanges, facilitating use of TLS for protecting the integrity and confidentiality of requests and responses.</t>

<t>This discovery mechanism utilizes LoST to communicate between master device and WSDB DS, the master device acts as LoST client and WSDB DS plays the role of LoST server. The protocol stack is shown in Figure 4. To use LoST for this discovery mechanism, several issues have to be clarified.</t>

<figure anchor="fig:4" align="center"title="Protocol stack for discovery mechanism">
<artwork><![CDATA[
+------------+
|  LoST      +
+------------+
|  HTTPS     +
+------------+
|   TCP      +
+------------+
|    IP      +
+------------+

]]></artwork>
</figure>

	<section title="Issues to be clarified">
		<section title="Service Identifier">
		<t>A new service identifier for PAWS database discovery needs to be defined, according to <xref target="RFC5031">RFC5031</xref>, a top-level service and a sub-service are defined here. </t>
		 <texttable anchor="a" title="">
 

          <ttcol align="center">Service</ttcol>

          <ttcol align="center">Description</ttcol>

          <c>paws</c>

          <c>top-level service of PAWS</c>

          <c>paws.discovery</c>

          <c>the PAWS database discovery service</c>
     </texttable>
     <t>So according to the service-identifying labels defined above, the service URN for PAWS database discovery service is as follow: </t>
			<t>urn:service:paws.discovery</t>

		</section>
		<section title="Conveying of regulatory domain ">
		<t>The name of regulatory domain can be conveyed using <![CDATA[<displayName>]]> element in the LoST response message.</t>
		<t>[Note: the format and content of the regulatory domain information are TBD.]</t>

		</section>
	</section>
	
	
	<section title="Discovery procedures">
		<section title="Discovery Request procedure">
		<t>The discovery request procedure uses the <![CDATA[<findService>]]> query message of LoST for conveying parameters.
				Master device's location information will be included in the <![CDATA[<location>]]> element. </t>
		<t>The service identifier defined in section 5.1.1 is specified in the <![CDATA[<service>]]>element.</t>

		<t>The following is an example of discovery request procedure message, using geodetic coordinates.</t>
		<figure><artwork>
		<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
   <findService
     xmlns="urn:ietf:params:xml:ns:lost1"
     xmlns:p2="http://www.opengis.net/gml"
     serviceBoundary="value"
     recursive="true">
     <location id="6020688f1ce1896d" profile="geodetic-2d">
       <p2:Point id="point1" srsName="urn:ogc:def:crs:EPSG::4326">
          <p2:pos>37.775 -122.422</p2:pos>
       </p2:Point>
     </location>
     <service>urn:service:paws.discovery</service>
   </findService>

		]]></artwork></figure>
		</section>
		
		
		
		<section title="Discovery Response procedure">
		<t>The discovery response procedure uses the <![CDATA[<findServiceResponse>]]> response message of LoST for conveying parameters.</t>

		<t>After receiving the <![CDATA[<findService>]]> query message, the WSDB DS will map the location information and service identifier to one or more available WSDBs' URL.</t>

		<t>Then in the <![CDATA[<findServiceResponse> ]]>message, a list of WSDBs' URL and regulatory domain that has jurisdiction over the current location will be conveyed to master device. The regulatory domain is contained in <![CDATA[<displayName>]]> element.</t>

		<t>The service boundary of the WSDB can also be included in the response message to indicate the region for which the service URL returned would be the same as in the actual query. Or a service boundary reference can be returned to master device, and master device retrieve service boundary by this reference as needed. Next time when the master device powers up, if its location is within the service boundary it then may use the WSDB retrieved before.</t>

		<t>An example of discovery response procedure message is shown as follow:</t>
		<figure><artwork>
		<![CDATA[
	<?xml version="1.0" encoding="UTF-8"?>
   <findServiceResponse xmlns="urn:ietf:params:xml:ns:lost1"
     xmlns:p2="http://www.opengis.net/gml">
     <mapping
       expires="2013-05-01T01:44:33Z"
       lastUpdated="2012-11-01T01:00:00Z"
       source="authoritative.example"
       sourceId="7e3f40b098c711dbb6060800200c9a66">
       <displayName xml:lang="en">
         Federal Communications Commission
       </displayName>
       <service>urn:service:paws.discovery</service>
       <serviceBoundary profile="geodetic-2d">
         <p2:Polygon srsName="urn:ogc:def::crs:EPSG::4326">
           <p2:exterior>
             <p2:LinearRing>
               <p2:pos>37.775 -122.4194</p2:pos>
               <p2:pos>37.555 -122.4194</p2:pos>
               <p2:pos>37.555 -122.4264</p2:pos>
               <p2:pos>37.775 -122.4264</p2:pos>
               <p2:pos>37.775 -122.4194</p2:pos>
             </p2:LinearRing>
           </p2:exterior>
         </p2:Polygon>
       </serviceBoundary>
       <uri>database1.example1.com</uri>
       <uri>database2.example2.com</uri>
     </mapping>
     <path>
       <via source="resolver.example"/>
       <via source="authoritative.example"/>
     </path>
     <locationUsed id="6020688f1ce1896d"/>
   </findServiceResponse>
		]]></artwork></figure>
		</section>
		
		
		<section title="Recursion and Iteration">
		<t>If the WSDB DS can not provide available WSDB for master device, then it may wish other WSDB DS to serve the master device's query request. In LoST, recursion and iteration patterns are provided for this purpose.</t>

		<t>In recursive mode, the LoST server initiates queries on behalf of the requester and returns the result to the requester.</t>

		<t>In iterative mode, the server contacted returns a redirection response indicating the next server to be queried if the server contacted cannot provide an answer itself.</t>
		</section>
		
	</section>

</section> 


<section title="Security Considerations">
<t>TBD.</t>
</section>


<section title="IANA Consideration">
<t>Registration of service URN for PAWS database discovery service. </t>
		 <texttable anchor="b" title="">
 

          <ttcol align="center">Service</ttcol>

          <ttcol align="center">Description</ttcol>

          <c>paws</c>

          <c>top-level service of PAWS</c>

          <c>paws.discovery</c>

          <c>the PAWS database discovery service</c>
     </texttable>
</section>

<section anchor="Acknowledgements" title="Acknowledgements">
   <t>Thanks to my colleagues for their sincerely help and comments when
   drafting this document.</t>
</section>


  </middle>


  <back>
  

    <references title="Normative references">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
     &RFC2119; 
     &RFC5222;
     &RFC5031;
      
    </references>

		<references title="Informative References">

      <reference anchor="PAWS RQMTS">

        <front>
          <title>Protocol to Access White Space database: PS, use cases and rqmts</title>
        <author initials='S' surname='Probasco' fullname='Scott Probasco'>
            <organization />
        </author>

        <author initials='B' surname='Patil' fullname='Basavaraj Patil'>
            <organization />
        </author>
				<date month='January' day='2' year='2013' />

        </front>
        <seriesInfo name='Internet-Draft' value='draft-ietf-paws-problem-stmt-usecases-rqmts-12' />
        
      </reference> 
        
      <reference anchor="PAWS PROTOCOL">

        <front>
          <title> Protocol to Access Spectrum Database</title>
        <author initials='V.C.' surname='Chen' fullname='Vicent Chen'>
            <organization />
        </author>

        <author initials='S.D.' surname='Das' fullname='Subir Das'>
            <organization />
        </author>
        <author initials='L.Z.' surname='Zhu' fullname='Lei Zhu'>
            <organization />
        </author>
        <author initials='P.M.' surname='McCann' fullname='Peter McCann'>
            <organization />
        </author>
				<author initials='J.M.' surname='Malyar' fullname='John Malyar'>
            <organization />
        </author>
				<date month='December' day='18' year='2012' />

        </front>
        <seriesInfo name='Internet-Draft' value='draft-ietf-paws-protocol-01' />
        
      </reference>   
         

    </references>


  </back>
</rfc>
