<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

<!ENTITY RFC2119 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2131 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.2131.xml">
<!ENTITY RFC3046 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3046.xml">
<!ENTITY RFC3292 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3292.xml">
<!ENTITY RFC3293 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3293.xml">
<!ENTITY RFC3315 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3315.xml">
<!ENTITY RFC3629 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.3629.xml">
<!ENTITY RFC4301 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.4301.xml">
<!ENTITY RFC4303 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.4303.xml">
<!ENTITY RFC4649 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.4649.xml">
<!ENTITY RFC5226 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC5246 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5246.xml">
<!ENTITY RFC5646 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5646.xml">
<!ENTITY RFC5713 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5713.xml">
<!ENTITY RFC5851 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5851.xml">
<!ENTITY RFC5925 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5925.xml">
<!ENTITY RFC5996 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.5996.xml">

]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-ancp-protocol-17"
     ipr="pre5378Trust200902">
<front>
  <title abbrev="ANCP Protocol">
    Protocol for Access Node Control Mechanism in Broadband Networks</title>

  <author fullname="Sanjay Wadhwa " initials="S." surname=" Wadhwa">
    <organization>Alcatel-Lucent</organization>
    <address>
      <postal>
        <street></street>
        <city></city>
        <code></code>
        <region></region>
        <country></country>
      </postal>
      <phone></phone>
      <facsimile></facsimile>
      <email>sanjay.wadhwa@alcatel-lucent.com</email>
    </address>
  </author>

  <author fullname="Jerome Moisand" initials="J." surname="Moisand">
    <organization>Juniper Networks</organization>
    <address>
      <postal>
        <street>10 Technology Park Drive</street>
        <city>Westford</city>
        <code>01886</code>
        <region>MA</region>
        <country>USA</country>
      </postal>
      <phone></phone>
      <facsimile></facsimile>
      <email>jmoisand@juniper.net</email>
    </address>
  </author>

  <author fullname="Thomas Haag" initials="T." surname=" Haag">
    <organization>Deutsche Telekom</organization>
    <address>
      <postal>
        <street>Heinrich-Hertz-Strasse 3-7</street>
        <city>Darmstadt</city>
        <code>64295</code>
        <region></region>
        <country>Germany</country>
      </postal>
      <phone>+49 6151 628 2088</phone>
      <facsimile></facsimile>
      <email>haagt@telekom.de</email>
    </address>
  </author>

  <author fullname="Norbert Voigt" initials="N." surname="Voigt">
    <organization>Nokia Siemens Networks</organization>
    <address>
      <postal>
        <street>Siemensallee 1</street>
        <code>17489</code>
        <city>Greifswald</city>
        <country>Germany</country>
      </postal>
      <email>norbert.voigt@nsn.com</email>
    </address>
  </author>

  <author fullname="Tom Taylor" initials="T." surname="Taylor" role="editor">
    <organization>Huawei Technologies</organization>
    <address>
      <postal>
        <street></street>
        <city>Ottawa</city>
        <country>Canada</country>
      </postal>
      <email>tom111.taylor@bell.net</email>
    </address>
  </author>

  <date year="2011" />

  <abstract>
    <t>This document describes the Access Node Control Protocol (ANCP).
    ANCP operates between a Network Access Server (NAS) and an Access 
    Node (e.g., a Digital Subscriber Line Access Multiplexer (DSLAM)) in 
    a multi-service reference architecture in order to perform QoS-related,
    service-related and subscriber-related operations. Use cases for ANCP
    are documented in RFC 5851. As well as describing the base ANCP protocol,
    this document specifies capabilities for Digital Subscriber Line (DSL)
    topology discovery, line configuration, and remote line connectivity
    testing. The design of ANCP allows for protocol extensions in other 
    documents if they are needed to support other use cases and other 
    access technologies. </t>

    <t>ANCP is based on GSMPv3 (RFC 3292), but with many modifications
    and extensions, to the point that the two protocols are not interoperable.
    For this reason, ANCP was assigned a separate version number to distinguish
    it. </t>
  </abstract>
  
</front>

<middle>

<section title="Introduction">

  <t>This draft defines a new protocol, the Access Node Control Protocol 
  (ANCP), to realize a control plane between a service-oriented layer 3
  edge device (the Network Access Server, NAS) and a layer 2 Access Node 
  (e.g., Digital Subscriber Line Access Module, DSLAM) in order to perform
  operations related to quality of service (QoS), services, and subscriptions.  The 
  requirements for ANCP and the context within which it operates are
  described in <xref target="RFC5851"/>.</t>
  
  <t>ANCP provides its services to control applications operating in the
  AN and NAS respectively. This relationship is shown in 
  <xref target="fig_ancpArch"/>. Specification of the control applications
  is beyond the scope of this document, but informative partial descriptions
  are provided as necessary to give a context for the operation of the 
  protocol.</t>

  <figure anchor="fig_ancpArch" 
         title=" Architectural Context For the Access Node Control Protocol">
    <artwork>
       Access Node                            Network Access Server
  +--------------------+                     +--------------------+
  | +----------------+ |                     | +----------------+ |
  | |   AN Control   | |                     | |  NAS Control   | |
  | |  Application   | |                     | |  Application   | |
  | +----------------+ |                     | +----------------+ |
  | +----------------+ |                     | +----------------+ |
  | |   ANCP Agent   | |    ANCP Messages    | |   ANCP Agent   | |
  | |   (AN side)    |&lt;----------------------->|   (NAS side)   | |
  | +----------------+ |                     | +----------------+ |
  +--------------------+                     +--------------------+
      </artwork>
    </figure>

    <t>At various points in this document, information flows between the
    control applications and ANCP are described. The purpose of such 
    descriptions is to clarify the boundary between this specification 
    and, for example, <xref target="TR-147"/>. There is no intention to
    place limits on the degree to which the control application and the
    protocol implementation are integrated. </t>

    <t>This specification specifies ANCP transport over TCP/IP. TCP
    encapsulation for ANCP is as defined in <xref target="transport"/>.</t>

    <t>The organization of this document is as follows:
    <list style="symbols">

      <t>The next two sub-sections introduce some terminology that will be useful
      in understanding the rest of the document.</t>

      <t><xref target="aggreg"/> provides a description of the access networks
      within which ANCP will typically be deployed.</t>

      <t><xref target="ANCPgeneral"/> specifies generally applicable aspects
      of the ANCP protocol.</t>
      
      <t><xref target="commonStuff"/> specifies some messages and TLVs intended 
      for use by multiple capabilities spanning multiple technologies.</t>

      <t><xref target="DSLcapab"/> and the three following sections describe 
      and specify the ANCP implementation of three capabilities applicable
      to the control of DSL access technology: topology discovery, line
      configuration, and remote line connectivity testing.</t>

      <t><xref target="IANA"/> is the IANA Considerations section. This section
      defines a number of new ANCP-specific registries, as well as the joint 
      GSMP/ANCP version registry mentioned below. </t>

      <t><xref target="secur"/> addresses security considerations relating
      to ANCP, beginning with the requirements stated in 
      <xref target="RFC5713"/>.</t>
    </list>
    </t>

    <section anchor="history" title="Historical Note">
  
      <t>  Initial implementations of the protocol that became ANCP were based on
      GSMPv3 <xref target="RFC3292"/>. The ANCP charter required the Working Group
      to develop its protocol based on these implementations. In the end, ANCP
      introduced so many extensions and modifications to GSMPv3 that the two
      protocols are not interoperable. Nevertheless, although this specification
      has no normative dependencies on <xref target="RFC3292"/>, the mark of ANCP's
      origins can be seen in the various unused fields within the ANCP message 
      header.</t>
  
      <t>Early in ANCP's development the decision was made to use the same TCP 
      port and encapsulation as GSMPv3, and by the time ANCP was finished it was
      too late to reverse that decision because of existing implementations. As 
      a result, it is necessary to have a way for an ANCP peer to quickly 
      distinguish ANCP from GSMP during initial adjacency negotiations. This
      has been provided by a joint registry of GSMP and ANCP version numbers.
      GSMP has version numbers 1 through 3. ANCP has the initial version number
      50.</t>
  
    </section>
  
    <section title="Requirements Language">
  
      <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"></xref>.</t>
      
    </section>

    <section title="Terminology">
    
    <t>This section repeats some definitions from <xref target="RFC5851"/>,
    but also adds definitions for terms used only in this document.
    <list style="hanging">
      <t hangText="Access Node (AN):"><xref target="RFC5851"/> 
      Network device, usually located at a service provider central office
      or street cabinet that terminates access (local) loop connections 
      from subscribers. In case the access loop is a Digital Subscriber 
      Line (DSL), the Access Node provides DSL signal termination, and 
      is referred to as a DSL Access Multiplexer (DSLAM).</t>

      <t hangText="Network Access Server (NAS):"><xref target="RFC5851"/>
      Network element which aggregates subscriber traffic from a number of
      Access Nodes. The NAS is an enforcement point for policy management and 
      IP QoS in the access network. It is also referred to as a Broadband
      Network Gateway (BNG) or Broadband Remote Access Server (BRAS).</t>
      
      <t hangText="Home Gateway (HGW):"> Network element that connects
      subscriber devices to the Access Node and the access network. In the
      case of DSL, the Home Gateway is a DSL network termination that may
      operate either as a layer 2 bridge or as a layer 3 router. In the
      latter case, such a device is also referred to as a Routing Gateway 
      (RG).</t>

      <t hangText="ANCP agent:">A logical entity that implements the ANCP
      protocol in the Access Node (AN-side) or NAS (NAS-side).</t>

      <t hangText="Access Node control adjacency:">(modified from 
      <xref target="RFC5851"/>) the relationship between the AN-side ANCP 
      agent and the NAS-side ANCP agent for the purpose of exchanging 
      Access Node Control Protocol messages.  The adjacency may either
      be up or down, depending on the result of the Access Node Control
      adjacency protocol operation. </t>

      <t hangText="ANCP capability:"> A specific set of 
      ANCP messages, message content, and procedures required to implement
      a specific use case or set of use cases. Some ANCP capabilities are
      applicable to just one access technology while others are technology
      independent. The capabilities applicable to a given ANCP adjacency 
      are negotiated during adjacency startup.</t>

      <t hangText="Type-Length-Value (TLV):"> a data structure consisting of
      a sixteen-bit type field, a sixteen-bit length field, and a variable-length
      value field padded to the nearest 32-bit word boundary, as described in 
      <xref target="ANCPmsgBody"/>. The value field of a TLV can contain other
      TLVs. An IANA registry is maintained for values of the ANCP TLV Type
      field.</t>

      <t hangText="Net data rate:"><xref target="RFC5851"/>  
      defined by ITU-T G.993.2 [G.993.2], Section 3.39, i.e., the portion
      of the total data rate that can be used to transmit user information
      (e.g., ATM cells or Ethernet frames). It excludes overhead that 
      pertains to the physical transmission mechanism (e.g., trellis coding
      in the case of DSL).  It includes TPS-TC (Transport Protocol 
      Specific - Transmission Convergence) encapsulation; this is zero for
      ATM encapsulation, and non-zero for 64/65 encapsulation. </t>

      <t hangText="Line rate:"><xref target="RFC5851"/>
      defined by ITU-T G.993.2.  It contains the complete overhead including
      Reed-Solomon and trellis coding. </t>

      <t hangText="DSL multi-pair bonding:"> method for bonding (or 
      aggregating) multiple xDSL lines into a single bi-directional logical
      link, henceforth referred to in this draft as "DSL bonded circuit". 
      DSL "multi-pair" bonding allows an operator to combine the data rates
      on two or more copper pairs, and deliver the aggregate data rate to a
      single customer. ITU-T recommendations G.998.1 and G.998.2 respectively
      describe ATM and Ethernet based multi-pair bonding.</t>
    </list>
    </t>
    
  </section>  <!-- Terminology -->
</section>  <!-- Introduction -->

<!-- ====================================================================== -->

<section anchor="aggreg" title=" Broadband Access Aggregation">

  <section title="ATM-based Broadband Aggregation">
    
    <t>The end to end DSL network consists of network service provider 
    (NSP) and application service provider (ASP) networks, regional/access
    network, and customer premises network. <xref target="Fig.1"></xref>
    shows ATM broadband access network components.</t>

    <t>The regional/access network consists of the regional network, 
    Network Access Server (NAS), and the access network as shown in
    <xref target="Fig.1"></xref>. Its primary function is to provide
    end-to-end transport between the customer premises and the NSP or ASP.</t>

    <t> The Access Node terminates the DSL signal. It may be in the form 
    of a DSLAM in the central office, or a remote DSLAM, or a Remote Access
    Multiplexer (RAM). The Access Node is the first point in the network 
    where traffic on multiple DSL lines will be aggregated onto a single
    network. </t>

    <t>The NAS performs multiple functions in the network. The NAS is 
    the aggregation point for subscriber traffic. It provides aggregation
    capabilities (e.g. IP, PPP, ATM) between the Regional/Access Network
    and the NSP or ASP. These include traditional ATM-based offerings 
    and newer, more native IP-based services. This includes support for
    Point-to-Point Protocol over ATM (PPPoA) and PPP over Ethernet (PPPoE),
    as well as direct IP services encapsulated over an appropriate layer 2
    transport.</t>

    <t>Beyond aggregation, the NAS is also the enforcement point for
    policy management and IP QoS in the regional/access networks. 
    To allow IP QoS support over an existing non-IP-aware layer 2 
    access network without using multiple layer 2 QoS classes, a 
    mechanism based on hierarchical scheduling is used. This mechanism,
    defined in <xref target="TR-059"></xref>, preserves IP QoS over 
    the ATM network between the NAS and the routing gateway (RG) at 
    the edge of the subscriber network, by carefully controlling 
    downstream traffic in the NAS, so that significant queuing and 
    congestion does not occur further down the ATM network. This is
    achieved by using a diffserv-aware hierarchical scheduler in the 
    NAS that will account for downstream trunk bandwidths and DSL 
    synchronization rates.</t>

    <t><xref target="RFC5851"></xref> provides detailed definitions
    of the functions of each network element in the broadband reference
    architecture.</t>

    <figure anchor="Fig.1" title="ATM Broadband Aggregation Topology ">
      <artwork>
                              Access                   Customer 
                       &lt;--- Aggregation -->  &lt;------- Premises -------> 
                              Network                   Network
                   
                       +------------------+ +--------------------------+
   +---------+   +---+ | +-----+ +------+ | |+-----+ +---+ +---------+ |
NSP|         | +-|NAS|-| |ATM  |-|Access| --||DSL  |-|HGW|-|Subscriber||
---+ Regional| | +---+ | +-----+ | Node | | ||Modem| +---+ |Devices   ||
   |Broadband| | +---+ |         +------+ | |+-----+       +----------+|
ASP|Network  |-+-|NAS| +--------------|---+ +--------------------------+
---+         | | +---+                |     +--------------------------+
   |         | | +---+                |     |+-----+ +---+ +----------+|
   +---------+ +-|NAS|                +-----|| DSL |-|HGW|-|Subscriber||
                 +---+                      ||Modem| +---+ |Devices   ||
                                            |+-----+       +----------+|
                                            +--------------------------+
 HGW   : Home Gateway
 NAS   : Network Access Server
      </artwork>
    </figure>
  </section>  <!-- ATM -->

  <section title="Ethernet-Based Broadband Aggregation">

    <t>The Ethernet aggregation network architecture builds on the 
    Ethernet bridging/switching concepts defined in IEEE 802. The 
    Ethernet aggregation network provides traffic aggregation, class 
    of service distinction, and customer separation and traceability. 
    VLAN tagging defined in IEEE 802.1Q and being enhanced by 
    IEEE 802.1ad is used as standard virtualization mechanism in the 
    Ethernet aggregation network. The aggregation devices are "provider
    edge bridges" defined in IEEE 802.ad.</t>

    <t> Stacked VLAN tags provide one possible way to create equivalent
    of "virtual paths" and "virtual circuits" in the aggregation network.
    The "outer" vlan can be used to create a form of "virtual path"
    between a given DSLAM and a given NAS. "Inner" VLAN tags create a 
    form of "virtual circuit" on a per DSL line basis. This is the 1:1
    VLAN allocation model. An alternative model is to bridge sessions 
    from multiple subscribers behind a DSLAM into a single VLAN in the
    aggregation network. This is the N:1 VLAN allocation model. 
    Section 1.6 of <xref target="TR-101"/> provides brief definitions of
    these two models, while section 2.5.1 describes them in more detail. </t>
      
  </section>  <!-- Ethernet -->
</section>  <!-- aggreg -->

<!-- =============================================================== -->

<section anchor="ANCPgeneral" 
    title="Access Node Control Protocol -- General Aspects">

  <t>This section specifies aspects of the Access Node Control Protocol
  (ANCP) that are generally applicable. </t>

  <!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="version" title="Protocol Version">

    <t>ANCP messages contain an 8-bit protocol version field. For the protocol
    version specified in this document, the value of that field MUST be set to 
    50. </t>

  </section>  <!-- version -->

<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="transport" title="ANCP Transport">

    <t>This document specifies the use of TCP / IPSec+IKEv2 / IP for transport
    of ANCP messages. For further discussion of the use of IPSec + IKEv2 see
    <xref target="secur"/>. The present section deals with the TCP aspects.
    Other specifications may introduce additional transports in the future.</t>

    <t>
    <list style="empty">
      <t>In the case of ATM access, a separate PVC (control channel) 
      capable of transporting IP MAY be configured between NAS and the 
      AN for ANCP messages.</t>

      <t>In the case of an Ethernet access/aggregation network, a typical
      practice is to send the Access Node Control Protocol messages over 
      a dedicated Ethernet virtual LAN (VLAN) using a separate VLAN 
      identifier (VLAN ID).</t>
    </list>
    </t>

    <t>When transported over TCP, ANCP messages MUST use an encapsulation
    consisting of a four-byte header field prepended to
    the ANCP message as shown in <xref target="gsmp_tcp_frt"/>.</t>

    <figure anchor="gsmp_tcp_frt"
                title="Encapsulation of ANCP Messages Over TCP/IP">
      <artwork>
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Identifier (0x880C)        |           Length              |
   |-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                         ANCP Message                          ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      </artwork>
    </figure>

    <t>The fields of the encapsulating header are as follows:
    <list style="hanging">
      <t hangText="Identifier (16 bits):"> This identifies a GSMP or
      ANCP message. It MUST be set to 0x880C. </t>

      <t hangText="Length (16 bits):"> Total length of the ANCP message
      in bytes, not including the 4-byte encapsulating header. </t>
    </list>
    </t>

    <t>The Access Node MUST initiate the TCP session to the NAS, using
    destination port 6068.
    <list style="empty">
      <t>This is necessary to avoid static address provisioning on the NAS for all
      the ANs that are being served by the NAS. It is easier to configure
      a given AN with the single IP address of the NAS that serves the AN.</t>
    </list>
    </t>

    <t>The NAS MUST listen on port 6068 for incoming connections from the
    Access Nodes. </t>

    <t>In the event of an ANCP transport protocol failure, all pending 
    ANCP messages destined to the disconnected recipient SHOULD be discarded
    until the transport connection is re-established. </t>

  </section>  <!-- tcp -->

<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="textEnc" title="Encoding of Text Fields">

    <t>In ANCP, all text fields use UTF-8 encoding <xref target="RFC3629"/>.
    Note that US ASCII characters have the same representation when coded 
    as UTF-8 as they do when coded according to <xref target="US_ASCII"/>. </t>
    
    <t>When extracting text fields from a message, the ANCP agent MUST NOT
    assume that the fields are zero-terminated.</t>

  </section><!-- textEnc -->

<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="resvUnused" title="Treatment of Reserved and Unused Fields">

    <t>ANCP messages contain a number of fields that are unused or 
    reserved. Some fields are always unused (typically because they were
    inherited from GSMPv3 but are not useful in the ANCP context). Others
    are reserved in the current specification, but are provided for flexibility
    in future extensions to ANCP. Both reserved and unused fields MUST be set
    to zeroes by the sender and MUST be ignored by the receiver. </t>

    <t>Unused bits in a flag field are shown in figures as 'x'. The above
    requirement (sender set to zero, receiver ignore) applies to such unused
    bits.</t>

  </section><!-- resvUnused -->

<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="adjacency" title="The ANCP Adjacency Protocol">

    <t>ANCP uses the adjacency protocol to synchronize the NAS and Access Nodes
    and maintain the ANCP session. After the TCP connection is established,
    adjacency protocol messages MUST be exchanged as specified in this section.
    ANCP messages other than adjacency protocol messages MUST NOT be sent until
    the adjacency protocol has achieved synchronization.</t>

    <section anchor="adjFmt" title="ANCP Adjacency Message Format">

      <t>The ANCP adjacency message format is
      shown in <xref target="fig_adj_msg"/> below.</t>
      

      <figure anchor="fig_adj_msg" title="ANCP Adjacency Message Format">
        <artwork>
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Version   | Message Type  |     Timer     |M|     Code    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Sender Name                          |
   +                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
   |                         Receiver Name                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Sender Port                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Receiver Port                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PType | PFlag |               Sender Instance                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Partition ID  |              Receiver Instance                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Reserved      | # of Caps     | Total Length                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                   Capability Fields                           ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
      </figure>

      <t>The fields of the ANCP adjacency message are as follows:
      <list style="hanging">
        <t hangText="Version (8 bits):"> ANCP version, which is subject to 
        negotiation. This is the key parameter by means of which ANCP messages
        can be distinguished from GSMP messages received over the same port.</t>
        
        <t hangText="Message Type (8 bits):"> always has value 10 (adjacency 
        protocol).</t>
        
        <t hangText="Timer (8 bits):"> The Timer field is used to negotiate the
        timer value used in the adjacency protocol with the peer.
        The timer specifies the nominal time between periodic adjacency protocol
        messages.  It is a constant for the duration of an ANCP session. The Timer
        field is specified in units of 100ms, with a default value of 250 (i.e.,
        25 seconds).</t>
        
        <t hangText="M-flag (one bit):"> used in the SYN message to prevent the 
        NAS from synchronizing with another NAS, and the AN from synchronizing 
        with another AN. In the SYN message, always set to 1 by the NAS,
        and to 0 by the AN. In other adjacency message types, always set to 0 by
        the sender and ignored by the receiver.</t>
        
        <t hangText="Code (7 bits):"> the adjacency protocol message type. It MUST
        have one of the following values: 
        <list style="empty">
          <t>Code = 1: SYN;</t>
          <t>Code = 2: SYNACK;</t>
          <t>Code = 3: ACK;</t>
          <t>Code = 4: RSTACK.</t>
        </list>
        </t>
        
        <t hangText="Sender Name (48 bits):">For the SYN, SYNACK, and ACK 
        messages, is the identifier of the entity sending the message.  The Sender
        Name is a 48-bit quantity that is unique within the operational context
        of the device.  A 48-bit IEEE 802 MAC address, if available, may be used
        for the Sender Name.  If the Ethernet encapsulation is used the Sender 
        Name MUST be the Source Address from the MAC header.  For the RSTACK 
        message, the Sender Name field is set to the value of the Receiver Name
        field from the incoming message that caused the RSTACK message to be
        generated. </t>
        
        <t hangText="Receiver Name (48 bits)"> for the SYN, SYNACK, and ACK 
        messages, is the name of the entity that the sender of the message  
        believes is at the far end of the link.  If the sender of the message 
        does not know the name of the entity at the far end of the link, this field 
        SHOULD be set to zero.  For the RSTACK message, the Receiver Name field  
        is set to the value of the Sender Name field from the incoming message that 
        caused the RSTACK message to be generated. </t>
        
        <t hangText="Sender Port (32 bits):"> For the SYN, SYNACK, and ACK 
        messages, is the local port number of the link across which the message
        is being sent.  For the RSTACK message, the Sender Port field is set to
        the value of the Receiver Port field from the incoming message that
        caused the RSTACK message to be generated. </t>

        <t hangText="Receiver Port (32 bits):"> For the SYN, SYNACK, and ACK 
        messages, is what the sender believes is the local port number for the
        link, allocated by the entity at the far end of the link.  If the sender
        of the message does not know the port number at the far end of the link,
        this field SHOULD be set to zero.  For the RSTACK message, the Receiver
        Port field is set to the value of the Sender Port field from the incoming
        message that caused the RSTACK message to be generated. </t>
      
        <t hangText="PType (4 bits):"> PType is used to specify if partitions are
        used and how the Partition ID is negotiated.
        <list style="empty">
          <t>Type of partition being requested:</t>
          <t>0 - no partition;</t>
          <t>1 - fixed partition request;</t>
          <t>2 - fixed partition assigned.</t>
        </list>
        </t>

        <t hangText="PFlag (4 bits):"> used to indicate the type of partition request.
        <list style="empty">
          <t>1 - new adjacency;</t>
          <t>2 - recovered adjacency.</t>
        </list>
        In case of a conflict between the peers' views of the value of PFlag,
        the lower value is used.
        </t>
      
        <t hangText="Sender Instance (24 bits):"> For the SYN, SYNACK, and ACK
        messages, is the sender's instance number for the link to the peer.  It 
        is used to detect when the link comes back up after going down or when
        the identity of the entity at the other end of the link changes.  The 
        instance number is a 24-bit number that is guaranteed to be unique
        within the recent past and to change when the link or node comes back 
        up after going down.  Zero is not a valid instance number.  For the 
        RSTACK message, the Sender Instance field is set to the value of the
        Receiver Instance field from the incoming message that caused the RSTACK
        message to be generated.</t>

        <t hangText="Partition ID (8 bits):"> field used to associate the message
        with a specific partition of the AN. The value of this field is negotiated
        during the adjacency procedure. The AN makes the final decision, but will
        consider a request from the NAS. If the AN does not support partitions, 
        the value of this field MUST be 0. Otherwise, it MUST be non-zero.</t>

        <t hangText="Receiver Instance (24 bits):"> For the SYN, SYNACK, and ACK
        messages, is what the sender believes is the current instance number for
        the link, allocated by the entity at the far end of the link.  If the sender
        of the message does not know the current instance number at the far end 
        of the link, this field SHOULD be set to zero.  For the RSTACK message,
        the Receiver Instance field is set to the value of the Sender Instance
        field from the incoming message that caused the RSTACK message to be 
        generated.</t>

        <t hangText="Reserved (8 bits):"> reserved for use by a future version of
        this specification.</t>

        <t hangText="# of Caps:"> indicates the number of capability fields 
        that follow.</t>

        <t hangText="Total Length:"> indicates the total number of bytes
        occupied by the capability fields that follow.</t>

        <t hangText="Capability Fields:"> Each capability field indicates
        one ANCP capability supported by the sender of the adjacency message.
        Negotiation of a common set of capabilities to be supported within
        the ANCP session is described below. The
        detailed format of a capability field is shown in <xref target="cap_fld"/>
        and described below.</t>
      </list>
      </t>

      <figure anchor="cap_fld" title="Capability Field">
        <artwork>
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Capability Type           |   Capability Length           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                                                               ~
   ~                   Capability Data                             ~ 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
      </figure>

      <t>The sub-fields of this structure are as follows:
      <list style="hanging">
        <t hangText="Capability Type:"> indicates the specific capability 
        supported. An IANA registry exists for values of this sub-field.
        The values specified by this document are listed below.</t>

        <t hangText="Capability Length:"> the number of bytes of data 
        contained in the Capability Data sub-field, excluding padding. If 
        the definition of a particular capability includes no capability
        data, the value of the Capability Length sub-field is zero.</t>

        <t hangText="Capability Data:"> contains data associated with the
        capability as specified for that capability. If the definition of
        a particular capability includes no capability data, the Capability
        Data sub-field is absent (has zero length). Otherwise, the Capability
        Data sub-field MUST be padded with zeroes as required to terminate
        on a 4-byte word boundary. The possibility of specifying capability
        data provides the flexibility to advertise more than the mere presence
        or absence of a capability if needed. </t>
      </list>
      </t>

      <t> The following capabilities are defined for ANCP as applied to
      DSL access:
      <list style="symbols">
        <t>Capability Type : DSL Topology Discovery = 0x01
        <list style="hanging">
          <t>Access technology: DSL</t>
          <t>Length (in bytes) : 0</t>
          <t>Capability Data : NULL</t>
        </list>
        For the detailed protocol specification of this capability see
        <xref target="topol"/>. </t>

        <t>Capability Type : DSL Line Configuration = 0x02 
        <list style="hanging">
          <t>Access technology: DSL</t>
          <t>Length (in bytes) : 0</t>
          <t>Capability Data : NULL</t>
        </list>
        For the detailed protocol specification of this capability see
        <xref target="lineConfig"/>. </t>

        <t>Capability Type : DSL Remote Line Connectivity Testing = 0x04 
        <list style="hanging">
          <t>Access technology: DSL</t>
          <t>Length (in bytes) : 0</t>
          <t>Capability Data : NULL</t>
        </list>
        For the detailed protocol specification of this capability see
        <xref target="oamCAP"/>. </t>
      </list>
      </t>
      
      <t>In addition to the adjacency messages whose format is shown in
      <xref target="fig_adj_upd"/>, ANCP adjacency procedures use the Adjacency
      Update message (<xref target="fig_adj_upd"/>) to inform other NASs
      controlling the same AN partition when a particular NAS joins or loses 
      an adjacency with that partition.</t>
      
      <figure anchor="fig_adj_upd" title="The Adjacency Update Message">
        <artwork>
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Version    | Message Type  | Result|        Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Partition ID  |            Transaction Identifier             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |I|      SubMessage Number      |           Length              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        </artwork>
      </figure>
    
      <t>The Adjacency Update message is identical to
      the general ANCP message header described in <xref target="ancpFormat"/>,
      but the field settings are in part specific to the Adjacency Update
      message. The fields in this message are as follows:
      <list style="hanging">
        <t hangText="Version (8 bits):"> the ANCP version negotiated and
        running in this adjacency.</t>
        
        <t hangText="Message Type (8 bits):"> always 85.</t>
        
        <t hangText="Result (4 bits):"> set to Ignore (0).</t>
        
        <t hangText="Code (12 bits):"> set to the total number of adjacencies
        currently established on this partition, from
        the point of view of the AN.</t>
        
        <t hangText="Partition ID (8 bits):"> the partition identifier of the
        partition for which this notification is being sent.</t>
        
        <t hangText="Transaction Identifier (24 bits):"> MUST be set to 0.</t>
        
        <t hangText="I (1 bit), SubMessage number (15 bits):">
        set as described in <xref target="HDRIflagSubmsg"/>.</t>
        
        <t hangText="Length (16 bits):"> set as described in 
        <xref target="HDRLen"/>.</t>
      </list>
      </t>
      
    </section><!-- adjFmt -->

    <section anchor="adjProc" title="ANCP Adjacency Procedures">
        
      <section anchor="adjOver" title="Overview">
    
        <t>The ANCP adjacency protocol operates symmetrically between the 
        NAS and the AN. In the absence of errors or race conditions, each 
        peer sends a SYN message, receives a SYNACK message in acknowledgement,
        and completes the establishment of the adjacency by sending an ACK 
        message. Through this exchange, each peer learns the values of the 
        Name, Port, and Instance parameters identifying the other peer, and the two
        peers negotiate the values of the Version, Timer, PFlag, and Partition ID
        parameters and the set of capabilities that the adjacency will support.</t>
        
        <t>Once the adjacency has been established, its liveness is periodically
        tested. The peers engage in an ACK message exchange at a frequency
        determined by the negotiated value of the Timer field. </t>
        
        <t>If an inconsistency, loss of contact, or protocol violation is detected,
        the detecting peer can force a restart of the synchronization process by
        sending an RSTACK message to the other end.</t>
        
        <t>Once an adjacency has been established, if more than one NAS has
        established an adjacency to the same partition, then the AN sends an
        Adjacency Update message to each such NAS to let it know how many
        established adjacencies the partition currently supports. Similarly,
        if an adjacency is lost, the AN sends an Adjacency Update message to
        each of the remaining adjacent NASs to let them know about the change
        in status.
        </t>
        
      </section><!-- adjOver-->
      
      <section anchor="adjStatMach" title="Adjacency Protocol State Machine">
    
        <t>The adjacency protocol is described by the following rules and state
        tables. It begins with the sending of a SYN by each end as soon as the
        transport connection has been established. If at any point the operations
        A, B, C, or "Verify Adjacent State" defined below detect a mismatch, a 
        log SHOULD be generated, identifying the fields concerned and the expected
        and received values for each.</t>

        <t>The rules and state tables use the following operations:
        <list style="symbols">   
          <t>The "Record Adjacency State" operation is defined in 
          <xref target="SYNrcv"/>.</t>
          
          <t>The "Verify Adjacency State" operation consists of verifying that
          the contents of the incoming SYNACK message match the adjacency state
          values previously recorded.</t>
   
          <t>The procedure "Reset the link" is defined as:
          <list style="numbers">          
            <t>Generate a new instance number for the link.</t>
            
            <t>Delete the peer verifier (set to zero the values of Sender 
            Instance, Sender Port, and Sender Name previously stored by the 
            Record Adjacency State operation).</t>
            
            <t>Send a SYN message(<xref target="SYNsnd"/>).</t>
            
            <t>Enter the SYNSENT state.</t>
          </list>
          </t>
   
          <t>The state tables use the following Boolean terms and operators. 
          <list style="letters">
            <t>The Sender Instance in the incoming message matches the value 
            stored from a previous message by the "Record Adjacency State" 
            operation.</t>
         
            <t>The Sender Instance, Sender Port, Sender Name and Partition ID 
            fields in the incoming message match the values stored from a 
            previous message by the "Record Adjacency State" operation.</t>
         
            <t>The Receiver Instance, Receiver Port, Receiver Name and Partition
            ID fields in the incoming message match the values of the Sender
            Instance, Sender Port, Sender Name and Partition ID currently sent
            in outgoing SYN, SYNACK, and ACK messages, except that the NAS always
            accepts the Partition ID value presented to it in a SYN or SYNACK 
            message.</t>
          </list>
          
          <list style="empty">
            <t>"&amp;&amp;" Represents the logical AND operation.</t>
         
            <t>"||" Represents the logical OR operation.</t>
         
            <t>"!" Represents the logical negation (NOT) operation.</t>
          </list>
          </t>
   
          <t>A timer is required for the periodic generation of SYN, SYNACK,
          and ACK messages.  The value of the timer is negotiated in the Timer
          field.  The period of the timer is unspecified but a value of 25 
          seconds is suggested. Note that since ANCP uses a reliable transport
          protocol, the timer is unlikely to expire in any state other than ESTAB.
          <vspace blankLines="1"/>
          There are two independent events: the timer expires, and a packet 
          arrives.  The processing rules for these events are:
          <list style="empty">
            <t>Timer Expires:   Reset Timer
            <list style="empty">
              <t>If state = SYNSENT Send SYN</t>
              <t>If state = SYNRCVD Send SYNACK</t>
              <t>If state = ESTAB   Send ACK</t>
            </list>
            </t>       
        
            <t>Packet Arrives:
            <list style="empty">
              <t>If incoming message is an RSTACK:
              <list style="empty">
                <t>If (A &amp;&amp; C &amp;&amp; !SYNSENT) Reset the link</t>
                <t>Else discard the message.</t>
              </list>
              </t>
                                          
              <t>If incoming message is a SYN, SYNACK, or ACK:
              <list style="empty">
                <t>Response defined by the following State Tables.</t>
              </list>        
              </t>
              
              <t>If incoming message is any other ANCP message and state != ESTAB:
              <list style="empty">
                <t>Discard incoming message.</t>
                <t>If state = SYNSENT Send SYN (Note 1)</t>
                <t>If state = SYNRCVD Send SYNACK (Note 1)</t>
              </list>    
              </t>                    
            </list>
                   
            Note 1: No more than two SYN or SYNACK messages should be sent 
            within any time period of length defined by the timer.
            </t>
          </list>
          </t>
   
          <t>State synchronisation across a link is considered to be achieved 
          when the protocol reaches the ESTAB state.  All ANCP messages, other
          than adjacency protocol messages, that are received before 
          synchronisation is achieved will be discarded.</t>
   
        </list>
        </t>

        <section anchor="adjStatTab" title="State Tables">
        
          <figure suppress-title="true">
            <artwork>
<![CDATA[
 State: SYNSENT

+====================================================================+
|    Condition     |                Action               | New State |
+==================+=====================================+===========+
|   SYNACK && C    |  Update Peer Verifier; Send ACK     |   ESTAB   |
+------------------+-------------------------------------+-----------+
|   SYNACK && !C   |            Send RSTACK              |  SYNSENT  |
+------------------+-------------------------------------+-----------+
|       SYN        |  Update Peer Verifier; Send SYNACK  |  SYNRCVD  |
+------------------+-------------------------------------+-----------+
|       ACK        |            Send RSTACK              |  SYNSENT  |
+====================================================================+
]]>
            </artwork>
          </figure>

          <figure suppress-title="true">
            <artwork>
<![CDATA[
 State: SYNRCVD
 
+====================================================================+
|    Condition     |                Action               | New State |
+==================+=====================================+===========+
|   SYNACK && C    |  Verify Adjacency State; Send ACK   |   ESTAB   |
+------------------+-------------------------------------+-----------+
|   SYNACK && !C   |            Send RSTACK              |  SYNRCVD  |
+------------------+-------------------------------------+-----------+
|       SYN        | Record Adjacency State; Send SYNACK |  SYNRCVD  |
+------------------+-------------------------------------+-----------+
|  ACK && B && C   |              Send ACK               |   ESTAB   |
+------------------+-------------------------------------+-----------+
| ACK && !(B && C) |            Send RSTACK              |  SYNRCVD  |
+====================================================================+
]]>
            </artwork>
          </figure>

          <figure suppress-title="true">
            <artwork>
<![CDATA[
 State: ESTAB
 
+====================================================================+
|    Condition     |                Action               | New State |
+==================+=====================================+===========+
|  SYN || SYNACK   |           Send ACK (note 2)         |   ESTAB   |
+------------------+-------------------------------------+-----------+
|  ACK && B && C   |           Send ACK (note 3)         |   ESTAB   |
+------------------+-------------------------------------+-----------+
| ACK && !(B && C) |              Send RSTACK            |   ESTAB   |
+====================================================================+
]]>
            </artwork>
          </figure>

          <t>Note 2: No more than two ACKs should be sent within any time period
          of length defined by the timer.  Thus, one ACK MUST be sent every time
          the timer expires.  In addition, one further ACK may be sent between
          timer expirations if the incoming message is a SYN or SYNACK.  This
          additional ACK allows the adjacency protocol to reach synchronisation 
          more quickly.</t>

          <t>Note 3: No more than one ACK should be sent within any time period
          of length defined by the timer.</t>

        </section><!-- adjStatTab -->
    
      </section><!-- adjStatMach -->
    
          
      <section anchor="adjSYN" title="The Adjacency Protocol SYN Message">
        
        <section anchor="SYNsnd" title="Action By the Sender">
      
          <t>The SYN message is sent in accordance with the state tables just
          described. The sender sets the individual fields as follows:
          <list style="hanging">
            <t hangText="Version:"> SHOULD be set to the highest version of ANCP
            that the sender supports.</t>
            
            <t hangText="Message Type:"> MUST be set to 10.</t>
            
            <t hangText="Timer:"> SHOULD be set to the value configured in the
            AN or NAS sending the message. </t>
            
            <t hangText="M Flag"> MUST be set to 1 by the NAS, and 0 by the AN.</t>
            
            <t hangText="Code:"> MUST be set to 1 (SYN).</t>
            
            <t hangText="Sender Name"> set as described in 
            <xref target="adjFmt"/>.</t>
            
            <t hangText="Receiver Name:"> SHOULD be set to 0.</t>
            
            <t hangText="Sender Port"> set as described in 
            <xref target="adjFmt"/>.</t>
            
            <t hangText="Receiver Port:"> SHOULD be set to 0.</t>
            
            <t hangText="PType:"> set according to the following rules:
            <list style="empty">
              <t>Settings by the AN:
              <list style="empty">
                <t>0 - the AN does not support partitions;</t>
                <t>2 - the value of Partition ID contained in this message is 
                assigned to the current partition.</t>
              </list>
              </t>
              
              <t>Settings by the NAS:
              <list style="empty">
                <t>0 - the NAS leaves the decision on partitioning to the AN
                (RECOMMENDED setting);</t>
                <t>1 - the NAS requests that the AN use the value of Partition ID
                contained in this message for the current partition. The NAS MAY
                use this setting even if it has already received a SYN message 
                from the AN, provided that the AN has indicated support for 
                partitions. The NAS MUST be prepared to use whatever value it
                receives in a subsequent SYN or SYNACK message, even if this
                differs from the requested value.</t>
              </list>
              </t>
            </list>
            </t>
            
            <t hangText="PFlag:"> set to the mode of adjacency setup (new 
            adjacency vs. recovered adjacency) requested by the sender. 
            Warning: setting PFlag=1 runs the risk of state mismatch because ANCP
            does not provide the means for the NAS to audit the current state of
            the AN.</t>
            
            <t hangText="Sender Instance:"> set as described in 
            <xref target="adjFmt"/>.</t>
            
            <t hangText="Partition ID:"> MUST be set to 0 if PType=0, otherwise
            set to the assigned or requested partition identifier value.</t>
            
            <t hangText="Receiver Instance:"> SHOULD be set to 0.</t>
            
            <t hangText="# of Caps:"> MUST be set to the number of Capability 
            fields that follow.</t>
            
            <t hangText="Total Length:"> MUST be set to the total number of 
            bytes in the Capability fields that follow.</t>
            
            <t hangText="Capability Fields:"> one Capability field MUST be present
            for each ANCP capability for which the sender wishes to advertise
            support.</t>
          </list>
          </t>
      
        </section><!-- SYNsnd -->
        
        <section anchor="SYNrcv" title="Action By the Receiver">

          <t>Upon receiving a validly-formed SYN message, the receiver first
          checks the value of the Version field. If this value is not within the
          range of ANCP versions that the receiver supports, the message MUST be
          silently ignored. Similarly, the message is silently ignored if the 
          M-flag is 0 and the receiver is an AN, or if the M-flag is 1 and the
          receiver is a NAS. If these checks are passed and the receiver is in
          ESTAB state, it returns an ACK (as indicated by the ESTAB state table
          in <xref target="adjStatTab"/>). The contents of the ACK MUST reflect
          the adjacency state as previously recorded by the receiver.</t>
          
          <t>Otherwise, the receiver MUST record the adjacency state as follows:
          <list style="hanging">
            <t hangText="Version:"> the supported Version value received in the 
            SYN message. This value MUST be used for all subsequent ANCP messages
            sent during the life of the adjacency.</t>
            
            <t hangText="Timer:"> the larger of the Timer value received in the
            SYN message and the value with which the receiver is configured.</t>
            
            <t hangText="Sender Name:"> the value of the Sender Name field in 
            the SYN message just received.</t>
            
            <t hangText="Receiver Name:"> the value used by the receiver in the 
            Sender Name field of SYN, SYNACK, and ACK messages it sends in this 
            adjacency.</t>
            
            <t hangText="Sender Port:"> the value of the Sender Port field in 
            the SYN message just received.</t>
            
            <t hangText="Receiver Port:"> the value used by the receiver in the 
            Sender Port field of SYN, SYNACK, and ACK messages it sends in this 
            adjacency.</t>
            
            <t hangText="Sender Instance:"> the value of the Sender Instance field  
            in the SYN message just received.</t>
            
            <t hangText="PFlag:"> the lesser of the value determined by local policy
            and the value received in the SYN message. That is, preference is given
            to "0 - New adjacency" if there is a conflict.</t>
            
            <t hangText="Partition ID:"> if the SYN receiver is the AN, this is
            set to 0 if the AN does not support partitions, or to the non-zero
            value of the partition identifier it chooses to assign otherwise. 
            If the SYN receiver is the NAS, this is set to the value of the 
            Partition ID field copied from the SYN.</t>
            
            <t hangText="Receiver Instance:"> the value used by the receiver in the 
            Sender Instance field of SYN, SYNACK, and ACK messages it sends in this 
            adjacency.</t>
            
            <t hangText="Capabilities:"> the set of ANCP capabilities that were
            offered in the SYN and are supported by the receiver.</t>
          </list>
          </t>

        </section><!-- SYNrcv -->

      </section><!-- adjSYN -->
      
      <section anchor="adjSYNACK" title="The Adjacency Protocol SYNACK Message">
        
        <section anchor="SYNACKsnd" title="Action By the Sender">
      
          <t>The SYNACK is sent in response to a successfully received SYN message,
          as indicated by the state tables. The Version, Timer, PFlag, and Partition
          ID fields MUST be populated with the values recorded as part of adjacency
          state. The # of Caps, Total Length, and Capability fields MUST also be
          populated in accordance with the Capabilities recorded as part of 
          adjacency state. The remaining fields of the SYNACK message MUST
          be populated as follows:
          <list style="hanging">
            <t hangText="Message Type:"> MUST be 10.</t>
            
            <t hangText="M-flag:"> MUST be set to 0.</t>
            
            <t hangText="Code:"> MUST be 2 (SYNACK).</t>
            
            <t hangText="PType:"> MUST be 0 if the Partition ID value is 0, or
            2 if the Partition ID value is non-zero.</t>
          
            <t hangText="Sender Name:"> MUST be set to the Receiver Name value
            recorded as part of adjacency state.</t>
            
            <t hangText="Receiver Name:"> MUST be set to the Sender Name value
            recorded as part of adjacency state.</t>
            
            <t hangText="Sender Port:"> MUST be set to the Receiver Port value
            recorded as part of adjacency state.</t>
            
            <t hangText="Receiver Port:"> MUST be set to the Sender Port value
            recorded as part of adjacency state.</t>
            
            <t hangText="Sender Instance:"> MUST be set to the Receiver Instance 
            value recorded as part of adjacency state.</t>
            
            <t hangText="Receiver Instance:"> MUST be set to the Sender Instance value
            recorded as part of adjacency state.</t>
          </list>
          </t>
          
          <t>If the set of capabilities recorded in the adjacency state is empty,
          then after sending the SYNACK the sender MUST raise an alarm to 
          management, halt the adjacency procedure, and tear down the TCP 
          session if it is not being used by another adjacency. The sender MAY
          also terminate the IPSec security association
          if no other adjacency is using it.</t>
      
        </section><!-- SYNACKsnd -->
        
        <section anchor="SYNACKrcv" title="Action By the Receiver">
      
          <t>As indicated by the state tables, the receiver of a SYNACK first
          checks that the Receiver Name, Receiver Port, and Receiver Instance
          values match the Sender Name, Sender Port, and Sender Instance values
          it sent in SYN message that is being acknowledged. The AN also checks
          that the PType and Partition ID match. If any of these checks fail,
          the receiver sends an RSTACK as described in 
          <xref target="RSTACKsnd"/>.  </t>
          
          <t>The receiver next checks whether the set of capabilities provided in
          the SYNACK is empty. If so, the receiver MUST raise an alarm to management
          and halt the adjacency procedure.</t>
          
          <t>Assuming that the SYNACK passes these checks, two cases arise. The
          first possibility is that the receiver has already recorded adjacency
          state. This will occur if the SYNACK is received while the receiver 
          is in SYNRCVD state. In this case, the Version, Timer, Sender Name, 
          Sender Port, Sender Instance, PFlag, and capability-related fields 
          in the SYNACK MUST match those recorded as part of adjacency state.
          If a mismatch is detected, the receiver sends
          an RSTACK. This is the "Verify Adjacency State" procedure shown in the
          SYNRCVD state table.</t>
          
          <t>If, on the other hand, the SYNACK is received while the receiver
          is in SYNSENT state, the receiver MUST record session state as 
          described in <xref target="SYNrcv"/>.</t>
          
          <t>In either case, if the receiver is the NAS, it MUST accept
          the Partition ID value provided in the SYNACK, updating its recorded
          adjacency state if necessary.</t>
      
        </section><!-- SYNACKrcv -->
      
      </section><!-- adjSYNACK -->
      
      <section anchor="adjACK" title="The Adjacency Protocol ACK Message">
    
        <section anchor="ACKsnd" title="Actions By the Sender">
        
          <t>As indicated by the state tables, the ACK message is sent in a 
          number of different circumstances. The main-line usages are as a 
          response to SYNACK, leading directly to the ESTAB state, and as a
          periodic test of liveness once the ESTAB state has been reached.</t>
          
          <t>The sender MUST populate the ACK from recorded adjacency state,
          exactly as described in <xref target="SYNACKsnd"/>. The only difference
          is that Code MUST be set to 3 (ACK).</t>
        
        </section><!-- ACKsnd -->
          
        <section anchor="ACKrcv" title="Actions By the Receiver">
        
          <t>The required actions by the receiver are specified by the state
          tables. In addition to the checks B and C, the receiver SHOULD verify
          that the remaining contents of the ACK match the recorded adjacency 
          state at the receiver. If that check fails the receiver MUST send an
          RSTACK as described in <xref target="RSTACKsnd"/>. </t>
          
          <t>Once the adjacency has been established, either peer can initiate
          the ACK exchange that tests for liveness. To meet the restrictions
          on ACK frequency laid down in the notes to the state tables, it is 
          desirable that only one such exchange occur during any one interval.
          Hence if a peer receives an ACK when in ESTAB state, it MUST reply to
          that ACK as directed by the state tables, but SHOULD NOT initiate another
          ACK exchange in the same interval. To meet this objective, the receiver 
          MUST reset its timer when it receives an ACK while in ESTAB state. 
          <list style="empty">
            <t>It is, of course, possible that two exchanges happen because of 
            race conditions.</t>
          </list>
          </t>
        
        </section><!-- ACKrcv -->
        
      </section><!-- adjACK -->
        
      <section anchor="adjRSTACK" title="The Adjacency Protocol RSTACK Message">
          
        <section anchor="RSTACKsnd" title="Action By the Sender">
        
          <t>The RSTACK is sent in response to various error conditions as
          indicated by the state tables. In general it leads to a restart of 
          adjacency negotiations (although this takes a few steps when the
          original sender of the RSTACK is in ESTAB state).</t>
          
          <t>As indicated in <xref target="adjFmt"/>, the Sender Name, Port,
          and Instance fields in the RSTACK MUST be copied from the Receiver,
          Name, Port, and Instance fields in the message that caused the RSTACK
          to be sent. Similarly, the Receiver identifier fields in the RSTACK
          MUST be copied from the corresponding Sender identifier fields in the
          message that triggered the RSTACK. </t>
          
          <t>If the sender has recorded adjacency state, the Version, Timer, 
          PType, PFlag, Partition ID, and capability-related fields SHOULD be set
          based on the recorded adjacency state. Otherwise they SHOULD be the same
          as the sender would send in a SYN message. The Message Type MUST be 10,
          the M-flag MUST be 0, and Code MUST be 4 (RSTACK).</t>
        
        </section><!-- RSTACKsnd -->
          
        <section anchor="RSTACKrcv" title="Action By the Receiver">
        
          <t>The receiver of an RSTACK MAY attempt to diagnose the problem
          which caused the RSTACK to be generated by comparing its own adjacency
          state with the contents of the RSTACK. However, the primary purpose of
          the RSTACK is to trigger action as prescribed by 
          <xref target="adjStatMach"/>. </t>
        
        </section><!-- RSTACKrcv -->
      
      </section><!-- adjRSTACK -->

      <section anchor="adjLoss" title="Loss of Synchronization">

        <t> Loss of
        synchronisation MAY be declared if after synchronisation is achieved:
        <list style="symbols">
       	  <t>no valid ANCP messages are received in any period of time in 
       	  excess of three times the value of the Timer field negotiated in the
       	  adjacency protocol messages, or</t>
       	  <t>a mismatch in adjacency state is detected.</t>
       	</list>
       	In either case the peer detecting the condition MUST send an RSTACK
       	to the other peer as directed in <xref target="RSTACKsnd"/>, in order
       	to initiate resynchronization.
        </t>

   			<t>While re-establishing synchronisation with a controller, a switch
   			SHOULD maintain its connection state, deferring the decision about
   			resetting the state until after synchronisation is re-established. 
   			Once synchronisation is re-established the decision about resetting 
   			the connection state SHOULD be made based on the negotiated value of 
   			PFlag.</t>
        
      </section><!-- adjLoss -->
      
    </section><!-- adjProc -->

  </section>  <!-- adjacency -->

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="ancpFormat" title="ANCP General Message Formats">

    <t>This section describes the general format of ANCP messages other 
    than the adjacency messages. See <xref target="fig_genFmt"/></t>

    <figure anchor="fig_genFmt" title="ANCP General Message Format">
       <artwork>
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Version    | Message Type  | Result|      Result Code      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Partition ID  |            Transaction Identifier             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |I|      SubMessage Number      |           Length              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                          Message Payload                      ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      </artwork>
    </figure>

    <section anchor="ANCPmsgHdr" title="The ANCP Message Header">

      <t> A complete explanation of the ANCP general message header fields
      follows.</t>
      
      <section anchor="HDRvers" title="Version Field (8 bits)">
      
        <t> This field carries the version of the ANCP protocol
        that was agreed for the session during adjacency negotiation. </t>
        
      </section>
      
      <section anchor="HDRmsgtyp" title="Message Type Field (8 bits)">
    
        <t> This field indicates the ANCP message type. Message type
        values are registered in an IANA registry.</t>
    
      </section>
      
      <section anchor="HDRresult" title="Result Field (4 bits)">
      
        <t> In request messages, the Result field indicates the circumstances
        under which a response is required. ANCP specifies what Result value
        each request message type should have. In responses the Result field 
        indicates either Success (0x3) or Failure (0x4) as the case may be. 
        <list style="hanging">
          <t hangText="Ignore:"> Res = 0x0 &ndash; Treat this field as
          a "no operation" and follow the response procedures specified for 
          the received message type. </t>

          <t hangText="Nack:"> Res = 0x1 &ndash; Result value indicating
          that a response is expected to the request only in
          cases of failure caused during the processing of the message
          contents or of the contained directive(s). </t>

          <t hangText="AckAll:"> Res = 0x2 &ndash; Result value indicating
          that a response to the message is requested in all cases. </t>

          <t hangText="Success:"> Res = 0x3 &ndash; Result value 
          indicating that this is a response and that the request was
          executed successfully. The Result Code field for a successful result is
          typically 0, but MAY take on other values as specified for
          particular message types.</t>

          <t hangText="Failure:"> Res = 0x4 &ndash; Result value 
          indicating that this is a response and that the request was
          not executed successfully. The receiver of the response SHOULD
          take further action as indicated by the Result Code value and any 
          diagnostic data contained in a Status-Info TLV included in the
          response.</t>
        </list>
        </t>
    
      </section><!-- Result -->
      
      <section anchor="HDRcode" title="Result Code Field (12 bits)">
      
        <t>This field gives further information concerning the result
        in a response message. It is mostly used to pass an error code
        in a failure response but can also be used to give further
        information in a success response message or an event message.
        In a request message, the Result Code field is not used and MUST be
        set to 0x0 (No result).</t>
                   
        <t>A number of Result Code values are specified below. Specification of
        additional Result Code values in extensions or updates to this document
        MUST include the following information:
        <list style="symbols">
           <t>Result Code value;</t> 
           <t>One-line description;</t>
           <t>Where condition detected: (control application or ANCP agent);</t>
           <t>Further description (if any);</t>
           <t>Required additional information in the response message;</t>
           <t>Target (control application or ANCP agent at the peer that
           sent the original request);</t>
          <t>Action RECOMMENDED for the receiving ANCP agent</t>
        </list>
        </t> 
      
        <t>In addition to any suggested action in the text which follows, a 
        count of the number of times a given non-zero Result Code value was 
        received SHOULD be provided for management. Where an action includes 
        resending of a request, a given request SHOULD NOT be re-sent more 
        than once.</t>

        <t>This document specifies the following Result Code values. 
        <list style="hanging">
          <t hangText="Result Code value: 0x2"> 
          <list style="symbols">
            <t>One-line description: Invalid request message</t>
            <t>Where condition detected: ANCP agent</t>
            <t>Further description: The request was a properly formed
            message which violates the protocol through its timing
            or direction of transmission. The most likely reason for 
            this outcome in the field will be a race condition.</t>
            <t>Required additional information in the response 
            message: none, if the response message is of the same 
            type as the request. As specified in <xref target="genResp"/>
            if the response message is a Generic Response message.</t>
            <t>Target: ANCP agent at the peer that sent the original request</t>
            <t>Action RECOMMENDED for the receiving ANCP agent: The
            original request MAY be re-sent once only after a short 
            delay. Inform the control application with appropriate 
            identification of the failed transaction if the second 
            attempt fails or no second attempt is made.</t>
          </list>
           </t>
           
          <t hangText="Result Code value: 0x6 ">
          <list style="symbols">
            <t>One-line description: One or more of the specified ports 
            are down</t>
             <t>Where condition detected: control application</t>
             <t>Further description (if any):  This Result Code value indicates a state
             mismatch between the NAS and AN control applications, possibly 
             due to a race condition.</t> 
             <t>Required additional information in the response message:
             if the request identified multiple access lines or the 
             response is a Generic Response message, then the response 
             MUST contain a Status-Info TLV encapsulating TLV(s) containing
             the line identifier(s) of the access lines that are not 
             operational.</t> 
             <t> Target: control application at the peer that sent the
             original request</t> 
             <t>Action RECOMMENDED for the receiving ANCP agent: indicate
             the error and forward the line identifier(s) to the control
             application.</t>
          </list>
          </t>
    
          <t hangText="Result Code value: 0x13"> 
          <list style="symbols">
             <t>One-line description: Out of resources</t> 
             <t>Where condition detected: ANCP protocol layer or control 
             application</t> 
             <t>Further description: (e.g., memory exhausted, etc.). This
             Result Code value MUST be reported only by the AN, and indicates a
             condition that is probably unrelated to specific access lines
             (although it may be related to the specific request).</t> 
             <t>Required additional information in the response message:
             none, if the response message is of the same type as the 
             request. As specified in <xref target="genResp"/> if the 
             response message is a Generic Response message.</t>
             <t>Target: ANCP agent at the peer that sent the original
             request</t>
             <t>Action RECOMMENDED for the receiving ANCP agent: If the 
             NAS receives this Result Code value from multiple requests for the
             same AN in a short interval, it SHOULD reduce the rate at 
             which it sends requests in proportion to the rate at which 
             requests are failing with Result Code = 19. It MAY retry individual 
             requests. If only a specific request is failing with Result Code =
             19, the ANCP agent in the NAS MAY request the control
             application to decompose the request into simpler components
             if this is possible.</t>
           </list>
           </t>
  
          <t hangText="Result Code value: 0x51"> 
          <list style="symbols">
            <t>One-line description: Request message type not implemented</t> 
            <t>Where condition detected: ANCP agent</t> 
            <t>Further description: This could indicate a mismatch 
            in protocol version or capability state. It is also 
            possible that support of a specific message is optional 
            within some ANCP capability.</t> 
            <t>Required additional information in the response message: 
            none, if the response message is of the same type as the 
            request. As specified in <xref target="genResp"/> if the 
            response message is a Generic Response message.</t> 
            <t>Target: ANCP agent at the peer that sent the original 
            request</t>
            <t>Action RECOMMENDED for the receiving ANCP agent: If the
            receiver of this Result Code value expects that support of the 
            message type concerned is mandatory according to the
            capabilities negotiated for the session, it MAY re-send the message 
            in case the message was corrupted in transit the first time. If that 
            fails, and use of the message type cannot be avoided, the ANCP agent 
            MAY reset the adjacency by sending
            an RSTACK adjacency message (<xref target="RSTACKsnd"/>) where PType is
            set to 0 and Sender and Receiver Name, Port, and Instance are taken 
            from recorded adjacency state. If a reset does not eliminate the problem,
            the receiving ANCP agent SHOULD raise an alarm to management and then
            cease to operate.  </t>
          </list>
          </t>
  
          <t hangText="Result Code value: 0x53">
          <list style="symbols">
            <t>One-line description: Malformed message</t> 
            <t>Where condition detected: ANCP agent</t> 
             <t>Further description: This could be the result of corruption
             in transit, or an error in implementation at one end or the other.</t>
             <t>Required additional information in the response message:  
            none, if the response message is of the same type as the 
            request. As specified in <xref target="genResp"/> if the 
            response message is a Generic Response message.</t> 
            <t>Target: ANCP agent at the peer that sent the original request</t>
            <t>Action RECOMMENDED for the receiving ANCP agent: The request
            SHOULD be re-sent once to eliminate the possibility of in-transit
            corruption.</t>
          </list>
           </t>
  
          <t hangText="Result Code value: 0x54">
          <list style="symbols">
            <t>One-line description: Mandatory TLV missing</t>
            <t>Where condition detected: ANCP agent</t>
            <t>Further description: none.</t>
            <t>Required additional information in the response message:
            the response message MUST contain a Status-Info message that
            encapsulates an instance of each missing mandatory TLV,
            where the length is set to zero and the value field is 
            empty (i.e., only the four-byte TLV header is present).</t>
            <t>Target: ANCP agent at the peer that sent the original request</t>
            <t>Action RECOMMENDED for the receiving ANCP agent: resend 
            the message with the missing TLV(s), if possible. Otherwise,
            report the error to the control application with an indication
            of the missing information required to construct the missing 
            TLV(s).</t>
          </list>
          </t>
  
          <t hangText="Result Code value: 0x55 ">
          <list style="symbols">
            <t>One-line description: Invalid TLV contents</t>
            <t>Where condition detected: ANCP agent</t>
            <t>Further description: the contents of one or more TLVs in the
            request do not match the specifications provided for the those
            TLVs.</t> 
            <t>Required additional information in the response message:
            the response MUST contain a Status-Info TLV encapsulating the
            erroneous TLVs copied from the original request.</t> 
            <t>Target: ANCP agent at the peer that sent the original request</t>
            <t>Action RECOMMENDED for the receiving ANCP agent: correct
            the error and resend the request, if possible.  Otherwise,
            report the error to the control application with an indication 
            of the erroneous information associated with the invalid TLV(s).</t>
          </list>
          </t>
          
          <t hangText="Result Code value: 0x500">
          <list style="symbols">
             <t>One-line description: One or more of the specified ports do
             not exist</t> 
            <t>Where condition detected: control application</t>
            <t>Further description (if any): this may indicate a configuration
            mismatch between the AN and the NAS or AAA.</t>
            <t>Required additional information in the response message:
            if the request identified multiple access lines or the 
            response is a Generic Response message, then the response
            MUST contain a Status-Info TLV encapsulating TLV(s) containing
            the rejected line identifier(s).</t> 
            <t>Target: control application at the peer that sent the original
            request</t> 
            <t>Action RECOMMENDED for the receiving ANCP agent: indicate 
            the error and forward the line identifiers to the control 
            application.</t>
           </list>
          </t>
        </list>
        </t>

      </section><!-- Result Code -->

      <section anchor="HDRPartID" title="Partition ID (8 bits)">
      
        <t>The Partition ID field MUST contain the value that was negotiated for
        Partition ID during the adjacency procedure as described above.
        </t>
    
      </section>
      
      <section anchor="HDRTransID" title="Transaction ID (24 bits)">
   
        <t>The Transaction ID is set by the sender of 
        a request message to associate a response message with the original
        request message. Unless otherwise specified for a given message
        type, the Transaction ID in request messages MUST be set to a
        value in the range (1, 2^24 &ndash; 1). When used in this manner,
        the Transaction ID sequencing MUST be maintained independently 
        for each message type within each ANCP adjacency. Furthermore,
        it SHOULD be incremented by 1 for each new message of the
        given type, cycling back to 1 after running the full range. For
        event messages, the Transaction ID SHOULD be set to zero.</t> 
      
        <t>Unless otherwise specified, the default behaviour for all ANCP 
        responses is that the value of the Transaction ID MUST be copied
        from the corresponding request message. </t>
        
      </section>

      <section anchor="HDRIflagSubmsg" 
                   title="I flag and SubMessage Number (1 + 15 bits)">
      
        <t>In GSMPv3 these provide a mechanism for message fragmentation. 
        Because ANCP uses TCP transport, this mechanism is unnecessary.
        An ANCP agent MUST set the I Flag and subMessage Number fields
        to 1 to signify "no fragmentation". </t>
        
      </section>
      
      <section anchor="HDRLen" title="Length (16 bits)">
      
        <t>This field MUST be set to the length of the ANCP message in bytes,
        including its header fields and message body but excluding the 
        four-byte encapsulating header defined in <xref target="transport"/>. </t>
    
      </section>
              
    </section><!-- ANCPmsgHdr -->

  <section anchor="ANCPmsgBody" title="The ANCP Message Body">
  
    <t>The detailed contents of the message payload portion of a given ANCP
    message can vary with the capability in the context of which it is 
    being used. However, the general format consists of zero or more fixed
    fields, followed by a variable amount of data in the form of 
    Type-Length-Value (TLV) data structures. </t>
  
    <t>The general format of a TLV is shown in <xref target="tlv_gen"/>:</t>
  
    <figure anchor="tlv_gen" title="General TLV Format">
      <artwork>
 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 (IANA registered)    |          Length               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               |
~                            Value                              ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      </artwork>
    </figure>

    <t>The fields of a TLV are defined as follows:
    <list style="hanging">
      <t hangText="Type (16 bits):">The TLV Type is an unsigned value identifying
      the TLV type and nature of its contents. An IANA registry has been 
      established for ANCP TLV Type codes.</t>

      <t hangText="Length (16 bits):">The number of bytes of data in the Value field
      of the TLV, excluding any padding required to bring this TLV to a 
      4-byte word boundary (see "Value" below). If a TLV contains other
      TLVs, any padding in the contained TLVs MUST be included in the value
      of Length. Depending on the specification of the TLV, the value of
      Length can be zero, a constant for all instances of the TLV, or a 
      varying quantity.</t>

      <t hangText="Value (variable):">The actual data carried by the TLV, if any. 
      The value field in each TLV MUST be padded with zeroes as required 
      to align with a 4-byte word boundary. The Value field of a TLV MAY 
      include fixed fields and/or other TLVs.</t>
    </list>
    </t>
    
    <t>Unless otherwise specified, TLVs MAY be added to a message in any 
    order. If the recipient of a message does not understand a particular
    TLV, it MUST silently ignore it.</t>

    <t>A number of TLVs are specified in the remainder of this document.</t>

   </section><!-- ANCPmsgBody -->
 </section><!-- ancpFormat -->
  
  <section anchor="msgPrincip" 
        title="General Principles for the Design of ANCP Messages">

    <t>ANCP allows for two
    messaging constructs to support request/response interaction:
    <list style="letters">
      <t>The same message type is used for both the request message and 
      the response message. The Result and Result Code field settings are used 
      to differentiate between request and response messages.</t>

      <t>The request and response messages use two different message types.</t>
    </list> 
    The first approach is illustrated by the protocol specifications 
    in <xref target="oam_CapProc"/>, the second by specifications in 
    <xref target="topolCapProc"/>. The purpose of this section is to 
    provide more details about the second approach in order to allow 
    the use of this messaging construct for the development of additional
    ANCP extensions.</t>

    <t>As <xref target="ancpFormat"/> indicated, all ANCP messages 
    other than adjacency messages share a common header format. When the
    response message type is different from that of the request, the 
    specification of the request message will typically indicate that 
    the Result field is set to Ignore (0x0) and provide procedures indicating
    explicitly when the receiver should generate a response and what 
    message type it should use.</t>

    <t>The Transaction ID field is used to distinguish between multiple request
    messages of the same type and to associate a response message to a 
    request. Specifications of ANCP messages for applications not requiring
    response correlation SHOULD indicate that the Transaction ID MUST be
    set to zero in requests. Applications that require response correlation
    SHOULD refer to the Transaction ID behaviour described in 
    <xref target="ANCPmsgHdr"/>.</t>

    <t>The specification for a response message SHOULD indicate in all 
    cases that value of the Transaction Identifier MUST be set to that
    of the corresponding request message. This allows the requester to 
    establish whether or not correlation is needed (by setting a non-zero
    or zero value for the Transaction ID). </t>

  </section><!-- msgPrincip -->

</section>  <!-- ANCPgeneral -->


<!-- ================================================================= -->

<section anchor="commonStuff"
     title="Generally Useful ANCP Messages and TLVs">

  <t>This section defines two messages and a number of TLVs that could 
  be useful in multiple capabilities. In some cases the content is
  under-specified, with the intention that particular capabilities spell
  out the remaining details.</t>

  <section anchor="provis" title="Provisioning Message">

    <t>The Provisioning message is sent by the NAS to the AN to provision
    information of global scope (i.e., not associated with specific access
    lines) on the AN. The Provisioning message has the format shown in 
    <xref target="fig_provis"/>. Support of the Provisioning message
    is OPTIONAL unless the ANCP agent claims support for a capability
    that requires its use.</t>

    <figure anchor="fig_provis" title="Format of the Provisioning Message">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TCP/IP Encapsulating Header (Section 3.2)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                ANCP General Message Header                    |     
+                      (Section 3.6.1)                          +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                             TLVs                              ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
      </artwork>
    </figure>

    <t>The message header field settings given below are REQUIRED in the
    Provisioning message. The remaining message header fields MUST be set
    as specified in <xref target="ANCPmsgHdr"/>. Which TLVs to carry in the
    Provisioning message is specified as part of the specification of the
    capabilities that use that message. The Provisioning message MAY be 
    used to carry data relating to more than one capability at once, assuming 
    that the capabilities concerned can co-exist and have all been negotiated
    during adjacency establishment. 
    <list style="hanging">
      <t hangText="Message Type:">MUST be set to 93.</t>
      <t hangText="Result:">MUST be set to 0x0 (Ignore).</t>
      <t hangText="Result Code:">MUST be set to zero.</t>
      <t hangText="Transaction ID:">MUST be populated with a non-zero value
      chosen in the manner described in <xref target="HDRTransID"/>.</t>
    </list>
    </t>

    <t>If the AN can process the message successfully and accept all the
    provisioning directives contained in it, the AN MUST NOT send any
    response.</t>

    <t>Unless otherwise specified for a particular capability, if the AN 
    fails to process the message successfully it MUST send a Generic 
    Response message (<xref target="genResp"/>) indicating failure and
    providing appropriate diagnostic information.</t>
              
  </section>  <!-- provis -->

  <section anchor="genResp" title="Generic Response Message">

    <t>This section defines the Generic Response message. The Generic 
    Response message MAY be specified as the appropriate response to a
    message defined in an extension to ANCP, instead of a more specific
    response message. As a general guideline, specification of the Generic
    Response message as a response is appropriate where no data needs to be 
    returned to the peer other than a result (success or failure), plus,
    in the case of a failure, a code indicating the reason for failure
    and a limited amount of diagnostic data. Depending on the particular
    use case, the Generic Response message MAY be sent by either the NAS
    or the AN.</t>
    
    <t>Support of the Generic Response message, both as sender and as 
    receiver, is REQUIRED for all ANCP agents, regardless of what 
    capabilities they support.</t>

    <t>The AN or NAS MAY send a Generic Response message indicating a 
    failure condition independently of a specific request before closing
    the adjacency as a consequence of that failure condition. In this case,
    the sender MUST set the Transaction ID field in the header and the 
    Message Type field within the Status-Info TLV to zeroes. The receiver 
    MAY record the information contained in the Status-Info TLV for 
    management use.</t>

    <t>The format of the Generic Response message is shown in 
    <xref target="response" /></t>

    <figure anchor="response"
            title="Structure of the Generic Response Message">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TCP/IP Encapsulating Header (Section 3.2)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                ANCP General Message Header                    |     
+                      (Section 3.6.1)                          +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Access line identifying TLV(s)                 |     
+                (copied from original request)                 +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Status-Info TLV                            |
~                     (Section 4.5)                             ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
      </artwork>
      <postamble>NOTE: TLVs MAY be in a different order from 
      what is shown in this figure.</postamble>
    </figure>

    <t>This document specifies the following header fields. The remaining
    fields in the ANCP general message header MUST be set as specified in 
    <xref target="ANCPmsgHdr"/>. 
    <list style="hanging">
      <t hangText="Message Type:">MUST be set to 91.</t> 
      <t hangText="Result:">MUST be set to 0x3 (Success) or 0x4 (Failure).</t> 
      <t hangText="Result Code:">MUST be set to zero for success or an appropriate
      non-zero value for failure.</t>
      <t hangText="Transaction ID:">MUST be copied from the message to 
      which this message is a response.</t> 
    </list>
    </t>
    
    <t>If the original request applied to a specific access line or set of
    lines, the TLVs identifying the line(s) and possibly the user MUST be
    copied into the Generic Response message at the top level.</t>
    
    <t>The Status-Info TLV MAY be present in a success response, to provide
    a warning as defined for a specific request message type. It MUST be 
    present in a failure response.  See <xref target="error"/> for a detailed
    description of the Status-Info TLV. The actual contents will depend 
    on the request message type this message is responding to and the value
    of the Result Code field.</t>
    
    <t>To prevent an infinite loop of error responses, if the Generic Response
    message is itself in error, the receiver MUST NOT generate an error 
    response in return.</t>
  
  </section>  <!-- genResp -->

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

  <section anchor="target" title="Target TLV">

    <t>
    <list style="hanging">
      <t hangText="Type:">0x1000 to 0x1020 depending on the specific content.
      Only 0x1000 has been assigned in this specification (see below). Support
      of any specific variant of the Target TLV is OPTIONAL unless the ANCP 
      agent claims support for a capability that requires its use.</t>
      <t hangText="Description:"> The Target TLV (0x1000 - 0x1020) is intended
      to be a general means to represent different types of objects.</t>
      <t hangText="Length:">Variable, depending on the specific object type.</t>
      <t hangText="Value:">Target information as defined for each object type.
      The Value field MAY consist of sub-TLVs.</t> 
    </list>
    </t>

    <t>TLV Type 0x1000 is assigned to a variant of the Target TLV representing
    a single access line and encapsulating one or more sub-TLVs identifying 
    the target. <xref target="fig_ALCtgt"/> is an example illustrating the
    TLV format for a single port identified by an Access-Loop-Circuit-ID TLV
    (0x0001) (<xref target="ALCItlv"/>). </t>

    <figure anchor="fig_ALCtgt" 
        title="Example of Target TLV For Single Access Line">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|    TLV Type = 0x1000          |Length = Circuit-ID Length + 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
| Access-Loop-Circuit-ID=0x0001 |       Circuit-ID Length       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               |
~                    Access Loop Circuit ID                     ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      </artwork>
    </figure>
                          
  </section>  <!-- target -->

  <section anchor="command" title=" Command TLV">

    <t>
    <list style="hanging">
      <t hangText="Type:">0x0011</t>
      
      <t hangText="Description:"> The Command TLV (0x0011) is intended
      to be a general means of encapsulating one or more command directives 
      in a TLV oriented message. The semantics of the command can be
      specified for each message type using it. I.e., the specification 
      of each message type that can carry the Command TLV is expected to
      define the meaning of the content of the payload, although re-use of
      specifications is, of course, permissible when appropriate. Support
      of any specific variant of the Command TLV is OPTIONAL unless the ANCP 
      agent claims support for a capability that requires its use.</t>
      
      <t hangText="Length:">Variable, depending on the specific contents.</t>
      
      <t hangText="Value:">Command information as defined for each message 
      type. The field MAY include sub-TLVs. The contents of this TLV MUST be
      specified as one "command" or alternatively a sequence of one or more
      "commands", each beginning with a one-byte Command Code and possibly
      including other data following the Command Code. An IANA registry has
      been established for Command Code values. This document reserves the
      Command Code value 0 as an initial entry in the registry.</t>
    </list>
    </t>

  </section>  <!-- command -->

  <section anchor="error" title="Status-Info TLV">

    <t>
    <list style="hanging">
      <t hangText="Name:">Status-Info</t>
      
      <t hangText="Type:">0x0106</t>
      
      <t hangText="Description:"> The Status-Info-TLV is intended to be
      a general container for warning or error diagnostics relating to
      commands and/or requests. It is a supplement to the Result Code field in
      the ANCP general header. The specifications for individual message
      types MAY indicate the use of this TLV as part of responses,
      particularly for failures. As mentioned above, the Generic Response
      message will usually include an instance of the Status-Info TLV. 
      Support of the Status-Info TLV, both as sender and as receiver, is
      REQUIRED for all ANCP agents, regardless of what capabilities they 
      support.</t>
      
      <t hangText="Length:">Variable, depending on the specific contents.</t>
      
      <t hangText="Value:">The following fixed fields. In addition, sub-TLVs
      MAY be appended to provide further diagnostic information.
      <list style="hanging">
      
        <t hangText="Reserved (8 bits):">see <xref target="resvUnused"/>
        for handling of reserved fields.</t>
        
        <t hangText="Msg Type (8 bits):">Message Type of the request for which this
        TLV is providing diagnostics.</t>
        
        <t hangText="Result Message Length (16 bits):">Number of bytes in the 
        error message, excluding padding, but including the language tag 
        and delimiter. This MAY be zero if no error message is provided.</t>
        
        <t hangText="Result Message:">Human-readable string providing 
        information about the warning or error condition. The initial characters
        of the string MUST be a language tag as described in 
        <xref target="RFC5646"/>, terminated by a colon (":"). The actual 
        text string follows the delimiter. The field is padded at the end
        with zeroes as necessary to extend it to a four-byte word boundary.</t>
      </list>
      <xref target="HDRcode"/> provides recommendations for what TLVs to add
      in the Status-Info TLV for particular values of the message header
      Result Code field.</t>
    </list>
    <xref target="fig_StatInfo"/> illustrates the Status-Info TLV.
    </t>

    <figure anchor="fig_StatInfo" title="The Status-Info TLV">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TLV Type = 0x0106          |              Length           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|    Reserved   |  Msg Type     |      Error Message Length     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|        Error Message (padded to 4 byte boundary)              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|           optional sub-TLVs...                                |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      </artwork>
    </figure>
  </section>  <!-- error -->
          
</section>  <!-- commonStuff -->
      
<!-- ===================================================================== -->

<section anchor="DSLcapab" 
    title="Introduction To ANCP Capabilities For Digital Subscriber Lines (DSL)">

  <t>DSL is a widely deployed access technology for Broadband Access for
  Next Generation Networks. Specifications such as <xref target="TR-059"/>,
  <xref target="TR-058"></xref>, and <xref target="TR-092"></xref> describe
  possible architectures for these access networks. The scope of these
  specifications includes the delivery of voice, video, and data services.</t>

  <t>The next three sections of this document specify basic ANCP capabilities
  for use specifically in controlling Access Nodes serving DSL access 
  (Tech Type = 0x05). The same ANs could be serving other access technologies
  (e.g. Metro-Ethernet, Passive Optical Networking, WiMax), in which case 
  the AN will also have to support the corresponding other-technology-specific
  capabilities. Those additional capabilities are outside the scope of the present
  document. </t>
  
  <section anchor="DSLLineID" title="DSL Access Line Identification">
  
    <t>Most ANCP messages involve actions relating to a specific access line. 
    Thus it is necessary to describe how access lines are identified within 
    those messages. This section defines four TLVs for that purpose and 
    provides an informative description of how they are used. </t>
    
    <section anchor="DSLLineIDCtl" title="Control Context (Informative)">
    
      <t>Three types of identification are described in <xref target="TR-101"/>
      and provided for in the TLVs defined in this section:
      <list style="symbols">
        <t>identification of an access line by its logical appearance on the
        user side of the Access Node;</t>
        <t>identification of an access line by its logical appearance on
        the NAS side of the Access Node; and</t>
        <t>identification down to the user or host level as a supplement
        to access line identification in one of the other two forms.</t>
      </list>
      </t>
      
      <t>All of these identifiers originate with the AN control application,
      during the process of DSL topology discovery. The control application
      chooses which identifiers to use and the values to place into them on
      a line-by-line basis, based on AN configuration and deployment 
      considerations.</t>
      
      <t>Aside from its use in ANCP signalling, access line identification
      is also used in DHCP (<xref target="RFC2131"/>, <xref target="RFC3315"/>)
      transactions involving hosts served by DSL. Either the AN or the NAS can
      serve as a DHCP relay node. <xref target="TR-101"/> requires the AN or NAS
      in this role to add access line identification in Option 82 (Information)
      (<xref target="RFC3046"/>, with its IPv6 equivalent in 
      <xref target="RFC4649"/>) to each DHCP request it forwards to the DHCP 
      server. It is desirable for efficiency that the identification used in
      this signalling should be the same as the identification used in ANCP
      messages.</t>
      
      <t>From the point of view of ANCP itself, the identifiers are opaque. 
      From the point of view of the AN control application, the syntax for 
      the user-side access line identifier is the same as specified in Section
      3.9.3 of <xref target="TR-101"/> for DHCP Option 82. The syntax for the
      ASCII form of the NAS-side access line identifier will be similar.</t>
      
      <t>Access line identification by logical appearance on the user side
      of the Access Node will always identify a DSL loop uniquely. 
      Identification by the logical appearance on the NAS side of the 
      Access Node is unique only if there is a one-to-one mapping between
      the appearances on the two sides and no identity-modifying aggregation
      between the AN and the NAS. In other cases, and in particular in the
      case of Ethernet aggregation using the N:1 VLAN model, the user-side
      access line identification is necessary, but the NAS-side identification 
      is potentially useful information allowing the NAS to build up a picture
      of the aggregation network topology.</t>
      
      <t>Additional identification down to the user or host level is intended
      to supplement rather than replace either of the other two forms of
      identification.
      <list style="empty">
        <t>Sections 3.8 and 3.9 of <xref target="TR-101"/> are contradictory on
        this point. It is assumed here that Section 3.9 is meant to be 
        authoritative.</t>
      </list>
      The user-level identification takes the form of an
      administered string which again is opaque at the ANCP level.</t>
      
      <t>The NAS control application will use the identifying information 
      it receives from the AN directly for some purposes. For examples, see
      the introductory part of Section 3.9 of <xref target="TR-101"/>. For
      other purposes, the NAS will build a mapping between the unique access
      line identification provided by the AN, the additional identification
      of the user or host (where provided), and the IP interface on a particular
      host. For access lines with static IP address assignment that mapping could
      be configured instead.</t>
      
    </section><!-- DSLLineIDCtl -->
    
    <section anchor="DSLLineIDTLV" title="TLVs For DSL Access Line Identification">
    
      <t>This section provides a normative specification of the TLVs that
      ANCP provides to carry the types of identification just described.
      The Access-Loop-Circuit-ID TLV identifies an access line by its 
      logical appearance on the user side of the Access Node. Two 
      alternatives, the Access-Aggregation-Circuit-ID-ASCII TLV and 
      the Access-Aggregation-Circuit-ID-Binary TLV, identify an access
      line by its logical appearance on the NAS side of the Access Node.
      It is unlikely that a given AN uses both of these TLVs, either 
      for the same line or for different lines, since they carry 
      equivalent information. Finally, the Access-Loop-Remote-Id TLV contains
      an operator-configured string that uniquely identifies the user on
      the associated access line, as described in Sections 3.9.1 and 3.9.2 of 
      <xref target="TR-101" />.</t>
      
      <t>ANCP agents conforming to this section MUST satisfy the following
      requirements:
      <list style="symbols">
        <t>ANCP agents MUST be able to build and send  
        the Access-Loop-Circuit-ID TLV, the Access-Loop-Remote-Id TLV, 
        and either the Access-Aggregation-Circuit-ID-ASCII TLV or the 
        Access-Aggregation-Circuit-ID-Binary TLV (implementation choice), when
        passed the associated information from the AN control application.</t>
        
        <t>ANCP agents MUST be able to receive all four TLV types, extract the
        relevant information, and pass it to the control application.</t>
        
        <t>If the Access-Loop-Remote-Id TLV is present in a message, it MUST be
        accompanied by an Access-Loop-Circuit-ID TLV and/or an 
        Access-Aggregation-Circuit-ID-xxx TLV with two VLAN identifiers.
        <list style="empty">
          <t>The Access-Loop-Remote-Id TLV is not enough to identify an 
          access line uniquely on its own. As indicated above, an 
          Access-Aggregation-Circuit-ID-xxx TLV with two VLAN identifiers may 
          or may not identify an access line uniquely, but this is up to the 
          control application to decide.</t>
        </list>
        </t>
        
        <t>If the Access-Aggregation-Circuit-ID-xxx TLV is present in a message
        with just one VLAN identifier, it MUST be accompanied by
        an Access-Loop-Circuit-ID TLV.</t>
      </list>
      </t>
  
      <section anchor="ALCItlv" title="Access-Loop-Circuit-ID TLV">
        <t>
        <list style="hanging">
          <t hangText="Type:">0x0001</t>
          <t hangText="Description:">
          a locally administered human-readable string generated by or 
          configured on the Access Node, identifying the corresponding 
          access loop logical port on the user side of the Access Node.</t>
          <t hangText="Length:">up to 63 bytes</t>
          <t hangText="Value:">ASCII string</t>
        </list>
        </t>
      </section><!-- ALCItlv -->

      <section anchor="ALRItlv" title="Access-Loop-Remote-Id TLV">
        <t>
        <list style="hanging">
          <t hangText="Type:">0x0002</t>
          <t hangText="Description:">an operator-configured string that
          uniquely identifies the user on the associated access line, as
          described in Sections 3.9.1 and 3.9.2 of <xref target="TR-101" />. </t> 
          <t hangText="Length:">up to 63 bytes</t> 
          <t hangText="Value:">ASCII string</t>
        </list>
        </t>
      </section><!-- ALRItlv -->

      <section anchor="AACIBtlv" title="Access-Aggregation-Circuit-ID-Binary TLV">
        <t>
        <list style="hanging">
          <t hangText="Type:">0x0006</t> 
          <t hangText="Description:"> This TLV identifies or partially identifies
          a specific access line by means of its logical circuit identifier
          on the NAS side of the Access Node.
          <vspace blankLines="1"/>
        
          For Ethernet access aggregation, where a per-subscriber (stacked)
          VLAN can be applied (1:1 model as defined in <xref target="TR-101" />),
          the TLV contains two value fields. Each field carries a 12-bit VLAN
          identifier (which is part of the VLAN tag defined by IEEE 802.1Q).
          The first field MUST carry the inner VLAN identifier, while the
          second field MUST carry the outer VLAN identifier. 
          <vspace blankLines="1"/>
        
          When the N:1 VLAN model is used, only one VLAN tag is available.
          For the N:1 model, the Access-Aggregation-Circuit-ID-Binary TLV
          contains a single value field, which MUST carry the 12-bit VLAN 
          identifier derived from the single available VLAN tag.
          <vspace blankLines="1"/>
        
          In the case of an ATM aggregation network, where the DSLAM is directly
          connected to the NAS (without an intermediate ATM switch), the VPI 
          and VCI on the DSLAM uplink correspond uniquely to the DSL line on
          the DSLAM. The Access-Aggregation-Circuit-ID-Binary TLV MAY be used
          to carry the VPI and VCI. The first value field of the TLV MUST carry
          the VCI, while the second value field MUST carry the VPI.
          <vspace blankLines="1"/>
        
          Each identifier MUST be placed in the low-order bits of its
          respective 32-bit field, with the higher-order bits set to zero. The 
          ordering of the bits of the identifer MUST be the same as when the
          identifier is transmitted on the wire to identify an Ethernet frame or
          ATM cell.
          <vspace blankLines="1"/>
        
          The Access-Aggregation-Circuit-ID-Binary is illustrated in 
          <xref target="fig_aAggCIdBin"/>.</t>
          <t hangText="Length:">4 or 8 bytes</t> 
          <t hangText="Value:">one or two 32-bit binary fields.</t>
        </list>
        </t>

        <figure anchor="fig_aAggCIdBin" 
             title="The Access-Aggregation-Circuit-ID-Binary TLV">
          <artwork>
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    TLV Type = 0x0006          |        Length = 4 or 8        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  |  Single VLAN Identifier, inner VLAN identifier, or VCI        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  |                Outer VLAN identifier or VPI                   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
          </artwork>
        </figure>

      </section><!-- AACIBtlv -->

      <section anchor="AACIAtlv" title="Access-Aggregation-Circuit-ID-ASCII TLV">
        <t>
        <list style="hanging">
          <t hangText="Type:">0x0003</t>
          <t hangText="Description:">
          This TLV transmits the ASCII equivalent of the
          Access-Aggregation-Circuit-ID-Binary TLV. As mentioned in the
          previous section, the AN control application will use a format
          similar to that specified in Section 3.9.3 of <xref target="TR-101"/>
          for the format of the "circuit-id".
          <vspace blankLines="1"/>

          As an extension to the present document, the Access Node could 
          convey to the NAS the characteristics (e.g., bandwidth) of the 
          uplink on the Access Node. This TLV or the binary equivalent
          defined above then serves the purpose of uniquely identifying
          the uplink whose characteristics are being defined. The present
          document does not specify the TLVs needed to convey the uplink
          characteristics. </t>
          <t hangText="Length:">up to 63 bytes</t>
          <t hangText="Value:">ASCII string</t>
        </list>
        </t>
      </section><!-- AACIAtlv -->

    </section><!-- DSLLineIDTLV -->
  </section><!-- DSLLineID -->
</section><!-- DSLcapab -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<section anchor="topol" title="ANCP Based DSL Topology Discovery">

  <t>Section 3.1 of <xref target="RFC5851"/> describes the requirements 
  for the DSL Topology Discovery capability.</t>

  <section anchor="topolCtl" title="Control Context (Informative)">
  
    <t>The AN control application in the DSLAM requests ANCP to send a
    DSL-specific Port Up message to the NAS under the following circumstances:
    <list style="symbols">
      <t>when a new adjacency with the NAS is established, for each DSL
      loop that is synchronized at that time;</t>
      
      <t>subsequent to that, whenever a DSL loop resynchronizes; and</t>
      
      <t>whenever the AN control application wishes to signal that a
      line attribute has changed.</t>
    </list>
    </t>
    
    <t>The AN control application in the DSLAM requests ANCP to send a 
    DSL-specific Port Down message to the NAS under the following circumstances:       
    <list style="symbols">
      <t>when a new adjacency with the NAS is established, for each DSL
      loop that is provisioned but not synchronized at that time;</t>
      
      <t>whenever a DSL loop that is equipped in an AN but administratively
      disabled is signalled as "IDLE"; and</t>
      
      <t>subsequent to that, whenever a DSL loop loses synchronization.</t>
    </list>
    </t>
    
    <t>The AN control application passes information to identify the DSL
    loop to ANCP to include in the Port Up or Port Down message, along with
    information relating to DSL loop attributes.</t>

    <t>In the case of bonded copper loops to the customer premise (as per
    DSL multi-pair bonding described by [G.988.1] and [G.988.2]), the AN
    control application requests that ANCP send DSL-specific Port Up and 
    Port Down messages for the aggregate "DSL bonded circuit" (represented 
    as a single logical port) as well as the individual DSL loops of which
    it is comprised. The information relating to DSL line attributes that
    is passed by the AN control application is aggregate information.</t>

    <t>ANCP generates the DSL-specific Port Up or Port Down message and
    transfers it to the NAS. ANCP on the NAS side passes an indication
    to the NAS control application that a DSL Port Up or Port Down 
    message has been received along with the information contained in 
    the message.</t>

    <t>The NAS control application updates its view of the DSL loop state, 
    performs any required accounting operations, and uses any included line
    attributes to adjust the operation of its queueing/scheduling mechanisms
    as they apply to data passing to and from that DSL loop.</t>
    
    <t><xref target="fig_discov" /> summarizes the interaction.</t>

    <figure anchor="fig_discov"
        title="ANCP Message Flow For DSL Topology Discovery">
      <artwork>
        
1.   Home            Access                          NAS
    Gateway           Node
                   
          ----------->     -------------------------->
               DSL          Port Up (Event message)
              Signal        (default line parameters)
   
2.   Home            Access                          NAS
    Gateway           Node
                   
          ----------->     -------------------------->
               DSL           Port Up (Event message)
             Resynch        (updated line parameters)
             
3.   Home            Access                          NAS
    Gateway           Node
                   
          ----------->     -------------------------->
          Loss of          Port Down (Event message)
          DSL Signal       (selected line parameters)
    </artwork>
  </figure>
  
  </section>

  <section anchor="topProtReq" title="Protocol Requirements">

    <t>The DSL topology discovery capability is assigned capability
    type 0x0001. No capability data is associated with this capability. </t>

    <section anchor="topANReq" title="Protocol Requirements On the AN Side">
  
      <t>The AN-side ANCP agent MUST be able to create DSL-specific 
      Port Up and Port Down messages according to the format specified in
      <xref target="topolCapMsg"/>.</t>
      
      <t>The AN-side ANCP agent MUST conform to the normative requirements of
      <xref target="DSLLineIDTLV"/>.</t>

      <t>The AN-side ANCP agent MUST follow the AN-side 
      procedures associated with DSL-specific Port Up and Port Down 
      messages as they are specified in <xref target="topolCapProc"/>.</t> 
  
    </section>

    <section anchor="topNASReq" title="Protocol Requirements On the NAS Side">
  
      <t>The NAS-side ANCP agent MUST be able to receive and 
      validate DSL-specific Port Up and Port Down messages according to 
      the format specified in <xref target="topolCapMsg"/>.</t>

      <t>The NAS-side ANCP agent MUST conform to the normative requirements of
      <xref target="DSLLineIDTLV"/>.</t>

      <t>The NAS-side ANCP agent MUST follow the NAS-side 
      procedures associated with DSL-specific Port Up and Port Down
      messages as they are specified in <xref target="topolCapProc"/>.</t>

    </section>

  </section><!-- topProtReq -->

  <section anchor="topolCapMsg" 
      title="ANCP Port UP and Port DOWN Event Message Descriptions">

    <t>The format of the ANCP Port UP and Port DOWN Event messages is shown in 
    <xref target="port_up"/>.</t>

    <figure anchor="port_up" 
       title="Format Of the ANCP Port Up and Port Down Event Messages For DSL Topology Discovery">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TCP/IP Encapsulating Header (Section 3.2)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                ANCP General Message Header                    |     
+                      (Section 3.6.1)                          +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                    Unused (20 bytes)                          ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|x|x|x|x|x|x|x|x| Message Type  |   Tech Type   |  Reserved     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     # of TLVs                 | Extension Block length (bytes)|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               |     
~                 Access line identifying TLV(s)                ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                DSL-Line-Attributes TLV                        |
~        (MANDATORY in Port Up, OPTIONAL in Port Down)          ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
      </artwork>
      <postamble>NOTE: TLVs MAY be in a different order from 
      what is shown in this figure.</postamble>
    </figure>

    <t>See <xref target="ANCPmsgHdr"/> for a description of the ANCP
    general message header. The Message Type field MUST be set to 80 
    for Port Up, 81 for Port Down.  The 12 bit Result Code field MUST be set 
    to 0. The 4 bit Result field MUST be set to 0 (signifying Ignore).
    The 24-bit Transaction Identifier field MUST be set to 0. Other 
    fields in the general header MUST be set as described in 
    <xref target="ancpFormat"/>.</t>

    <t>The five word Unused field is a historical leftover. The handling
    of unused/reserved fields is described in <xref target="resvUnused"/>. </t>

    <t>The remaining message fields belong to the "extension block", and are
    described as follows:
    <list style="hanging">
      <t hangText="Extension Flags:">The flag bits denoted by 'x' are
      currently unspecified and reserved. </t>

      <t hangText="Message Type:">Message Type has the same value as in
      the general header (i.e., 80 or 81).</t>

      <t hangText="Tech Type:">MUST be set to 0x05 (DSL).</t>

      <t hangText="# of TLVs:">the number of TLVs that follow, not counting 
      TLVs encapsulated within other TLVs.</t>

      <t hangText="Extension Block Length:">the total length of the TLVs 
      carried in the extension block in bytes, including any padding within
      individual TLVs.</t>

      <t hangText="TLVs:">one or more TLVs to identify a DSL line and zero
      or more TLVs to define its characteristics.</t>
    </list>
    </t>
    
  </section><!-- topolCapMsg -->

  <section anchor="topolCapProc" title="Procedures">

    <section anchor="topANProc" title="Procedures On the AN Side">
  
      <t>The AN-side ANCP agent creates and transmits a
      DSL-specific Port Up or Port Down message when requested by the AN
      control application and presented with the information needed to
      build a valid message. It is RECOMMENDED that the Access Node use
      a dampening mechanism per DSL loop to control the rate at which state
      changes are communicated to the NAS.</t>

      <t>At the top level, the extension block within a DSL-specific Port 
      Up or Port Down message MUST include TLVs from <xref target="DSLLineIDTLV"/>
      to identify the DSL loop.</t>

      <t>TLVs presenting DSL line attributes (i.e., the TLVs specified
      in <xref target="DSLAttribTLV"/>) MUST be encapsulated within the
      DSL-Line-Attributes TLV. When the DSL-Line-Attributes TLV is present
      in a message, it MUST contain at least one such TLV and will
      generally contain more than one. In the Port Up message, the
      DSL-Line-Attributes TLV MUST be present. In the Port Down message,
      the DSL-Line-Attributes TLV MAY be present.</t>

    </section>

    <section anchor="topNASProc" title="Procedures On the NAS Side">
    
      <t>The NAS-side ANCP agent MUST be prepared to receive 
      Port Up and Port Down messages for a given DSL loop or logical port
      at any time after negotiation of an adjacency has been completed. 
      It is possible for two Port Up messages in succession to be received
      for the same DSL loop without an intervening Port Down message, and 
      vice versa.</t>

      <t>The NAS-side ANCP agent SHOULD validate each message against the
      specifications given in <xref target="topolCapMsg"/> and the TLV 
      specifications given in <xref target="DSLLineIDTLV"/> and 
      <xref target="DSLAttribTLV"/>. If it finds an error it MAY generate a Generic
      Response message containing an appropriate Result Code value. If it does
      so, the message MUST contain copies of all of the identifier TLVs from
      <xref target="DSLLineIDTLV"/> that were present in the Port Up or Port 
      Down message. The message SHOULD also contain a Status-Info TLV which 
      in turn contains other information appropriate to the message header
      Result Code value as described in <xref target="HDRcode"/>.</t>

      <t>If the received message passes validation, the NAS-side 
      ANCP agent extracts the information from the 
      TLVs contained in the message and presents that information along
      with an indication of reported event type to the NAS control 
      application. If validation of individual TLVs fails but the message
      as a whole can be processed, the NAS-side ANCP agent 
      "may" pass the valid message contents to the NAS control application.</t>
    
    </section>

  </section><!-- topolCapProc -->

  <section anchor="DSLAttribTLV" title="TLVs For DSL Line Attributes">

    <t>As specified above, the DSL-Line-Attributes TLV is inserted into
    the Port Up or Port Down message at the top level. The remaining TLVs
    defined below are encapsulated within the DSL-Line-Attributes TLV.</t>

    <section anchor="DLAtlv" title="DSL-Line-Attributes TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0004</t>
        <t hangText="Description:">This TLV encapsulates attribute values
        for a DSL line serving a subscriber.</t>
        <t hangText="Length:">variable (up to 1024 bytes)</t>
        <t hangText="Value:">
        one or more encapsulated TLVs corresponding to DSL line attributes.
        The DSL-Line-Attributes TLV MUST contain at least one TLV when it 
        is present in a Port Up or Port Down message. The actual contents 
        are determined by the AN control application.
        </t>
      </list>
      </t>
    </section><!-- DLAtlv -->

    <section anchor="DTtlv" title="DSL-Type TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0091</t>
        <t hangText="Description:">Indicates the type of transmission 
        system in use.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:"> 32 bit unsigned integer
        <list style="empty">
          <t>ADSL1 = 1</t>
          <t>ADSL2 = 2</t>
          <t>ADSL2+ = 3</t>
          <t>VDSL1 = 4</t>
          <t>VDSL2 = 5</t>
          <t>SDSL = 6</t>
          <t>OTHER = 0</t>
        </list>
        </t>
      </list>
      </t>
    </section><!-- DTtlv -->

    <section anchor="AcNDRUtlv" title="Actual-Net-Data-Rate-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0081</t>
        <t hangText="Description:">Actual
                      upstream net data rate on a DSL line.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- AcNDRUtlv -->

    <section anchor="AcNDRDtlv" title="Actual-Net-Data-Rate-Downstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0082</t>
        <t hangText="Description:">Actual
                      downstream net data rate on a DSL line.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- AcNDRDtlv -->

    <section anchor="MNDRUtlv" title="Minimum-Net-Data-Rate-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0083</t>
        <t hangText="Description:">Minimum upstream net data rate desired by the
        operator.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MNDRUtlv -->

    <section anchor="MNDRDtlv" title="Minimum-Net-Data-Rate-Downstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0084</t>
        <t hangText="Description:">Minimum downstream net data rate desired by the
        operator.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MNDRDtlv -->

    <section anchor="AtNDRUtlv" title="Attainable-Net-Data-Rate-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0085</t>
        <t hangText="Description:">Maximum net upstream rate that can be 
        attained on the DSL line.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- AtNDRUtlv -->

    <section anchor="AtNDRDtlv" title="Attainable-Net-Data-Rate-Downstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0086</t>
        <t hangText="Description:">Maximum net downstream rate that can
        be attained on the DSL line.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- AtNDRDtlv -->

    <section anchor="MxNDRUtlv" title="Maximum-Net-Data-Rate-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0087</t>
        <t hangText="Description:">Maximum net upstream data rate desired by the
        operator.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MxNDRUtlv -->

    <section anchor="MxNDRDtlv" title="Maximum-Net-Data-Rate-Downstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0088</t>
        <t hangText="Description:">Maximum net downstream data rate desired by the
        operator.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MxNDRDtlv -->

    <section anchor="MNLPDRUtlv" 
        title="Minimum-Net-Low-Power-Data-Rate-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0089</t>
        <t hangText="Description:">Minimum net upstream data rate desired by the
        operator in low power state. </t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MNLPDRUtlv -->

    <section anchor="MNLPDRDtlv"
       title="Minimum-Net-Low-Power-Data-Rate-Downstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x008A</t>
        <t hangText="Description:">Minimum net downstream data rate desired by the
        operator in low power state. </t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Rate in Kbits/s as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MNLPDRDtlv -->

    <section anchor="MIDUtlv" title="Maximum-Interleaving-Delay-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x008B</t>
        <t hangText="Description:"> maximum one way interleaving delay.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Time in ms as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MIDUtlv -->

    <section anchor="AIDUtlv" title="Actual-Interleaving-Delay-Upstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x008C</t>
        <t hangText="Description:"> Value corresponding to the interleaver 
        setting.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Time in ms as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- AIDUtlv -->

    <section anchor="MIDDtlv" title="Maximum-Interleaving-Delay-Downstream TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x008D</t>
        <t hangText="Description:"> maximum one way interleaving delay.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Time in ms as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- MIDDtlv -->

    <section anchor="AIDDtlv" title="Actual-Interleaving-Delay-Downstream">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x008E</t>
        <t hangText="Description:"> Value corresponding to the interleaver 
        setting.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:">Time in ms as a 32 bit unsigned integer</t>
      </list>
      </t>
    </section><!-- AIDDtlv -->

    <section anchor="DSLLStlv" title="DSL-Line-State TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x008F</t>
        <t hangText="Description:"> The state of the DSL line.</t>
        <t hangText="Length:">4 bytes</t>
        <t hangText="Value:"> 32 bit unsigned integer
        <list style="empty">
          <t>SHOWTIME = 1</t>
          <t>IDLE = 2</t>
          <t>SILENT = 3</t>
        </list>
        </t>
      </list>
      </t>
    </section><!-- DSLLStlv -->

    <section anchor="ALEtlv" title="Access-Loop-Encapsulation TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0090</t>
        <t hangText="Description:"> The data link protocol and, optionally,
        the encapsulation overhead on the access loop. When this TLV is
        present, at least the data link protocol MUST be indicated. The
        encapsulation overhead MAY be indicated. The Access Node MAY choose
        to not convey the encapsulation on the access loop by specifying
        values of 0 (NA) for the two encapsulation fields.</t>
        <t hangText="Length:">3 bytes</t>
        <t hangText="Value:">The three bytes (most to least significant)
        and valid set of values for each byte are defined as follows: 
        <list style="empty">
          <t>Byte 1: Data Link
          <list style="empty">
            <t>ATM AAL5 = 0</t>
            <t>ETHERNET = 1</t>
          </list>
          </t>
          <t>Byte 2: Encapsulation 1
          <list style="empty">
            <t>NA = 0</t>
            <t>Untagged Ethernet = 1</t>
            <t>Single-tagged Ethernet = 2</t>
            <t>Double-tagged Ethernet = 3</t>
          </list>
          </t>
          <t>Byte 3: Encapsulation 2
          <list style="empty">
            <t>NA = 0</t>
            <t>PPPoA LLC = 1</t>
            <t>PPPoA NULL = 2</t>
            <t>IPoA LLC = 3</t>
            <t>IPoA NuLL = 4</t>
            <t>Ethernet over AAL5 LLC with FCS = 5</t>
            <t>Ethernet over AAL5 LLC without FCS = 6</t>
            <t>Ethernet over AAL5 NULL with FCS = 7</t>
            <t>Ethernet over AAL5 NULL without FCS = 8</t>
          </list>
          </t>
        </list>
        </t>
      </list>
      The Access-Loop-Encapsulation TLV is illustrated in 
      <xref target="fig_ALEncaps"/>.
      </t>

      <figure anchor="fig_ALEncaps" title="The Access-Loop-Encapsulation TLV">
        <artwork>
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    TLV Type = 0x0090          |        Length = 3             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  | Data link     |    Encaps 1   |    Encaps 2   | Padding (=0)  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
        </artwork>
      </figure>
    </section><!-- ALEtlv -->

  </section><!-- DSLAttribTLV -->
</section>  <!-- ANCP based Access Topology Discovery -->

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<section anchor="lineConfig" title="ANCP based DSL Line Configuration ">

  <t>The use case for ANCP-based DSL Line Configuration is described in
  Section 3.2 of <xref target="RFC5851"/>.</t>
  
  <section anchor="line_cfg_msg_flow" title="Control Context (Informative)">

    <t>Triggered by topology information reporting a new DSL line or 
    triggered by a subsequent user session establishment (via PPP or DHCP), 
    RADIUS/AAA sends service parameters to the NAS control application for
    configuration on the access line. The NAS control application passes
    the request on to the NAS-side agent, which sends the information to
    the AN by means of a Port Management (line configuration) message. 
    The AN-side agent passes this information up to the AN control 
    application, which applies it to the line. <xref target="line_init_cfg" />
    summarizes the interaction.</t>

    <figure anchor="line_init_cfg"
        title="Message Flow - ANCP Mapping For Initial Line Configuration">
      <artwork>
  Home            Access               NAS             RADIUS/AAA
 Gateway           Node                             Policy Server
                   
       ----------->     --------------->
           DSL          Port Up message)
          Signal       (line parameters)
          
       -------------------------------->   -------------->
               PPP/DHCP Session            Authentication &amp;
                                           authorization
                                         
                       &lt;----------------
                         Port Management message
                         (line configuration)
      </artwork>
    </figure>

    <t>The NAS could update the line configuration as a result of a subscriber 
    service change (e.g. triggered by the policy server). 
    <xref target="line_upd_cfg" /> summarizes the interaction.</t>

    <figure anchor="line_upd_cfg"
        title="Message flow - ANCP Mapping For Updated Line Configuration">
      <artwork>
User     Home            Access         NAS             
        Gateway           Node                             
 
             -------------------------->
               PPP/DHCP Session
               
   -------------------------------------------------------> Web portal,
               Service on demand                              OSS, etc.
                                                                 |
                                           &lt;--------------  RADIUS/AAA
                                             Change of     Policy Server
                                           authorization
                                           
                             &lt;------------
                              Port Management
                                  message
                              (new profile)
      </artwork>
    </figure>

  </section>  <!-- Message Flow -->

  <section anchor="line_cfg_ProtReq" title="Protocol Requirements">

    <t>The DSL line configuration capability is assigned capability type
    0x0002. No capability data is associated with this capability.</t>

    <section anchor="lcfgNASReq" title="Protocol Requirements On the NAS Side">
  
      <t>The NAS-side ANCP agent MUST be able to create DSL-specific 
      Port Management (line configuration) messages according to the format
      specified in <xref target="line_cfg_CapMsg"/>.</t>

      <t>The NAS-side ANCP agent MUST conform to the normative requirements of
      <xref target="DSLLineIDTLV"/>.</t>

      <t>The NAS-side ANCP agent MUST follow the NAS-side 
      procedures associated with DSL-specific Port Management (line configuration)
      messages as they are specified in <xref target="line_cfg_CapProc"/>.</t> 
  
    </section>

    <section anchor="lcfgANReq" title="Protocol Requirements On the AN Side">

      <t>The AN-side ANCP agent MUST conform to the normative requirements of
      <xref target="DSLLineIDTLV"/>.</t>
  
      <t>The AN-side ANCP agent MUST be able to receive and 
      validate DSL-specific Port Management (line configuration) messages  
      according to the format specified in <xref target="line_cfg_CapMsg"/>.</t>

      <t>The AN-side ANCP agent MUST follow the AN-side 
      procedures associated with DSL-specific Port Management (line configuration)
      messages as specified in <xref target="line_cfg_CapProc"/>.</t>

    </section>
  </section><!-- line_cfg_ProtReq -->

  <section anchor="line_cfg_CapMsg" 
      title="ANCP Port Management (Line Configuration) Message Format">

    <t>The ANCP Port Management message for DSL line configuration has the 
    format shown in <xref target="Fig_line_cfg"/>.</t>

    <figure anchor="Fig_line_cfg" 
         title="Port Management Message For DSL Line Configuration">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TCP/IP Encapsulating Header (Section 3.2)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                ANCP General Message Header                    |     
+                      (Section 3.6.1)                          +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                       Unused (12 bytes)                       ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Unused (2 bytes)       |  Function=8   | X-Function=0  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Unused (4 bytes)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|x|x|x|x|x|x|x|x| Message Type  |            Reserved           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     # of TLVs               | Extension Block length (bytes)  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               |     
~                 Access line identifying TLV(s)                ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                Line configuration TLV(s)                      ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
      </artwork>
      <postamble>NOTE: TLVs MAY be in a different order from 
      what is shown in this figure.</postamble>
    </figure>

    <t>See <xref target="ancpFormat"/> for a description of the ANCP 
    general message header. The Message Type field MUST be set to 32. 
    The 12 bit Result Code field MUST be set to 0x0. The 4 bit Result field MUST
    be set to either 1 (NAck) or 2 (AckAll), as determined by policy on
    the NAS. The 24-bit Transaction Identifier field MUST be set to a
    positive value. Other fields in the general header MUST be set as 
    described in <xref target="ancpFormat"/>.</t>

    <t>The handling of the various unused/reserved fields is described in
    <xref target="resvUnused"/>. </t>

    <t>The remaining message fields are described as follows:
    <list style="hanging">
      <t hangText="Function:">action to be performed. For line
      configuration, Function MUST be set to 8 (Configure Connection
      Service Data). This action type requests the Access Node (i.e.,
      DSLAM) to apply service configuration data contained in the 
      line configuration TLVs to the DSL line designated by the access line
      identifying TLVs.</t>

      <t hangText="X-Function:">qualifies the action set by Function. For
      DSL line configuration, this field MUST be set to 0.</t>

      <t hangText="Extension Flags:">the flag bits denoted by 'x' before the 
      Message Type field are reserved for future use. </t>

      <t hangText="Message Type:">Message Type has the same value as in the 
      general header (i.e., 32).</t>

      <t hangText="Reserved (16 bits):">reserved for future use.</t>

      <t hangText="# of TLVs:">the number of TLVs that follow, not counting
      TLVs encapsulated within other TLVs.</t>

      <t hangText="Extension Block Length:">the total length of the TLVs
      carried in the extension block in bytes, including any padding within
      individual TLVs.</t>

      <t hangText="TLVs:">two or more TLVs to identify a DSL line and 
      configure its service data.</t>
    </list>
    </t>
    
    <t>Other ANCP capabilities, either specific to DSL or technology-independent,
    MAY reuse the Port Management message for service
    configuration. If the settings of the fixed fields are compatible with the
    settings just described, the same Port Management message that is used for
    DSL line configuration MAY be used to carry TLVs relating to the other
    capabilities that apply to the same DSL loop. </t>
    
    <t>Use of the Port Management message for configuration MAY also be 
    generalized to other access technologies, if the respective capabilities
    specify use of access line identifiers appropriate to those technologies
    in place of the identifiers defined in <xref target="DSLLineIDTLV"/>.</t>

  </section><!-- line_cfg_CapMsg -->

  <section anchor="line_cfg_CapProc" title="Procedures">
    
    <t>Service configuration MAY be performed on an access line regardless of
    its current state.</t>

    <section anchor="lcfgNASProc" title="Procedures On the NAS Side">
    
      <t>When requested by the NAS control application and presented with 
      the necessary information to do so, the NAS-side agent MUST create and send
      a Port Management message with the fixed fields set as described in the
      previous section. The message MUST contain one or more TLVs to identify
      an access line according the requirements of <xref target="DSLLineIDTLV"/>.
      The NAS MUST include one or more TLVs to configure line service parameters
      for that line. <xref target="line_cfg_TLVs"/> currently identifies 
      only one such TLV, Service-Profile-Name, but other TLVs MAY be added 
      by extensions to ANCP. </t>

    </section>

    <section anchor="lcfgANProc" title="Procedures On the AN Side">
      
      <t>The AN-side ANCP agent MUST be prepared to receive Port Management
      (line configuration) messages for a given DSL loop or logical port at 
      any time after negotiation of an adjacency has been completed.</t>

      <t>The AN-side ANCP agent SHOULD validate each message against the
      specifications given in <xref target="line_cfg_CapMsg"/> and the TLV
      specifications given in <xref target="DSLLineIDTLV"/> and 
      <xref target="line_cfg_TLVs"/>.  If it finds an error it MUST return
      a Port Management response message which copies the Port Management
      request as it was received, but has the Result header field set to
      0x04 (Failure) and the Result Code field set to the appropriate value. The 
      AN-side agent MAY add a Status-Info TLV (<xref target="error"/>) to 
      provide further information on the error, particularly if this is 
      recommended in <xref target="HDRcode"/> for the given Result Code value. If
      it does so, the various length fields and the # of TLVs field within
      the message MUST be adjusted accordingly.</t>

      <t>If the received message passes validation, the AN-side ANCP agent
      "must" extract the information from the TLVs contained in the message 
      and present that information to the AN control application. In addition,
      if the Result header field was set to 0x2 (AckAll) in the original
      request, the AN-side agent "must" indicate to the AN control application
      that a response is required. When the AN control application indicates
      that it has processed the request successfully, the AN-side agent MUST 
      return a Port Management response message which duplicates the request 
      except that the Result header field is set to 0x3 (Success). (The Result Code
      field, as in the original request, has value 0.) </t>

    </section>
    
  </section><!-- line_cfg_CapProc -->

  <section anchor="line_cfg_TLVs" title="TLVs For DSL Line Configuration">

    <t>Currently only the following TLV is specified for DSL line configuration.
    More TLVs may be defined in a future version of this specification or in
    ANCP extensions for individual service attributes of a DSL line (e.g. 
    rates, interleaving delay, multicast channel entitlement access-list).</t>

    <section anchor="SProfName" title="Service-Profile-Name TLV">
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0005</t>
        <t hangText="Description:"> Reference to a pre-configured profile on
        the DSLAM that contains service specific data for the subscriber.</t>
        <t hangText="Length:">up to 64 bytes</t>
        <t hangText="Value:">ASCII string containing the profile name (which the
        NAS learns from a policy server after a subscriber is authorized).</t>
      </list>
      </t>

    </section>

  </section><!-- line_cfg_TLVs -->
</section>  <!-- ANCP based Line Configuration -->

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<section anchor="oamCAP" 
        title="ANCP-Based DSL Remote Line Connectivity Testing">

  <t>The use case and requirements for ANCP-Based DSL remote line connectivity
  testing are specified in Section 3.3 of <xref target="RFC5851"/></t>
  
  <section title="Control Context (Informative)">

    <t>The NAS control application initiates a request for
    remote connectivity testing for a given access loop. The NAS control
    application can provide loop count and timeout test parameters and
    opaque data for its own use with the request. The loop count parameter 
    indicates the number of test messages or cells to be used. The timeout
    parameter indicates the longest that the NAS control application will 
    wait for a result.</t>
    
    <t>The request is passed in a Port Management (OAM) message. If the NAS
    control application has supplied test parameters, they are used, otherwise
    the AN control application uses default test parameters. If a loop count
    parameter provided by the NAS is outside the valid range, the AN does not
    execute the test, but returns a result indicating that the test has failed
    due to an invalid parameter. If the test takes longer than the timeout 
    value (default or provided by the NAS) the AN control application can 
    return a failure result indicating timeout or else can send no response.
    The AN control application can provide a human-readable string describing
    the test results, for both failures and successes. If provided, this 
    string is included in the response. Responses always include the opaque
    data, if any, provided by the NAS control application.</t>
    
    <t><xref target="fig_oam"></xref> summarizes the interaction.</t>

    <figure anchor="fig_oam" title="Message Flow For ANCP based OAM">
      <artwork>
+-------------+    +-----+       +-------+           +----------------+       
|Radius/AAA   |----|NAS  |-------| DSLAM |-----------|    CPE         |     
|Policy Server|    +-----+       +-------+           | (DSL Modem +   |     
+-------------+                                      |Routing Gateway)|       
                                                     +----------------+
                 Port Management Message 
                 (Remote Loopback          ATM loopback 
                  Trigger Request)         OR EFM Loopback
               1.  ---------------->     2. --------->
                                            &lt;--------+
                    3. &lt;---------------                        
                    Port Management Message
               (Remote Loopback Test Response)
      </artwork>
    </figure>

  </section>

<section anchor="oam_ProtReq" title="Protocol Requirements">

    <t>The DSL remote line connectivity testing capability is assigned 
    capability type 0x0004. No capability data is associated with this 
    capability.</t>

    <section anchor="oam_NASReq" title="Protocol Requirements On the NAS Side">
  
      <t>The NAS-side ANCP agent MUST be able to create DSL-specific 
      Port Management (OAM) messages according to the format specified in
      <xref target="oam_CapMsg"/>.</t>

      <t>The NAS-side ANCP agent MUST conform to the normative requirements of
      <xref target="DSLLineIDTLV"/>.</t>

      <t>The NAS-side ANCP agent MUST follow the NAS-side 
      procedures associated with DSL-specific Port Management (OAM)
      messages as they are specified in <xref target="oam_CapProc"/>.</t> 
  
    </section>

    <section anchor="oam-ANReq" title="Protocol Requirements On the AN Side">

      <t>The AN-side ANCP agent MUST conform to the normative requirements of
      <xref target="DSLLineIDTLV"/>.</t>
  
      <t>The AN-side ANCP agent MUST be able to receive and 
      validate DSL-specific Port Management (OAM) messages according to 
      the format specified in <xref target="oam_CapMsg"/>.</t>

      <t>The AN-side ANCP agent MUST follow the AN-side 
      procedures associated with DSL-specific Port Management (OAM)
      messages as specified in <xref target="oam_CapProc"/>.</t>

    </section>
  </section><!-- oam_ProtReq -->

  <section anchor="oam_CapMsg" title="Port Management (OAM) Message Format">

    <t>The Port Management message for DSL line testing has the same format
    as for DSL line configuration (see <xref target="line_cfg_CapMsg"/>),
    with the following differences:
    <list style="symbols">
      <t>The Result field in the request SHOULD be set to AckAll (0x1), to allow the
      NAS to receive the information contained in a successful test response.</t>

      <t>The Function field MUST be set to 9 (Remote Loopback). (The X-Function
      field continues to be 0.)</t>

      <t>The appended TLVs in the extension value field include
      testing-related TLVs rather than subcriber service information.</t>
    </list>
    The Port Management (OAM) message is illustrated in <xref target="fig_PM_OAM"/>.
    </t>
 
    <figure anchor="fig_PM_OAM" 
         title="Port Management Message For DSL Line Remote Connectivity Testing">
      <artwork>
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TCP/IP Encapsulating Header (Section 3.2)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                ANCP General Message Header                    |     
+                      (Section 3.6.1)                          +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Port (unused)                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Port Session Number (unused)                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Event Sequence Number  (unused)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R|x|x|x|x|x|x|x| Dur. (unused) |  Function=9   | X-Function=0  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Event Flags  (unused)       | Flow Control Flags  (unused)  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|x|x|x|x|x|x|x|x| Message Type  |            Reserved           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     # of TLVs               | Extension Block length (bytes)  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
|                                                               |     
~                 Access line identifying TLV(s)                ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                   Testing-related TLVs                        ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
      </artwork>
      <postamble>NOTE: TLVs MAY be in a different order from 
      what is shown in this figure.</postamble>
    </figure>
    
  </section><!-- oam_CapMsg -->

  <section anchor="oam_CapProc" title="Procedures">
  
    <t>From the point of view of ANCP, it is permissible to attempt line
    connectivity testing regardless of the state of the line. However, testing
    could fail in some states due to technology limitations.</t>
  
    <section anchor="oam-NASproc" title="NAS-Side Procedures">
    
      <t>When requested by the NAS control application and presented with 
      the necessary information to do so, the NAS-side agent creates and sends
      a Port Management (OAM) request with the fixed fields set as described in the
      previous section. The message MUST contain one or more TLVs to identify
      an access line according the requirements of <xref target="DSLLineIDTLV"/>.
      The NAS MAY include the Opaque-Data TLV and/or the OAM-Loopback-Test-Parameters
      TLV (defined in <xref target="oam_TLVs"/>) to configure the loopback
      test for that line. </t>
    
    </section>
  
    <section anchor="oam-ANProc" title="AN-Side Procedures">
    
      <t>The AN-side ANCP agent SHOULD validate each message against the
      specifications given in <xref target="oam_CapMsg"/> and the TLV 
      specifications given in <xref target="DSLLineIDTLV"/> and 
      <xref target="oam_TLVs"/>.  If it finds an error it MUST return a 
      Port Management response message which copies the Port Management 
      request as it was received, but has the Result header field set to
      0x04 (Failure) and the Result Code field set to the appropriate value.
      Result Code value 0x509 as described below MAY apply, as well as the 
      other Result Code values documented in <xref target="HDRcode"/>. Result
      Code value 0x509 SHOULD be used if the OAM-Loopback-Test-Parameters TLV
      is present with an invalid value of the Count field. The AN-side agent 
      MAY add a Status-Info TLV (<xref target="error"/>) to provide further
      information on the error, particularly if this is recommended in 
      <xref target="HDRcode"/> for the given Result Code value. If it does so,
      the various length fields and the # of TLVs field within the message
      MUST be adjusted accordingly.</t>

      <t>If the received message passes validation, the AN-side ANCP agent
      extracts the information from the TLVs contained in the message 
      and presents that information to the AN control application. It MUST NOT
      generate an immediate response to the request, but MUST instead wait
      for the AN control application to indicate that the response should be
      sent.</t>
      
      <t>When requested by the AN control application and presented with the
      necessary information to do so, the AN-side agent creates and 
      sends a Port Management (OAM) response to the original request. The
      Result field MUST be set to Success (0x3) or Failure (0x4), and the
      Result Code field SHOULD be set to one of the following values, as indicated
      by the AN control application.
      <list style="hanging">
        <t hangText="0x500:"> Specified access line does not exist.
        See the documentation of Result Code 0x500 in <xref target="HDRcode"/>
        for more information. The Result header field MUST be set to
        Failure (0x4).</t>

        <t hangText="0x501:"> Loopback test timed out. The Result 
        header field MUST be set to Failure (0x4).</t>

        <t hangText="0x503:"> DSL line status showtime</t>

        <t hangText="0x504:"> DSL line status idle</t>

        <t hangText="0x505:"> DSL line status silent</t>

        <t hangText="0x506:"> DSL line status training</t>

        <t hangText="0x507:"> DSL line integrity error</t>

        <t hangText="0x508:"> DSLAM resource not available.
        The Result header field MUST be set to Failure (0x04).</t>

        <t hangText="0x509:"> Invalid test parameter. The Result
        header field MUST be set to Failure (0x4). </t>
      </list>
      All other fields of the request including the TLVs MUST be copied
      into the response unchanged, except that in a successful response 
      the OAM-Loopback-Test-Parameters TLV MUST NOT appear. If the AN
      control application has provided the necessary information, the AN-side
      agent MUST also include an instance of the OAM-Loopback-Test-Response-String
      TLV in the response. </t>

    </section>
  </section><!-- oam_CapProc -->

  <section anchor="oam_TLVs" 
      title="TLVs For the DSL Line Remote Connectivity Testing Capability">

    <t>The following TLVs have been defined for use with the DSL line testing
    capability.</t>

    <section anchor="OAMLTPtlv" title="OAM-Loopback-Test-Parameters TLV">
    
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0007</t>
        <t hangText="Description:"> Parameters intended to override the default
        values for this loopback test.</t>
        <t hangText="Length:">2 bytes</t>
        <t hangText="Value:">two unsigned 1 byte fields described below (listed in
        order of most to least significant).
        <list style="empty">
          <t>Byte 1: Count. Number of loopback cells/messages that should 
          be generated on the local loop as part of the loopback test. The
          Count value SHOULD be greater than 0 and less than or equal to 32. </t> 

          <t>Byte 2: Timeout. Upper bound on the time in seconds that the 
          NAS will wait for a response from the DSLAM. The value 0 MAY
          be used to indicate that the DSLAM MUST use a locally determined value
          for the timeout.  </t>
        </list>
        </t>
      </list>
      The OAM-Loopback-Test-Parameters TLV is illustrated in 
      <xref target="fig_LTParams"/> 
      </t>

      <figure anchor="fig_LTParams" title="The OAM-Loopback-Test-Parameters TLV">
        <artwork>
   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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |    TLV Type = 0x0007          |        Length = 2             |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  |   Count       |  Timeout      |         Padding (=0)          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
        </artwork>
      </figure>

    </section><!-- OAMLTPtlv -->

    <section anchor="ODtlv" title="Opaque-Data TLV">
    
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0008</t>
        <t hangText="Description:"> An 8 byte opaque field used by
        the NAS control application for its own purposes (e.g., response
        correlation.) The procedures in <xref target="oam-ANProc"/> ensure
        that if it is present in the request it is copied unchanged to
        the response.</t>
        <t hangText="Length:">8 bytes</t>
        <t hangText="Value:">Two 32 bit unsigned integers.</t>
      </list>
      </t>
    </section><!-- ODtlv -->


    <section anchor="OAMLTRStlv" title="OAM-Loopback-Test-Response-String TLV">
    
      <t>
      <list style="hanging">
        <t hangText="Type:">0x0009</t>
        <t hangText="Description:"> Suitably formatted string containing 
        useful details about the test that the NAS will display for the 
        operator, exactly as received from the DSLAM (no manipulation or
        interpretation by the NAS).</t>
        <t hangText="Length:">up to 128 bytes</t>
        <t hangText="Value:">UTF-8 encoded string of text.</t>
      </list>
      </t>

    </section><!-- OAMLTRStlv -->

  </section><!-- oam_TLVs -->
</section>  <!-- ANCP based OAM -->


<!-- ================================================================= -->

<section anchor="IANA" title="IANA Considerations">

  <t>IANA NOTE: please replace "RFCXXXX" with the number of this
  specification.</t> 

  <section anchor="IANAsummary" title="Summary">

    <t>This section requests the following IANA actions:
    <list style="symbols">
      <t>establishment of the following new ANCP registries:
      <list style="empty">
        <t>ANCP Message Types;</t>
        <t>ANCP Result Codes;</t>
        <t>ANCP Port Management Functions; </t>
        <t>ANCP Technology Types;</t>
        <t>ANCP Command Codes;</t>
        <t>ANCP TLV Types;</t>
        <t>ANCP Capabilities.</t>
      </list>
      </t>
      
      <t>establishment of a new joint GSMP/ANCP version registry;</t>
      
      <t>addition of ANCP as another user of TCP port 6068 in the port number 
      registry at http://www.iana.org/assignments/port-numbers. The current user is
      GSMP.</t>
    </list>
    All of these actions are described in detail below except for the port
    registration, for which the final point above should provide sufficient
    information.
    </t>

  </section><!-- IANAsummary -->


  <section anchor="IANAact" title="IANA Actions">
  
    <section anchor="msgIANA" title="ANCP Message Type Registry">
    
      <t>IANA is requested to create a new registry, Access Network Control Protocol
      (ANCP) Message Types. Additions to that registry are permitted by Standards 
      Action, as defined by <xref target="RFC5226"/>. The values for Message 
      Type MAY range from 0 to 255, but new Message Types SHOULD be assigned values
      sequentially from 90 onwards (noting that 91 and 93 are already assigned).  
      The initial contents of the ANCP Message Types registry are as follows:</t>

      <texttable>
        <ttcol>Message Type</ttcol>
        <ttcol>Message Name</ttcol>
        <ttcol>Reference</ttcol>
      
        <c>10</c>
        <c>Adjacency Protocol</c>
        <c>RFCXXXX</c>
      
        <c>32</c>
        <c>Port Management</c>
        <c>RFCXXXX</c>
      
        <c>80</c>
        <c>Port Up</c>
        <c>RFCXXXX</c>
      
        <c>81</c>
        <c>Port Down</c>
        <c>RFCXXXX</c>
      
        <c>85</c>
        <c>Adjacency Update</c>
        <c>RFCXXXX</c>

        <c>91</c>
        <c>Generic Response</c>
        <c>RFCXXXX</c>

        <c>93</c>
        <c>Provisioning</c>
        <c>RFCXXXX</c>
      </texttable>
  
    </section>
  
    <section anchor="resIANA" title="ANCP Result Code Registry">

      <t>IANA is requested to create a new registry, Access Network Control Protocol
      (ANCP) Result Codes. The documentation of new
      Result Codes MUST include the following information:
      <list style="symbols">
        <t>Result Code value TBD (as assigned by IANA);</t> 
        <t>One-line description;</t>
        <t>Where condition detected: (control application or ANCP agent);</t>
        <t>Further description (if any);</t>
        <t>Required additional information in the response message;</t>
        <t>Target (control application or ANCP agent at the peer that
        sent the original request);</t>
        <t>Action RECOMMENDED for the receiving ANCP agent</t>
      </list>
      </t> 

      <t>The values for Result Code are expressed in hexadecimal, and MAY range 
      from 0x0 to 0xFFFFFF. The range 0x0 to 0xFFF is reserved for allocation by 
      the criterion of IETF Review, as defined by <xref target="RFC5226"/>. IANA
      SHOULD allocate new Result Code values from this range sequentially beginning
      at 0x100. The range 0x1000 onwards is allocated by the criterion of
      Specification Required, as defined by <xref target="RFC5226"/>. IANA SHOULD
      allocate new Result Code values from this range sequentially beginning at
      0x1000. The initial contents of the ANCP Message Types registry are as 
      follows:</t>

      <texttable>
        <ttcol>Result Code</ttcol>
        <ttcol>One-line description</ttcol>
        <ttcol>Reference</ttcol>

        <c>0x0</c>
        <c>No result</c>
        <c>RFCXXXX</c>
      
        <c>0x2</c>
        <c>Invalid request message</c>
        <c>RFCXXXX</c>
      
        <c>0x6</c>
        <c>One or more of the specified ports are down</c>
        <c>RFCXXXX</c>
      
        <c>0x13</c>
        <c>Out of resources</c>
        <c>RFCXXXX</c>
      
        <c>0x51</c>
        <c>Request message type not implemented</c>
        <c>RFCXXXX</c>
      
        <c>0x53</c>
        <c>Malformed message</c>
        <c>RFCXXXX</c>
      
        <c>0x54</c>
        <c>Mandatory TLV missing</c>
        <c>RFCXXXX</c>
      
        <c>0x55</c>
        <c>Invalid TLV contents</c>
        <c>RFCXXXX</c>
      
        <c>0x500</c>
        <c>One or more of the specified ports do not exist</c>
        <c>RFCXXXX</c>

        <c>0x501</c>
        <c>Loopback test timed out (0x501)</c>
        <c>RFCXXXX</c>

        <c>0x502</c>
        <c>Reserved (0x502)</c>
        <c>RFCXXXX</c>

        <c>0x503</c>
        <c>DSL line status showtime (0x503)</c>
        <c>RFCXXXX</c>

        <c>0x504</c>
        <c>DSL line status idle (0x504)</c>
        <c>RFCXXXX</c>

        <c>0x505</c>
        <c>DSL line status silent (0x505)</c>
        <c>RFCXXXX</c>

        <c>0x506</c>
        <c>DSL line status training (0x506)</c>
        <c>RFCXXXX</c>

        <c>0x507</c>
        <c>DSL line integrity error (0x507)</c>
        <c>RFCXXXX</c>

        <c>0x508</c>
        <c>DSLAM resource not available (0x508)</c>
        <c>RFCXXXX</c>

        <c>0x509</c>
        <c>Invalid test parameter (0x509)</c>
        <c>RFCXXXX</c>
      </texttable>

    </section>

    
    <section anchor="funcIANA" title="ANCP Port Management Function Registry">

      <t>IANA is requested to create a new Access Network Control Protocol (ANCP)
      Port Management Function registry, with the following initial entries. 
      Additions to this registry will be by Standards Action, as defined by 
      <xref target="RFC5226"/>. Values may range from 0 to 255. IANA SHOULD 
      assign values sequentially beginning with 1, taking account of the values
      already assigned below.
      <list style="empty">
        <t>NOTE: future extensions of ANCP may need to establish sub-registries
        of permitted X-Function values for specific values of Function.</t>
      </list>
      </t>
  
      <texttable>
        <ttcol>Function Value</ttcol>
        <ttcol>Function Name</ttcol>
        <ttcol>Reference</ttcol>
   
        <c>0</c>
        <c>Reserved</c>
        <c>RFCXXXX</c>
   
        <c>8</c>
        <c>Configure Connection Service Data</c>
        <c>RFCXXXX</c>
  
        <c>9</c>
        <c>Remote Loopback</c>
        <c>RFCXXXX</c>
   
      </texttable>
   
    </section>
    
   
    <section anchor="techIANA" title="ANCP Technology Type Registry">
  
      <t>IANA is requested to create a new Access Network Control Protocol 
      (ANCP) Technology Type registry, with additions by Expert Review, as 
      defined by <xref target="RFC5226"/>. The Technology Type MUST designate
      a distinct access transport technology. Values may range from 0 to 255.
      IANA SHOULD assign new values sequentially beginning at 2, taking into 
      account of the values already assigned below. The initial entries are as
      follows:</t>
       
      <texttable>
        <ttcol>Tech Type Value</ttcol>
        <ttcol>Tech Type Name</ttcol>
        <ttcol>Reference</ttcol>
 
        <c>0</c>
        <c>Not technology dependent</c>
        <c>RFCXXXX</c>
 
        <c>1</c>
        <c>PON</c>
        <c>RFCXXXX</c>
  
        <c>5</c>
        <c>DSL</c>
        <c>RFCXXXX</c>
 
        <c>255</c>
        <c>Reserved</c>
        <c>RFCXXXX</c>
      </texttable>
  
    </section>

      
    <section anchor="cmdIANA" title="ANCP Command Code Registry">
     
       <t>IANA is requested to create a new Access Network Control Protocol
       (ANCP) Command Code registry, with additions by  Standards Action, as
       defined by <xref target="RFC5226"/>. Values may range from 0 to 255. 
       IANA SHOULD assign new values sequentially beginning with 1. The initial
       entry is as follows:</t>
    
      <texttable>
        <ttcol>Command Code Value</ttcol>
        <ttcol>Command Code Directive Name</ttcol>
        <ttcol>Reference</ttcol>
    
        <c>0</c>
        <c>Reserved</c>
        <c>RFCXXXX</c>
      </texttable>
     
    </section>
     

    <section anchor="TLV_IANA" title="ANCP TLV Type Registry">
     
       <t>IANA is requested to create a new Access Network Control Protocol (ANCP)
       TLV Type registry. Values are expressed in hexadecimal and may range from
       0x0000 to 0xFFFF. Additions in the range 0x0000 to 0x1FFF are by IETF 
       Review, as defined by <xref target="RFC5226"/>. IANA SHOULD assign new 
       values in this range sequentially beginning at 0x100 and taking account
       of the assignments already made below. Additions in the range 0x2000 to
       0xFFFF are by Specification Required, again as defined by 
       <xref target="RFC5226"/>. IANA SHOULD assign new values in this range
       sequentially beginning at 0x2000. In both cases, the documentation of
       the TLV MUST provide:
      <list style="symbols">
        <t>a TLV name following the convention used for the initial entries
        (capitalized words separated by hyphens);</t>
        <t>a brief description of the intended use;</t>
        <t>a precise description of the contents of each fixed field, including
        its length, type, and units (if applicable);</t>
        <t>identification of any mandatory encapsulated TLVs;</t>
        <t>an indication of whether optional TLVs may be encapsulated, with
        whatever information is available on their identity (could range from 
        a general class of information to specific TLV names, depending on the
        nature of the TLV being defined.</t>
      </list>
      The initial entries are as follows:</t>
    
      <texttable>
        <ttcol>Type Code</ttcol>
        <ttcol>TLV Name</ttcol>
        <ttcol>Reference</ttcol>
    
        <c>0x0000</c>
        <c>Reserved</c>
        <c>RFCXXXX</c>
    
        <c>0x0001</c>
        <c>Access-Loop-Circuit-ID</c>
        <c>RFCXXXX</c>
    
        <c>0x0002</c>
        <c>Access-Loop-Remote-Id</c>
        <c>RFCXXXX</c>
    
        <c>0x0003</c>
        <c>Access-Aggregation-Circuit-ID-ASCII</c>
        <c>RFCXXXX</c>
    
        <c>0x0004</c>
        <c>DSL-Line-Attributes</c>
        <c>RFCXXXX</c>
    
        <c>0x0005</c> 
        <c>Service-Profile-Name</c>
        <c>RFCXXXX</c>
    
        <c>0x0006</c>
        <c>Access-Aggregation-Circuit-ID-Binary</c>
        <c>RFCXXXX</c>
    
        <c>0x0007</c>
        <c>OAM-Loopback-Test-Parameters</c>
        <c>RFCXXXX</c>
    
        <c>0x0008</c>
        <c>Opaque-Data</c>
        <c>RFCXXXX</c>
    
        <c>0x0009</c>
        <c>OAM-Loopback-Test-Response-String</c>
        <c>RFCXXXX</c>
    
        <c>0x0011</c>
        <c>Command</c>
        <c>RFCXXXX</c>
    
        <c>0x0081</c>
        <c>Actual-Net-Data-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0082</c>
        <c>Actual-Net-Data-Rate-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0083</c>
        <c>Minimum-Net-Data-Rate-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0084</c>
        <c>Minimum-Net-Data-Rate-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0085</c>
        <c>Attainable-Net-Data-Rate-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0086</c>
        <c>Attainable-Net-Data-Rate-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0087</c>
        <c>Maximum-Net-Data-Rate-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0088</c>
        <c>Maximum-Net-Data-Rate-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x0089</c>
        <c>Minimum-Net-Low-Power-Data-Rate-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x008A</c>
        <c>Minimum-Net-Low-Power-Data-Rate-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x008B</c>
        <c>Maximum-Interleaving-Delay-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x008C</c>
        <c>Actual-Interleaving-Delay-Upstream</c>
        <c>RFCXXXX</c>
    
        <c>0x008D</c>
        <c>Maximum-Interleaving-Delay-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x008E</c>
        <c>Actual-Interleaving-Delay-Downstream</c>
        <c>RFCXXXX</c>
    
        <c>0x008F</c>
        <c>DSL-Line-State</c>
        <c>RFCXXXX</c>
    
        <c>0x0090</c>
        <c>Access-Loop-Encapsulation</c>
        <c>RFCXXXX</c>
    
        <c>0x0091</c>
        <c>DSL-Type</c>
        <c>RFCXXXX</c>
    
        <c>0x0106</c>
        <c>Status-Info</c>
        <c>RFCXXXX</c>
    
        <c>0x1000</c>
        <c>Target (single access line variant)</c>
        <c>RFCXXXX</c>
    
        <c>0x1001 - 0x1020</c>
        <c>Reserved for Target variants</c>
        <c>RFCXXXX</c>
    
      </texttable>
     
    </section>
     

    <section anchor="capIANA" title="ANCP Capability Type Registry">
     
       <t>IANA is requested to create a new Access Network Control Protocol 
       (ANCP) Capability Type registry, with additions by Standards Action as
       defined by <xref target="RFC5226"/>. Values may range from 0 to 255. 
       IANA SHOULD assign values sequentially beginning at 5. The specification
       for a given capability MUST indicate the Technology Type value with which
       it is associated. The specification MUST further indicate whether the
       capability is associated with any capability data. Normally a capability
       is expected to be defined in the same document that specifies the 
       implementation of that capability in protocol terms. The initial entries
       in the ANCP capability registry are as follows:</t>
    
      <texttable>
        <ttcol>Value</ttcol>
        <ttcol>Capability Type Name</ttcol>
        <ttcol width="10%">Tech Type</ttcol>
        <ttcol width="15%">Capability Data?</ttcol>
        <ttcol>Reference</ttcol>
    
        <c>0</c>
        <c>Reserved</c>
        <c></c>
        <c></c>
        <c>RFCXXXX</c>
    
        <c>1</c>
        <c>DSL Topology Discovery</c>
        <c>5</c>
        <c>No</c>
        <c>RFCXXXX</c>
    
        <c>2</c>
        <c>DSL Line Configuration</c>
        <c>5</c>
        <c>No</c>
        <c>RFCXXXX</c>
    
        <c>3</c>
        <c>Reserved</c>
        <c></c>
        <c></c>
        <c>RFCXXXX</c>
    
        <c>4</c>
        <c>DSL Line Testing</c>
        <c>5</c>
        <c>No</c>
        <c>RFCXXXX</c>
    
      </texttable>
     
    </section>
    
    
    
    <section anchor="versIANA" title="Joint GSMP / ANCP Version Registry">
  
      <t>IANA is requested to create a new joint GSMP / ANCP Version registry. 
      Additions to this registry are by Standards Action as defined by 
      <xref target="RFC5226"/>. Values may range from 0 to 255. Values for the 
      General Switch Management Protocol (GSMP) MUST be assigned sequentially
      beginning with 4 for the next version. Values for the Access Network Control
      Protocol (ANCP) MUST be assigned sequentially beginning with 50 for the
      present version. The initial entries are as follows:</t>
    
      <texttable>
        <ttcol align="left">Version</ttcol>
        <ttcol align="left">Description</ttcol>
        <ttcol align="left">Reference</ttcol>
      
        <c>1</c>
        <c>GSMP Version 1</c>
        <c>RFC1987</c>
      
        <c>2</c>
        <c>GSMP Version 2</c>
        <c>RFC2297</c>
      
        <c>3</c>
        <c>GSMP Version 3</c>
        <c>RFC3292</c>
      
        <c>50</c>
        <c>ANCP Version 1</c>
        <c>RFCXXXX</c>
    
      </texttable>
  
    </section>

  </section>  <!-- IANAact -->

</section>  <!-- IANA -->

<!-- ============================================ -->

<section anchor="secur" title="Security Considerations">

  <t>Security of the ANCP protocol is discussed in 
  <xref target="RFC5713"></xref>. A number of security requirements on ANCP 
  are stated in Section 8 of that document. Those applicable to ANCP itself 
  are copied to the present document:
  <list style="symbols">
    <t>The protocol solution MUST offer authentication of the AN to the NAS.</t>

    <t>The protocol solution MUST offer authentication of the NAS to the AN.</t>

    <t>The protocol solution MUST allow authorization to take place at the
    NAS and the AN.</t>

    <t>The protocol solution MUST offer replay protection.</t>

    <t>The protocol solution MUST provide data-origin authentication.</t>

    <t>The protocol solution MUST be robust against denial-of-service (DoS) 
    attacks.  In this context, the protocol solution MUST consider a specific
    mechanism for the DoS that the user might create by sending many IGMP
    messages.</t>

    <t>The protocol solution SHOULD offer confidentiality protection.</t>

    <t>The protocol solution SHOULD ensure that operations in default
    configuration guarantees a low number of AN/NAS protocol interactions.</t>
  </list>
  </t>
  
  <t>Most of these requirements relate to secure transport of ANCP. Robustness
  against denial-of-service attacks partly depends on transport and partly
  on protocol design. Ensuring a low number of AN/NAS protocol interactions
  in default mode is purely a matter of protocol design.</t>
  
  <t>For secure transport, either the combination of IPsec with IKEv2 
  (references below) or the use of TLS <xref target="RFC5246"/> will meet 
  the requirements listed above. However, the use of TLS has been rejected.
  The deciding point is a detail of protocol 
  design that was unavailable when <xref target="RFC5713"/> was written.
  The ANCP adjacency is a major point of vulnerability for denial-of-service
  attacks. If the adjacency can be shut down, either the AN clears its state
  pending reestablishment of the adjacency, or the possibility of mismatches
  between the AN's and NAS's view of state on the AN is opened up. Two ways 
  to cause an adjacency to be taken down are to modify messages so that the 
  ANCP agents conclude that they are no longer synchronized, or to attack 
  the underlying TCP session. TLS will protect message contents, but not the
  TCP connection. One has to use either IPsec or the TCP authentication 
  option <xref target="RFC5925"/> for that. Hence the conclusion that ANCP
  MUST run over IPsec with IKEv2 for authentication and key management.</t>

  <t>In greater detail: the ANCP stack MUST include IPsec <xref target="RFC4301"/>
  running in transport mode, since the AN and NAS are the endpoints of the 
  path. The Encapsulating Security Payload (ESP) <xref target="RFC4303"/>
  MUST be used, in order to satisfy the requirement for data confidentiality.
  ESP MUST be configured for the combination of confidentiality, integrity,
  anti-replay capability. The traffic flow confidentiality service of ESP
  is unnecessary and, in fact, unworkable in the case of ANCP.</t>
  
  <t>IKEv2 <xref target="RFC5996"/> is also REQUIRED, to meet the requirements
  for mutual authentication and authorization. Since the NAS and AN MAY be in
  different trust domains, the use of certificates for mutual authentication
  could be the most practical approach. However, this is up to the operator(s)
  concerned. </t>
  
  <t>The AN MUST play the role of initiator of the IKEv2 conversation.</t>

</section><!-- secur -->

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank everyone who provided comments or
inputs to this document. Swami Subramanian was an early member of the authors'
team. The ANCP Working Group is grateful to Roberta Maglione, who served as
design team member and primary editor of this document for two years before
stepping down. The authors acknowledge the inputs provided by Wojciech Dec,
Peter Arberg, Josef Froehler, Derek Harkness, Kim Hyldgaard, Sandy Ng, Robert
Peschi, and Michel Platnic, and the further comments provided by Mykyta Yevstifeyev,
Brian Carter, Ben Campbell, Alexey Melnikov, Adrian Farrel, Robert Sparks, Peter St. Andre, Sean Turner, and Dan Romascanu. </t>
    </section>
  </middle>

  <back>
    <references title="Normative References">

      &RFC2119;
      &RFC3292;
      &RFC3293;
      &RFC3629;
      &RFC4301;
      &RFC4303;
      &RFC5646;
      &RFC5996;
    </references>

    <references title="Informative References">

      &RFC2131;
      &RFC3046;
      &RFC3315;
      &RFC4649;
      &RFC5226;
      &RFC5246;
      &RFC5713;
      &RFC5851;
      &RFC5925;

      <reference anchor="TR-059">
        <front>
          <title>DSL Forum TR-059, DSL Evolution - Architecture Requirements
          for the Support of QoS-Enabled IP Services</title>

          <author initials="T." surname="Anschutz">
            <organization></organization>
          </author>

          <date month="September" year="2003" />
        </front>
      </reference>

      <reference anchor="TR-058">
        <front>
          <title>DSL Forum TR-058, Multi-Service Architecture &amp; Framework
          Requirements</title>

          <author initials="M." surname="Elias">
            <organization>SBC</organization>
          </author>

          <author initials="S." surname="Ooghe">
            <organization>Alcatel</organization>
          </author>

          <date month="September" year="2003" />
        </front>
      </reference>

      <reference anchor="TR-092">
        <front>
          <title>DSL Forum TR-092, Broadband Remote access server requirements
          document</title>

          <author>
            <organization>DSL Forum (now the Broadband Forum)</organization>
          </author>

          <date year="2005" />
        </front>
      </reference>
      
      <reference anchor="TR-101">
        <front>
          <title>Architecture &amp; Transport: "Migration to Ethernet Based
          DSL Aggregation", DSL Forum TR-101</title>

          <author surname="Cohen et al">
            <organization>DSL Forum (now the Broadband Forum)</organization>
          </author>

          <date year="2005" />
        </front>
      </reference>

  <reference anchor="TR-147">
    <front>
      <title>  Layer 2 Control Mechanism For Broadband Multi-Service Architectures
      </title>
      <author surname="Voight et al">
        <organization>Broadband Forum</organization>
      </author>
      <date year="2008"/>
    </front>
  </reference>
     
      <reference anchor="G.988.1">
        <front>
          <title>ITU-T recommendation G.998.1, ATM-based multi-pair
          bonding</title>

          <author>
            <organization></organization>
          </author>

          <date year="2005" />
        </front>
      </reference>

      <reference anchor="G.988.2">
        <front>
          <title>ITU-T recommendation G.998.2, Ethernet-based multi-pair bonding,</title>

          <author>
            <organization></organization>
          </author>

          <date year="2005" />
        </front>
      </reference>

      <reference anchor="US_ASCII">
        <front>
          <title>Coded Character Set - 7-bit American Standard Code for Information Interchange</title>

          <author surname="">
            <organization>American National Standards Institute</organization>
          </author>

          <date year="1986" />
        </front>
        <seriesInfo name='ANSI' value='X.34' />
      </reference>

    </references>

  </back>
</rfc>
