Internet Engineering Task Force (IETF)                           J. Polk
Request for Comments: 6225                                    M. Linsner
Obsoletes: 3825                                            Cisco Systems
Category: Standards Track                                     M. Thomson
ISSN: 2070-1721                                       Andrew Corporation
                                                           B. Aboba, Ed.
                                                   Microsoft Corporation
                                                               July 2011


            Dynamic Host Configuration Protocol Options for
          Coordinate-Based Location Configuration Information

Abstract

   This document specifies Dynamic Host Configuration Protocol options
   (both DHCPv4 and DHCPv6) for the coordinate-based geographic location
   of the client.  The Location Configuration Information (LCI) includes
   Latitude, Longitude, and Altitude, with resolution or uncertainty
   indicators for each.  Separate parameters indicate the reference
   datum for each of these values.  This document obsoletes RFC 3825.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc6225.
















Polk, et al.                 Standards Track                    [Page 1]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


Copyright Notice

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

   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.

   This document may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the copyright in some of this
   material may not have granted the IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an RFC or to translate it into languages other
   than English.

























Polk, et al.                 Standards Track                    [Page 2]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


Table of Contents

   1. Introduction ....................................................3
      1.1. Conventions Used in This Document ..........................4
      1.2. Resolution and Uncertainty .................................4
   2. DHCP Option Formats .............................................6
      2.1. DHCPv6 GeoLoc Option .......................................6
      2.2. DHCPv4 Options .............................................8
      2.3. Latitude and Longitude Fields .............................11
      2.4. Altitude ..................................................14
      2.5. Datum .....................................................16
   3. Security Considerations ........................................17
   4. IANA Considerations ............................................17
      4.1. DHCP Options ..............................................17
      4.2. Altitude Type Registry ....................................18
      4.3. Datum Registry ............................................18
      4.4. GeoLoc Option Version Registry ............................19
   5. Acknowledgments ................................................20
   6. References .....................................................20
      6.1. Normative References ......................................20
      6.2. Informative References ....................................21
   Appendix A. GML Mapping ...........................................23
       A.1. GML Templates ............................................23
   Appendix B. Calculations of Resolution ............................27
       B.1. Location Configuration Information of "White House"
            (Example 1) ..............................................27
       B.2. Location Configuration Information of "Sears Tower"
            (Example 2) ..............................................29
   Appendix C. Calculations of Uncertainty ...........................30
       C.1. Location Configuration Information of "Sydney Opera
            House" (Example 3) .......................................30
   Appendix D. Changes from RFC 3825 .................................34

1.  Introduction

   The physical location of a network device has a range of
   applications.  In particular, emergency telephony applications rely
   on knowing the location of a caller in order to determine the correct
   emergency center.

   The location of a device can be represented either in terms of
   geospatial (or geodetic) coordinates, or as a civic address.
   Different applications may be more suited to one form of location
   information; therefore, both the geodetic and civic forms may be used
   simultaneously.






Polk, et al.                 Standards Track                    [Page 3]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   This document specifies Dynamic Host Configuration Protocol v4
   (DHCPv4) [RFC2131] and DHCPv6 [RFC3315] options for the coordinate-
   based geographic location of the client, to be provided by the
   server.  "Dynamic Host Configuration Protocol (DHCPv4 and DHCPv6)
   Option for Civic Addresses Configuration Information" [RFC4776]
   specifies DHCP options for civic addresses.

   The geodetic coordinate options defined in this document and the
   civic address options defined in RFC 4776 [RFC4776] enable a DHCP
   client to obtain its location.  For example, a wired Ethernet host
   might use these options for location determination.  In this case,
   the location information could be derived from a wiremap by the DHCP
   server, using the Circuit ID Relay Agent Information Option (RAIO)
   defined (as Sub-Option 1) in RFC 3046 [RFC3046].  The DHCP server
   could correlate the Circuit ID with the geographic location where the
   identified circuit terminates (such as the location of the wall
   jack).

   The mechanism defined here may also be utilized to provide location
   to wireless hosts.  DHCP relay agent sub-options (RAIO) [RFC3046]
   provide one method a DHCP server might use to perform host location
   determination.  Currently, the relay agent sub-options do not include
   data sets required for device-level location determination of
   wireless hosts.  In cases where the DHCP server uses RAIO for
   location determination, a wireless host can use this mechanism to
   discover the location of the radio access point, or the area of
   coverage for the radio access point.

   An important feature of this specification is that after the relevant
   DHCP exchanges have taken place, the location information is stored
   on the end device rather than somewhere else, where retrieving it
   might be difficult in practice.

1.1.  Conventions Used in This Document

   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 [RFC2119].

1.2.  Resolution and Uncertainty

   The DHCP options defined in this document include fields quantifying
   the resolution or uncertainty associated with a target location.  No
   inferences relating to privacy policies can be drawn from either
   uncertainty or resolution values.






Polk, et al.                 Standards Track                    [Page 4]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   As utilized in this document, resolution refers to the accuracy of a
   reported location, as expressed by the number of valid bits in each
   of the Latitude, Longitude, and Altitude fields.

   The Latitude (LaRes), Longitude (LoRes), and Altitude (AltRes)
   Resolution fields are encoded as 6-bit, unsigned integer values.  In
   the DHCPv4 GeoConf Option 123, the LaRes, LoRes, and AltRes fields
   are used to encode the number of bits of resolution.  The resolution
   sub-fields accommodate the desire to easily adjust the precision of a
   reported location.  Contents beyond the claimed resolution MAY be
   randomized to obscure greater precision that might be available.

   In the context of location technology, uncertainty is a
   quantification of errors.  Any method for determining location is
   subject to some sources of error; uncertainty describes the amount of
   error that is present.  Uncertainty might be the coverage area of a
   wireless transmitter, the extent of a building, or a single room.

   Uncertainty is usually represented as an area within which the target
   is located.  In this document, each of the three axes can be assigned
   an uncertainty value.  In effect, this describes a rectangular prism,
   which may be used as a coarse representation of a more complex shape
   that fits within it.  See Section 2.3.2 for more detail on the
   correspondence between shapes and uncertainty.

   When representing locations from sources that can quantify
   uncertainty, the goal is to find the smallest possible rectangular
   prism that this format can describe.  This is achieved by taking the
   minimum and maximum values on each axis and ensuring that the final
   encoding covers these points.  This increases the region of
   uncertainty, but ensures that the region that is described
   encompasses the target location.

   The DHCPv4 option formats defined in this document support resolution
   and uncertainty parameters.  The DHCPv4 GeoConf Option 123 includes a
   resolution parameter for each of the dimensions of location.  Since
   this resolution parameter need not apply to all dimensions equally, a
   resolution value is included for each of the three location elements.
   The DHCPv4 GeoLoc Option 144 as well as the DHCPv6 GeoLoc Option 63
   format utilize an uncertainty parameter.

   Appendix A describes the mapping of DHCP option values to the
   Geography Markup Language (GML).  Appendix B of this document
   provides examples showing the calculation of resolution values.
   Appendix C provides an example demonstrating calculation of
   uncertainty values.





Polk, et al.                 Standards Track                    [Page 5]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   Since the Presence Information Data Format Location Object (PIDF-LO)
   [RFC4119] [RFC5491] is used to convey location and the associated
   uncertainty within an emergency call [Convey], a mechanism is needed
   to convert the information contained within the DHCPv4 and DHCPv6
   options to PIDF-LO.  This document describes the following
   conversions:

   o  DHCPv4 GeoConf Option 123 to PIDF-LO

   o  DHCPv4 GeoLoc Option 144 and DHCPv6 GeoLoc Option 63 to PIDF-LO

   o  PIDF-LO to DHCP GeoLoc Option 144 and DHCPv6 GeoLoc Option 63

   Conversion to PIDF-LO does not increase uncertainty; conversion from
   PIDF-LO to the DHCPv4 GeoLoc Option 144 and the DHCPv6 GeoLoc Option
   63 increases uncertainty by less than a factor of 2 in each
   dimension.  Since it is not possible to translate an arbitrary
   PIDF-LO to the DHCP GeoConf Option 123 with a bounded increase in
   uncertainty, the conversion is not specified.

2.  DHCP Option Formats

   This section defines the format for the DHCPv4 and DHCPv6 options.
   These options utilize a similar format, differing primarily in the
   option code.

2.1.  DHCPv6 GeoLoc Option

   The format of the DHCPv6 [RFC3315] GeoLoc Option is as follows:

     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |       Option Code (63)        |            OptLen             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  LatUnc   |                  Latitude                         +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Lat (cont'd)  |  LongUnc  |               Longitude           +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |    Longitude (cont'd)         | AType |   AltUnc  |  Altitude +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |               Altitude (cont'd)               |Ver| Res |Datum|
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Code:      16 bits.  The code for the DHCP Option Code (63).

    OptLen:    Option Length.  For version 1, the option length is 16.




Polk, et al.                 Standards Track                    [Page 6]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


    LatUnc:    6 bits.  When the Ver field = 1, this field represents
               latitude uncertainty.  The contents of this field are
               undefined for other values of the Ver field.

    Latitude:  A 34-bit fixed-point value consisting of 9 bits of
               integer and 25 bits of fraction, interpreted as described
               in Section 2.3.

    LongUnc:   6 bits.  When the Ver field = 1, this field represents
               longitude uncertainty.  The contents of this field are
               undefined for other values of the Ver field.

    Longitude: A 34-bit fixed-point value consisting of 9 bits of
               integer and 25 bits of fraction, interpreted as described
               in Section 2.3.

    AType:     4 bits.  Altitude Type, defined in Section 2.4.

    AltUnc:    6 bits.  When the Ver field = 1, this field represents
               altitude uncertainty.  The contents of this field are
               undefined for other values of the Ver field.

    Altitude:  A 30-bit value defined by the AType field, described in
               Section 2.4.

    Ver:       The Ver field is 2 bits, providing for four potential
               versions.  This specification defines the behavior of
               version 1.  The Ver field is always located at the same
               offset from the beginning of the option, regardless of
               the version in use.  DHCPv6 clients implementing this
               specification MUST support receiving version 1 responses.
               DHCPv6 servers implementing this specification MUST send
               version 1 responses.

    Res:       3 bits.  The Res field is reserved.  These bits have been
               used by [IEEE-802.11y], but are not defined within this
               specification.

    Datum:     3 bits.  The Map Datum used for the coordinates given in
               this option.











Polk, et al.                 Standards Track                    [Page 7]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


2.2.  DHCPv4 Options

2.2.1.  DHCPv4 GeoConf Option

   The format of the DHCPv4 GeoConf Option is as follows:

     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Code 123    |    Length     |   LaRes   |     Latitude      +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Latitude (cont'd)              |   LoRes   |   +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                             Longitude                         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | AType |   AltRes  |                Altitude                   +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Alt.(cont'd)  |    Res  |Datum|
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Code:      8 bits.  The code for the DHCPv4 GeoConf Option (123).

    Length:    8 bits.  The length of the option, in octets.
               The option length is 16.

    LaRes:     6 bits.  This field represents latitude resolution.

    Latitude:  A 34-bit fixed-point value consisting of 9 bits of signed
               integer and 25 bits of fraction, interpreted as described
               in Section 2.3.

    LoRes:     6 bits.  This field represents longitude resolution.

    Longitude: A 34-bit fixed-point value consisting of 9 bits of signed
               integer and 25 bits of fraction, interpreted as described
               in Section 2.3.

    AType:     4 bits.  Altitude Type, defined in Section 2.4.

    AltRes:    6 bits.  This field represents altitude resolution.

    Altitude:  A 30-bit value defined by the AType field, described in
               Section 2.4.








Polk, et al.                 Standards Track                    [Page 8]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


    Res:       5 bits.  The Res field is reserved.  These bits have been
               used by IEEE 802.11y [IEEE-802.11y], but are not defined
               within this specification.

    Datum:     3 bits.  The Map Datum used for the coordinates given in
               this option.

2.2.2.  DHCPv4 GeoLoc Option

   The format of the DHCPv4 GeoLoc Option is as follows:

     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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Code 144    |    Length     |   LatUnc  |     Latitude      +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                Latitude (cont'd)              |  LongUnc  |   +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                             Longitude                         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | AType |   AltUnc  |                Altitude                   +
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Alt.(cont'd)  |Ver| Res |Datum|
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    Code:      8 bits.  The code for the DHCPv4 GeoLoc Option (144).

    Length:    8 bits.  The length of the option, in octets.
               For version 1, the option length is 16.

    LatUnc:    6 bits.  When the Ver field = 1, this field represents
               latitude uncertainty.  The contents of this field are
               undefined for other values of the Ver field.

    Latitude:  A 34-bit fixed-point value consisting of 9 bits of
               integer and 25 bits of fraction, interpreted as described
               in Section 2.3.

    LongUnc:   6 bits.  When the Ver field = 1, this field represents
               longitude uncertainty.  The contents of this field are
               undefined for other values of the Ver field.

    Longitude: A 34-bit fixed-point value consisting of 9 bits of
               integer and 25 bits of fraction, interpreted as described
               in Section 2.3.

    AType:     4 bits.  Altitude Type, defined in Section 2.4.




Polk, et al.                 Standards Track                    [Page 9]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


    AltUnc:    6 bits.  When the Ver field = 1, this field represents
               altitude uncertainty.  The contents of this field are
               undefined for other values of the Ver field.

    Altitude:  A 30-bit value defined by the AType field, described in
               Section 2.4.

    Ver:       The Ver field is 2 bits, providing for four potential
               versions.  This specification defines the behavior of
               version 1.  The Ver field is always located at the same
               offset from the beginning of the option, regardless of
               the version in use.

    Res:       3 bits.  The Res field is reserved.  These bits have been
               used by [IEEE-802.11y], but are not defined within this
               specification.

    Datum:     3 bits.  The Map Datum used for the coordinates given in
               this option.

2.2.3.  Option Support

2.2.3.1.  Client Support

   DHCPv4 clients implementing this specification MUST support receiving
   the DHCPv4 GeoLoc Option 144 (version 1), and MAY support receiving
   the DHCPv4 GeoConf Option 123 (originally defined in RFC 3825
   [RFC3825]).

   DHCPv4 clients request the DHCPv4 server to send GeoConf Option 123,
   GeoLoc Option 144, or both via inclusion of the Parameter Request
   List option.  As noted in Section 9.8 of RFC 2132 [RFC2132]:

      This option is used by a DHCP client to request values for
      specified configuration parameters.  The list of requested
      parameters is specified as n octets, where each octet is a valid
      DHCP option code as defined in this document.

      The client MAY list the options in order of preference.  The DHCP
      server is not required to return the options in the requested
      order, but MUST try to insert the requested options in the order
      requested by the client.









Polk, et al.                 Standards Track                   [Page 10]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   When DHCPv4 and DHCPv6 clients implementing this specification do not
   understand a datum value, they MUST assume a World Geodetic System
   1984 (WGS84) [WGS84] datum (European Petroleum Survey Group (EPSG)
   [EPSG] 4326 or 4979, depending on whether there is an altitude value
   present) and proceed accordingly.  Assuming that a less accurate
   location value is better than none, this ensures that some (perhaps
   less accurate) location is available to the client.

2.2.3.2.  Server Option Selection

   A DHCPv4 server implementing this specification MUST support sending
   GeoLoc Option 144 version 1 and SHOULD support sending GeoConf Option
   123 in responses.

   A DHCPv4 server that provides location information SHOULD honor the
   Parameter Request List included by the DHCPv4 client in order to
   decide whether to send GeoConf Option 123, GeoLoc Option 144, or both
   in the Response.

2.3.  Latitude and Longitude Fields

   The latitude and longitude values in this specification are encoded
   as 34-bit, two's complement, fixed-point values with 9 integer bits
   and 25 fractional bits.  The exact meaning of these values is
   determined by the datum; the description in this section applies to
   the datums defined in this document.  This document uses the same
   definition for all datums it specifies.

   When encoding, latitude and longitude values are rounded to the
   nearest 34-bit binary representation.  This imprecision is considered
   acceptable for the purposes to which this form is intended to be
   applied and is ignored when decoding.

   Positive latitudes are north of the equator, and negative latitudes
   are south of the equator.  Positive longitudes are east of the Prime
   Meridian, and negative (two's complement) longitudes are west of the
   Prime Meridian.

   Within the coordinate reference systems defined in this document
   (Datum values 1-3), longitude values outside the range of -180 to 180
   decimal degrees or latitude values outside the range of -90 to 90
   degrees MUST be considered invalid.  Server implementations SHOULD
   prevent the entry of invalid values within the selected coordinate
   reference system.  Location consumers MUST ignore invalid location
   coordinates and SHOULD log errors related to invalid location.






Polk, et al.                 Standards Track                   [Page 11]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


2.3.1.  Latitude and Longitude Resolution

   In the DHCPv4 GeoConf Option 123, the LaRes value encodes the number
   of high-order latitude bits that MUST be considered valid.  Any bits
   entered to the right of this limit MUST NOT be considered valid and
   might be purposely false, or zeroed by the sender.  The examples in
   Appendix B illustrate that a smaller value in the resolution field
   increases the area within which the device is located.  A value of 2
   in the LaRes field indicates a precision of no greater than 1/6th
   that of the globe (see the first example of Appendix B).  A value of
   34 in the LaRes field indicates a precision of about 3.11 mm in
   latitude at the equator.

   In the DHCPv4 GeoConf Option 123, the LoRes value encodes the number
   of high-order longitude bits that MUST be considered valid.  Any bits
   entered to the right of this limit MUST NOT be considered valid and
   might be purposely false, or zeroed by the sender.  A value of 2 in
   the LoRes field indicates precision of no greater than 1/6th that of
   the globe (see the first example of Appendix B).  A value of 34 in
   the LoRes field indicates a precision of about 2.42 mm in longitude
   (at the equator).  Because lines of longitude converge at the poles,
   the distance is smaller (better precision) for locations away from
   the equator.

2.3.2.  Latitude and Longitude Uncertainty

   In the DHCPv6 GeoLoc Option 63 and the DHCPv4 GeoLoc Option 144, the
   Latitude and Longitude Uncertainty fields (LatUnc and LongUnc)
   quantify the amount of uncertainty in each of the latitude and
   longitude values, respectively.  A value of 0 is reserved to indicate
   that the uncertainty is unknown; values greater than 34 are reserved.

   A point within the region of uncertainty is selected to be the
   encoded point; the centroid of the region is often an appropriate
   choice.  The value for uncertainty is taken as the distance from the
   selected point to the furthest extreme of the region of uncertainty
   on that axis.  This is demonstrated in the figure below, which shows
   a two-dimensional polygon that is projected on each axis.  In the
   figure, "X" marks the point that is selected; the ranges marked with
   "U" indicate the uncertainty.











Polk, et al.                 Standards Track                   [Page 12]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


           ___          ___________
           ^ |         /           |
           | |        /            |
           | |       /             |
           U |      /              |
           | |     (               |
           V |     |               |
           --X     |         X     |
             |     |               `---------.
             |     |                         |
             |     |                         |
             |     |                         |
             -     `-------------------------'

                   |---------X---------------|
                             |<------U------>|

      Key
      ---

      V, ^ = vertical arrows, delimiting the vertical uncertainty range.
      <>   = horizontal arrows, delimiting the horizontal uncertainty
             range.

   Uncertainty applies to each axis independently.

   The amount of uncertainty can be determined from the encoding by
   taking 2 to the power of 8, less the encoded value, as is shown in
   the following formula, where "x" is the encoded integer value:

      uncertainty = 2 ^ ( 8 - x )

   The result of this formula is expressed in degrees of latitude or
   longitude.  The uncertainty is added to the base latitude or
   longitude value to determine the maximum value in the uncertainty
   range; similarly, the uncertainty is subtracted from the base value
   to determine the minimum value.  Note that because lines of longitude
   converge at the poles, the actual distance represented by this
   uncertainty changes with the distance from the equator.

   If the maximum or minimum latitude values derived from applying
   uncertainty are outside the range of -90 to +90, these values are
   trimmed to within this range.  If the maximum or minimum longitude
   values derived from applying uncertainty are outside the range of
   -180 to +180, then these values are normalized to this range by
   adding or subtracting 360 as necessary.





Polk, et al.                 Standards Track                   [Page 13]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   The encoded value is determined by subtracting the next highest whole
   integer value for the base 2 logarithm of uncertainty from 8, as is
   shown by the following formula, where uncertainty is the midpoint of
   the known range less the lower bound of that range:

      x = 8 - ceil( log2( uncertainty ) )

   Note that the result of encoding this value increases the range of
   uncertainty to the next available power of two; subsequent repeated
   encodings and decodings do not change the value.  Only increasing
   uncertainty means that the associated confidence does not have to
   decrease.

2.4.  Altitude

   How the altitude value is interpreted depends on the Altitude Type
   (AType) value and the selected datum.  Three Altitude Type values are
   defined in this document: unknown (0), meters (1), and floors (2).

2.4.1.  No Known Altitude (AType = 0)

   In some cases, the altitude of the location might not be provided.
   An Altitude Type value of zero indicates that the altitude is not
   given to the client.  In this case, the Altitude and Altitude
   Uncertainty fields can contain any value and MUST be ignored.

2.4.2.  Altitude in Meters (AType = 1)

   If the Altitude Type has a value of one, altitude is measured in
   meters, in relation to the zero set by the vertical datum.  For AType
   = 1, the altitude value is expressed as a 30-bit, fixed-point, two's
   complement integer with 22 integer bits and 8 fractional bits.

2.4.3.  Altitude in Floors (AType = 2)

   A value of two for Altitude Type indicates that the altitude value is
   measured in floors.  Since altitude in meters may not be known within
   a building, a floor indication may be more useful.  For AType = 2,
   the altitude value is expressed as a 30-bit, fixed-point, two's
   complement integer with 22 integer bits and 8 fractional bits.

   This value is relevant only in relation to a building; the value is
   relative to the ground level of the building.  Floors located below
   ground level are represented by negative values.  In some buildings,
   it might not be clear which floor is at ground level, or an
   intermediate floor might be hard to identify as such.  Determining





Polk, et al.                 Standards Track                   [Page 14]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   what floor is at ground level and what constitutes a sub-floor as
   opposed to a naturally numbered floor is left to local
   interpretation.

   Larger values represent floors that are farther away from floor 0
   such that:

      - if positive, the floor value is farther above the ground floor.

      - if negative, the floor value is farther below the ground floor.

   Non-integer values can be used to represent intermediate or
   sub-floors, such as mezzanine levels.  Example: a mezzanine between
   floor 1 and floor 2 could be represented as a value of 1.25.
   Example: mezzanines between floor 4 and floor 5 could be represented
   as values of 4.5 and 4.75.

2.4.4.  Altitude Resolution

   In the DHCPv4 GeoConf Option 123, the altitude resolution (AltRes)
   value encodes the number of high-order altitude bits that should be
   considered valid.  Values above 30 (decimal) are undefined and
   reserved.

   If the Altitude Type value is one (AType = 1), an AltRes value of 0.0
   would indicate an unknown altitude.  The most precise altitude would
   have an AltRes value of 30.  Many values of AltRes would obscure any
   variation due to vertical datum differences.

   The AltRes field SHOULD be set to maximum precision when AType = 2
   (floors) when a floor value is included in the DHCP Reply, or when
   AType = 0, to denote that the floor isn't known.  An altitude coded
   as AType = 2, AltRes = 30, and Altitude = 0.0 is meaningful even
   outside a building, and represents ground level at the given latitude
   and longitude.

2.4.5.  Altitude Uncertainty

   In the DHCPv6 GeoLoc Option 63 or the DHCPv4 GeoLoc Option 144, the
   AltUnc value quantifies the amount of uncertainty in the altitude
   value.  As with LatUnc and LongUnc, a value of 0 for AltUnc is
   reserved to indicate that altitude uncertainty is not known; values
   above 30 are also reserved.  Altitude uncertainty only applies to
   Altitude Type 1.







Polk, et al.                 Standards Track                   [Page 15]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   The amount of altitude uncertainty can be determined by the following
   formula, where x is the encoded integer value:

      Uncertainty = 2 ^ ( 21 - x )

   This value uses the same units as the associated altitude.

   Similarly, a value for the encoded integer value can be derived by
   the following formula:

      x = 21 - ceil( log2( uncertainty ) )

2.5.  Datum

   The Datum field determines how coordinates are organized and related
   to the real world.  Three datums are defined in this document, based
   on the definitions in [OGP.Geodesy]:

   1: WGS84 (Latitude, Longitude, Altitude): The World Geodetic System
      1984 [WGS84] coordinate reference system.

      This datum is identified by the European Petroleum Survey Group
      (EPSG)/International Association of Oil & Gas Producers (OGP) with
      the code 4979, or by the URN "urn:ogc:def:crs:EPSG::4979".
      Without altitude, this datum is identified by the EPSG/OGP code
      4326 and the URN "urn:ogc:def:crs:EPSG::4326".

   2: NAD83 (Latitude, Longitude) + NAVD88: This datum uses a
      combination of the North American Datum 1983 (NAD83) for
      horizontal (Latitude and Longitude) values, plus the North
      American Vertical Datum of 1988 (NAVD88) vertical datum.

      This datum is used for referencing location on land (not near
      tidal water) within North America.

      NAD83 is identified by the EPSG/OGP code of 4269, or the URN
      "urn:ogc:def:crs:EPSG::4269".  NAVD88 is identified by the EPSG/
      OGP code of 5703, or the URN "urn:ogc:def:crs:EPSG::5703".

   3: NAD83 (Latitude, Longitude) + MLLW: This datum uses a combination
      of the North American Datum 1983 (NAD83) for horizontal (Latitude
      and Longitude) values, plus the Mean Lower Low Water (MLLW)
      vertical datum.

      This datum is used for referencing location on or near tidal water
      within North America.





Polk, et al.                 Standards Track                   [Page 16]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


      NAD83 is identified by the EPSG/OGP code of 4269, or the URN
      "urn:ogc:def:crs:EPSG::4269".  MLLW does not have a specific code
      or URN.

   All hosts MUST support the WGS84 datum (Datum 1).

3.  Security Considerations

   Geopriv requirements (including security requirements) are discussed
   in "Geopriv Requirements" [RFC3693].  A threat analysis is provided
   in "Threat Analysis of the Geopriv Protocol" [RFC3694].

   Since there is no privacy protection for DHCP messages, an
   eavesdropper who can monitor the link between the DHCP server and
   requesting client can discover this LCI.

   To minimize the unintended exposure of location information, the LCI
   option SHOULD be returned by DHCP servers only when the DHCP client
   has included this option in its 'parameter request list' (Section 3.5
   of [RFC2131], Section 9.8 of [RFC2132]).

   Where critical decisions might be based on the value of this option,
   DHCP authentication as defined in "Authentication for DHCP Messages"
   [RFC3118] and "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"
   [RFC3315] SHOULD be used to protect the integrity of the DHCP
   options.

   Link-layer confidentiality and integrity protection may also be
   employed to reduce the risk of location disclosure and tampering.

4.  IANA Considerations

4.1.  DHCP Options

   This document defines the DHCPv6 GeoLoc Option (see Section 2.1),
   which has been assigned a DHCPv6 option code of 63 per [RFC3315]:

      Value   Description          Reference
      ----    ------------------   ----------
      63      OPTION_GEOLOCATION   RFC 6225

   This document defines the DHCPv4 GeoConf Option (see Section 2.2.1),
   which has been assigned a DHCPv4 option code of 123 from the DHCP
   Option space.







Polk, et al.                 Standards Track                   [Page 17]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   This document also defines the DHCPv4 GeoLoc Option (see
   Section 2.2.2), which has been assigned a DHCPv4 option code of 144
   per [RFC2132] [RFC2939]:

                     Data
      Tag    Name    Length   Meaning              Reference
      ----   ----    ------   -------              ---------
      144    GeoLoc   16      Geospatial Location  RFC 6225
                              with Uncertainty

4.2.  Altitude Type Registry

   IANA has created and now maintains the Altitude Type registry
   following the guidelines below.

   The registry consists of three values: Altitude Type, Description,
   and Reference.  These are described below.

   Altitude Type: An integer, refers to the value used in the DHCPv4
      GeoConf and the DHCPv4 and DHCPv6 GeoLoc options described in this
      document.  Values 0 - 2 are assigned.  Values 3 - 15 are
      Unassigned [RFC5226].

   Description: The description of the altitude described by this code.

   Reference: The reference to the document that describes the altitude
      code.  This reference MUST define the way that the 30-bit altitude
      values and the associated 6-bit uncertainty are interpreted.

   Initial values are given below; new assignments are to be made
   following the "Standards Action" policies [RFC5226].

      +------+---------------------+--------------+
      |  #   |  Description        |  Reference   |
      +------+---------------------+--------------+
      |  0   | No known altitude   |  RFC 6225    |
      |  1   | Altitude in meters  |  RFC 6225    |
      |  2   | Altitude in floors  |  RFC 6225    |
      | 3-15 | Unassigned          |              |
      +------+---------------------+--------------+

4.3.  Datum Registry

   IANA has created and now maintains the Datum registry following the
   guidelines below.

   The registry consists of three values: Datum, Description, and
   Reference.  These are described below.



Polk, et al.                 Standards Track                   [Page 18]


RFC 6225             DHCP Options for Coordinate LCI           July 2011


   Datum: An integer, refers to the value used in the DHCPv4 GeoConf and
      the DHCPv4 and DHCPv6 GeoLoc options described in this document.
      Value 0 is Reserved.  Values 1 - 3 are assigned.  Values 4 - 7 are
      Unassigned [RFC5226].

   Description: The description of the altitude described by this code.

   Reference: The reference to the document that describes the Datum
      code.  This reference MUST include specification of both the
      horizontal and vertical datum, and MUST define the way that the
      34-bit values and the respective 6-bit uncertainties are
      interpreted.

   Initial values are given below; new assignments are to be made
   following the "Standards Action" policies [RFC5226].

      +------+----------------------------------------+--------------+
      |  #   |  Description                           |  Reference   |
      +------+----------------------------------------+--------------+
      |  0   | Reserved                               |  RFC 6225    |
      +------+----------------------------------------+--------------+
      |  1   | Vertical datum WGS 84 defined by EPSG  |  RFC 6225    |
      |      | CRS Code 4327                          |              |
      +------+----------------------------------------+--------------+
      |  2   | Vertical datum NAD83 defined by EPSG   |  RFC 6225    |
      |      | CRS Code 4269 with North American      |              |
      |      | Vertical Datum of 1988 (NAVD88)        |              |
      +------+----------------------------------------+--------------+
      |  3   | Vertical datum NAD83 defined by EPSG   |  RFC 6225    |
      |      | CRS Code 4269 with Mean Lower Low Water|              |
      |      | (MLLW) as associated vertical datum    |              |
      +------+----------------------------------------+--------------+
      | 4-7  | Unassigned                             |              |
      +------+----------------------------------------+--------------+