draft-ietf-pppext-l2tp-00.txt  -->   draft-ietf-pppext-l2tp-01.txt

view Side-By-Side changes

PPP Working Group                                             Kory Hamzeh
Request for Comments: DRAFT
INTERNET-DRAFT                                      Ascend Communications
Category: Internet Draft                                        Tim Kolar
Title: draft-ietf-pppext-l2tp-00.txt draft-ietf-pppext-l2tp-01.txt                        Cisco Systems
Date: August December 1996                                     Morgan Littlewood
                                                            Cisco Systems
                                                       Gurdeep Singh Pall
                                                    Microsoft Corporation
                                                              Jeff Taarud
                                             formerly of 3COM Corporation
                                                       Andrew J. Valencia
                                                            Cisco Systems
                                                         William Verthein
                                                            U.S. Robotics


                  Layer Two Tunneling Protocol "L2TP"


Status of this Memo

   This document is an Internet-Draft.  Internet-Drafts are working doc-
   uments of the Internet Engineering Task Force (IETF), its areas, and
   its working groups.  Note that other groups may also distribute work-
   ing documents as Internet-Drafts.

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

   To learn the current status of any Internet-Draft, please check the
   1id-abstracts.txt listing contained in the Internet-Drafts Shadow
   Directories on ds.internic.net, nic.nordu.net, ftp.nisc.sri.com, or
   munnari.oz.au.

Abstract

   Virtual dial-up allows many separate and autonomous protocol domains
   to share common access infrastructure including modems, Access
   Servers, and ISDN routers.  RFC1661 specifies multiprotocol dial-up
   via PPP [1].  This document describes the Layer Two Tunneling Proto-
   col (L2TP) which permits the tunneling of the link layer (i.e., HDLC,
   async HDLC) of PPP.  Using such tunnels, it is possible to divorce
   the location of the initial dial-up server from the location at which
   the dial-up protocol connection is terminated and access to the net-
   work provided.

Table of Contents

   1.0 Introduction
   1.1 Conventions
   1.2 Terminology



Valencia                    expires February May 1997                     [Page 1]





INTERNET DRAFT                                                April                                             December 1996


   2.0 Problem Space Overview
   2.1 Initial Assumptions
   2.2 Topology
   2.3 Providing Virtual Dial-up Services--a walk-through
   3.0 Service Model Issues
   3.1 Security
   3.2 Address Allocation
   3.3 Authentication
   3.4 Accounting
   4.0 Protocol Overview
   4.1 Control Message Overview
   4.2 Payload Packet Overview
   5.0 Message Format and Protocol Extensibility
   5.1 AVP
   5.2 Control Message Format
   5.3 Payload Message Format
   5.4 Control Message Types
   5.5 General Error Codes
   6.0 Control Connection Protocol Specification
   6.1 Start-Control-Connection-Request
   6.2 Start-Control-Connection-Reply
   6.3 Start-Control-Connection-Connected
   6.4 Stop-Control-Connection-Request
   6.5 Stop-Control-Connection-Reply
   6.6 Echo-Request Hello
   6.7 Echo-Reply (deleted)
   6.8 Outgoing-Call-Request
   6.9 Outgoing-Call-Reply
   6.10 Incoming-Call-Request Outgoing-Call-Connected
   6.11 Incoming-Call-Reply Incoming-Call-Request
   6.12 Incoming-Call-Connected Incoming-Call-Reply
   6.13 Call-Clear-Request Incoming-Call-Connected
   6.14 Call-Disconnect-Notify Call-Clear-Request
   6.15 WAN-Error-Notify Call-Disconnect-Notify
   6.16 Set-Link-Info WAN-Error-Notify
   6.17 No-op Set-Link-Info
   7.0 Control Connection State Machines
   7.1 Control Connection Protocol Operation
   7.2 Control Connection States
   7.2.1 Control Connection Originator (may be LAC or LNS)
   7.2.2 Control connection Receiver (may be LAC or LNS)
   7.3 Timing considerations
   7.4 Incoming Calls
   7.5
   7.4.1 LAC Incoming Call States
   7.4.2 LNS Incoming Call States
   7.6
   7.5 Outgoing calls
   7.7
   7.5.1 LAC Outgoing Call States
   7.5.2 LNS Outgoing Call States
   8.0 L2TP Over Specific Media
   8.1 IP/UDP
   8.2 IP
   9.0 Security Considerations
   9.1 Tunnel Endpoint Security
   9.2 Client Security
   10.0 Acknowledgments
   11.0 Contacts



Valencia                    expires February May 1997                     [Page 2]





INTERNET DRAFT                                                April                                             December 1996


   10.0 Acknowledgments
   11.0 Contacts
   12.0 References
   Appendix A: Acknowledgment Time-Outs
   Appendix B: Acknowledgment Time-Out and Window Adjustment
   Appendix C: Handling of out-of-order packets
   Appendix D: Transport Layer Adaptive Time-Outs and Window Adjustment

1.0 Introduction

   The traditional dial-up network service on the Internet is for regis-
   tered IP addresses only.  A new class of virtual dial-up application
   which allows multiple protocols and unregistered IP addresses is also
   desired on the Internet.  Examples of this class of network applica-
   tion are support for privately addressed IP, IPX, and AppleTalk dial-
   up via PPP across existing Internet infrastructure.

   The support of these multiprotocol virtual dial-up applications is of
   significant benefit to end users, enterprises, and Internet Service
   providers as it allows the sharing of very large investments in
   access and core infrastructure and allows local calls to be used.  It
   also allows existing investments in non-IP protocol applications to
   be supported in a secure manner while still leveraging the access
   infrastructure of the Internet.

   It is the purpose of this draft to identify the issues encountered in
   integrating multiprotocol dial-up services into an existing Internet
   Service Provider's Point of Presence (hereafter referred to as ISP
   and POP, respectively), and to describe the L2TP protocol which per-
   mits the leveraging of existing access protocols.

   This protocol may also be used to solve the "multilink hunt-group
   splitting" problem. Multilink PPP, often used to aggregate ISDN B
   channels, requires that all channels composing a multilink bundle be
   grouped at a single NAS.  Because L2TP makes a PPP session appear at
   a location other than the physical point at which the session was
   physically received, it can be used to make all channels appear at a
   single NAS, allowing multilink operation even when the physical calls
   are spread across distinct physical NAS's.

1.1 Conventions

   The following language conventions are used in the items of specifi-
   cation in this document:

      o   must,   MUST, SHALL, or MANDATORY -- This item is an absolute
         requirement of the specification.

      o   SHOULD or RECOMMEND -- This item should generally be followed
         for all but exceptional circumstances.

      o   MAY or OPTIONAL -- This item is truly optional and may be
         followed or ignored according to the needs of the implementor.




Valencia                    expires May 1997                     [Page 3]





INTERNET DRAFT                                             December 1996


1.2 Terminology

   Analog Channel

      A circuit-switched communication path which is intended to carry
      3.1 Khz audio in each direction.

   Digital Channel

      A circuit-switched communication path which is intended to carry
      digital information in each direction.

   Call



Valencia                  expires February 1997                  [Page 3]





INTERNET DRAFT                                                April 1996

      A connection or attempted connection between two terminal end-
      points on a PSTN or ISDN--for example, a telephone call between
      two modems.

   CHAP

      Challenge Authentication Protocol, a PPP cryptographic chal-
      lenge/response authentication protocol in which the cleartext
      password is not passed in the clear over the line.

   CLID

      Calling Line ID, an indication to the receiver of a call as to the
      phone number of the caller.

   Control Messages
      Control messages are exchanged between LAC, LNS pairs, and operate
      in-band within the tunnel protocol.  Control messages govern
      aspects of the tunnel and sessions within the tunnel.

   Dial User

      An end-system or router attached to an on-demand PSTN or ISDN
      which is either the initiator or recipient of a call.

   DNIS

      Dialed Number Information String, an indication to the receiver of
      a call as to what phone number the caller used to reach it.

   EAP

      Extensible Authentication Protocol, a framework for a family of
      PPP authentication protocols, including cleartext, chal-
      lenge/response, and arbitrary dialog sequences.

   L2TP Access Concentrator (LAC)

      A device attached to one or more PSTN or ISDN lines capable of PPP
      operation and of handling the L2TP protocol.  The LAC needs only



Valencia                    expires May 1997                     [Page 4]





INTERNET DRAFT                                             December 1996


      implement the media over which L2TP is to operate to pass traffic
      to one or more LNS's.  It may tunnel any protocol carried within
      PPP.

   L2TP Network Server (LNS)

      An LNS operates on any platform capable of PPP termination.  The
      LNS handles the server side of the L2TP protocol.  Since L2TP
      relies only on the single media over which L2TP tunnels arrive,
      the LNS may have only a single LAN or WAN interface, yet still be
      able to terminate calls arriving at any LAC's full range of PPP
      interfaces (async, synchronous ISDN, V.120, etc.).

   Network Access Server (NAS)

      A device providing temporary, on-demand network access to users.
      This access is point-to-point using PSTN or ISDN lines.

   PAP

      Password Authentication Protocol, a simple PPP authentication
      mechanism in which a cleartext username and password are transmit-
      ted to prove identity.

   Session

      L2TP is connection-oriented.  The LNS and LAC maintain state for
      each user that is attached to a an LAC.  A session is created when
      an end-to-end PPP connection is attempted between a dial user and
      the LNS, or when a outbound call is initiated.  The datagrams
      related to a session are sent over the tunnel between the LAC and
      LNS.

   Quality of Service (QOS)

      A given Quality of Service level is sometimes required for a given
      user being tunneled between a an LNS-LAC pair.  For this scenario, a
      unique L2TP tunnel is created (generally on top of a new SVC) and
      encapsulated directly on top of the media providing the indicated
      QOS.

   Switched Virtual Circuit (SVC)




Valencia                  expires February 1997                  [Page 4]





INTERNET DRAFT                                                April 1996

      An L2TP-compatible media on top of which L2TP is directly encapsu-
      lated.  SVC's are dynamically created, permitting tunnel media to
      be created dynamically in response to desired LNS-LAC connectivity
      requirements.

   Tunnel

      A tunnel is defined by a an LNS-LAC pair.  The tunnel carries PPP
      datagrams between the LAC and the LNS; many sessions can be multi-
      plexed over a single tunnel.  A control connection operating in-
      band over the same tunnel controls the establishment, release, and



Valencia                    expires May 1997                     [Page 5]





INTERNET DRAFT                                             December 1996


      maintenance of sessions and of the tunnel itself.

2.0 Problem Space Overview

   In this section we describe in high level terms the scope of the
   problem that will be explored in more detail in later sections.

2.1 Initial Assumptions

   We begin by assuming that Internet access is provided by an ISP and
   that the ISP wishes to offer services other than traditional regis-
   tered IP address based services to dial-up users of the network.

   We also assume that the user of such a service wants all of the secu-
   rity facilities that are available to him in a dedicated dial-up con-
   figuration.  In particular, the end user requires:

   +  End System transparency: Neither the remote end system nor his
   home site hosts should require any special software to use this service ser-
   vice in a secure manner.

   +  Authentication as provided via dial-up PPP CHAP or CHAP, PAP, EAP, or
   through other dialogs, for instance, a textual exchange on V.120
   before starting PPP.  This will include TACACS+ [7] and RADIUS [8]
   solutions as well as support for smart cards and one-time passwords.
   The authentica-
   tion authentication should be manageable by the user independently of
   the ISP.

   +  Addressing should be as manageable as dedicated dial-up solutions.
   The address should be assigned by the home site and not the ISP.

   +  Authorization should be managed by the home site as it would in a
   direct dial-up solution.

   +  Accounting should be performed both by the ISP (for billing pur-
   poses) and by the user (for charge-back and auditing).

2.2 Topology

   Shown below is a generic Internet with Public switched Telephone Net-
   work (PSTN) access (i.e., async PPP via modems) and Integrated Ser-
   vices Digital Network (ISDN) access (i.e., synchronous PPP access).
   Remote users (either async or ISDN PPP) will access the Home LAN as
   if they were dialed into the L2TP Network Server (LNS), although



Valencia                  expires February 1997                  [Page 5]





INTERNET DRAFT                                                April 1996
   their physical dial-up is via the ISP Network Access Server.












Valencia                    expires May 1997                     [Page 6]





INTERNET DRAFT                                             December 1996


           ...----[L]----+---[L]-----...
                         |
                         |
                        [H]
                         |
                 ________|________________________
                 |                                |
         ________|__                        ______|________
         |         |                        |             |
         |  PSTN  [R]                      [R]  ISDN      |
         |  Cloud  |                        |   Cloud    [N]__[U]
         |         |             Internet   |             |
         |         |                       [R]            |
         [N]______[R]                       |_____________|
          |      |                                |
          |      |                                |
         [U]     |________________________________|


      [H] = LNS
      [L] = Home LAN(s)
      [R] = Router
      [U] = Remote User
      [N] = ISP Network Access Server


2.3 Providing Virtual dial-up Services--a walk-through

   To motivate the following discussion, this section walks through an
   example of what might happen when a Virtual dial-up client initiates
   access.

   The Remote User remote user initiates a PPP connection to an ISP via either the
   PSTN or ISDN.  The Network Access Server (NAS) accepts the connection
   and the PPP link is established. established (L2TP also permits the NAS to check
   with an LNS after call indication prior to accepting the call--this
   is useful where DNIS or CLID information is available in the incoming
   call notification).

   The ISP undertakes may now undertake a partial authentication of the end system/user
   via CHAP or PAP. sys-
   tem/user.  Only the username field is would be interpreted to determine
   whether the user requires a Virtual dial-up service.  It is
   expected--but not required--that usernames will be structured (e.g.
   jawadk@microsoft.com).
   username@company.com).  Alternatively, the ISP may maintain a
   database mapping users to services.  In the case of Virtual dial-up,
   the mapping will name a specific endpoint, the LNS.

   Alternatively, the ISP may have already determined the target LNS
   from DNIS.  If the LNS is willing to accept tunnel creation without
   any authentication of the caller, the NAS may tunnel the PPP connec-
   tion without ever having communicated with the remote user.

   If a virtual dial-up service is not required, standard access to the
   Internet may be provided.



Valencia                    expires May 1997                     [Page 7]





INTERNET DRAFT                                             December 1996


   If no tunnel connection currently exists to the desired LNS, one is
   initiated.  L2TP is designed to be largely insulated from the details
   of the media over which the tunnel is established; L2TP requires only
   that the tunnel media provide packet oriented point-to-point



Valencia                  expires February 1997                  [Page 6]





INTERNET DRAFT                                                April 1996


   connectivity. connec-
   tivity.  Obvious examples of such media are UDP, Frame Relay PVC's,
   or X.25 VC's.

   Once the tunnel exists, an unused slot within the tunnel, a "Call
   ID", is allocated, and a connect indication is sent to notify the LNS
   of this new dial-up session.  The LNS either accepts the connection,
   or rejects. rejects it.  Rejection may include a reason indication, which may
   be displayed to the dial-up user, after which the call should be discon-
   nected. dis-
   connected.

   The initial setup notification may include the authentication infor-
   mation required to allow the LNS to authenticate the user and decide
   to accept or decline the connection.  In the case of CHAP, the set-up
   packet includes the challenge, username and raw response.  For PAP or
   text dialog, it includes username and clear text password.  The LNS
   may choose to use this information to complete its authentication,
   avoiding an additional cycle of authentication.

   The initial

   If the LAC negotiated PPP LCP before initiating the tunnel, the ini-
   tial setup notification may also include a copy of the the LCP CONFACKs
   sent in each direction which completed LCP negotiation.  The LNS may
   use this information to initialize its own PPP state (thus avoiding
   an additional LCP negotiation), or it may choose to initiate a new
   LCP CONFREQ exchange.

   If the LNS accepts the connection, it creates a "virtual interface"
   for PPP in a manner analogous to what it would use for a direct-
   dialed connection.  With this "virtual interface" in place, link
   layer frames may now pass over this tunnel in both directions.
   Frames from the remote user are received at the POP, stripped of any
   link framing or transparency bytes, encapsulated in L2TP, and for-
   warded over the appropriate tunnel.

   The LNS accepts these frames, strips L2TP, and processes them as nor-
   mal incoming frames for the appropriate interface and protocol.  The
   "virtual interface" behaves very much like a hardware interface, with
   the exception that the hardware in this case is physically located at
   the ISP POP.  The other direction behaves analogously, with the LNS
   encapsulating the packet in L2TP, and the NAS stripping L2TP before
   transmitting it out the physical interface to the remote user.  For
   the remainder of this document, a NAS operating as a peer to an LNS
   will be referred to as an L2TP Access Concentrator, or "LAC".

   At this point, the connectivity is a point-to-point PPP session whose
   endpoints are the remote user's networking application on one end and
   the termination of this connectivity into the LNS's PPP support on
   the other.  Because the remote user has become simply another dial-up
   client of the LNS, client connectivity can now be managed using tra-
   ditional mechanisms with respect to further authorization, protocol
   access, and packet filtering.



Valencia                    expires May 1997                     [Page 8]





INTERNET DRAFT                                             December 1996


   Accounting can be performed at both the LAC as well as the LNS.  This
   document illustrates some Accounting techniques which are possible
   using L2TP, but the policies surrounding such Accounting are outside
   the scope of this specification.



Valencia                  expires February 1997                  [Page 7]





INTERNET DRAFT                                                April 1996

   L2TP offers optional facilities which maximize compatibility with
   legacy client requirements, requirements; L2TP connect notifications for PPP
   clients can contain sufficient information for a an LNS to authenticate
   and initialize its LCP state machine.  With these facilities, the the
   remote user need not be queried a second time for CHAP authentica-
   tion, PPP authentication,
   nor undergo multiple rounds of LCP negotiation and convergence.
   These techniques are intended to optimize connection setup, and are
   not intended to deprecate any functions required by the PPP specifi-
   cation.

3.0 Service Model Issues

   There are several significant differences between the standard Inter-
   net access service and the Virtual dial-up service with respect to
   authentication, address allocation, authorization and accounting.
   The details of the differences between these services and the prob-
   lems presented by these differences are described below.  The mecha-
   nisms used for Virtual Dial-up service are intended to coexist with
   more traditional mechanisms; it is intended that an ISP's POP can
   simultaneously service ISP clients as well as Virtual dial-up
   clients.

3.1 Security

   For the Virtual dial-up service, the ISP pursues authentication only
   to the extent required to discover the user's apparent identity (and
   by implication, their desired LNS).  This may involve no more than
   detecting DNIS information when a call arrives, or may involve full
   LCP negotation negotiation and initiation of CHAP. PPP authentication.  As soon as the
   apparent iden-
   tity identity is determined, a connection to the LNS is initiated
   with any authentication information gathered by the ISP.  The LNS
   completes the authentication by either accepting the connection, or
   rejecting it.

   The LNS may need to protect against attempts by third parties to
   establish tunnels to the LNS.  Tunnel establishment can include
   authentication to protect against such attacks.

3.2 Address Allocation

   For an Internet service, the user accepts that the IP address may be
   allocated dynamically from a pool of ISP addresses.  This model often
   means that the remote user has little or no access to their home net-
   work's resources, due to firewalls and other security policies
   applied by the home network to accesses from external IP addresses.

   For the Virtual dial-up service, the LNS can exist behind the home
   firewall, allocating addresses which are internal (and, in fact, can
   be RFC1597 RFC1918 addresses, or non-IP addresses).  Because L2TP tunnels



Valencia                    expires May 1997                     [Page 9]





INTERNET DRAFT                                             December 1996


   exclusively at the frame layer, the actual policies of such address
   management are irrelevant to correct Virtual dial-up service; for all
   purposes of PPP protocol handling, the dial-in user appears to have
   connected at the LNS.




Valencia                  expires February 1997                  [Page 8]





INTERNET DRAFT                                                April 1996

3.3 Authentication

   The authentication of the user occurs in three phases; the first at
   the ISP, and the second and optional third at the LNS.

   The ISP uses the DNIS, CLID, or username to determine that a Virtual
   dial-up service is required and initiate initiates the tunnel connection to
   the appropriate LNS.  Once a tunnel is established, The ISP NAS allo-
   cates a new Call ID is allocated and initiates a session initiated by forwarding the gathered gath-
   ered authentication informa-
   tion. information.

   The LNS undertakes the second phase by deciding whether or not to
   accept the connection.  The connection indication may include CHAP,
   PAP, EAP, or textual authentication information.  Based on this informa-
   tion,
   information, the LNS may accept the connection, or may reject it (for
   instance, it was a PAP request and the username/password are found to
   be incorrect).

   Once the connection is accepted, the LNS is free to pursue a third
   phase of authentication at the PPP layer.  These activities are out-
   side the scope of this specification, but might include an additional
   cycle of LCP authentication, proprietary PPP extensions, or textual
   challenges carried via a TCP/IP telnet session.

3.4 Accounting

   It is a requirement that both the LAC and the LNS can provide be capable of pro-
   viding accounting data and hence both may count packets, octets and connec-
   tion
   connection start and stop times.

   Since Virtual dial-up is an access service, accounting of connection
   attempts (in particular, failed connection attempts) is of signifi-
   cant interest.  The LNS can reject new connections based on the
   authentication information gathered by the LAC, with corresponding
   logging.  For cases where the LNS accepts the connection and then
   continues with further authentication, the LNS might subsequently
   disconnect the client.  For such scenarios, the disconnection indica-
   tion back to the LAC may also include a reason.

   Because the LNS can decline a connection based on the authentication
   information collected by the LAC, accounting can easily draw a dis-
   tinction between a series of failed connection attempts and a series
   of brief successful connections.  Lacking this facility, the LNS must
   always accept connection requests, and would need to exchange a num-
   ber of PPP packets with the remote system.  Note that the LNS could
   use this information to decide to accept the connection (which pro-
   tects against most third-party invalid connection attempts) while still insisting
   on running its own CHAP authentication (to (for instance, to protect
   against CHAP replay attacks).



Valencia                    expires May 1997                    [Page 10]





INTERNET DRAFT                                             December 1996


4.0 Protocol Overview

   There are two parallel components of L2TP operating over a given tun-
   nel:  1) control messages between each LAC-LNS pair, and 2) payload



Valencia                  expires February 1997                  [Page 9]





INTERNET DRAFT                                                April 1996 packets
   between the same LAC-LNS pair which pair.  The latter are used to transport L2TP
   encapsulated PPP packets for user sessions between the pair.

   4.1 Control Message Overview

      Before PPP tunneling can occur between a LAC and LNS,

   The Nr (Next Received) and Ns (Next Sent) fields are always present
   in control mes-
      sages messages, and are optionally present in payload messages.
   Distinct sequence number state is maintained for control messages
   related to the tunnel (Call ID is 0), and for each distinct user ses-
   sion within the tunnel.  Sequence number state is also distinct for
   control and for payload messages within a particular session.  Each
   distinct state is initialized so the first packet is sent with an Ns
   of 0.  Nr is sent reflecting one more than the last in-order received
   packet; if sent before any packet is received it would be 0, indicat-
   ing that it expects the next new Ns value received to be 0.

   The sequence number state is maintained and updated as packets are
   sent.  A message (control or payload) with a zero-length body indi-
   cates that the packet is only used to communicate Nr and Ns fields.
   The Nr and Ns fields are filled in as above, but the sequence number
   state remains the same.  For non-zero-length body messages, the
   sequence number state is incremented (modulo 2**16) after it is
   copied to the packet's Ns field.

   4.1 Control Message Overview

      Before PPP tunneling can occur between an LAC and LNS, control
      messages must be exchanged between them.  Control messages are
      exchanged over the same tunnel which will be used to forward pay-
      load data once L2TP call control and management information have
      been passed.  The control messages are responsible for establish-
      ment, management, and release of sessions carried through the tun-
      nel, as well as status on the tunnel itself.  It is the means by
      which a an LNS is notified of an incoming call at an associated LAC,
      as well as the means by which a an LAC is instructed to place an out-
      going
      outgoing dial call.

      A tunnel may be established by either a an LAC (for incoming calls)
      or an LNS (for outgoing calls).  Following the establishment of
      the tunnel, the LNS and LAC configure the tunnel by exchanging
      Start-Control-Connection-Request and -Reply messages.  These mes-
      sages are also used to exchange information about basic operating
      capabilities of the LAC and LNS.  Once the control message
      exchange is complete, the LAC may initiate sessions by indicating
      inbound requests, or the LNS by requesting outbound calls.  Con-
      trol messages may indicate changes in operating characteristics of
      an individual user session with a Set- Link-Info Set-Link-Info message.  Indi-
      vidual  Individ-
      ual sessions may be released by either the LAC or LNS, also
      through control messages.

      Independent Call ID values are established for each end of a user
      session.  The tunnel itself is maintained by exchanging keepalive control
      echo messages.  This ensures that sender of a connectivity failure between
      the LNS and the LAC can be detected in packet associated with a timely manner.  Other
      failures can be reported via particular



Valencia                    expires May 1997                    [Page 11]





INTERNET DRAFT                                             December 1996


      session places the Wan-Error-Notify control message.

      It is intended that control messages will also carry management
      related information Call ID established by its peer in the future, such Call ID
      header field of all outgoing packets.  For the cases where a Call
      ID has not yet been assigned from the peer (i.e., during call
      establishment of a new session), the Call ID field is sent as 0,
      and further fields within the message are used to identify the
      session.

      Two mechanisms provide for detection of tunnel connectivity prob-
      lems, one by the reliable transport layer of L2TP and another by
      the higher layer.  The transport layer of L2TP performs control
      message retransmission.  If the number of retransmission attempts
      for a given control message exceeds a configured maximum value,
      the tunnel is reset.  This retransmission mechanism exists in both
      the LNS and LAC ends of the tunnel.  In addition, keepalive con-
      trol echo messages are injected into the control stream by the
      higher L2TP layer after a certain duration of inactivity on a
      given tunnel is detected.  A response to the sent keepalive is
      expected within a configured time interval.  If not received
      within the allowed time interval, the tunnel is reset.  These two
      mechanisms ensure that a connectivity failure between the LNS and
      the LAC can be detected at either end of a tunnel in a timely man-
      ner.

      It is intended that control messages will also carry management
      related information in the future, such as a message allowing the
      LNS to request the status of a given LAC; these message types have are
      not yet been defined. defined in this document.

   4.2 Payload Packet Overview

      Once a tunnel is established and control messages have completed
      tunnel setup, the tunnel can be used to carry user session PPP
      packets for sessions involving a given LNS-LAC pair.  A key  The "Call
      ID" field in the
      tunnel L2TP header indicates to which session a particular particu-
      lar PPP packet belongs.  In this manner, PPP packets are multiplexed and demulti- multi-
      plexed and demultiplexed over a single tunnel between a given LNS-LAC LNS-
      LAC pair.  The key "Call ID" field value is established by during the
      exchange of call establishment setup control mes-
      sages. messages.

      It is legal for multiple tunnels to exist between a given LNS-LAC
      pair.  This is useful where each tunnel is used for a single user, user
      session, and the tunnel media (an SVC, for instance) has specific
      QOS attributes dedicated to a given user.  L2TP provides a tunnel



Valencia                  expires February 1997                 [Page 10]





INTERNET DRAFT                                                April 1996
      identifier so that individual tunnels can be identified, even when
      arriving from a single source LAC or LNS.

      The L2TP header also contains optional acknowledgment and sequenc-
      ing information that can be used to perform congestion control
      over the tunnel.  Control messages are used to determine rate and
      buffering parameters that are used to regulate the flow of PPP
      packets for a particular session over the tunnel.  L2TP does  All implementa-
      tions MUST implement flow control, but may indicate that flow con-
      trol is not
      specify desired by omitting the particular Packet Window Size and Packet
      Processing Delay AVP's during call setup.  L2TP does not specify



Valencia                    expires May 1997                    [Page 12]





INTERNET DRAFT                                             December 1996


      the particular algorithms to use for congestion and flow control.
      Suggested algorithms for the determination of adaptive time-outs
      to recover from dropped data or acknowledgments on the tunnel are
      included in Appendix A of this document.

      L2TP does not include a "Receive-Not-Ready" function.  It is
      expected that the flow-control mechanism used will provide an ade-
      quate "pacing" mechanism so that the sender does not overflow the
      receiver's allotted receive window and receive buffers.  It is
      permissible for the receiving peer to withhold Acks if it is
      unable to accept more data for a connection.  Thus, unlike for the
      Control Message session, the sending peer MUST NOT clear a session
      (or the whole tunnel) as a result of not receiving timely acknowl-
      edgments for transmitted packets.  The job of detecting a non-
      functioning tunnel lies solely with the Control Message functions
      of L2TP.

5. Message Format and Protocol Extensibility

   L2TP defines a set of control messages sent in packets over the tun-
   nel between a an LNS and a given LAC.  The exact technique for initiat-
   ing a tunnel between a an LNS-LAC pair is specific to the tunnel media,
   and supported specific media are described in section 8.0.

   Once media-level connectivity is reached, L2TP message formats define
   the protocol for a an LAC and LNS to manage the tunnel and its associ-
   ated sessions.

   In each case where a field is optional, if the field is not present,
   its space does not exist in the packet.  Existing fields are placed
   back-to-back to form the packet.

   5.1 AVP

      To maximize extensibility while still permitting interoperability,
      a uniform method for encoding message types and bodies is used
      throughout L2TP.  This encoding will be termed an AVP (Attribute-
      Value Pair) in the remainder of this document.  Each AVP is
      encoded as:

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |
      |M|H|0|0|0|0|  Overall Length   |           Vendor ID           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Attribute            |0|0|0|0|0|0|0|M|  [Value]...            | Value...                      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | [until Overall length Length is reached]...                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Overall Length encodes the number of octets (including the Overall
      Length field itself) contained in this AVP.

      Vendor ID is the IANA assigned "SMI Network Management Private
      Enterprise Codes" value, encoded in network byte order.  The value
      0, reserved in this table, corresponds to IETF adopted Attribute
      values, defined within this document.  Any vendor wishing to
      implement L2TP extensions can use their own Vendor ID along with



Valencia                  expires February 1997                 [Page 11]





INTERNET DRAFT                                                April 1996


      private Attribute values, guaranteeing that they will not collide
      with any other vendor's extensions, nor with future IETF exten-
      sions.

      Attribute is the actual attribute, a 16-bit value with a unique
      interpretation under a given Vendor ID.

      The next octet is first four bits are a bit mask, describing the general
      attributes of the AVP.  Only one bit value, M, is defined.  This  The M bit, known as the "mandatory" bit,
      controls the behavior required of an imple-
      mentation implementation which receives
      an AVP which it does not recognize.  If M is set, any session associated with this AVP must



Valencia                    expires May 1997                    [Page 13]





INTERNET DRAFT                                             December 1996


      associated with this AVP MUST be terminated.  If the AVP is associated asso-
      ciated with the overall tunnel, the entire tun-
      nel tunnel (and all sessions ses-
      sions within) must MUST be terminated.  If M is not set, an unrecognized unrecog-
      nized AVP should be ignored.

      Value follows immediately after

      The H bit, known as the Flags field, and runs for "hidden" bit, controls the
      remaining octets indicated encryption of
      the contents of the AVP.  This bit MUST only be set if tunnel
      authentication was used and, therefore, a shared secret exists
      between the peers on either end of the tunnel.  If the H bit is
      set in an AVP, the Overall Length (i.e., Overall
      Length minus seven following mechanism is applied to the contents
      of the AVP, starting with the first byte beyond the Attribute
      field:

         The contents is first padded at the end with nulls to a multi-
         ple of 16 octets.  A one-way MD5 hash is calculated over a
         stream of octets consisting of header).  If desired, the shared secret followed by a given
         16 octet random vector, referred to as the Authenticator.  The
         sender computes the random Authenticator and passes it in the
         first 16 octets of the AVP can
      define value.  The MD5 hash value is XORed
         with the first 16 octet segment of the password and placed in
         the next 16 octets of the Value to be a pad, permitting actual
      data to be aligned on field of the Proxy-Authen AVP.

         If the password is longer than 16 characters, a 32-bit boundary.

      AVP's should be kept compact; in no case should AVP's ever cause second one-way
         MD5 hash is calculated over a
      control message's total length to exceed 1532 bytes in length.

   5.2 Control Message Format

      Each L2TP control message begins stream of octets consisting of
         the shared secret followed by the result of the first XOR.
         That hash is XORed with a 20 the second 16 octet fixed header por-
      tion segment of the
         password and at least one AVP indicating message type.  This fixed
      header is formatted:

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |T|1|1|1|1|K|             | Ver |             Length            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Magic Cookie                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Tunnel ID           |            Call ID            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Sequence Number        |     Acknowledgment Number     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key (opt)                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Message Type AVP                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The T bit must be 1, indicating a control message.  The placed in the next four
      bits must be set to 1, making 16 octets of the header more compatible in encod-
      ing Value field of
         the AVP.

         If necessary, this operation is repeated, with each XOR result
         being used along with the payload message (defined in shared secret to generate the next section).  The K
      bit is optional, documented below.

      Ver must be the value 002, indicating a version 1 L2TP message
      (values 000 and 001 are reserved
         hash to permit detection XOR the next segment of L2F [XXX],



Valencia                  expires February 1997                 [Page 12]





INTERNET DRAFT                                                April 1996


      GRE [XXX], and PPTP [XXX] packets if they arrive intermixed).

      Length the password, to no more than
         128 characters.

         On receipt, the Authenticator is taken from the overall length first 16 octets
         of the message, including header,
      message type AVP, plus any additional AVP's associated with a
      given control message type.

      Magic Cookie is always present, received AVP value field and has the value 0x1A2B3C4E.  Its
      purpose process is reversed to allow
         yield the receiver to ensure that it is synchronized
      with original password.  For more details on this hiding
         method, consult the data stream.  It should not be used as a means for resyn-
      chronizing RADIUS [8] specification.

      Overall Length encodes the data stream in number of octets (including the event that a transmitter issues
      an improperly formatted message.  Loss of synchronization must
      result Overall
      Length field itself) contained in immediate closing of the session.

      Tunnel ID and Call ID identify the tunnel and caller within the
      tunnel to which a control message applies.  If this AVP.  It is 10 bits, per-
      mitting a control message
      does not apply to maximum of 1024 bytes of data in a single caller within the tunnel (for instance,
      a Stop-Control-Connection-Request message), Call AVP.

      Vendor ID should be set
      to 0.

      Sequence Number and Acknowledgment Number reflect the currently
      transmitted packet and latest received packet respectively.

      If the K bit is set, the Key field is present. IANA assigned "SMI Network Management Private
      Enterprise Codes" value, encoded in network byte order.  The K bit must be
      set if a Challenge value was received during tunnel setup, and the
      Key reflects the challenge response of
      0, reserved in this authentication, table, corresponds to IETF adopted Attribute
      values, defined within this document.  Any vendor wishing to
      implement L2TP extensions can use their own Vendor ID along with
      private Attribute values, guaranteeing that they will not collide
      with any other vendor's extensions, nor with future IETF exten-
      sions.

      Attribute is the resulting MD5 hash actual attribute, a 16-bit value broken into successive 32-bit fields
      which are XOR'ed together with a unique
      interpretation across all AVP's defined under a given Vendor ID.



Valencia                    expires May 1997                    [Page 14]





INTERNET DRAFT                                             December 1996


      Value follows immediately after the Attribute field, and this value put runs for
      the remaining octets indicated in the Key field.

      The body Overall Length (i.e., Over-
      all Length minus six octets of header).

      AVP's should be kept compact; the combined AVP's within a control
      message is an AVP indicating the type of
      control message.  Depending on the particular MUST NOT ever cause a control message,
      further AVPs may follow.

   5.3 Payload message's total length to
      exceed 1500 bytes in length.

   5.2 Control Message Format

      PPP payload packets tunneled within L2TP have a smaller encapsula-
      tion, reducing overhead of

      Each L2TP during the life of control message begins with a tunneled PPP
      session.  The MTU for the user data packets encapsulated in L2TP
      is 1532 octets, not including L2TP and media encapsulation.  The
      smallest L2TP encapsulation is 2 octets; the largest 20 octet fixed header por-
      tion followed by zero or more AVP's.  This fixed header is 12 octets. format-
      ted:

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |T|L|I|C|F|K|
      |T|1|1|1|1|K|0|           | Ver |             Length (opt)            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           Tunnel ID (opt)           |            Call ID (opt)            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Sequence Number (opt)               Ns              |  Acknowledgment Number (opt)               Nr              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key (opt)                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                        Message Type AVP                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The T bit must MUST be 0, 1, indicating payload.




Valencia                  expires February 1997                 [Page 13]





INTERNET DRAFT                                                April 1996 a control message.  The next four
      bits MUST be set to 1, making the header more compatible in encod-
      ing with the payload message (defined in the next section).  The K
      bit is optional, documented below.  The bit following the K bit
      MUST be 0.

      Ver must MUST be the value 002, indicating a version 1 of the L2TP protocol.

      If the L bit is set, the message
      (values 000 and 001 are reserved to permit detection of L2F [2]
      and PPTP [3] packets if they arrive intermixed).

      Length field is present, indicating the
      total overall length of the received packet.

      If the I bit is set, the message, including header,
      message type AVP, plus any additional AVP's associated with a
      given control message type.

      Tunnel ID field is present.  This is used
      to demultiplex multiple tunnels over a single media, where the
      media may not provide sufficient or efficient demultiplexing con-
      text.

      If the C bit is set, the and Call ID field is present.  This is used
      to multiplex multiple clients within one tunnel.

      If identify the F bit is set, both Sequence Number tunnel and Acknowledgment Num-
      ber are present.  Sequence Number indicates the sequence number of user session within
      the next packet tunnel to be sent.  The current packet will be this
      sequence number if which a control message applies.  If a control mes-
      sage does not apply to a single user session within the payload size is non-zero, otherwise this
      packet is only tunnel
      (for instance, a Stop-Control-Connection-Request message), Call ID
      MUST be set to 0.  If an acknowledgement (sequence number does Assigned Tunnel ID has not
      advance).  Acknowledgment Number indicates yet been
      received from the latest packet
      sequence number last received.  Together, these fields can peer, Tunnel ID MUST be used set to handle out-of-order packets, 0.

      Nr and to provide flow control for Ns reflect the connection. currently transmitted packet and latest
      received packet respectively.  See section 4.0.

      If the K bit is set, the Key field is present.  Refer to the
      description in 5.2.

   5.4 Control Message Types

      Control message types defined in this specification exist under
      Vendor ID 0, indicating IETF defined behavior.  The actual message
      semantics are defined in K bit MUST be
      set if a Challenge value was received during tunnel setup, and the next section.  The currently defined
      control messages types, grouped by function, are:

         Control Message                        Message Code

         (Control Connection Management)

         Start-Control-Connection-Request            1
         Start-Control-Connection-Reply              2
         Start-Control-Connection-Connected          17
         Stop-Control-Connection-Request             3
         Stop-Control-Connection-Reply               4
         Echo-Request                                5
         Echo-Reply                                  6

         (Call Management)

         Outgoing-Call-Request                       7
         Outgoing-Call-Reply                         8
         Incoming-Call-Request                       9
         Incoming-Call-Reply                        10
         Incoming-Call-Connected                    11
         Call-Clear-Request                         12
         Call-Disconnect-Notify                     13



Valencia                    expires February May 1997                    [Page 14] 15]





INTERNET DRAFT                                                April                                             December 1996


         No-op                                      16

         (Error Reporting)

         WAN-Error-Notify                           14

         (PPP Session Control)
         Set-Link-Info                              15


   5.5 General Error Codes

      General error codes pertain to types


      Key reflects the challenge response of errors this authentication, with
      the resulting MD5 hash value broken into successive 32-bit fields
      which are not spe-
      cific to any particular XOR'ed together and this value put in the Key field.

   5.3 Payload Message Format

      PPP payload packets tunneled within L2TP request, but rather to protocol or
      message format errors.  If have a smaller encapsula-
      tion than the L2TP reply indicates in its Result
      Code that control message header, reducing overhead of
      L2TP during the life of a general error occurred, tunneled PPP session.  The MTU for the General Error value should
      be examined
      user data packets encapsulated in L2TP is expected to determined what the error was.  The currently
      defined General Error codes be 1500
      octets, not including L2TP and their meanings are: media encapsulation.  The smallest
      L2TP encapsulation is 2 octets; the largest is 18 octets (plus
      padding bytes, if present).  See section 8.1 for further MTU con-
      siderations.

       0                   1                   2                   3
       0 - No general error 1 - No control connection exists yet for this LAC-LNS pair 2 - Length is wrong or Magic Cookie value is incorrect 3 - One of the field values was out of range or
             reserved field was non-zero 4 - Insufficient resources to handle this command now 5 - The 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |T|L|I|C|F|K|O|           | Ver |          Length (opt)         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Tunnel ID (opt)        |         Call ID is invalid in this contex
         6 - A generic vendor-specific error occurred in the LAC

6.0 Control Connection Protocol Specification

   Control Connection messages are used to establish and clear user ses-
   sions. (opt)         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             Ns (opt)          |               Nr (opt)        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Key (opt)                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            Offset Size        |    Offset bytes of pad...     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The first set T bit MUST be 0, indicating payload.

      Ver MUST be 002, indicating version 1 of Control Connection messages are used to
   maintain the control connection itself.  The control connection L2TP protocol.

      If the L bit is
   initiated by a LAC or LNS after establishing set, the underlying tunnel-
   over-media connection.

   6.0.1 Control Connection Collision

      For Length field is present, indicating the case where an LAC and LNS both initiate tunnels to each
      other concurrently, and where
      total length of the LAC received packet.

      The I and LNS both determine that
      a single tunnel suffices (generally because C bits indicate the presence of media characteris-
      tic considerations, for instance, whether individual tunnels are
      needed to gain QOS guarantees for each tunnel), a "tie breaker"
      may be undertaken. Tunnel ID and Call ID,
      respectively.  The details interpretation of breaking a tie are documented
      with these fields, if present, is
      described in section 5.2.

      If the tunnel establishment messages.

   6.0.2 Reliable Delivery of Control Messages

      Since L2TP may run across media where packets may be lost, L2TP
      may need to retransmit a control message after detecting that F bit is set, both the
      peer never received it.  Each tunnel maintains Sequence Nr and
      Acknowledgment values for the control channel, which Ns fields are global
      across present.  Ns
      indicates the tunnel.  When a control message is sent, it is assigned sequence number of the current Sequence number, and packet being sent.  The cur-
      rent packet will be this sequence number if the Sequence counter payload size is



Valencia                  expires February 1997                 [Page 15]





INTERNET DRAFT                                                April 1996


      incremented (wrapping from its maximum 16-bit value to 0).  The
      Acknowledgment field of a control message always reflects
      non-zero, otherwise this packet is only an acknowledgment
      (sequence number does not advance).  Nr indicates the
      highest in-order Sequence next packet
      sequence number to be received from (if the peer.

      Each tunnel maintains a queue of control messages last data packet had Ns set
      to 1, the Nr sent back would be transmit-
      ted 2).  Together, these fields can be
      used to handle out-of-order packets, and to provide flow control
      for the peer.  The message at the front of connection.

      If the queue K bit is sent
      with a given sequence number, and set, the Key field is held until a control message
      arrives from present.  Refer to the peer
      description in which the Acknowledgment 5.2.

      The Offset Size field indicates
      receipt of this message.  After a timeout interval (a recommended
      default is one second, but this may be altered based on media con-
      siderations), present if the packet O bit is retransmitted.  The retransmitted
      packet holds set in the same Sequence number, but header



Valencia                    expires May 1997                    [Page 16]





INTERNET DRAFT                                             December 1996


      flags.  This field specifies the Acknowledgment
      value should be updated to reflect any packet received in number of bytes past the
      interim.

      If no peer response L2TP
      header at which the payload data is detected after several retransmissions (a
      recommended default expected to start.  It is 5, but again may rec-
      ommended that data thus skipped be altered due initialized to media
      considerations), 0's.  If Offset
      Size is 0, or the tunnel and all sessions within should be
      cleared.

      The default O bit is to have a single control message outstanding on a
      given.  If a peer specifies a control message window in not set, the Start-
      Control-Connection-Request and -Reply packets, up to first byte following the indicated
      number
      last byte of control messages may be sent and held outstanding.

   6.0.3 L2TP header is the first byte of payload data.

   5.4 Control Message Format

      The following Types

      Control Connection messages are all sent as packets
      on the established tunnel connection between a given LNS-LAC pair.
      All data is sent in network order (high order octets first).  Any
      "reserved" or "empty" fields must be sent as 0 values to allow for
      protocol extensibility.

      Each control message has a header, specified types defined in section 5.2,
      including an AVP this specification exist under
      Vendor ID 0, indicating the type of control message, followed
      by zero or more AVP's appropriate for the given type of control
      message.  Each control message is described first at a block
      level, and then with details of each AVP.

6.1 Start-Control-Connection-Request IETF defined behavior.  The Start-Control-Connection-Request is a L2TP control actual message used
   to initialize
      semantics are defined in the tunnel between a LNS and a LAC. next section.  The tunnel must be
   initialized through the exchange of these currently defined
      control messages before any
   other L2TP messages can be issued.  The establishment of the control
   connection is started types, grouped by the initiator of the underlying tunnel.  The
   message is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP function, are:

         Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Message Code

         (Control Connection Management)

         Start-Control-Connection-Request   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Protocol Version      |



Valencia                  expires February 1997                 [Page 16]





INTERNET DRAFT                                                April 1996


   | Framing Capabilities  |
   | Bearer Capabilities   |
   | Tie Breaker           |
   | Firmware Revision     |
   | Host Name             |
   | Vendor Name           |
   | Assigned Tunnel ID    |
   | Control Message Window|
   | Challenge             |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Start-Control-Connection-Request AVP

       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
         Start-Control-Connection-Reply              2
         Start-Control-Connection-Connected          17
         Stop-Control-Connection-Request             3
         Stop-Control-Connection-Reply               4
         Hello                                       5
         (deleted)                                   6

         (Call Management)

         Outgoing-Call-Request                       7
         Outgoing-Call-Reply                         8
         Outgoing-Call-Connected                    16
         Incoming-Call-Request                       9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Start-Control-Connection-Request AVP encodes a request
         Incoming-Call-Reply                        10
         Incoming-Call-Connected                    11
         Call-Clear-Request                         12
         Call-Disconnect-Notify                     13

         (Error Reporting)

         WAN-Error-Notify                           14

         (PPP Session Control)
         Set-Link-Info                              15


   5.5 General Error Codes

      General error codes pertain to an
      LNS types of errors which are not spe-
      cific to receive a tunneled PPP session from any particular L2TP request, but rather to protocol or
      message format errors.  If an LAC.  The Attribute
      field is 1, indicating Start-Control-Connection-Request.  The
      Flags indicate a mandatory option.  Details associated with this
      tunneled session follow L2TP reply indicates in additional AVP's within its Result
      Code that a general error occurred, the packet.

   Protocol Version

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 General Error value should
      be examined to determined what the error was.  The currently
      defined General Error codes and their meanings are:

         0 - No general error



Valencia                    expires May 1997                    [Page 17]





INTERNET DRAFT                                             December 1996


         1 - No control connection exists yet for this LAC-LNS pair
         2 - Length is wrong
         3 - One of the field values was out of range or
             reserved field was non-zero
         4 - Insufficient resources to handle this operation now
         5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|     0x01      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     0x00      |
      +-+-+-+-+-+-+-+-+

      The Protocol Version AVP within a Start-Control-Connection-Request
      packet indicates the L2TP protocol version available. - The
      Attribute value Call ID is 1, indicating Protocol Version, and invalid in this context
         6 - A generic vendor-specific error occurred in the Value
      field LAC
         7 - Try another.  If LAC is a 16-bit hexadecimal value 0x100, indicating L2TP proto-
      col version 1, revision 0. aware of other possible LNS
             destinations, it should try one of them.  This AVP must can be present.

   Framing Capabilities

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               11              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                2              |0 0 0 0 0 0 0 1|     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                  expires February 1997                 [Page 17]





INTERNET DRAFT                                                April 1996


      |     0x00      |     0x00      |0|0|0|0|0|0|S|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Framing Capabilities AVP within a Start-Control-Connection-
      Request indicates
             used to guide an LAC based on LNS policy, for instance,
             the type existence of framing multilink PPP bundles.

         Generally, when a value of 6 is used, a vendor-specific AVP
         will be present also, providing further detail for that vendor
         implementation.

         If the sender length of this mes-
      sage can provide.  The Attribute is 2, it is an AVP indicating a mandatory AVP, General Error specifies
         that the Value field is a 32-bit quantity, with more than two bits defined.  If bit A
      is set, asynchronous framing is supported.  If bit S is set, syn-
      chronous framing is supported.  This AVP must be present.

   Bearer Capabilities

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               11              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                3              |0 0 0 0 0 0 0 1|     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     0x00      |     0x00      |0|0|0|0|0|0|D|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Bearer Capabilities AVP within a Start-Control-Connection-
      Request indicates bytes in length, the bearer capabilities that
         remaining bytes are an arbitrary string providing further (pos-
         sibly human readable) text associated with the sender condition.

6.0 Control Connection Protocol Specification

   Control Connection messages are used to establish and clear user ses-
   sions.  The first set of this
      message can provide. Control Connection messages are used to
   maintain the control connection itself.  The Attribute is 3, it control connection is a mandatory AVP,
   initiated by an LAC or LNS after establishing the Value field is underlying tunnel-
   over-media connection.

   6.0.1 Control Connection Collision

      For the case where an LAC and LNS both initiate tunnels to each
      other concurrently, and where the LAC and LNS both determine that
      a 32-bit quantity single tunnel suffices (generally because of media characteris-
      tic considerations, for instance, whether individual tunnels are
      needed to gain QOS guarantees for each tunnel), a "tie breaker"
      may be undertaken.  The details of breaking a tie are documented
      with two bits defined.  If
      bit A is set, analog access is supported.  If bit D is set, digi-
      tal access is supported.  This AVP must be present.

   Tie Breaker

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               15              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                4              |0 0 0 0 0 0 0 0| Tie Break...  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Value...                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               ...(64 bits)                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Tie Breaker AVP within a Start-Control-Connection-Request con-
      tains a 64-bit Value used to break ties in the tunnel establishment
      between messages.

   6.0.2 Reliable Delivery of Control Messages

      Since L2TP may run across media where packets may be lost, an L2TP
      peer sending a LAC-LNS pair.  It is encoded as control message will retransmit the Attribute 4, control message
      after deciding that its remote peer has not
      mandatory, with the indicated number of bytes representing the
      vendor string.  This AVP received it.  The
      reliable transport mechanism built into L2TP is optional.

      If present, it indicates the sender wishes essentially a single tunnel to
      exist betweeen
      lower layer transport service; the given LAC-LNS pair, Nr and Ns fields of the control
      message header belong to this value will be used
      decide on a single tunnel where both LAC and LNS initiate a tunnel
      concurrently. transport layer.  The recipient higher layer
      functions of L2TP are not concerned with retransmission or order-
      ing of control messages.

      Each tunnel maintains a Start-Control-Connection-Request
      must check queue of control messages to see if a Start-Control-Connection-Request has been



Valencia                  expires February 1997                 [Page 18]





INTERNET DRAFT                                                April 1996


      sent be transmit-
      ted to the peer, and if so, must compare its Tie Breaker value
      with the received one. peer.  The lower value "wins", and message at the "loser"
      must initiate a tunnel disconnect for their outstanding tunnel.

      If a tie breaker is received, and front of the outstanding Start-Control-
      Connection-Request had no tie breaker queue is sent
      with a given Ns value, and is held until a control message arrives
      from the initiator peer in which
      included the Tie Breaker AVP "wins".

      It Nr field indicates receipt of this



Valencia                    expires May 1997                    [Page 18]





INTERNET DRAFT                                             December 1996


      message.  After a fixed (recommended default is recommended that 1 second) or adap-
      tive (see Appendix D) timeout interval expires without receiving
      such an acknowledgment, the Value control message packet is retransmit-
      ted.  The retransmitted packet contains the same Ns value, but the
      Nr value MUST be set updated to reflect any packets received in the MAC address of a
      LAN interface on the sender.
      interim.

      If no MAC address peer response is available, a
      64-bit random number should detected after several retransmissions (a
      recommended default is 5, but may be used instead.

   Firmware Revision

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                5              |0 0 0 0 0 0 0 0|    Max (H)    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Max (L)     |
      +-+-+-+-+-+-+-+-+

      The Firmware Revision AVP altered due to media consid-
      erations), the tunnel and all sessions within MUST be cleared.

      When a Start-Control-Connection-
      Request indicates the firmware revision tunnel is being shut down for reasons other than loss of
      connectivity, the issuing device.
      The Attribute is 5, it is not a mandatory AVP, state and reliable delivery mechanisms MUST be
      maintained and operated for the Value field is
      a 16-bit integer encoded full retransmission interval after
      the final message exchange has occurred.  This permits reliable
      delivery of closing messages in environments where these closing
      messages might be dropped.

      Unlike payload traffic, a vendor specific format.  For devices
      which do not have peer MUST NOT withhold acknowledgment of
      packets as a firmware revision (general purpose computers
      running L2TP software modules, technique for instance), the revision of the flow controlling control messages.  An
      L2TP software module may implementation is expected to be reported instead.  This AVP able to keep up with incom-
      ing control messages, possible responding to some with errors
      reflecting an inability to honor the requested action.

      A sliding window mechanism is
      optional.

   Host Name

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    7 + length of host name    |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                6              |0 0 0 0 0 0 0 0|Host name...   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ used, by default, for control mes-
      sage transmission.  The Host Name AVP within a Start-Control-Connection-Request indi-
      cates the DNS name of the issuing LAC or LNS.  It default is encoded as to permit four control message
      to be outstanding on a given tunnel.  If a peer specifies a con-
      trol message window in the Attribute 6, not mandatory, with Start-Control-Connection-Request and
      -Reply packets, up to the indicated number of bytes
      representing the host name string.  This AVP is optional.

   Vendor Name

       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 control messages may
      be sent and held outstanding.  An implementation may only support
      a receive window of 1, but MUST accept at least a window of 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |       (7 + vendor length)     | from
      its peer.

      The transport layer at a receiving peer is responsible for making
      sure that control messages are delivered in order to the higher
      layer and that duplicate messages are not delivered to the higher
      layer.  Messages arriving out of order may be queued for in-order
      delivery when the missing messages are received or they may be
      discarded, requiring a retransmission.

   6.0.3 Control Message Format

      The following Control Connection messages are all sent as packets
      on the established tunnel connection between a given LNS-LAC pair.
      All data is sent in network order (high order octets first).  Any
      "reserved" or "empty" fields MUST be sent as 0               | values to allow for
      protocol extensibility.

      Each control message has a header, specified in section 5.2,
      including an AVP indicating the type of control message, followed
      by zero or more AVP's appropriate for the given type of control
      message.  Each control message is described first at a block
      level, and then with details of each AVP.




Valencia                    expires February May 1997                    [Page 19]





INTERNET DRAFT                                                April                                             December 1996


      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7              |0 0 0 0 0 0 0 0|Vendor name... |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


6.1 Start-Control-Connection-Request

   The Vendor Name AVP within a Start-Control-Connection-Request con-
      tains a vendor specific string describing the type of LAC or LNS
      being used.  It is encoded as an L2TP control message used
   to initialize the Attribute 7, not mandatory, with tunnel between an LNS and an LAC.  The tunnel must
   be initialized through the indicated number exchange of these control messages before
   any other L2TP messages can be issued.  The establishment of bytes representing the vendor string.
      This AVP con-
   trol connection is optional. started by the initiator of the underlying tunnel.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Start-Control-Connection-Request   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Protocol Version      |
   | Framing Capabilities  |
   | Bearer Capabilities   |
   | Tie Breaker           |
   | Firmware Revision     |
   | Host Name             |
   | Vendor Name           |
   | Assigned Tunnel ID    |
   | Control Message Window|
   | Challenge             |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Start-Control-Connection-Request AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1|0|0|0|        6              |                9              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                8              |0 0               0 0 0 0 0 1|     ID (H)               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     ID (L)                1              |
      +-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Assigned Tunnel ID AVP within a Start-Control-Connection-
      Request specifies the Tunnel ID which the peer should use in all
      subsequent packets.  Before the Assigned Tunnel ID Attribute field is received,
      packets should be sent with 1, indicating Start-Control-Connection-
      Request.  The Flags indicate a Tunnel ID value of 0.  It is encoded
      as the Attribute 8, mandatory, mandatory option.  Details associ-
      ated with this tunneled session follow in additional AVP's within
      the two bytes encoded as a
      16-bit non-zero Tunnel ID value.  This AVP must be present.

   Control Message Window packet.

   Protocol Version

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9              |0 0 0 0 0 0 0 0|    Window               101             |     0x01      |     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Control Message Window Protocol Version AVP within a Start-Control-Connection-
      Request specifies Start-Control-Connection-Request
      packet indicates the number of control messages which may be
      received without waiting for an acknowledgment.  It L2TP protocol version available.  The
      Attribute value is encoded as
      the Attribute 9, not mandatory, with a single octet 101, indicating the
      number of such messages.  If absent, the peer must use Protocol Version, and is marked
      mandatory.  This AVP MUST be present.  The Value field is a 16-bit



Valencia                    expires May 1997                    [Page 20]





INTERNET DRAFT                                             December 1996


      hexadecimal value of
      1 for the Window.

   Challenge 0x100, indicating L2TP protocol version 1, revi-
      sion 0.

   Framing Capabilities

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      7 + length of challenge
      |1|0|0|0|       10              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               10              |0 0 0 0 0 0 0 1| Challenge...               102             |     0x00      |     0x00      |



Valencia                  expires February 1997                 [Page 20]





INTERNET DRAFT                                                April 1996
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |Challenge...
      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     0x00      |0|0|0|0|0|0|S|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Challenge Framing Capabilities AVP within a Start-Control-Connection-Request indi-
      cates that the peer wishes to authenticate Start-Control-Connection-
      Request indicates the tunnel endpoints.
      It is encoded as type of framing that the Attribute 10, mandatory, with at least one
      byte sender of challenge value embedded.

6.2 Start-Control-Connection-Reply this mes-
      sage can provide.  The Start-Control-Connection-Reply Attribute value is an L2TP control message sent in
   reply to a received Start-Control-Connection-Request message.  This
   message contains a result code 102, indicating the result of the control
   connection establishment attempt. Framing
      Capabilities, and is marked mandatory.  This AVP MUST be present.
      The message Value field is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ a 32-bit quantity, with two bits defined.  If
      bit A is set, asynchronous framing is supported.  If bit S is set,
      synchronous framing is supported.

   Bearer Capabilities

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1|0|0|0|       10              |    L2TP Control Message Header               0               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Start-Control-Connection-Reply     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Protocol Version      |
   | Result Code           |
   | Error Code               103             |     0x00      | Framing Capabilities     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     0x00      |0|0|0|0|0|0|D|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Bearer Capabilities   |
   | Firmware Revision     |
   | Host Name             |
   | Vendor Name           |
   | Assigned Tunnel ID    |
   | Control Message Window|
   | Challenge             |
   | Response              |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Start-Control-Connection-Reply AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                2              |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ within a Start-Control-Connection-
      Request indicates the bearer capabilities that the sender of this
      message can provide.  The Attribute field value is 2, 103, indicating Start-Control-Connection-
      Reply.
      Bearer Capabilities, and is marked mandatory.  This AVP MUST be
      present.  The Flags indicate Value field is a mandatory option.

   Protocol Version 32-bit quantity with two bits
      defined.  If bit A is set, analog access is supported.  If bit D
      is set, digital access is supported.

   Tie Breaker

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9
      |0|0|0|0|       14              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               104             | Tie Break Value...            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            Value...                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires February May 1997                    [Page 21]





INTERNET DRAFT                                                April                                             December 1996


      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|     0x01


      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     0x00    ...(64 bits)               |
      +-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Protocol Version Tie Breaker AVP within a Start-Control-Connection-Reply
      packet indicates the L2TP protocol version available. Start-Control-Connection-Request con-
      tains a 64-bit Value used to break ties in tunnel establishment
      between an LAC-LNS pair.  The Attribute value is 1, 104, indicating Protocol Version,
      Tie Breaker, and the Value
      field is a 16-bit hexadecimal value 0x100, indicating L2TP proto-
      col version 1, revision 0. marked optional.  This AVP must be present.

   Framing Capabilities itself is optional.
      The 8 byte Value is used as a 64-bit tie breaker value.

      If present, it indicates the sender wishes a single tunnel to
      exist between the given LAC-LNS pair, and this value will be used
      to choose a single tunnel where both LAC and LNS initiate a tunnel
      concurrently.  The recipient of a Start-Control-Connection-Request
      must check to see if a Start-Control-Connection-Request has been
      sent to the peer, and if so, must compare its Tie Breaker value
      with the received one.  The lower value "wins", and the "loser"
      MUST initiate a tunnel disconnect for their outstanding tunnel.
      In the case where a tie breaker is present on both sides, and the
      value is equal, both sides MUST initiate tunnel disconnects.

      If a tie breaker is received, and the outstanding Start-Control-
      Connection-Request had no tie breaker value, the initiator which
      included the Tie Breaker AVP "wins".

      It is recommended that the Value be set to the MAC address of a
      LAN interface on the sender.  If no MAC address is available, a
      64-bit random number should be used instead.

   Firmware Revision

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9
      |0|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                2              |0 0 0 0 0 0 0 1|     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               105             |     0x00    Max (H)    |     0x00   Max (L)     |     0x00  |S|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Framing Capabilities Firmware Revision AVP within a Start-Control-Connection-
      Reply
      Request indicates the type firmware revision of framing that the sender of this mes-
      sage can provide. issuing device.
      The Attribute value is 2, it 105, indicating Firmware Revision, and is a mandatory AVP, the
      marked optional.  This AVP itself is optional.  The Value field is
      a 32-bit quantity, with two bits defined.  If bit A
      is set, asynchronous framing is supported.  If bit S is set, syn-
      chronous framing is supported.  This AVP must 16-bit integer encoded in a vendor specific format.  For devices
      which do not have a firmware revision (general purpose computers
      running L2TP software modules, for instance), the revision of the
      L2TP software module may be present.

   Bearer Capabilities reported instead.

   Host Name

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0|0|0|0| 6 + Host name length  |                9              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                3              |0 0 0 0               0 0 0 1|     0x00               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 22]





INTERNET DRAFT                                             December 1996


      |     0x00      |     0x00               106             |Host name...   |           |D|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Bearer Capabilities Host Name AVP within a Start-Control-Connection-
      Reply indicates the bearer capabilities that Start-Control-Connection-Request indi-
      cates the sender name of this
      message can provide. the issuing LAC or LNS.  The Attribute value is 3, it
      106, indicating Host Name, and is a mandatory AVP,
      the Value field marked optional.  This AVP
      itself is optional.  This name should be as broadly unique as pos-
      sible; for hosts participating in DNS [4], a 32-bit quantity hostname with two bits defined.  If
      bit A is set, analog access is supported.  If bit D is set, digi-
      tal access is supported.  This AVP must fully
      qualified domain would be present.

   Firmware Revision appropriate.

   Vendor Name

       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



Valencia                  expires February 1997                 [Page 22]





INTERNET DRAFT                                                April 1996


      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0|0|0|0|  6 + vendor name len  |                4              |0 0               0 0 0 0 0 0|    Max (H)               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |   Max (L)              107              |Vendor name... |
      +-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Firmware Revision Vendor Name AVP within a Start-Control-Connection-Reply
      indicates Start-Control-Connection-Request con-
      tains a vendor specific string describing the firmware revision type of the issuing device. LAC or LNS
      being used.  The Attribute value is 4, it 107, indicating Vendor Name,
      and is not a mandatory AVP, the marked optional.  This AVP itself is optional.  The Value field
      is a
      16-bit integer encoded in a vendor specific format.  For devices
      which do not have a firmware revision (general purposes computers
      running L2TP software modules, for instance), the revision indicated number of bytes representing the
      L2TP software module may be reported instead.  This AVP is
      optional.

   Host Name vendor string.

   Assigned Tunnel ID

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    7 + length of host name
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                5              |0 0 0 0 0 0 0 0|Host name...               108             |         Tunnel ID             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Host Name Assigned Tunnel ID AVP within a Start-Control-Connection-Reply indi-
      cates the DNS name of Start-Control-Connection-
      Request specifies the issuing LAC or LNS.  It is encoded as Tunnel ID which the Attribute 5, not mandatory, with receiving peer MUST use
      in the indicated number Tunnel ID field of bytes
      representing the host name string. all subsequent packets.  The Attribute
      value is 108, indicating Assigned Tunnel ID, and is marked manda-
      tory.  This AVP MUST be present.  Before the Assigned Tunnel ID
      AVP is optional.

   Vendor Name received, packets MUST be sent with a Tunnel ID value of 0.
      The Value is a 16-bit non-zero Tunnel ID value.

   Control Message Window

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |       (7 + vendor length)
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                6              |0 0 0 0 0 0 0 0|Vendor name...               109             |             Window            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+




Valencia                    expires May 1997                    [Page 23]





INTERNET DRAFT                                             December 1996


      The Vendor Name Control Message Window AVP within a Start-Control-Connection-Reply con-
      tains a vendor specific string describing Start-Control-Connection-
      Request specifies the type of LAC or LNS receive window size being used.  It is encoded as offered to the
      remote peer.  The Attribute 6, not mandatory, with
      the indicated number of bytes representing the vendor string. value is 109, indicating Control Mes-
      sage Window, and is mandatory.  This AVP itself is optional.

   Assigned Tunnel ID

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0
      Value is a 16-bit word indicating the offered window size.  If
      absent, the peer must assume a value of 4 for its transmit window.
      The remote peer may send the specified number of control messages
      before it must wait for an acknowledgment.

   Challenge

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |       (7
      |1|0|0|0| 6 + vendor length) Challenge length  |               0               |



Valencia                  expires February 1997                 [Page 23]





INTERNET DRAFT                                                April 1996
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7              |0 0 0 0 0 0 0 1|     ID (H)    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+              110              |     ID (L) Challenge...  |
      +-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Assigned Tunnel ID Challenge AVP within a Start-Control-Connection-Reply
      specifies the Tunnel ID which Start-Control-Connection-Request indi-
      cates that the issuing peer should use in all subse-
      quent packets.  It is encoded as wishes to authenticate the tunnel end-
      points.  The Attribute 7, mandatory, with
      the two bytes encoded as value is 110, indicating Challenge, and is
      marked mandatory.  This AVP is optional.  The Value is one or more
      octets of challenge value.

6.2 Start-Control-Connection-Reply

   The Start-Control-Connection-Reply is an L2TP control message sent in
   reply to a 16-bit non-zero received Start-Control-Connection-Request message.  This
   message contains a result code indicating the result of the control
   connection establishment attempt.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Start-Control-Connection-Reply     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Protocol Version      |
   | Result Code           |
   | Error Code            |
   | Framing Capabilities  |
   | Bearer Capabilities   |
   | Firmware Revision     |
   | Host Name             |
   | Vendor Name           |
   | Assigned Tunnel ID value.  This
      AVP must be present.    |
   | Control Message Window Window|
   | Challenge             |
   | Response              |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Start-Control-Connection-Reply AVP

       0                   1                   2                   3



Valencia                    expires May 1997                    [Page 24]





INTERNET DRAFT                                             December 1996


       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                8
      |1|0|0|0|        6              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                8              |0 0 0 0 0 0 0 0|    Window                2              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Control Message Window AVP within a Start-Control-Connection-
      Reply specifies the number of control messages which may be
      received without waiting for an acknowledgment.  It is encoded as
      the Attribute 8, not mandatory, with a single octet field is 2, indicating the
      number of such messages.  If absent, the peer must use Start-Control-Connection-
      Reply.  The Flags indicate a value of
      1 for the Window.

   Result Code mandatory option.

   Protocol Version

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                9              |0 0 0 0 0 0 0 1|     Code               201             |     0x01      |     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Result Code Protocol Version AVP within a Start-Control-Connection-Reply
      packet indicates the result of the command channel establishment attempt. L2TP protocol version available.  The Value field
      Attribute value is 9, 201, indicating a Result Code.  The code is a
      single octet, Protocol Version, and this AVP is mandatory.  Result code values are:
         1 - Successful channel establishment
         2 - General error--Error Code indicates the problem
         3 - Command channel already exists
         4 - Requester Value
      field is not authorized to establish a command channel
         5 - The protocol 16-bit hexadecimal value 0x100, indicating L2TP proto-
      col version of the requester is not supported

   Error Code 1, revision 0.  This AVP MUST be present.

   Framing Capabilities

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                  expires February 1997                 [Page 24]





INTERNET DRAFT                                                April 1996


      |                8
      |1|0|0|0|       10              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               10              |0 0 0 0 0 0 0 1|    Error               202             |     0x00      |     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      This
      |     0x00      |0|0|0|0|0|0|S|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Framing Capabilities AVP is present only if within a "General Error" exists, in which
      case Result Code is set to 2 and this AVP encodes Start-Control-Connection-
      Reply indicates the general
      error value as documented in section 5.5.  It has a Value type of 10,
      and framing that the sender of this mes-
      sage can provide.  The Attribute is marked mandatory.

   Challenge 202, it is a mandatory AVP,
      the Value field is a 32-bit quantity, with two bits defined.  If
      bit A is set, asynchronous framing is supported.  If bit S is set,
      synchronous framing is supported.  This AVP MUST be present.

   Bearer Capabilities

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      7 + length of challenge
      |1|0|0|0|       10              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               11              |0 0 0 0 0 0 0 1| Challenge...               203             |     0x00      |     0x00      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |Challenge...



Valencia                    expires May 1997                    [Page 25]





INTERNET DRAFT                                             December 1996


      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     0x00      |0|0|0|0|0|0|D|A|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Challenge Bearer Capabilities AVP within a Start-Control-Connection-Reply indi-
      cates that Start-Control-Connection-
      Reply indicates the peer wishes to authenticate bearer capabilities that the tunnel initiator.
      It sender of this
      message can provide.  The Attribute is encoded as 203, it is a mandatory AVP,
      the Attribute 11, mandatory, Value field is a 32-bit quantity with at least one
      byte of challenge value embedded.

   Response two bits defined.  If
      bit A is set, analog access is supported.  If bit D is set, digi-
      tal access is supported.  This AVP MUST be present.

   Firmware Revision

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               23
      |0|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               12              |0 0 0 0 0 0 0 1|   Response...               204             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    Max (H)    | Response... (128 bits)   Max (L)     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Response Firmware Revision AVP within a Start-Control-Connection-Reply packet
      provides a response to a challenge received.
      indicates the firmware revision of the issuing device.  The
      Attribute value is 12, indicating Response, and 204, it is not a mandatory AVP, the Value field is a 128-bit value
      reflecting the CHAP-style response to the challenge.  This AVP
      must be present if
      16-bit integer encoded in a challenge was received, otherwise is omitted. vendor specific format.  For purposes of the ID value in the CHAP response calculation, the
      low order byte of devices
      which do not have a firmware revision (general purposes computers
      running L2TP software modules, for instance), the Sequence number revision of the challenge are used.

6.3 Start-Control-Connection-Connected

   The Start-Control-Connection-Connected message is an
      L2TP control
   message sent in reply to a received Start-Control-Connection-Reply
   message. software module may be reported instead.  This message provides closure to the tunnel establishment
   process, and includes a challenge response if the peer sent a chal-
   lenge in the Start-Control-Connection-Reply message.  The message is



Valencia                  expires February 1997                 [Page 25]





INTERNET DRAFT                                                April 1996


   structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Start-Control-Connection-Connected |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Response              |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Start-Control-Connection-Reply AVP is
      optional.

   Host Name

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7
      |0|0|0|0| 6 + Host name length  |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                17             |0 0 0 0 0 0 0 1|               205             |Host name...   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Host Name AVP within a Start-Control-Connection-Reply indi-
      cates the name of the issuing LAC or LNS.  See the notes in sec-
      tion 6.1 concerning Host Name contents.  It is encoded as the
      Attribute field 205, not mandatory, with the indicated number of bytes
      representing the host name string.  This AVP is 17, indicating Start-Control-Connection-
      Connected.  The Flags indicate a mandatory option.

   Response optional.

   Vendor Name

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0|0|0|0| 6 + Vendor name len   |               23              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0               0 0 0 0 1|   Response...               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Response... (128 bits)               206             |Vendor name... |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 26]





INTERNET DRAFT                                             December 1996


      The Response Vendor Name AVP within a Start-Control-Connection-Connected
      packet provides a response to Start-Control-Connection-Reply con-
      tains a challenge received.  The Attribute
      value is 1, indicating Response, and vendor specific string describing the Value field type of LAC or LNS
      being used.  It is a 128-bit
      value reflecting the CHAP-style response to the challenge.  This
      AVP must be present if a challenge was received, otherwise is
      omitted.  For purposes of the ID value in the CHAP response calcu-
      lation, encoded as the low order byte of Attribute 206, not mandatory,
      with the Sequence indicated number of bytes representing the challenge
      are used.

6.4 Stop-Control-Connection-Request

   The Stop-Control-Connection-Request is an L2TP control message sent
   by one peer of a LAC-LNS control connection to inform the other peer
   that the control connection should be closed.  In addition to closing
   the control connection, all active user calls are implicitly cleared.
   The reason for issuing this request is indicated in the Reason field.
   The message is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                  expires February 1997                 [Page 26]





INTERNET DRAFT                                                April 1996


   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Stop-Control-Connection-Request    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Reason                |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Stop-Control-Connection-Request vendor string.
      This AVP is optional.

   Assigned Tunnel ID

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7
      |1|0|0|0|    6 + length         |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                3              |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Attribute field is 3, indicating Stop-Control-Connection-
      Request.               207             |               ID              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Flags indicate Assigned Tunnel ID AVP within a mandatory option.  The Flags indi-
      cate Start-Control-Connection-Reply
      specifies the Tunnel ID which the receiving peer MUST use in all
      subsequent packets.  It is encoded as the Attribute 207, manda-
      tory, with a mandatory option.  The single Reason 16-bit non-zero Tunnel ID value.  This AVP must follow this.

   Reason MUST be
      present.

   Control Message Window

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |
      |0|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|    Reason               208             |             Window            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Reason octet indicates the reason for Control Message Window AVP within a Start-Control-Connection-
      Reply specifies the number of control connection
      closure.  Values are:

         1 - General request to clear control connection
         2 - Can't support peer's version messages which may be
      received without waiting for an acknowledgment.  It is encoded as
      the Attribute 208, not mandatory, with a 16-bit word indicating
      the number of such messages.  If absent, the protocol
         3 - Requester is being shut down

6.5 Stop-Control-Connection-Reply

   The Stop-Control-Connection-Reply is an L2TP control message sent by
   one peer of MUST use a LAC-LNS control connection upon receipt value
      of a Stop-
   Control-Connection-Request from 4 for the other peer.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Stop-Control-Connection-Reply   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Window.

   Result Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+
   | Error Code            |
   +-+-+-+-+-+-+-+-+-+-+-+-+




Valencia                  expires February 1997                 [Page 27]





INTERNET DRAFT                                                April 1996


   Stop-Control-Connection-Reply AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                4              |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               209             |             Code              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Attribute Result Code AVP within a Start-Control-Connection-Reply packet
      indicates the result of the control channel establishment attempt.
      The Value field is 4, 209, indicating Stop-Control-Connection-
      Reply. a Result Code.  The Flags indicate code is a mandatory option.
      16-bit word, and this AVP is mandatory.  This AVP MUST be present.
      Result code values are:



Valencia                    expires May 1997                    [Page 27]





INTERNET DRAFT                                             December 1996


         1 - Successful channel establishment
         2 - General error--Error Code indicates the problem
         3 - Control channel already exists
         4 - Requester is not authorized to establish a control channel
         5 - The protocol version of the requester is not supported

   Error 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 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|    Result               210             |             Error             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The
      | Optional Message...           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      This AVP is present only if a "General Error" exists, in which
      case Result octet indicates the result of the attempt Code was set to close 2 and this AVP encodes the
      control connection. general
      error value as documented in section 5.5.  It has a Value of 1 210,
      and is marked mandatory.
      Valid Result Code values are:

         1 - Control connection closed
         2 - Control connection not closed for reason indicated in Error Code

   Error Code

   Challenge

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                8
      |1|0|0|0|     6 + length        |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                2              |0              211              | Challenge...  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Challenge AVP within a Start-Control-Connection-Reply indi-
      cates that the peer wishes to authenticate the tunnel initiator.
      It is encoded as the Attribute 211, mandatory, with at least one
      byte of challenge value embedded.  If this AVP is not present, it
      indicates to the receiving peer that the sender does not wish to
      authenticate that peer.

   Response

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1|0|0|0|       22              |               0 1|    Error               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      This
      |               212             |   Response...                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Response... (128 bits)        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Response AVP within a Start-Control-Connection-Reply packet
      provides a response to a challenge received.  The Attribute value



Valencia                    expires May 1997                    [Page 28]





INTERNET DRAFT                                             December 1996


      is 212, indicating Response, and the Value field is a 128-bit
      value reflecting the CHAP-style response to the challenge.  This
      AVP marked mandatory, and MUST be present only if a "General Error" exists, in which
      case Result Code is set to 2 challenge was
      received and this AVP encodes Start-Control-Connection-Reply indicates suc-
      cess.  For purposes of the general
      error ID value as documented in section 5.5.  It has a Value the CHAP response calcula-
      tion, the low order byte of 2,
      and is marked mandatory.

6.6 Echo-Request the Sequence number of the challenge
      is used.

6.3 Start-Control-Connection-Connected

   The Echo-Request Start-Control-Connection-Connected message is a an L2TP control
   message sent by either peer of in reply to a
   LAC-LNS control connection. received Start-Control-Connection-Reply
   message.  This control message is used as provides closure to the tunnel establishment
   process, and includes a "keep
   Alive" for challenge response if the control connection.  The receiving peer issues an
   Echo-Reply to each Echo-Request received.

   Keepalives should be implemented by sending an Echo-Request once
   every 5 seconds if 60 seconds have passed since sent a message has been



Valencia                  expires February 1997                 [Page 28]





INTERNET DRAFT                                                April 1996


   received from the peer.  If an Echo-Reply has not been received chal-
   lenge in 20
   seconds, the connection should be closed.  These are guideline val-
   ues; actual values may need to vary based on the requirements of a
   particular tunnel media.

   Echoes are global to the tunnel; the Call ID field of these control
   messages must be 0. Start-Control-Connection-Reply message.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Echo-Request  Start-Control-Connection-Connected |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Identifier Response              |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Echo-Request

   Start-Control-Connection-Connected AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7
      |1|0|0|0|        6              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                5              |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                17             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Attribute field is 5, 17, indicating Echo-Request. Start-Control-Connection-
      Connected.  The Flags indicate a mandatory option.

   Identifier

   Response

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               11
      |1|0|0|0|       22              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|     ID...              1701             |   Response...                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     ... 32-bits Response... (128 bits)        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Identifier Response AVP has an within a Start-Control-Connection-Connected
      packet provides a response to a challenge received.  The Attribute of 1,
      value is 1701, indicating Response, and the AVP Value field is marked
      mandatory.  The ID set in the a
      128-bit value of this AVP is set by the
      sender of reflecting the Echo-Request and can be used CHAP-style response to match the reply with the corresponding request. challenge.
      This AVP is optional.

6.7 Echo-Reply

   The Echo-Reply is marked mandatory, and MUST be present if a L2TP control message sent back upon receipt of an
   Echo-Request.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ challenge



Valencia                    expires February May 1997                    [Page 29]





INTERNET DRAFT                                                April                                             December 1996


      was received, otherwise MUST be omitted.  For purposes of the ID
      value in the CHAP response calculation, the low order byte of the
      Sequence number of the challenge are used.

6.4 Stop-Control-Connection-Request

   The Stop-Control-Connection-Request is an L2TP control message sent
   by one peer of an LAC-LNS control connection to inform the other peer
   that the control connection should be closed.  In addition to closing
   the control connection, all active user calls are implicitly cleared.
   The reason for issuing this request is indicated in the Reason field.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Echo-Reply  Stop-Control-Connection-Request    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Identifier Assigned Tunnel ID    |
   | Reason                |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Echo-Reply

   Stop-Control-Connection-Request AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                7
      |1|0|0|0|        6              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                6              |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                3              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Attribute field is 6, 3, indicating Echo-Reply. Stop-Control-Connection-
      Request.  The Flags indicate a mandatory option.  The Flags indi-
      cate a mandatory option.

   Identifier  The single Reason AVP MUST follow this.

   Assigned Tunnel ID

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               11
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                1              |0 0 0 0 0 0 0 1|     ID...     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               301             |     ... 32-bits      Assigned Tunnel ID       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Identifier AVP has an Attribute of 1, value is 301, indicating Assigned Tunnel ID, and the AVP is
      marked mandatory.  If an Echo-Request is received with this AVP,  This AVP MUST be present.  The Value MUST be
      the same
      AVP (with identical ID) is Assigned Tunnel ID first sent back in to the Echo-Reply packet.
      Otherwise this receiving peer.
      This AVP is not included in the Echo-Reply.

6.8 Outgoing-Call-Request

   The Outgoing-Call-Request is a L2TP control message sent by permits the LNS peer to identify the LAC to indicate that appropriate tunnel even
      if Stop-Control-Connection-Request must be sent before an outbound call from the LNS Assigned
      Tunnel ID is to be
   established.  This request provides the LAC with information required
   to make the call.  It also provides information to the LAC that is
   used to regulate the transmission of data to the LNS for this session
   once it is established.  The message is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Outgoing-Call-Request            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Assigned Call ID      |
   |    Call Serial Number     |
   |        Minumum BPS        |
   |        Maximum BPS        |
   |        Bearer Type        | received.

   Reason




Valencia                    expires February May 1997                    [Page 30]





INTERNET DRAFT                                                April                                             December 1996


   |       Framing Type        |
   |  Packet Recv. Window      |
   |  Packet Processing Delay  |
   |        Phone Number       |
   |       Sub-Address         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Outgoing-Call-Request AVP


       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1|0|0|0|        8              |           7                   |       L2TP Message Type               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           7                   |0 0 0 0 0 0 0 1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               302             |             Reason            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Outgoing-Call-Request Attribute value is 302, indicating Reason, and is marked
      mandatory.  This AVP encodes MUST be present.  The Value is a 16-bit word
      indicates the reason for the control connection closure.  Values
      are:

         1 - General request to clear control connection
         2 - Can't support peer's version of the protocol
         3 - Requester is being shut down

6.5 Stop-Control-Connection-Reply

   The Stop-Control-Connection-Reply is an LAC to
      establish L2TP control message sent by
   one peer of an outgoing call.  The flags indicate LAC-LNS control connection upon receipt of a mandatory
      option.

      Assigned Call ID Stop-
   Control-Connection-Request from the other peer.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Stop-Control-Connection-Reply    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Result Code           |
   | Error Code            |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Stop-Control-Connection-Reply AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1|0|0|0|        8              |           9                   |                0              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           1                   |0 0 0 0               0 0 0 1|      ID (H)               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     ID (L)                4              |
      +-+-+-+-+-+-+-+-+
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Assigned Call ID AVP encodes the ID being assigned to call by
      the LNS. Attribute field is 4, indicating Stop-Control-Connection-
      Reply.  The flags Flags indicate a mandatory option.  ID value is a
      unique identifier, unique to a tunnel, assigned by the LNS to this
      session.  It is used to multiplex and demultiplex data sent over
      that tunnel between the LNS and LAC.  This AVP must be present.

      Call Serial Number

   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 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           9
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           2                   |0 0 0 0 0 0 0 1|   Number (H)  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               401             |    Number (L)            Result             |
      +-+-+-+-+-+-+-+-+

      Call Serial Number AVP encodes an identifier assigned by the LNS to
      this call.  The flags indicate a mandatory option.  The Number value
      (Call Serial Number) is an identifier used by the LNS and the LAC
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires February May 1997                    [Page 31]





INTERNET DRAFT                                                April                                             December 1996


      for identifying the call.  Unlike the Call ID, both the LNS


      The Attribute value is 401, indicating Result Code, and LAC
      associate the same Call Serial Number with a given call. is marked
      mandatory.  This AVP
      must MUST be present.

      Minimum BPS  The Value is a 16-bit word
      indicating the result of the attempt to close the control connec-
      tion.  Values are:

         1 - Control connection closed
         2 - Control connection not closed for reason indicated in Error Code

   Error 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 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           11
      |1|0|0|0|        8              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           3                   |0 0 0 0 0 0 0 1|    BPS (H)               402             |             Error             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    BPS (L) Optional Message...           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Minimum BPS
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Attribute value is 402, indicating Error Code, and is marked
      mandatory.  This AVP is present only if a "General Error" exists,
      in which case the Value encodes the lowest acceptable line speed for this
      call.  The flags indicate a mandatory option.  The BPS general error value indi-
      cates the speed as docu-
      mented in bits/second. section 5.5.

6.6 Hello

   The Hello message is an L2TP control message sent by either peer of a
   LAC-LNS control connection.  This AVP must control message is used as a
   "keepalive" for the control connection.

   Keepalives should be present.

      Maximum BPS

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           11                  |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           4                   |0 0 0 0 0 0 0 1|    BPS (H)    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      BPS (L)                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Maximum BPS AVP encodes implemented by sending a Hello once every 60
   seconds if 60 seconds have passed without sending a message to the highest acceptable line speed for
   peer.  When a Hello is received, it MUST be silently discarded (after
   updating any effects of the indicated Nr/Ns values).

   Because a Hello is a control message, and control messages are reli-
   ably sent by the lower level transport, this
      call.  The flags indicate keepalive function oper-
   ates by causing the transport level to reliably deliver a mandatory option.  The BPS value indi-
      cates message.
   If a media interruption has occurred, the speed in bits/second.  This AVP must reliable transport will be present.

      Bearer Type
   unable to deliver the Hello across, and will clean up the tunnel.

   Hello messages are global to the tunnel; the Call ID field of these
   control messages MUST be 0.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    L2TP Control Message Header      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Hello                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Hello AVP

       0                   1                   2                   3



Valencia                    expires May 1997                    [Page 32]





INTERNET DRAFT                                             December 1996


       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           11
      |0|0|0|0|        6              |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                5                   |0 0 0 0 0 0 0 1|0 0 0 0 0 0 0 0|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|D|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Bearer Type AVP encodes the bearer type for the requested call.              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The flags indicate a mandatory option. The Attribute value bit field indi-
      cates is 5, indicating Hello, and is marked
      optional.

6.7 (Deleted)

   This section has been deleted.

6.8 Outgoing-Call-Request

   The Outgoing-Call-Request is an L2TP control message sent by the bearer capability LNS
   to the LAC to indicate that an outbound call from the LNS is to be
   established.  This request provides the LAC with information required
   to make the call.  It also provides information to the LAC that is
   used to regulate the transmission of data to the LNS for this session
   once it is established.

   This message is the first in the "three-way handshake" used by L2TP
   for establishing outgoing call.  Bit
      A if set indicates that calls.  The first message requests the call should be on an analog channel.
      Bit D if set
   call; the second indicates that the call should be on a digital chan-
      nel.  Both bits set indicate was successfully initiated.
   The third and final message indicates that the call can be of either type.



Valencia                  expires February 1997                 [Page 32]





INTERNET DRAFT                                                April 1996


      This AVP must be present. was established.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Outgoing-Call-Request            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Assigned Call ID      |
   |    Call Serial Number     |
   |        Minimum BPS        |
   |        Maximum BPS        |
   |        Bearer Type        |
   |       Framing Type        |
   |  Packet Recv. Window      |
   |  Packet Processing Delay  |
   |        Phone Number       |
   |       Sub-Address         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Outgoing-Call-Request AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           11
      |1|0|0|0|   6                   |                0              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           6                   |0 0 0 0 0 0 0 1|0 0 0 0 0 0 0 0|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A S|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Framing Type           7                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 33]





INTERNET DRAFT                                             December 1996


      The Outgoing-Call-Request AVP encodes the framing type for the requested a request to an LAC to
      establish an outgoing call.  The flags indicate a mandatory
      option.  The value bit field indi-
      cates the type of PPP framing to be used for the outgoing call.
      Bit A if set indicates that Asynchronous framing should be used.
      Bit S is set indicates that Synchronous framing should be used.
      This AVP must be present.

      Packet Receive Window Size

      Assigned Call ID AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |              9
      |1|0|0|0|      8                |                0              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |              7                |0 0 0 0 0 0 0 1|   Size (H)    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             701               |  Size (L)             Call ID           |
      +-+-+-+-+-+-+-+-+

      Packet Recieve Window Size
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Assigned Call ID AVP encodes the window size ID being
      advertised assigned to this
      call by the LNS for this call. LNS.  The flags indicate a manda-
      tory option. Attribute value is 701, indicating Assigned
      Call ID, and is marked mandatory.  This AVP MUST be present.  The Size
      LAC places this value indicates in the number Call ID header field of received data all command
      and payload packets that it subsequently transmits over the LNS will buffer for tunnel
      that belong to this call.  This AVP  The Call ID value is optional.

      Packet Processing Delay AVP an identifier
      assigned by the LNS to this session.  It is used to multiplex and
      demultiplex data sent over that tunnel between the LNS and LAC.

      Call Serial Number

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            9
      |1|0|0|0|   6 + length          |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            8                  |0 0 0 0 0 0 0 1|   Delay (H)             702               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Delay (L)   Number...   |
      +-+-+-+-+-+-+-+-+

      Packet Processing Delay
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Call Serial Number AVP encodes the delay LNS has for process-
      ing window full of packets sent an identifier assigned by the LAC.  The flags indicate a
      mandatory option.  The Delay value LNS to
      this call.
      Attribute is specified in units of 1/10
      seconds. 702, indicating Call Serial Number, and is marked mandatory.
      This AVP is optional.  Refer to appendix A to see a



Valencia                  expires February 1997                 [Page 33]





INTERNET DRAFT                                                April 1996


      description of how this MUST be present.
      The Number value
      is determined an identifier used by the LNS and used.

      Phone the LAC
      for identifying the call.  Unlike the Call ID, both the LNS and LAC
      associate the same Call Serial Number with a given call.  This AVP
      MUST be present, and the Number MUST be at least one octet in length.

      Minimum BPS

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           7 + N
      |1|0|0|0|   10                  |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             9                 |0 0 0 0 0 0 0 1| Phone Number..|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+            703                |    Phone Number ...           BPS (H)             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Phone Number
      |            BPS (L)            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 34]





INTERNET DRAFT                                             December 1996


      Minimum BPS AVP encodes the phone number to lowest acceptable line speed for this
      call.  Attribute is 703, Minimum BPS, and is marked mandatory.
      This AVP MUST be called.  The flags
      indicate a mandatory option. present.  The Phone Number BPS value is an ASCII
      string.  The length of the string is indicates the length speed in the AVP header
      minus 7 bytes.  This AVP is optional.

      Sub-Address AVP
      bits/second.

      Maximum BPS

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           7 + N
      |1|0|0|0|   10                  |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             10                |0 0 0 0 0 0 0 1| Sub-Address ..|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             704               |    Sub-Address ...           BPS (H)             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Sub-Address
      |            BPS (L)            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Maximum BPS AVP encodes additional dialing information.  The flags
      indicate a mandatory option.  The Sub-Address value is an ASCII
      string.  The length of the string highest acceptable line speed for this
      call.  Attribute is the length in the AVP header
      minus 7 bytes. 704, indicating Maximum BPS, and is marked
      mandatory.  This AVP is optional.

6.9 Outgoing-Call-Reply

   The Outgoing-Call-Reply is a L2TP control message sent by the LAC to
   the LNS in response to a received Outgoing-Call-Request message. MUST be present.  The
   reply BPS value indicates the result of the outgoing call attempt.  It also
   provides information to the LNS about particular parameters used for
   the call.  It provides information to allow the LNS to regulate the
   transmission of data to the LAC for this session.  The message is
   structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Outgoing-Call-Reply             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Assigned Call ID      |
   |        Result Code        |
   |        Error Code         |



Valencia                  expires February 1997                 [Page 34]





INTERNET DRAFT                                                April 1996


   |        Cause Code         |
   |      Connect Speed        |
   |       Framing
      speed in bits/second.

      Bearer Type        |
   |  Packet Recv. Window      |
   |  Packet Processing Delay  |
   |    Physical Channel Id    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Outgoing-Call-Reply AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           7
      |1|0|0|0|   10                  |                0              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           8            705                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Outgoing-Call-Reply AVP encodes a result of an outgoing call
   request.  The flags indicate a mandatory option.

   Assigned Call ID AVP 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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           9                   | 0              | 0 0 0|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           1
      |0 0 0 0 0 0 0 1|      ID (H)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      ID (L)   |
   +-+-+-+-+-+-+-+-+

   The Assigned Call ID 0 0 0 0 0 0 0|A|D|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Bearer Type AVP encodes the ID being assigned to call by bearer type for the
   LAC. requested call.
      The flags indicate a mandatory option.  ID value bit field Attribute is 705, indicating Bearer Type, and
      is marked mandatory.  This AVP MUST be present.  The Value is a unique
   identifier, unique to a tunnel, assigned by
      32-bit quantity indicating the LNS to bearer capability required for this session.
   It is used to multiplex and demultiplex data sent over
      outgoing call.  If set, bit A indicates that tunnel
   between the LNS and LAC.  This AVP must call should be present.

   Result Code on
      an analog channel.  If set, bit D indicates that the call should
      be on a digital channel.  Both may be set, indicating that the
      call can be of either type.

      Framing Type AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8
      |1|0|0|0|   10                  |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             2             706               |0 0 0 0 0 0 0 1| Result Code   | 0 0 0 0 0 0 0 0 0|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Result Code AVP encodes the result of the Outgoing-Call-Request.  The
   flags indicate a mandatory option.  The Result Code value can be one
   of the following:

      1 - Call established with no errors
      |0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|S|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires February May 1997                    [Page 35]





INTERNET DRAFT                                                April                                             December 1996


      2 - Outgoing Call not established


      Framing Type AVP encodes the framing type for the reason indicated in Error Code
      3 - Outgoing Call failed due to no carrier detected
      4 - Outgoing Call failed due to detection requested call.
      Attribute is 706, indicating Framing Type, and is marked manda-
      tory.  This AVP MUST be present.  The 32-bit field indicates the
      type of a busy signal
      5 - Outgoing Call failed due PPP framing to lack of a dial tone
      6 - Outgoing Call was not established within time allotted by LAC
      7 - Outgoing Call administratively prohibited

   This AVP be used for the outgoing call.  Bit A if
      set indicates that asynchronous framing should be used.  Bit S is mandatory.

   Error Code
      set indicates that synchronous framing should be used.

      Packet Receive Window Size AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |
      |1|0|0|0|      8                |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             3                 |0 0 0 0 0 0 0 1| Error Code             707               |   Size (H)    |  Size (L)     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Error Code

      Packet Receive Window Size AVP is used to encode a specific error code in case encodes the result window size being
      advertised by the LNS for this call.  Attribute is 707, indicating
      Packet Receive Window, and is marked mandatory.  This AVP indicates a General Error.  The flags indicate a
   mandatory option. is
      optional.  The Size value can be one indicates the number of received data
      packets the general error IDs
   specified in Section 5.5.  This AVP LNS will buffer for this call, which is optional.

   Cause Code also the maxi-
      mum number of data packets the LAC should send before waiting for
      an acknowledgment.  The absence of this AVP indicates that
      Sequence and Acknowledgment Numbers are not to be used in the pay-
      load session for this call.

      Packet Processing Delay AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |
      |1|0|0|0|    8                  |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             4                 |0 0 0 0 0 0 0 1| Error Code           708                 |   Delay (H)   |    Delay (L)  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Cause Code Packet Processing Delay AVP is used to give additional information in case of
   call failure.  The flags indicate a mandatory option.  The Code value
   can vary depending upon encodes the type of call attempted.  For ISDN call
   attempts it is delay LNS has for pro-
      cessing a window full of packets sent by the Q.931 cause code.

   Connect Speed LAC.  Attribute is
      708, indicating Packet Processing Delay, and is marked mandatory.
      This AVP is optional.  The Delay value is specified in units of
      1/10 seconds.  Refer to Appendix A for a description of how this
      value is determined and used.

      Phone Number AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1|0|0|0| 6 + Phone Number len  |             11                |               0               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             5                 |0              0 0 0 0 0 0 1|    BPS (H)                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    BPS (L)            709                | Phone Number..|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Connect Speed BPS AVP encodes the speed for the connection.  The
   flags indicate a mandatory option.  The BPS value indicates the speed
   in bits/second.  This AVP must be present if the call attempt is




Valencia                    expires February May 1997                    [Page 36]





INTERNET DRAFT                                                April                                             December 1996


   successful.

   Framing Type


      Phone Number AVP encodes the phone number to be called.  Attribute
      is 709, indicating Phone Number, and is marked mandatory.  This
      AVP MUST be present.  The Phone Number value is an ASCII string.

      Sub-Address AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             11
      |1|0|0|0| 6 + Sub-Address len   |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             6                 |0 0 0 0 0 0 0 1|0 0 0 0 0 0 0 0|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|S|             710               | Sub-Address ..|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Framing Type

      Sub-Address AVP encodes additional dialing information.  Attribute
      is 710, indicating Sub-Address, and is marked mandatory.  This AVP
      is optional.  The Sub-Address value is an ASCII string.

6.9 Outgoing-Call-Reply

   The Outgoing-Call-Reply is an L2TP control message sent by the framing type for LAC to
   the call.  The flags
   indicate LNS in response to a mandatory option. received Outgoing-Call-Request message. The value bit field
   reply indicates whether or not the type
   of PPP framing LAC is used for able to attempt the call.  Bit A if set indicates that
   Asynchronous framing is being used.  Bit S is set indicates that Syn-
   chronous framing is being used.  This AVP must be present if out-
   bound call and also returns certain parameters regarding the call
   attempt is successful.

   Packet Receive Window Size
   attempt.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Outgoing-Call-Reply             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Assigned Call ID      |
   |        Result Code        |
   |        Error Code         |
   |      Connect Speed        |
   |    Physical Channel Id    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Outgoing-Call-Reply AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|      6                |             9                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7                 |0 0 0 0 0                0 0 1|   Size (H)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Size (L)              8                |
   +-+-+-+-+-+-+-+-+

   Packet Recieve Window Size
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Outgoing-Call-Reply AVP encodes the window size being adver-
   tised by the LAC for this call. an immediate result of attempting
   an outgoing call request.  The flags indicate a mandatory option.  The Size value indicates the number of received data packets
   the LAC will buffer for this call.  This AVP is optional.

   Packet Processing Delay

   Assigned Call ID AVP

    0                   1                   2                   3



Valencia                    expires May 1997                    [Page 37]





INTERNET DRAFT                                             December 1996


    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              9
   |1|0|0|0|       8               |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8                 |0 0 0 0 0 0 0 1|   Delay (H)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+              801              |    Delay (L)            Call ID            |
   +-+-+-+-+-+-+-+-+

   Packet Processing Delay
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Assigned Call ID AVP encodes the delay LAC has for processing
   window full of packets sent ID being assigned to this call
   by the LNS.  The flags indicate a
   mandatory option.  The Delay value LAC.  Attribute is specified in units of 1/10
   seconds. 801, indicating Assigned Call ID, and is
   marked mandatory.  This AVP MUST be present.  Call ID value is optional.  Please refer an
   identifier, unique within the tunnel, assigned by the sender to appendix A to see a



Valencia                  expires February 1997                 [Page 37]





INTERNET DRAFT                                                April 1996


   description this
   session.  The remote peer MUST place this Call ID in the Call ID por-
   tion of how all future packets it sends associated with this value session.  It
   is determined used to multiplex and used.

   Physical Channel ID demultiplex data sent over that tunnel
   between the LNS and LAC.

   Result Code AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             11
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             9                 |0            802                |         Result Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Result Code AVP encodes the result of the Outgoing-Call-Request.
   Attribute is 802, indicating Result Code, and is marked mandatory.
   This AVP MUST be present.  The Result Code is a 16-bit value indicat-
   ing:

      1 - Call attempt in progress
      2 - Outgoing Call not attempted for the reason indicated in Error Code
      3 - No appropriate facilities are available (temporary condition)
      4 - No appropriate facilities are available (permanent condition)
      5 - Invalid destination
      6 - Outgoing Call administratively prohibited


   Error Code AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     8                 |              0 1|    ID (H)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   ID (L)            803                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Physical Channel ID          Error Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Optional Message...           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Error Code AVP encodes the vendor specific physical channel
   number is used for to encode a specific error code in case
   the call.  The flags indicate result AVP indicates a mandatory option.
   The value General Error.  Attribute is used for logging purposes only. 803, indicat-
   ing Error Code, and is marked mandatory.  This AVP is optional.

6.10 Incoming-Call-Request

   The Incoming-Call-Request is a L2TP control message sent by the LAC
   to the LNS to indicate that an inbound call is to be established from
   the LAC.  This request provides the LNS with parameter information
   for the incoming call.

   This message is the first in present only if



Valencia                    expires May 1997                    [Page 38]





INTERNET DRAFT                                             December 1996


   the "three-way handshake" used by L2TP
   for establishing incoming calls. Result Code indicates a value of 2.  The LAC may defer answering the
   call until it has received an Incoming-Call-Reply from the LNS indi-
   cating that the call should value can be established.  This mechanism allows
   the LNS to obtain sufficient information about the call before it is
   answered to determine whether one of the call should be answered or not.
   The message is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Incoming-Call-Request           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Assigned Call ID      |
   |    Call Serial Number     |
   |     Call Bearer Type      |
   |    Physical Channel Id    |
   |       Dialed Number       |
   |      Dialing Number       |
   |       Sub-Address         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Incoming-Call-Request
   general error IDs specified in Section 5.5.

   Connect Speed AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7
   |1|0|0|0|     10                |               0               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                  expires February 1997                 [Page 38]





INTERNET DRAFT                                                April 1996
   |             9                 |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Incoming-Call-Request            804                |            BPS (H)            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           BPS (L)             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Connect Speed BPS AVP encodes an incoming call being indi-
   cated by the LAC. speed for the connection.  The flags indicate
   Attribute value is 804, indicating Connect Speed, and is marked
   mandatory.  This AVP MUST be present if the Result indicates a mandatory option.

   Assigned Call call
   is in progress.  The BPS is a 16-bit value indicating the speed in
   bits/second.

   Physical Channel ID AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             9
   |1|0|0|0|     10                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             1                 |0 0 0 0 0 0 0 1|             805               |            ID (H)             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          ID (L)               |
   +-+-+-+-+-+-+-+-+

   The Assigned Call
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Physical Channel ID AVP encodes the ID being assigned to call by vendor specific physical channel
   number used for the
   LAC. call.  The flags indicate a mandatory option.  ID Attribute value is 805, indicating
   Physical Channel ID, and is marked optional.  This AVP itself is
   optional.  ID is a unique
   identifier, unique to a tunnel, assigned 32-bit value in network byte order.  The value is
   used for logging purposes only.

6.10 Outgoing-Call-Connected

   Outgoing-Call-Connected is an L2TP control message sent by the LAC to
   the LNS to indicate the result of a requested outgoing call.  The LAC
   MUST send the corresponding Outgoing-Call-Reply to the LNS before
   sending this session.
   It is message.  This message provides information to the LNS
   about the particular parameters used for the call.  It provides
   information to multiplex and demultiplex data sent over that tunnel
   between allow the LNS and LAC.  This AVP must be present.

   Call Serial Number to regulate the transmission of data to
   the LAC for this session.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Outgoing-Call-Connected          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 39]





INTERNET DRAFT                                             December 1996


   |        Result Code        |
   |        Error Code         |
   |        Cause Code         |
   |      Connect Speed        |
   |       Framing Type        |
   |  Packet Recv. Window      |
   |  Packet Processing Delay  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Outgoing-Call-Connected AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|      6                |             9                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             2                 |0 0 0 0                0 0 0 1|   Number (H)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Number (L)           16                  |
   +-+-+-+-+-+-+-+-+

   Call Serial Number
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Outgoing-Call-Connected AVP encodes an identifier assigned by the LAC to
   this call. final result of an outgo-
   ing call request.  The flags indicate a mandatory option.  The Number value
   (Call Serial Number) is an identifier used by the LNS and the LAC for
   identifying the call.  Unlike the Call ID, both the LNS and LAC asso-
   ciate the same Call Serial Number with a given call.  This AVP must
   be present.

   Call Bearer Type AVP

   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 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             11
      |1|0|0|0|       8               |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             3                 |0 0 0 0 0 0 0 1|0 0 0 0 0 0 0 0|              1601             |          Result Code          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|D|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                  expires February 1997                 [Page 39]





INTERNET DRAFT                                                April 1996


   Call Bearer Type AVP encodes the bearer type for the incoming call.
   The flags indicate a mandatory option.

      The value bit field Result Code indicates the bearer capability being used by the incoming call.  Bit A if set
   indicates that result of the call attempt.  The
      Attribute value is on an analog channel.  Bit D if set indi-
   cates that the call 1601, indicating Result Code, and is on a digital channel. marked
      mandatory.  This AVP must MUST be pre-
   sent.

   Physical Channel ID present.  The Result Code is a 16-bit
      value:

         1 - Call established with no errors
         2 - Outgoing Call not established for the reason indicated in Error Code
         3 - Outgoing Call failed due to no carrier detected
         4 - Outgoing Call failed due to detection of a busy signal
         5 - Outgoing Call failed due to lack of a dial tone
         6 - Outgoing Call was not established within time allotted by LAC
         7 - Outgoing Call was connected but no appropriate framing was detected

      Error Code AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
   11
      |1|0|0|0|     8                 |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |
   4                 |0 0 0 0 0 0 0 1|    ID (H)           1602                |          Error Code           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 40]





INTERNET DRAFT                                             December 1996


      |
   ID (L) Optional Message...           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Physical Channel ID
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Error Code AVP encodes the vendor specific physical channel
   number is used for the call.  The flags indicate to encode a mandatory option.
   The value specific error code.
      Attribute is used for logging purposes only. 1602, indicating Error Code, and is marked mandatory.
      This AVP is optional.

   Dialed Number present only if the Result Code indicates a value of
      2.  The value is encoded as specified in Section 5.5.

      Cause Code AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              7
      |0|0|0|0| 9 + N Advisory Msg len  |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             5                 |0 0 0 0 0 0 0 1|    Number...             1603              |          Cause Code           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |              Number...   Cause Msg   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Dialed NUmber        Advisory Msg ...       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      The Cause Code AVP encodes is used to give additional information in cases
      of call failure.  The Attribute value is 1603, indicating Cause
      Code, and is marked mandatory.  This AVP is optional.  It is only
      relevant when the dialed number LAC uses Q.931/DSS1 for the incoming call.
   The flags indicate a mandatory option.  The value outbound call
      attempt.  Cause Code is an ASCII string.
   The length of the number returned Q.931 Cause code and Cause
      Msg is the length returned Q.931 message code (e.g., DISCONNECT) associ-
      ated with the Cause Code.  Both values are returned in their
      native ITU encodings.  An additional ASCII text Advisory Message
      may also be included (presence indicated by the AVP header minus 7.
   This AVP is optional.

   Dialing Number length) to
      further explain the call failure.

      Connect Speed AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              7 + N
      |1|0|0|0|     10                |               0               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             6                 |0 0 0 0 0 0 0 1|    Number...            1604               |            BPS (H)            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |              Number...           BPS (L)             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Dialing NUmber
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Connect Speed BPS AVP encodes the originating number final negotiated speed for the incoming
   call.  The flags indicate a mandatory option.
      connection.  The Attribute value is an ASCII



Valencia                  expires February 1997                 [Page 40]





INTERNET DRAFT                                                April 1996


   string.  The length of the number 1604, indicating Connect
      Speed, and is the length in the AVP header
   minus 7. marked mandatory.  This AVP MUST be present if the
      call attempt is optional.

   Sub-Address successful.  The BPS value indicates the speed in
      bits/second.

      Framing Type AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7 + N



Valencia                    expires May 1997                    [Page 41]





INTERNET DRAFT                                             December 1996


      |1|0|0|0|     10                |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |           7            1605               |0 0 0 0 0 0 0 1| Sub-Address...|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Sub-Address ...                                            | 0 0 0 0 0 0 0 0 0|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Sub-Address
      |0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|S|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Framing Type AVP encodes additional dialing information.  The flags
   indicate a mandatory option. the framing type for the call.  The Sub-Address
      Attribute value is an ASCII
   string.  The length of the string 1605, indicating Framing Type, and is the length in the AVP header
   minus 7 bytes. marked
      mandatory.  This AVP is optional.

6.11 Incoming-Call-Reply

   The Incoming-Call-Reply is a L2TP control message sent by the LNS to MUST be present if the LAC in response to a received Incoming-Call-Request message. call attempt is suc-
      cessful.  The
   reply value bit field indicates the result of the incoming call attempt.  It also
   provides information to allow the LAC to regulate the transmission type of
   data to the LNS for this session.

   This message PPP framing is the second in the three-way handshake
      used by L2TP for establishing incoming calls.  It indicates to the LAC whether the
   call should be answered or not.  The message call.  If set, bit A indicates that asynchronous
      framing is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Incoming-Call-Reply             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Assigned Call ID       |
   |           Result Code         |
   |          Error Code           |
   | being used.  If set, bit S indicates that synchronous
      framing is being used.

      Packet Recv. Receive Window Size   |
   |     Packet Transmit Delay     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Incoming-Call-Reply AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7
      |1|0|0|0|     8                 |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             10                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+




Valencia                  expires February 1997                 [Page 41]





INTERNET DRAFT                                                April 1996


   The Incoming-Call-Reply            1606               |             Size              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Packet Receive Window Size AVP encodes a response by the LNS to the
   incoming call indication given window size being
      offered by the LAC. LNS for this call.  The flags indicate Attribute value is 1606,
      indicating Packet Receive Window Size, and is marked mandatory.
      The Size is a
   mandatory option.

   Assigned Call ID 16-bit value indicating the number of received data
      packets the LAC will buffer for this call, which is also the maxi-
      mum number of data packets the LNS should send before waiting for
      an acknowledgment.  This AVP MUST be present if and only if
      Sequence and Acknowledgment Numbers are to be used in the payload
      session for this call.

      Packet Processing Delay AVP

       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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             9
      |1|0|0|0|      8                |              0                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             1                 |0 0 0 0 0 0 0 1|      ID (H)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             1607              |      ID (L)            Delay              |
   +-+-+-+-+-+-+-+-+

   The Assigned Call ID
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Packet Processing Delay AVP encodes the ID being assigned to call delay the LAC expects for processing
      a window full of packets sent by the LNS.
      The flags indicate a mandatory option.  ID Attribute value
      is a unique
   identifier, unique 1607, indicating Packet Processing Delay, and is marked mandatory.
      This AVP is optional.
      The Delay value is specified in units of 1/10
      seconds.  Refer to a tunnel, assigned by the LNS Appendix A to see a
      description of how this session.
   It value is used to multiplex determined and demultiplex data used.




Valencia                    expires May 1997                    [Page 42]





INTERNET DRAFT                                             December 1996


6.11 Incoming-Call-Request

   Incoming-Call-Request is an L2TP control message sent over that tunnel
   between by the LAC
   to the LNS and to indicate that an inbound call is to be established from
   the LAC.  This AVP must request provides the LNS with parameter information
   for the incoming call.

   This message is the first in the "three-way handshake" used by L2TP
   for establishing incoming calls.  The LAC may defer answering the
   call until it has received an Incoming-Call-Reply from the LNS
   indicating that the call should be present.

   Result Code established.  This mechanism allows
   the LNS to obtain sufficient information about the call before it is
   answered to determine whether the call should be answered or not.
   Alternatively, the LAC may answer the call, negotiate LCP and
   PPP authentication, and use the information gained to choose the LNS.
   In this case, the call has already been answered by the time
   the Incoming-Call-Reply message is received; the LAC simply spoofs
   the "call indication/answer call" phase in this case.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Incoming-Call-Request           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Assigned Call ID      |
   |    Call Serial Number     |
   |     Call Bearer Type      |
   |    Physical Channel Id    |
   |       Dialed Number       |
   |      Dialing Number       |
   |       Sub-Address         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Incoming-Call-Request AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8
   |1|0|0|0|     7                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             2                 |0 0 0 0 0 0 0 1| Result Code             9                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Result Code
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Incoming-Call-Request AVP encodes an incoming call being indi-
   cated by the result of the Incoming-Call-Request. LAC.  The flags indicate a mandatory option.  The Result Code value can be one
   of the following:

      1 - The LAC should answer the incoming call
      2 - The Incoming

   Assigned Call should not be established due to the reason
         indicated in Error Code
      3 - The LAC should not accept the incoming call.  It should hang
         up or issue a busy indication

   This AVP is mandatory.

   Error Code ID AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |
   |1|0|0|0|     8                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             3                 |0 0 0 0 0 0 0 1| Error Code            901                |             Call ID           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires February May 1997                    [Page 42] 43]





INTERNET DRAFT                                                April                                             December 1996


   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Error Code Assigned Call ID AVP is used encodes the Call ID being assigned to encode a specific error code in case call
   by the result AVP indicates a General Error.  The flags indicate a
   mandatory option. LAC.  The Attribute value can is 901, indicating Call ID, and is
   marked mandatory.  This AVP MUST be one present.  The LNS places this
   value in the Call ID header field of all command and payload packets
   that it subsequently transmits over the general error IDs
   specified in Section 5.5.  This AVP tunnel that belong to this
   call.  The Call ID value is optional.

   Packet Receive Window Size an identifier assigned by the LAC to this
   session.  It is used to multiplex and demultiplex data sent over that
   tunnel between the LNS and LAC.

   Call Serial Number AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             9
   |1|0|0|0| 6 + Number length     |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             4                 |0 0 0 0 0 0 0 1|    Size (H)   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+            902                |  Size (L)   Number...   |
   +-+-+-+-+-+-+-+-+

   Packet Recieve Window Size
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Call Serial Number AVP encodes the window size being adver-
   tised an identifier assigned by the LNS for LAC to
   this call.  The flags indicate a mandatory
   option. Attribute value is 902, Call Serial Number, and is
   marked mandatory.  This AVP MUST be present.  The Size Number value indicates is an
   identifier assigned by the number of received packets LAC and used by the LNS will buffer and the LAC for this
   identifying the call.  This AVP is optional.

   Packet Processing Delay  Unlike the Call ID, both the LNS and LAC asso-
   ciate the same Call Serial Number with a given call.

   Call Bearer Type AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              9
   |1|0|0|0|     10                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              5            903                |0 0 0 0 0 0 0 1|   Delay (H)   | 0 0 0 0 0 0 0 0 0|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Delay (L)  |
   +-+-+-+-+-+-+-+-+

   Packet Processing Delay
   |0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|D|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Call Bearer Type AVP encodes the delay LNS has bearer type for processing
   window full of packets sent by the LAC.  The flags indicate a manda-
   tory option. incoming call.
   The Delay Attribute value is specified in units of 1/10 seconds. 903, Call Bearer Type, and is marked manda-
   tory.  This AVP is optional.  Please refer to appendix A to see a descrip-
   tion of how this value is determined and used.

6.12 Incoming-Call-Connected MUST be present.  The Incoming-Call-Connected message Value is a L2TP control message sent by
   the LAC to the LNS in response to a received Incoming-Call-Reply.  It
   provides information to the LNS about particular parameters used for
   the call.  It also provides information to allow the LNS to regulate
   the transmission of data to the LAC for this session.

   This message is the third in 32-bit field indi-
   cating the three-way handshake bearer capability being used by L2TP for
   establishing incoming calls.  It provides a mechanism for providing the LNS with additional information about incoming call.  If
   set, bit A indicates that the call is on an analog channel.  If set,
   bit D indicates that cannot, in
   general, be obtained at the time the Incoming-Call-Request call is issued
   by the LAC.  The message is structured as:




Valencia                  expires February 1997                 [Page 43]





INTERNET DRAFT                                                April 1996


   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Incoming-Call-Connected         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Connect Speed        |
   |       Framing Type        |
   |  Packet Recv. Window      |
   |  Packet Processing Delay  |
   |  Initial LCP Conf         |
   |  Last Sent LCP Conf       |
   |  Last Received LCP Conf   |
   |  Proxy authen type        |
   |  Proxy authen name        |
   |  Proxy authen challenge   |
   |  Proxy authen on a digital channel.

   Physical Channel ID          |
   |  Proxy authen response    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Incoming-Call-Connected AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7
   |1|0|0|0|     10                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 44]





INTERNET DRAFT                                             December 1996


   |             11                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Incoming-Call-Connected            904                |            ID (H)             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           ID (L)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Physical Channel ID AVP encodes a response by the LAC to the
   Incoming-Call-Reply message sent by vendor specific physical channel
   number used for the LAC. call.  The flags indicate Attribute value is 904, Physical Chan-
   nel ID, and is marked mandatory.  The presence of this AVP is
   optional.  ID is a
   mandatory option.

   Connect Speed 32-bit value in network byte order.  The value is
   used for logging purposes only.

   Dialed Number AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             11
   |1|0|0|0|   6 + Number len      |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             1                 |0 0 0 0 0 0 0 1|    BPS (H)    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+            905                |                      BPS (L)    Number...  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Connect Speed BPS

   Dialed Number AVP encodes the speed dialed number for the connection.  The
   flags indicate a mandatory option. incoming call,
   that is, DNIS.  The BPS Attribute value indicates the speed
   in bits/second.  This is 905, Dialed Number, and is
   marked mandatory.  The presence of this AVP must be present if the call attempt is suc-
   cessful.

   Framing Type optional.  The value
   is an ASCII string.

   Dialing Number AVP

    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



Valencia                  expires February 1997                 [Page 44]





INTERNET DRAFT                                                April 1996
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             11
   |1|0|0|0|      6 + length       |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             2                 |0 0 0 0 0 0 0 1|0 0 0 0 0 0 0 0|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|S|             906               |    Number...  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Framing Type

   Dialing Number AVP encodes the framing type originating number for the call.  The flags
   indicate a mandatory option. incoming
   call, that is, CLID.  The Attribute value bit field indicates the type
   of PPP framing is used for the call.  Bit A if set indicates that
   Asynchronous framing is being used.  Bit S is set indicates that Syn-
   chronous framing 906, Dialing Number, and
   is being used.  This marked mandatory.  The presence of this AVP must be present if the call
   attempt is successful.

   Packet Receive Window Size optional.  The
   value is an ASCII string.

   Sub-Address AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     6 + length        |             11                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             3                 |0 0 0               0 0 0 0 1|   Size (H)               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Size (L)              907              |
   +-+-+-+-+-+-+-+-+

   Packet Recieve Window Size Sub-Address...|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Sub-Address AVP encodes the window size being adver-
   tised additional dialing information.  The
   Attribute value is 907, Sub-Address, and is marked mandatory.  The
   presence of this AVP is optional.  The Sub-Address value is an ASCII



Valencia                    expires May 1997                    [Page 45]





INTERNET DRAFT                                             December 1996


   string.

6.12 Incoming-Call-Reply

   The Incoming-Call-Reply is an L2TP control message sent by the LNS to
   the LAC for this call.  The flags indicate in response to a mandatory
   option. received Incoming-Call-Request message.  The Size value
   reply indicates the number result of received packets the incoming call attempt.  It also
   provides information to allow the LAC will buffer for this call.  This AVP to regulate the transmission of
   data to the LNS for this session.

   This message is optional. the second in the three-way handshake used by L2TP
   for establishing incoming calls.  It indicates to the LAC whether the
   call should be answered or not.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Incoming-Call-Reply             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Assigned Call ID       |
   |           Result Code         |
   |          Error Code           |
   |    Packet Recv. Window Size   |
   |    Packet Processing Delay    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Incoming-Call-Reply AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     6                 |              9                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             4                 |0 0 0 0                0 0 0 1|   Delay (H)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Delay (L)             10                |
   +-+-+-+-+-+-+-+-+

   Packet Processing Delay
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Incoming-Call-Reply AVP encodes a response by the delay LAC has for processing
   window full of packets sent LNS to the
   incoming call indication given by the LNS. LAC.  The flags indicate a manda-
   tory
   mandatory option.  The Delay value is specified in units of 1/10 seconds.
   This

   Assigned Call ID AVP is optional.  Please refer to appendix A to see a descrip-
   tion of how this value is determined and used.

   Initial LCP Conf

    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



Valencia                  expires February 1997                 [Page 45]





INTERNET DRAFT                                                April 1996
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       7 + length of confreq
   |1|0|0|0|     8                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             5                 |0 0 0 0 0 0 0 0| LCP confreq...|           1001                |             Call ID           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The LAC may have answered the phone call and negotiated LCP with the
   dial-in client in order to establish Assigned Call ID AVP encodes the client's apparent identity.
   In this case, this option may be included ID being assigned to indicate the link prop-
   erties call by the client requested in its initial LCP CONFREQ request.
   LNS.  The
   Value field Attribute value is a copy of the body of the intial CONFREQ received,
   starting at the first option within this packet's body. 1001, Assigned Call ID, and is marked
   mandatory.  This AVP MUST be present.  The LAC places this value in
   the Call ID header field of all command and payload packets that it



Valencia                    expires May 1997                    [Page 46]





INTERNET DRAFT                                             December 1996


   subsequently transmits over the tunnel that belong to this call.  The
   Call ID value is
   marked not mandatory, an identifier assigned by the LNS to this session.
   It is used to multiplex and demultiplex data sent over that tunnel
   between the LNS and LAC.

   Result Code AVP itself is optional.

   Last Sent LCP Conf

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       7 + length of confreq
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             6                 |0 0 0 0 0 0 0 0| LCP confreq...|           1002                |         Result Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   See Initial LCP Conf above for rationale.  The Value field is a copy
   of

   Result Code AVP encodes the body result of the final CONFREQ sent to the client to complete LCP
   negotiation, starting at the first option within this packet's body. Incoming-Call-Request.  The
   Attribute value is 1002, Result Code, and is marked mandatory.  This
   AVP MUST be present.  The Result Code value is marked a 16-bit value:

      1 - The LAC should answer the incoming call
      2 - The Incoming Call should not mandatory, and be established due to the reason
         indicated in Error Code
      3 - The LAC should not accept the incoming call.  It should hang
         up or issue a busy indication

   Error Code AVP itself is optional.

   Last Received LCP Conf

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       7 + length of confreq
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7                 |0 0 0 0 0 0 0 0| LCP confreq...|           1003                |          Error Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   See Initial LCP Conf above for rationale.  The Value field
   | Optional Message...           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This AVP is present only if a copy
   of the body of the final CONFREQ received from the client "General Error" exists, in which case
   Result Code was set to complete
   LCP negotiation, starting at the first option within 2 and this packet's
   body.  This AVP encodes the general error value
   as documented in section 5.5.  It has a Value of 1003, and is marked not mandatory, and the
   mandatory.

   Packet Receive Window Size AVP itself is
   optional.

   Proxy authen type

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8                 |0 0 0 0 0 0 0 0|     Type            1004               |    Size (H)   |  Size (L)     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Packet Receive Window Size AVP encodes the receive window size being
   offered by the LNS for this call.  The Attribute value is 1004,



Valencia                    expires February May 1997                    [Page 46] 47]





INTERNET DRAFT                                                April                                             December 1996


   This AVP


   Packet Receive Window Size, and is marked mandatory, and mandatory.  The Size value
   indicates the number of received data packets the LNS will buffer for
   this call, which is also the maximum number of data packets the LAC
   should send before waiting for an acknowledgment.  This AVP itself must be present.
   Type is a byte, holding a value:

      1 - Textual username/password exchange
      2 - PPP CHAP
      3 - PPP PAP
      4 - None

   Associated AVP's
   optional if Sequence and Acknowledgment Numbers are not to be used in
   the payload session for each type of authentication follow.

   Proxy authen name this call.

   Packet Processing Delay AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       7 + length of name
   |1|0|0|0|      8                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             9                 |0 0 0 0 0 0 0 0|     Name...             1005              |   Delay (H)   |    Delay (L)  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This

   Packet Processing Delay AVP is marked mandatory, and encodes the AVP itself must be present delay the LNS expects for
   Proxy authen type values 1, 2,
   processing a window full of packets sent by the LAC.  The Attribute
   value is 1005, Packet Processing Delay AVP, and 3. is marked mandatory.
   The Name field contains the
   name presence of this AVP is optional.  The Delay value is specified
   in units of 1/10 seconds.  Refer to Appendix A to see a description
   of how this value is determined and used.

6.13 Incoming-Call-Connected

   The Incoming-Call-Connected message is an L2TP control message sent
   by the LAC to the LNS in response to a received Incoming-Call-Reply.
   It provides information to the client's authentication response. LNS about particular parameters used
   for the call.  It also provides information to allow the LNS to regu-
   late the transmission of data to the LAC for this session.

   This message is the third in the three-way handshake used by L2TP for
   establishing incoming calls.  It provides a mechanism for providing
   the LNS with additional information about the call that cannot, in
   general, be obtained at the time the Incoming-Call-Request is issued
   by the LAC.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Incoming-Call-Connected         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Connect Speed        |
   |       Framing Type        |
   |  Packet Recv. Window      |
   |  Packet Processing Delay  |
   |  Initial LCP Conf         |
   |  Last Sent LCP Conf       |
   |  Last Received LCP Conf   |
   |  Proxy authen type        |
   |  Proxy authen name        |
   |  Proxy authen challenge   |
   |  Proxy authen ID          |



Valencia                    expires May 1997                    [Page 48]





INTERNET DRAFT                                             December 1996


   |  Proxy authen response    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Incoming-Call-Connected AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    7 + length of challenge
   |1|0|0|0|     6                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             10                |0 0 0 0 0 0 0 0| Challenge...             11                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This AVP is marked mandatory, and the AVP itself must be present for
   Proxy authen type 2.
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Challenge field contains Incoming-Call-Connected AVP encodes a response by the value pre-
   sented LAC to the client
   Incoming-Call-Reply message sent by the LAC.

   Proxy authen ID  The flags indicate a
   mandatory option.

   Connect Speed AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8
   |1|0|0|0|     10                |               0               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             11                |0 0 0 0 0 0 0 0|      ID            1101               |            BPS (H)            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This
   |          BPS (L)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Connect Speed BPS AVP encodes the speed for the connection.  The
   Attribute value is marked mandatory, 1101, Connect Speed, and the is marked mandatory.
   This AVP itself must MUST be present for
   Proxy authen type 2.  The ID field contains if the byte ID call attempt is successful.  The
   value pre-
   sented to the client by is a 32-bit quantity indicating the LAC speed in its associated CHAP challenge.

   Proxy authen response




Valencia                  expires February 1997                 [Page 47]





INTERNET DRAFT                                                April 1996 bits/second.

   Framing Type AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    7 + length of Response
   |1|0|0|0|     10                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             12            1102               |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| Response...   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This
   |0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|S|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Framing Type AVP encodes the framing type for the call.  The
   Attribute value is marked mandatory, 1102, Call Serial Number, and the is marked mandatory.
   This AVP itself must MUST be present for
   Proxy authen types 1, 2, and 3. if the call attempt is successful.  The Response
   value is a 32-bit bit field contains the
   client's response to indicating the challenge.  For Proxy authen type 2, this
   field contains of PPP framing used
   for the response value received by the LAC.  For types 1
   or 3, it contains the clear text password received from the client by
   the LAC.

6.13 Call-Clear-Request

   The Call-Clear-Request is a L2TP control message sent by the LNS to
   the LAC indicating call.  If set, bit A indicates that a particular call asynchronous framing is to be disconnected.  The
   call
   being cleared can be either an incoming or outgoing call, in any
   state.  The LAC responds to this message with a Call-Disconnect-
   Notify message.  The message used.  If set, bit S indicates that synchronous framing is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Call-Clear-Request              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Call-Clear-Request
   being used.




Valencia                    expires May 1997                    [Page 49]





INTERNET DRAFT                                             December 1996


   Packet Receive Window Size AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7
   |1|0|0|0|      8                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             12                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Call-Clear-Request            1103               |             Size              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Packet Receive Window Size AVP encodes a request by the LNS to window size being offered
   by the LAC to
   disconnect the for this call.  The flags indicate a mandatory option.

6.14 Call-Disconnect-Notify

   The Call-Disconnect-Notify message Attribute value is a L2TP control message sent by
   the LAC to the LNS.     It 1103, Packet
   Receive Window Size, and is issued whenever a call marked mandatory.  This AVP is disconnected,
   due optional
   if Sequence and Acknowledgment Numbers are not to be used in the receipt by pay-
   load session for this call.  The 16-bit Size value indicates the LAC num-
   ber of a Call-Clear-Request or received data packets the LAC will buffer for any
   other reason.  Its purpose this call, which
   is to inform also the LNS maximum number of data packets the disconnection
   and the reason why the disconnection occured.  The message is struc-
   tured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                  expires February 1997                 [Page 48]





INTERNET DRAFT                                                April 1996


   |             Call-Disconnect-Notify          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Result Code        |
   |       Error Code          |
   |       Cause Code          |
   |      Call Statistics      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Call-Disconnect-Notify LNS should send before
   waiting for an acknowledgment.

   Packet Processing Delay AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7
   |1|0|0|0|      8                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             13                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Call-Disconnect-Nofity            1104               |            Delay              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Packet Processing Delay AVP encodes a disconnect indication from the delay the LAC to expects for
   processing a window full of packets sent by the LNS.  The flags indicate a mandatory option.

   Result Code Attribute
   value is 1104, Packet Processing Delay, and is marked mandatory.  The
   presence of this AVP is optional.  The 16-bit Delay value is speci-
   fied in units of 1/10 seconds.  Refer to Appendix A to see a descrip-
   tion of how this value is determined and used.

   Initial LCP Conf

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8
   |0|0|0|0| 6 + LCP confreq len   |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             1                 |0 0 0 0 0 0 0 1| Result Code            1105               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Result Code AVP encodes the reason for disconnect. LCP confreq...|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The flags indi-
   cate a mandatory option. LAC may have answered the phone call and negotiated LCP with the
   dial-in client in order to establish the client's apparent identity.
   In this case, this option may be included to indicate the link prop-
   erties the client requested in its initial LCP CONFREQ request.  The Result Code
   Attribute value can be one is 1105, Initial LCP Conf, and is marked optional.
   The presence of this AVP is optional.  The Value field is a copy of
   the
   following:

      1 (Lost Carrier) - Call disconnected due to loss body of carrier
      2 (General Error) - Call disconnected for the reason indicated in
         Error Code.
      3 (Admin Shutdown) - Call disconnected for administrative reasons
      4 (Request) - Call disconnected due to received Call-Clear-Request

   This AVP is mandatory.

   Error Code AVP initial CONFREQ received, starting at the first
   option within this packet's body.



Valencia                    expires May 1997                    [Page 50]





INTERNET DRAFT                                             December 1996


   Last Sent LCP Conf

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8
   |0|0|0|0| 6 + LCP confreq len   |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             2                 |0 0 0 0 0 0 0 1| Error Code             1106              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ LCP confreq...|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   See Initial LCP Conf above for rationale.  The Error Code AVP Attribute value is used to encode a specific error code in case



Valencia                  expires February 1997                 [Page 49]





INTERNET DRAFT                                                April 1996


   the result AVP indicates a General Error.  The flags indicate a
   mandatory option.
   1106, Last Sent LCP Conf, and is marked optional.  The value can be one presence of the general error IDs
   specified in Section 5.5.  This
   this AVP is optional.

   Cause Code AVP  The Value field is a copy of the body of the
   final CONFREQ sent to the client to complete LCP negotiation, start-
   ing at the first option within this packet's body.

   Last Received LCP Conf

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             8
   |0|0|0|0| 6 + LCP confreq len   |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             3                 |0 0 0 0 0 0 0 1| Error Code           1107                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ LCP confreq...|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   See Initial LCP Conf above for rationale.  The Cause Code AVP Attribute value is used to give additional information in case
   1107, Last Received LCP Conf, and is marked optional.  The presence
   of
   unsolicited call disconnection. this AVP is optional.  The flags indicate Value field is a mandatory
   option.  The Code value can vary depending upon copy of the type body of call.
   For ISDN call attempts it is
   the Q.931 cause code.

   Call Statistics AVP final CONFREQ received from the client to complete LCP negotia-
   tion, starting at the first option within this packet's body.

   Proxy Authen Type

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7 + N
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             4                 |0 0 0 0 0 0 0 1| Call Stats... |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+            1108               |           Call Statistics ...            Type               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Call Statistics AVP is used by the LAC to send vendor specific
   call statistics for logging purposes.  The flags indicate a mandatory
   option.  The Call Statistics Attribute value is ab ASCII string containing ven-
   dor specific call statistics that LNS can log for diagnostic pur-
   poses.  The length of the string 1108, Proxy Authen Type, and is the length in the AVP header
   minus 7. marked manda-
   tory.  This AVP is optional.

6.15 WAN-Error-Notify MUST be present.  The WAN-Error-Notify message value Type is a L2TP control message sent by the
   LAC to the LNS to indicate WAN error conditions (conditions that
   occur on the interface supporting PPP).  The counters in this message
   are cumulative.  This message should only be sent when an error
   occurs, and not more than once every 60 seconds.  The counters are
   reset when 16-bit word,
   holding a new call is established.  The message is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   WAN-Error-Notify          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Call Errors          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ value:

      1 - Textual username/password exchange
      2 - PPP CHAP
      3 - PPP PAP
      4 - None

   Associated AVP's for each type of authentication follow.

   Proxy Authen Name



Valencia                    expires February May 1997                    [Page 50] 51]





INTERNET DRAFT                                                April                                             December 1996


   WAN-Error-Notify AVP


    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7
   |0|0|0|0|       6 + length      |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             14                |0 0 0 0 0 0 0 1|             1109              |     Name...   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The WAN-Error-Nofity AVP encodes line Attribute value is 1109, Proxy Authen Name, and other errors sent by the
   LAC to the LNS.  The flags indicate a mandatory option.

   Call Errors is marked manda-
   tory.  This AVP MUST be present for Proxy Authen Type values 1, 2,
   and 3.  The Name field contains the name specified in the client's
   authentication response.  Note that the AVP H bit may be desirable
   for obscuring the cleartext name.

   Proxy Authen Challenge

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             32
   |0|0|0|0|        6 + length     |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             14                |0 0             1110              | Challenge...  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Attribute value is 1110, Proxy Authen Challenge, and is marked
   mandatory.  The AVP itself MUST be present for Proxy authen type 2.
   The Challenge field contains the value presented to the client by the
   LAC.

   Proxy Authen ID

    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|   Reserved    | 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |0|0|0|0|       8               |                           CRC Errors              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Framing Errors                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+             1111              |                       Hardware Overruns             ID                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Buffer Overruns                        |

   The Attribute value is 1111, Proxy Authen ID, and is marked manda-
   tory.  The AVP itself MUST be present for Proxy authen type 2.  The
   ID field contains the byte ID value presented to the client by the
   LAC in its associated CHAP challenge.  The most significant 8 bits of
   ID MUST be 0, and are reserved.

   Proxy Authen Response

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|        6 + length     |                        Time-out Errors              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Alignment Errors             1112              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Response...   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 52]





INTERNET DRAFT                                             December 1996


   The Call Errors AVP Attribute value is used by the LAC to send error information to
   the LNS. 1112, Proxy Authen Response, and is marked
   mandatory.  The flags indicate a mandatory option. AVP itself MUST be present for Proxy authen types 1,
   2, and 3.  The value Response field contains the following fields:

      Reserved - Not used
      CRC Errors - Number of PPP frames client's response to the
   challenge.  For Proxy authen type 2, this field contains the response
   value received with CRC errors since
         session was established
      Framing Errors - Number of improperly framed PPP packets by the LAC.  For types 1 or 3, it contains the clear
   text password received
      Hardware Overruns - Number of receive buffer over-runs since ses-
         sion was established
      Buffer Overruns - Number from the client by the LAC.  In the case of buffer over-runs detected since ses-
         sion was established
      Time-out Errors - Number
   cleartext passwords, use of time-outs since the AVP H bit is recommended.

6.14 Call-Clear-Request

   The Call-Clear-Request is an L2TP control message sent by the LNS to
   the LAC indicating that a particular call was established
      Alignment Errors - Number of alignment errors since is to be disconnected.  The
   call was being cleared can be either an incoming or outgoing call, in any
   state.  The LAC responds to this message with a Call-Disconnect-
   Notify message.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Call-Clear-Request              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Assigned Call ID    |
   +-+-+-+-+-+-+-+-+-+-+-+-+

   Call-Clear-Request AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|       6               |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             12                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Call-Clear-Request AVP encodes a request by the LNS to the LAC to
   disconnect the call.  The flags indicate a mandatory option.

   Assigned Call ID AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     8                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           1201                |            Call ID            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This attribute is used to provide the LAC with the Call ID assigned
   by the LNS for the call to be cleared in the case where the LNS has
   not yet learned the LAC's Call ID for the call.  The Attribute value
   is 1201, Assigned Call ID, and is marked mandatory.  This AVP MUST be
   present.  The value Call ID MUST be the same value sent from the LNS
   to the LAC in the initial call setup exchange.




Valencia                    expires May 1997                    [Page 53]





INTERNET DRAFT                                             December 1996


6.15 Call-Disconnect-Notify

   The Call-Disconnect-Notify message is an L2TP control message sent by
   the LAC to the LNS.  It is issued whenever a call is disconnected,
   due to the receipt by the LAC of a Call-Clear-Request or for any
   other reason.  Its purpose is to inform the LNS of the disconnection
   and the reason why the disconnection occurred.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Call-Disconnect-Notify          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Result Code         |
   |     Error Code          |
   |     Cause Code          |
   |     Assigned Call ID    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Call-Disconnect-Notify AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     6                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             13                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Call-Disconnect-Notify AVP encodes a disconnect indication from
   the LAC to the LNS.  The flags indicate a mandatory option.

   Result Code AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           1301                |         Result Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Result Code AVP encodes the reason for disconnect.  The Attribute
   value is 1301, Result Code, and is marked mandatory.  This AVP MUST
   be present.  The Result Code value can be one of:

      1 (Lost Carrier) - Call disconnected due to loss of carrier
      2 (General Error) - Call disconnected for the reason indicated in
         Error Code.
      3 (Admin Shutdown) - Call disconnected for administrative reasons
      4 (Request) - Call disconnected due to received Call-Clear-Request

   Error Code AVP




Valencia                    expires May 1997                    [Page 54]





INTERNET DRAFT                                             December 1996


    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           1302                |         Error Code            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Optional Message...           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This AVP is present only if a "General Error" exists, in which case
   Result Code was set to 2 and this AVP encodes the general error value
   as documented in section 5.5.  The Attribute value is 1302, Error
   Code, and is marked mandatory.  This AVP MUST be present if Result
   Code was 2.

   Cause Code AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     8                 |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           1303                |          Cause Code           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Optional message...           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Cause Code AVP is used to give additional information in case of
   unsolicited call disconnection.  The Attribute value is 1303, Cause
   Code, and is marked mandatory.  The presence of this AVP is optional.
   The Cause Code AVP is used to give additional information about the
   reason for disconnecting.  It is only relevant when the LAC is using
   Q.931/DSS1 for the call.  This AVP is optional.  Cause  Code is the
   returned Q.931 Cause code and Cause Msg is the returned Q.931 message
   code (e.g., DISCONNECT) associated with the Cause Code.  Both values
   are returned in their native ITU encodings.  An additional Ascii text
   Advisory Message may also be included (presence indicated by the AVP
   length) to further explain the reason for disconnecting.

   Assigned Call ID AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|      8                |               0               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            1304               |            Call ID            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Assigned Call ID which was provided to the LNS from this LAC is
   included in the Call-Disconnect-Notify message.  This permits a con-
   nection to be terminated even before the LNS has provided its own
   Assigned Call ID to this LAC (the Call ID field in the control



Valencia                    expires May 1997                    [Page 55]





INTERNET DRAFT                                             December 1996


   message header is 0).  The Attribute value is 1304, Assigned Call ID,
   and is marked mandatory.  This AVP MUST be present.

6.16 WAN-Error-Notify

   The WAN-Error-Notify message is an L2TP control message sent by the
   LAC to the LNS to indicate WAN error conditions (conditions that
   occur on the interface supporting PPP).  The counters in this message
   are cumulative.  This message should only be sent when an error
   occurs, and not more than once every 60 seconds.  The counters are
   reset when a new call is established.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   WAN-Error-Notify          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Call Errors          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   WAN-Error-Notify AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     6                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             14                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The WAN-Error-Notify AVP encodes line and other errors sent by the
   LAC to the LNS.  The flags indicate a mandatory option.

   Call Errors AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     32                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            1401               |           Reserved            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           CRC Errors                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Framing Errors                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Hardware Overruns                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Buffer Overruns                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Time-out Errors                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Alignment Errors                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 56]





INTERNET DRAFT                                             December 1996


   The Call Errors AVP is used by the LAC to send error information to
   the LNS.  The Attribute value is 1401, WAN-Error-Notify, and is
   marked mandatory.  This AVP MUST be present.  The value contains the
   following fields:

      Reserved - Not used, MUST be 0
      CRC Errors - Number of PPP frames received with CRC errors since
         session was established
      Framing Errors - Number of improperly framed PPP packets received
      Hardware Overruns - Number of receive buffer over-runs since ses-
         sion was established
      Buffer Overruns - Number of buffer over-runs detected since ses-
         sion was established
      Time-out Errors - Number of time-outs since call was established
      Alignment Errors - Number of alignment errors since call was
         established

6.17 Set-Link-Info

   The Set-Link-Info message is an L2TP control message sent by the LNS
   to the LAC to set PPP-negotiated options.  Because these options can
   change at any time during the life of the call, the LAC MUST be able
   to update its internal call information dynamically and update its
   behavior on an active PPP session.

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Set-Link-Info             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        ACCM             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+

   Set-Link-Info AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     6                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             15                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Set-Link-Info AVP encodes ACCM information sent from the LNS to
   the LAC after it is negotiated in LCP.  The flags indicate a manda-
   tory option.

   ACCM AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |1|0|0|0|     32                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Valencia                    expires May 1997                    [Page 57]





INTERNET DRAFT                                             December 1996


   |            1501               |          Reserved             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Send ACCM                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Receive ACCM                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The ACCM AVP is used by the LNS to inform LAC of the ACCM to the LNS.
   The Attribute value is 1501, ACCM, and is marked mandatory.  The
   presence of this AVP is optional.  The value contains Send ACCM and
   Receive ACCM fields.  The send ACCM value should be used by the LAC
   to process packets it is sends on the connection.  The receive ACCM
   value should be used by the LAC to process incoming packets on the
   connection.  The default values used by the LAC for both these fields
   are 0xFFFFFFFF.  The LAC should honor these fields unless it has spe-
   cific configuration information to indicate that the requested mask
   must be modified to permit operation.

7.0 Control Connection State Machines

The control messages defined in section 6 are exchanged by way of state
tables defined in this section.  Tables are defined for incoming call
placement, outgoing call placement, as well as for initiation of the
tunnel itself.  The state tables do not encode timeout and retransmis-
sion behavior, as this is handled in the underlying semantics defined in
6.0.2.

7.1 Control Connection Protocol Operation

   This section describes the operation of various L2TP control connec-
   tion functions and the Control Connection messages which are used to
   support them.

   Receipt of an invalid or malformed Control Connection message should
   be logged appropriately, and the control connection should be closed
   and restarted to ensure recovery into a known state.

7.2 Control Connection States

   Control messages are carried over the same media as the payload mes-
   sages which are carried following successful connection establish-
   ment.  The L2TP control connection protocol is not distinguishable
   between the LNS and LAC, but is distinguishable between the origina-
   tor and receiver.  The originating peer is the one which first estab-
   lishes the tunnel.  Since either LAC or LNS can be the originator, a
   collision can occur.  See Section 6.0.1 for a description of this and
   its resolution situation.

7.2.1 Control Connection Originator

   State           Event             Action               New State
   -----           -----             ------               ---------

   idle            Open request      Send                 wait-ctl-reply



Valencia                    expires May 1997                    [Page 58]





INTERNET DRAFT                                             December 1996


                                     Start-Control-
                                     Connection-Request

   wait-ctl-reply  Collision         If terminating,      idle
                                     clean-up.

   wait-ctl-reply  Collision         If not terminating,  wait-stop-reply
                         Send Stop-Control-
                         Connection-Request

   wait-ctl-reply  Receive           If version OK        established
                   Start-Control-    Send Start-Control-
                   Connection-Reply  Connection-Connected

   wait-ctl-reply  Receive           If version not OK    wait-stop-reply
                   Start-Control-    or bad auth, Send
                   Connection-Reply  Stop-Control-
                                     Connection-Request

   established

   This AVP must be present.

6.16 Set-Link-Info



Valencia                  expires February 1997                 [Page 51]





INTERNET DRAFT                                                April 1996     Local terminate   Send                 wait-stop-reply
                                     Stop-Control-
                                     Connection-Request

   established     Receive           Send                 idle
                   Stop-Control-     Stop-Control-
                   Connection-       Connection-Reply
             Request          and clean-up

   wait-stop-reply Receive           Clean-up             idle
                   Stop-Control-
                   Connection-Reply

   idle
      The Set-Link-Info message is a L2TP control message sent by the LNS connection originator attempts to the LAC open a connection to set PPP-negotiated options.  Because these options can
   change at any time
      the peer during idle state.  When the life of connection is open, the call,
      originator transmits a send Start-Control-Connection-Request and
      then enters the LAC must be able wait-ctl-reply state.

   wait-ctl-reply
      The originator checks to update its internal call information dynamically see if another connection has been
      requested from the same peer, and perform PPP
   negotiation on an active PPP session.  The message if so, handles the collision
      situation described in Section 6.0.1.

      When a Start-Control-Connection-Reply is structured as:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Set-Link-Info             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        ACCM             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+

   Set-Link-Info AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             15                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Set-Link-Info AVP encodes ACCM information received, it is examined
      for a compatible version.  If the version of the reply is lower
      than the version sent from in the request, the older (lower) version
      should be used provided it is supported.  If the version in the
      reply is earlier and supported, the LNS originator moves to the LAC after it estab-
      lished state.  If the version is negotiated in LCP.  The flags indicate earlier and not supported, a manda-
   tory option.

   ACCM AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             32                |              0                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             14                |0 0 0 0 0 0 0 1|   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Send ACCM                           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Receive ACCM                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The ACCM AVP is used
      Stop-Control-Connection-Request SHOULD be sent to the peer and the
      originator moves into the wait-stop-reply state.

   established
      An established connection may be terminated by either a local



Valencia                    expires May 1997                    [Page 59]





INTERNET DRAFT                                             December 1996


      condition or the LNS to inform LAC receipt of a Stop-Control-Connection-Request.  In
      the ACCM to event of a local termination, the LNS.
   The flags indicate originator MUST send a mandatory option.  The value contains Stop-
      Control-Connection-Request and enter the wait-stop-reply state.

      If the originator receives a Stop-Control-Connection-Request it
      SHOULD send a Stop-Control-Connection-Reply and close the connec-
      tion.

   wait-stop-reply
      If a Stop-Control-Connection-Reply is received, the connection
      SHOULD be closed and the control connection becomes idle.

7.2.2 Control connection Receiver

   State           Event              Action                 New State
   -----           -----              ------                 ---------
   idle            Receive            If version not OK      idle
                   Start-Control-     send
                   Connection-Request Start-Control-
                                      Connection-Reply
                                      with error

   idle            Receive            Version OK, send       wait-ctl-reply
                   Start-Control-     Start-Control-
                   Connection-Request Connection-Reply

   wait-ctl-reply  Receive            Clean-up, send         idle
                   Stop-Control-      Stop-Control-
                   Connection-Request Connection-Reply

   wait-ctl-reply  Receive            If auth OK             established
                   Start-Control-
                   Connection-Connected

   wait-ctl-reply  Receive            If auth not OK         wait-stop-reply
                   Start-Control-     Send ACCM
   and Stop-Control-
                   Connection-        Connection-Request
                   Connected

   established     Receive ACCM fields.  The            Clean-up, send ACCM value should be used by the
   LAC to process packets it is sends on the connection.  The receive
   ACCM value should be used by the LAC to process incoming packets on
   the connection.         idle
                   Stop-Control-      Stop-Control-
                   Connection-Request Connection-Reply

   established     Local terminate    Send                   wait-stop-reply
                                      Stop-Control-
                                      Connection-Request

   wait-stop-reply Receive            Clean-up               idle
                   Stop-Control-
                   Connection-Reply

   idle
      The default values used by the LAC control connection receiver waits for both these
   fields are 0xFFFFFFFF.  This AVP must be present.

6.17 No-op

   The No-op message is an incoming connection
      attempt.  When notified of a L2TP control message sent by either side.  Its
   primary purpose is new connection, it should prepare to update the Acknowledgment window for the peer



Valencia                    expires February May 1997                    [Page 52] 60]





INTERNET DRAFT                                                April                                             December 1996


   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |


      receive L2TP Control Message Header        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     No-op                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   No-op AVP

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             7                 |                0              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             16                |0 0 0 0 0 0 0 1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The Value messages.  When a Start-Control-Connection-Request is set to 16,
      received its version field MUST be examined.  If the version is
      earlier than the receiver's version and the earlier version can be
      supported by the receiver, the receiver SHOULD send a
      Start-Control-Connection-Reply.

      If the version is earlier than the receiver's
      version and the version cannot be supported, the receiver SHOULD send
      a Start-Connection-Reply message indicating No-op.  The flags indicate this error and remain in
      the idle state.  If the receiver's version is the same as
      or earlier than the peer's, the receiver SHOULD send a
   mandatory option.

7.0 Control Connection State Machines
      Start-Control-Connection-Reply with the receiver's version and enter the
      wait-ctl-reply state.

   wait-ctl-reply

      The control messages defined in section 6 are exchanged by way of state
tables defined peer waits in this section.  Tables are defined for incoming call
placement, outgoing call placement, as well as for initiation of state after sending a Start-Control-Connection-Reply.
      If it receives a Start-Control-Connection-Reply, it checks to see if the
tunnel itself.  The
      message is properly authenticated and, if so, it enters the established
      state.
      If authentication fails, a Stop-Control-Connection-Request with the reason
      code set appropriately is sent and wait-stop-reply state tables do not encode timeout is entered.
      if a Stop-Control-Connection-Request is received, a
      Stop-Control-Connection-Reply. is issued and retransmis-
sion behavior, as this idle state is handled in entered.

   established
      An established connection may be terminated by either a local
      condition or the underlying semantics defined in
6.0.2.

7.1 Control Connection Protocol Operation

   This section describes reception of a Stop-Control-Connection-Request.  In
      the operation event of various L2TP control connec-
   tion functions a local termination, the originator MUST send a
      Stop-Control-Connection-Request
      and enter the Control Connection messages which are used to
   support them.

   Receipt of an invalid or malformed Control Connection message should
   be logged appropriately, wait-stop-reply state.

      If the originator receives a Stop-Control-Connection-Request it
      SHOULD send a Stop-Control-Connection-Reply and close the
      connection.

   wait-stop-reply
      If a Stop-Control-Connection-Reply is received, the control connection should
      SHOULD be closed and restarted to ensure recovery into a known state.

7.2 Control Connection States

   The control connection relies on a standard TCP connection for its
   service.  The L2TP the control connection protocol is not distinguishable
   between connection becomes idle.

7.3 Timing considerations

   Because of the real-time nature of telephone signaling, both the LNS
   and LAC, but is distinguishable between the origina-
   tor LAC should be implemented with multi-threaded architectures such
   that messages related to multiple calls are not serialized and receiver.
   blocked.
   The originating peer call and connection state figures do not specify
   exceptions caused by timers.  These are addressed in Section 6.0.2.

   7.4 Incoming calls

   An Incoming-Call-Request message is generated by the one which first estab-
   lishes the tunnel.  Since either LAC or LNS can be the originator, a
   collision can occur.  See Section 6.0.1 for when an
   associated telephone line rings.  The LAC selects a description of this Call ID and
   its resolution situation.

7.2.1 Control Connection Originator (may be LAC or LNS)

   State           Event             Action               New State
   -----           -----             ------               ---------

   idle            Open request      Send                 wait_ctl_reply serial
   number and indicates the call bearer type.  Modems should always



Valencia                    expires February May 1997                    [Page 53] 61]





INTERNET DRAFT                                                April                                             December 1996


                                     Start-Control-
                                     Connection-Request

   wait_ctl_reply  Collision         If terminating,      idle
                                     clean-up.

   wait_ctl_reply  Receive           If version OK        established
                   Start-Control-    Send Start-Control-
                   Connection-Reply  Connected-Connected

   wait_ctl_reply  Receive           If version not OK    wait_stop_reply
                   Start-Control-


   indicate analog call type.  ISDN calls should indicate digital when
   unrestricted digital service or bad auth, Send
                   Connection-Reply  Stop-Control-
                                     -Connection-Request

   established     Local terminate   Send
                                     Stop-Control-        wait_stop_reply
                                     -Connection-Request

   wait_stop_reply Receive           clean-up             idle
                   Stop-Control-
                   Connection-Reply

   idle
      The control connection originator attempts to open a connection to
      the peer during idle state.  When the connection rate adaption is open, the
      originator transmits a send Start-Control-Connection-Request used and
      then enters analog if
   digital modems are involved.  CLID, DNIS, and
   subaddress may be included in the wait_ctl_reply state.

   wait_ctl_reply
      The originator checks to see message if another connection has been
      requested they are available from
   the same peer, and if so, handles telephone network.

   Once the LAC sends the collision
      situation described in Section 6.0.1.

      When a Start-Control-Connection-Reply is received, Incoming-Call-Request, it is examined waits for a compatible version.  If the version of response
   from the reply is lower
      than LNS but it does not necessarily answer the version sent in call from the request,
   telephone network yet.  The LNS may choose not to accept the older (lower) version
      should be used provided it call if:

      -  No resources are available to handle more sessions
      -  The dialed, dialing, or subaddress fields are not indicative of
         an authorized user
      -  The bearer service is supported. not authorized or supported

   If the version in the
      reply is earlier and supported, the originator moves LNS chooses to accept the estab-
      lished state.  If call, it responds with an
   Outgoing-Call-Reply
   which also indicates window sizes (see Appendix B).  When
   the version is earlier and not supported, a
      Stop-Control-Connection- Request SHOULD be sent LAC receives the Outgoing-Call-Reply, it attempts to connect the peer and
   call, assuming the originator moves into calling party has not hung up.  A final call
   connected message from the wait_stop_reply state.

   established
      An established connection may be terminated by either a local con-
      dition or LAC to the receipt of a Stop-Control-Connection-Request.  In LNS indicates that the event of a local termination, call
   states for both the originator MUST send a Stop-
      Control-Connection-Request LAC and the LNS should enter the wait_stop_reply established
   state.

      If

   When the originator receives a Stop-Control-Connection-Request it
      SHOULD send a Stop-Control-Connection-Reply dialed-in client hangs up, the call is cleared normally and close
   the connec-
      tion.

   wait_stop_reply



Valencia                  expires February 1997                 [Page 54]





INTERNET DRAFT                                                April 1996 LAC sends a Call-Disconnect-Notify message.  If the LNS wishes to
   clear a Stop-Control-Connection-Reply is received, the connection
      SHOULD be closed call, it sends a Call-Clear-Request message and the control connection becomes idle.

7.2.2 Control connection Receiver (may be then waits
   for a Call-Disconnect-Notify.

7.4.1 LAC or LNS) Incoming Call States

   State       Event               Action                   New State
   -----       -----               ------                   ---------
   idle        Ring OR             Send                     wait-reply
               Ready to indicate   Incoming-Call-Request
               incoming conn.

   wait-reply  Receive            If version not OK      idle
                   Start-Control-     send
                   Connection-Request Start-Control-
                                      Connection-Reply
                                      with error             Clean-up                 idle
               Incoming-Call-Reply
               Not Accepting

   wait-reply  Receive            Version OK, send             Answer call              established
                   Start-Control-     Start-Control-
                   Connection-Request Connection-Reply

   wait_ctl_reply  Receive            clean-up, send         idle
                   Stop-Control-      Stop-Control-
                   Connection-Request Connection-Reply

   wait_ctl_reply  Receive            If auth OK
               Incoming-Call-Reply Send
               Accepting           Incoming-Call-Connected

   wait-reply  Abort               Clean-up                 idle
                   Start-Control-
                   Connection-
                   Connected

   wait_ctl_reply  Receive            If auth not OK         wait-stop-reply
                   Start-Control-
                                   Send Stop-Control-
                   Connection-        Connection-Request
                   Connected Call-Disconnect-
                                   Notify

   established Receive            clean-up,             Hang-up and send         idle
                   Stop-Control-      Stop-Control-
                   Connection-Request Connection-Reply
               Call-Clear-Request  Call-Disconnect-Notify

   established     Local terminate telco line drop     Send                   wait-stop-reply
                                      Start-Control-
                                      Connection-Request

   wait-stop-reply Receive            clean-up                     idle
                   Stop-Control-
                   Connection-Reply
                                   Call-Disconnect-Notify



Valencia                    expires May 1997                    [Page 62]





INTERNET DRAFT                                             December 1996


   established local disconnect    Send                     idle
                                   Call-Disconnect-Notify

The control connection receiver waits states associated with the LAC for incoming calls are:

idle

   The LAC detects an incoming connection
      attempt.  When notified call on one of an new connection, it should prepare to
      receive L2TP messages.  When a Start-Control-Connection-Request is
      received its version field should be examined.  If the version is
      earlier than the receiver's version and the earlier version can be
      supported by the receiver, the receiver SHOULD send a Start-Control-
      Connection-Reply.

      If the version telco interfaces.
   Typically this means an analog line is earlier than the receiver's
      version and the version cannot be supported, the receiver SHOULD send



Valencia                  expires February 1997                 [Page 55]





INTERNET DRAFT                                                April 1996


      a Start- Connection-Reply message, close ringing or an ISDN TE has
   detected an incoming Q.931 SETUP message.  The LAC sends an Incoming-
   Call-Request message and moves to the TCP connection wait-reply state.

wait-reply

   The LAC receives an Incoming-Call-Reply message indicating non- will-
   ingness to accept the call (general error or don't accept) and
      remain in moves
   back into the idle state.  If the receiver's version is the same as
      earlier than the peer's, reply message indicates that the receiver SHOULD send a Start-Control-
      Connection-Reply with
   call is accepted, the receiver's version LAC sends an Incoming-Call-Connected message
   and enter enters the established state.

established
      An established connection

   Data is exchanged over the tunnel.  The call may be terminated by either a local
      condition or cleared follow-
   ing:
      An event on the reception of telco connection.  The LAC sends a Stop-Control-Connection-Request.  In
      the event Call-
         Disconnect-Notify message
      Receipt of a Call-Clear-Request.  The LAC sends a Call-Disconnect-
         Notify message
      A local termination, the originator MUST send reason.  The LAC sends a Stop-
      Control-Connection-Request and enter the wait_stop_reply state. Call-Disconnect-Notify message.


7.4.2 LNS Incoming Call States

   State        Event                  Action                New State
   -----        -----                  ------                ---------
   idle         Receive                If the originator receives a Stop-Control-Connection-Request it
      SHOULD send a Stop-Control-Connection-Reply and close the
      connection.

   wait_stop_reply not accepting      idle
                Incoming-Call-Request  Send
                                       Incoming-Call-Reply
                                       with Error

   idle         Receive                If a Stop-Control-Connection-Reply is received, the connection
      SHOULD be closed and the control connection becomes idle.

7.3 Timing considerations

   Because of the real-time nature of telephone signaling, both the LNS
   and LAC should be implemented accepting          wait-connect
                Incoming-Call-Request  Send
                                       Incoming-Call-Reply

   wait-connect Receive                Clean-up              idle
                Call-Disconnect-Notify

   wait-connect Receive                Get ready for data    established
                Incoming-Call-Connect

   established  Receive                Clean-up              idle
                Call-Disconnect-Notify

   established  Local terminate        Send                  wait-



Valencia                    expires May 1997                    [Page 63]





INTERNET DRAFT                                             December 1996


                                       Call-Clear-Request    disconnect

   wait-        Receive                Clean-up              idle
   disconnect   Call-Disconnect-Notify

   The states associated with multi-threaded architectures such
   that messages related to multiple the LNS for incoming calls are are:

   idle

      An Incoming-Call-Request message is received.  If the request is
      not serialized and
   blocked.
   The call acceptable, an Incoming-Call-Reply is sent back to the LAC and connection state figures do not specify
   exceptions caused by timers.  These are addressed
      the LNS remains in Section 6.0.2.

   7.4 Incoming calls

   An the idle state.  If the Incoming-Call-Request
      message is generated by acceptable, an Incoming-Call-Reply is sent indicating
      accept in the result code.  The session moves to the wait-connect
      state.

   wait-connect

      If the session is still connected on the LAC, the LAC when sends an
   associated telephone line rings.
      incoming call connect message to the LNS which then moves into
      established state.  The LAC selects may send a Call ID and serial
   number and indicates the call bearer type.  Modems should always
   indicate analog call type.  ISDN calls should Call-Disconnect-Notify to
      indicate digital when
   unrestricted digital service or rate adaption is used and analog if
   digital modems are involved.  Dialing number, dialed number, and
   subaddress may that the incoming caller could not be included connected.  This
      could happen, for example, if a telephone user accidentally places
      a standard voice call to an LAC resulting in a handshake failure
      on the called modem.

   established

      The session is terminated either by receipt of a Call-Disconnect-
      Notify message if they are available from the telephone network. LAC or by sending a Call-Clear-Request.
      Once a Call-Clear-Request has been sent, the LAC sends session enters the Incoming-Call-Request, it waits for
      wait-disconnect state.

   wait-disconnect

      Once a response
   from the LNS but does not answer Call-Disconnect-Notify is received the call from session moves back
      to the telephone network.
   The idle state.

7.5 Outgoing calls

Outgoing calls are initiated by an LNS may choose not and instruct an LAC to accept the place a
call if:

      -  No resources on a telco interface.  There are available to handle more sessions
      - three messages for outgoing calls:
Outgoing-Call-Request, Outgoing-Call-Reply, and Outgoing-Call-Connected.
The dialed, dialing, or subaddress fields are not indicative of LNS sends an authorized user
      -  The bearer service is not authorized or supported

   If Outgoing-Call-Request specifying the LNS chooses dialed party phone
number and subaddress as well as speed and window parameters.  The LAC
MUST respond to accept the call, it responds Outgoing-Call-Request message with an Outgoing-
   Call-Reply which also indicates window sizes (see Appendix B).  When Outgoing-Call-
Reply message once the LAC receives determines that the Outgoing-Call-Reply, it attempts proper facilities exist
to connect place the
   call, assuming call and the calling party has not hung up.  A final call is administratively authorized.  For
example, is this LNS allowed to dial an international call?  Once the
outbound call is connected message from the LAC sends an Outgoing-Call-Connected mes-
sage to the LNS indicates that indicating the final result of the call attempt:

7.5.1 LAC Outgoing Call States




Valencia                    expires February May 1997                    [Page 56] 64]





INTERNET DRAFT                                                April                                             December 1996


   states for both the LAC and the LNS should enter the established
   state.

   When the dialed-in client hangs up, the call is cleared normally and
   the LAC sends a Call-Disconnect-Notify message.  If the LNS wishes to
   clear a call, it sends a Call-Clear-Request message and then waits
   for a Call-Disconnect-Notify.


   State       Event              Action                        New State
   -----       -----              ------                        ---------
   idle        Ring OR             Send                     wait_reply
                  Ready to indicate   Incoming-Call-Request
                  incoming conn.

      wait-reply        Receive             clean-up            If cannot service,            idle
                  Incoming-Call-Reply
                  Not Accepting

      wait-reply  Receive             Answer call              established
                  Incoming-Call-Reply Send
                  Accepting           Incoming-Call-Connected

      wait-reply  Abort, Send         clean-up
               Outgoing-Call-     send Outgoing-Call-Reply
               Request            with Error

   idle
                  Call-Disconnect-
                  Notify

      established        Receive             Hang-up and            If can service,               wait-cs-ans
               Outgoing-Call-     send         idle
                  Clear-Call-Request  Call-Disconnect-Notify
               Request            Outgoing-Call-Reply

   wait-cs-ans Telco answer       Send                          established telco line drop
               and framing        Outgoing-Call-Connected
               detected

   wait-cs-ans Call failure       Send
                                  Outgoing-Call-Connected       idle
                                  with Error

   wait-cs-ans Receive            Hang-up, send                 idle
               Call-Clear-Request Call-Disconnect-Notify

   established local disconnect    Send Receive            Hang-up, send                 idle
               Call-Clear-Request Call-Disconnect-Notify
               or detect call
               disconnected

   The states associated with the LAC for incoming outgoing calls are:

   idle

      The LAC detects an incoming call on one of its telco interfaces.
      Typically

      Received Outgoing-Call-Request.  If this means an analog line is ringing or an ISDN TE has
      detected received in error,
      respond with an incoming Q.931 SETUP message.  The LAC sends Outgoing-Call-Reply with error condition set.
      Otherwise, allocate physical channel to dial on and send an Incom-
      ing- Call-Request message Outgo-
      ing-Call-Reply.  Place the outbound call and moves move to the wait_reply wait-cs-
      ans state.

   wait_reply

      The LAC receives an Incoming-Call-Reply message indicating non-
      willingness to accept

   wait-cs-ans

      If the call (general error is not completed or don't accept) and
      moves back into a timer expires waiting for the
      call to complete, send an Outgoing-Call-Connected with the appro-
      priate error condition set and go to idle state.  If a circuit
      switched connection is established and framing is detected, send
      an Outgoing-Call-Reply indicating success and go to established
      state.

   established

      If a Call-Clear-Request is received, the reply telco call SHOULD be
      released via appropriate mechanisms and a Call-Disconnect-Notify
      message indicates
      that SHOULD BE sent to the LNS.  If the call is accepted, disconnected by
      the LAC sends an Incoming-Call-
      Connected client or by the telco interface, a Call-Disconnect-Notify
      message and enters MUST be sent to the established state.

   established LNS.  Return to idle state after send-
      ing the Call-Disconnect-Notify.




Valencia                    expires February May 1997                    [Page 57] 65]





INTERNET DRAFT                                                April                                             December 1996


      Data is exchanged over the tunnel.  The call may be cleared fol-
      lowing:
         An event on the telco connection.  The LAC sends a Call- Dis-
            connect-Notify message
         Receipt of a Call-Clear-Request.  The LAC sends a Call-
            Disconnect- Notify message
         A local reason.  The LAC sends a Call-Disconnect-Notify mes-
            sage.


7.5


7.5.2 LNS Incoming Outgoing Call States

   State         Event                  Action                  New State
   -----         -----                  ------                  ---------
   idle          Open request           Send                    wait-reply
                                        Outgoing-Call-Request

   wait-reply    Receive                If not accepting                Clean-up                idle
                Incoming-Call-Request  Send
                                       Incoming-Call-Reply
                 Outgoing-Call-Reply
                 with Error

   idle

   wait-reply    Receive                If accepting                Null                    wait-connect
                Incoming-Call-Request
                 Outgoing-Call-Reply

   wait-reply    Abort request          Send
                                       Incoming-Call-Reply                    wait-disconnect
                                        Call-Clear-Request

   wait-connect Receive                clean-up              idle
                Call-Disconnect-Notify  Abort request          Send
                                        Call-Clear-Request      wait-disconnect

   wait-connect  Receive                get                Get ready for data      established
                Incoming-Call-Connect
                 Outgoing-Call-Connected
                 no Error

   wait-connect  Receive                Clean-up                idle
                 Outgoing-Call-Connected
                 with Error

   established   Receive                clean-up                Clean-up                idle
                 Call-Disconnect-Notify

   established   Local terminate        Send                  wait-
                                       Clear-Call-Request    disconnect

   wait-                    wait-disconnect
                                        Call-Clear-Request

   wait-disconnect Receive                clean-up              Clean-up                idle
   disconnect   Call-Disconnect-Notify
                 Call-Disconnect-
                 Notify

   The states associated with the LNS for incoming outgoing calls are:

   idle
      An Incoming-Call-Request Outgoing-Call-Request message is received. sent to the LAC and the ses-
      sion moves into the wait-reply state.

   wait-reply
      An Outgoing-Call-Reply is received which indicates an error.  The
      session returns to idle state.  If the request Outgoing-Call-Reply does
      not indicate an error, the telco call is connected and the session
      moves to the established state.

   wait-connect
      An Outgoing-Call-Connected is received which indicates an error.
      The session returns to idle state.  No telco call is active.  If
      the Outgoing-Call-Connected does not acceptable, indicate an Incoming-Call-Reply error, the telco



Valencia                    expires May 1997                    [Page 66]





INTERNET DRAFT                                             December 1996


      call is sent

   established
      If a Call-Disconnect-Notify is received, the telco call has been
      terminated for the reason indicated in the Result and Cause Codes.
      The session moves back to the LAC idle state.  If the LNS chooses to
      terminate the session, it sends a Call-Clear-Request to the LAC
      and then enters the wait-disconnect state.

   wait-disconnect
      A session disconnection is waiting to be confirmed by the LAC.
      Once the LNS receives the Call-Disconnect-Notify message, the ses-
      sion enters idle state.

8.0 L2TP Over Specific Media

   L2TP tries to be self-describing, operating at a level above the par-
   ticular media over which it is carried.  However, some details of its
   connection to media are required to permit interoperable implementa-
   tions.  The following sections describe details needed to permit
   interoperability over specific media.

8.1 IP/UDP

   L2TP uses the well-known UDP port 1701 [3].  The entire L2TP packet,
   including payload and
      the LNS remains in the idle state.  If the Incoming-Call-Request
      message is acceptable, an Incoming-Call-Reply L2TP header, is sent indicating
      accept in the result code. within a UDP datagram.
   The session moves to the wait_connect
      state.

   wait_connect

      If source and destination ports are the session same (1701), with demulti-
   plexing being achieved using Tunnel ID values.  It is connected on the LAC, the LAC sends an incoming
      call connect message to the LNS which then moves into established
      state.  The LAC may send a Call-Disconnect-Notify to indicate that



Valencia                  expires February 1997                 [Page 58]





INTERNET DRAFT                                                April 1996


      the incoming caller could not be connected.  This could happen, legal for example, if a telephone user accidently places the
   source IP address of a standard
      voice call given Tunnel ID to a LAC resulting in a handshake failure on change over the called
      modem.

   established

      The session is terminated either by receipt life of a Call-Disconnect-
      Notify message from the LAC or by sending
   connection, as this may correspond to a Call-Clear-Request.
      Once peer with multiple IP inter-
   faces responding to a Call-Clear-Request has been sent, network topology change.  Responses should
   reflect the session enters last source IP address for that Tunnel ID.

   IP fragmentation may occur as the
      wait_disconnect state.

   wait_disconnect

      Once a Call-Disconnect-Notify is received L2TP packet travels over the session moves back IP
   substrate.  L2TP makes no special efforts to the idle state.

7.6 Outgoing calls

Outgoing messages are initiated by a LNS and instruct optimize this.  A LAC
   implementation MAY cause its LCP to negotiate for a specific MRU,
   which could optimize for LAC environments in which the MTUs of the
   path over which the L2TP packets are likely to place travel have a
call on consis-
   tent value.

   Because a telco interface.  There are only two messages single UDP port is used for outgoing
calls: Outgoing-Call-Request and Outgoing-Call-Reply.  The LNS sends an
Outgoing-Call-Request specifying all packets, both the dialed party phone number and sub-
address as well as speed I and window parameters.  The LAC C
   bits MUST respond be used to
the Outgoing-Call-Request message with an Outgoing-Call- Reply message
once the LAC determines that: permit correct demultiplexing.

   Port 1701 is used for both L2F [5] and L2TP packets.  The call two types
   of packets may be detected by their headers; L2TP has been successfully connected
   A call failure a Vers field of
   2, L2F has occurred for reasons such as: no interfaces a 1 in this field instead.

8.2 IP

   When operating directly over IP, protocol number TBD [3] is used to
   encode the packet as L2TP-over-IP.  IP source address and MTU issues
   are
      available for dial-out, identical to 8.1, except that the called party is busy or does not
      answer, or no dial tone is detected on lack of a UDP header makes the interface chosen for
      dialing

3.2.4.1 LAC Outgoing Call States

   State       Event              Action                        New State
   -----       -----              ------                        ---------
   idle        Receive            If cannot service             wait_cs_ans
               Outgoing-Call-Request send
                                  Outgoing-Call-Reply
                                  with Error

   idle        Receive            If can service, dial,         idle
               Outgoing-Call-     send
               Request            Outgoing-Call-Reply

   wait_cs_ans Telco answer       Send                          established
                                  Outgoing-Call-Reply

   wait_cs_ans Call failure       Send
                                  Outgoing-Call-Reply           idle
                                  with Error

   wait_cs_ans Receive            Hang-up, send                 idle
   packet more compact.  As in IP/UDP, the I and C bits MUST be present.




Valencia                    expires February May 1997                    [Page 59] 67]





INTERNET DRAFT                                                April                                             December 1996


               Clear-Call-Request Call-Disconnect-Notify

   established Receive            Hang-up, send                 idle
               Clear-Call-Request Call-Disconnect-Notify

   The states associated with the LAC for outgoing calls are:

   idle

      Received Outgoing-Call-Request.  If this is received


9.0 Security Considerations

   L2TP encounters several security issues in error,
      respond with an Outgoing-Call-Reply with error condition set.
      Otherwise, allocate physical channel its operation.  The gen-
   eral approach of L2TP to dial on.  Place these issues is documented here.

   9.1 Tunnel Endpoint Security

      The tunnel endpoints may authenticate each other during tunnel
      establishment.  This authentication has the out-
      bound call, wait for a connection, same security
      attributes as CHAP, and move to the wait_cs_ans
      state.

   wait_cs_ans

      If has reasonable protection against reply
      and snooping.

      Once the call is incomplete, send an Outgoing-Call-Reply with a non-
      zero Error Code.  If a timer expires on an outbound call, send
      back an Outgoing-Call-Reply with a non-zero Error Code.  If a cir-
      cuit switched connection is established, send an Outgoing-Call-
      Reply indicating success.

   established

      If tunnel endpoints have authenticated, a Call-Clear-Request is received, the telco call SHOULD derived Key may be
      released via appropriate mechanisms
      carried in subsequent packets, which provides mild protection
      against brief or "accidental" attacks.  There is no cryptographic
      strength to these Keys, and a Call-Disconnect-Notify
      message SHOULD BE sent any attacker which can snoop packets
      can take control of the tunnel.

      For L2TP tunnels over IP, IP-level packet security provides very
      strong protection of the tunnel.  This requires no modification to
      the LNS. L2TP protocol, and leverages extensive IETF work in this area.

      For L2TP tunnels over Frame Relay or other switched networks, cur-
      rent practice indicates that these media are much less likely to
      experience attacks of in-transit data.  If these attacks became
      prevalent, either the call is disconnected by
      the client media or by the telco interface, a Call-Disconnect-Notify
      message SHOULD be sent L2TP packets would have to the LNS.

7.7 LNS Outgoing Call States

   State         Event                  Action                  New State
   -----         -----                  ------                  ---------
   idle          Open request           Send                    wait-reply
                                        Outgoing-Call-Request

   wait-reply    Receive                clean-up                idle
                 Outgoing-Call-Reply
                 with Error

   wait-reply    Receive                get ready be
      encrypted.

   9.2 Client Security

      A more systematic method of protection in tunneled PPP environ-
      ments may be achieved through client security.  PPP layer encryp-
      tion would provide end-to-end security for data       established
                 Outgoing-Call-Reply

   wait-reply    Abort request          Send                    wait-disconnect
                                        Clear-Call-Request

   established   Receive                clean-up                idle
                 Call-Disconnect-Notify

   established   Local terminate        Send                    wait-disconnect
                                        Clear-Call-Request




Valencia                  expires February 1997                 [Page 60]





INTERNET DRAFT                                                April 1996


   wait-disconnect Receive              clean-up                idle
                 Call-Disconnect-
                 Notify

   The states associated with both direct dial-in
      clients as well as PPP clients carried within a tunnel.  With this
      level of client security, sessions are protected against attacks
      against the LNS for outgoing calls are:

   idle
      An Outgoing-Call-Request message is sent to carrying tunnel, as well as attacks on the LAC itself.
      Because both encryption and compression can occur at the ses-
      sion moves into PPP
      layer, the wait_reply state.

   wait_reply
      An Outgoing-Call-Reply is received which indicates an error.  The
      session returns two can be coordinated, permitting compression to idle state.  No telco call is active.  If the
      Outgoing-Call-Reply does not indicate pre-
      cede encryption.

   9.3 Proxy Authentication

      The optional proxy CHAP function of L2TP can permit an error, entirely
      transparent PPP tunnel, with a single LCP and CHAP sequence being
      seen by the telco call is
      connected client.  For cases where the LAC and the session moves entire path
      to the established state.

   established
      If LNS are operated by a Call-Disconnect-Notify single entity, this function may pro-
      vide acceptable security.  For cases where LNS-initiated authenti-
      cation is received, required, proxy CHAP still permits an initial access
      decision to be made before accepting the telco call has been
      terminated for tunnel, permitting the reason indicated
      LNS in the Result most cases to reject tunnel initiations rather than accept
      them and Cause Codes. later disconnect.

      The session moves back to the idle state.  If optional proxy PAP may result in the LNS chooses to
      terminate cleartext password
      traversing the session, it sends tunnel.  Where PAP is being used in conjunction



Valencia                    expires May 1997                    [Page 68]





INTERNET DRAFT                                             December 1996


      with static passwords, this may pose a Call-Clear-Request to the LAC
      and then enters the wait_disconnect state.

   wait_disconnect
      A session disconnection significant security issue.
      Where PAP is waiting only used to transport one-time passwords, such
      issues may be confirmed by the LAC.
      Once the LNS receives the Call-Disconnect-Notify message, greatly mitigated.  The H bit of the ses-
      sion enters idle state. carrying AVP
      may be used to protect against this.

10.0 Acknowledgments

   The AVP construct comes from Glen Zorn, who thought up the framework
   for permitting multiple vendors to contribute to a common attribute
   space in a relatively orderly fashion.

   Dory Leifer and Allan Rubens of Ascend Communications made valuable
   refinements to the protocol definition of L2TP and contributed to the
   editing of this document.

11.0 Contacts

   Kory Hamzeh
   Ascend Communications
   1275 Harbor Bay Parkway
   Alameda, CA 94502
   kory@ascend.com

   Tim Kolar, Morgan Littlewood, Andrew J. Valencia
   Cisco Systems
   170 West Tasman Drive
   San Jose CA 95134-1706
   tkolar@cisco.com
   littlewo@cisco.com
   vandys@cisco.com

   Gurdeep Singh Pall
   Microsoft Corporation
   Redmond, WA
   gurdeep@microsoft.com



Valencia                  expires February 1997                 [Page 61]





INTERNET DRAFT                                                April 1996

   Jeff Taarud
   (formerly of 3COM Corporation, no current contact)

   William Verthein
   U.S. Robotics

12.0 References

TBD


   [1] W. Simpson, "The Point-to-Point Protocol (PPP)", RFC 1661,
      07/21/1994

   [2] A. Valencia, M. Littlewood, T. Kolar, "Layer 2 Forwarding", Internet
      draft, April 1996

   [3] K. Hamzeh, G. Pall, W. Verthein, J. Taarud, W. Little, "Point-to-Point
      Tunneling Protocol", Internet draft, June 1996




Valencia                    expires May 1997                    [Page 69]





INTERNET DRAFT                                             December 1996


   [4] P. Mockapetris, "Domain Names - Concepts and Facilities", RFC1034,
      November 1987

   [5] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1340,
      USC/Information Sciences Institute, July 1992.

   [6] Sally Floyd, Van Jacobson, "Random Early Detection Gateways for
      Congestion Avoidance", IEEE/ACM Transactions on Networking,
      August 1993

   [7] D. Carrel, L. Grant, "The TACACS+ Protocol", draft-grant-tacacs-00.txt,
      October 1996

   [8] C. Rigney, A. Rubens, W. A. Simpson, S. Willens.  "Remote Authentication
      Dial In User Service (RADIUS)." draft-ietf-radius-radius-05.txt,
      Livingston, Merit, Daydreamer, July 1996.

Appendix A: Acknowledgment Time-Outs

   L2TP uses sliding windows and time-outs to provide both user session
   flow-control across the internetwork underlying medium (which may be an internet-
   work) and to perform efficient data buffering to keep the LAC-LNS
   data channels full without causing receive buffer overflow.  L2TP
   requires that a time-out be used to recover from dropped data or
   acknowledgment packets.  The exact implementation of the time-out is
   vendor-specific.  It is suggested that an adaptive time-out be implemented imple-
   mented with backoff for congestion control.  The time-out mechanism
   proposed here has the following properties:

      Independent time-outs for each session.  A device (LAC or LNS)
      will have to maintain and calculate time-outs for every active
      session.

      An administrator-adjustable maximum time-out, MaxTimeOut, unique
      to each device.

      An adaptive time-out mechanism that compensates for changing
      throughput.  To reduce packet processing overhead, vendors may
      choose not to recompute the adaptive time-out for every received
      acknowledgment.  The result of this overhead reduction is that the
      time-out will not respond as quickly to rapid network changes.

      Timer backoff on time-out to reduce congestion.  The backed-off
      timer value is limited by the configurable maximum time-out value.
      Timer backoff is done every time an acknowledgment time-out
      occurs.

   In general, this mechanism has the desirable behavior of quickly
   backing off upon a time-out and of slowly decreasing the time-out
   value as packets are delivered without time-outs.

   Some definitions:

      Packet Processing Delay (PPD) Delay, "PPD", is the amount of time required for



Valencia                    expires May 1997                    [Page 70]





INTERNET DRAFT                                             December 1996


      each side peer to process the maximum amount of data buffered in their
      offered receive packet sliding window.  The PPD is the value exchanged
      between the LAC and LNS when a call is established.  For the LNS,
      this number should be small.  For a an LAC making supporting modem connections, connec-
      tions, this number could be significant.

      Sample

      "Sample" is the actual amount of time incurred receiving an



Valencia                  expires February 1997                 [Page 62]





INTERNET DRAFT                                                April 1996 receiving an
      acknowledgment for a packet.  The Sample is measured, not calcu-
      lated.

      Round-Trip Time (RTT) Time, "RTT", is the estimated round-trip time for an
      Acknowledgment to be received for a given transmitted packet.
      When the network link is a local network, this delay will be mini-
      mal (if not zero).  When the network link is the Internet, this
      delay could be substantial and vary widely.  RTT is adaptive: it
      will adjust to include the PPD and whatever shifting network
      delays contribute to the time between a packet being transmitted
      and receiving its acknowledgment.

      Adaptive Time-Out (ATO) Time-Out, "ATO", is the time that must elapse before an
      acknowledgment is considered lost.  After a time-out, the sliding
      window is partially closed and the ATO is backed off.

Packet Processing Delay (PPD)

   The PPD parameter is a 16-bit word time value exchanged during the Call
   Control phase that represents expressed in units of tenths of a second (64 means 6.4
   seconds).  The protocol only specifies that the parameter is
   exchanged, it does not specify how it is calculated.  The way values
   for PPD ATO are calculated is implementation-dependent and need not be
   variable (static time-
   outs time-outs are allowed).  The  IF adaptive time-outs are
   to be used then the PPD must should be exchanged in the call connect
   sequences, even if it remains constant in an implementation.  One
   sequences.  A possible way to calculate the PPD is:

   PPD'

   PPD = ((PPP_MAX_DATA_MTU - Header) * WindowSize * 8) / ConnectRate
        + LACFudge  (for an LAC)
   or
   PPD = PPD' ((PPP_MAX_DATA_MTU - Header) * WindowSize * 8) / AvePathRate
        + LACFudge LNSFudge  (for an LNS)

   Header is the total size of the IP L2TP and GRE headers, which is 36.  The media dependent headers.
   MTU is the overall MTU for the internetwork link between the LAC and LNS.  WindowSize  Window-
   Size represents the number of packets in the sliding win-
   dow, window, and is
   implementation-dependent.  The latency of the internet-
   work underlying connection
   path between the LAC and LNS could be used to pick a window size sufficient suf-
   ficient to keep the cur-
   rent current session's pipe full.  The constant 8 converts con-
   verts octets to bits (assuming ConnectRate is in bits per second).
   If ConnectRate is in bytes per second, omit the 8.  LACFudge is and LNS-
   Fudge are not required but can be used to take overall processing
   overhead of the LAC or LNS into account.

   In the case of the computed PPD for an LNS, AvePathRate is the aver-
   age bit rate of the path between the LNS and LAC.  Given that this
   number is probably very large and WindowSize is relatively small,



Valencia                    expires May 1997                    [Page 71]





INTERNET DRAFT                                             December 1996


   LNSFudge will be the dominant factor in the computation of PPD.  It
   is recommended that the minimum value of PPD be on the order of 0.5
   second.

   The value of PPD is used to seed the adaptive algorithm with the ini-
   tial RTT[n-1] value.

Sample

   Sample is the actual measured time for a returned acknowledgment.

Round-Trip Time (RTT)

   The RTT value represents an estimate of the average time it takes for
   an acknowledgment to be received after a packet is sent to the remote
   end of the tunnel.

A.1 Calculating Adaptive Acknowledgment Time-Out



Valencia                  expires February 1997                 [Page 63]





INTERNET DRAFT                                                April 1996

   We still must decide how much time to allow for acknowledgments to
   return.  If the time-out is set too high, we may wait an unnecessar-
   ily long time for dropped packets.  If the time-out is too short, we
   may time out just before the acknowledgment arrives.  The acknowledg-
   ment time-out should also be reasonable and responsive to changing
   network conditions.

   The suggested adaptive algorithm detailed below is based on the TCP
   1989 implementation and is explained in Richard Steven's book TCP/IP
   Illustrated, Volume 1 (page 300).  'n' means this iteration of the
   calculation, and 'n-1' refers to values from the last calculation.

      DIFF[n] = SAMPLE[n] - RTT[n-1] DEV[n] = DEV[n-1] + (beta *
      (|DIFF[n]| - DEV[n-1])) RTT[n] = RTT[n-1] + (alpha * DIFF[n])
      ATO[n] = MIN (RTT[n] + (chi * DEV[n]), MaxTimeOut)

      DIFF represents the error between the last estimated round-trip
      time and the measured time.  DIFF is calculated on each iteration.

      DEV is the estimated mean deviation.  This approximates the stan-
      dard deviation.  DEV is calculated on each iteration and stored
      for use in the next iteration.  Initially, it is set to 0.

      RTT is the estimated round-trip time of an average packet.  RTT is
      calculated on each iteration and stored for use in the next itera-
      tion.  Initially, it is set to PPD.

      ATO is the adaptive time-out for the next transmitted packet.  ATO
      is calculated on each iteration.  Its value is limited, by the MIN
      function, to be a maximum of the configured MaxTimeOut value.

      Alpha is the gain for the average and is typically 1/8 (0.125).

      Beta is the gain for the deviation and is typically 1/4 (0.250).

      Chi is the gain for the time-out and is typically set to 4.

   To eliminate division operations for fractional gain elements, the
   entire set of equations can be scaled.  With the suggested gain con-
   stants, they should be scaled by 8 to eliminate all division.  To
   simplify calculations, all gain values are kept to powers of two so
   that shift operations can be used in place of multiplication or divi-
   sion.  The above calculations are carried out each time an acknowl-
   edgment is received for a packet that was not retransmitted (no time-
   out occurs).



Valencia                    expires May 1997                    [Page 72]





INTERNET DRAFT                                             December 1996


A.2 Congestion Control: Adjusting for Time-Out

   This section describes how the calculation of ATO is modified in the
   case where a time-out does occur.  When a time-out occurs, the time-
   out value should be adjusted rapidly upward.  Although the GRE pack-
   ets L2TP payload
   packets are not retransmitted when a time-out occurs, the time-out
   should be adjusted up toward a maximum limit.  To compensate for
   shifting internetwork time delays, a strategy must be employed to
   increase the time-out when it expires.  A simple formula called
   Karn's Algorithm is used in TCP implementations and may be used in
   implementing the



Valencia                  expires February 1997                 [Page 64]





INTERNET DRAFT                                                April 1996 backoff timers for the LNS or the LAC.  Notice that
   in addition to increasing the time-out, we are also shrinking shrink the size of
   the window as described in the next section.

   Karn's timer backoff algorithm, as used in TCP, is:

      NewTIMEOUT = delta * TIMEOUT

   Adapted to our time-out calculations, for an interval in which a
   time-out occurs, the new time-out interval ATO is calculated as:

      RTT[n] = delta * RTT[n-1] DEV[n] = DEV[n-1] ATO[n] = MIN (RTT[n] +
      (chi * DEV[n]), MaxTimeOut)

   In this modified calculation of ATO, only the two values that con-
   tribute to ATO and that are stored for the next iteration are calcu-
   lated.  RTT is scaled by chi, delta, and DEV is unmodified.  DIFF is not
   carried forward and is not used in this scenario.  A value of 2 for
   Delta, the time-out gain factor for RTT, is suggested.

Appendix B:  Acknowledgment Time-Out and Window Adjustment

B.1 Initial Window Size

   Although each side has indicated the maximum size of its receive win-
   dow, it is recommended that a slow start method be used to begin
   transmitting data.  The initial window size on the transmitter is set
   to half the maximum size the receiver requested, with a minimum size
   of one packet.  The transmitter stops sending packets when the number
   of packets awaiting acknowledgment is equal to the current window
   size.  As the receiver successfully digests each window, the window
   size on the transmitter is bumped up by one packet until the maximum
   is reached.  This method prevents a system from flooding an already
   congested network because no history has been established.

   When for any reason an LAC or LNS receives more data than it can
   queue for the tunnel, a packet must be discarded.  In this case, it
   is recommended that a "random early discard" algorithm [6] be used
   rather than the obvious "drop last" algorithm.

B.2 Closing the Window

   When a time-out does occur on a packet, the sender adjusts the size
   of the transmit window down to one half its value when it failed.



Valencia                    expires May 1997                    [Page 73]





INTERNET DRAFT                                             December 1996


   Fractions are rounded up, and the minimum window size is one.

B.3 Opening the Window

   With every successful transmission of a window's worth of packets
   without a time-out, the transmit window size is increased by one
   packet until it reaches the maximum window size that was sent by the
   other side when the call was connected.  As stated earlier, no
   retransmission is done on a time-out.  After a time-out, the trans-
   mission resumes with the window starting at one half the size of the
   transmit window when the time-out occurred and adjusting upward by
   one each time the transmit window is filled with packets that are all
   acknowledged without time-outs.

B.4 Window Overflow



Valencia                  expires February 1997                 [Page 65]





INTERNET DRAFT                                                April 1996

   When a receiver's window overflows with too many incoming packets,
   excess packets are thrown away.  This situation should not arise if
   the sliding window procedures are being properly followed by the
   transmitter and receiver.  It is assumed that, on the transmit side,
   packets are buffered for transmission and are no longer accepted from
   the packet source when the transmit buffer fills.

8.0 L2TP Over Specific Media

   L2TP tries to be self-describing, operating at a level above the par-
   ticular media over which it is carried.  However, some details

Appendix C: Handling of its
   connection to media are required to permit interoperable implementa-
   tions.  The following sections describe details needed to permit
   interoperability over specific media.

8.1 IP/UDP

   L2TP uses out-of-order packets

   When the well-known UDP port 1701 [3].  The entire L2TP packet,
   including payload and L2TP header, is sent within a UDP datagram.
   The source Sequence Number and destination ports Acknowledgment Number fields are the same (1701), with demulti-
   plexing being achieved using Tunnel ID values.  It is legal for the
   source IP address of a given Tunnel ID present
   in payload packets, they are used to change over the life of a
   connection, as this manage packet rate.  In addi-
   tion, they may correspond be used to handle out-of-order arrival of packets.  A
   simple L2TP client would simply discard any packet other than a peer
   packet with multiple IP inter-
   faces responding to a network topology change.  Responses should
   reflect the last source IP address for sequence greater than that Tunnel ID.

   IP fragmentation may occur last received; if packets 1,
   2, 3 arrived as the L2TP packet travels over the IP
   sub- strate.  L2TP makes no special efforts to optimize this.  A LAC
   imple- mentation MAY cause its LCP to negotiate for a specific MRU,
   which could optimize for LAC environments 1, 3, 2, this would result in which the MTUs of the
   path over which packet 2 being dis-
   carded.

   Such behavior does not affect the L2TP packets are likely to travel have a consis-
   tent value.

   Port 1701 is used for both L2F [XXX] protocol itself, but signifi-
   cantly improved throughput in such environments may be attained by
   queueing and L2TP packets. reordering packets when they arrive out of order.  The two types
   number of packets may to be detected by their headers; L2TP has queued is a Vers field function of
   2, L2F has a 1 memory resources on
   the L2TP implementation, but should never be more than 1/4 of the
   total sequence number space (i.e., 16384 packets), to avoid aliasing.

   An implementation which queues packets in this field instead.

8.2 IP

   When operating directly over IP, protocol way must also employ
   an algorithm for deciding that a given sequence number TBD [3] is used corresponds to
   encode the
   a packet as L2TP-over-IP.  IP source address which is lost, rather than one which is out of order but
   still in transit.  Such a decision would likely be based upon timing,
   buffering conditions, and MTU issues packet arrival characteristics.  The
   details of such a tradeoff are identical to 8.1, except that outside the lack scope of this specifica-
   tion, but it is recommended a UDP header makes the packet more compact.

9.0 Security Considerations should be afforded an interval
   at least twice the estimated RTT from the L2TP encounters several security issues in its operation.  The gen-
   eral approach peer.

Appendix D: Transport Layer Adaptive Time-outs and Window Adjustment

   Appendixes A, B, and C dealt with operation of L2TP to these issues is documented here.

   9.1 Tunnel Endpoint Security

      The tunnel endpoints may authenticate each other during tunnel
      establishment.  This authentication has the same security
      attributes as CHAP, and has reasonable protection against reply payload packet
   sessions of L2TP.  This Appendix explains how these three algorithms
   pertain to the transport layer for L2TP control sessions.  Appendix



Valencia                    expires February May 1997                    [Page 66] 74]





INTERNET DRAFT                                                April                                             December 1996


      and snooping.

      Once


   B, Time-out Window Management, directly applies to the tunnel endpoints have authenticated, Transport
   Layer except in the case where a derived Key may window size of 1 is being used.
   Appendix C, does not really apply because, for the Control Session,
   control messages MUST always be
      carried processed by the receiver in subsequent packets, which provides mild protection
      against brief or "accidental" attacks.  There is order.
   Also, there are no cryptographic
      strength to these Keys, and any attacker which can snoop packets
      can take lost control of packets because they are retransmit-
   ted by the tunnel.

      For L2TP tunnels over IP, IP-level packet security provides very
      strong protection Transport Layer.  Thus, the main topic of this
   Appendix is how to adapt the tunnel.  This requires no modification example adaptive time-out algorithm of
   Appendix A to the L2TP protocol, Control Session Transport Layer.

   There are two main differences between the Control Session and leverages extensive IETF work in this area.

      For L2TP tunnels over Frame Relay or other switched networks, cur-
      rent practice indicates that these media pay-
   load sessions: 1) Unlike lost payload packets, lost control messages
   are much less likely to
      experience attacks of in-transit data.  If these attacks became
      prevalent, either retransmitted and 2) There is no Packet Processing Delay value
   provided in the media or control session setup messages.  The latter affects
   the L2TP packets would have to be
      encrypted.

   9.2 Client Security

      A more systematic method of protection manner in tunneled PPP environ-
      ments may be achieved through client security.  PPP layer encryp-
      tion would provide end-to-end security for both direct dial-in
      clients as well as PPP clients carried within which the initial value of the RTT estimate is deter-
   mined.  The former really doesn't affect the algorithm at all, except
   that upon a tunnel.  With this
      level time-out, retransmission of client security, sessions are protected against attacks
      against unacknowledged control mes-
   sages should be attempted, up to the carrying tunnel, as well number that fit in the sliding
   window with size computed as attacks on in Appendix B.

   Using the LAC itself.
      Because both encryption and compression can occur at symbol definitions of Appendix A, the PPP
      layer, calculation of the two
   value for the PPD of the remote peer can be coordinated, permitting compression to pre-
      cede encryption.

      The optional proxy CHAP function estimated as:

   PPD = ((PPP_MAX_DATA_MTU - Header) * WindowSize * 8) / AvePathRate
        + Fudge

   This is simply the number of L2TP can permit an entirely
      transparent PPP tunnel, with bits in a single LCP and CHAP sequence being
      seen full control session window
   divided by the client.  For cases where the LAC and average speed of the entire path
      to between the LAC and LNS are operated by with
   a single entity, this function may pro-
      vide acceptable security.  For fudge factor added on to make it work.  In cases where LNS-initiated authenti-
      cation the average
   rate of the connection between LAC and LNS isn't known, it is required, proxy CHAP still permits an initial access
      decision to sug-
   gested that some value be made before accepting configured that is associated with each
   possible peer.  Because Control Session windows will most likely be
   small and the tunnel, permitting connection speed will be quite high, fudge will be the
      LNS
   dominant factor in most cases this calculation.  For this reason, just configur-
   ing a single fixed initial PPD estimate to reject tunnel initiations rather than accept
      them and later disconnect. be used for all possible
   peers will probably provide adequate results.  This fudge factor
   should probably be at least 0.5 second.





















Valencia                    expires February May 1997                    [Page 67] 75]



----