PANA Working Group                                           D. Forsberg
Internet-Draft                                                     Nokia
Expires: January 15, April 20, 2005                                    Y. Ohba (Ed.)
                                                                 Toshiba
                                                                B. Patil
                                                                   Nokia
                                                           H. Tschofenig
                                                                 Siemens
                                                                A. Yegin
                                                                 Samsung
                                                           July 17,
                                                        October 20, 2004

     Protocol for Carrying Authentication for Network Access (PANA)
                        draft-ietf-pana-pana-05
                        draft-ietf-pana-pana-06

Status of this Memo

   By submitting this Internet-Draft, I certify that any applicable
   patent or other IPR claims of which I am aware have been disclosed,
   and any of which I become aware will be disclosed, in accordance with
   RFC 3668.

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

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

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

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

   This Internet-Draft will expire on January 15, April 20, 2005.

Copyright Notice

   Copyright (C) The Internet Society (2004).  All Rights Reserved.

Abstract

   This document

   Extensible Authentication Protocol (EAP) defines the a number of
   authentication schemes.  Network access authentication requires a
   host to authenticate itself before being authorized for sending and
   receiving packets.  The Protocol for Carrying Authentication for
   Network Access (PANA), (PANA) is defined in this document.  PANA is a
   link-layer agnostic transport carrier for Extensible
   Authentication Protocol (EAP) to enable network access authentication
   between clients and access networks.  PANA can carry any
   authentication method that can be specified as an EAP method, and can
   be used on any link that can carry IP. EAP.  PANA covers specifies the
   client-to-network access authentication part within the scope of an
   overall secure network access framework, which additionally includes other protocols
   and mechanisms for service provisioning, access control as a result
   of initial authentication, and accounting. framework.

Table of Contents

   1.   Introduction . . . . . . . . . . . . . . . . . . . . . . . .   5
     1.1  Specification of Requirements  . . . . . . . . . . . . . .   5
   2.   Terminology  . . . . . . . . . . . . . . . . . . . . . . . .   6
   3.   Protocol Overview  . . . . . . . . . . . . . . . . . . . . .   8
     3.1  Illustration of a Complete Message Sequence  . . . . . . .   9
   4.   Protocol Details . . . . . . . . . . . . . . . . . . . . . .  11  10
     4.1  Common Processing Rules  .  Discovery and Handshake Phase  . . . . . . . . . . . . . .  10
     4.2  Authentication Phase . .  11
       4.1.1  Payload Encoding . . . . . . . . . . . . . . . . .  13
     4.3  Authorization Phase  . .  11
       4.1.2  Transport Layer Protocol . . . . . . . . . . . . . . .  12
       4.1.3  Fragmentation . .  15
     4.4  Re-authentication Phase  . . . . . . . . . . . . . . . . .  15
     4.5  Termination Phase  .  12
       4.1.4  Sequence Number and Retransmission . . . . . . . . . .  12
       4.1.5  PANA Security Association . . . . . . . . .  17
   5.   Protocol Design Details and Processing Rules . . . . .  13
       4.1.6  Message Authentication Code . . .  19
     5.1  Payload Encoding . . . . . . . . . .  15
       4.1.7  Message Validity Check . . . . . . . . . . .  19
     5.2  Transport Layer  . . . . .  15
       4.1.8  Error Handling . . . . . . . . . . . . . . . .  20
       5.2.1  Fragmentation  . . . .  17
     4.2  Discovery and Initial Handshake Phase . . . . . . . . . .  17
       4.2.1  Discovery and Initial Handshake with NAP-ISP
              Authentication Separation . . . . . .  20
     5.3  Sequence Number and Retransmission . . . . . . . .  20
     4.3  Authentication Phase . . . .  20
     5.4  Message Authentication Code  . . . . . . . . . . . . . . .  21
     4.4  Re-authentication
     5.5  Message Validity Check . . . . . . . . . . . . . . . . . .  21
     5.6  PANA Security Association  . .  24
     4.5  Termination Phase . . . . . . . . . . . . . .  23
     5.7  Error Handling . . . . . .  26
     4.6  Example Sequence for NAP and ISP Separate
          Authentications . . . . . . . . . . . . . . . .  25
     5.8  Device ID Choice . . . . .  26
     4.7  Responding to Duplicate Requests . . . . . . . . . . . . .  28
     4.8  Device ID Choice . . .  25
     5.9  Updating PaC' Address  . . . . . . . . . . . . . . . . . .  29
     4.9  Updating PaC' Address  26
     5.10   Session Lifetime . . . . . . . . . . . . . . . . . . .  29
     4.10   Session Lifetime .  26
     5.11   Network Selection  . . . . . . . . . . . . . . . . . . .  30
     4.11   Retransmission  27
     5.12   Separate NAP and ISP Authentication  . . . . . . . . . .  27
       5.12.1   Negotiating Separate NAP and ISP Authentication  . .  28
       5.12.2   Execution of Duplicate Answers Separate NAP and ISP Authentication . .  28
       5.12.3   AAA-Key Calculation  . . . . . . . .  31
     4.12   Mobility Handling . . . . . . . .  29
       5.12.4   Re-authentication  . . . . . . . . . . . .  31
     4.13   Support for Separate EP . . . . .  30
       5.12.5   Example Sequence . . . . . . . . . . .  33
   5. . . . . . . .  30
   6.   Security and Mobility  . . . . . . . . . . . . . . . . . . .  32
     6.1  PANA Security Association Establishment  . . . . . . . . .  32
     6.2  Mobility . . . . . .  34
   6.   Message Formats . . . . . . . . . . . . . . . . . . .  32
   7.   PANA Headers and Formats . . . . . . . . . . . . . . . . . .  35
     6.1
     7.1  IP and UDP Headers . . . . . . . . . . . . . . . . . . . .  35
     6.2
     7.2  PANA Header  . . . . . . . . . . . . . . . . . . . . . . .  35
     6.3
     7.3  AVP Header . . . . . . . . . . . . . . . . . . . . . . . .  37
     6.4
   8.   PANA Messages, Message Specifications and AVPs . . . . . . .  40
     8.1  PANA Messages  . . . . . . . . . . . . . . . . . . . . . .  39
       6.4.1  40
     8.2  Message Specifications . . . . . . . . . . . . . . . .  39
       6.4.2 . .  40
       8.2.1  PANA-PAA-Discover (PDI)  . . . . . . . . . . . . . . .  40
       6.4.3  41
       8.2.2  PANA-Start-Request (PSR) . . . . . . . . . . . . . . .  40
       6.4.4  41
       8.2.3  PANA-Start-Answer (PSA)  . . . . . . . . . . . . . . .  40
       6.4.5  41
       8.2.4  PANA-Auth-Request (PAR)  . . . . . . . . . . . . . . .  41
       6.4.6
       8.2.5  PANA-Auth-Answer (PAN) . . . . . . . . . . . . . . . .  41
       6.4.7  42
       8.2.6  PANA-Reauth-Request (PRAR) . . . . . . . . . . . . . .  42
       8.2.7  PANA-Reauth-Answer (PRAA)  . . . . . . . . . . . . . .  42
       8.2.8  PANA-Bind-Request (PBR)  . . . . . . . . . . . . . . .  41
       6.4.8  42
       8.2.9  PANA-Bind-Answer (PBA) . . . . . . . . . . . . . . . .  42
       6.4.9  PANA-Reauth-Request (PRAR)  43
       8.2.10   PANA-Ping-Request (PPR)  . . . . . . . . . . . . . .  42
       6.4.10   PANA-Reauth-Answer (PRAA)  43
       8.2.11   PANA-Ping-Answer (PPA) . . . . . . . . . . . . .  42
       6.4.11 . .  43
       8.2.12   PANA-Termination-Request (PTR) . . . . . . . . . . .  42
       6.4.12  43
       8.2.13   PANA-Termination-Answer (PTA)  . . . . . . . . . . .  43
       6.4.13   PANA-Error  44
       8.2.14   PANA-Error-Request (PER) . . . . . . . . . . . . . .  44
       8.2.15   PANA-Error-Answer (PEA)  . . . . .  43
       6.4.14 . . . . . . . . .  44
       8.2.16   PANA-FirstAuth-End-Request (PFER)  . . . . . . . . .  43
       6.4.15  44
       8.2.17   PANA-FirstAuth-End-Answer (PFEA) . . . . . . . . . .  43
       6.4.16  45
       8.2.18   PANA-Update-Request (PUR)  . . . . . . . . . . . . .  44
       6.4.17  45
       8.2.19   PANA-Update-Answer (PUA) . . . . . . . . . . . . . .  44
     6.5  45
     8.3  AVPs in PANA . . . . . . . . . . . . . . . . . . . . . . .  44
       6.5.1  45
       8.3.1  MAC AVP  . . . . . . . . . . . . . . . . . . . . . . .  44
       6.5.2  48
       8.3.2  Device-Id AVP  . . . . . . . . . . . . . . . . . . . .  45
       6.5.3  49
       8.3.3  Session-Id AVP . . . . . . . . . . . . . . . . . . . .  45
       6.5.4  49
       8.3.4  Cookie AVP . . . . . . . . . . . . . . . . . . . . . .  45
       6.5.5  49
       8.3.5  Protection-Capability AVP  . . . . . . . . . . . . . .  45
       6.5.6  49
       8.3.6  Termination-Cause AVP  . . . . . . . . . . . . . . . .  45
       6.5.7  49
       8.3.7  Result-Code AVP  . . . . . . . . . . . . . . . . . . .  46
       6.5.8  50
       8.3.8  EAP-Payload AVP  . . . . . . . . . . . . . . . . . . .  50
       6.5.9  54
       8.3.9  Session-Lifetime AVP . . . . . . . . . . . . . . . . .  50
       6.5.10  54
       8.3.10   Failed-AVP AVP . . . . . . . . . . . . . . . . . . .  50
       6.5.11  54
       8.3.11   NAP-Information AVP  . . . . . . . . . . . . . . . .  50
       6.5.12  54
       8.3.12   ISP-Information AVP  . . . . . . . . . . . . . . . .  50
       6.5.13  54
       8.3.13   Provider-Identifier AVP  . . . . . . . . . . . . . .  50
       6.5.14  54
       8.3.14   Provider-Name AVP  . . . . . . . . . . . . . . . . .  51
       6.5.15   EP-Device-Id  55
       8.3.15   Key-Id AVP . . . . . . . . . . . . . . . . . .  51
       6.5.16   Key-Id AVP . . .  55
       8.3.16   Post-PANA-Address-Configuration (PPAC) AVP . . . . .  55
       8.3.17   Nonce AVP  . . . . . . . . . . . . .  51
       6.5.17   Post-PANA-Address-Configuration (PPAC) AVP . . . . .  51
       6.5.18   Nonce AVP . . .  56
       8.3.18   IP-Address AVP . . . . . . . . . . . . . . . . . .  52
       6.5.19   IP-Address AVP .  56
   9.   PANA Protocol Message Retransmissions  . . . . . . . . . . .  57
     9.1  Transmission and Retransmission Parameters . . . . . . . .  52
     6.6  AVP Occurrence Table  58
   10.  IANA Considerations  . . . . . . . . . . . . . . . . . . .  52
   7. .  60
     10.1   PANA Protocol Message Retransmissions UDP Port Number . . . . . . . . . . .  56
     7.1  Transmission and Retransmission Parameters . . . . . . .  60
     10.2   PANA Multicast Address .  58
   8.   IANA Considerations . . . . . . . . . . . . . . . .  60
     10.3   PANA Header  . . . .  59
     8.1  PANA UDP Port Number . . . . . . . . . . . . . . . . . .  60
       10.3.1   Message Type .  59
     8.2  PANA Multicast Address . . . . . . . . . . . . . . . . . .  59
     8.3  PANA .  60
       10.3.2   Flags  . . . . . . . . . . . . . . . . . . . . . . .  61
     10.4   AVP Header . . . . . . . . . . . . . . . . . . . . . . .  59
       8.3.1  Message Type  61
       10.4.1   AVP Code . . . . . . . . . . . . . . . . . . . . .  59
       8.3.2  Flags .  61
       10.4.2   Flags  . . . . . . . . . . . . . . . . . . . . . . .  60
     8.4  62
     10.5   AVP Header . Values . . . . . . . . . . . . . . . . . . . . . . .  60
       8.4.1  62
       10.5.1   Algorithm Values of MAC AVP Code  . . . . . . . . . . . .  62
       10.5.2   Protection-Capability AVP Values . . . . . . . . . .  62
       10.5.3   Termination-Cause AVP Values . . .  60
       8.4.2  Flags . . . . . . . . .  62
       10.5.4   Result-Code AVP Values . . . . . . . . . . . . . . .  61
     8.5  62
       10.5.5   Post-PANA-Address-Configuration AVP Values . . . . .  63
   11.  Security Considerations  . . . . . . . . . . . . . . . . . .  64
     11.1   General Security Measures  .  61
       8.5.1  Algorithm Values of MAC AVP . . . . . . . . . . . . .  61
       8.5.2  Protection-Capability AVP Values .  64
     11.2   Discovery  . . . . . . . . . .  61
       8.5.3  Termination-Cause AVP Values . . . . . . . . . . . . .  61
       8.5.4  Result-Code AVP Values  65
     11.3   EAP Methods  . . . . . . . . . . . . . . . .  61
       8.5.5  Post-PANA-Address-Configuration AVP Values . . . . . .  62
   9.   Security Considerations  66
     11.4   Separate NAP and ISP Authentication  . . . . . . . . . .  66
     11.5   Cryptographic Keys . . . . . . . .  63
   10.  Open Issues and Change History . . . . . . . . . . .  66
     11.6   Per-packet Ciphering . . . .  69
   11.  Acknowledgments . . . . . . . . . . . . . .  67
     11.7   PAA-to-EP Communication  . . . . . . . .  70
   12.  References . . . . . . . .  67
     11.8   Livenes Test . . . . . . . . . . . . . . . . .  71
   12.1   Normative References . . . . .  68
     11.9   Mobility Optimization  . . . . . . . . . . . . . .  71
   12.2   Informative References . . .  68
     11.10  Updating PaC's IP Address  . . . . . . . . . . . . . . .  72
        Authors' Addresses  68
     11.11  Early Termination of a Session . . . . . . . . . . . . .  69
   12.  Acknowledgments  . . . . . . . .  75
        Intellectual Property and Copyright Statements . . . . . . .  77

1.  Introduction

   Providing secure network access service requires access control based
   on the authentication and authorization of the clients and the access
   networks.  Initial and subsequent client-to-network authentication
   provides parameters that are needed to police the traffic flow
   through the enforcement points.  A protocol is needed to carry
   authentication methods between the client and the access . . . . . . .  70
   13.  References . . . . . . . . . . . . . . . . . . . . . . . . .  71
   13.1   Normative References . . . . . . . . . . . . . . . . . . .  71
   13.2   Informative References . . . . . . . . . . . . . . . . . .  72
        Authors' Addresses . . . . . . . . . . . . . . . . . . . . .  73
        Intellectual Property and Copyright Statements . . . . . . .  75

1.  Introduction

   Network access authentication has traditionally been a layer 2
   function.  This document specifies a protocol that enables EAP to be
   transported above the IP layer.  As a result, network access
   authentication can be made a function of the network layer thereby
   achieving link-layer independence for the process of authenticating a
   client seeking access to a network.

   Currently  At the present time, there is are
   no standard network-layer solution standardized solutions for authenticating clients a host for network access.  Appendix A of
   [I-D.ietf-pana-requirements] describes
   access at the network layer.  The problem statement that led
   to for which the development of PANA.

   Scope of this work
   PANA protocol is identified as designing a link-layer agnostic
   transport for network access authentication methods.  The Extensible
   Authentication Protocol (EAP) [RFC3748] provides such authentication
   methods.  In other words, solution can be found in Appendix A of
   [I-D.ietf-pana-requirements].

   PANA will carry relies on EAP which can carry various
   authentication methods.  By for the virtue of enabling transport actual authentication of EAP
   above IP, a client.  It
   does not define any new authentication method that can protocols or schemes.  It
   enables EAP messages to be carried as an between the client and the
   network.  The actual choice of a specific EAP method is made available to be run over
   PANA and hence to any link-layer
   technology.  There is a clear division of labor between PANA, EAP and
   EAP methods.

   Various environments and usage models for PANA are identified in
   Appendix A of [I-D.ietf-pana-requirements].  Potential security
   threats for network-layer dependent on the underlying access authentication protocol are
   discussed in [I-D.ietf-pana-threats-eval].  These have been essential network technology.  The
   key factor in defining the requirements [I-D.ietf-pana-requirements] on the PANA
   protocol.  Note that some choice of these requirements are imposed by the
   chosen payload, EAP [RFC3748].

   There are components that are part method is the determination of a complete
   whether the lower layer (link/physical) provides security for the
   PANA messages.

   A secure network
   solution but are outside of access authentication framework goes beyond just
   authenticating the PANA protocol specification,
   including IP client to the network.  Other aspects such as
   address configuration, authentication method choice,
   filter rule installation, data traffic protection security, access control filters
   and PAA-EP
   protocol.  These components separation of the enforcement point from the protocol end-point
   are described documented in separate documents (see [I-D.ietf-pana-framework] and [I-D.ietf-pana-snmp]). [I-D.ietf-pana-snmp].

   This document specifies the client-network interaction and the
   messages defined for this purpose.

1.1  Specification of Requirements

   In this document, several words are used to signify the requirements
   of the specification.  These words are often capitalized.  The key
   words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
   "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document
   are to be interpreted as described in [RFC2119].

2.  Terminology

   This section describes some terms introduced in this document:

   PANA Session:

      A Client (PaC):

      The client side of the protocol that resides in the host device.
      It is responsible for providing the credentials in order to prove
      its identity for network access authorization.

   PANA session begins with Authentication Agent (PAA):

      The protocol entity in the initial handshake between access network whose responsibility is
      to verify the credentials provided by a PANA
      Client client (PaC) and
      authorize network access to the PANA Authentication Agent (PAA), device associated with the client
      and
      terminates identified by an authentication failure, a timeout, or Device Identifier (DI).  Note the
      authentication and authorization procedure can, according to the
      EAP model, be also offloaded to the backend AAA infrastructure.

   PANA Session:

      A PANA session begins with the handshake between the PANA Client
      (PaC) and the PANA Authentication Agent (PAA), and terminates as a
      result of an authentication failure, a timeout, or an explicit
      termination message.  A fixed session identifier is maintained
      throughout a session.  A session cannot be shared across multiple
      physical
      network interfaces.  A distinct PANA session is
      associated with the device identifiers of PaC and PAA.

   Session Identifier:

      This identifier is used to uniquely identify a PANA session on the
      PAA and PaC.  It includes an identifier of the PAA, therefore it
      cannot be shared across multiple PAAs.  It is included in PANA
      messages to bind the message to a specific PANA session.  This
      bidirectional identifier is allocated by the PAA following the
      initial
      handshake and freed when the session terminates.

   PANA Security Association: Association (PANA SA):

      A PANA security association is a relationship between the PaC and
      PAA, formed by the sharing of cryptographic keying material and
      associated context.  Security associations are duplex.  That is,
      one security association is needed to protect the bidirectional
      traffic between the PaC and the PAA.

   PANA Client (PaC):

      The client side of the protocol that resides in the host device
      which is responsible for providing the credentials to prove its
      identity for network access authorization.

   Device Identifier (DI):

      The identifier used by the network as a handle to control and
      police the network access of a client.  Depending on the access
      technology, this identifier might may contain any of an address that is carried
      in protocol headers (e.g., IP address, or link-layer address, switch port number, etc.  of address), or a connected
      device.

   PANA Authentication Agent (PAA):

      The protocol entity in the access network side whose
      responsibility locally
      significant identifier that is to verify the credentials provided made available by a PANA
      client and grant network access service to the device associated
      with the client and identified by local
      protocol stack (e.g., circuit id, PPP interface id) of a DI.  Note the authentication
      and authorization procedure can, according to the EAP model, be
      also offloaded to the backend AAA infrastructure. connected
      device.

   Enforcement Point (EP):

      A node on the access network where per-packet enforcement policies
      (i.e., filters) are applied on the inbound and outbound traffic of
      client devices.  Information such as the DI and (optionally)
      cryptographic keys are provided by the PAA per client for
      constructing
      generating filters on the EP.

   Network Access Provider (NAP):

      A service provider that provides physical and link-layer
      connectivity to an access network it manages.

   AAA-Key:

      A key derived by the EAP peer and EAP server and transported to
      the authenticator [I-D.ietf-eap-keying].

3.  Protocol Overview

   The PANA protocol involves two functional entities namely the PaC is run between a client (PaC) and a server (PAA) in
   order to perform authentication and authorization for the PAA. network
   access service.

   The protocol resides above the transport layer messaging consists of a series of request and the
   details are explained in Section 4. responses,
   some of which may be initiated by either ends.  Each message can
   carry zero or more AVPs as payload.  The placement main payload of the entities used in PANA largely depends on a
   selected architecture.  The PAA may optionally interact with a AAA
   backend to authenticate the user (PaC).  The EP, mentioned in the
   context with PANA, is a logical entity.  In case that the PAA EAP
   which performs authentication.  PANA helps PaC and the
   EP are co-located only PAA establish an API
   EAP session.

   PANA is required for intercommunication
   instead of a separate UDP-based protocol.  In the case where the PAA is
   separated from the EP, a separate protocol will be used  It has its own retransmission
   mechanism to reliably deliver messages.

   PANA messages are sent between the
   PAA a PaC and the EP for managing access control.  A description PAA as part of this
   protocol is outside the scope a PANA
   session.  A PANA session consists of this draft distinct phases:

   o  Discovery and handshake phase: This is covered in
   [I-D.ietf-pana-snmp].

   Figure 1 illustrates the interactions in phase that initiates a simplified manner:

           PaC                   EP            PAA           AAA
           ---                   ---           ---           ---

                         PAA Discovery
            <---------------------o------------> (1)
                      PANA Authentication       AAA interaction
            <----------------------------------><------------> (2)

                                     Authorization
                                  <-------------  (3)

                        Figure 1: PANA Framework
      new PANA supports authentication of a session.  The PaC using various discovers the PAA(s) by either
      explicitly soliciting advertisements for them or receiving
      unsolicited advertisements.  The PaC's answer sent in response to
      an advertisement starts a new session.

   o  Authentication phase: Immediately following the handshake phase is
      the EAP methods. execution between the PAA and PaC.  The EAP payloads
      (which carry an EAP method inside) is what is used depends on the level for
      authentication.  Authentication phase may involve execution of security required two
      EAP sessions back-to-back, one for the EAP
   messaging itself. NAP and one for the ISP.

   o  Authorization phase: Following a successful PANA does not secure authentication
      phase, the PaC gains access to the network and can send and
      receive IP data traffic itself.
   However, EAP methods that enable key exchange through EP.  During this phase, the PaC
      and PAA may allow optionally ping each other
   protocols to be bootstrapped for securing the data traffic (e.g.,
   [I-D.ietf-pana-ipsec]).

   From a state machine point test liveness of view, the
      PANA protocol consists of
   three phases

   1.  Discovery and initial handshake phase

   2.  Authentication phase

   3.  Termination phase
   In the first phase, session on each end.

   o  Re-authentication phase: Following an IP address of authorization phase, the PAA is discovered and a
      must initiate re-authentication before the PANA session is established between PaC and PAA. lifetime
      expires.  Again EAP messages are
   exchanged and a PANA SA is established in the second phase.  The carried by PANA
   session as well as to perform authentication.
      This phase may be optionally triggered by both the PANA SA is deleted in PaC and the third phase.

   In addition, PANA defines PAA
      without any respect to the following two types of
   re-authentication procedures that are performed while an established
   PANA session exists.

   1.  Re-authentication based on EAP

   2.  Re-authentication based on PANA-Reauth exchange lifetime.  The former type of re-authentication is used mainly for extending
   authorization lifetime or for updating the cryptographic keying
   material of a PANA SA. session moves to
      this phase from authorized phase, and returns back there upon
      successful re-authentication.

   o  Termination phase: The latter type of re-authentication is used
   mainly for maintaining the presence of the communicating peers each
   other so that PaC or PAA may choose to discontinue the established PANA session
      access service at any time.  An explicit disconnect message can be terminated as soon
   as
      sent by either end.  If either the presence of PaC or the peer PAA disconnects
      without engaging in termination messaging, it is lost.

3.1  Illustration expected that
      either the expiration of a Complete Message Sequence

   A complete PANA message sequence is illustrated in Figure 2.  The
   example assumes finite session lifetime or failed
      liveness tests would do the following scenario:

   o  The job.

     PaC initiates the discovery  PAA    Message[AVPs]
   -----------------------------------------------------
   // Discovery and initial handshake phase by
      multicasting a
      ----->     PANA-PAA-Discover message.  The PAA responds with a
      <-----     PANA-Start-Request message with a cookie to be stateless
      ----->     PANA-Start-Answer

   // Authentication phase
      <-----     PANA-Auth-Request /* EAP Request */
      ----->     PANA-Auth-Answer
      ----->     PANA-Auth-Request /* EAP Response */
      <-----     PANA-Auth-Answer
      <-----     PANA-Bind-Request /* EAP Success */
      ----->     PANA-Bind-Answer

   // Authorization phase (IP data traffic allowed)
      <-----     PANA-Ping-Request
      ----->     PANA-Ping-Answer

   // Termination phase
      ----->     PANA-Termination-Request
      <-----     PANA-Termination-Answer

          Figure 1: Illustration of PANA Messages in the
      discovery and initial handshake phase.  At the end a Session

   Cryptographic protection of the the
      discovery and initial handshake phase, messages between the PaC sends a
      PANA-Start-Answer message with a cookie and PAA is
   possible as soon as EAP in response to conjunction with the
      PANA-Start-Request.

   o  An EAP authentication method with exports a single round trip is used in
      the authentication phase.  A AAA-Key
   shared key.  That shared key is derived from the EAP
      method and used for establishing to create a PANA SA.

   o  At the end of the  The PANA
   SA helps generating per-message authentication phase, the PAA sends a
      PANA-Bind-Request message and the PaC responds with a
      PANA-Bind-Answer message.  These messages contains a MAC AVP codes that provide
   integrity protection and authentication.

   PANA also allows creation of a
      Key-Id AVP, as well as other AVPs for which usages are explained
      in Section 4, to securely establish a new PANA session with a PANA SA.

   o  After the PANA SA is established, all messages are integrity and
      replay protected new PAA out of
   an existing session with MAC AVPs.

   o  Re-authentication based on the PANA-Reauth-Request/ PANA-Reauth
      exchange is performed.

   o  The another PAA.  This optimization allows PaC initiates termination
   achieve quicker authorization without having to run EAP upon movement
   (changing PAAs).

   Throughout the lifetime of a session, various problems found with the PANA session by sending
   incoming messages can generate a
      PANA-Termination-Request message.

   o  Sequence numbers in PANA headers are not shown.

      PaC      PAA  Message[AVPs]
      -----------------------------------------------------
      // Discovery and initial handshake phase
         ----->     PANA-PAA-Discover
         <-----     PANA-Start-Request[Nonce, Cookie]
         ----->     PANA-Start-Request-Answer[Nonce, Cookie]

      // Authentication phase
         <-----     PANA-Auth-Request[Session-Id, EAP]
         ----->     PANA-Auth-Answer[Session-Id, EAP]
         <-----     PANA-Auth-Request[Session-Id, EAP]
         ----->     PANA-Auth-Answer[Session-Id, EAP]
         <-----     PANA-Bind-Request[Session-Id, EAP{Success},
                         Device-Id, Lifetime, Protection-Cap., Key-Id, MAC]
         ----->     PANA-Bind-Answer[Session-Id, Device-Id, Key-Id, MAC]

      // Re-authentication based on PANA-Reauth exchange
         <-----     PANA-Reauth-Request[Session-Id, MAC]
         ----->     PANA-Reauth-Answer[Session-Id, MAC]

      // Termination phase
         ----->     PANA-Termination-Request[Session-Id, MAC]
         <-----     PANA-Termination-Answer[Session-Id, MAC]

                 Figure 2: A Complete Message Sequence error message sent in response.

4.  Protocol Details

4.1  Common Processing Rules

4.1.1  Payload Encoding

   The payload of any PANA message consists of zero or more AVPs
   (Attribute Value Pairs).  A brief description of the AVPs defined following sections explain in
   this document is listed below:

   o  Cookie AVP: contains a random value that is used for making
      initial handshake robust against blind resource consumption DoS
      attacks.

   o  Protection-Capability AVP: contains information which protection
      should be initiated after detail the various phases of a PANA exchange (e.g., link-layer or
      network layer protection).

   o  Device-Id AVP: contains
   session.

4.1  Discovery and Handshake Phase

   When a device identifier of the sender of the
      message.  A device identifier is represented as PaC attaches to a pair of device
      identifier type network, and device identifier value.  Either knows that it has to discover a layer-2
   PAA, it SHOULD send a PANA-PAA-Discover message to a well-known link
   local multicast address or an (TBD) and UDP port (TBD).  The PANA PAA
   discovery assumes that the PaC and the PAA are one hop away from each
   other.  If the PaC knows the IP address is used for of the device identifier value.

   o  EP-Device-Id AVP: contains PAA (based on
   pre-configuration), it MAY unicast the device identifier of an EP.

   o  EAP AVP: contains an EAP PDU.

   o  MAC AVP: contains a Message Authentication Code PANA-PAA-Discover message to
   that protects address.

   When the PAA receives a
      PANA PANA-PAA-Discover message PDU.

   o  Termination-Cause AVP: contains from a PaC, the reason of session termination.

   o  Result-Code AVP: contains information about PAA
   SHOULD unicast a PANA-Start-Request message to the protocol execution
      results.

   o  Session-Id AVP: contains PaC.

   The PaC MAY also choose to start sending packets before getting
   authenticated.  In that case, the session identifier value.

   o  Session-Lifetime AVP: contains network may detect this and the duration of authorized access.

   o  Failed-AVP: contains PAA
   MAY send an unsolicited PANA-Start-Request message to the offending AVP PaC in
   addition to filtering the unauthorized traffic.  The EP is the node
   that caused can detect such activity.  The PAA-to-EP protocol MAY be used
   for this purpose.

   When a failure.

   o  NAP-Information AVP, ISP-Information AVP: contains the information
      on PaC receives a NAP and an ISP, respectively.

   o  Key-Id AVP: contains PANA-Start-Request message from a AAA-Key identifier.

   o  PPAC AVP: Post-PANA-Address-Configuration AVP.  Conveys PAA, it
   responds with a PANA-Start-Answer message if it wishes to enter an
   authentication phase.  The answer message copies the list
      of IP address configuration methods available when sent by sequence number.

   There can be multiple PAAs on the
      PAA, link and the a PaC may receive multiple
   PANA-Start-Request messages from those PAAs.  The authentication and
   authorization result does not depend on which PAA is chosen method when sent by the
   PaC.

   o  Nonce AVP: contains  By default the PaC MAY choose the PAA that sent the first
   response.

   A PANA-Start-Request message MAY carry a randomly chosen value.

   o  IP-Address AVP: Cookie AVP that contains an IP Address of a PaC.

4.1.2  Transport Layer Protocol

   PANA uses UDP as its transport layer protocol.
   cookie.  The UDP port sequence number is TBD.  All messages except for PANA-PAA-Discover are always
   unicast.  PANA-PAA-Discover MAY be unicasted when the PaC knows the
   IP address of the PAA.

4.1.3  Fragmentation

   PANA does not provide fragmentation of PANA messages.  Instead, it
   relies on fragmentation provided by EAP methods and IP layer when
   needed.

4.1.4  Sequence Number and Retransmission

   PANA uses sequence numbers set to provide ordered delivery of EAP
   messages.  The design involves use of two a randomly picked initial
   sequence numbers to prevent
   some of number.  The cookie is used for preventing the PAA from
   resource consumption DoS attacks by blind attackers.  The cookie is
   computed in such a way that it does not require any per-session state
   maintenance on the sequencing scheme.  Every PANA packet
   includes one transmitted sequence number (tseq) and one received
   sequence number (rseq) PAA in order to verify the PANA header.  See [1] for detailed
   explanation on why two sequence numbers are needed.

   The two sequence number fields have the same length of 32 bits and
   appear cookie returned in PANA header. a
   PANA-Start-Answer message.  The transmission sequence number starts from
   initial sequence number (ISN) exact algorithms and syntax used for
   generating cookies does not affect interoperability and hence is monotonically increased by 1.
   This rule applies not
   specified here.  An example algorithm is described below.

      Cookie =
        <secret-version> | HMAC_SHA1( <Device-Id of PaC> , <secret> )
   where <secret> is a randomly generated secret known only to all PANA messages but PANA-PAA-Discover.  The
   serial number arithmetic defined in [RFC1982] the PAA,
   <secret-version> is an index used for sequence
   number operation.  The ISNs are exchanged between PaC and PAA during choosing the discovery secret for
   generating the cookie and initial handshake phase (see Section 4.2). '|' indicates concatenation.  The
   rules that govern the sequence numbers in other phases are described
   as follows.

   o  When a message
   secret-version should be changed frequently enough to prevent replay
   attacks.  The secret key is sent, valid for a new sequence number is placed on certain time frame.

   When the
      tseq field of PaC sends a PANA-Start-Answer message regardless of whether it is sent as in response to a result
      of retransmission or not.  When
   PANA-Start-Request containing a message is sent, rseq is Cookie AVP, the answer MUST contain a
   Cookie AVP with the cookie value copied from the tseq field of the last accepted message.

   o request.

   When a the PAA receives the PANA-Start-Answer message is received, from the PaC, it
   verifies the cookie.  The cookie is considered as valid in terms of
      sequence numbers if and only if (i) its tseq is greater than the
      tseq of the last accepted message and (ii) its rseq falls in the
      range between
   received cookie has the tseq of expected value.  If the last acknowledged message and computed cookie is
   valid, the
      tseq of protocol enters an authentication phase.  Otherwise, it
   MUST silently discard the last transmitted received message.

   PANA relies on EAP-layer retransmissions, or for example NAS
   functionality [I-D.ietf-aaa-eap], for retransmitting

   Initial EAP Requests
   based on timer.  Other PANA layer messages that require a response
   from Request MAY be optionally carried by the communicating peer are retransmitted based on timer at
   PANA-layer until
   PANA-Start-Request (as opposed to by a response is received (in which case the
   retransmission timer is stopped) or later PANA-Auth-Request)
   message in order to reduce the number of retransmission
   reaches the maximum value (in which case the PANA session MUST be
   deleted immediately).  For PANA-layer retransmission, the
   retransmission timer round-trips.  This
   optimization SHOULD NOT be calculated as described in [RFC2988] used if the PAA discovery is desired to provide congestion control.  See Section 7 for default timer and
   maximum retransmission count parameters.

4.1.5  PANA Security Association be
   stateless.

   A PANA SA is created as an attribute of a PANA session when EAP
   authentication succeeds with a creation of Protection-Capability AVP and a AAA-Key.  A PANA SA is
   not created when Post-PANA-Address-Configuration
   (PPAC) AVP MAY be included in the PANA authentication fails or no AAA-Key is
   produced PANA-Start-Request in order to
   indicate required and available capabilities for the network access.
   These AVPs MAY be used by any EAP authentication method.  In the case where two EAP
   authentications are performed in sequence in a single PANA PaC for assessing the capability match
   even before the authentication takes place.  But these AVPs are
   provided during the insecure discovery and handshake phase, it is possible that two AAA-Keys there are derived.
   certain security risks involved in using the provided information.
   See Section 11 for further discussion on this.

   If this happens, the PANA SA MUST be generated from both AAA-Keys.
   When a new AAA-Key initial EAP Request message is derived as a result of EAP-based
   re-authentication, any key derived from carried in the old AAA-Key
   PANA-Start-Request message, an EAP Response message MUST be
   updated carried
   in the PANA-Start-Answer message returned to a new one that is derived from the new AAA-Key. PAA.

   In order
   to distinguish any case, PANA MUST NOT generate an EAP message on behalf of EAP
   peer or EAP (pass-through) authenticator.

   The PANA-Start-Request/Answer exchange is needed before entering an
   authentication phase even when the new AAA-Key from old ones, one Key-Id PaC is pre-configured with PAAs IP
   address and the PANA-PAA-Discover message is unicast.

   A Nonce AVP MUST be
   carried included in PANA-Bind-Request PANA-Start-Request and PANA-Bind-Answer messages or
   PANA-FirstAuth-End-Request and PANA-FirstAuth-End-Answer messages at
   the end of the EAP authentication which resulted in deriving a new
   AAA-Key.  The Key-Id AVP is of type Unsigned32 and MUST contain a
   value that uniquely identifies the AAA-Key within the PANA session.
   PANA-Start-Answer messages.  The PANA-Bind-Answer message (or the PANA-FirstAuth-End-Answer
   message) sent in response nonces are used to establish a PANA-Bind-Request PANA
   SA.

   A PANA-Start-Request message (or a
   PANA-FirstAuth-End-Request message) with that carries a Key-Id Cookie AVP MUST contain is never
   retransmitted.  A PANA-Start-Request message that does not carry a
   Key-Id
   Cookie AVP with the same AAA-Key identifier carried in the request.
   PANA-Bind-Request, PANA-Bind-Answer, PANA-FirstAuth-End-Request and
   PANA-FirstAuth-End-Answer messages with is retransmitted based on timer.  A PANA-Start-Answer
   message that carries a Key-Id Cookie AVP MUST also is retransmitted based on timer.  A
   PANA-Start-Answer message that does not carry a MAC Cookie AVP whose value is computed by using never
   retransmitted based on timer.

   It is possible that both the new PANA-MAC-KEY
   derived from PAA and the new AAA-Key (or PaC initiate the new pair of AAA-Keys when discovery
   and handshake procedure at the
   PANA_MAC_KEY is derived from two AAA-Keys).  Although same time, i.e., the
   specification does not mandate PAA sends a particular method for calculation of
   Key-Id AVP value,
   PANA-Start-Request message while the PaC sends a simple method is to use monotonically increasing
   numbers.

   The created PANA SA is deleted when PANA-PAA-Discover
   message.  To resolve the corresponding PANA session is
   deleted.  The lifetime of race condition, the PANA SA is PAA SHOULD silently
   discard the same as PANA-PAA-Discover message received from the lifetime of PaC after it
   has sent a PANA-Start-Request message with creating a state (i.e., no
   Cookie AVP is included in the PANA session message) for simplicity.

   PANA SA attributes as well as PANA session attributes are listed
   below:

   PANA Session attributes:

      *  Session-Id

      *  Device-Id of PaC

      *  Device-Id of PAA

      *  IP address of PaC (may be the same as the Device-Id of PaC)

      *  IP address of PAA (may be the same as the Device-Id of PAA)

      *  List of device identifiers of EPs

      *  Last transmitted tseq value

      *  Last received rseq value

      *  Last transmitted message payload

      *  Retransmission interval

      *  Session lifetime

      *  Protection-Capability

      *  PANA SA attributes:

         +  Nonce generated by PaC (PaC_nonce)

         +  Nonce generated by PaC.  In this case PAA (PAA_nonce)

         +  AAA-Key

         +  AAA-Key Identifier

         +  PANA_MAC_KEY

   The PANA_MAC_Key is used to integrity protect PANA messages and
   derived from AAA-Key(s).  When two AAA-Keys (AAA-Key1 and AAA-Key2)
   are generated as a result of double EAP authentication (see Section
   4.3) the compound AAA-Key can be computed as follows ('|' indicates
   concatenation):

      AAA-Key = AAA-Key1 | AAA-Key2
    The PANA_MAC_KEY is computed in the following way:

      PANA_MAC_KEY = The first N bits of
                     HMAC_SHA1(AAA-Key, PaC_nonce | PAA_nonce | Session-ID)

   where the value of N depends
   will retransmit PANA-Start-Request based on the integrity protection algorithm a timer, if PaC doesn't
   respond in
   use, i.e., N=160 for HMAC-SHA1.  The length of AAA-Key MUST be N bits
   or longer.  See Section Section 4.1.6 time (message was lost for example).  If the detailed usage of the
   PANA_MAC_KEY.

4.1.6  Message Authentication Code

   A PANA PAA had sent
   a PANA-Start-Request message can contain without creating a MAC (Message Authentication Code) AVP state for cryptographically protecting the message.

   When PaC
   (i.e., a MAC Cookie AVP is was included in a PANA message, the value field of the
   MAC AVP is calculated by using the PANA_MAC_KEY in message), then it SHOULD
   answer to the following way:

      MAC AVP value = PANA_MAC_PRF(PANA_MAC_KEY, PANA_PDU)

   where PANA_PDU is PANA-PAA-Discover message.

   Figure 2 shows an example sequence for the PANA discovery and handshake
   phase when a PANA-PAA-Discover message including the PANA header, with
   the MAC AVP value field first initialized to 0.  PANA_MAC_PRF
   represents the pseudo random function corresponding to is sent by the MAC
   algorithm specified in PaC.  Figure 3
   shows an example sequence for the MAC AVP.  In this version of draft,
   PANA_MAC_PRF discovery and handshake phase that
   is HMAC-SHA1.  The triggered by data traffic.

      PaC and      PAA MUST use the same
   algorithm         Message(seqno)[AVPs]
      ------------------------------------------------------
         ----->            PANA-PAA-Discover(0)
         <-----            PANA-Start-Request(x)[Nonce, Cookie]
         ----->            PANA-Start-Answer(x)[Nonce, Cookie]
                           (continued to calculate a MAC AVP they originate authentication phase)

   Figure 2: Example Sequence for Discovery and receive.  The
   algorithm Handshake Phase  when
                    PANA-PAA-Discover is determined sent by the PaC

      PaC   EP      PAA    Message(seqno)[AVPs]
      ------------------------------------------------------
       ---->o              (Data packet arrival or L2 trigger)
             ------>       PAA-to-EP protocol, or another mechanism
       <------------       PANA-Start-Request(x)[Nonce, Cookie]
       ------------>       PANA-Start-Answer(x)[Nonce, Cookie]
                           (continued to authentication phase)

 Figure 3: Example Sequence for Discovery and Handshake when a PANA-Bind-Request with a
   MAC AVP discovery
                      is sent.  When triggered by data traffic

4.2  Authentication Phase

   The main task in authentication phase is to carry EAP messages
   between the PaC does not support and the MAC algorithm
   specified PAA.  EAP Request and Response messages are
   carried in the PANA-Bind-Request message, it MUST silently discard
   the message.  The PAA MUST NOT change the MAC algorithm throughout
   the continuation PANA-Auth-Request messages.  PANA-Auth-Answer messages are
   simply used to acknowledge receipt of the PANA session.

4.1.7  Message Validity Check

   When requests.  As an
   optimization, a PANA PANA-Auth-Answer message MAY include the EAP
   Response.  Another optimization allows optionally carrying the first
   EAP Request/Response in PANA-Start-Request/Answer message as
   described in Section 4.1

   When an EAP Success/Failure message is received, sent from a PAA, the message
   is considered to carried in a PANA-Bind-Request (PBR) message.  The
   PANA-Bind-Request messages MUST be
   invalid at least when one acknowledged with a
   PANA-Bind-Answer (PBA) message.  Figure 4 shows an example sequence
   in an authentication phase.

      PaC      PAA  Message(seqno)[AVPs]
      --------------------------------------------------------------------
                    (continued from discovery and handshake phase)
         <-----     PANA-Auth-Request(x+1)
                       [Session-Id, EAP{Request}]
         ----->     PANA-Auth-Answer(x+1)      // No piggybacking EAP-Response
                       [Session-Id]
         ----->     PANA-Auth-Request(y)
                       [Session-Id, EAP{Response}]
         <-----     PANA-Auth-Answer(y)
                       [Session-Id]
         <-----     PANA-Auth-Request(x+2)
                       [Session-Id, EAP{Request}]
         ----->     PANA-Auth-Answer(x+2)      // Piggybacking EAP-Response
                       [Session-Id, EAP{Response}]
         <-----     PANA-Bind-Request(x+3)
                       [Session-Id, EAP{Success}, Device-Id, IP-Address,
                        Lifetime, Protection-Cap., PPAC, MAC]
         ----->     PANA-Bind-Answer(x+3)
                       [Session-Id, Device-Id, PPAC, MAC]

           Figure 4: Example Sequence in Authentication Phase

   When an EAP method that is capable of deriving keys is used during
   the following conditions authentication phase and the keys are not met:

   o  The IP Hop Limit (or TTL) field has a value of 255, i.e., successfully derived, the
      packet could not possibly have been forwarded by
   PANA-FirstAuth-End-Request and PANA-FirstAuth-End-Answer and/or
   PANA-Bind-Request and PANA-Bind-Answer messages, and all subsequent
   PANA messages MUST contain a router.

   o  Each field in MAC AVP.

   The PANA-Bind-Request and the PANA-Bind-Answer message header contains a valid value including
      sequence number, message length, message type, version number,
      flags, etc.

   o  When a exchange is
   also used for binding device identifier identifiers of the communication peer is bound PaC and EP(s), and
   the IP address of the PAA to the PANA session, it matches SA.  To achieve this, the
   PANA-Bind-Request SHOULD contain the device identifier carried identifier(s) of the
   EP(s) in Device-Id AVP(s) when they are either MAC and/ or IP header(s), or other auxiliary indetifier provided by address(es),
   and the
      lower-layers (e.g., circuit ID).

   o  The message type is one IP address of the expected types PAA in an IP-Address AVP.  PANA-Bind-Answer
   SHOULD contain PaC's device identifier in the current
      state.  Specifically the following messages are unexpected and
      invalid:

      *  In discovery and initial handshake phase:

         +  PANA-Termination-Request and PANA-Reauth-Request.

         +  PANA-Bind-Request.

         +  PANA-Update-Request.

      *  In authentication phase:

         +  PANA-PAA-Discover.

         +  PANA-Termination-Request and PANA-Reauth-Request.

         +  PANA-Update-Request.

         +  PANA-Start-Request after a Device-Id AVP when it is
   already presented with that of EP(s).  The PaC receives MUST use the first valid
            PANA-Auth-Request.

      *  After successful PANA authentication:

         +  PANA-Start-Request as well same type
   of device identifier as a non-duplicate contained in the PANA-Bind-Request (see section Section 4.7 for definition of
            duplicate requests).

         +  PANA-PAA-Discover without message.
   This exchange when protected by a Session-Id AVP.

      *  In termination phase:

         +  PANA-PAA-Discover.

         +  All requests but PANA-Termination-Request.

   o MAC AVP prevents man-in-the-middle
   attacks.  The PANA-Bind-Request message payload contains MAY also contain a valid set of AVPs allowed for the
      message type and there is no missing
   Protection-Capability AVP that needs to indicate if link-layer or network-layer
   ciphering should be initiated after PANA.  No link layer or network
   layer specific information is included in the payload.

   o  Each AVP is decoded correctly.

   o Protection-Capability
   AVP.  When a MAC AVP is included, the AVP value matches information is preconfigured on the MAC value
      computed against PaC and the received message.

   o  When a Device-Id PAA
   this AVP can be omitted.  It is included, the AVP assumed that at least PAA is valid if aware of
   the device
      identifier type contained in security capabilities of the AVP is supported (this check is
      for both PaC and PAA) and is access network.  The PANA protocol
   does not specify how the requested one (this check is for
      PAA only) PANA SA and the device identifier value contained in Protection-Capability AVP
   will be used to provide per-packet protection for data traffic.

   Additionally, PANA-Bind-Request MUST include a
   Post-PANA-Address-Configuration AVP, which helps PAA to inform PaC
   about whether a new IP address MUST be configured and the available
   methods to do so.  PaC MUST include a PPAC AVP
      matches in order to indicate
   its choice of method when there is a match between the value extracted from methods
   offered by the lower-layer encapsulation
      header corresponding to PAA and the device identifier type contained in methods available on the AVP.  Note that PaC.  When there
   is no match, a Device-Id PPAC AVP carries MUST NOT be included and the PaC's device
      identifier in messages from PaC Result-Code AVP
   MUST be set to PAA and PAA's device identifier PANA_PPAC_CAPABILITY_UNSUPPORTED in messages from PAA to PaC.

   Invalid the
   PANA-Bind-Answer message.

   PANA-Bind-Request and PANA-Bind-Answer messages MUST be discarded retransmitted
   based on the retransmission rule described in order to provide robustness
   against DoS attacks.  In addition, Section 5.3.

   EAP authentication can fail at a non-acknowledged error
   notification pass-through authenticator without
   sending an EAP-Failure message [I-D.ietf-eap-statemachine].  When
   this occurs, the PAA SHOULD send a PANA-Error-Request message MAY be returned to the sender.  See Section
   4.1.8 for details.

4.1.8  Error Handling

   PANA-Error
   PaC with using PANA_UNABLE_TO_COMPLY result code.  The PaC SHOULD not
   change its state unless the error message MAY be sent is secured by either PaC PANA or PAA when lower
   layer.  In any case, a badly
   formed PANA message more appropriate way is received or in case of other errors.  If to rely on a timeout
   on the
   cause of this error message was PaC.

   There is a request case where EAP authentication succeeds with producing an
   EAP-Success message (e.g.,
   PANA-PAA-Discover but network access authorization fails due to,
   e.g., authorization rejected by a AAA proxy or *-Request), then the request MAY be
   retransmitted immediately without waiting for its retransmission
   timer to go off.  If authorization locally
   rejected by the cause of PAA.  When this occurs, the error was PAA MUST send
   PANA-Bind-Request with a response message,
   the receiver of the PANA-Error message SHOULD NOT resend result code PANA_AUTHORIZATION_REJECTED.  If
   a AAA-Key is established between PaC and PAA by the same
   response until it receives time when the next request.

   To defend against DoS attacks a timer MAY be used.  One (1) error
   notification
   EAP-Success is sent to each different sender each N seconds.  N generated by the EAP server (this is a
   configurable parameter.

   When an error the case when the
   EAP method provides protected success indication), this PANA-Bind
   message is sent unprotected exchange MUST be protected with a MAC AVP and the
   lower-layer is insecure, the error message is treated as an
   informational message. with carrying a
   Key-Id AVP.  The receiver of such an error message MUST
   NOT change its state unless the error persists AAA-Key and the PANA session
   is not making any progress.

4.2  Discovery and Initial Handshake MUST be deleted after
   the PANA-Bind message exchange.

4.3  Authorization Phase

   When

   Once an authentication phase or a re-authentication phase
   successfully completes, the PaC attaches gains access to a network, the network and knows that it has to discover a
   PAA, it SHOULD can
   send a PANA-PAA-Discover message to a well-known link
   local multicast address (TBD) and UDP port (TBD).  The PANA PAA
   discovery assumes that PaC receive IP data traffic through EP and PAA are one hop away from each other.
   If the PaC knows PANA session
   enters an authorization phase.  In this phase, PANA-Ping-Request and
   PANA-Ping-Answer messages are used for testing the IP address liveness of the PAA (based
   PANA session on
   pre-configuration), it MAY unicast the PANA discovery message to that
   address.  The PAA SHOULD respond to peer.  Both the PANA-PAA-Discover message
   with a PANA-Start-Request message.

   When PaC and the PAA receives such are allowed
   to send a request, or upon receiving some lower
   layer indications PANA-Ping-Request message to the communicating peer
   whenever they need to make sure the availability of a new PaC, the PAA SHOULD unicast session on
   the peer and expect the peer to return a
   PANA-Start-Request PANA-Ping-Answer message.

   There can
   Both PANA-Ping-Request and PANA-Ping-Answer messages MUST be multiple PAAs on
   protected with a MAC AVP when a PANA SA is available.

   Implementations MUST limit the link. rate of performing this test.  The authentication PaC
   and
   authorization result does not depend on which the PAA can handle rate limitation on their own, they do not have
   to perform any coordination with each other.  There is chosen no negotiation
   of timers for this purpose.

   Figure 5 and Figure 6 show liveness tests as they are initiated by
   the
   PaC.  By default the PaC MAY choose and the PAA that sent the first
   response.

   The respectively.

      PaC MAY also choose to start sending packets before getting
   authenticated.  In that case, the network may detect this and the      PAA
   MAY send an unsolicited PANA-Start-Request message to the     Message(seqno)[AVPs]
      ------------------------------------------------------
         ----->        PANA-Ping-Request(q)[Session-Id, MAC]
         <-----        PANA-Ping-Answer(q)[Session-Id, MAC]

       Figure 5: Example Sequence for PaC-initiated liveness test

      PaC      PAA     Message(seqno)[AVPs]
      ------------------------------------------------------
         <-----        PANA-Ping-Request(p)[Session-Id, MAC]
         ----->        PANA-Ping-Answer(p)[Session-Id, MAC]

       Figure 6: Example Sequence for PAA-initiated liveness test

4.4  Re-authentication Phase

   A PANA session in
   addition an authorization phase can enter a
   re-authentication phase to filtering extend the unauthorized traffic.  The EP is the node
   that can detect such activity.  The PAA-to-EP protocol MAY be used
   for this purpose.

   A PANA-Start-Request message MAY carry a Cookie AVP that contains a
   cookie.  The rseq field of current session lifetime by
   re-executing EAP.  Once the header is set to zero (0).  The tseq
   field of re-authentication phase successfully
   completes, the header contains session re-enters the initial sequence number.  The cookie
   is used for preventing authorization phase.  Otherwise,
   the PAA from resource consumption DoS attacks
   by blind attackers.  The cookie session is computed in such deleted.

   When a way that it
   does not require any per-session state maintenance on the PAA in
   order PaC wants to verify the cookie returned in a PANA-Start-Answer message.
   The exact algorithms and syntax used for generating cookies does not
   affect interoperability and hence is not specified here.  An example
   algorithm is described below.

      Cookie =
        <secret-version> | HMAC_SHA1( <Device-Id of PaC> , <secret> )

   where <secret> is initiate re-authentication, it sends a randomly generated secret known only
   PANA-Reauth-Request message to the PAA,
   <secret-version> PAA.  This message MUST contain a
   Session-Id AVP which is an index used for choosing identifying the secret for
   generating PANA session on the cookie and '|' indicates concatenation.  The
   secret-version should be changed frequently enough to prevent replay
   attacks.  The secret key is valid for a certain time frame.

   When
   PAA.  If the PAA receives the PANA-Start-Answer message from the PaC, it
   verifies the cookie.  The cookie is considered as valid if the
   received cookie already has an established PANA session for the expected value.  If the computed cookie is
   valid, the protocol enters PaC
   with the authentication phase.  Otherwise, matching identifier, it MUST silently discard the received message.

   Initial EAP Request MAY be optionally carried first respond with a
   PANA-Reauth-Answer, followed by a PANA-Auth-Request that starts a new
   EAP authentication.  If PAA cannot identify the
   PANA-Start-Request (as opposed to by session, it MUST
   respond with a later PANA-Auth-Request)
   message in order to reduce PANA-Error-Request with the number of round-trips. error code
   PANA_UNKNOWN_SESSION_ID.  PANA-Reauth-Request/Answer messages MUST
   contain a MAC AVP when PANA SA is available.

   PaC may receive a PANA-Auth-Request before receiving the answer to
   its outstanding PANA-Reauth-Request.  This
   optimization SHOULD NOT be used if condition can arise due to
   packet re-ordering or a race condition between the PaC and PAA discovery is desired when
   they both attempt to be
   stateless.

   Protection-Capability and Post-PANA-Address-Configuration AVPs MAY be
   optionally included engage in re-authentication.  PaC MUST keep
   discarding the PANA-Start-Request in order received PANA-Auth-Requests until it receives the
   answer to indicate
   required and available capabilities for its request.

   When the network access.  These
   AVPs MAY be used by PAA initiates re-authentication, it sends a
   PANA-Auth-Request message containing the PaC session identifier for assessing the capability match even
   PaC to enter an authentication phase.  PAA SHOULD initiate EAP
   authentication before the authentication takes place.  But these AVPs are provided
   during current session lifetime expires.

   Re-authentication of an on-going PANA session MUST maintain the insecure discovery phase,
   existing sequence numbers.

   For any re-authentication, if there are certain security risks
   involved in using the provided information.  See Section 9 for
   further discussion on this.

   If the initial EAP Request message is carried in the
   PANA-Start-Request message, an EAP Response message established PANA SA,
   PANA-Auth-Request and PANA-Auth-Answer messages MUST be carried
   in the PANA-Start-Answer message returned protected by
   adding a MAC AVP to the PAA.

   In any case, PANA each message.  Any subsequent EAP-based
   authentication MUST NOT generate an EAP message on behalf of EAP
   peer or EAP (pass-through) authenticator.

   The PANA-Start-Request/Answer exchange is needed before entering
   authentication phase even when the PaC is pre-configured be performed with PAAs IP
   address and the PANA-PAA-Discover message is unicast.

   A Nonce AVP MUST be included in PANA-Start-Request same ISP and
   PANA-Start-Answer messages.

   A PANA-Start-Request message that carries a Cookie AVP is never
   retransmitted.  A PANA-Start-Request message that does not carry a
   Cookie AVP is retransmitted based on timer.  A PANA-Start-Answer
   message NAP that carries was
   selected during the initial authentication.  An example sequence for
   a Cookie AVP is retransmitted based on timer.  A
   PANA-Start-Answer message that does not carry re-authentication initiated by a Cookie AVP is never
   retransmitted based on timer.

   It PaC is possible that both shown in Figure 7.

      PaC      PAA and  Message(seqno)[AVPs]
      ------------------------------------------------------
         ----->     PANA-Reauth-Request(q)
                       [Session-Id, MAC]
         <-----     PANA-Reauth-Answer(q)
                       [Session-Id, MAC]
         <-----     PANA-Auth-Request(p)
                       [Session-Id, EAP{Request}, MAC]
         ----->     PANA-Auth-Answer(p)        // No piggybacking EAP-Response
                       [Session-Id, MAC]
         ----->     PANA-Auth-Request(q+1)
                       [Session-Id, EAP{Response}, MAC]
         <-----     PANA-Auth-Answer(q+1)      // No piggybacking EAP-Response
                       [Session-Id, MAC]
         <-----     PANA-Auth-Request(p+1)
                       [Session-Id, EAP{Request}, MAC]
         ----->     PANA-Auth-Answer(p+1)      // Piggybacking EAP-Response
                       [Session-Id, EAP{Response}, MAC]
         <-----     PANA-Bind-Request(p+2)
                       [Session-Id, EAP{Success}, Device-Id,
                        IP-Address, Key-Id, Lifetime,
                        Protection-Cap., PPAC, MAC]
         ----->     PANA-Bind-Answer(p+2)
                       [Session-Id, Device-Id, Key-Id, PPAC, MAC]

   Figure 7: Example Sequence for re-authentication initiated by PaC initiate the discovery and
   initial handshake

4.5  Termination Phase

   A procedure at the same time, i.e., the PAA sends for explicitly terminating a
   PANA-Start-Request message while PANA session can be
   initiated either from the PaC sends a PANA-PAA-Discover
   message.  To resolve the race condition, (i.e., disconnect indication) or from
   the PAA SHOULD silently
   discard (i.e., session revocation).  The PANA-Termination-Request and
   the PANA-PAA-Discover PANA-Termination-Answer message received from exchanges are used for disconnect
   indication and session revocation procedures.

   The reason for termination is indicated in the PaC after it
   has sent a PANA-Start-Request message with creating a state (i.e., no
   Cookie AVP included) for Termination-Cause AVP.
   When there is an established PANA SA established between the PaC.  In this case PAA will retransmit
   PANA-Start-Request based on a timer, if PaC doesn't respond in time
   (message was lost for example).  If PAA had sent stateless
   PANA-Start-Request message (i.e., a Cookie AVP was included), then it
   SHOULD answer to and
   the PANA-PAA-Discover message.

   Figure 3 shows an example sequence for PAA, all messages exchanged during the discovery and initial
   handshake termination phase when MUST be
   protected with a PANA-PAA-Discover message is sent by MAC AVP.  When the sender of the
   PANA-Termination-Request receives a PaC.
   Figure 4 shows an example sequence valid acknowledgment, all states
   maintained for the discovery and initial
   handshake phase that is triggered by data traffic. PANA session MUST be deleted immediately.

      PaC      PAA         Message(tseq,rseq)[AVPs]     Message(seqno)[AVPs]
      ------------------------------------------------------
         ----->            PANA-PAA-Discover(0,0)        PANA-Termination-Request(q)[Session-Id, MAC]
         <-----            PANA-Start-Request(x,0)[Nonce, Cookie]
         ----->            PANA-Start-Answer(y,x)[Nonce, Cookie]
                           (continued to authentication phase)

 Figure 3: Example Sequence for Discovery and Initial Handshake Phase
                 when PANA-PAA-Discover is sent by PaC

      PaC   EP      PAA    Message(tseq,rseq)[AVPs]
      ------------------------------------------------------
       ---->o              (Data packet arrival or L2 trigger)
             ------>       PAA-to-EP protocol, or another mechanism
       <------------       PANA-Start-Request(x,0)[Nonce, Cookie]
       ------------>       PANA-Start-Answer(y,x)[Nonce, Cookie]
                           (continued to authentication phase)        PANA-Termination-Answer(q)[Session-Id, MAC]

           Figure 4: 8: Example Sequence for Discovery and Initial Handshake when
                 discovery is triggered by data traffic

4.2.1  Discovery and Initial Handshake with NAP-ISP Authentication
      Separation

   In the discovery Session Termination

5.  Protocol Design Details and initial handshake phase, a PAA MAY enable
   NAP-ISP authentication separation ([I-D.ietf-pana-framework]) by
   setting the S-flag Processing Rules

5.1  Payload Encoding

   The payload of the any PANA message header consists of the PANA-Start-Request.
   Also, the PANA-Start-Request MAY contain zero or one NAP-Information
   AVP and zero or more ISP-Information AVPs to advertise the
   information on the NAP and/or ISPs.

   When a PaC receives
   (Attribute Value Pairs).  A brief description of the PANA-Start-Request message AVPs defined in response to the
   PANA-PAA-Discover message, it responds with
   this document is listed below:

   o  Cookie AVP: contains a PANA-Start-Answer
   message if it wishes to enter the authentication phase.  The
   PANA-Start-Answer message random value that is used for making
      handshake robust against blind resource consumption DoS attacks.

   o  Protection-Capability AVP: contains the initial sequence numbers in
   the tseq and rseq fields of information which protection
      should be initiated after the PANA header, exchange (e.g., link-layer or
      network layer protection).

   o  Device-Id AVP: contains a copy device identifier of the received
   Cookie (if any) PaC or an EP.
      A device identifier is represented as the PANA payload.

   If the S-flag a pair of the received PANA-Start-Request message device identifier
      type and device identifier value.  Either a layer-2 address or an
      IP address is not set,
   PaC MUST NOT set the S-flag in the PANA-Start-Answer message sent
   back to used for the PAA.  In device identifier value when this case, PaC MAY indicate its choice of ISP by
   including an ISP-Information AVP in the PANA-Start-Answer message.
   When a AAA backend
      is used, present.

   o  EAP AVP: contains an EAP PDU.

   o  MAC AVP: contains a Message Authentication Code that protects a
      PANA message PDU.

   o  Termination-Cause AVP: contains the identity reason of session termination.

   o  Result-Code AVP: contains information about the destination AAA
   server or realm MUST be determined based on protocol execution
      results.

   o  Session-Id AVP: contains the explicitly chosen
   ISP.  When session identifier value.

   o  Session-Lifetime AVP: contains the ISP-Information AVP is not present, duration of authorized access.

   o  Failed-AVP: contains the access network
   MAY rely offending AVP that caused a failure.

   o  NAP-Information AVP, ISP-Information AVP: contains the information
      on a NAP and an ISP, respectively.

   o  Key-Id AVP: contains a AAA-Key identifier.

   o  PPAC AVP: Post-PANA-Address-Configuration AVP.  Conveys the client identifier carried in list
      of IP address configuration methods available when sent by the EAP authentication
      PAA, and the chosen method to make this determination.

   If when sent by the S-flag PaC.

   o  Nonce AVP: contains a randomly chosen value.

   o  IP-Address AVP: contains an IP Address of the received PANA-Start-Request message is set, PaC
   can indicate a PaC.

5.2  Transport Layer

   PANA uses UDP as its desire to perform separate EAP authentication transport layer protocol.  The UDP port number
   is TBD.  All messages except for
   NAP and ISP by setting the S-flag in PANA-PAA-Discover are always
   unicast.  PANA-PAA-Discover MAY be unicast when the PANA-Start-Answer message.
   If PaC knows the S-flag in IP
   address of the PANA-Start-Answer message is PAA.

5.2.1  Fragmentation

   PANA does not set, only provide fragmentation of PANA messages.  Instead, it
   relies on fragmentation provided by EAP methods and IP layer when
   needed.

5.3  Sequence Number and Retransmission

   PANA uses sequence numbers to provide ordered and reliable delivery
   of messages.

   PaC and PAA maintain two sequence numbers: the next one
   authentication is performed to be used
   for a request it initiates and the processing occurs as described next one it expects to see in
   Section 4.2.  If a
   request from the S-flag in other end.  These sequence numbers are 32-bit
   unsigned numbers.  They are monotonically incremented by 1 as new
   requests are generated and received, and wrapped to zero on the PANA-Start-Answer next
   message is set,
   the determination of after 2^32-1.  Answers always contain the destination AAA server or realm for ISP
   authentication is performed same sequence
   number as described earlier.  In addition, where
   backend AAA servers are used for NAP authentication, the NAP is
   considered the ultimate AAA realm, and the destination AAA server for
   this authentication is determined entirely by the local configuration
   on corresponding request.  Retransmissions maintain the access server hosting PAA (NAS).
   same sequence number.

   The initial sequence numbers (ISN) are randomly picked by PaC can choose an ISP and contain an ISP-Information AVP for the
   chosen ISP in a PANA-Start-Answer PAA
   as they send their very first request messages.  PANA-PAA-Discover
   message even when there is no
   ISP-Information AVP contained in the PANA-Start-Request message. carries sequence number 0.

   When the S-flag is set in a PANA-Start-Request message, the initial
   EAP Request MUST NOT be carried in the PANA-Start-Request message.
   (If the initial EAP Request were contained in the PANA-Start-Request request message during the S-flag negotiation, the PaC cannot tell whether
   the EAP Request is for NAP authentication or ISP authentication.)

4.3  Authentication Phase

   The main task in authentication phase received, it is to carry EAP messages
   between PaC and PAA.  EAP Request messages are carried considered valid in
   PANA-Auth-Request messages terms
   of sequence numbers if and optionally carried in
   PANA-Start-Request messages.  EAP Response messages are carried in
   PANA-Auth-Answer messages only if its sequence number matches the
   expected value.  This check does not apply to PANA-PAA-Discover, and optionally carried in PANA-Start-Answer
   the very first request messages.

   When an EAP Success/Failure answer message is sent from a PAA,
   the message received, it is carried considered valid in a PANA-Bind-Request (PBR) or
   PANA-FirstAuth-End-Request (PFER) message.  The
   PANA-FirstAuth-End-Reques message MUST be used at the end terms
   of the
   first EAP when the PaC sequence numbers if and PAA have negotiated during only if its sequence number matches that
   of the discovery
   and initial handshake phase to perform separate NAP and ISP
   authentications in currently outstanding request.  A peer can only have one
   outstanding request at a single time.

   PANA authentication phase.  Otherwise, messages are retransmitted based on timer at until a response is
   received (in which case the PANA-Bind-Request message retransmission timer is stopped) or the
   number of retransmission reaches the maximum value (in which case the
   PANA session MUST be used. deleted immediately).  The PANA-Bind-Request
   and PANA-FirstAuth-End-Request messages MUST retransmission timer
   SHOULD be acknowledged with a
   PANA-Bind-Answer (PBA) and a PANA-FirstAuth-End-Answer (PFEA)
   messages, respectively.  Figure 5 shows an example sequence calculated as described in [RFC2988] to provide congestion
   control.  See Section 9 for the
   authentication phase without separating NAP and ISP authentications.

      PaC      PAA  Message(tseq,rseq)[AVPs]
      -------------------------------------------------
                    (continued from discovery default timer and initial handshake phase)
         <-----     PANA-Auth-Request(x+1,y)[Session-Id, EAP{Request}]
         ----->     PANA-Auth-Answer(y+1,x+1)[Session-Id, EAP{Response}]
           .
           .
         <-----     PANA-Auth-Request (x+2,y+1)[Session-Id, EAP{Request}]
         ----->     PANA-Auth-Answer (y+2,x+2)[Session-Id, EAP{Response}]
         <-----     PANA-Bind-Request(x+3,y+2)
                       [Session-Id, EAP{Success}, Device-Id, Lifetime,
                        Protection-Cap., PPAC, MAC]
         ----->     PANA-Bind-Answer(y+3,x+3)
                       [Session-Id, Device-Id, PPAC, MAC]

           Figure 5: Example Sequence in Authentication Phase

   When the maximum retransmission
   count parameters.

   PaC and PAA have negotiated during the discovery and initial
   handshake phase MUST respond to perform separate NAP duplicate requests.  Last transmitted
   PANA answer MAY be cached in case it is not received by the peer and ISP authentications,
   that generates a retransmission of the
   S-flag last request.  When available,
   a cached answer can be used instead of PANA-Auth-Request fully processing the
   retransmitted request and PANA-Auth-Answer messages forming a new answer from scratch.

   PANA MUST be
   set.  Otherwise, the S-flag NOT generate EAP message duplication.  EAP payload of a
   retransmitted PANA message MUST NOT be set.

   When separate NAP and ISP authentications are performed, passed to the PAA
   determines EAP layer.

5.4  Message Authentication Code

   A PANA message can contain a MAC (Message Authentication Code) AVP
   for cryptographically protecting the execution order message.

   When a MAC AVP is included in a PANA message, the value field of NAP authentication and ISP
   authentication.  In this case, the PAA can indicate which EAP
   authentication
   MAC AVP is currently occurring calculated by using N-flag the PANA_MAC_KEY in the PANA
   message header.  When NAP authentication following way:

      MAC AVP value = PANA_MAC_PRF(PANA_MAC_KEY, PANA_PDU)

   where PANA_PDU is performed, the N-flag
   MUST be set.  When ISP authentication is performed, PANA message including the N-flag MUST
   NOT be set.  The N-flag MUST NOT be set when S-flag is not set.

   When separate NAP and ISP authentications are performed, if PANA header, with
   the MAC AVP value field first
   EAP authentication has failed, the PAA can choose not initialized to perform 0.  PANA_MAC_PRF
   represents the
   second EAP authentication by clearing pseudo random function corresponding to the S-flag of MAC
   algorithm specified in the
   PANA-FirstAuth-End-Request message. MAC AVP.  In this case, the S-flag version of the
   PANA-FirstAuth-End-Answer message sent by the draft,
   PANA_MAC_PRF is HMAC-SHA1.  The PaC and PAA MUST be cleared.
   If the S-flag of use the PANA-FirstAuth-End-Request message same
   algorithm to calculate a MAC AVP they originate and receive.  The
   algorithm is set when determined by the first EAP authentication has failed, PAA when a PANA-Bind-Request with a
   MAC AVP is sent.  When the PaC can choose does not to
   perform support the second EAP authentication by clearing MAC algorithm
   specified in the S-flag of PANA-Bind-Request message, it MUST silently discard
   the
   PANA-FirstAuth-End-Answer message.  If  The PAA MUST NOT change the first EAP authentication
   failed and MAC algorithm throughout
   the S-flag continuation of the PANA session.

5.5  Message Validity Check

   When a PANA message is received, the message is considered to be
   invalid at least when one of the following conditions are not set met:

   o  The IP Hop Limit (or TTL) field has a value of 255, i.e., the
      packet could not possibly have been forwarded by a router.

   o  Each field in the PANA-FirstAuth-End-Answer message as header contains a result valid value including
      sequence number, message length, message type, version number,
      flags, etc.

   o  When a device identifier of those operations, the PaC is bound to the PANA session MUST be
   immediately deleted.  Otherwise, session,
      it matches the second EAP authentication MUST
   be performed.

   Currently, use of multiple EAP methods device identifier carried in PANA is designed only for
   NAP-ISP authentication separation.  It is not for arbitrary EAP
   method sequencing, MAC or giving the PaC another chance when an
   authentication method fails.  The NAP and ISP authentication are
   considered completely independent.  Presence or success of one should
   not effect IP header,
      or other locally-significant identifier provided by the other.  Making a network access authorization decision
   based on
      lower-layers (e.g., circuit ID) unless the success or failure of each authentication message is a network
   policy issue.

   When
      PANA-Update-Request with an EAP method that IP-Address AVP.

   o  The message type is capable one of deriving keys is used during the authentication phase and expected types in the keys are successfully derived, current
      state.  Specifically the
   PANA-FirstAuth-End-Request and PANA-FirstAuth-End-Answer and/or
   PANA-Bind-Request and PANA-Bind-Answer messages, and all subsequent
   PANA following messages MUST contain a MAC AVP.

   When separate NAP and ISP authentications are performed unexpected and the
   lower-layer is insecure, the two EAP methods MUST be capable of
   deriving keys.
      invalid:

      *  In this case, if the first EAP authentication is
   successful, the PANA-FirstAuth-End-Request discovery and
   PANA-FirstAuth-End-Answer messages as well as PANA-Auth-Request handshake phase:

         +  PANA-Termination-Request and
   PANA-Auth-Answer messages in the second EAP PANA-Ping-Request.

         +  PANA-Bind-Request.

         +  PANA-Update-Request.

      *  In authentication MUST be
   protected with phase:

         +  PANA-PAA-Discover.

         +  PANA-Update-Request.

         +  PANA-Start-Request after a PaC receives the key derived from first valid
            PANA-Auth-Request.

         +  PANA-Termination-Request before the AAA-Key for PaC receives the first EAP
   authentication.
            successful PANA-Bind-Request.

      *  After successful PANA authentication:

         +  PANA-Start-Request as well as a non-duplicate
            PANA-Bind-Request.

         +  PANA-PAA-Discover.

      *  In termination phase:

         +  PANA-PAA-Discover.

         +  All requests but PANA-Termination-Request.

   o  The PANA-Bind-Request and PANA-Bind-Answer messages message payload contains a valid set of AVPs allowed for the
      message type and all subsequent PANA messages MUST there is no missing AVP that needs to be protected either with the
   AAA-Key for included
      in the first EAP authentication if payload.

   o  Each AVP is decoded correctly.

   o  When a MAC AVP is included, the first EAP
   authentication succeeds and AVP value matches the second EAP authentication fails, or
   with MAC value
      computed against the AAA-Key for received message.

   o  When a Device-Id AVP is included, the second EAP authentication AVP is valid if the first EAP
   authentication fails and the second EAP authentication succeeds, or
   with device
      identifier type contained in the compound AAA-Key derived from AVP is supported (check performed
      by both PaC and PAA) and is the two AAA-Keys, requested one for the
   first EAP authentication (check performed by
      PAA only) and the other from device identifier value contained in the second EAP
   authentication, if both AVP
      matches the first and second EAP authentications
   succeed.

   The PANA-Bind-Request and the PANA-Bind-Answer message exchange is
   also used for binding device identifiers of the PaC and value extracted from the PAA lower-layer encapsulation
      header corresponding to the PANA SA when the identifiers are either IP or MAC addresses.  To
   achieve this, the PANA-Bind-Request and the PANA-Bind-Answer SHOULD
   contain a device identifier of type contained in
      the AVP (check performed by PAA and the PaC, respectively, in
   a Device-Id AVP.  Device identifier exchange only).  Note that is protected by a
   MAC Device-Id AVP prevents man-in-the-middle attacks.  The PaC MUST use
      carries the
   same type of PaC's device identifier as contained in the PANA-Bind-Request
   message.  The PANA-Bind-Request message MAY also contain a
   Protection-Capability AVP messages from PaC to indicate if link-layer or network-layer
   ciphering should be initiated after PANA.  No link layer or network
   layer specific information is included PAA
      and EP(s)' device identifier in the Protection-Capability
   AVP. messages from PAA to PaC.

   o  When the information an IP-Address AVP is preconfigured on the PaC and received in a message, the PAA
   this AVP can be omitted.  It is assumed that at least PAA is aware of
   the security capabilities of valid
      if the access network.  The PANA protocol
   does not specify how IP address matches the PANA SA and source address in the Protection-Capability AVP
   will be used to provide per-packet protection for data traffic.

   Additionally, PANA-Bind-Request MUST include a
   Post-PANA-Address-Configuration AVP, which helps PAA to inform PaC
   about whether a new IP address header.

   Invalid messages MUST be configured and the available
   methods to do so.  PaC MUST include a PPAC AVP discarded in order to indicate
   its choice of method when there is a match between the methods
   offered by the PAA and the methods available on the PaC.  When there
   is no match, a PPAC AVP MUST NOT be included and the Result-Code AVP
   MUST be set to PANA_PPAC_CAPABILITY_UNSUPPORTED in the
   PANA-Bind-Answer message.

   PANA-Bind-Request and PANA-Bind-Answer messages MUST be retransmitted
   based on the retransmission rule described in Section 4.1.4.

   EAP authentication can fail at a pass-through authenticator without
   sending provide robustness
   against DoS attacks.  In addition, an EAP-Failure message [I-D.ietf-eap-statemachine].  When
   this occurs, the PAA SHOULD send a PANA-Error error notification message MAY
   be returned to the PaC with
   using PANA_UNABLE_TO_COMPLY result code.  The PaC SHOULD ignore the
   message unless it is secured by sender.  See Section 5.7 for details.

5.6  PANA or lower layer.  In any case, a
   more appropriate way is to rely on a timeout on the PaC.

   There Security Association

   A PANA SA is created as an attribute of a case where PANA session when EAP
   authentication succeeds with producing an
   EAP-Success message but network access authorization fails due to,
   e.g., authorization rejected by a AAA proxy or authorization locally
   rejected by a PAA.  When this occurs, the PAA MUST send
   PANA-Bind-Request with a result code PANA_AUTHORIZATION_REJECTED.  If creation of a AAA-Key AAA-Key.  A PANA SA is established between PaC and PAA by the time
   not created when the
   EAP-Success PANA authentication fails or no AAA-Key is generated
   produced by the any EAP server (this is authentication method.  In the case when the where two EAP method provides protected success indication), the this PANA-Bind
   message exchange MUST be protected with a MAC AVP and with carrying
   authentications are performed in sequence in a
   Key-Id AVP.  The AAA-Key and single PANA
   authentication phase, it is possible that two AAA-Keys are derived.
   If this happens, the PANA session SA MUST be deleted after
   the PANA-Bind message exchange.

4.4  Re-authentication

   There are two types of re-authentication supported by PANA.

   The first type of re-authentication is based on EAP by entering an
   authentication phase.  In this case, some or all message exchanges
   for discovery and initial handshake phase MAY be omitted in the
   following way. generated from both AAA-Keys.
   When a PaC wants to initiate new AAA-Key is derived as a result of EAP-based
   re-authentication, it sends any key derived from the old AAA-Key MUST be
   updated to a unicast PANA-PAA-Discovery message new one that is derived from the new AAA-Key.  In order
   to distinguish the PAA.  This message new AAA-Key from old ones, one Key-Id AVP MUST contain be
   carried in PANA-Bind-Request and PANA-Bind-Answer messages or
   PANA-FirstAuth-End-Request and PANA-FirstAuth-End-Answer messages at
   the end of the EAP authentication which resulted in deriving a Session-Id new
   AAA-Key.  The Key-Id AVP which is used
   for identifying the PANA session on of type Unsigned32 and MUST contain a
   value that uniquely identifies the PAA.  If AAA-Key within the PAA already has
   an established PANA session for the PaC with session.
   The PANA-Bind-Answer message (or the matching identifier,
   it sends PANA-FirstAuth-End-Answer
   message) sent in response to a PANA-Auth-Request PANA-Bind-Request message containing (or a
   PANA-FirstAuth-End-Request message) with a Key-Id AVP MUST contain a
   Key-Id AVP with the same AAA-Key identifier
   to start an authentication phase.  If the PAA can not recognize carried in the
   session identifier, it proceeds request.
   PANA-Bind-Request, PANA-Bind-Answer, PANA-FirstAuth-End-Request and
   PANA-FirstAuth-End-Answer messages with regular authentication by
   sending back PANA-Start-Request.  When the PAA initiates EAP-based
   re-authentication, it sends a PANA-Auth-Request message containing Key-Id AVP MUST also carry
   a MAC AVP whose value is computed by using the session identifier for new PANA-MAC-KEY
   derived from the PaC to enter an authentication phase.
   PAA SHOULD initiate EAP authentication before new AAA-Key (or the current session
   lifetime expires.  In both cases, new pair of AAA-Keys when the tseq and rseq values are
   inherited
   PANA_MAC_KEY is derived from two AAA-Keys).  Although the previous (re-)authentication.  For any EAP-based
   re-authentication, if there is an established PANA SA,
   PANA-Auth-Request and PANA-Auth-Answer messages MUST be protected by
   adding
   specification does not mandate a MAC AVP to each message.  Any subsequent EAP-based
   authentication MUST be performed with the same ISP and NAP that was
   selected during the initial authentication.  An example sequence particular method for
   the EAP-based re-authentication initiated by calculation of
   Key-Id AVP value, a PaC simple method is shown in Figure
   6.

      PaC      PAA  Message
      ------------------------------------------------------
         ----->     PANA-PAA-Discover(0,0)[Session-Id]
         <-----     PANA-Auth-Request(p,q)[Session-Id, EAP, MAC]
         ----->     PANA-Auth-Answer(q+1,p)[Session-Id, EAP, MAC]
         <-----     PANA-Auth-Request(p+1,q+1)[Session-Id, EAP, MAC]
         ----->     PANA-Auth-Answer(q+2,p+1)[Session-Id, EAP, MAC]
         <-----     PANA-Bind-Request(p+2,q+2)
                       [Session-Id, EAP{Success}, Device-Id, Key-Id,
                        Lifetime, Protection-Cap., PPAC, MAC]
         ----->     PANA-Bind-Answer(q+3,p+2)
                       [Session-Id, Device-Id, Key-Id, PPAC, MAC]

  Figure 6: Example Sequence for EAP-based re-authentication initiated
                                 by PaC to use monotonically increasing
   numbers.

   The second type of re-authentication created PANA SA is based on a single protected
   message exchange without entering deleted when the authentication phase.
   PANA-Reauth-Request and PANA-Reauth-Answer messages are used for this
   purpose.  If there is an established corresponding PANA session, both the PaC and session is
   deleted.  The lifetime of the PAA are allowed to send a PANA-Reauth-Request message to PANA SA is the
   communicating peer whenever they need to make sure same as the availability lifetime of
   the PANA session on the peer and expect the peer to return a
   PANA-Reauth-Answer message.  Both PANA-Reauth-Request and
   PANA-Reauth-Answer messages MUST be protected with a MAC AVP when a for simplicity.

   PANA SA is available.

   Implementations MUST limit the rate attributes as well as PANA session attributes are listed
   below:

   PANA Session attributes:

      *  Session-Id

      *  Device-Id of performing re-authentication
   for both types PaC

      *  IP address of re-authentication.  The PaC and (may be the PAA can handle
   rate limitation on their own, they do not have to perform any
   coordination with each other.  There is no negotiation same as the Device-Id of PaC)

      *  IP address of timers for
   this purpose.

   Figure 7 and Figure 8 show re-authentication procedures based on
   PANA-Reauth exchange initiated by a PaC and a PAA, respectively.

      PaC PAA     Message(tseq,rseq)[AVPs]
      ------------------------------------------------------
         ----->        PANA-Reauth-Request(q,p)[Session-Id, MAC]
         <-----        PANA-Reauth-Answer(p+1,q)[Session-Id, MAC]

        Figure 7: Example

      *  List of device identifiers of EPs

      *  Sequence for PaC-initiated second type
                           Re-authentication

      PaC      PAA     Message(tseq,rseq)[AVPs]
      ------------------------------------------------------
         <-----        PANA-Reauth-Request(p,q)[Session-Id, MAC]
         ----->        PANA-Reauth-Answer(q+1,p)[Session-Id, MAC]

        Figure 8: Example number of the last transmitted request

      *  Sequence for PAA-initiated second type
                           Re-authentication

4.5  Termination Phase

   A procedure for explicitly terminating a number of the last received request

      *  Last transmitted message payload

      *  Retransmission interval

      *  Session lifetime

      *  Protection-Capability

      *  PANA session can be
   initiated either from SA attributes:

         +  Nonce generated by PaC (i.e., disconnect indication) or from (PaC_nonce)

         +  Nonce generated by PAA
   (i.e., session revocation). (PAA_nonce)

         +  AAA-Key

         +  AAA-Key Identifier

         +  PANA_MAC_KEY

   The PANA-Termination-Request and the
   PANA-Termination-Answer message exchanges are PANA_MAC_KEY is used for disconnect
   indication to integrity protect PANA messages and session revocation procedures.
   derived from AAA-Key(s).  When two AAA-Keys (AAA-Key1 and AAA-Key2)
   are generated as a result of double EAP authentication (see Section
   4.2) the compound AAA-Key can be computed as follows ('|' indicates
   concatenation):

      AAA-Key = AAA-Key1 | AAA-Key2

    The reason for termination PANA_MAC_KEY is indicated computed in the Termination-Cause AVP.
   When there is an established PANA SA established between the PaC and following way:

      PANA_MAC_KEY = The first N bits of
                     HMAC_SHA1(AAA-Key, PaC_nonce | PAA_nonce | Session-ID)

   where the PAA, all messages exchanged during value of N depends on the termination phase integrity protection algorithm in
   use, i.e., N=160 for HMAC-SHA1.  The length of AAA-Key MUST be
   protected with a MAC AVP.  When N bits
   or longer.  See Section Section 5.4 for the sender detailed usage of the
   PANA-Termination-Request receives a valid acknowledgment, all states
   maintained for the PANA session MUST
   PANA_MAC_KEY.

5.7  Error Handling

   A PANA-Error-Request message MAY be deleted immediately. sent by either the PaC or the PAA     Message(tseq,rseq)[AVPs]
      ------------------------------------------------------
         ----->        PANA-Termination-Request(q,p)[Session-Id, MAC]
         <-----        PANA-Termination-Answer(p+1,q)[Session-Id, MAC]

           Figure 9: Example Sequence for Session Termination

4.6  Example Sequence for NAP and ISP Separate Authentications

   A
   when a badly formed PANA message sequence where NAP and ISP separate authentications
   occur is illustrated received or in Figure 10. case of other
   errors.  The example assumes receiver of this request MUST respond with a
   PANA-Error-Answer message.  If the following
   scenario:

   o  The PaC multicasts cause of this error message was a
   request message (e.g., PANA-PAA-Discover message.

   o  The ISNs used by or *-Request), then the PAA and
   request MAY be retransmitted immediately without waiting for its
   retransmission timer to go off.  If the PaC are x and y, respectively.

   o  The PAA offers NAP and ISP separate authentications, as well as cause of the error was a
      choice
   response message, the receiver of ISP from "ISP1" and "ISP2".  The PaC accepts the offer
      from PAA, with choosing "ISP1" as PANA-Error-Request message
   SHOULD NOT resend the ISP.

   o  An EAP sequence for NAP authentication and an EAP sequence for ISP
      authentication is performed in this order in authentication phase.

   o  An EAP authentication method with same response until it receives the next
   request.

   To defend against DoS attacks a single round trip timer MAY be used.  One (1) error
   notification is used in sent to each EAP sequence.

   o  Two AAA-Keys are derived from the EAP authentication methods,
      i.e., AAA-Key1 and AAA-Key2.  The PANA_MAC_KEY different sender each N seconds.  N is first derived
      from a
   configurable parameter.

   When an error message is sent unprotected with a MAC AVP and the AAA-Key1 upon
   lower-layer is insecure, the completion error message is treated as an
   informational message.  The receiver of such an error message MUST
   NOT change its state unless the first EAP, error persists and then
      it is updated so that it the PANA session
   is derived from both AAA-Key1 and
      AAA-Key2 upon not making any progress.

5.8  Device ID Choice

   The device identifier used in the completion context of the second EAP.

   o  After a PANA SA can be an IP
   address, a MAC address, or an identifier that is established, all messages not carried in data
   packets but has local significance in identifying a connected host
   (e.g., circuit id, PPP interface id).  The last type of identifiers
   are integrity and
      replay protected with commonly used in point-to-point links where MAC AVPs.

   o  Re-authentication based on the PANA-Reauth exchange is performed.

   o  Re-authentication and termination phase addresses are not shown.

   o  Session-Id AVP
   available and lower-layers are already physically or
   cryptographically secured.

   It is not shown.

      PaC assumed that the PAA  Message(tseq,rseq)[AVPs]
      -----------------------------------------------------
      // Discovery knows the link type and initial handshake phase
         ----->     PANA-PAA-Discover(0,0)
         <-----     PANA-Start-Request(x,0)                 // S-flag set
                    [Nonce, Cookie, ISP-Information("ISP1"),
                     ISP-Information("ISP2"),
                     NAP-Information("MyNAP")]
         ----->     PANA-Start-Request-Answer(y,x)       // S-flag set
                    [Nonce, Cookie, ISP-Information("ISP1")]// PaC chooses "ISP1"

      // Authentication phase
         <-----     PANA-Auth-Request(x+1,y)[EAP]       // NAP authentication
                                                           // S- and N-flags set
         ----->     PANA-Auth-Answer(y+1,x+1)[EAP]      // S- and N-flags set
         <-----     PANA-Auth-Request(x+2,y+1)[EAP]     // S- and N-flags set
         ----->     PANA-Auth-Answer(y+2,x+2)[EAP]      // S- and N-flags set
         <-----     PANA-FirstAuth-End-Request(x+3,y+2) // S- and N-flags set
                      [EAP{Success}, Key-Id, MAC]
         ----->     PANA-FirstAuth-End-Answer(y+3,x+3)  // S- and N-flags set
                      [Key-Id, MAC]
         <-----     PANA-Auth-Request(x+3,y+4)[EAP, MAC]// ISP authentication
                                                           // S-flag set
         ----->     PANA-Auth-Answer(y+4,x+4)[EAP, MAC] // S-flag set
         <-----     PANA-Auth-Request(x+4,y+5)[EAP, MAC]// S-flag set
         ----->     PANA-Auth-Answer(y+5,x+5)[EAP, MAC] // S-flag set
         <-----     PANA-Bind-Request(x+5,y+6)          // S-flag set
                      [EAP{Success}, Device-Id, Key-Id,
                       Lifetime, Protection-Cap., PPAC, MAC]
         ----->     PANA-Bind-Answer(y+6,x+5)           // S-flag set
                      [Device-Id, Key-Id, PPAC, MAC]

    Figure 10: A Complete Message Sequence for NAP and ISP Separate
                            Authentications

4.7  Responding to Duplicate Requests

   Since the security
   mechanisms being provided or required on the access network (e.g.,
   based on physical security, link-layer ciphers enabled before or
   after PANA, or IPsec).  Based on that information, the PAA can decide
   what type of EP device id will be used when running PANA with the
   client.  When IPsec-based security [I-D.ietf-pana-ipsec] is designed over UDP, an answer the
   choice of access control, the PAA SHOULD provide IP address(es) as well
   EP(s)' device ID, and expect the PaC to provide its IP address in
   return.  In case IPsec is not used, MAC addresses are used as device
   IDs when available.  If non-IPsec access control is enabled, and a request can
   be lost.  In order
   MAC address is not available, device ID exchange does not occur
   within PANA.  Instead, peers rely on lower-layers to provide robustness against possible loss of
   synchronization between
   locally-significant identifiers along with received PANA packets.

5.9  Updating PaC' Address

   A PaC's IP address can change in certain situations.  For example,
   the PANA framework [I-D.ietf-pana-framework] describes a case in
   which a PaC and replaces a PAA, the responder MAY send a
   duplicate answer to pre-PANA address (PRPA) with a request that it had just answered.  The only
   difference between two consecutive duplicate requests are post-PANA
   address (POPA), and the
   sequence numbers PaC and PAA create host routes to each other
   in order to maintain on-link communication based on the content POPA.  The
   PAA needs to be notified about the change of MAC AVP (when present).

   o  When a PaC receives a duplicate PANA-Start-Request message for
      which it has already answered, it SHOULD send a duplicate
      PANA-Start-Answer message until it receives a valid
      PANA-Auth-Request message.

   o  When a PaC receives a duplicate PANA-FirstAuth-End-Request message
      for which it has already answered, it SHOULD send a duplicate
      PANA-FirstAuth-End-Answer message until it receives a valid
      PANA-Auth-Request message for address.

   After the second EAP authentication.

   o  When a PaC receives a duplicate PANA-Bind-Request message for
      which it has already answered, changed its address, it SHOULD MUST send a duplicate
      PANA-Bind-Answer
   PANA-Update-Request message until it receives some hint provided
      outside to the PANA protocol (e.g., receipt of a secure association
      protocol PAA.  The message from an EP or receipt of data traffic) indicating
      that MUST carry the PAA has received a PANA-Bind-Answer message.

   o  When a
   new PaC or a address in an IP-Address AVP.  If the address contained in
   the request is invalid, the PAA receives a duplicate PANA-Termination-Request
      message for which it has already answered, it MAY MUST send a duplicate
      PANA-Termination-Answer PANA-Error message in accordance with
   the timers
      described in Section 7.

4.8  Device ID Choice

   The device identifier used in result code PANA_INVALID_IP_ADDRESS.  Otherwise, the PAA MUST
   update the context of PANA can be an IP
   address, session with the new PaC address and return a MAC address, or an identifier that
   PANA-Update-Answer message.  If there is not carried in data
   packets but has local significance in identifying an established PANA SA, both
   PANA-Update-Request and PANA-Update-Answer messages MUST be protected
   with a connected host
   (e.g., circuit ID). MAC AVP.

5.10  Session Lifetime

   The last type authentication phase determines the PANA session lifetime when
   the network access authorization succeeds.  The Session-Lifetime AVP
   MAY be optionally included in the PANA-Bind-Request message to inform
   PaC about the valid lifetime of identifiers are commonly used the PANA session.  It MUST be ignored
   when included in physically secured point-to-point links where MAC addresses other PANA messages.  When there are
   not available.

   It multiple EAP
   authentication taking place, this AVP SHOULD be included after the
   final authentication.

   The lifetime is assumed a non-negotiable parameter that can be used by PaC to
   manage PANA-related state.  PaC does not have to perform any actions
   when the lifetime expires, other than optionally purging local state.

   PAA knows SHOULD initiate EAP authentication before the link type current session
   lifetime expires.

   PaC and PAA MAY optionally rely on lower-layer indications to
   expedite the security
   mechanisms being provided or required detection of a disconnected peer.  Availability and
   reliability of such indications depend on the specific access network (e.g.,
   based on physical security, link-layer ciphers enabled
   technologies.  PANA peer can use PANA-Ping-Request message to verify
   the disconnection before or
   after PANA, or IPsec).  Based on that information, taking an action.

   The session lifetime parameter is not related to the PAA can decide
   what type transmission of device ID will
   PANA-Ping-Request messages.  These messages can be used when running PANA with the
   client.  When IPsec-based security [I-D.ietf-pana-ipsec] is for
   asynchronously verifying the
   choice liveness of access control, the PAA SHOULD provide an IP address as
   device ID, and expect the PaC peer.  The decision to provide its IP address in return.
   In case IPsec is not used, MAC addresses are used as device IDs when
   available.  If non-IPsec access control
   send PANA-Ping-Request message is enabled, taken locally and a MAC address
   is not available, device ID exchange does not occur within PANA.
   Instead, peers rely on lower-layers to provide locally-significant
   identifiers along with received PANA packets.

4.9  Updating PaC' Address

   A PaC's IP address can change in certain situations.  For example, require
   coordination between the PANA framework [I-D.ietf-pana-framework] describes a case in
   which a PaC replaces a pre-PANA address (PRPA) with peers.

5.11  Network Selection

   In a post-PANA
   address (POPA), discovery and handshake phase, a PANA-Start-Request message sent
   from the PaC and PAA create host routes to each other
   in order MAY contain zero or one NAP-Information AVP and zero or
   more ISP-Information AVPs to maintain on-link communication based advertise the information on the POPA. NAP
   and/or ISPs.  The
   PAA needs to be notified about the change of PaC address.

   After the PaC has changed MAY indicate its address, it MUST send a
   PANA-Update-Request message to the PAA.  The message MUST carry the
   new PaC address in choice of ISP by including an IP-Address AVP.  If the address contained
   ISP-Information AVP in the request is invalid, the PAA MUST send PANA-Start-Answer message.  When a PANA-Error message with AAA
   backend is used, the result code PANA_INVALID_IP_ADDRESS.  Otherwise, identity of the PAA destination AAA server or realm
   MUST
   update be determined based on the PANA session with explicitly chosen ISP.  When the new PaC address and return a
   PANA-Update-Answer message.  If there
   ISP-Information AVP is an established PANA SA, both
   PANA-Update-Request and PANA-Update-Answer messages MUST be protected
   with a MAC AVP.

4.10  Session Lifetime

   The authentication phase determines the PANA session lifetime when not present, the network access authorization succeeds.  The Session-Lifetime AVP network MAY be optionally included rely on
   the client identifier carried in the PANA-Bind-Request message EAP authentication method to inform
   make this determination.  The PaC about the valid lifetime of can choose an ISP and contain an
   ISP-Information AVP for the PANA session.  It MUST be ignored chosen ISP in a PANA-Start-Answer message
   even when included there is no ISP-Information AVP contained in other the
   PANA-Start-Request message.

5.12  Separate NAP and ISP Authentication

   PANA messages.  When there are allows running at most two EAP sessions in sequence in an
   authentication phase to support separate NAP and ISP authentication
   as described in next sections.  Currently, running multiple EAP
   sessions in sequence in an authentication taking place, this AVP SHOULD be included after the
   final phase is designed only for
   separate NAP and ISP authentication.

   The lifetime  It is a non-negotiable parameter that can be used by PaC to
   manage PANA-related state.  PaC does not have for running arbitrary
   number of EAP sessions in sequence, or giving the PaC another chance
   to perform any actions try another EAP authentication method within an integrated NAP and
   ISP authentication when the lifetime expires, other than optionally purging local state.
   PAA SHOULD initiate an EAP authentication before the current session
   lifetime expires.

   PaC method fails.  Within
   separate NAP and PAA MAY optionally rely on lower-layer indications to
   expedite ISP authentication, the detection of a disconnected peer.  Availability NAP authentication and
   reliability the
   ISP authentication are considered completely independent.  Presence
   or success of such indications depend on one should not effect the specific other.  Making a network
   access
   technologies.  PANA peer can use PANA-Reauth-Request message to
   verify the disconnection before taking an action.

   The session lifetime parameter is not related to authorization decision based on the transmission success or failure of
   PANA-Reauth-Request messages.  These messages can be used for
   asynchronously verifying each
   authentication is a network policy issue.

5.12.1  Negotiating Separate NAP and ISP Authentication

   When the liveness of PaC and PAA negotiates in the peer discovery and enabling
   mobility optimizations.  The decision handshake phase
   to send PANA-Reauth-Request
   message is taken locally and does not require coordination between
   the peers.

   When perform separate EAP authentications are performed for NAP and ISP authentication, the PaC and NAP the PAA
   operate in a
   single PANA session, it is possible that different authorization
   lifetime values are associated with the two authentications. following way in addition to the behavior defined in
   Section 4.1

   In this
   case, the smaller authorization lifetime value MUST be used for
   calculating discovery and handshake phase, the PANA Session-Lifetime value.  As a result, when
   EAP-based re-authentication occurs, both PAA MAY enable separate NAP
   and ISP authentications
   will be performed in authentication ([I-D.ietf-pana-framework]) by setting the same re-authentication procedure.

4.11  Retransmission
   S-flag of Duplicate Answers

   Since PANA is designed over UDP, an answer as well as a request can
   be lost.  In order to improve robustness against possible loss the message header of
   synchronization between a PaC and a PAA, the responder PANA-Start-Request.

   If the S-flag of a request
   MAY send a duplicate answer to a duplicate request for which already
   answered (as well as a fresh answer to a new request if any).  In
   PANA, a duplicate the received PANA-Start-Request or PANA-Start-Answer message has is not set,
   the same contents as PaC MUST NOT set the original request or answer, respectively.  A
   duplicate request other than PANA-Start-Request has S-flag in the same contents
   as PANA-Start-Answer message sent
   back to the original request except for PAA.

   If the transmission sequence number S-flag of the received PANA-Start-Request message is set, the
   PaC can indicate its desire to perform separate NAP and a MAC AVP (if any).  Also, a duplicate answer other than ISP
   authentication by setting the S-flag in the PANA-Start-Answer has
   message.  If the same contents S-flag in the PANA-Start-Answer message is not set,
   only one authentication is performed and the processing occurs as
   described in Section 4.1.  If the original answer except S-flag in the PANA-Start-Answer
   message is set, the determination of the destination AAA server or
   realm for ISP authentication is performed as described in Section
   5.11.  In addition, where backend AAA servers are used for NAP
   authentication, the transmission and receiving sequence numbers NAP is considered the ultimate AAA realm, and a MAC AVP (if
   any).  Retransmission of a duplicate answer the
   destination AAA server for this authentication is determined entirely
   by the local configuration on the access server hosting the PAA
   (NAS).

   When the S-flag is set in response to a
   duplicate request occurs PANA-Start-Request message, the initial
   EAP Request MUST NOT be carried in the following ways.

   o  When a PaC receives a duplicate PANA-Start-Request message for
      which it has already answered, it MAY send a duplicate
      PANA-Start-Answer message until it receives a valid
      PANA-Auth-Request message.

   o  When a PaC receives a duplicate PANA-FirstAuth-End-Request message
      for which it has already answered, it MAY send a duplicate
      PANA-FirstAuth-End-Answer message until it receives a valid
      PANA-Auth-Request message for
   (If the second initial EAP authentication.

   o  When a PaC receives a duplicate PANA-Bind-Request Request were contained in the PANA-Start-Request
   message for
      which it has already answered, it MAY send a duplicate
      PANA-Bind-Answer message until it receives some hint provided
      outside during the PANA protocol (e.g., receipt of a secure association
      protocol message from an EP S-flag negotiation, the PaC cannot tell whether
   the EAP Request is for NAP authentication or receipt ISP authentication.)

5.12.2  Execution of data traffic) indicating
      that Separate NAP and ISP Authentication

   When the PaC and PAA has received a PANA-Bind-Answer message.

   o  When a have negotiated in the discovery and handshake
   phase to perform separate NAP and ISP authentication, the PaC or a and the
   PAA receives operate in the following way in addition to the behavior defined
   in Section 4.2

   o  The S-flag of PANA-Auth-Request and PANA-Auth-Answer messages MUST
      be set.

   o  An EAP Success/Failure message is carried in a duplicate PANA-Termination-Request
      PANA-FirstAuth-End-Request (PFER) message for which it has already answered, it MAY send as well as a duplicate
      PANA-Termination-Answer
      PANA-Bind-Request (PBR) message.  The PANA-FirstAuth-End-Request
      message MUST be used at the end of the first EAP authentication
      and the PANA-Bind-Request MUST be used for a while before deleting the
      PANA session. second EAP
      authentication.  The period to send duplicate
      PANA-Termination-Answer PANA-FirstAuth-End-Request messages may MUST be
      acknowledged with a configurable parameter.

4.12  Mobility Handling

   A mobile PaC's network access PANA-FirstAuth-End-Answer (PFEA) message.

   o  If the first EAP authentication performance can be
   enhanced by deploying a context-transfer-based mechanism, where some
   session attributes are transferred from has failed, the previous PAA can choose not
      to perform the new
   one in order to avoid performing a full second EAP authentication (reactive
   approach).  Additional mechanisms that are based on the proactive AAA
   state establishment at one or more candidate PAAs may be developed in by clearing the future [I-D.irtf-aaaarch-handoff].  The details S-flag of a
   context-transfer-based mechanism is provided in
      the PANA-FirstAuth-End-Request message.  In this section.

   Upon changing its point case, the S-flag
      of attachment, a PaC that wants to quickly
   resume its ongoing PANA session without running EAP MAY send its
   unexpired PANA session identifier in its PANA-Start-Answer message.
   Along with the Session-Id AVP, a MAC AVP PANA-FirstAuth-End-Answer message sent by the PaC MUST be included in this
   message.  The MAC AVP is computed by using
      cleared.  If the PANA_MAC_KEY shared
   between S-flag of the PaC and its previous PAA that PANA-FirstAuth-End-Request message
      is set when the first EAP authentication has an unexpired PANA
   session with failed, the PaC.  This action signals PaC's desire PaC can
      choose not to perform the mobility optimization.  In second EAP authentication by clearing
      the absence S-flag of a Session-Id AVP in
   this message, the PANA session takes its usual course (i.e.,
   EAP-based authentication is performed). PANA-FirstAuth-End-Answer message.  If a PAA receives a session identifier in the PANA-Start-Answer
   message, first
      EAP authentication failed and it the S-flag is configured to enable this optimization, it SHOULD
   retrieve not set in the
      PANA-FirstAuth-End-Answer message as a result of those operations,
      the PANA session attributes from MUST be immediately deleted.  Otherwise, the previous PAA.  Current
      second EAP authentication MUST be performed.

   o  The PAA determines the identity execution order of NAP authentication and
      ISP authentication.  In this case, the previous PAA by looking at the
   DiameterIdentity part of the PANA session identifier.  The MAC AVP can only be verified indicate which
      authentication (NAP authentication or ISP authentication) is
      currently occurring by the previous PAA, therefore a copy of using N-flag in the PANA message SHOULD be provided to header.
      When NAP authentication is being performed, the previous PAA.  The mechanism
   required to send a copy of the PANA-Start-Answer message from current
   PAA to the previous PAA, and retrieve the session attributes is
   outside the scope of PANA protocol.  Seamoby Context Transfer
   Protocol [I-D.ietf-seamoby-ctp] might N-flag MUST be useful for this purpose.
      set.  When ISP authentication is being performed, the previous or current PAA N-flag MUST
      NOT be set.  The N-flag MUST NOT be set when S-flag is not configured to enable this
   optimization, set.

5.12.3  AAA-Key Calculation

   When the current PaC and PAA can not retrieve have negotiated in the PANA session
   attributes, or discovery and handshake
   phase to perform separate NAP and ISP authentication, if the PANA session has already expired (i.e., session
   lifetime
   lower-layer is zero), insecure, the PAA two EAP authentication methods used in
   the separate authentication MUST send be capable of deriving keys.  In
   this case, if the first EAP authentication is successful, the
   PANA-FirstAuth-End-Request and PANA-FirstAuth-End-Answer messages as
   well as PANA-Auth-Request message
   with a new session identifier and let PANA-Auth-Answer messages in the PANA exchange take its
   usual course.  This action will engage EAP-based second
   EAP authentication and
   create a fresh PANA session from scratch.

   In case the current PAA can retrieve MUST be protected with the on-going PANA session
   attributes key derived from the previous PAA,
   AAA-Key for the first EAP authentication.  The PANA-Bind-Request and
   PANA-Bind-Answer messages and all subsequent PANA session continues messages exchanged
   in authorized phase, re-authentication phase and termination phase
   MUST be protected either with a
   PANA-Bind exchange.

   As part of the context transfer, an intermediate AAA-Key material is
   provided by the previous PAA to for the current PAA.

      AAA-Key-int = The first N bits of
                    HMAC-SHA1(AAA-Key, DiameterIdentity | Session-ID)
   The value of N depends on EAP
   authentication if the integrity protection algorithm in use,
   i.e., N=160 for HMAC-SHA1.  DiameterIdentity is the identifier of the
   current PAA.  Session-ID is the identifier of first EAP authentication succeeds and the PaC's PANA session
   second EAP authentication fails, or with the previous PAA.

   The current PAA and PaC compute the new AAA-Key by using for the nonce
   values and second
   EAP authentication if the AAA-Key-int.

      AAA-Key-new = The first N bits of
                    HMAC-SHA1(AAA-Key-int, PaC_nonce | PAA_nonce)

   New PANA_MAC_KEY is computed based on EAP authentication fails and the algorithm described in
   Section 4.1.5, by using
   second EAP authentication succeeds, or with the new compound AAA-Key
   derived from the two AAA-Keys, one for the first EAP authentication
   and the new Session-ID
   assigned by other from the current PAA.  The MAC AVP contained in second EAP authentication, if both the
   PANA-Bind-Request first
   and PANA-Bind-Answer messages MUST be generated second EAP authentications succeed.

5.12.4  Re-authentication

   When separate ISP and
   verified by using the new PANA_MAC_KEY.  The Session-ID AVP MUST
   include a new session identifier assigned by the current PAA.  A new
   PANA session NAP authentication is created upon successful completion of this exchange.

   Note performed, it is possible
   that correct operation of this optimization relies on many
   factors, including applicability of different authorization state from one
   network attachment to another.  [I-D.ietf-eap-keying] identifies this
   operation as "fast handoff" and provides deployment considerations.
   Operators lifetime values are recommended to take those guidelines into account when
   using this optimization in their networks.

4.13  Support for Separate EP

   PANA allows the PAA and associated with the EP to be separate entities.
   two authentications.  In this case, if data traffic protection needs to the smaller authorization
   lifetime value MUST be initiated after
   successful PANA authentication phase, used for calculating the PaC needs to know the
   device identifier of EP(s) so that it is able to establish PANA Session-Lifetime
   value.  As a security
   association with each EP to protect data traffic.

   To this end, result, when entering a Protection-Capability AVP with either
   L2_PROTECTION or IPSEC_PROTECTION re-authentication phase, both
   NAP and ISP authentication will be performed in the AVP payload is carried in a
   PANA-Bind-Request same
   re-authentication phase.

5.12.5  Example Sequence

   A PANA message sequence with separate NAP and if there ISP authentication is an EP that has a different
   device identifier than that of the PAA, one or more EP-Device-Id AVPs
   MUST also be carried
   illustrated in Figure 9.  The example assumes the PANA-Bind-Request message.  In this case,
   if one EP has following scenario:

   o  The PaC initiates the same device identifier discovery and handshake phase.

   o  The PAA offers separate NAP and ISP authentication, as the PAA, an EP-Device-Id
   AVP that contains the device identifier well as a
      choice of the EP (i.e., the PAA)
   MUST also be included in the PANA-Bind-Request.

   Aside ISP from provisioning the EP, the same PAA-to-EP protocol MAY be
   used for triggering "ISP1" and "ISP2".  The PaC accepts the PAA upon detecting offer
      from PAA, with choosing "ISP1" as the need to authenticate ISP.

   o  NAP authentication and ISP authentication is performed in this
      order in authentication phase.

   o  An EAP authentication method with a
   new client.

5.  PANA Security Association Establishment

   When PANA single round trip is used over an already established secure channel, such as
   physically secured wires or ciphered link-layers, we can reasonably
   assume that man-in-the-middle attacks or service theft is not
   possible.  See [I-D.ietf-pana-threats-eval] for in
      each EAP sequence.

   o  After a detailed
   discussion.

   In environments PANA SA is established, all messages are integrity and
      replay protected with MAC AVPs.

   o  Authorization, re-authentication and termination phases are not
      shown.

      PaC      PAA  Message(seqno)[AVPs]
      -----------------------------------------------------
      // Discovery and handshake phase
         ----->     PANA-PAA-Discover(0)
         <-----     PANA-Start-Request(x)               // S-flag set
                       [Nonce, Cookie,
                        ISP-Information("ISP1"),
                        ISP-Information("ISP2"),
                        NAP-Information("MyNAP")]
         ----->     PANA-Start-Answer(x)                // S-flag set
                       [Nonce, Cookie,                  // PaC chooses "ISP1"
                        ISP-Information("ISP1")]

      // Authentication phase
         <-----     PANA-Auth-Request(x+1)              // NAP authentication
                       [Session-Id, EAP{Request}]       // S- and N-flags set
         ----->     PANA-Auth-Answer(x+1)               // S- and N-flags set
                       [Session-Id]                     // No piggybacking
         ----->     PANA-Auth-Request(y)                // S- and N-flags set
                       [Session-Id, EAP{Response}]
         <-----     PANA-Auth-Answer(y)[Session-Id]     // S- and N-flags set
         <-----     PANA-Auth-Request(x+2)              // S- and N-flags set
                       [Session-Id, EAP{Request}]
         ----->     PANA-Auth-Answer(x+2)               // S- and N-flags set
                       [Session-Id, EAP{Response}]      // Piggybacking
         <-----     PANA-FirstAuth-End-Request(x+3)     // S- and N-flags set
                       [Session-Id, EAP{Success}, Key-Id, MAC]
         ----->     PANA-FirstAuth-End-Answer(x+3)      // S- and N-flags set
                       [Session-Id, Key-Id, MAC]
         <-----     PANA-Auth-Request(x+4)              // ISP authentication
                       [Session-Id, EAP{Request}, MAC]  // S-flag set
         ----->     PANA-Auth-Answer(x+4)               // S-flag set
                       [Session-Id, MAC]                // No piggybacking
         ----->     PANA-Auth-Request(y+1)              // S-flag set
                       [Session-Id, EAP{Response}, MAC]
         <-----     PANA-Auth-Answer(y+1)               // S-flag set
                       [Session-Id, MAC]
         <-----     PANA-Auth-Request(x+5)              // S-flag set
                       [Session-Id, EAP{Request}, MAC]
         ----->     PANA-Auth-Answer(x+5)               // S-flag set
                       [Session-Id, EAP{Response}, MAC] // Piggybacking
         <-----     PANA-Bind-Request(x+6)              // S-flag set
                       [Session-Id, EAP{Success}, Device-Id,
                       IP-Address, Key-Id, Lifetime,
                       Protection-Cap., PPAC, MAC]
         ----->     PANA-Bind-Answer(x+6)               // S-flag set
                       [Session-Id, Device-Id, Key-Id,
                        PPAC, MAC]

     Figure 9: A Complete Message Sequence for Separate NAP and ISP
                             Authentication

6.  Security and Mobility

6.1  PANA Security Association Establishment

   When PANA is used over an already established secure channel, such as
   physically secured wires or ciphered link-layers, we can reasonably
   assume that man-in-the-middle attacks or service theft is not
   possible.  See [I-D.ietf-pana-threats-eval] for a detailed
   discussion.

   In environments where no secure channel prior to the PANA execution
   is available, PANA needs to protect itself against a number of
   attacks.  The device identifier that is used during the
   authentication needs to be verified at the end of the authentication
   to prevent service theft and DoS attacks.  Additionally, a free
   loader should be prevented from spoofing data packets by using the
   device identifier of an already authorized legitimate client.  Both
   of these requirements necessitate generation of a security
   association between the PaC and the PAA at the end of the
   authentication.  This can only be done when the authentication method
   used can generate session keys.  Use of session keys can prevent
   attacks which would otherwise be very easy to launch by eavesdropping
   on and spoofing traffic over an insecure link.

   The EAP method provided session key is transported to the PAA (if
   necessary) and is subsequently input to the creation of the PANA SA.
   Applying the PANA SA to the messages exchanged during the final PANA
   handshake provides implicit key confirmation to both the PAA and the
   PaC.  Implicit key confirmation shows both, the PaC and the PAA, that
   they possess the unique and fresh session key.

   Protecting the final PANA handshake also ensures that the device
   identifier (and other information) cannot be modified by an
   adversary.  Further usage of the keying material is discussed in
   [I-D.ietf-pana-framework].

6.  Message Formats

   This section defines message formats for PANA protocol.

6.1  IP and UDP Headers

   The Hop Limit (or TTL) field of the IP header MUST

6.2  Mobility

   A mobile PaC's network access authentication performance can be set to 255.
   When
   enhanced by deploying a PANA-PAA-Discover message is multicast, IP destination address
   of context-transfer-based mechanism, where some
   session attributes are transferred from the message is set previous PAA to the new
   one in order to avoid performing a well-known link-local multicast address
   (TBD).  A PANA-PAA-Discover message MAY full EAP authentication (reactive
   approach).  Additional mechanisms that are based on the proactive AAA
   state establishment at one or more candidate PAAs may be unicast developed in some cases as
   specified
   the future [I-D.irtf-aaaarch-handoff].  The details of a
   context-transfer-based mechanism is provided in Section 4.2.  Any other this section.

   Upon changing its point of attachment, a PaC that wants to quickly
   resume its ongoing PANA packet session without running EAP MAY send its
   unexpired PANA session identifier in its PANA-Start-Answer message.
   Along with the Session-Id AVP, a MAC AVP MUST be included in this
   message.  The MAC AVP is unicasted computed by using the PANA_MAC_KEY shared
   between the PaC and its previous PAA that has an unexpired PANA
   session with the PAA.  The source and destination addresses SHOULD be
   set PaC.  This action signals PaC's desire to perform
   the addresses on the interfaces from which mobility optimization.  In the message will be
   sent and received, respectively.

   When absence of a Session-Id AVP in
   this message, the PANA packet session takes its usual course (i.e.,
   EAP-based authentication is sent in response to performed).

   If a request, PAA receives a session identifier in the UDP source PANA-Start-Answer
   message, and destination ports of the response packet MUST be copied it is configured to enable this optimization, it SHOULD
   retrieve the PANA session attributes from the
   destination and source ports of previous PAA.  Current
   PAA determines the request packet, respectively.
   The destination port identity of an unsolicited PANA packet MUST be set to an
   assigned value (TBD), and the source port MUST be set to a value
   chosen previous PAA by looking at the sender.

6.2  PANA Header

   A summary
   DiameterIdentity part of the PANA header format is shown below. session identifier.  The fields are
   transmitted in network byte order.

       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 Length                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Flags      |                 Message Type                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                 Transmitted Sequence Number                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                 Received Sequence Number                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  AVPs ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-

   Version
      This Version field MUST MAC AVP
   can only be set to 1 to indicate PANA Version 1.

   Message Length

      The Message Length field is three octets and indicates verified by the length previous PAA, therefore a copy of the
   PANA message including SHOULD be provided to the header fields.

   Flags

      The Flags field is eight bits. previous PAA.  The following bits are assigned:

       0 1 2 3 4 5 6 7
      +-+-+-+-+-+-+-+-+
      |R r r r S N r r|
      +-+-+-+-+-+-+-+-+

      R(equest)

         If set, the message is mechanism
   required to send a request.  If cleared, the message is
         an answer.

      S(eparate)

         When copy of the S-flag is set in a PANA-Start-Request PANA-Start-Answer message it
         indicates that from current
   PAA is willing to offer separate EAP
         authentications for NAP and ISP.  When the S-flag is set in a
         PANA-Start-Answer message it indicates that PaC accepts on
         performing separate EAP authentications for NAP previous PAA, and ISP.  When retrieve the S-flag session attributes is set in a PANA-Auth-Request/Answer,
         PANA-FirstAuth-End-Request/Answer and PANA-Bind-Request/Answer
         messages it indicates that separate authentications are being
         performed in
   outside the authentication phase.

      N(AP authentication) scope of PANA protocol.  The Context Transfer Protocol
   [I-D.ietf-seamoby-ctp] might be useful for this purpose.

   When the N-flag is set in a PANA-Auth-Request message, it
         indicates that previous or current PAA is performing NAP authentication.  When not configured to enable this
   optimization, the
         N-flag is unset in a PANA-Auth-Request message, it indicates
         that current PAA is performing ISP authentication.  The N-flag MUST NOT
         be set when S-flag is can not set.

      r(eserved)

         these flag bits are reserved for future use, and MUST be set to
         zero, and ignored by retrieve the receiver.

   Message Type

      The Message Type field is three octets, and PANA session
   attributes, or the PANA session has already expired (i.e., session
   lifetime is used in order to
      communicate zero), the PAA MUST send the PANA-Auth-Request message type
   with a new session identifier and let the message.  The 24-bit address
      space is managed by IANA [ianaweb]. PANA uses exchange take its own address
      space for this field.

   Transmitted Sequence Number

      The Transmitted Sequence Number field contains
   usual course.  This action will engage EAP-based authentication and
   create a fresh PANA session from scratch.

   In case the monotonically
      increasing 32 bit sequence number that current PAA can retrieve the message sender
      increments every time a new on-going PANA message is sent.

   Received Sequence Number

      The Received Sequence Number field contains session
   attributes from the 32 bit transmitted
      sequence number that previous PAA, the message sender has last received from its
      peer.

   AVPs

      AVPs are PANA session continues with a method
   PANA-Bind exchange.

   As part of encapsulating information relevant the context transfer, an intermediate AAA-Key material is
   provided by the previous PAA to the
      PANA message.  See section Section 6.3 for more information on
      AVPs.

6.3  AVP Header

   Each AVP current PAA.

      AAA-Key-int = The first N bits of type OctetString MUST be padded to align on a 32-bit
   boundary, while other AVP types align naturally.  A number
                    HMAC-SHA1(AAA-Key, DiameterIdentity | Session-ID)

   The value of
   zero-valued bytes are added to N depends on the end integrity protection algorithm in use,
   i.e., N=160 for HMAC-SHA1.  DiameterIdentity is the identifier of the AVP Data field till a
   word boundary
   current PAA.  Session-ID is reached.  The length the identifier of the padding PaC's PANA session
   with the previous PAA.

   The current PAA and PaC compute the new AAA-Key by using the nonce
   values and the AAA-Key-int.

      AAA-Key-new = The first N bits of
                    HMAC-SHA1(AAA-Key-int, PaC_nonce | PAA_nonce)

   New PANA_MAC_KEY is not reflected computed based on the algorithm described in
   Section 5.6, by using the AVP Length field [RFC3588]. new AAA-Key and the new Session-ID assigned
   by the current PAA.  The fields MAC AVP contained in the AVP header PANA-Bind-Request
   and PANA-Bind-Answer messages MUST be sent in network byte order. generated and verified by using
   the new PANA_MAC_KEY.  The
   format of Session-ID AVP MUST include a new session
   identifier assigned by the header is:

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           AVP Code                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   AVP Flags   |                  AVP Length                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Vendor-Id (opt)                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Data ...
      +-+-+-+-+-+-+-+-+
   AVP Code

      The AVP Code, combined with the Vendor-Id field, identifies the
      attribute uniquely.  AVP numbers are allocated by IANA [ianaweb]. current PAA.  A new PANA uses its own address space for session is
   created upon successful completion of this field although some exchange.

   Note that correct operation of
      the AVP formats are borrowed from Diameter protocol [RFC3588].

   AVP Flags

      The AVP Flags field is eight bits.  The following bits are
      assigned:

       0 1 2 3 4 5 6 7
      +-+-+-+-+-+-+-+-+
      |V M r r r r r r|
      +-+-+-+-+-+-+-+-+

      M(andatory)

         The 'M' Bit, known as the Mandatory bit, indicates whether
         support this optimization relies on many
   factors, including applicability of the AVP is required.

      V(endor)

         The 'V' bit, known authorization state from one
   network attachment to another.  [I-D.ietf-eap-keying] identifies this
   operation as the Vendor-Specific bit, indicates
         whether the optional Vendor-Id field is present in the AVP
         header.

      r(eserved)

         these flag bits "fast handoff" and provides deployment considerations.
   Operators are reserved recommended to take those guidelines into account when
   using this optimization in their networks.

7.  PANA Headers and Formats

   This section defines message formats for future use, PANA protocol.

7.1  IP and UDP Headers

   The Hop Limit (or TTL) field of the IP header MUST be set to
         zero, and ignored by the receiver.

   AVP Length

      The AVP Length field 255.
   When a PANA-PAA-Discover message is three octets, and indicates the number multicast, IP destination address
   of
      octets the message is set to a well-known link-local multicast address
   (TBD).  A PANA-PAA-Discover message MAY be unicast in this AVP including some cases as
   specified in Section 4.1.  Any other PANA packet is unicast between
   the AVP Code, AVP Length, AVP Flags, PaC and the AVP data

   Vendor-Id PAA.  The Vendor-Id field is present if the 'V' bit is source and destination addresses SHOULD be
   set in to the AVP
      Flags field.  The optional four-octet Vendor-Id field contains addresses on the
      IANA assigned "SMI Network Management Private Enterprise Codes"
      [ianaweb] value, encoded interfaces from which the message will be
   sent and received, respectively.

   When the PANA packet is sent in network byte order.  Any vendor
      wishing response to implement a vendor-specific PANA AVP request, the UDP source
   and destination ports of the response packet MUST use their own
      Vendor-Id along with their privately managed AVP address space,
      guaranteeing that they will not collide with any other vendor's
      vendor-specific AVP(s), nor with future IETF applications.

   Data

      The Data field is zero or more octets be copied from the
   destination and contains information
      specific to source ports of the Attribute. request packet, respectively.
   The format and length destination port of an unsolicited PANA packet MUST be set to an
   assigned value (TBD), and the Data
      field is determined source port MUST be set to a value
   chosen by the AVP Code and AVP Length fields.

6.4 sender.

7.2  PANA Messages

   Figure 11 lists all Header

   A summary of the PANA messages defined header format is shown below.  The fields are
   transmitted in this document

                 Message          Direction: PaC---PAA
                 ----------------------------------------
                 PANA-PAA-Discover           -------->

                 PANA-Start-Request          <--------
                 PANA-Start-Answer           -------->

                 PANA-Auth-Request           <--------
                 PANA-Auth-Answer            -------->

                 PANA-FirstAuth-End-Request  <--------
                 PANA-FirstAuth-End-Answer   -------->

                 PANA-Bind-Request           <--------
                 PANA-Bind-Answer            -------->

                 PANA-Reauth-Request         <------->
                 PANA-Reauth-Answer          <------->

                 PANA-Termination-Request    <------->
                 PANA-Termination-Answer     <------->

                 PANA-Update-Request         -------->
                 PANA-Update-Answer          <--------

                 PANA-Error                  <------->

                    Figure 11: PANA network byte order.

          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    |   Reserved    |        Message Overview

6.4.1 Length         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            Flags              |         Message Specifications

   Every PANA message Type          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Sequence Number                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  AVPs ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-

   Version

      This Version field MUST include a corresponding ABNF [RFC2234]
   specification found in [RFC3588].  Note that PANA messages have a
   different header format compared to Diameter.

   Example:

      message ::= < PANA-Header: <Message type>, [REQ] [SEP] >
                * [ AVP ]

6.4.2  PANA-PAA-Discover (PDI)

   The PANA-PAA-Discover (PDI) message is used to discover the address
   of PAA(s).  Both sequence numbers in this message are be set to zero
   (0).

         PANA-PAA-Discover ::= < PANA-Header: 1 >
                   0*1 < Session-Id >
                    *  [ AVP ]

6.4.3  PANA-Start-Request (PSR)

   PANA-Start-Request (PSR) to indicate PANA Version 1.

   Reserved

      This 8-bit field is sent by the PAA reserved for future use, and MUST be set to
      zero, and ignored by the PaC. receiver.

   Message Length

      The PAA sets Message Length field is three octets and indicates the transmission sequence number to an initial random value. length
      of the PANA message including the header fields.

   Flags

      The
   received sequence number Flags field is set to zero (0).

         PANA-Start-Request ::= < PANA-Header: 2, REQ [SEP] >
                       { Nonce }
                       [ Cookie ]
                       [ EAP-Payload ]
                       [ NAP-Information ]
                    *  [ ISP-Information ]
                       [ Protection-Capability]
                       [ PPAC ]
                    *  [ AVP ]

6.4.4  PANA-Start-Answer (PSA)

   PANA-Start-Answer (PSA) eight bits.  The following bits are assigned:

       0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |R S N r r r r r r r r r r r r r|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      R(equest)

         If set, the message is sent by a request.  If cleared, the PaC to message is
         an answer.

      S(eparate)

         When the PAA S-flag is set in response to a PANA-Start-Request message.  The PANA_start message transmission
   sequence number field it
         indicates that PAA is copied willing to offer separate NAP and ISP
         authentication.  When the received sequence number
   field.  The transmission sequence number S-flag is set to initial random
   value. in a PANA-Start-Answer ::= < PANA-Header: 2 [SEP] >
                       { Nonce }
                       [ Session-Id ]
                       [ Cookie ]
                       [ EAP-Payload ]
                       [ ISP-Information ]
                    *  [ AVP ]
                   0*1 < MAC >

6.4.5  PANA-Auth-Request (PAR)

   PANA-Auth-Request (PAR) is sent by
         message it indicates that the PAA to PaC accepts on performing
         separate NAP and ISP authentication.  When the PaC.

         PANA-Auth-Request ::= < PANA-Header: 3, REQ [SEP] [NAP] >
                       < Session-Id >
                       < EAP-Payload >
                    *  [ AVP ]
                   0*1 < MAC >

   (Both NAP-Information S-flag is set in
         a PANA-Auth-Request/Answer, PANA-FirstAuth-End-Request/Answer
         and ISP-Information PANA-Bind-Request/Answer messages it indicates that
         separate NAP and ISP authentication is being performed in the
         authentication phase.  For other cases, S-flag MUST NOT be included at set.

      N(AP authentication)

         When the
   same time)

6.4.6  PANA-Auth-Answer (PAN)

   PANA-Auth-Answer (PAN) N-flag is sent by the PaC to the PAA set in response to a PANA-Auth-Request message.

         PANA-Auth-Answer ::= < PANA-Header: 3 [SEP] [NAP] >
                       < Session-Id >
                       < EAP-Payload >
                    *  [ AVP ]
                   0*1 < MAC >

6.4.7  PANA-Bind-Request (PBR)

   PANA-Bind-Request (PBR) is sent by the PAA to message, it
         indicates that the PaC.

         PANA-Bind-Request ::= < PANA-Header: 4, REQ [SEP] [NAP] >
                       < Session-Id >
                       { Result-Code }
                       { PPAC }
                       [ EAP-Payload ]
                       [ Device-Id ]
                       [ Session-Lifetime ]
                       [ Protection-Capability ]
                       [ Key-Id ]
                    *  [ EP-Device-Id ]
                    *  [ AVP ]
                   0*1 < MAC >

6.4.8  PANA-Bind-Answer (PBA)

   PANA-Bind-Answer (PBA) current EAP authentication is sent by the PaC to for NAP
         authentication.  When the PAA N-flag is unset in response to a
   PANA-Result-Request message.

         PANA-Bind-Answer ::= < PANA-Header: 4 [,SEP] [NAP] >
                       < Session-Id >
                       { Result-Code }
                       [ PPAC ]
                       [ Device-Id ]
                       [ Key-Id ]
                    *  [ AVP ]
                   0*1 < MAC >

6.4.9  PANA-Reauth-Request (PRAR)

   PANA-Reauth-Request (PRAR) is either sent by
         PANA-Auth-Request message, it indicates that the current EAP
         authentication is for ISP authentication.  The PaC or MUST copy
         the PAA.

         PANA-Reauth-Request ::= < PANA-Header: 5, REQ >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

6.4.10  PANA-Reauth-Answer (PRAA)

   PANA-Reauth-Answer (PRAA) is sent value of the flag in response to a
   PANA-Reauth-Request.

         PANA-Reauth-Answer ::= < PANA-Header: 5 >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

6.4.11  PANA-Termination-Request (PTR)

   PANA-Termination-Request (PTR) is sent either by its requests from the PaC or last received
         request of the PAA.

         PANA-Termination-Request ::= < PANA-Header: 6, REQ >
                       < Session-Id >
                       < Termination-Cause >
                    *  [ AVP ]
                   0*1 < MAC >

6.4.12  PANA-Termination-Answer (PTA)

   PANA-Termination-Answer (PTA) is sent either by  The value of the PaC or flag on an answer MUST be
         copied from the PAA in
   response to PANA-Termination-Request.

         PANA-Termination-Answer ::= < PANA-Header: 6 >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

6.4.13  PANA-Error (PER)

   PANA-Error request.  The N-flag MUST NOT be set when
         S-flag is sent either not set.

      r(eserved)

         these flag bits are reserved for future use, and MUST be set to
         zero, and ignored by the PaC or the PAA.

         PANA-Error ::= < PANA-Header: 7 >
                        < Session-Id >
                        < Result-Code >
                        { Failed-AVP }
                     *  [ AVP ]
                    0*1 < MAC >

6.4.14  PANA-FirstAuth-End-Request (PFER)

   PANA-FirstAuth-End-Request (PFER) receiver.

   Message Type

      The Message Type field is sent by the PAA two octets, and is used in order to
      communicate the PaC.

         PANA-FirstAuth-End-Request ::= < PANA-Header: 8, REQ [SEP] [NAP] >
                       < Session-Id >
                       < Device-Id >
                       { EAP-Payload }
                       { Result-Code }
                       [ Key-Id ]
                    *  [ AVP ]
                   0*1 < MAC >

6.4.15  PANA-FirstAuth-End-Answer (PFEA)

   PANA-FirstAuth-End-Answer (PFEA) message type with the message.  The 16-bit address
      space is sent managed by the PaC IANA [ianaweb].  PANA uses its own address
      space for this field.

   Sequence Number

      The Sequence Number field contains a 32 bit value.

   AVPs

      AVPs are a method of encapsulating information relevant to the PAA in
   response
      PANA message.  See section Section 7.3 for more information on
      AVPs.

7.3  AVP Header

   Each AVP of type OctetString MUST be padded to align on a PANA-FirstAuth-End-Request message.

         PANA-FirstAuth-End-Answer ::= < PANA-Header: 8, REQ [SEP] [NAP] >
                       < Session-Id >
                       < Device-Id >
                       [ Key-Id ]
                    *  [ 32-bit
   boundary, while other AVP ]
                   0*1 < MAC >

6.4.16  PANA-Update-Request (PUR)

   PANA-Update-Request (PUR) is sent by types align naturally.  A number of
   zero-valued bytes are added to the PaC to end of the PAA.

         PANA-Update-Request ::= < PANA-Header: 9, REQ >
                       < Session-Id >
                       < IP-Address >
                    *  [ AVP ]
                   0*1 < MAC >

6.4.17  PANA-Update-Answer (PUA)

   PANA-Update-Answer (PUA) is sent by the PAA to the PaC in response to Data field till a PANA-Update-Request.

         PANA-Update-Answer ::= < PANA-Header: 9 >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

6.5  AVPs in PANA

   Some
   word boundary is reached.  The length of the used AVPs are defined in this document and some of them
   are defined padding is not reflected
   in other documents like [RFC3588].  PANA proposes to use the same name space with [RFC3588].  For temporary allocation, PANA
   uses AVP type numbers starting from 1024.

6.5.1  MAC AVP Length field [RFC3588].

   The first octet (8 bits) of the MAC (Code 1024) AVP data contains the
   MAC algorithm type.  Rest of fields in the AVP data payload contains the MAC
   encoded header MUST be sent in network byte order.  The Algorithm 8 bit name space is
   managed by IANA [ianaweb].  The AVP length varies depending on
   format of the
   used algorithm. header is:

          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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Algorithm           AVP Code            |           AVP Flags           |           MAC...
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Algorithm

   		1              HMAC-SHA1 (20 bytes)
   MAC
      The Message Authentication Code is encoded in network byte order.

6.5.2  Device-Id
      |          AVP Length           |            Reserved           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Vendor-Id (opt)                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Data ...
      +-+-+-+-+-+-+-+-+
   AVP Code

      The Device-Id AVP (Code 1025) is Code, combined with the Vendor-Id field, identifies the
      attribute uniquely.  AVP numbers are allocated by IANA [ianaweb].
      PANA uses its own address space for this field although some of Address type [RFC3588].  IPv4 and
   IPv6 addresses
      the AVP formats are encoded as specified in borrowed from Diameter protocol [RFC3588].

   AVP Flags

      The content
   and format of data (including byte and bit ordering) for link-layer
   addresses AVP Flags field is expected to be specified in specific documents that
   describe how IP operates over different link-layers.  For instance,
   [RFC2464].  Address families other than that two octets.  The following bits are defined for
   link-layer or IP addresses MUST NOT be used for this AVP.

6.5.3  Session-Id AVP

   All messages pertaining to a specific PANA session MUST include a
   Session-Id AVP (Code 1026) which carries a PAA-assigned fix value
   throughout
      assigned:

       0                   1
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |V M r r r r r r r r r r r r r r|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      M(andatory)

         The 'M' Bit, known as the lifetime Mandatory bit, indicates whether
         support of a session.  When present, the Session-Id
   SHOULD appear immediately following the PANA header. AVP is required.

      V(endor)

         The Session-Id MUST be globally and eternally unique, 'V' bit, known as it the Vendor-Specific bit, indicates
         whether the optional Vendor-Id field is meant
   to identify a PANA Session without reference to any other
   information, present in the AVP
         header.

      r(eserved)

         These flag bits are reserved for future use, and may MUST be needed set to correlate historical authentication
   information with accounting information.  The PANA Session-Id AVP has
   the same format as
         zero, and ignored by the Diameter Session-Id AVP [RFC3588].

6.5.4  Cookie receiver.

   AVP Length

      The Cookie AVP (Code 1027) is of type OctetString.  The data Length field is
   opaque four octets, and indicates the exact content is outside the scope number of
      octets in this protocol.

6.5.5  Protection-Capability AVP

   The Protection-Capability including the AVP (Code 1028) is of type Unsigned32.  The Code, AVP data indicates Length, AVP Flags,
      and the cryptographic data protection capability
   supported by the EPs.  Below is a list of specified data protection
   capabilities:

         0          L2_PROTECTION
         1          IPSEC_PROTECTION

6.5.6  Termination-Cause AVP

   The Termination-Cause AVP (Code 1029) data.

   Reserved

      This two-octet field is of type of type Enumerated, reserved for future use, and is used MUST be set
      to indicate the reason why a session was terminated on zero, and ignored by the access device. receiver.

   Vendor-Id

      The AVP data Vendor-Id field is used as a collection of flags The
   following Termination-Cause AVP defined present if the 'V' bit is set in [RFC3588] are used for
   PANA.

   LOGOUT                   1  (PaC -> PAA) the AVP
      Flags field.  The client initiated optional four-octet Vendor-Id field contains the
      IANA assigned "SMI Network Management Private Enterprise Codes"
      [ianaweb] value, encoded in network byte order.  Any vendor
      wishing to implement a disconnect

   ADMINISTRATIVE           4  (PAA -> Pac)

      The client was vendor-specific PANA AVP MUST use their own
      Vendor-Id along with their privately managed AVP address space,
      guaranteeing that they will not granted access, collide with any other vendor's
      vendor-specific AVP(s), nor with future IETF applications.

   Data

      The Data field is zero or was disconnected, due more octets and contains information
      specific to
      administrative reasons, such as the receipt of a
      Abort-Session-Request message.

   SESSION_TIMEOUT          8  (PAA -> PaC) Attribute.  The session has timed out, format and service has been terminated.

6.5.7  Result-Code AVP

   The Result-Code length of the Data
      field is determined by the AVP (AVP Code 1030) is of type Unsigned32 and
   indicates whether an EAP authentication was completed successfully or
   whether an error occurred.  Here are Result-Code AVP values taken
   from [RFC3588] Length fields.

8.  PANA Messages, Message Specifications and adapted for PANA.

6.5.7.1  Authentication Results Codes

   These result code values inform the PaC about the authentication and
   authorization result. AVPs

8.1  PANA Messages

   Figure 10 lists all PANA messages defined in this document.

                 Message          Direction: PaC---PAA
                 ----------------------------------------
                 PANA-PAA-Discover           -------->

                 PANA-Start-Request          <--------
                 PANA-Start-Answer           -------->

                 PANA-Auth-Request           <------->
                 PANA-Auth-Answer            <------->

                 PANA-Reauth-Request         -------->
                 PANA-Reauth-Answer          <--------

                 PANA-FirstAuth-End-Request  <--------
                 PANA-FirstAuth-End-Answer   -------->

                 PANA-Bind-Request           <--------
                 PANA-Bind-Answer            -------->

                 PANA-Ping-Request           <------->
                 PANA-Ping-Answer            <------->

                 PANA-Termination-Request    <------->
                 PANA-Termination-Answer     <------->

                 PANA-Update-Request         -------->
                 PANA-Update-Answer          <--------

                 PANA-Error-Request          <------->
                 PANA-Error-Answer           <------->

                    Figure 10: PANA Message Overview

8.2  Message Specifications

   Every PANA message MUST include a corresponding ABNF [RFC2234]
   specification found in [RFC3588].

   Example:

      message ::= < PANA-Header: <Message type>, [REQ] [SEP] >
                * [ AVP ]

8.2.1  PANA-PAA-Discover (PDI)

   The authentication result and authorization
   result can be different as described below, but only one result that
   corresponds PANA-PAA-Discover (PDI) message is used to discover the one detected first is returned.

   PANA_SUCCESS                            2001 address
   of PAA(s).  Both the authentication and authorization processes are
      successful.

   PANA_AUTHENTICATION_REJECTED            4001

      The authentication process failed.  When sequence numbers in this error is returned,
      the authorization process also fails.

   PANA_AUTHORIZATION_REJECTED             5003

      The authorization process failed.  This error could occur when
      authorization message are set to zero
   (0).

         PANA-PAA-Discover ::= < PANA-Header: 1 >
                    *  [ AVP ]

8.2.2  PANA-Start-Request (PSR)

   PANA-Start-Request (PSR) is rejected by a AAA proxy or rejected locally sent by a
      PAA, even if the authentication procedure succeeds.

6.5.7.2  Protocol Error Result Codes

   Protocol error result code values.

   PANA_MESSAGE_UNSUPPORTED                3001

      Error code from PAA to PaC or from PaC to PAA.  Message type not
      recognized or supported.

   PANA_UNABLE_TO_DELIVER                  3002

      Error code from PAA to the PaC.  The PAA was unable to deliver the EAP
      payload to sets
   the authentication server.

   PANA_INVALID_HDR_BITS                   3008

      Error code from PAA sequence number to PaC or from an initial random value.

         PANA-Start-Request ::= < PANA-Header: 2, REQ [SEP] >
                       { Nonce }
                       [ Cookie ]
                       [ EAP-Payload ]
                       [ NAP-Information ]
                    *  [ ISP-Information ]
                       [ Protection-Capability]
                       [ PPAC ]
                    *  [ AVP ]

8.2.3  PANA-Start-Answer (PSA)

   PANA-Start-Answer (PSA) is sent by the PaC to PAA.  A message was
      received whose bits in the PANA header were either set to an
      invalid combination, or PAA in response to
   a value that PANA-Start-Request message.

         PANA-Start-Answer ::= < PANA-Header: 2 [SEP] >
                       { Nonce }
                       [ Session-Id ]
                       [ Cookie ]
                       [ EAP-Payload ]
                       [ ISP-Information ]
                    *  [ AVP ]
                   0*1 < MAC >

8.2.4  PANA-Auth-Request (PAR)

   PANA-Auth-Request (PAR) is inconsistent with sent by the
      message type's definition.

   PANA_INVALID_AVP_BITS                   3009

      Error code from PAA to the PaC.

         PANA-Auth-Request ::= < PANA-Header: 3, REQ [SEP] [NAP] >
                       < Session-Id >
                       < EAP-Payload >
                    *  [ AVP ]
                   0*1 < MAC >

8.2.5  PANA-Auth-Answer (PAN)

   PANA-Auth-Answer (PAN) is sent by the PaC or from to the PAA in response to a
   PANA-Auth-Request message.

         PANA-Auth-Answer ::= < PANA-Header: 3 [SEP] [NAP] >
                       < Session-Id >
                       < EAP-Payload >
                    *  [ AVP ]
                   0*1 < MAC >

8.2.6  PANA-Reauth-Request (PRAR)

   PANA-Reauth-Request (PRAR) is sent by the PaC to the PAA.  A message was
      received that included an

         PANA-Reauth-Request ::= < PANA-Header: 4, REQ >
                       < Session-Id >
                    *  [ AVP whose flag bits are set to an
      unrecognized value, or that ]
                   0*1 < MAC >

8.2.7  PANA-Reauth-Answer (PRAA)

   PANA-Reauth-Answer (PRAA) is inconsistent with sent by the AVP's
      definition.

   PANA_AVP_UNSUPPORTED                    5001

      Error code from PAA to the PaC or from PaC in response
   to PAA.  The received
      message contained an a PANA-Reauth-Request message.

         PANA-Reauth-Answer ::= < PANA-Header: 4 >
                       < Session-Id >
                    *  [ AVP that ]
                   0*1 < MAC >

8.2.8  PANA-Bind-Request (PBR)

   PANA-Bind-Request (PBR) is not recognized or supported and
      was marked with the Mandatory bit.  A PANA message with this error
      MUST contain one or more Failed-AVP AVP containing the AVPs that
      caused sent by the failure.

   PANA_UNKNOWN_SESSION_ID                 5002

      Error code from PAA to PaC or from PaC to PAA.  The message
      contained an unknown Session-Id. PAA MUST NOT send this error
      result code value to PaC if PaC sent an unknown the PaC.

         PANA-Bind-Request ::= < PANA-Header: 5, REQ [SEP] [NAP] >
                       < Session-Id in >
                       { Result-Code }
                       { PPAC }
                       { IP-Address }
                       [ EAP-Payload ]
                       [ Session-Lifetime ]
                       [ Protection-Capability ]
                       [ Key-Id ]
                    *  [ Device-Id ]
                    *  [ AVP ]
                   0*1 < MAC >

8.2.9  PANA-Bind-Answer (PBA)

   PANA-Bind-Answer (PBA) is sent by the
      PANA-Start-Answer message (session resumption).

   PANA_INVALID_AVP_VALUE                  5004
      Error code from PAA to PaC or from PaC to PAA.  The message
      contained an AVP with an invalid value in its data portion.  A
      PANA message indicating this error MUST include the offending AVPs
      within a Failed-AVP AVP.

   PANA_MISSING_AVP                        5005

      Error code from PAA in response to PaC or from PaC to PAA.  The message did
      not contain an a
   PANA-Result-Request message.

         PANA-Bind-Answer ::= < PANA-Header: 5 [,SEP] [NAP] >
                       < Session-Id >
                       { Result-Code }
                       [ PPAC ]
                       [ Device-Id ]
                       [ Key-Id ]
                    *  [ AVP that ]
                   0*1 < MAC >

8.2.10  PANA-Ping-Request (PPR)

   PANA-Ping-Request (PPR) is required either sent by the message type
      definition.  If this value is sent in PaC or the Result-Code AVP, a
      Failed-AVP PAA.

         PANA-Ping-Request ::= < PANA-Header: 6, REQ >
                       < Session-Id >
                    *  [ AVP SHOULD be included ]
                   0*1 < MAC >

8.2.11  PANA-Ping-Answer (PPA)

   PANA-Ping-Answer (PPA) is sent in the message.  The Failed-AVP
      AVP MUST contain an example of the missing AVP complete with the
      Vendor-Id if applicable.  The value field of the missing AVP
      should be of correct minimum length and contain zeroes.

   PANA_RESOURCES_EXCEEDED                 5006

      Error code from PAA response to PaC.  A message was received that cannot be
      authorized because the client has already expended allowed
      resources.  An example of this error condition is a client that PANA-Ping-Request.

         PANA-Ping-Answer ::= < PANA-Header: 6 >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

8.2.12  PANA-Termination-Request (PTR)

   PANA-Termination-Request (PTR) is
      restricted to one PANA session and attempts to establish a second
      session.

   PANA_CONTRADICTING_AVPS                 5007

      Error code from PAA to PaC.  The PAA has detected AVPs in sent either by the
      message that contradicted each other, and PaC or the PAA.

         PANA-Termination-Request ::= < PANA-Header: 7, REQ >
                       < Session-Id >
                       < Termination-Cause >
                    *  [ AVP ]
                   0*1 < MAC >

8.2.13  PANA-Termination-Answer (PTA)

   PANA-Termination-Answer (PTA) is not willing to
      provide service to sent either by the client.  One PaC or more Failed-AVP AVPs MUST
      be present, containing the AVPs that contradicted each other.

   PANA_AVP_NOT_ALLOWED                    5008

      Error code from PAA in
   response to PANA-Termination-Request.

         PANA-Termination-Answer ::= < PANA-Header: 7 >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

8.2.14  PANA-Error-Request (PER)

   PANA-Error is sent either by the PaC or from PaC to the PAA.  A message was
      received with an

         PANA-Error-Request ::= < PANA-Header: 8 REQ >
                        < Session-Id >
                        < Result-Code >
                        { Failed-AVP }
                     *  [ AVP that MUST NOT be present.  The Failed-AVP AVP
      MUST be included and contain ]
                    0*1 < MAC >

8.2.15  PANA-Error-Answer (PEA)

   PANA-Error-Answer is sent in response to a copy of PANA-Error-Request.

         PANA-Error-Answer ::= < PANA-Header: 8 >
                        < Session-Id >
                     *  [ AVP ]
                    0*1 < MAC >

8.2.16  PANA-FirstAuth-End-Request (PFER)

   PANA-FirstAuth-End-Request (PFER) is sent by the offending AVP.

   PANA_AVP_OCCURS_TOO_MANY_TIMES          5009

      Error code from PAA to PaC or from the PaC.

         PANA-FirstAuth-End-Request ::= < PANA-Header: 9, REQ [SEP] [NAP] >
                       < Session-Id >
                       { EAP-Payload }
                       { Result-Code }
                       [ Key-Id ]
                    *  [ AVP ]
                   0*1 < MAC >

8.2.17  PANA-FirstAuth-End-Answer (PFEA)

   PANA-FirstAuth-End-Answer (PFEA) is sent by the PaC to PAA.  A message was
      received that included an AVP that appeared more often than
      permitted in the message definition.  The Failed-AVP AVP MUST be
      included and contain PAA in
   response to a copy of PANA-FirstAuth-End-Request message.

         PANA-FirstAuth-End-Answer ::= < PANA-Header: 9, REQ [SEP] [NAP] >
                       < Session-Id >
                       [ Key-Id ]
                    *  [ AVP ]
                   0*1 < MAC >

8.2.18  PANA-Update-Request (PUR)

   PANA-Update-Request (PUR) is sent by the first instance of PaC to the offending PAA.

         PANA-Update-Request ::= < PANA-Header: 10, REQ >
                       < Session-Id >
                       < IP-Address >
                    *  [ AVP that exceeded ]
                   0*1 < MAC >

8.2.19  PANA-Update-Answer (PUA)

   PANA-Update-Answer (PUA) is sent by the maximum number of occurrences.

   PANA_UNSUPPORTED_VERSION                5011
      Error code from PAA to the PaC or from PaC in response to PAA.  This error is
      returned when
   a message was received, whose version PANA-Update-Request.

         PANA-Update-Answer ::= < PANA-Header: 10 >
                       < Session-Id >
                    *  [ AVP ]
                   0*1 < MAC >

8.3  AVPs in PANA

   PANA defines several AVPs that are specific to the protocol.  A
   number is
      unsupported.

   PANA_UNABLE_TO_COMPLY                   5012

      This error is returned when a request is rejected for unspecified
      reasons.  For example, when an EAP authentication fails at an EAP
      pass-through authenticator without passing an EAP-Failure message
      to of others AVPs are reused.  These are specified in other
   documents such as [RFC3588].

   The following tables lists the PAA, a Result-Code AVP with AVPs used in this error code is carried document, and
   specifies in
      PANA-Error message.

   PANA_INVALID_AVP_LENGTH                 5014

      Error code from PAA to PaC which PANA messages they MAY, or from PaC to PAA. MAY NOT be present.

   The message
      contained an AVP with an invalid length. table uses the following symbols:

   0     The PANA-Error message
      indicating this error AVP MUST include NOT be present in the offending AVPs within a
      Failed-AVP AVP.

   PANA_INVALID_MESSAGE_LENGTH             5015

      Error code from PAA to PaC message.

   0+    Zero or from PaC to PAA.  This error is
      returned when a message is received with an invalid message
      length.

   PANA_PROTECTION_CAPABILITY_UNSUPPORTED  5016

      Error code from PaC to PAA.  This error is returned when more instances of the PaC
      receives a PANA-Bind-Request is received with an
      Protection-Capability AVP and a valid MAC AVP but does not support MAY be present in the protection capability specified
         message.

   0-1   Zero or one instance of the AVP MAY be present in the Protection-Capability
      AVP.

   PANA_PPAC_CAPABILITY_UNSUPPORTED  5017

      Error code from PaC to PAA.  This error message.
         It is returned in a
      PANA-Bind-Answer message when considered an error if there is no match between the list are more than one instance
         of PPAC methods offered by the PAA and AVP.

   1     One instance of the ones available on AVP MUST be present in the
      PaC.

   PANA_INVALID_IP_ADDRESS  5018

      Error code from PAA to PaC.  This error is returned in a
      PANA-Error message when message.

   1+    At least one instance of the IP-Address AVP MUST be present in the received
      PANA-Update-Request message is invalid (e.g., a non-unicast
      address).

6.5.8  EAP-Payload AVP

   The
         message.

                          +-----------------------------------------+
                          |                 Message                 |
                          |                   Type                  |
                          +-----+-----+-----+-----+-----+-----+-----+
      Attribute Name      | PSR | PSA | PAR | PAN | PBR | PBA | PDI |
      --------------------+-----+-----+-----+-----+-----+-----+-----+
      Result-Code         |  0  |  0  |  0  |  0  |  1  |  1  |  0  |
      Session-Id          |  0  | 0-1 |  1  |  1  |  1  |  1  |  0  |
      Termination-Cause   |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
      EAP-Payload AVP (AVP Code 1031) is of type OctetString and is
   used to encapsulate the actual EAP packet that is being exchanged
   between the EAP peer and the EAP authenticator.

6.5.9         | 0-1 | 0-1 |  1  | 0-1 | 0-1 |  0  |  0  |
      MAC                 |  0  | 0-1 | 0-1 | 0-1 | 0-1 | 0-1 |  0  |
      Nonce               |  1  |  1  |  0  |  0  |  0  |  0  |  0  |
      Device-Id           |  0  |  0  |  0  |  0  |  0+ | 0-1 |  0  |
      Cookie              | 0-1 | 0-1 |  0  |  0  |  0  |  0  |  0  |
      Protection-Cap.     | 0-1 |  0  |  0  |  0  | 0-1 |  0  |  0  |
      PPAC                | 0-1 |  0  |  0  |  0  |  1  | 0-1 |  0  |
      Session-Lifetime AVP

   The Session-Lifetime AVP (Code 1032) data is of type Unsigned32.  It
   contains the number of seconds remaining before the current session
   is considered expired.

6.5.10  Failed-AVP AVP

   The Failed-AVP AVP (AVP Code 1033) is of type Grouped and provides
   debugging information in cases where a request is rejected or not
   fully processed due to erroneous information in a specific AVP.  The
   format of the    |  0  |  0  |  0  |  0  | 0-1 |  0  |  0  |
      Failed-AVP AVP is defined in [RFC3588].

6.5.11  NAP-Information AVP

   The NAP-Information AVP (AVP Code: 1034) is of type Grouped, and
   contains zero or one Provider-Identifier AVP which carries the
   identifier of the NAP and one Provider-Name AVP which carries the
   name of the NAP.  Its Data field has the following ABNF grammar:

         NAP-Information ::= < AVP Header: 1034 >
                    0*1 { Provider-Identifier }
                        { Provider-Name }
                     *  [ AVP ]

6.5.12  ISP-Information AVP

   The          |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
      ISP-Information     |  0+ | 0-1 |  0  |  0  |  0  |  0  |  0  |
      NAP-Information     | 0-1 |  0  |  0  |  0  |  0  |  0  |  0  |
      Key-Id              |  0  |  0  |  0  |  0  | 0-1 | 0-1 |  0  |
      IP-Address          |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
      --------------------+-----+-----+-----+-----+-----+-----+-----+

                 Figure 11: AVP (AVP Code: 1035) is of type Grouped, and
   contains zero or one Provider-Identifier AVP which carries the
   identifier of the ISP and one Provider-Name AVP which carries the
   name of the ISP.  Its Data field has the following ABNF grammar:

         ISP-Information ::= < AVP Header: 1035 >
                    0*1 { Provider-Identifier }
                        { Provider-Name }
                     *  [ AVP ]

6.5.13  Provider-Identifier AVP

   The Provider-Identifier AVP (AVP Code: 1036) is of type Unsigned32,
   and contains an IANA assigned "SMI Network Management Private
   Enterprise Codes" [ianaweb] value, encoded in network byte order.

6.5.14  Provider-Name AVP

   The Provider-Name AVP (AVP Code: 1037) is of type UTF8String, and
   contains the UTF8-encoded name of the provider.

6.5.15  EP-Device-Id AVP

   The EP-Device-Id AVP (AVP Code: 1038) contains the device identifier
   of an EP.  The payload format of the EP-Device-Id AVP is the same as
   that of the Device-Id AVP (see See section Section 6.5.2).

6.5.16  Key-Id AVP

   The Key-Id AVP (AVP Code: 1039) is of type Integer32, and contains an
   AAA-Key identifier.  The AAA-Key identifier is assigned by PAA and
   MUST be unique within the PANA session.

6.5.17  Post-PANA-Address-Configuration (PPAC) AVP

   The data field of PPAC AVP (Code 1040) is of type Unsigned32.  The
   AVP data is used to carry a set of flags which maps to various IP
   address configuration methods.  When sent by the PAA, the AVP MUST
   have at least one of the flags set, and MAY have more than one set.
   When sent by the PaC, only one of the flags MUST be set.

   The format of the AVP data is as follows: Occurrence Table (1/3)
                          +-------------------------------------+
                          |              Message                |
                          |               Type                  |
                          +-----+-----+-----+-----+------+------+
      Attribute Name      | PPR | PPA | PTR | PTA | PFER | PFEA |
      --------------------+-----+-----+-----+-----+------+------+
      Result-Code         |  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   |
      Session-Id          |  1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |N|D|A|T|I|                   Reserved  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   PPAC Flags

      N (No configuration)

         The PaC does not have to (if sent by PAA) or will not (if sent
         by PaC) configure a new IP address after PANA.

      D (DHCP)
         The PaC can (if sent by PAA) or will (if sent by PaC) use DHCP
         [RFC2131][RFC3315] to configure a new IP address after PANA.

      A (stateless autoconfiguration)

         The PaC can/will use stateless IPv6 address autoconfiguration
         [RFC2462] to configure a new IP address after PANA.

      T (DHCP with IPsec tunnel mode)

         The PaC can/will use [RFC3456] to configure a new IP address
         after PANA.

      I (IKEv2)

         The PaC can/will use [I-D.ietf-ipsec-ikev2] to configure a new
         IP address after PANA.

      Reserved

         These flag bits are reserved for future use, and MUST be set to
         zero, and ignored by the receiver.

   Unless the N-flag is set, the PaC MUST configure a new IP address
   using one of the methods indicated by the other flags.  Refer to
   [I-D.ietf-pana-framework] for a detailed discussion on when these
   methods can be used.

6.5.18  Nonce AVP

   The  1  |  1  |  1  |  1   |  1   |
      Termination-Cause   |  0  |  0  |  1  |  0  |  0   |  0   |
      EAP-Payload         |  0  |  0  |  0  |  0  |  1   |  0   |
      MAC                 | 0-1 | 0-1 | 0-1 | 0-1 | 0-1  | 0-1  |
      Nonce AVP (Code 1041) is of type OctetString.  The data contains
   a randomly generated value in opaque format.  The data length MUST be
   between 8 and 256 bytes inclusive.

6.5.19  IP-Address AVP

   The IP-Address (AVP Code: 1042) contains an IP address of a PaC.  The
   payload format of the IP-Address AVP is the same as that of the
   Device-Id AVP (see See section Section 6.5.2).  Address families for
   IPv4 or IPv6 MUST be used for this AVP.

6.6  AVP Occurrence Table

   The following tables lists the AVPs used in this document, and
   specifies in which PANA messages they MAY, or MAY NOT be present.

   The table uses the following symbols:

   0     The AVP MUST NOT be present in the message.

   0+    Zero or more instances of the AVP MAY be present in the
         message.

   0-1   Zero or one instance of the AVP MAY be present in the message.
         It is considered an error if there are more than one instance
         of the AVP.

   1     One instance of the AVP MUST be present in the message.

   1+    At least one instance of the AVP MUST be present in the
         message.

                          +-----------------------------------------+
                          |        Message                          |               |          Type                           |
                          +-----+-----+-----+-----+-----+-----+-----+
      Attribute Name  0  | PSR  0  | PSA  0  | PAR  0  | PAN  0   | PBR  0   | PBA
      Device-Id           | PDI  0  |
      --------------------+-----+-----+-----+-----+-----+-----+-----+
      Result-Code  0  |  0  |  0  |  0   |  0   |  1
      Cookie              |  1  0  |  0  |
      Session-Id  0  |  0  | 0-1  0   |  1  0   |  1
      Protection-Cap.     |  1  0  |  1  0  | 0-1  0  |
      Termination-Cause  0  |  0   |  0   |
      PPAC                |  0  |  0  |  0  |  0  |  0   |
      EAP-Payload  0   | 0-1
      Session-Lifetime    | 0-1  0  |  1  0  |  1  0  | 0-1  0  |  0   |  0   |
      MAC
      Failed-AVP          |  0  | 0-1 | 0-1  0  | 0-1  0  | 0-1  0  | 0-1  0   |  0   |
      Nonce
      ISP-Information     |  1  0  |  1  0  |  0  |  0  |  0   |  0   |
      NAP-Information     |  0  |
      Device-Id  0  |  0  |  0  |  0   |  0   | 0-1
      Key-Id              | 0-1  0  |  0  |
      Cookie  0  |  0  | 0-1  | 0-1  |
      IP-Address          |  0  |  0  |  0  |  0  |  0   |
      Protection-Cap.  0   | 0-1 |  0  |  0  |  0  | 0-1 |  0  |  0  |
      PPAC                | 0-1 |  0  |  0  |  0  |  1  | 0-1 |  0  |
      Session-Lifetime    |  0  |  0  |  0  |  0  | 0-1 |  0  |  0  |
      Failed-AVP          |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
      ISP-Information     |  0+ | 0-1 |  0  |  0  |  0  |  0  |  0  |
      NAP-Information     | 0-1 |  0  |  0  |  0  |  0  |  0  |  0  |
      EP-Device-Id        |  0  |  0  |  0  |  0  |  0+ |  0  |  0  |
      Key-Id              |  0  |  0  |  0  |  0  | 0-1 | 0-1 |  0  |
      IP-Address          |  0  |  0  |  0  |  0  |  0  |  0  |  0  |
      --------------------+-----+-----+-----+-----+-----+-----+-----+
      --------------------+-----+-----+-----+-----+------+------+

                 Figure 12: AVP Occurrence Table (1/3)
                          +---------------------------------------------+ (2/3)
                          +-------------------------------------+
                          |               Message               |
                          |                Type                 |
                          +------+------+-----+-----+-----+------+------+
                          +-----+-----+-----+-----+------+------+
      Attribute Name      | PRAR | PRAA | PTR PUR | PTA PUA | PER | PFER PEA | PFEA PRAR | PRAA |
      --------------------+------+------+-----+-----+-----+------+------+
      --------------------+-----+-----+-----+-----+------+------+
      Result-Code         |  0  |  0  |  0  1  |  0  |  1  |  1  0   |  0   |
      Session-Id          |  1  |  1  |  1  |  1  |  1   |  1   |  1   |
      Termination-Cause   |  0  |  0  |  1  |  0  |  0  |  0   |  0   |
      EAP-Payload         |  0  |  0  |  0  |  0  |  0   |  1   |  0   |
      MAC                 | 0-1 | 0-1 | 0-1 | 0-1 | 0-1  | 0-1  | 0-1  |
      Nonce               |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      Device-Id           |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      Cookie              |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      Protection-Cap.     |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      PPAC                |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      Session-Lifetime    |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      Failed-AVP          |  0  |  0  |  0  1  |  0  |  1  |  0   |  0   |
      ISP-Information     |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      NAP-Information     |  0  |  0  |  0  |  0  |  0   |  0   |  0   |
      EP-Device-Id        |  0   |  0   |  0  |  0  |  0  |  0   |  0   |
      Key-Id              |  0  |  0  |  0  |  0  |  0   | 0-1  | 0-1  0   |
      IP-Address          |  0   |  0  1  |  0  |  0  |  0  |  0   |  0   |
      --------------------+------+------+-----+-----+-----+------+------+
      --------------------+-----+-----+-----+-----+------+------+

                 Figure 13: AVP Occurrence Table (2/3)
                          +-----------+
                          |  Message  |
                          |   Type    |
                          +-----+-----+
      Attribute Name      | PUR | PUA |
      --------------------+-----+-----+
      Result-Code         |  0  |  0  |
      Session-Id          |  1  |  1  |
      Termination-Cause   |  0  |  0  |
      EAP-Payload         |  0  |  0  | (3/3)

8.3.1  MAC                 | 0-1 | 0-1 |
      Nonce               | AVP

   The first octet (8 bits) of the MAC (AVP Code 1) AVP data contains
   the MAC algorithm type.  Rest of the AVP data payload contains the
   MAC encoded in network byte order.  The 8-bit Algorithm name space is
   managed by IANA [ianaweb].  The AVP length varies depending on the
   used algorithm.

       0  |                   1                   2                   3
       0  |
      Device-Id           | 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Algorithm   |           MAC...
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Algorithm

         1           HMAC-SHA1 (20 bytes)
   MAC

      The Message Authentication Code is encoded in network byte order.

8.3.2  Device-Id AVP

   The Device-Id AVP (AVP Code 2) is of Address type [RFC3588].  IPv4
   and IPv6 addresses are encoded as specified in [RFC3588].  The
   content and format of data (including byte and bit ordering) for
   link-layer addresses is expected to be specified in specific
   documents that describe how IP operates over different link-layers.
   For instance, [RFC2464].  Address families other than that are
   defined for link-layer or IP addresses MUST NOT be used for this AVP.

8.3.3  Session-Id AVP

   All messages pertaining to a specific PANA session MUST include a
   Session-Id AVP (AVP Code 3) which carries a PAA-assigned fix value
   throughout the lifetime of a session.  When present, the Session-Id
   SHOULD appear immediately following the PANA header.

   The Session-Id MUST be globally and eternally unique, as it is meant
   to identify a PANA Session without reference to any other
   information, and may be needed to correlate historical authentication
   information with accounting information.  The PANA Session-Id AVP has
   the same format as the Diameter Session-Id AVP [RFC3588].

8.3.4  Cookie AVP

   The Cookie AVP (AVP Code 4) is of type OctetString.  The data is
   opaque and the exact content is outside the scope of this protocol.

8.3.5  Protection-Capability AVP

   The Protection-Capability AVP (AVP Code 5) is of type Unsigned32.
   The AVP data indicates the cryptographic data protection capability
   supported by the EPs.  Below is a list of specified data protection
   capabilities:

         0          L2_PROTECTION
         1          IPSEC_PROTECTION

8.3.6  Termination-Cause AVP

   The Termination-Cause AVP (AVP Code 6) is of type of type Enumerated,
   and is used to indicate the reason why a session was terminated on
   the access device.  The AVP data is used as a collection of flags The
   following Termination-Cause AVP defined in [RFC3588] are used for
   PANA.

   LOGOUT                   1  (PaC -> PAA)

      The client initiated a disconnect

   ADMINISTRATIVE           4  (PAA -> PaC)

      The client was not granted access, or was disconnected, due to
      administrative reasons, such as the receipt of a
      Abort-Session-Request message.

   SESSION_TIMEOUT          8  (PAA -> PaC)

      The session has timed out, and service has been terminated.

8.3.7  Result-Code AVP

   The Result-Code AVP (AVP Code 7) is of type Unsigned32 and indicates
   whether an EAP authentication was completed successfully or whether
   an error occurred.  Here are Result-Code AVP values taken from
   [RFC3588] and adapted for PANA.

8.3.7.1  Authentication Results Codes

   These result code values inform the PaC about the authentication and
   authorization result.  The authentication result and authorization
   result can be different as described below, but only one result that
   corresponds to the one detected first is returned.

   PANA_SUCCESS                            2001

      Both the authentication and authorization processes are
      successful.

   PANA_AUTHENTICATION_REJECTED            4001

      The authentication process failed.  When this error is returned,
      the authorization process also fails.

   PANA_AUTHORIZATION_REJECTED             5003

      The authorization process failed.  This error could occur when
      authorization is rejected by a AAA proxy or rejected locally by a
      PAA, even if the authentication procedure succeeds.

8.3.7.2  Protocol Error Result Codes

   Protocol error result code values.

   PANA_MESSAGE_UNSUPPORTED                3001

      Error code from PAA to PaC or from PaC to PAA.  Message type not
      recognized or supported.

   PANA_UNABLE_TO_DELIVER                  3002

      Error code from PAA to PaC.  PAA was unable to deliver the EAP
      payload to the authentication server.

   PANA_INVALID_HDR_BITS                   3008

      Error code from PAA to PaC or from PaC to PAA.  A message was
      received whose bits in the PANA header were either set to an
      invalid combination, or to a value that is inconsistent with the
      message type's definition.

   PANA_INVALID_AVP_BITS                   3009

      Error code from PAA to PaC or from PaC to PAA.  A message was
      received that included an AVP whose flag bits are set to an
      unrecognized value, or that is inconsistent with the AVP's
      definition.

   PANA_AVP_UNSUPPORTED                    5001

      Error code from PAA to PaC or from PaC to PAA.  The received
      message contained an AVP that is not recognized or supported and
      was marked with the Mandatory bit.  A PANA message with this error
      MUST contain one or more Failed-AVP AVP containing the AVPs that
      caused the failure.

   PANA_UNKNOWN_SESSION_ID                 5002

      Error code from PAA to PaC or from PaC to PAA.  The message
      contained an unknown Session-Id.  PAA MUST NOT send this error
      result code value to PaC if PaC sent an unknown Session-Id in the
      PANA-Start-Answer message (session resumption).

   PANA_INVALID_AVP_VALUE                  5004
      Error code from PAA to PaC or from PaC to PAA.  The message
      contained an AVP with an invalid value in its data portion.  A
      PANA message indicating this error MUST include the offending AVPs
      within a Failed-AVP AVP.

   PANA_MISSING_AVP                        5005

      Error code from PAA to PaC or from PaC to PAA.  The message did
      not contain an AVP that is required by the message type
      definition.  If this value is sent in the Result-Code AVP, a
      Failed-AVP AVP SHOULD be included in the message.  The Failed-AVP
      AVP MUST contain an example of the missing AVP complete with the
      Vendor-Id if applicable.  The value field of the missing AVP
      should be of correct minimum length and contain zeroes.

   PANA_RESOURCES_EXCEEDED                 5006

      Error code from PAA to PaC.  A message was received that cannot be
      authorized because the client has already expended allowed
      resources.  An example of this error condition is a client that is
      restricted to one PANA session and attempts to establish a second
      session.

   PANA_CONTRADICTING_AVPS                 5007

      Error code from PAA to PaC.  The PAA has detected AVPs in the
      message that contradicted each other, and is not willing to
      provide service to the client.  One or more Failed-AVP AVPs MUST
      be present, containing the AVPs that contradicted each other.

   PANA_AVP_NOT_ALLOWED                    5008

      Error code from PAA to PaC or from PaC to PAA.  A message was
      received with an AVP that MUST NOT be present.  The Failed-AVP AVP
      MUST be included and contain a copy of the offending AVP.

   PANA_AVP_OCCURS_TOO_MANY_TIMES          5009

      Error code from PAA to PaC or from PaC to PAA.  A message was
      received that included an AVP that appeared more often than
      permitted in the message definition.  The Failed-AVP AVP MUST be
      included and contain a copy of the first instance of the offending
      AVP that exceeded the maximum number of occurrences.

   PANA_UNSUPPORTED_VERSION                5011
      Error code from PAA to PaC or from PaC to PAA.  This error is
      returned when a message was received, whose version number is
      unsupported.

   PANA_UNABLE_TO_COMPLY                   5012

      This error is returned when a request is rejected for unspecified
      reasons.  For example, when an EAP authentication fails at an EAP
      pass-through authenticator without passing an EAP-Failure message
      to the PAA, a Result-Code AVP with this error code is carried in
      PANA-Error-Request message.

   PANA_INVALID_AVP_LENGTH                 5014

      Error code from PAA to PaC or from PaC to PAA.  The message
      contained an AVP with an invalid length.  The PANA-Error message
      indicating this error MUST include the offending AVPs within a
      Failed-AVP AVP.

   PANA_INVALID_MESSAGE_LENGTH             5015

      Error code from PAA to PaC or from PaC to PAA.  This error is
      returned when a message is received with an invalid message
      length.

   PANA_PROTECTION_CAPABILITY_UNSUPPORTED  5016

      Error code from PaC to PAA.  This error is returned when the PaC
      receives a PANA-Bind-Request with a Protection-Capability AVP and
      a valid MAC AVP but does not support the protection capability
      specified in the Protection-Capability AVP.

   PANA_PPAC_CAPABILITY_UNSUPPORTED  5017

      Error code from PaC to PAA.  This error is returned in a
      PANA-Bind-Answer message when there is no match between the list
      of PPAC methods offered by the PAA and the ones available on the
      PaC.

   PANA_INVALID_IP_ADDRESS  5018

      Error code from PAA to PaC.  This error is returned in a
      PANA-Error-Request message when the IP-Address AVP in the received
      PANA-Update-Request message is invalid (e.g., a non-unicast
      address).

8.3.8  EAP-Payload AVP

   The EAP-Payload AVP (AVP Code 8) is of type OctetString and is used
   to encapsulate the actual EAP packet that is being exchanged between
   the EAP peer and the EAP authenticator.

8.3.9  Session-Lifetime AVP

   The Session-Lifetime AVP (AVP Code 9) data is of type Unsigned32.  It
   contains the number of seconds remaining before the current session
   is considered expired.

8.3.10  Failed-AVP AVP

   The Failed-AVP AVP (AVP Code 10) is of type Grouped and provides
   debugging information in cases where a request is rejected or not
   fully processed due to erroneous information in a specific AVP.  The
   format of the Failed-AVP AVP is defined in [RFC3588].

8.3.11  NAP-Information AVP

   The NAP-Information AVP (AVP Code 11) is of type Grouped, and
   contains zero or one Provider-Identifier AVP which carries the
   identifier of the NAP and one Provider-Name AVP which carries the
   name of the NAP.  Its Data field has the following ABNF grammar:

         NAP-Information ::= < AVP Header: 11 >
                    0*1 { Provider-Identifier }
                        { Provider-Name }
                     *  [ AVP ]

8.3.12  ISP-Information AVP

   The ISP-Information AVP (AVP Code 12) is of type Grouped, and
   contains zero or one Provider-Identifier AVP which carries the
   identifier of the ISP and one Provider-Name AVP which carries the
   name of the ISP.  Its Data field has the following ABNF grammar:

         ISP-Information ::= < AVP Header: 12 >
                    0*1 { Provider-Identifier }
                        { Provider-Name }
                     *  [ AVP ]

8.3.13  Provider-Identifier AVP

   The Provider-Identifier AVP (AVP Code 13) is of type Unsigned32, and
   contains an IANA assigned "SMI Network Management Private Enterprise
   Codes" [ianaweb] value, encoded in network byte order.

8.3.14  Provider-Name AVP

   The Provider-Name AVP (AVP Code 14) is of type UTF8String, and
   contains the UTF8-encoded name of the provider.

8.3.15  Key-Id AVP

   The Key-Id AVP (AVP Code 15) is of type Integer32, and contains an
   AAA-Key identifier.  The AAA-Key identifier is assigned by PAA and
   MUST be unique within the PANA session.

8.3.16  Post-PANA-Address-Configuration (PPAC) AVP

   The data field of PPAC AVP (AVP Code 16) is of type Unsigned32.  The
   AVP data is used to carry a set of flags which maps to various IP
   address configuration methods.  When sent by the PAA, the AVP MUST
   have at least one of the flags set, and MAY have more than one set.
   When sent by the PaC, only one of the flags MUST be set.

   The format of the AVP data is as follows:

       0  |
      Cookie              |                   1                   2                   3
       0  | 1 2 3 4 5 6 7 8 9 0  |
      Protection-Cap.     | 1 2 3 4 5 6 7 8 9 0  | 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |N|D|A|T|I|                   Reserved                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   PPAC                |  0  |  0  |
      Session-Lifetime    |  0  |  0  |
      Failed-AVP          |  0  |  0  |
      ISP-Information     |  0  |  0  |
      NAP-Information     |  0  |  0  |
      EP-Device-Id        |  0  |  0  |
      Key-Id              |  0  |  0  | Flags

      N (No configuration)

         The PaC does not have to (if sent by PAA) or will not (if sent
         by PaC) configure a new IP address after PANA.

      D (DHCP)

         The PaC can (if sent by PAA) or will (if sent by PaC) use DHCP
         [RFC2131][RFC3315] to configure a new IP address after PANA.

      A (stateless autoconfiguration)

         The PaC can/will use stateless IPv6 address autoconfiguration
         [RFC2462] to configure a new IP address after PANA.

      T (DHCP with IPsec tunnel mode)

         The PaC can/will use [RFC3456] to configure a new IP address
         after PANA.

      I (IKEv2)

         The PaC can/will use [I-D.ietf-ipsec-ikev2] to configure a new
         IP address after PANA.

      Reserved

         These flag bits are reserved for future use, and MUST be set to
         zero, and ignored by the receiver.

   Unless the N-flag is set, the PaC MUST configure a new IP address
   using one of the methods indicated by the other flags.  Refer to
   [I-D.ietf-pana-framework] for a detailed discussion on when these
   methods can be used.

8.3.17  Nonce AVP

   The Nonce AVP (AVP Code 17) is of type OctetString.  The data
   contains a randomly generated value in opaque format.  The data
   length MUST be between 8 and 256 bytes inclusive.

8.3.18  IP-Address          |  1  |  0  |
      --------------------+-----+-----+

                 Figure 14: AVP Occurrence Table (3/3)

7.

   The IP-Address (AVP Code 18) contains an IP address of n a PaC or
   PAA.  The payload format of the IP-Address AVP is the same as that of
   the Device-Id AVP (see See Section 8.3.2).  Address families for IPv4
   or IPv6 MUST be used for this AVP.  Address families for IPv4 or IPv6
   MUST be used for this AVP.

9.  PANA Protocol Message Retransmissions

   The PANA protocol provides retransmissions for all the message
   exchanges except PANA-Auth-Request/Answer.  PANA-Auth-Request
   messages carry EAP requests which are retransmitted by the EAP
   protocol entities when needed.  The messages that need PANA-level
   retransmissions are listed below: PANA-PAA-Discover (PDI)
         PANA-Start-Request (PSR)*
         PANA-Start-Answer (PSA)**
         PANA-Bind-Request (PBR)
         PANA-FirstAuth-End-Request (PFER)
         PANA-Reauth-Request (PRAR)
         PANA-Termination-Request (PTR)
         PANA-Update-Request (PUR)

         *)  PSR that carries a Cookie AVP is not retransmitted.
         **) PSA that does not carry a Cookie AVP is not retransmitted.

   The PDI and PSA messages are always sent by the PaC.  PBR is sent by
   PAA.  The last two messages, PRAR
   and PTR are sent either by PaC or
   PAA. request messages.

   The rule is that the sender of the request message retransmits the
   request if the corresponding answer is not received in time.  Answer
   messages are sent as answers the corresponding answer is not received in time.  Answer
   messages are sent as answers to the request messages, not based on a
   timer.

   PaC MUST retransmit PANA-PAA-Discover if a subsequent
   PANA-Start-Request is not received in time.  Even though a
   PANA-Start-Request is received, PANA-PAA-Discover may still have to
   be retransmitted.  This is because a stateless PANA handshake
   requires one time transmission of a PANA-Start-Request.  PAA MUST NOT
   start a timer and retransmit the request if it wants to avoid state
   creation.  If the request messages, not based on received PANA-Start-Request included a
   timer.  Exception to this rule is the PSA message.  Because Cookie AVP
   (an indication of the stateless nature of the PAA in the beginning handshake), PaC provides
   retransmission also for the PSA message.  PANA-Error messages MUST
   NOT be retransmitted.  See Section 4.1.8 for more details of PANA
   error handling. retransmit
   PANA-PAA-Discover until the first PANA-Auth-Request is received.

   PANA retransmission timers are based on the model used in DHCPv6
   [RFC3315].  Variables used here are also borrowed from this
   specification.  PANA is a request response like protocol.  The
   message exchange terminates when either the request sender
   successfully receives the appropriate answer, or when the message
   exchange is considered to have failed according to the retransmission
   mechanism described below.

   The retransmission behavior is controlled and described by the
   following variables:

         RT     Retransmission timeout

         IRT    Initial retransmission time

         MRC    Maximum retransmission count

         MRT    Maximum retransmission time

         MRD    Maximum retransmission duration

         RAND   Randomization factor

   With each message transmission or retransmission, the sender sets RT
   according to the rules given below.  If RT expires before the message
   exchange terminates, the sender recomputes RT and retransmits the
   message.

   Each of the computations of a new RT include a randomization factor
   (RAND), which is a random number chosen with a uniform distribution
   between -0.1 and +0.1.  The randomization factor is included to
   minimize synchronization of messages.

   The algorithm for choosing a random number does not need to be
   cryptographically sound.  The algorithm SHOULD produce a different
   sequence of random numbers from each invocation.

   RT for the first message transmission is based on IRT:

         RT = IRT + RAND*IRT

   RT for each subsequent message transmission is based on the previous
   value of RT:

         RT = 2*RTprev + RAND*RTprev

   MRT specifies an upper bound on the value of RT (disregarding the
   randomization added by the use of RAND).  If MRT has a value of 0,
   there is no upper limit on the value of RT.  Otherwise:

         if (RT > MRT)
            RT = MRT + RAND*MRT

   MRC specifies an upper bound on the number of times a sender may
   retransmit a message.  Unless MRC is zero, the message exchange fails
   once the sender has transmitted the message MRC times.

   MRD specifies an upper bound on the length of time a sender may
   retransmit a message.  Unless MRD is zero, the message exchange fails
   once MRD seconds have elapsed since the client first transmitted the
   message.

   If both MRC and MRD are non-zero, the message exchange fails whenever
   either of the conditions specified in the previous two paragraphs are
   met.

   If both MRC and MRD are zero, the client continues to transmit the
   message until it receives a response.

7.1

9.1  Transmission and Retransmission Parameters

   This section presents a table of values used to describe the message
   retransmission behavior of request PANA requests (REQ_*) and PANA-Start-Answer messages
   marked with REQ_*.
   PANA-PAA-Discover message retransmission values
   are marked with PDI_*. (PDI_*).  The table shows default values.

           Parameter       Default   Description
           ------------------------------------------------
           PDI_IRT           1 sec   Initial PDI timeout.
           PDI_MRT         120 secs  Max PDI timeout value.
           PDI_MRC           0       Configurable.
           PDI_MRD           0       Configurable.

           REQ_IRT           1 sec   Initial Request timeout.
           REQ_MRT          30 secs  Max Request timeout value.
           REQ_MRC          10       Max Request retry attempts.
           REQ_MRD           0       Configurable.

   So for example the first RT for the PBR message is calculated using
   REQ_IRT as the IRT:

           RT = REQ_IRT + RAND*REQ_IRT

8.

10.  IANA Considerations

   This section provides guidance to the Internet Assigned Numbers
   Authority (IANA) regarding registration of values related to the PANA
   protocol, in accordance with BCP 26 [IANA].  The following policies
   are used here with the meanings defined in BCP 26: "Private Use",
   "First Come First Served", "Expert Review", "Specification Required",
   "IETF Consensus", "Standards Action".

   This section explains the criteria to be used by the IANA for
   assignment of numbers within namespaces defined within this document.

   For registration requests where a Designated Expert should be
   consulted, the responsible IESG area director should appoint the
   Designated Expert.  For Designated Expert with Specification
   Required, the request is posted to the PANA WG mailing list (or, if
   it has been disbanded, a successor designated by the Area Director)
   for comment and review, and MUST include a pointer to a public
   specification.  Before a period of 30 days has passed, the Designated
   Expert will either approve or deny the registration request and
   publish a notice of the decision to the PANA WG mailing list or its
   successor.  A denial notice must be justified by an explanation and,
   in the cases where it is possible, concrete suggestions on how the
   request can be modified so as to become acceptable.

8.1

10.1  PANA UDP Port Number

   PANA uses one well-known UDP port number (Section 4.1.2, 5.2, Section 4.2 4.1
   and Section 6.1, 7.1, which needs to be assigned by the IANA.

8.2

10.2  PANA Multicast Address

   PANA uses one well-known IPv4 multicast address for which the scope
   is limited to be link-local by setting the TTL field to 255, and one
   well-known IPv6 link-local scoped multicast address (Section 4.2 4.1 and
   Section 6.1), 7.1), which need to be assigned by the IANA.

8.3

10.3  PANA Header

   As defined in Section 6.2, 7.2, the PANA header contains two fields that
   requires IANA namespace management; the Message Type and Flags field.

8.3.1

10.3.1  Message Type

   The Message Type namespace is used to identify PANA messages.  Values
   0-65,533 are for permanent, standard message types, allocated by IETF
   Consensus [IANA].  This document defines the Message Types 1-10.  See
   Section 8.2.1 through Section 8.2.19 for the assignment of the
   namespace in this specification.

   The values 65,534 and 65,535 (hexadecimal values 0xfffe - 0xffff) are
   reserved for experimental messages.  As these codes are only for
   experimental and testing purposes, no guarantee is made for
   interoperability between communicating PaC and PAA using experimental
   commands, as outlined in [IANA-EXP].

10.3.2  Flags

   There are 16 bits in the Flags field of the PANA header.  This
   document assigns bit 0 ('R'equest), bit 1 ('S'eparate) and bit 2
   ('N'AP Authentication).  The remaining bits MUST only be assigned via
   a Standards Action [IANA].

10.4  AVP Header

   As defined in Section 7.3, the AVP header contains three fields that
   requires IANA namespace management; the AVP Code, AVP Flags and
   Vendor-Id fields where only the AVP Code and AVP Flags create new
   namespaces.

10.4.1  AVP Code

   The Message Type AVP Code namespace is used to identify PANA messages.  Values
   0-16,777,213 attributes.  There are for permanent, standard message types, allocated
   multiple namespaces.  Vendors can have their own AVP Codes namespace
   which will be identified by their Vendor-ID (also known as
   Enterprise-Number) and they control the assignments of their
   vendor-specific AVP codes within their own namespace.  The absence of
   a Vendor-ID or a Vendor-ID value of zero (0) identifies the IETF Consensus [IANA]. IANA
   controlled AVP Codes namespace.  The AVP Codes and sometimes also
   possible values in an AVP are controlled and maintained by IANA.

   AVP Code 0 is not used.  This document defines the Message Types 1-8. AVP Codes 1-18.
   See Section 6.4.1 8.3.1 through Section 8.3.18 for the assignment of the
   namespace in this specification.

   The values 16,777,214 and 16,777,215 (hexadecimal values 0xfffffe -
   0xffffff) are reserved

   AVPs may be allocated following Designated Expert with Specification
   Required [IANA].  Release of blocks of AVPs (more than 3 at a time
   for experimental messages.  As these a given purpose) should require IETF Consensus.

   Note that PANA defines a mechanism for Vendor-Specific AVPs, where
   the Vendor-Id field in the AVP header is set to a non-zero value.
   Vendor-Specific AVPs codes are
   only for experimental Private Use and testing purposes, no guarantee is made should be
   encouraged instead of allocation of global attribute types, for
   functions specific only to one vendor's implementation of PANA, where
   no interoperability between communicating PaC and PAA using experimental
   commands, as outlined in [IANA-EXP].

8.3.2 is deemed useful.  Where a Vendor-Specific AVP is
   implemented by more than one vendor, allocation of global AVPs should
   be encouraged instead.

10.4.2  Flags

   There are eight 16 bits in the AVP Flags field of the PANA header. AVP header, defined
   in Section 7.3.  This document assigns bit 0 ('R'equest), bit 4 ('S'eparate) ('V'endor Specific) and
   bit 5
   ('N'AP Authentication). 1 ('M'andatory).  The remaining bits MUST should only be assigned via
   a Standards Action .

10.5  AVP Values

   Certain AVPs in PANA define a list of values with various meanings.
   For attributes other than those specified in this section, adding
   additional values to the list can be done on a First Come, First
   Served basis by IANA [IANA].

8.4

10.5.1  Algorithm Values of MAC AVP Header

   As defined in Section 6.3, 8.3.1, the Algorithm field of MAC AVP header contains three fields that
   requires IANA namespace management; (AVP Code
   1) defines the value of 1 (one) for HMAC-SHA1.

   All remaining values are available for assignment via IETF Consensus
   [IANA].

10.5.2  Protection-Capability AVP Code, AVP Flags and
   Vendor-Id fields where only Values

   As defined in Section 8.3.5, the Protection-Capability AVP (AVP Code
   5) defines the values 0 and AVP Flags create new
   namespaces.

8.4.1  AVP Code

   The AVP Code namespace is used to identify attributes.  There 1.

   All remaining values are
   multiple namespaces.  Vendors can have their own available for assignment via a Standards
   Action [IANA].

10.5.3  Termination-Cause AVP Codes namespace
   which will be identified by their Vendor-ID (also known as
   Enterprise-Number) and they control Values

   As defined in Section 8.3.6, the assignments of their
   vendor-specific Termination-Cause AVP codes within their own namespace.  The absence of
   a Vendor-ID or a Vendor-ID value of zero (0) identifies (AVP Code 6)
   defines the IETF IANA
   controlled AVP Codes namespace.  The AVP Codes values 1, 4 and sometimes also
   possible 8.

   All remaining values in an AVP are controlled available for assignment via IETF Consensus
   [IANA].

10.5.4  Result-Code AVP Values

   As defined in Section 8.3.7.1 and maintained by IANA. Section 8.3.7.2 the Result-Code AVP
   (AVP Code 0 is not used.  This document 7) defines the AVP Codes
   1024-1041.  See values 2001, 3001-3002, 3008-3009, 4001,
   5001-5009 and 5011-5019.

   All remaining values are available for assignment via IETF Consensus
   [IANA].

10.5.5  Post-PANA-Address-Configuration AVP Values

   As defined in Section 6.5 for 8.3.16, the assignment of Post-PANA-Address-Configuration AVP
   (AVP Code 17) defines the namespace in
   this specification.

   AVPs may be allocated following Designated Expert with Specification
   Required [IANA].  Release of blocks of AVPs (more than bits 0 ('N': no configuration), 1 ('D':
   DHCP), 2 ('A' stateless autoconfiguration), 3 at a time ('T': DHCP with IPsec
   tunnel mode) and 4 ('I': IKEv2).

   All remaining values are available for assignment via a given purpose) should require IETF Consensus.

   Note that Standards
   Action [IANA].

11.  Security Considerations

   The PANA protocol defines a mechanism for Vendor-Specific AVPs, where
   the Vendor-Id field in UDP-based EAP encapsulation that runs
   between two IP-enabled nodes on the AVP header is set same IP link.  Various security
   threats that are relevant to a non-zero value.
   Vendor-Specific AVPs codes are for Private Use and should be
   encouraged instead protocol of allocation this nature are outlined
   in [I-D.ietf-pana-threats-eval].  Security considerations stemming
   from the use of global attribute types, for
   functions specific only EAP and EAP methods are discussed in [RFC3748].  This
   section provides a discussion on the security-related issues that are
   related to one vendor's implementation PANA framework and protocol design.

   An important element in assessing security of PANA, where
   no interoperability is deemed useful.  Where PANA design and
   deployment in a Vendor-Specific AVP network is
   implemented by more than one vendor, allocation the presence of global AVPs should lower-layer (physical and
   link-layer) security.  In the context of this document, lower-layers
   are said to be encouraged instead.

8.4.2  Flags

   There secure if they can prevent eavesdropping and spoofing
   of packets.  Examples of such networks are 8 bits in physically-secured DSL
   networks and 3GPP2 networks with crytographically-secured cdma2000
   link-layer.

   In these examples, the AVP Flags field of lower-layer security is enabled even before
   running the first PANA-based authentication.  In the AVP header, defined in
   Section 6.3.  This document assigns bit 0 ('V'endor Specific) and bit
   1 ('M'andatory).  The remaining bits should only be assigned via absence of such
   a
   Standards Action .

8.5  AVP Values

   Certain AVPs pre-established secure channel, one needs to be created in
   conjunction with PANA define using a list of values with various meanings.
   For attributes other than those specified in this section, adding
   additional values link-layer or network-layer
   cryptographic mechanism (e.g., IPsec).

11.1  General Security Measures

   PANA provides multiple mechanisms to the list can be done on secure a First Come, First
   Served basis by IANA [IANA].

8.5.1  Algorithm Values of MAC AVP

   As defined in Section 6.5.1, PANA session.

   Since PaC and PAA are on the Algorithm field of MAC AVP (AVP Code
   1024) defines same IP link, a simple TTL check on the value of
   received PANA messages prevents off-link attacks.

   PANA messages carry sequence numbers, which are monotonically
   incremented by 1 (one) for HMAC-SHA1.

   All remaining values with every new request message.  These numbers are available for assignment via IETF Consensus
   [IANA].

8.5.2  Protection-Capability AVP Values

   As defined in Section 6.5.5,
   randomly initialized at the Protection-Capability AVP (AVP Code
   1028) defines beginning of the values 0 session, and 1.

   All remaining values are available for assignment via a Standards
   Action [IANA].

8.5.3  Termination-Cause AVP Values

   As defined in Section 6.5.6, the Termination-Cause AVP (AVP Code
   1029) defines verified
   against expected numbers upon receipt.  A message whose sequence
   number is different than the values 1, 4 expected one is silently discarded.  In
   addition to accomplishing orderly delivery of EAP messages and 8.

   All remaining values are available for assignment via IETF Consensus
   [IANA].

8.5.4  Result-Code AVP Values

   As defined in Section 6.5.7,
   duplicate elimination, this scheme also helps prevent an adversary
   spoof messages to disturb ongoing PANA and EAP sessions unless it can
   also eavesdrop to synchronize on the Result-Code AVP (AVP Code 1030) expected sequence number.

   The PANA framework defines EP which is ideally located on a network
   device that can filter traffic from the values 2001, 3001-3002, 3008-3009, 4001, 5001-5009 and
   5011-5019.

   All remaining values are available for assignment via IETF Consensus
   [IANA].

8.5.5  Post-PANA-Address-Configuration AVP Values

   As defined in Section 6.5.17, PaCs before the Post-PANA-Address-Configuration AVP
   (AVP Code 1040) defines traffic
   enters the bits 0 ('N': no configuration), 1 ('D':
   DHCP), 2 ('A' stateless autoconfiguration), 3 ('T': DHCP with IPsec
   tunnel mode) and 4 ('I': IKEv2).

   All remaining values are available for assignment via Internet.  A set of filters can be used to discard
   unauthorized packets, such as a Standards
   Action [IANA].

9.  Security Considerations PANA-Start-Request message that is
   received from the segment of the access network where only PaCs are
   supposed to be connected.

   The PANA protocol also provides ordered delivery for EAP messages.  If an authentication and integrity protection to
   PANA messages when the used EAP method that provides can generate cryptographic
   session keys is used, a keys.  A PANA SA is created.
   The generated based on the AAA-Key exported
   by the EAP Success/Failure message method.  This SA is one of used for generating per-packet MAC to
   protect the PANA header and payload (including the signaling complete EAP
   message).

   The cryptographic protection prevents an adversary from acting as a
   man-in-the-middle, injecting messages, replaying messages
   which and
   modifying the content of the exchanged messages.  Any packet that
   fails to pass the MAC verification is integrity protected with this PANA SA. silently discarded.  The PANA protocol
   does not provide security
   earliest this protection for can be enabled is when the very first
   PANA-Bind-Request that signals a successful authentication is
   generated.  Starting with the initial EAP PANA-Bind-Request and PANA-Bind-Answer,
   any subsequent PANA message
   exchange.  Integrity protection can only be provided after until the PANA
   SA has been established.  Thus, PANA re-authentication, revocation
   and disconnect notifications session gets torn down can be authenticated, integrity and
   replay
   cryptographically protected.  In certain environments (e.g., on a shared link)
   the EAP method selection is an important issue.

   The PANA framework described in this document covers the discussion
   of different protocols which are SA enables authenticated and integrity protected exchange of interest for a protocol
   the device ID information between the PaC and PAA.  This ensures
   there were no man-in-the-middle during the PAA (typically referred as PANA authentication.

   The lifetime of the PANA SA is bounded by the AAA-authorized session
   lifetime with an additional tolerance period.  Unless PANA state is
   updated by executing another EAP authentication, the PANA protocol). SA is
   removed when the current session expires.

   The ability to use cryptographic protection within PANA itself consists of a sequence of steps is determined
   by the used EAP method, which are executed to
   complete is generally dictated by the network access authentication procedure.  Some deployment
   environment.  Insecure lower-layers necessitate use of these
   steps key-generating
   EAP methods.  In networks where lower-layers are optional.

   The following execution steps have been identified as being relevant
   for PANA.  They security considerations will be discussed in detail
   subsequently.

   a) already secured,
   cryptographic protection of PANA messages is not necessary.

11.2  Discovery message exchange

   In general it

   The discovery and handshake phase is difficult vulnerable to prevent a vulnerabilities of the
   discovery protocol since the initial discovery spoofing attacks
   as these messages are unsecured.  To not authenticated and integrity protected.  In
   order to prevent very basic denial-of service attacks an adversary
   should not be able to cause state creation with by sending discovery
   messages at to the PAA.  This protection is prevented achieved by re-using using a cookie concept (see
   cookie-based scheme (similar to [RFC2522] which allows the responder
   (PAA) to be stateless in the first message exchange.  Because of
   the architectural assumptions made in PANA (i.e., the PAA is the on
   the same link as the PaC) the round of message exchange.  A
   return-routability concept test does not provide additional protection.  Hence it protection as
   PANA traffic is not routed but simply forwarded on-link.  It is
   difficult to prevent this threat entirely.  Furthermore it is not possible to shift heavy
   cryptographic operations to the PaC at the first few messages since
   the computational effort depends on the EAP method.  The usage of
   client-puzzles as introduced by [jb99] is under investigation.

   Resistance against blind DoS attacks (i.e., attacks by off-path
   adversaries) is achieved with sequence numbers and cookies.

   Since PAA and PaC are supposed to be one IP hop away, a simple TTL
   check can prevent off-link attacks.  Furthermore, additional
   filtering can be enabled on the EPs.  An EP may be able to filter
   unauthorized PAA advertisements when they are received on the access
   side of the network where only PaCs are connected.

   In networks where lower-layers are not secured prior to running PANA,
   the capability discovery enabled through inclusion of
   Protection-Capability and Post-PANA-Address-Configuration AVPs in a
   PANA-Start-Request message is susceptible to spoofing.  Therefore,
   usage of these AVPs during the discovery phase in such insecure
   networks is NOT RECOMMENDED.  The same AVPs are delivered via an
   integrity-protected PANA-Bind-Request upon successful authentication.

   b) EAP over PANA message exchange

   The EAP derived session key is used to create a PANA security
   association.  Since the execution of an EAP method might require a
   large number of roundtrips and no other session key is available it
   is not possible to secure the EAP message exchange itself.  Hence an
   adversary can both eavesdrop the EAP messages and is also able to
   inject arbitrary messages which might confuse both the EAP peer on
   PaC and the EAP authenticator or authentication server on the PAA.
   The threats caused by this ability heavily depend on the EAP state
   machine.  Since especially the PAA is not allowed to discard packets
   and packets have to be stored or forwarded spoofing leading to an AAA infrastructure
   some risk
   denial-of service attacks.  Therefore, usage of DoS attacks exists. these AVPs during the
   discovery and handshake phase in such insecure networks is NOT
   RECOMMENDED.  The same AVPs are delivered via an integrity-protected
   PANA-Bind-Request upon successful authentication.

11.3  EAP Methods

   Eavesdropping EAP packets might cause problems when (a) the EAP method is
   weak and enables dictionary or replay attacks or even allows an
   adversary to learn the long-term password directly.  Furthermore, if
   the optional EAP Identity payload is used then it
   allows the adversary to learn the identity of the PaC.  In such a
   case a privacy problem is prevalent.

   To prevent these threats, [I-D.ietf-pana-framework] suggests using
   proper EAP methods for particular environments.  Depending on the
   usage environment an EAP authentication has to be used for example
   which supports user identity confidentiality, protection against
   dictionary attacks and session key establishment.  It is therefore
   the responsibility of the network operators and end users to choose
   the proper EAP method.

   PANA does not protect the EAP method exchange, but provides ordered
   delivery with sequence numbers.  Sequence numbers and cookies provide
   resistance against blind DoS attacks.

   c) PANA SA establishment

   Once the EAP message authentication is finished a fresh and unique
   session key is available to the PaC and the PAA.  This assumes that
   the EAP method allows session key derivation and that the generated
   session key has a good quality.  For further discussion about the
   importance of the session key generation refer to the next subsection
   (d) about compound authentication.  The session key available for the
   PaC is established as part of the authentication and key exchange
   procedure of the selected EAP method.  The PAA obtains the session
   key via the AAA infrastructure (if used).  Security issues raised
   with this session key transport are described in
   [I-D.ietf-eap-keying].

   The establishment of a PANA SA is required in environments where no
   physical or link layer security is available.  The PANA SA used then it allows
   subsequently exchanged messages the
   adversary to experience cryptographic
   protection.  For learn the current version identity of the document an integrity
   object (MAC AVP) PaC.  In such a case a privacy
   problem is defined prevalent.

   To prevent these threats, [I-D.ietf-pana-framework] suggests using
   proper EAP methods for particular environments.  Depending on the
   deployment environment an EAP authentication which supports data-origin
   authentication, replay user
   identity confidentiality, protection based on sequence numbers against dictionary attacks and
   integrity protection based on a keyed message digest.
   Confidentiality protection is not provided.  The
   session keys used
   for this object have to key establishment must be provided by used.  It is therefore the EAP method.  For this
   version
   responsibility of the document it is assumed that no negotiation of
   algorithms network operators and parameters takes place.  Instead HMAC-SHA1 is used by
   default.  A different algorithm may be chosen by default in users to choose a future
   version of the PANA protocol specification. proper
   EAP method.

11.4  Separate NAP and ISP Authentication

   The used algorithm is
   indicated in the header of the Integrity object.  To select the
   security association PANA design allows running two separate EAP sessions for signaling message protection the Session ID
   is conveyed.  The keyed message digest included same
   PaC in a single authentication phase: one with the Integrity
   object will include all fields of the PANA signaling message
   including the sequence number fields of NAP, and one with
   the packet. ISP.  The protection process of subsequent signaling messages prevents an adversary
   from acting as a man-in-the-middle adversary, from injecting packets,
   from replaying messages and from modifying arriving at the content resultant authorization,
   which is a combination of the
   exchanged packets.  This prevents subsequently described threats.

   If an entity (PAA or PaC) loses its state (especially individual authorizations obtained from
   respective service providers, is outside the current
   sequence number) then scope of this protocol.
   In the entire PANA protocol has absence of lower-layer security, both authentications MUST be
   able to generate a AAA-Key, leading to be restarted.
   No re-synchronization procedure is provided.

   The lifetime generation of the a PANA SA.  The
   resultant PANA SA has to be bound to cryptographically binds the two AAA-Keys together,
   hence it prevents man-in-the-middle attacks.

11.5  Cryptographic Keys

   When the AAA-authorized
   session lifetime with an additional tolerance period.  Unless PANA
   state is updated by executing another EAP authentication, method exports a AAA-Key, this key is used to produce a
   PANA SA is
   removed when the current session expires. with PANA_MAC_KEY with a distinct key ID.  The lifetime of PANA_MAC_KEY
   is unique to the PANA
   SA has to be bound session, and takes PANA-based nonce values into
   computation to cryptographically separate itself from the AAA-authorized session lifetime with an
   additional tolerance period.  Unless PANA state is updated by
   executing another EAP authentication, PANA SA AAA-Key.

   The PANA_MAC_KEY is removed when the
   current session expires.

   d) Enabling weak legacy solely used for authentication methods in insecure networks
   Some and integrity
   protection of the authentication methods are not strong enough to be used
   in insecure networks where attackers can easily eavesdrop and spoof
   on PANA messages within the link.  They designated session.

   Two AAA-Keys may not be able to produce much needed keying
   material either.  An example would be using EAP-MD5 over wireless
   links.  Use of such legacy methods can be enabled by carrying them
   over a secure channel.  There are EAP methods which are specifically
   designed for this purpose, such generated as EAP-TTLS
   [I-D.ietf-pppext-eap-ttls],PEAP [I-D.josefsson-pppext-eap-tls-eap] or
   EAP-IKEv2 [I-D.tschofenig-eap-ikev2].  PANA can carry these EAP
   tunneling methods which can carry a result of separate NAP and ISP
   authentication.  In that case, the AAA-Key used with the legacy methods.  PANA does not
   do anything special for this case.  The EAP tunneling method will
   have to produce keying material for PANA SA when needed.  There are
   certain MitM vulnerabilities with tunneling EAP methods [mitm].
   Solving these problems is outside
   the scope combination of PANA. both keys.

   The compound
   authentication problem described in [I-D.puthenkulam-eap-binding] PANA SA lifetime is
   likely to be solved in bounded by the AAA-Key lifetime.  Another
   execution of EAP itself rather than method yields in PANA.

   e) Device Identifier exchange

   As part of a new AAA-Key, and updates the authorization procedure PANA
   SA, PANA_MAC_KEY and key ID.

   Upon PaC's movement to a Device Identifier has another PAA (new PAA) and request to be
   installed at perform
   a context transfer based optimization, the EP by current PAA computes a
   AAA-Key-int based on the PAA.  The PaC provides AAA-Key, ID of new PAA, and the Device
   Identifier information session ID.
   This AAA-Key-int is delivered to the PAA secured with new PAA, and used in the PANA SA.  Section
   6.2.4
   computation of [I-D.ietf-pana-threats-eval] describes AAA-Key-new, which further takes a threat where an
   adversary modifies the Device Identifier to gain unauthorized access
   to the network.

   The installation pair of nonce
   values into account.  After this point on, the Device Identifier at AAA-Key-new becomes
   the EP (independently
   whether AAA-Key between the EP is co-located with PaC and the PAA new PAA.

   When link-layer or not) has to be
   accomplished in network-layer ciphering [I-D.ietf-pana-ipsec] is
   enabled as a secure manner.  These threats are, however, not
   part result of the PANA protocol itself since the protocol is not successful PANA
   specific.

   f) Triggering a data protection protocol

   Recent activities in the EAP working group try to create authentication, a common
   framework for separate
   master key derivation which is described in
   [I-D.ietf-eap-keying].  This framework generated based on the AAA-Key, session ID, key ID, and
   EP ID.

   The lifetime of this key is also relevant for PANA in
   various ways.  First, a bounded by the lifetime of the PANA security association needs to be
   created.  Additionally it might SA.
   This key may be necessary to trigger used with a secure association protocol
   which allows link layer
   [I-D.ietf-ipsec-ikev2] to produce further cipher-specific and network layer data protection
   transient keys.

11.6  Per-packet Ciphering

   Networks that are not secured at the lower-layers prior to be
   established.  As an example see Section 1 running
   PANA can rely on enabling per-packet data traffic ciphering upon
   successful PANA session establishment.  The PANA framework allows
   generation of [I-D.ietf-eap-keying] a master key from AAA-Key for using with [802.11i] and [802.11] as an example.  Furthermore, a derived
   session per-packet
   protection mechanism, such as link-layer or IPsec-based ciphering
   [I-D.ietf-pana-ipsec].  In case the master key might help is not readily useful
   to create the pre-requisites for network-layer
   protection (for example IPsec [I-D.ietf-pana-ipsec]).

   As motivated in Section 6.4 of [I-D.ietf-pana-threats-eval] it might ciphering mechanism, an additional secure association protocol
   [I-D.ietf-ipsec-ikev2] may be necessary needed to produce the required keying
   material.  These mechanisms ultimately establish either a link layer or a network layer
   protection to prevent certain thefts in certain scenarios.

   Threats specific to cryptographic
   binding between the establishment of a link layer or data traffic generated by and for a network
   layer security association are outside client and
   the scope authenticated identity of PANA.  The
   interested reader should refer to the relevant working groups such as
   IPsec or Midcom.

   g) Liveness test

   Network access authentication is done for a very specific purpose client.  Data traffic must be
   minimally data origin authenticated, replay and
   often charging procedures are involved which allow restricting
   network resource usage based on some policies.  In mobile
   environments it is always possible that an end host suddenly
   disconnects without transmitting a disconnect message.  Operators are
   generally motivated to detect a disconnected end host as soon as
   possible in order to release resources (i.e., garbage collection). integrity protected,
   and optionally encrypted.

11.7  PAA-to-EP Communication

   The PANA framework allows separation of PAA can remove per-session state from EP(s).  SNMPv3
   [I-D.ietf-pana-snmp] is used between the the PAA and EP for
   provisioning authorized PaC information including installed
   security association, packet filters, etc.

   Different procedures can on the EP.  This exchange
   MUST be used always physically or cryptographically protected for disconnect indication.  PANA
   cannot assume link-layer disconnect indication.  Hence this
   functionality has to
   authentication, integrity and replay protection.  It MUST also be provided at a higher layer.  With this
   version of
   privacy-protected when per-PaC master key for per-packet ciphering is
   transmitted to the draft we suggest EP.

   The per-packet ciphering master key MUST be unique to apply the soft-state principle
   found at other protocols (such as RSVP).  Soft-state means that PaC and EP
   pair.  The session state is kept alive as long as refresh messages refresh the
   state.  If no new refresh messages are provided then the state
   automatically times out ID and resources EP's device ID are released.  This process
   includes stopping accounting procedures. taken into computation
   for achieving this effect [I-D.ietf-pana-ipsec].  Compromise of an EP
   does not automatically lead to compromise of another EP or the PAA.

11.8  Livenes Test

   A PANA session is associated with a session lifetime.  The session is
   terminated unless it is refreshed by a new round of EAP
   authentication before it expires.  Therefore, at the latest a
   disconnected client can be detected when its lifetime expires.  A
   disconnect may also be detected earlier by using PANA
   reauthentication ping messages.
   A request message can be generated by either PaC or PAA at any time
   and the peer must respond with an answer message.  A successful
   round-trip of this exchange is a simple verification that the peer is
   alive.  This test can be engaged when there is a possibility that the
   peer might have disconnected (e.g., after discontinuation of data
   traffic).  Periodic use of this exchange as a keep-alive requires
   additional care as it might result in congestion and hence false
   alarms.  This exchange is cryptographically protected when a PANA SA
   is available in order to prevent threats associated with the abuse of
   this functionality.

   h) Tear-Down message

   The PANA protocol supports the ability for both the PaC and the PAA
   to transmit a tear-down message.  This message causes state removal,
   a stop of the accounting procedure and removes the installed packet
   filters.

   It is obvious that such a message must be protected to prevent an
   adversary from deleting state information and thereby causing denial
   of service attacks.

   i)

11.9  Mobility optimization Optimization

   The mobility optimization described in Section 4.12 involves the
   previous PAA providing a AAA-Key to the current PAA of the PaC.
   There are security risks stemming from potential compromise of PAAs.
   Compromise of the current PAA does not yield compromise of the
   previous PAA, as AAA-Key cannot be computed from a compromised
   AAA-Key-new.  But a compromised previous PAA along with the
   intercepted nonce values on the current link leads to the compromise
   of AAA-Key-new.  Operators should be aware of the potential risk of
   using this optimization.  An operator can reduce the risk exposure by
   forcing the PaC to perform an EAP-based authentication immediately
   after the PaC gains access to new link via the optimized PANA
   execution.

   j)

11.10  Updating PaC's address

   An attacker can generate IP Address

   Even though the IP-Address AVP in a PANA-Update-Request with an IP-Address
   AVP.  There are several threats:
   o  An attacker spoofs an address and registers itself with the
      address.  If the registered address is not assigned to any PaC,
      subsequent PANA messages sent from the PAA to can be
   cryptographically protected by the attacker will
      not reach any node and this MAC AVP, there is not a significant harm.  If the
      registered address is assigned to some PaC, subsequent PANA
      messages sent from the PAA way to prove
   the attacker will reach the PaC, but
      will be silently discarded because the Session-Id is different.
   o  An attacker registers other PaC with any address.  As a result,
      subsequent PANA messages sent from the PAA to ownership of the PaC will not
      reach IP address presented by the PaC.

   To avoid all those attacks against an address update,  Hence an additional
   mechanism may be defined outside the
   authorized PaC can launch a redirect attack by spoofing a victim's IP
   address.

11.11  Early Termination of a Session

   The PANA protocol supports the ability for both the PaC and the PAA
   to
   validate ownership transmit a tear-down message before the session lifetime expires.
   This message causes state removal, a stop of the address.

10.  Open Issues accounting procedure
   and Change History

   A list of open issues removes the installed per-PaC state on the EP(s).  This message
   is maintained at [2].

   Issues incorporated in PANA-01 June 2003: 1, 3, 10, 5, 6, 7 and 11.

   Issues incorporated in PANA-02 October 2003: 8, 17, 18, 19, 20, 21,
   22, 23, 24, 25, 26, 30, 31, 32 and 33.

   Issues incorporated in PANA-03 February 2004: 2, 16, 34, 35, 36, 38,
   39, 40, 42, 43, 44, 50, 51 and 60.

   Issues incorporated in PANA-04 May 2004: 28, 52, 53, 56, 57, 58, 59,
   61, 62, 63, 64, 65, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80 and 83.

   Issues incorporated in PANA-05 July 2004: 84, 85, 91, 92, 93, 96, 97,
   98, 99, 100, 103 and 107.

11. cryptographically protected when PANA SA is present.

12.  Acknowledgments

   We would like to thank Jari Arkko, Mohan Parthasarathy, Julien
   Bournelle, Rafael Marin Lopez, Pasi Eronen, Randy Turner, Erik
   Nordmark and all members of the PANA working group for their valuable
   comments to this document.

12.

13.  References

12.1

13.1  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2131]  Droms, R., "Dynamic Host Configuration Protocol", RFC
              2131, March 1997.

   [RFC1982]  Elz, R. and R. Bush, "Serial Number Arithmetic", RFC 1982,
              August 1996.

   [RFC2988]  Paxson, V. and M. Allman, "Computing TCP's Retransmission
              Timer", RFC 2988, November 2000.

   [RFC2234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", RFC 2234, November 1997.

   [RFC3588]  Calhoun, P., Loughney, J., Guttman, E., Zorn, G. and J.
              Arkko, "Diameter Base Protocol", RFC 3588, September 2003.

   [RFC2462]  Thomson, S. and T. Narten, "IPv6 Stateless Address
              Autoconfiguration", RFC 2462, December 1998.

   [RFC2464]  Crawford, M., "Transmission of IPv6 Packets over Ethernet
              Networks", RFC 2464, December 1998.

   [RFC3315]  Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C. and
              M. Carney, "Dynamic Host Configuration Protocol for IPv6
              (DHCPv6)", RFC 3315, July 2003.

   [RFC3456]  Patel, B., Aboba, B., Kelly, S. and V. Gupta, "Dynamic
              Host Configuration Protocol (DHCPv4) Configuration of
              IPsec Tunnel Mode", RFC 3456, January 2003.

   [RFC3748]  Aboba, B., Blunk, L., Vollbrecht, J., Carlson, J. and H.
              Levkowetz, "Extensible Authentication Protocol (EAP)", RFC
              3748, June 2004.

   [I-D.ietf-eap-keying]
              Aboba, B., "Extensible Authentication Protocol (EAP) Key
              Management Framework", draft-ietf-eap-keying-02 draft-ietf-eap-keying-03 (work in
              progress), June July 2004.

   [IANA]     Narten, T. and H. Alvestrand, "Guidelines for Writing an
              IANA Considerations Section in RFCs",  BCP 26, RFC 2434,
              October 1998.

12.2

13.2  Informative References

   [I-D.ietf-pana-requirements]
              Yegin, A. and Y. Ohba, "Protocol for Carrying
              Authentication for Network Access (PANA)Requirements",
              draft-ietf-pana-requirements-08 (work in progress), June
              2004.

   [I-D.ietf-aaa-eap]
              Eronen, P., Hiller, T. and G. Zorn, "Diameter Extensible
              Authentication Protocol (EAP) Application",
              draft-ietf-aaa-eap-08
              draft-ietf-pana-requirements-09 (work in progress), June August
              2004.

   [I-D.puthenkulam-eap-binding]
              Puthenkulam, J., "The Compound Authentication Binding
              Problem", draft-puthenkulam-eap-binding-04 (work in
              progress), October 2003.

   [RFC2522]  Karn, P. and W. Simpson, "Photuris: Session-Key Management
              Protocol", RFC 2522, March 1999.

   [I-D.ietf-pana-threats-eval]
              Parthasarathy, M., "Protocol for Carrying Authentication
              and Network Access Threat Analysis and  Security
              Requirements", draft-ietf-pana-threats-eval-06 draft-ietf-pana-threats-eval-07 (work in
              progress), June August 2004.

   [I-D.ietf-pana-ipsec]
              Parthasarathy, M., "PANA enabling IPsec based Access
              Control", draft-ietf-pana-ipsec-03 draft-ietf-pana-ipsec-04 (work in progress), May
              September 2004.

   [I-D.ietf-pana-framework]
              Jayaraman, P., "PANA Framework",
              draft-ietf-pana-framework-00
              draft-ietf-pana-framework-02 (work in progress), May September
              2004.

   [I-D.ietf-pana-snmp]
              Mghazli, Y., Ohba, Y. and J. Bournelle, "SNMP usage for
              PAA-2-EP interface", draft-ietf-pana-snmp-00 draft-ietf-pana-snmp-01 (work in
              progress), April July 2004.

   [I-D.irtf-aaaarch-handoff]
              Arbaugh, W. and B. Aboba, "Experimental Handoff Extension
              to RADIUS", draft-irtf-aaaarch-handoff-04 (work in
              progress), November 2003.

   [I-D.ietf-eap-statemachine]
              Vollbrecht, J., Eronen, P., Petroni, N. and Y. Ohba,
              "State Machines for Extensible Authentication Protocol
              (EAP) Peer and  Authenticator",
              draft-ietf-eap-statemachine-03
              draft-ietf-eap-statemachine-05 (work in progress), March
              September 2004.

   [I-D.ietf-seamoby-ctp]
              Loughney, J., "Context Transfer Protocol",
              draft-ietf-seamoby-ctp-10
              draft-ietf-seamoby-ctp-11 (work in progress), June August 2004.

   [RFC2716]  Aboba, B. and D. Simon, "PPP EAP TLS Authentication
              Protocol", RFC 2716, October 1999.

   [I-D.ietf-ipsec-ikev2]
              Kaufman, C., "Internet Key Exchange (IKEv2) Protocol",
              draft-ietf-ipsec-ikev2-14 (work in progress), June 2004.

   [I-D.josefsson-pppext-eap-tls-eap]
              Josefsson, S., Palekar, A., Simon, D. and G. Zorn,
              "Protected EAP Protocol (PEAP)",
              draft-josefsson-pppext-eap-tls-eap-07
              draft-ietf-ipsec-ikev2-17 (work in progress), October 2003.

   [I-D.ietf-pppext-eap-ttls]
              Funk, P. and S. Blake-Wilson, "EAP Tunneled TLS
              Authentication Protocol (EAP-TTLS)",
              draft-ietf-pppext-eap-ttls-04 (work in progress), April
              2004.

   [I-D.tschofenig-eap-ikev2]
              Tschofenig, H. and D. Kroeselberg, "EAP IKEv2 Method
              (EAP-IKEv2)", draft-tschofenig-eap-ikev2-03 (work in
              progress), February
              2004.

   [ianaweb]  IANA, "Number assignment",  http://www.iana.org.

   [jb99]     Juels, A. and J. Brainard, "Client Puzzles: A
              Cryptographic Defense Against Connection Depletion
              Attacks",  Proceedings of NDSS '99 (Networks and
              Distributed Security Systems), pages 151-165, 1999.

   [mitm]     Asokan, N., Niemi, V. and K. Nyberg, "Man-in-the-middle in
              tunnelled authentication",  In the Proceedings of the 11th
              International Workshop on Security Protocols, Cambridge,
              UK, April 2003.

   [802.11i]  Institute of Electrical and Electronics Engineers, "Draft
              supplement to standard for telecommunications and
              information exchange between systems - lan/man specific
              requirements - part 11: Wireless medium access control
              (mac) and physical layer (phy) specifications:
              Specification for enhanced security", IEEE 802.11i/D10.0,
              2004.

   [802.11]   Institute of Electrical and Electronics Engineers,
              "Information technology - telecommunications and
              information exchange between systems - local and
              metropolitan area networks - specific requirements part
              11: Wireless lan medium access control (mac) and physical
              layer (phy) specifications", IEEE Standard 802.11,
              1999(R2003).

   [IANA-EXP]
              Narten, T., "Assigning Experimental and Testing Numbers
              Considered Useful",  BCP 82, RFC 3692, January 2004.

URIs

   [1]  <http://www.toshiba.com/tari/pana/sequence-number.txt>

   [2]  <http://danforsberg.info:8080/pana-issues/>

Authors' Addresses

   Dan Forsberg
   Nokia Research Center
   P.O. Box 407
   FIN-00045 NOKIA GROUP
   Finland

   Phone: +358 50 4839470
   EMail: dan.forsberg@nokia.com

   Yoshihiro Ohba
   Toshiba America Research, Inc.
   1 Telcordia Drive
   Piscataway, NJ  08854
   USA

   Phone: +1 732 699 5305
   EMail: yohba@tari.toshiba.com

   Basavaraj Patil
   Nokia
   6000 Connection Dr.
   Irving, TX  75039
   USA

   Phone: +1 972-894-6709
   EMail: Basavaraj.Patil@nokia.com
   Hannes Tschofenig
   Siemens Corporate Technology
   Otto-Hahn-Ring 6
   81739 Munich
   Germany

   EMail: Hannes.Tschofenig@siemens.com

   Alper E. Yegin
   Samsung Advanced Institute of Technology
   75 West Plumeria Drive
   San Jose, CA  95134
   USA

   Phone: +1 408 544 5656
   EMail: alper.yegin@samsung.com

Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.

Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Copyright Statement

   Copyright (C) The Internet Society (2004).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.

Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.