view Side-By-Side changes
PPPNetwork Working Group W. M. Townsley Internet-Draft A. ValenciaINTERNET DRAFT Cisco SystemsCategory:Internet Draft K. Hamzeh,Standards Track cisco Systems <draft-ietf-pppext-l2tp-13.txt> A. RubensTitle: draft-ietf-pppext-l2tp-12.txtAscend CommunicationsDate: October 1998 T. Kolar, M. Littlewood W. M. Townsley Cisco Systems J. Taarud Copper Mountain NetworksG. S. Pall G. Zorn Microsoft Corporation B. PalterNetwork Alchemy W. Verthein 3COM CorporationRedback Networks February 1999 Layer Two Tunneling Protocol "L2TP" Status of this Memo This document is anInternet-Draft.Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents asInternet-Drafts.Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of sixmonths. Internet-Draftsmonths and may be updated, replaced, or obsoleted by other documents at any time. It isnot appropriateinappropriate to useInternet- DraftsInternet-Drafts as reference material or to cite them other than asa ``working draft'' or``work inprogress.''progress''. To learn the current status of any Internet-Draft, please check the1id-abstracts.txt``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow Directories onftp.ietf.org, nic.nordu.net, ftp.nisc.sri.com,ftp.ietf.org (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), ormunnari.oz.au. Abstract Virtual dial-up allows many separatemunnari.oz.au (Pacific Rim). The distribution of this memo is unlimited. It is filed as <draft- ietf-pppext-l2tp-13.txt> andautonomous protocol domainsexpires August 8, 1999. Please send comments toshare common access infrastructure including modems, Access Servers, and ISDN routers. RFC 1661 specifies multi-protocol dial-up via PPP [1].the L2TP mailing list (l2tp@ipsec.org). Abstract This document describes the Layer Two Tunneling Protocol(L2TP) which permits(L2TP). RFC 1661 specifies multi-protocol access via PPP [RFC1661]. L2TP facilitates the tunneling ofthe link layer (i.e., HDLC, async HDLC) of PPP. Using such tunnels, itPPP packets across an intervening network in a way that is as transparent as possible todivorce the location of the initial dial-up server from the location at which the dial-up protocol connection is terminatedboth end-users andaccess to the network provided. Valencia expires June 1999applications. Townsley, et al. Standards Track [Page 1] INTERNET DRAFTOctober 1998L2TP February 1999 Table of Contents 1.0 Introduction . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Conventions . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 2.0Problem Space OverviewTopology . . . . . . . . . . . . . . . . . .6 2.1 Initial Assumptions. . . . . . . 7 3.0 Protocol Overview . . . . . . . . . . . .6 2.2 Topology. . . . . . . . 8 3.1 L2TP Header Format . . . . . . . . . . . . . . . . .7 2.3 Providing Virtual Dial-up Services--a walk-through. . . 9 3.2 Control Message Types .7 3.0 Service Model Issues. . . . . . . . . . . . . . . . . 11 4.0 Control Message Attribute Value Pairs . .9 3.1 Security. . . . . . . . 12 4.1 AVP Format . . . . . . . . . . . . . . . . .10 3.2 Address Allocation. . . . . . . 12 4.2 Hiding of AVP Values . . . . . . . . . . . . .10 3.3 Authentication. . . . . . 13 4.3 AVP Summary . . . . . . . . . . . . . . . .10 3.4 Accounting. . . . . . . 15 4.3.1 AVPs Applicable To All Control Messages . . . . . . . . . 16 4.3.2 Result and Error Codes . . . . . . . .11 4.0 Protocol Overview. . . . . . . . . . 17 4.3.3 Control Connection Management AVPs . . . . . . . . . .11 4.1 Control Message Overview. . 19 4.3.4 Call Management AVPs . . . . . . . . . . . . . . .13 4.2 Payload Packet Overview. . . . 25 4.3.5 Proxy LCP and Authentication AVPs . . . . . . . . . . . . 31 4.3.6 Call Status AVPs .13 4.3 Flow Control. . . . . . . . . . . . . . . . . . . . 36 5.0 Protocol Operation . . .16 5.0 Message Format and Protocol Extensibility .. . . . . . .18 5.1 AVP. . . . . . . . . . 39 5.1 Control Connection Establishment . . . . . . . . . . . . . 39 5.1.1 Tunnel Authentication . . . .18 5.2 Control Message Format. . . . . . . . . . . . . . 40 5.2 Session Establishment . . . .20 5.3 Payload Message Format. . . . . . . . . . . . . . 40 5.2.1 Incoming Call Establishment . . . .21 5.4 Control Message Types. . . . . . . . . . . 40 5.2.2 Outgoing Call Establishment . . . . . . .22 5.5 AVP Summary. . . . . . . . 41 5.3 Forwarding PPP Frames . . . . . . . . . . . . . . .23 5.6 Result and Error Code Summary. . . 41 5.4 Using Sequence Numbers on the Data Channel . . . . . . . . 42 5.5 Keepalive (Hello) . . .25 5.7 Hiding of AVP values. . . . . . . . . . . . . . . . . 42 5.6 Session Teardown . .27 6.0 Control Connection Protocol Specification. . . . . . . .30 6.0.1 Control Connection Collision. . . . . . . . . . . 43 5.7 Control Connection Teardown . . .30 6.0.2 Reliable Delivery of Control Messages. . . . . . . . .30 6.0.3 Control Message Format. . . 43 5.8 Reliable Delivery of Control Messages . . . . . . . . . . 43 6.0 Control Connection Protocol Specification . . . .31 6.1 Start-Control-Connection-Request. . . . 45 6.1 Start-Control-Connection-Request (SCCRQ) . . . . . . . . .3145 6.2 Start-Control-Connection-Reply (SCCRP) . . . . . . . . . .. . . . 3746 6.3 Start-Control-Connection-Connected (SCCCN) . . . . . . . .. . . . 4146 6.4 Stop-Control-Connection-Notification (StopCCN) . . . . . .. . . . . 4247 6.5 Hello (HELLO) . . . . . . . . . . . . . . . . . . . . . .. . . . 4347 6.6Outgoing-Call-Request . . .Incoming-Call-Request (ICRQ) . . . . . . . . . . . . . . .4448 6.7Outgoing-Call-Reply . . .Incoming-Call-Reply (ICRP) . . . . . . . . . . . . . . . .4948 6.8Outgoing-Call-Connected . . .Incoming-Call-Connected (ICCN) . . . . . . . . . . . . . .5049 6.9Incoming-Call-Request . . .Outgoing-Call-Request (ICRQ) . . . . . . . . . . . . . . .5349 6.10Incoming-Call-Reply . . .Outgoing-Call-Reply (ICRP) . . . . . . . . . . . . . . . .5750 6.11Incoming-Call-Connected . . .Outgoing-Call-Connected (OCCN) . . . . . . . . . . . . . .5850 6.12 Call-Disconnect-Notify (CDN) . . . . . . . . . . . . . . .. . 6551 6.13 WAN-Error-Notify (WEN) . . . . . . . . . . . . . . . . . .. . 6751 6.14 Set-Link-Info (SLI) . . . . . . . . . . . . . . . . . . .. . . 6852 7.0 Control Connection State Machines . . . . . . . . . . . .6952 7.1 Control Connection Protocol Operation . . . . . . . . . .7052 Townsley, et al. Standards Track [Page 2] INTERNET DRAFT L2TP February 1999 7.2 Control Connection States . . . . . . . . . . . . . . . .7052 7.2.1 Control Connection Establishment . . . . . . . . . . . .70. 53 7.3 Timing considerations . . . . . . . . . . . . . . . . . .7255 7.4 Incoming Calls . . . . . . . . . . . . . . . . . . . . . .7255 7.4.1 LAC Incoming Call States . . . . . . . . . . . . . . . .72. 56 7.4.2 LNS Incoming Call States . . . . . . . . . . . . . . . .74. 57 7.5 Outgoing calls . . . . . . . . . . . . . . . . . . . . . .7458 7.5.1 LAC Outgoing Call States . . . . . . . . . . . . . . . .75 Valencia expires June 1999 [Page 2] INTERNET DRAFT October 1998. 59 7.5.2 LNS Outgoing Call States . . . . . . . . . . . . . . . .76. 60 7.6 Tunnel Disconnection . . . . . . . . . . . . . . . . . . .7761 8.0 L2TP Over Specific Media . . . . . . . . . . . . . . . . .7762 8.1IP/UDP . . . . .L2TP over UDP/IP . . . . . . . . . . . . . . . . . . . . .7762 8.2 IP . . . . . . . . . . . . . . . . . . . . . . . . . . . .7863 9.0 Security Considerations . . . . . . . . . . . . . . . . .7964 9.1 Tunnel Endpoint Security . . . . . . . . . . . . . . . . .7964 9.2Client Security . . . . . . . . . . . . . . . . . . . . . 79 9.3Proxy PPP Authentication . . . . . . . . . . . . . . . . .. . 8064 10.0 IANA Considerations . . . . . . . . . . . . . . . . . . .8065 10.1 AVP Attribute Type Values . . . . . . . . . . . . . . . .8065 10.2 Messagetype valuesAVP Values . . . . . . . . . . . . . . . . . . .80 10.3 Result code values. 65 10.3 Result Code AVP Values . . . . . . . . . . . . . . . . . .8065 10.4 Framing Capabilities & BearerCapabilititiesCapabilities . . . . . . .80. 65 10.5 Proxy Authen Typevalues .AVP Values . . . . . . . . . . . . . . .8166 10.6 AVP Headerbits . . . . .Bits . . . . . . . . . . . . . . . .81 10.7 Message (Payload and Control) Header bits. . . . .. . . 8166 11.0AcknowledgmentsReferences . . . . . . . . . . . . . . . . . . . . .81 12.0 Contacts. . . 66 12.0 Acknowledgments . . . . . . . . . . . . . . . . . . . . .8168 13.0References . .Author's Addresses . . . . . . . . . . . . . . . . . . . .. 8268 Appendix A:Acknowledgment Time-Outs . . . . . . . . . . . . . 83 Appendix B: Acknowledgment Time-OutControl Channel Slow Start andWindow Adjustment . . 87 Appendix C: Handling of out-of-order packets . .Congestion Avoidance . . . . . . .88 Appendix D: Transport Layer Adaptive Time-Outs and Window Adjustment. . . . . . . . . . . . . .8969 AppendixE:B: Control Message Examplesof L2TP sequence numbering. . . . . . .90 Appendix F: Flow Control and Sequencing Negotiation. . . . .93. . 70 1.0 IntroductionThe traditional dial-up network service on the Internet isPPP [RFC1661] defines an encapsulation mechanism forregistered IP addresses only. A new classtransporting multiprotocol packets across layer 2 (L2) point-to-point links. Typically, a user obtains a L2 connection to a Network Access Server (NAS) using one ofvirtual dial-up application which allows multiple protocolsa number of techniques (e.g., dialup POTS, ISDN, ADSL, etc.) andunregistered IP addresses is also desiredthen runs PPP over that connection. In such a configuration, the L2 termination point and PPP session endpoint reside on theInternet. Examples of this class of network application are support for privately addressed IP, IPX,same physical device (i.e., the NAS). L2TP extends the PPP model by allowing the L2 andAppleTalk dial-up viaPPPacross existing Internet infrastructure. The support of these multi-protocol virtual dial-up applications is of significant benefitendpoints toend users, enterprises, and Internet Service providers as it allows the sharing of very large investments inreside on different devices interconnected by a packet-switched network. With L2TP, a user has an L2 connection to an access concentrator (e.g., modem bank, ADSL DSLAM, etc.), andcore infrastructure and allows local callsthe concentrator then tunnels individual PPP frames tobe used. It alsothe NAS. This allowsexisting investments in non-IP protocol applicationsthe actual processing of PPP packets to besupported in a secure manner while still leveraging the access infrastructure of the Internet. It isdivorced from thepurposetermination ofthis document to identifytheissues encountered in integrating multi-protocol dial-up services into an existing Internet Service Provider's Point of Presence (hereafter referred to Valencia expires June 1999L2 circuit. Townsley, et al. Standards Track [Page 3] INTERNET DRAFTOctober 1998 as ISP and POP, respectively), and to describe theL2TPprotocolFebruary 1999 One obvious benefit of such a separation is that instead of requiring the L2 connection terminate at the NAS (which may require a long- distance toll charge), the connection may terminate at a (local) circuit concentrator, whichpermitsthen extends theleveraging of existing access protocols. This protocollogical PPP session over a shared infrastructure such a frame relay circuit or the Internet. From the user's perspective, there is no functional difference between having the L2 circuit terminate in a NAS directly or using L2TP. L2TP may also solve the"multilinkmultilink hunt-groupsplitting"splitting problem. Multilink PPP[9], often used to aggregate ISDN B channels,[RFC1990] requires that all channels composing a multilink bundle be grouped at a singleNAS. Because L2TP makesNetwork Access Server (NAS). Due to its ability to project a PPP sessionterminate atto a location other than the point at whichthe sessionit was physically received,itL2TP can be used to make all channels terminate at a singleNAS, allowingNAS. This allows multilink operation even when thephysicalcalls are spread across distinct physicalNAS's. 1.1 Conventions The following language conventions are used inNASs. This document defines the necessary control protocol for on-demand creation of tunnels between two nodes and theitemsaccompanying encapsulation for multiplexing multiple, tunneled PPP sessions. 1.1 Specification ofspecification in this document:Requirements The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described inRFC 2119 [15].[RFC2119]. 1.2 Terminology Analog Channel A circuit-switched communication path which is intended to carry 3.1 kHz audio in each direction.Control Connection A control connection operates in-band overAttribute Value Pair (AVP) The variable length concatenation of atunnel to controlunique Attribute (represented by an integer) and a Value containing the actual value identified by the attribute. Multiple AVPs make up Control Messages which are used in the establishment,release, and maintenance of sessionsmaintenance, and teardown ofthe tunnel itself.tunnels. Call A connectionor(or attemptedconnectionconnection) betweentwo terminal endpoints.a Remote System and LAC. For example, a telephone call through thePSTNPSTN. A Call (Incoming or Outgoing) which is successfully established betweentwo modems. (See also: Session). CHAP Challenge Authentication Protocol,aPPP cryptographicTownsley, et al. Standards Track [Page 4] INTERNET DRAFT L2TP February 1999 Remote System and LAC results in a corresponding L2TP Session within a previously established Tunnel between the LAC and LNS. (See also: Session, Incoming Call, Outgoing Call). Called Number An indication to the receiver of a call as to what telephone number the caller used to reach it. Calling Number An indication to the receiver of a call as to the telephone number of the caller. CHAP Challenge Handshake Authentication Protocol [RFC1994], a PPP cryptographic challenge/response authentication protocol in which the cleartext password is not passed over the line.CLID Calling Line ID, an indication to the receiver ofControl Connection A control connection operates in-band over acall astunnel to control thephone numberestablishment, release, and maintenance of sessions and of thecaller.tunnel itself. Control Messages Control messages are exchanged between LAC and LNS pairs,Valencia expires June 1999 [Page 4] INTERNET DRAFT October 1998operating 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. Also referred to as a dial-up or Virtual dial-up client. DNIS Dialed Number Information String, an indication to the receiver of a call as to what phone number the caller used to reach it.Digital Channel A circuit-switched communication path which is intended to carry digital information in each direction.EAP Extensible Authentication Protocol, a framework forDSLAM Digital Subscriber Line (DSL) Access Module. A network device used in the deployment of DSL service. This is typically afamilyconcentrator ofPPP authentication protocols, including cleartext, challenge/response, and arbitrary dialog sequences.individual DSL lines located in a central office (CO) or local exchange. Incoming Call A Call received at an LAC to be tunneled to an LNS (see Call, Outgoing Call). Townsley, et al. Standards Track [Page 5] INTERNET DRAFT L2TP February 1999 L2TP Access Concentrator (LAC) ANetwork Access Server (NAS) or host co-located with a PPP end system capablenode that acts as one side ofhandlingan L2TP tunnel endpoint and is a peer to the L2TPprotocol.Network Server (LNS). The LACneeds only implement the media over which L2TP is to operatesits between an LNS and a remote system and forwards packets topass trafficand from each. Packets sent from the LAC toone or more LNS's. It may tunnel anythe LNS requires tunneling with the L2TP protocolcarried within PPP.as defined in this document. TheLAC isconnection from theinitiator of incoming calls andLAC to thereceiver of outgoing calls.remote system is either local (see: Client LAC) or a PPP link. L2TP Network Server (LNS)An LNS operates on any platform capableA node that acts as one side ofPPP termination.an L2TP tunnel endpoint and is a peer to the L2TP Access Concentrator (LAC). The LNShandlesis theserver sidelogical termination point of a PPP session that is being tunneled from theL2TP protocol. Since L2TP relies only onremote system by thesingle media over which L2TP tunnels arrive,LAC. Management Domain (MD) A network or networks under theLNS may have onlycontrol of a singleLANadministration, policy orWAN interface, yet stillsystem. For example, an LNS's Management Domain might beable to terminate calls arriving at anythe corporate network it serves. An LAC'sfull range of PPP interfaces (async, synchronous ISDN, V.120, etc.). The LNS isManagement Domain might be theinitiator of outgoing callsInternet Service Provider that owns andthe receiver of incoming calls.manages it. Network Access Server (NAS) A device providingtemporary, on-demandlocal network access tousers. Thisusers across a remote accessis point-to-point typically using PSTN or ISDN lines. Anetwork such as the PSTN. An NAS may also serve as an LAC, LNS or both.PAP Password Authentication Protocol, a simple PPP authentication mechanism in which a cleartext username and password are Valencia expires June 1999 [Page 5] INTERNET DRAFT October 1998 transmitted to prove identity. POP An Internet Service Provider's Point of Presence. Quality of Service (QOS)Outgoing Call Agiven QualityCall placed by an LAC on behalf ofService level is sometimes required for a given user being tunneled betweenanLNS-LAC pair. For this scenario, a unique L2TP tunnelLNS (see Call, Incoming Call). Peer When used in context with L2TP, peer refers to either the LAC or LNS. An LAC's Peer iscreatedan LNS andencapsulated directly on topvice versa. When used in context with PPP, a peer is either side of themedia providingPPP connection. POTS Plain Old Telephone Service. Remote System Townsley, et al. Standards Track [Page 6] INTERNET DRAFT L2TP February 1999 An end-system or router attached to a remote access network (i.e. a PSTN), which is either theindicated QOS.initiator or recipient of a call. Also referred to as a dial-up or virtual dial-up client. Session L2TP is connection-oriented. The LNS and LAC maintain state for eachuserCall that isattached toinitiated or answered by an LAC.A sessionAn L2TP Session is created between the LAC and LNS when an end-to-end PPP connection isattemptedestablished between adial userRemote System and theLNS, or when an outbound call is initiated. The datagramsLNS. Datagrams related toa sessionthe PPP connection are sent over thetunnelTunnel between the LAC and LNS. There is a one to one relationship between established L2TP Sessions and their associated Calls. (See also: Call). Tunnel Atunnel is defined by an LNS-LACTunnel exists between a LAC-LNS pair. ThetunnelTunnel consists of a Control Connection and zero or more L2TP Sessions. The Tunnel carries encapsulated PPP datagrams and Control Messages between the LAC and theLNS; many sessions can be multiplexed over a single tunnel. A control connection operating in-band over the same tunnel controls the establishment, release, and maintenance of sessions and of the tunnel itself. A tunnel is sometimes referred to as a control connection.LNS. Zero-Length Body (ZLB) Message A controlor payloadpacket with only an L2TPheader, and no control message information or PPP payload.header. ZLB messages are used for explicitly acknowledging packets on the reliable controlor datachannel. 2.0Problem Space Overview In this section we describe in high level termsTopology The following diagram depicts a typical L2TP scenario. The goal is to tunnel PPP frames between thescope 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 registered 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 security facilities that are available to him or her in a dedicated dial-up configuration. In particular, the end user requires: + EndRemote Systemtransparency: Neither the remote end system nor his Valencia expires June 1999 [Page 6] INTERNET DRAFT October 1998 home site hosts should require any special software to use this service in a secure manner. + Authentication as provided via dial-up PPP CHAP, PAP, EAP,orthrough 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 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 purposes) and by the user (for charge-backLAC Client andauditing). 2.2 Topology Shown below isan LNS located at ageneric Internet with Public switched Telephone Network (PSTN) access (i.e., async PPP via modems) and Integrated Services Digital Network (ISDN) access (i.e., synchronous PPP access). Remote users (either async or ISDN PPP) will access theHomeLAN as if they were dialed into theLAN. Townsley, et al. Standards Track [Page 7] INTERNET DRAFT L2TPNetwork Server (LNS), although their physical dial-up is via the ISP Network Access Server (acting as the LAC). [LAN]February 1999 [Home LAN] [LAC Client]----------+ |______________|_____ +--[Host] | | | [LAC]---------| Internet |-----[LNS]-----+ | |__________| | _____|_____ : | | | PSTN |[User]--| or ISDN[Remote]--| Cloud | [System] |Cloud|[LAN][Home LAN] |___________| | | ______________ +---[Host] | | | | [LAC]-------| Frame Relay |---[LNS]-----+ | or ATM Cloud | | |______________| :2.3 Providing Virtual dial-up Services--a walk-through To motivateThe Remote System initiates a PPP connection across thefollowing discussion, this section walks through an example of what might happen when a Virtual dial-up client initiates access. Valencia expires June 1999 [Page 7] INTERNET DRAFT October 1998 A Network Access Server (NAS) operating as a peer to an LNS is referred to as an L2TP Access Concentrator, or "LAC". The remote user initiates a PPP connectionPSTN Cloud to anISP via either the PSTN or ISDN.LAC. The LACaccepts the connection andthen tunnels the PPPlink is established (L2TP also permitsconnection across theLACInternet, Frame Relay, or ATM Cloud tocheck withan LNSafter call indication priorwhereby access toaccepting the call. Thisa Home LAN isuseful where DNIS or CLID informationobtained. The Remote System isavailable inprovided addresses from theincoming call notification). The ISPHOME LAN via PPP NCP negotiation. Authentication, Authorization and Accounting maynow undertake a partial authentication of the end system/user. Only the username field wouldbeinterpreted to determine whetherprovided by the Home LAN's Management Domain as if the userrequireswere connected to aVirtual dial-up service. It is expected, but not required, that usernames will be structured (e.g. username@company.com). Alternatively, the ISPNetwork Access Server directly. A LAC Client (a Host which runs L2TP natively) maymaintain a database mapping usersalso participate in tunneling toservices. InthecaseHome LAN without use ofVirtual dial-up, the mapping will nameaspecific endpoint,separate LAC. In this case, theLNS. Alternatively,Host containing theISP may haveLAC Client software alreadydetermined the target LNS from DNIS. If the LNS is willinghas a connection toaccept tunnel creation without any authentication of the caller, the LAC may tunnelthe public Internet. A "virtual" PPP connectionwithout ever having communicated with the remote user. If a virtual dial-up serviceisnot required, standard access to the Internet may be provided. If no tunnel connection currently exists tothen created and thedesired LNS, one is initiated.local L2TPis designedLAC Client software creates a tunnel tobe largely insulated fromthedetails ofLNS. As in themedia over whichabove case, Addressing, Authentication, Authorization and Accounting will be provided by thetunnel is established;Home LAN's Management Domain. 3.0 Protocol Overview L2TPrequires only that the tunnel media provide packet oriented point-to-point connectivity. Obvious examplesutilizes two types ofsuch mediamessages, control messages and data messages. Control messages areUDP, Frame Relay PVC's, or X.25 VC's. Once the tunnel exists, an unused slot withinused in thetunnel, a "Call ID", is allocated,establishment, maintenance and clearing of tunnels and calls. Data messages are used to encapsulate PPP frames being carried over the tunnel. Control messages utilize aconnect indication is sentreliable Control Channel within L2TP tonotifyguarantee delivery (see section 5.1 for details). Data messages are not retransmitted when packet loss occurs. Townsley, et al. Standards Track [Page 8] INTERNET DRAFT L2TP February 1999 +-------------------+ | PPP Frames | +-------------------+ +-----------------------+ | L2TP Data Messages| | L2TP Control Messages | +-------------------+ +-----------------------+ | L2TP Data Channel | | L2TP Control Channel | | (unreliable) | | (reliable) | +------------------------------------------------+ | Packet Transport (UDP, FR, ATM, etc.) | +------------------------------------------------+ Figure 3.0 L2TP Protocol Structure Figure 3.0 depicts theLNSrelationship ofthis new dial-up session. The LNS either acceptsPPP frames and Control Messages over theconnection, or rejects it. Rejection MUST include a result conditionL2TP Control andMAY includeData Channels. PPP Frames are passed over anerror indication, which may be displayed to the dial-up user, afterunreliable Data Channel encapsulated first by an L2TP header and then a Packet Transport such as UDP, Frame Relay, ATM, etc. Control messages are sent over a reliable L2TP Control Channel which transmits packets in-band over thecall should be disconnected. The initial connect notification may include the authentication informationsame Packet Transport. Sequence numbers are required toallow the LNS to authenticate the userbe present in all control messages anddecideare used toaccept or declineprovide reliable delivery on theconnection. 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. If the LAC negotiated PPP LCP [1] before initiating the tunnel, the initial connect notification may also include a copy of the LCP CONFREQ's sent in each direction which completed LCP negotiation. The LNSControl Channel. Data Messages may usethis information to initialize its own PPP state (thus avoiding an additional LCP negotiation), or it may choose to initiate a new LCP CONFREQ exchange. Valencia expires June 1999 [Page 8] INTERNET DRAFT October 1998 If the LNS accepts the connection, it creates a "virtual interface" for PPP in a manner analogoussequence numbers towhat 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 userreorder packets and detect lost packets. All values arereceived at the POP, stripped of CRC, link framing,placed into their respective fields andtransparency bytes, encapsulatedsent inL2TP, and forwarded over the appropriate tunnel. The LNS accepts these frames, strips L2TP, and processes them as normal incoming framesnetwork order (high order octets first). 3.1 L2TP Header Format L2TP packets for theappropriate interfacecontrol channel andprotocol. The "virtual interface" behaves very much likedata channel share ahardware interface, with the exception that the hardware in thiscommon header format. In each case where a field isphysically located at the ISP POP. The other direction behaves analogously, with the LNS encapsulating the packetoptional, its space does not exist inL2TP, and the LAC stripping L2TP before transmitting it outthephysical interface to the remote user. At this point,message if theconnectivityfield isa 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. Becausemarked not present. This 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|L|x|x|S|x|O|P|x|x|x|x| Ver | Length (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tunnel ID | Session ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ns (opt) | Nr (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Offset Size (opt) | Offset pad... (opt) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 3.1 L2TP Message Header Townsley, et al. Standards Track [Page 9] INTERNET DRAFT L2TP February 1999 The Type (T) bit indicates theremote user has become simply another dial-up clienttype ofthe LNS, client connectivity can now be managed using traditional mechanisms with respectmessage. It is set tofurther authorization, protocol access,0 for a data message andpacket filtering. Accounting can be performed at both1 for a control message. If theLAC as well asLength (L) bit is 1, theLNS.Length field is present. Thisdocument illustrates some Accounting techniques which are possible using L2TP, but the policies surrounding such Accounting are outside the scope of this specification. L2TP offers optional facilities which maximize compatibility with legacy client requirements; L2TP connect notificationsbit MUST be set to 1 forPPP clients can contain sufficient informationcontrol messages. The x bits are reserved foran LNSfuture extensions. All reserved bits MUST be set toauthenticate0 on outgoing messages andinitialize its LCP state machine. With these facilities,ignored on incoming messages. If theremote user need not be queried a second time for PPP authentication, nor undergo multiple rounds of LCP negotiation and convergence. These techniques are intendedSequence (S) bit is set tooptimize connection setup,1 the Ns and Nr fields arenot intendedpresent. The S bit MUST be set todeprecate any functions required by1 for control messages. If thePPP specification. 3.0 Service Model Issues There are several significant differences betweenOffset (O) bit is 1, thestandard Internet access serviceOffset Size field is present. The O bit MUST be set to 0 (zero) for control messages. If the Priority (P) bit is 1, this data message should receive preferential treatment in its local queuing and transmission. LCP echo requests used as a keepalive for theVirtual dial-up servicelink, for instance, should generally be sent withrespectthis bit set toauthentication, address allocation, authorization1. Without it, a temporary interval of local congestion could result in interference with keepalive messages andaccounting. The detailsunnecessary loss of thedifferences between these services andlink. This feature is only for use with data messages. The P bit MUST be set to 0 for all control messages. Ver MUST be 2, indicating theproblems presented by these differences areversion of the L2TP data message header describedbelow.in this document. Themechanisms used for Virtual Dial-up service are intendedvalue 1 is reserved tocoexistpermit detection of L2F [RFC2341] packets should they arrive intermixed with L2TP packets. Packets received withmore traditional mechanisms; it is intended thatanISP's POP can simultaneously service ISP clients as well as Virtual dial-up clients. Valencia expires June 1999 [Page 9] INTERNET DRAFT October 1998 3.1 Security Forunknown Ver field MUST be discarded. The Length field indicates theVirtual dial-up service,total length of theISP pursues authentication only tomessage in octets. Tunnel ID indicates theextent required to discoveridentifier for theuser'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 negotiation and initiation of PPP authentication. As soon as the apparent identity is determined, a call request to the LNS is initiated with any authentication information gatheredcontrol connection. L2TP tunnels are named bythe ISP. If the LNS receives proxy authentication information (see section 6.11), it SHOULD assumeidentifiers that have local significance only. That is, thePPP peer is in the authentication phase, awaiting an indicationsame tunnel will be given different Tunnel IDs by each end ofsuccess or failure. The LNS completestheauthentication by either acceptingtunnel. Tunnel ID in each message is that of thecall, or rejecting it. The LNS may need to protect against attempts by third parties to establish tunnels tointended recipient, not theLNS.sender. Tunnelestablishment can include authentication to protect against such attacks. 3.2 Address Allocation For a traditional Internet service,IDs are selected and exchanged as Assigned Tunnel ID AVPs during theuser typically accepts thatcreation of a tunnel. Session ID indicates theIP address may be allocated dynamically fromidentifier for apool of ISP addresses. This model often meanssession within a tunnel. L2TP sessions are named by identifiers that have local significance only. That is, theremote user has little or no access to their home network's resources, due to firewalls and other security policies appliedsame session will be given different Session IDs by each end of thehome 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,session. Session ID infact, can be RFC 1918 addresses, or non-IP addresses). Because L2TP tunnels exclusively ateach message is that of theframe layer,intended recipient, not theactual policies of such address managementsender. Session IDs areirrelevant to correct Virtual dial-up service; for all purposesselected and exchanged as Assigned Session ID AVPs during the creation ofPPP protocol handling, the dial-in user appears to have connected at the LNS. 3.3 Authentication The authentication of the user occurs in three phases;a session. Ns indicates thefirstsequence number for this data or control message, Townsley, et al. Standards Track [Page 10] INTERNET DRAFT L2TP February 1999 beginning atthe ISP,zero andthe secondincrementing by one (modulo 2**16) for each message sent. See Section 5.8 andoptional third at5.4 for more information on using this field. Nr indicates theLNS. The ISP uses DNIS, CLID, or a username to determine that a Virtual dial-up service is required and initiatessequence number expected in thetunnel connectionnext control message tothe appropriate LNS. Once a tunnelbe received. Thus, Nr isestablished, The ISP NAS allocates a new Call ID and initiates a session by forwardingset to thegathered authentication information. The LNS undertakesNs of thesecond phaselast in-order message received plus one (modulo 2**16). In data messages, Nr is reserved and, if present (as indicated bydeciding whether or not to acceptthecall. The call start indication may include CHAP, PAP, EAP, or textual authentication information. BasedS-bit), MUST be ignored upon receipt. See section 5.8 for more information on using thisinformation,field in control messages. The Offset Size field, if present, specifies theLNS may acceptnumber of octets past thecall request, or may reject it (for instance, it was a PAP request andL2TP header at which theusername/password are foundpayload data is expected tobe incorrect). Oncestart. Actual data within thecalloffset padding isaccepted,undefined. If theLNSoffset field isfree to pursue a third phase of Valencia expires June 1999 [Page 10] INTERNET DRAFT October 1998 authentication atpresent, thePPP layer. These activities are outsideL2TP header ends after thescopelast octet ofthis specification, but might include an additional cyclethe offset padding. 3.2 Control Message Types The Message Type AVP (see section 4.3.1) defines the type ofLCP authentication, proprietarymessage being sent. L2TP defines the following control message types: Control Connection Management 0 (reserved) 1 (SCCRQ) Start-Control-Connection-Request 2 (SCCRP) Start-Control-Connection-Reply 3 (SCCCN) Start-Control-Connection-Connected 4 (StopCCN) Stop-Control-Connection-Notification 5 (reserved) 6 (HELLO) Hello Call Management 7 (OCRQ) Outgoing-Call-Request 8 (OCRP) Outgoing-Call-Reply 9 (OCCN) Outgoing-Call-Connected 10 (ICRQ) Incoming-Call-Request 11 (ICRP) Incoming-Call-Reply 12 (ICCN) Incoming-Call-Connected 13 (reserved) 14 (CDN) Call-Disconnect-Notify Error Reporting 15 (WEN) WAN-Error-Notify Townsley, et al. Standards Track [Page 11] INTERNET DRAFT L2TP February 1999 PPPextensions, or textual challenges carried via a TCP/IP TELNET session. 3.4 Accounting It isSession Control 16 (SLI) Set-Link-Info 4.0 Control Message Attribute Value Pairs To maximize extensibility while still permitting interoperability, arequirement that both the LACuniform method for encoding message types andthe LNSbodies is used throughout L2TP. This encoding will becapabletermed AVP (Attribute-Value Pair) in the remainder ofproviding accounting data and hence both may count packets, octets and connection start and stop times. Since Virtual dial-upthis document. 4.1 AVP Format Each AVP isan access service, accounting of connection attempts (in particular, failed connection attempts)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| rsvd | Length | Vendor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Attribute Type | Attribute Value... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ [until Length isof significant interest.reached]... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheLNS can reject new connections based on the authentication information gathered byfirst six bits are a bit mask, describing theLAC, with corresponding logging. For cases wheregeneral attributes of theLNS acceptsAVP. Two bits are defined in this document, theconnection and then continuesremaining are reserved for future extensions. Reserved bits MUST be set to 0. An AVP received withfurther authentication, the LNS might subsequently disconnect the client. For such scenarios, the disconnection indication backa reserved bit set to 1 MUST be treated as an unrecognized AVP. Mandatory (M) bit: Controls theLAC may also include a reason. Becausebehavior required of an implementation which receives an AVP which it does not recognize. If theLNS can decline a connection basedM bit is set onthe authentication information collected by the LAC, accounting can easily draw a distinction betweenan unrecognized AVP within aseries of failed call attempts andmessage associated with aseries of brief successful connections. Lacking this facility,particular session, theLNS must always accept connection requests, and would need to exchange a number of PPP packetssession associated withthe remote system. Note that the LNS could usethisinformation to decide to acceptmessage MUST be terminated. If theconnection (which protects against most invalid connection attempts) while still insistingM bit is set onrunning its own CHAP authentication (for instance, to protect against CHAP replay attacks). 4.0 Protocol Overview There are two parallel components of L2TP operating overan unrecognized AVP within agiven tunnel: control messages between each LAC-LNS pair, and payload packets betweenmessage associated with thesame LAC-LNS pair. The latter are used to transport L2TP encapsulated PPP packets for useroverall tunnel, the entire tunnel (and all sessionsbetweenwithin) MUST be terminated. If thepair. Two fields important toM bit is not set, an unrecognized AVP MUST be ignored. Hidden (H) bit: Identifies theoperationhiding ofL2TP are the Nr (Next Received) and Ns (Next Sent) fields which are always presentdata incontrol messages, and are optionally present in payload packets. A single sequence number state is maintained for all control messages, and a distinct state is maintained forthepayloadAttribute Value field ofeach user session within the tunnel. The Sequence number starts at 0, Each subsequent packet is sent withan AVP. This capability can be used to avoid thenext incrementpassing ofthe sequence number. The sequence number is thus a free running counter represented modulo 65536. The sequence numbersensitive data, such as user passwords, as cleartext in an AVP. Section 4.2 describes theheader of a received packet is considered less than or equal toprocedure for performing AVP hiding. Length: Encodes thelast receivednumberif its value lies in the rangeof octets (including thelast received number and the preceeding 32767 values, inclusive. For example, if the last received sequence number was 15, then packets with sequence numbers 0 through 15, as well as 32753 through 65536, would be considered less than or equal to,Overall Length andwouldbitmask fields) contained in this AVP. The Length may besilently discarded. Valencia expires June 1999Townsley, et al. Standards Track [Page11]12] INTERNET DRAFTOctober 1998 Otherwise it would be accepted. In this document, the sequence number state for a control connection and each user session is represented for clarity in the following discussions by distinct pairs of state variables, Sr and Ss. Sr representsL2TP February 1999 calculated as 6 + thevaluelength of thenext in-sequence message expected to be received for a given session by a peer. Ss represents the sequence number to be placedAttribute Value field inthe Nsoctets. The fieldof the next message sent foritself is 10 bits, permitting agiven session by the sending peer. Each state is initialized such that the first message sent and the first message expected to be received for each session has an Ns valuemaximum of0. This corresponds to initializing Ss and Sr1023 octets of data inboth peers to 0 for each new session. As messages are sent foragiven session, Nr is set in these messages to reflect one more than the Ns valuesingle AVP. The minimum Length ofthe highest (modulo 2**16) in-order message received for that session; if sent before any packetan AVP isreceived Nr will be 0, indicating that6. If thepeer expectslength is 6, then thenext new NsAttribute Value field is absent. Vendor ID: The IANA assigned "SMI Network Management Private Enterprise Codes" [RFC1700] value. The valuereceived0, corresponding tobe 0. When a non-ZLB messageIETF adopted attribute values, isreceivedused for all AVPs defined within this document. Any vendor wishing to implement their own L2TP extensions can use their own Vendor ID along withan Ns valueprivate Attribute values, guaranteeing that they will not collide with any other vendor's extensions, nor with future IETF extensions. Note thatmatchesthere are 16 bits allocated for thesession's current Sr value, Sr is incremented by 1 (modulo 2**16). It is importantVendor ID, thus limiting this feature tonote that, for both control and payload sessions, Sr is not modified if a message is receivedthe first 65,535 enterprises. Attribute Type: A 2 octet value with avalue of Ns greater thanunique interpretation across all AVPs defined under a given Vendor ID. Attribute Value: This is thecurrent Sractual value(exceptions to this rule being the permitted handling of out-of-order payload packetsas indicated by the"simple receiver" discussed in Appendix CVendor ID andhandlingAttribute Type. It follows immediately after the Attribute Type field, and runs for the remaining octets indicated in the Length (i.e., Length minus 6 octets ofpayload packets withheader). This field is absent if theRLength is 6. 4.2 Hiding of AVP Attribute Values The H bitset). Forin thecontrol session, retransmissionheader ofoutgoing messages should eventually provideeach AVP provides a mechanism to indicate to the receiving peerwith the expected message. For payload sessions, however, lost messages are never retransmitted so a mechanism involvingwhether theusecontents of the"Reset Sr" (R bit) indicatorAVP are hidden or present inan outgoing message iscleartext. This feature can be used toupdate the peer's value of Sr tohide sensitive control message data such as user passwords or user IDs. The H bit MUST only be set if a shared secret exists between thevalue of Ns contained inLAC and LNS. The shared secret is themessage. See Sec. 4.2same secret that is used fordetails of this mechanism. Every timetunnel authentication (see Section 5.1.1). If the H bit is set in any AVP(s) in apeer sendsgiven control message, anon-ZLBRandom Vector AVP must also be present in the messageit increments its corresponding Ss value for that session by 1 (modulo 2**16). This increment takes place afterand MUST precede thecurrent Ssfirst AVP having an H bit of 1. Hiding an AVP value iscopied to Nsdone inthe messageseveral steps. The first step is tobe sent. Outgoing messages always includetake thecurrentlength and value fields ofSr for the corresponding session in their Nr field. A message (control or payload) with a zero-length body indicates thatthepacket is only used to communicate Nroriginal (cleartext) AVP andNs fields. The Nr and Ns fields are filled inencode them into a Hidden AVP Subformat asabove, butfollows: Townsley, et al. Standards Track [Page 13] INTERNET DRAFT L2TP February 1999 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length of Original Value | Original Attribute Value ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... | Padding ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Length of Original Attribute Value: This is length of thesequence number state, Ss,Original Attribute Value to be obscured in octets. This isnot incremented. Thus a ZLB message sent after a non-ZLB message will contain a new Ns value while a non-ZLB message sent after a ZLB message will containnecessary to determine thesame valueoriginal length ofNs asthepreceding zero-Attribute Value which is lost when the additional Padding is added. Original Attribute Value: Attribute Value that is to be obscured. Padding: Random additional octets used to obscure lengthmessage. Unlessof theRbit (Reset Sr)Attribute Value that isset, a peer receiving a zero-length message does not update its Sr variable. Upon receiptbeing hidden. To mask the size ofan in-order non-ZLB message,thereceiving peer must acknowledgedata being hidden, themessage by sending backresulting subformat MAY be padded as shown above. Padding does NOT alter theupdatedvalueof Srplaced in theNr fieldLength of Original Attribute Value field, but does alter thenext outgoing message. This updated Sr value can be piggybacked in the Nr fieldlength ofany non-ZLB outgoing messages thatthepeer may happen to send back. Valencia expires June 1999 [Page 12] INTERNET DRAFT October 1998resultant AVP that is being created. For example, Ifthe peer does not have a messagean Attribute Value totransmit for a short periodbe hidden is 4 octets in length, the unhidden AVP length would be 10 octets (6 + Attribute Value length). After hiding, the length oftime after receiving a non-ZLB message then it should send a ZLB message containingthelatest valuesAVP will become 6 + Attribute Value length + size ofSr and Ss, as described above.the Length of Original Attribute Value field + Padding. Thus, if Padding is 12 octects, the AVP length will be 6 + 4 + 2 + 12 = 24 octets. Next, An MD5 hash is performed on the concatenation of: + the 2 octet Attribute number of the AVP + the shared secret + an arbitrary length random vector Thesuggestedvalueforof the random vector used in thistime intervalhash is1/4passed in thereceiving peer'svalue field ofRound-Trip-Time (RTT - see Appendix A), if it computes RTT, oramaximum of 1/2 of its fixed timeout interval otherwise.Random Vector AVP. Thistimeout should provide a reasonable opportunity forRandom Vector AVP must be placed in thereceiving peer to obtain a payloadmessagedestined for its peer, upon which the ACK ofby thereceived message can be piggybacked. This timeout value shouldsender before any hidden AVPs. The same random vector may betreated as a suggested maximum; an implementation could make this timeout quite small without adversely affectingused for more than one hidden AVP in theprotocol. To providesame message. If a different random vector is used forbetter throughput,thereceiving peer should skip this timeout entirely and sendhiding of subsequent AVPs then aZLB message immediatelynew Random Vector AVP must be placed in thecase where its receive window fills and it has no queued datacommand message before the first AVP tosend for this connection orwhich itcan't send queued data because the transmit windowapplies. The MD5 hash value isclosed. A suggested implementationthen XORed with the first 16 octet (or less) segment ofthis timer is as follows: Upon receiving a non-ZLB message,thereceiver starts a timer that will expireHidden AVP Subformat and placed in therecommended time interval. A variable, Lr (Last Nr value sent),Attribute Value field of the Hidden AVP. If the Hidden AVP Subformat isused byless than 16 octets, the Subformat is transformed as if thetransmitterAttribute Value field had been padded tostore16 octets before thelast value sentXOR, but only the actual Townsley, et al. Standards Track [Page 14] INTERNET DRAFT L2TP February 1999 octets present in theNr field of a transmitted payload message for this connection. Upon expirationSubformat are modified, and the length ofthis timer, Srthe AVP iscompared to Lr and, if they arenotequal,altered. If the Subformat is longer than 16 octets, aZLB ACKsecond one-way MD5 hash isissued. If they are equal, then no ACK's are outstanding and no action needs to be taken. This timer should not be reinitialized ifcalculated over anew messagestream of octets consisting of the shared secret followed by the result of the first XOR. That hash isreceived while itXORed with the second 16 octet (or less) segment of the Subformat and placed in the corresponding octets of the Value field of the Hidden AVP. If necessary, this operation isactive since such messages will be acknowledged whenrepeated, with thetimer expires. This ensures that periodic ACK's are issuedshared secret used along witha maximum period equaleach XOR result to generate therecommended timeout interval. This interval should be short enoughnext hash tonot cause false acknowledgment timeouts atXOR thetransmitter when payload messages are being sent in one direction only. Since such ACK's are being sent on what would otherwise be an idle data path, their affect on performance should be small, if not negligible. See Appendix E for some examplesnext segment ofhow sequence numbers progress. 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 overthesame tunnel which will be used to forward payload data once L2TP call control and management information have been passed.value with. Thecontrol messages are responsible for establishment, management, and release of sessions carried through the tunnel, as well as status onhiding method was adapted from RFC 2138 [RFC2138] which was taken from from thetunnel itself. It is"Mixing in themeans by which an LNS is notified of an incoming call at an associated LAC, as well asPlaintext" section in themeansbook "Network Security" bywhich an LAC is instructed to place an outgoing call.Kaufman, Perlman and Speciner [KPS]. Atunnel may be established by either an LAC (for incoming calls) or an LNS (for outgoing calls). Following the establishmentdetailed explanation ofValencia expires June 1999 [Page 13] INTERNET DRAFT October 1998thetunnel,method follows: Call theLNS and LAC configureshared secret S, thetunnel by exchanging Start-Control-Connection-RequestRandom Vector RV, and-Reply messages. These messages are also used to exchange information about basic operating capabilities oftheLAC and LNS. OnceAttribute Value AV. Break thecontrol message exchange is complete,value field into 16-octet chunks p1, p2, etc. with theLAC may initiate sessions by indicating inbound requests, orlast one padded at theLNS by requesting outbound calls. If both ends of the tunnel have the ability to act as an LAC and LNS concurrently, then nothing prohibits establishing incoming or outgoing calls from both sides of the same tunnel. Control messages may indicate changes in operating characteristics of an individual user sessionend with random data to aSet-Link-Info message. Individual sessions may be released by either16-octet boundary. Call theLAC or LNS,ciphertext blocks c(1), c(2), etc. We will alsothrough control messages. Independent Call IDdefine intermediate valuesare established for each end of a user session.b1, b2, etc. b1 = MD5(AV + S + RV) c(1) = p1 xor b1 b2 = MD5(S + c(1)) c(2) = p2 xor b2 . . . . . . bi = MD5(S + c(i-1)) c(i) = pi xor bi Thesender of a packet associated with a particular session placesString will contain c(1)+c(2)+...+c(i) where + denotes concatenation. On receipt, theCall ID established by its peerrandom vector is taken from the last Random Vector AVP encountered in theCall ID header field of all outgoing packets. Formessage prior to thecases whereAVP to be unhidden. The above process is then reversed to yield the original value. 4.3 AVP Summary The following sections contain aCall ID has not yet been assigned fromlist of all L2TP AVPs defined in this document. Following thepeer (i.e., during call establishmentname ofa new session),theCall ID fieldAVP issent as 0, and further fields withina list indicating the messageare used to identifytypes that utilize each AVP. After each AVP title follows a short description of thesession. The Call ID valuepurpose of0 is thus specialthe AVP, a detail (including a graphic) of the format for the Attribute Value, andMUST NOT be used as an Assigned Call ID. A mechanismany additional information needed fordetectionproper use oftunnel connectivity problems is provided bythereliable transport layer of L2TP. The transport layer ofavp. Townsley, et al. Standards Track [Page 15] INTERNET DRAFT L2TPperforms control message retransmission. IfFebruary 1999 4.3.1 AVPs Applicable To All Control Messages Message Type (All Messages) The Message Type AVP, Attribute Type 0, identifies thenumber of retransmission attempts for a givencontrol messageexceeds a configured maximum value,herein and defines thetunnel is reset. This retransmission mechanism existscontext inbothwhich theLNS and LAC endsexact meaning of thetunnel. A keepalive mechanismfollowing AVPs will be determined. The Attribute Value field for this AVP has the following format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type isemployed bya 2 octet unsigned integer. The Message Type AVP MUST be theL2TP higher layerfirst AVP inorder to differentiate tunnel outages from extended periods of no control or data activity onatunnel. This is accomplished bymessage, immediately following thehigher layer injecting Hellocontrolmessages intomessage header (defined in section 3.1). See Section 3.2 for thecontrol stream after a specified periodlist oftime elapses since the last data ordefined control messagewas received on the tunnel. As for any other control message, iftypes and their identifiers. The Mandatory (M) bit within thetransport does not receiveMessage Type AVP has special meaning. Rather than anACK forindication as to whether theHello message afterAVP itself should be ignored if not recognized, it is an indication as to whether thenormal number of retransmissionscontrol message itself should be ignored. Thus, if thetunnelM-bit isdeclared downset within the Message Type AVP andis reset. The transport layer reset mechanism along withtheinjection of Hello messages ensures that a connectivity failure betweenMessage Type is unknown to theLNS andimplementation, theLAC will be detected at both ends of atunnelin a timely manner. ItMUST be cleared. If the M-bit isintended that control messages will also carry management related information innot set, then thefuture, such as aimplementation may ignore an unknown messageallowing the LNStype. The M-bit MUST be set torequest the status of a given LAC; these1 for all message typesare notdefined in this document.4.2 Payload Packet Overview Once a tunnel is established and control messages have completed tunnel setup, the tunnel canThis AVP may not beused to carry user session PPP Valencia expires June 1999 [Page 14] INTERNET DRAFT October 1998 packets for sessions involving a given LNS-LAC pair.hidden (the H-bit MUST be 0). The"Call ID" field in the L2TP header indicates to which session a particular PPP packet belongs. InLength of thismanner, PPP packets are multiplexed and demultiplexed over a single tunnel between a given LNS-LAC pair.AVP is 8. Random Vector (All Messages) The"Call ID" field valueRandom Vector AVP, Attribute Type 36, isestablished duringused to enable theexchangehiding ofcall setup control 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 session, andthetunnel media has specific QOS attributes dedicated to a given user. L2TP provides a tunnel identifier so that individual tunnels canAttribute Value of arbitrary AVPs. The Attribute Value field for this AVP has the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Random Octet String ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Random Octet String may beidentified, even when arriving fromof arbitrary length, although asingle source LAC or LNS. TheTownsley, et al. Standards Track [Page 16] INTERNET DRAFT L2TPheader alsoFebruary 1999 random vector of at least 16 octets is recommended. The string containsoptional acknowledgment and sequencing information that can be used to provide flow-control acrosstheunderlying medium (which may be an internetwork) as well as congestion controlrandom vector for use in computing thenetwork itself (see section 4.3). In this document, these mechanisms will be referred to collectively as "flow control". Control messages are used to determine rate and buffering parameters that are usedMD5 hash toregulateretrieve or hide theflowAttribute Value ofPPP packets foraparticular session over the tunnel. The receiving peer indicates whether flow control is to be performed for payload packets sent to it. Ifhidden AVP (see Section 4.2). More than one Random Vector AVP may appear in apeer issuesmessage, in which case aReceive Window Sizehidden AVPwith a non-zero value during session establishment, thenuses thesending peerRandom Vector AVP most closely preceeding it. This AVP MUSTabide byprecede theindicated window size value as long as sequence numbers are provided. If a receiving peer does not wish to flow control the payload packets sent to it, it should not issue the Receive Window Size AVP with a non-zero value. Issuing a Receive Window Sizefirst AVP witha zero value has special significance. It indicates that the receiver does not want to perform flow-control but it does want the sending peer to provide Ns values in payload packets so that it can detect lost packets or packets received out of order. A peer SHOULD NOT send ZLB ACK's when its advertised Receive Window is zero or not present (flow control is not requested). In the case where neither peer issues a Receive Window Size AVP during session establishment,theoptional Nr and Ns fields are absent in all payload packetsH bit set. The M-bit forthat session. In the case where either peer wishes to perform flow-control orthis AVP MUST be set todetect out-of- order receive messages (as indicated by the sending of the Receive Window Size1. This AVPwith non-zero or zero value, respectively) the Nr and Ns fieldsMUST NOT bepresent in payload packets sent by both peers. A proper Ns value starts at 0 and increments by one for each transmitted payload message and a proper Nr valuehidden (the H-bit MUST be 0). The Length of this AVP is 6 plus thecurrent valuelength of thereceive sequence number state variable, Sr. See Appendix F for a table detailing when to send sequence numbers with regard to the Receive Window AVP. Unless the LAC sends the Sequencing Required AVP (see section 6.7Random Octet String. 4.3.2 Result and6.8) in the ICCN or OCCN message,Error Codes Result Code (CDN, StopCCN) The Result Code AVP, Attribute Type 1, indicates theLNS hasreason for terminating theauthority to dynamically enable or disable sending of Ns/Nr and hence Valencia expires June 1999 [Page 15] INTERNET DRAFT October 1998 controlling the capability of loss detection, reordering and flowcontrolover the link. To disable sequence numbers, the LNS sends a packet withchannel or session. The Attribute Value field for this AVP has theF bit set tofollowing format: 0and Ns/Nr fields not present.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Result Code | Error Code (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Message (opt) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheLAC, upon receiving suchResult Code is adata packet, MUST process2 octet unsigned integer. The optional Error Code is a 2 octet unsigned integer. An optional Error Message can follow thepacket and discontinue inclusionError Code field. Presence ofNs/Nr fields in any subsequent data packets. Any packets which have been received by L2TP but are being held in queue for reordering SHOULD be flushed without waiting for an ACK from the peer (as if an R bit packet with Ns equal tothecurrent Sr value was received). Ss and Sr should be updatedError Code andsaved accordingly. All data packets will continue to be exchanged without sequence numbers until the end of the session or until the LNS resumes sequence numbersMessage are indicated bysending a packet withtheF bit set and Ns/Nr present.AVP Length field. TheLAC, upon receiving a packetError Message contains an arbitrary string providing further (human readable) text associated with theF bit set, MUST resume sending sequence numberscondition. Human readable text infurther packets. In order to properly resume, the LNS and LACall error messages MUSTpreserve the state of Ss and Sr between periods of disabled sequencing. While the LNS may initiate disabling of sequencing at any time duringbe provided in thesession (includingUTF-8 charset using thefirst data packet sent), it is recommended thatDefault Language [RFC2277]. This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit forlinks where reordering or packet loss may occur, sequence numbers alwaysthis AVP MUST beenabled during the initial negotiation stages of PPP and disabled only when and if the riskset to 1. The Length isconsidered acceptable. For instance,8 ifthe PPP session being tunneledthere isnot utilizing any stateful compressionno Error Code orencryption protocols andMessage, 10 if there isonly carrying IP (as determined byan Error Code and no Error Message or 10 + theNCP's that are established), thenlength of theLNS might decide to disable sequencing, thus allowing higher level protocols to perform necessary flow control end to endError Message if there is an Error Code andreducingMessage. Defined Result Code values for theper packetStopCCN message are: Townsley, et al. Standards Track [Page 17] INTERNET DRAFT L2TPprocessing burden on the LNS substantially. Further discussion of some ofFebruary 1999 0 - Reserved 1 - General request to clear control connection 2 - General error--Error Code indicates thetradeoffs associated with disabling sequencing over media which may reorder or silently drop packets is given in section 8.2. 4.3 Flowproblem 3 - ControlIf a receiving peer offers a non-zero receive window sizechannel already exists 4 - Requester is not authorized to establish asending peer then the sending peer MUST abide by this window size value as long as sequence numbers are being exchanged (See Appendix F for details of when flowcontrolis enabled in relation to sending of the receive window AVP).channel 5 - Thesending peer MUST stop sending payload packets whenprotocol version of thewindowrequester isfull; i.e., x consecutive messages have been sent but havenotbeen acknowledged, where xsupported Error Code indicates highest version supported 6 - Requester is being shut down 7 - Finite State Machine error Defined Result Code values for thevalue of the Receive Window Size AVP. Implementors should take careCDN message are: 0 - Reserved 1 - Call disconnected due toavoid the situation whereloss ofan ACK by a sending peer with a full transmit window causes a sessioncarrier 2 - Call disconnected for the reason indicated in error code 3 - Call disconnected for administrative reasons 4 - Call failed due tohang forever,lack of appropriate facilities being available (temporary condition) 5 - Call failed due tothe fact there are no retransmissionslack ofpayload packets. Steps must be takenappropriate facilities being available (permanent condition) 6 - Invalid destination 7 - Call failed due toreopen the transmit window (at leastno carrier detected 8 - Call failed due toa value of 1) upon expirationdetection ofan ACK wait timeout. See Appendix B for more details. When sendinga busy signal 9 - Call failed due to lack of apeerdial tone 10 - Call was not established within time allotted by LAC 11 - Call was connected but no appropriate framing was detected The Error Codes defined below pertain to types of errors thathas issued a non-zero receive window size, the sending peer is responsible for resetting the receiver's Sr value when a sent payloadare not specific to any particular L2TP request, but rather to protocol or messageis lost during transmission. Valencia expires June 1999 [Page 16] INTERNET DRAFT October 1998 Whenformat errors. If an L2TP reply indicates in its Result Code that asent message is lost, the receiving peer's Sr value (and hence the Nr value it sends) will "stick" atgeneral error occurred, theNsGeneral Error valueofshould be examined to determine what thefirst missing payload message.error was. The"Reset Sr" (R bit) in the payload message header (see Section 5.3) provides a mechanismcurrently defined General Error codes and their meanings are: 0 - No general error 1 - No control connection exists yet for this LAC-LNS pair 2 - Length is wrong 3 - One of thesending peer to indicatefield values was out of range or reserved field was non-zero 4 - Insufficient resources tothe receiver that it (the sending peer) recognizes that at least one payload message has been lost and that the receiving peer shouldhandle this operation nowreset its Sr value beyond5 - The Session ID is invalid in this context 6 - A generic vendor-specific error occurred in thelost message(s).LAC 7 - Try another. Ifthe sending peer is performing adaptive window adjustment (see Appendix B.1) then itLAC isthis recognitionaware ofa lost message that is used to indicate that a window adjustment at the sending peerother possible LNS destinations, it should try one of them. This can beperformed. The sender may use a timer mechanism similar to thatused toretransmit lost control messages to determine when transmitted payload packets have been lost. When the timer expires, a payload message (zero or non-zero length) with the R bit set can be issued to indicate toguide an LAC based on LNS policy, for instance, thereceiver that it needs to reset its Sr value. Upon receiptexistence of multilink PPP bundles. Townsley, et al. Standards Track [Page 18] INTERNET DRAFT L2TP February 1999 When apayload message with the R bit set, the receiver resets Sr to the valueGeneral Error Code ofNs contained in the message, or, if highly congested, to a value between its current value and6 is used, additional information about thevalue of Ns containederror SHOULD be included in themessage. Upon receipt of a payload message with R bit set, the receiver takesError Message field. 4.3.3 Control Connection Management AVPs Protocol Version (SCCRP, SCCRQ) The Protocol Version AVP, Attribute Type 2, indicates thefollowing actions: First,L2TP protocol version of thereceiver checkssender. The Attribute Value field for this AVP has thepresence of the R bit infollowing format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ver | Rev | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Ver field is areceived payload message before comparing1 octet unsigned integer containing themessage's Nsvalueto its Sr value. If the R bit1. Rev field isset, the receiver will typically set its Sr value equal to that of Ns contained in the message and fall througha 1 octet unsigned integer containing 0. This pertains tonormal receive message processing in which Sr will be incremented (modulo 2**16) if the messageL2TP protocol version 1, revision 0. Note this isnon-ZLB and will remainnot the sameif itversion number that isZLB. However, ifincluded in thereceiver is known to be heavily congested, it MAY choose to not update or set its new Sr value between (modulo 2**16) the current Sr value and thatheader ofNs contained in theeach message. Thiseffectively spoofs the transmitter into believing that the R bit packets that have been sent are not being received, ultimately causing the transmitter to backoff more quickly. In order to prevent an R bit message received out of order from setting Sr to an old value, the receiving peer should compare the value of Ns in an R bit messageAVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for this AVP MUST be set toits current value of Sr.1. Thereceiving peer should reset its Sr value only if Ns is greater than (modulo 2**16) its current valueLength ofSr.this AVP is 8. Framing Capabilities (SCCRP, SCCRQ) Thesender of the R bit can decide whether it wishes to advance the receiver's Sr value to the value just past the highest (modulo 2**16) Nr value received (the Ns value ofFraming Capabilities AVP, Attribute Type 3, provides themessage just past thatpeer with an indication of thefirst lost message) or to its current valuetypes ofSs. Resetting it toframing thatjust past the first lost message enables the sender to determine if other messages in the same transmit window were also lost. Setting it to the current Ss value of the sender treats losses of multiple messages in the same window the same as the loss of a single message. An implementation may use either,will be accepted ora combination of both methods. If the transmitter detects thatrequested by thereceiver is heavily congested, piggybackingsender. The Attribute Value field for this AVP has theR bit on data Valencia expires June 1999 [Page 17] INTERNET DRAFT October 1998 packets should be refrained in favor of a ZLB with the R bit setfollowing format: 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 forresetting the receiver's Sr. Itfuture framing type definitions |A|S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute Value field ispermissible forasending peer to set the R32-bit mask, with two bits defined. If bit(and hence reset the transmit window) in all transmitted payload packets as an indication that flow control has been disabled at the transmitter. Receipt of an RA is set, asynchronous framing is supported. If bit S is set, synchronous framing is supported. A peer MUST NOT request anexplicit indication to immediately flush all packets which might be in queue to PPP for processing. There are a number of tradeoffs as to precisely whenincoming or outgoing call with areceiver should decide to pass packets from L2TP to PPP, many dependent on what protocols are being carried by PPP. In general, packets should be declared lost and passed to PPP inFraming Type AVP specifying atimely enough manner so as tovalue notcause retransmissions by reliable higher layer protocols due to packets that are heldadvertised inqueue by l2tp. L2TP does not specifytheparticular timeout algorithmsFraming Capabilities AVP it received during control connection Townsley, et al. Standards Track [Page 19] INTERNET DRAFT L2TP February 1999 establishment. Attempts touse for flow control. Suggested algorithms fordo so will result in thedetermination of adaptive timeouts to recover from dropped datacall being rejected. This AVP may be hidden (the H-bit may be 0 oracknowledgments on the tunnel are included in Appendix A of this document. Additional examples for sequencing and flow control are included in Appendix E. 5.0 Message Format and Protocol Extensibility L2TP defines a set of control messages sent in packets over the tunnel between an LNS and a given LAC.1). Theexact techniqueM-bit forinitiating a tunnel between an LNS-LAC pair is specificthis AVP MUST be set tothe tunnel media, and specific media are described in section 8.0. Once media-level connectivity1. The Length (before hiding) isreached, L2TP message formats define10. Bearer Capabilities (SCCRP, SCCRQ) The Bearer Capabilities AVP, Attribute Type 4, provides theprotocol forpeer with anLAC and LNS to manage the tunnel and its associated sessions. In each case where a field is optional, ifindication of thefield is not present, its space does not exist inbearer device types supported by thepacket. Existing fields are placed back-to-back to formhardware interfaces of thepacket. 5.1 AVP To maximize extensibility while still permitting interoperability, a uniform methodsender forencoding message types and bodies is used throughout L2TP. This encoding will be termed an AVP (Attribute-outgoing calls. The Attribute ValuePair) in the remainder offield for thisdocument. EachAVPis encoded as: Valencia expires June 1999 [Page 18] INTERNET DRAFT October 1998has the following format: 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 | Value...| Reserved for future bearer type definitions |A|D| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| [until Overall LengthThis isreached]... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The first six bits areabit32-bit mask,describing the general attributes of the AVP. The 0 bits indicate reserved bit fields and MUST be set to 0. An AVP receivedwitha reservedtwo bits defined. If bitset to 1 MUST be treated as an unrecognized AVP, unless the reserved bit is defined for an extension thatA isknown to the implementation. The M bit, known as the "mandatory" bit, controls the behavior required of an implementation which receives an AVP which it does not recognize. If Mset, analog access isset on an unrecognized AVP associated with call (session) management, any session associated with this AVP MUST be terminated.supported. IfMbit D isset on an unrecognized AVP associated with the overall tunnel, the entire tunnel (and all sessions within) MUST be terminated. If Mset, digital access is supported. An LNS should notset,request anunrecognized AVP MUST be ignored. The H bit, known asoutgoing call specifying a value in the"hidden" bit, controlsBearer Type AVP for a device type not advertised in thehiding ofBearer Capabilities AVP it received from thedataLAC during control connection establishment. Attempts to do so will result in thevalue field of an AVP.call being rejected. Thiscapability canAVP MUST beused to avoidpresent if thepassing of sensitive data, such as user passwords,sender can place outgoing calls when requested. Note that an LNS that cannot act ascleartext inanAVP. Section 5.7 describes the procedureLAC as well will not support hardware devices forperforming AVP value hiding. Overall Length encodeshandling incoming and outgoing calls and should therefore set thenumberA and D bits ofoctets (including the Overall Length field itself) contained inthisAVP. It is 10 bits, permitting a maximum of 1023 octets of data in a single AVP. Vendor ID is the IANA assigned "SMI Network Management Private Enterprise Codes" [12] 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 wishingAVP toimplement L2TP extensions can use their own Vendor ID along with private Attribute values, guaranteeing that they will0, or should notcollide with any other vendor's extensions, nor with future IETF extensions. Note that there are 16 bits allocated for various organizations to design and define non-standard attributes. This limitssend theability to define new proprietaryAVPimplementations to the first 65,535 enterprises. Attributeat all. An LNS that can also act as an LAC and place outgoing calls should set A or D as appropriate. Presence of this message isthe actual attribute, a 16-bit value specified in network byte order withnot aunique interpretation across all AVP's defined underguarantee that a givenVendor ID. Value follows immediately after the Attribute field, and runs for Valencia expires June 1999 [Page 19] INTERNET DRAFT October 1998outgoing call will be placed by theremaining octets indicated insender if requested, just that theOverall Length (i.e., Overall Length minus six octets of header). AVP's shouldphysical capability exists. This AVP may bekept compact; the combined AVP's within a control messagehidden (the H-bit may be 0 or 1). The M-bit for this AVP MUSTNOT ever cause a control message's total lengthbe set toexceed 1500 octets in length. 5.2 Control Message Format Each1. The Length (before hiding) is 10. Tie Breaker (SCCRQ) The Tie Breaker AVP, Attribute Type 5, indicates that the sender Townsley, et al. Standards Track [Page 20] INTERNET DRAFT L2TPcontrol message begins withFebruary 1999 wishes a12 octet header portion followed by an 8 octet Message Typesingle tunnel to exist between the given LAC-LNS pair. The Attribute Value field for this AVPand zero or more AVP's. This header is formatted:has the following format: 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|0|0|F|0|0|0|0|0|0|0|0| Ver | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tunnel ID | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ns | Nr | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Message Type AVP...Tie Break Value... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... (8 octets)...(64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The0 bits indicate reserved bit fields and MUST be set to 0. A control message received with a reserved bit set to 1 in the header MUST be treated as an unrecognized control message, unless the bitTie Breaker Value isdefined foranextension8 octet value that isknownused tothe implementation. The Lchoose a single tunnel where both LAC andF bitsLNS request a tunnel concurrently. The recipient of a SCCRQ mustbe 1, indicating thatcheck to see if a SCCRQ has been sent to thelength, Nspeer, andNr fields are present.if so, must compare its Tie Breaker value with the received one. TheT bit MUST be 1, indicating a control message. Verlower value "wins", and the "loser" MUSTbesilently discard its tunnel. In thevalue 2, indicatingcase where aversion 1 L2TP message (the value 1tie breaker isreserved to permit detection of L2F [2] packets should they arrive intermixed,present on both sides, and the value0isundefined). Lengthequal, both sides MUST discard their tunnels. If a tie breaker is received, and an outstanding SCCRQ had no tie breaker value, theoverall length of the message specified in network byte order. Calculation of the length includesinitiator which included theL2TP header, message type AVP, plus any additional AVP's associated with a given control message type. Tunnel ID and Call ID identify the tunnel and user session within the tunnel to which a control message applies.Tie Breaker AVP "wins". If neither side issues acontrol message does not apply to a single user session within the tunnel (for instance, a Stop-Control-Connection-Notification message), Call IDtie breaker, then two separate tunnels are opened. This AVP MUST NOT beset to 0. If an Assigned Tunnel ID has not yet been received from the peer, Tunnel IDhidden (the H-bit MUST beset to 0. Once an Assigned Tunnel ID is received, all further packets0). The M-bit for this AVP MUST besent Valencia expires June 1999 [Page 20] INTERNET DRAFT October 1998 with Tunnel IDset tothe indicated value. Note that the Assigned Tunnel ID and Call ID SHOULD be selected in an unpredictable manner rather than sequentially or otherwise. Doing so will help to deter hijacking0. The Length ofa session by a malicious user who does not have access to packet traces between the LAC and LNS. Nsthis AVP iscopied from the send sequence number state variable, Ss, at14. Firmware Revision (SCCRP, SCCRQ) The Firmware Revision AVP, Attribute Type 6, indicates thetimefirmware revision of themessage is transmitted. Ss is incremented after copying ifissuing device. The Attribute Value field for this AVP has thecontrol messagefollowing format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Firmware Revision | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Firmware Revision is a 2 octet unsigned integer encoded in a vendor specific format. For devices which do not have aZLB ACK. Nr is copied from the receive sequence number state variable, Sr, and indicatesfirmware revision (general purpose computers running L2TP software modules, for instance), thesequence number, Ns, + 1revision of thehighest (modulo 2**16) in- sequence message received. See section 4.0. 5.3 Payload Message Format PPP payload packets tunneled within L2TP have a smaller encapsulation than theL2TPcontrol message header, reducing overhead ofsoftware module may be reported instead. Townsley, et al. Standards Track [Page 21] INTERNET DRAFT L2TPduring the life of a tunneled PPP session.February 1999 This AVP may be hidden (the H-bit may be 0 or 1). TheLNS is expected toM-bit for this AVP MUST beableset toprocess user data packets0. The Length (before hiding) is 8. Host Name (SCCRP, SCCRQ) The Host Name AVP, Attribute Type 7, indicates the name ofat leastthedefault MRU for PPP, not including L2TP and media encapsulation.issuing LAC or LNS. TheL2TP header has an optional paddingAttribute Value fieldto allowforalignment correction if desired. The smallest L2TP encapsulation is 6 octets;this AVP has thelargest is 14 octets (plus padding octets, if present). See section 8.1 for further MTU considerations.following format: 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|R|0|F|0|S|P|0|0|0|0|0| Ver | Length (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tunnel ID | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ns (opt) | Nr (opt) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Offset Size (opt) | Offset pad... (opt)| Host Name ... (arbitrary number of octets) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The0 bits indicate reserved bit fields andHost Name is of arbitrary length, but MUST beset to 0. A packet received with a reserved bit set toat least 1 octet. This name should be as broadly unique as possible; for hosts participating inthe payload message headerDNS [RFC1034], a hostname with fully qualified domain would be appropriate. This AVP MUST NOT besilently discarded, unless the bit is defined for an extension that is known to the implementation. The T bithidden (the H-bit MUST be0, indicating payload. Ver0). The M-bit for this AVP MUST be2, indicating version 1 of the L2TP protocol. If the L bit is set, theset to 1. The Lengthfieldof this AVP ispresent, indicating6 plus thetotallength of thepacket sent.Host Name. Vendor Name (SCCRP, SCCRQ) TheR bit, "Reset Sr", is used for flow control and indicates that the receiver SHOULD reset its receive state variable, Sr, for this session to the value contained inVendor Name AVP, Attribute Type 8, contains a vendor specific (possibly human readable) string describing theNs fieldtype of LAC or LNS being used. The Attribute Value field for thismessage header. Sr is reset toAVP has thevaluefollowing format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Vendor Name ...(arbitrary number ofNs only if Nsoctets) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Vendor Name isgreater than Valencia expires June 1999 [Page 21] INTERNET DRAFT October 1998 (modulo 2**16)thereceiver's current value of Sr. Normal receive processingindicated number of octets representing themessage is performed aftervendor string. Human readable text for this AVP MUST be provided in thevalue of Sr is reset. Note that ifUTF-8 charset using theF bit is not set, thenDefault Language [RFC2277]. This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for thisbitAVP MUST be set to 0.See section 4.2 for a detailed discussionThe Length (before hiding) of this AVP is 6 plus theuselength ofthis bit for flow control on the data channel. See Appendix E for examples of proper R bit usage. IftheF bit is set, bothVendor Name. Townsley, et al. Standards Track [Page 22] INTERNET DRAFT L2TP February 1999 Assigned Tunnel ID (SCCRP, SCCRQ, StopCCN) The Assigned Tunnel ID AVP, Attribute Type 9, in theNrSCCRQ andNs fieldsSCCRP messages specifies the Tunnel ID which the receiving peer MUSTbe present. Ns indicatesuse in thesequence numberTunnel ID field of all subsequent messages. The Attribute Value field for this AVP has thepacket being sent.following format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Tunnel ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheNs value of a message being transmittedAssigned Tunnel ID iscopied from the current value of the send sequence number state variable, Ss. Ssa 2 octet non-zero unsigned integer. The Assigned Tunnel ID AVP isincremented by one (modulo 2**16) after copyingused to multiplex and demultiplex multiple tunnels between theNs field only ifLNS and LAC. Before themessage being sentAssigned Tunnel ID AVP isnotreceived from aZLB ACK. Nr indicates the sequence number of the next in-order message sequence number topeer, messages MUST bereceived (if the last in-order non-ZLB data packet had Ns set to 1, the Nrsentback would be 2). Theto that peer with a Tunnel ID value ofNr is copied from0 in thecurrent receive state variable, Sr. Together, Nr and Ns can be used to handle out-of-order packets and, together withheader of all control messages. In theR bit, to provide flowStopCCN controlformessage, theconnection. An L2TP peer settingAssigned Tunnel ID AVP MUST be theF bit, and placing Nr and Ns fields in its messages, MUST have previously received or sent a Receive Window Size AVP during establishment of the session. The Nr and Ns fields are present and updatedsame asdescribed in section 4.0 if either side has specified an intention to do payload flow control. The Offset Size field is present if the S bit is set intheheader flags. This field specifiesAssigned Tunnel ID AVP first sent to thenumber of octets pastreceiving peer, permitting theL2TP header at whichpeer to identify thepayload dataappropriate tunnel even if StopCCN isexpected to start. Itsent before an Assigned Tunnel ID AVP isrecommended that data thus skippedreceived. This AVP may beinitializedhidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST be set to0's. If Offset Size1. The Length (before hiding) of this AVP is0, or8. Receive Window Size (SCCRQ, SCCRP) The Receive Window Size AVP, Attribute Type 10, specifies theS bit is not set,receive window size being offered to thefirst octet followingremote peer. The Attribute Value field for this AVP has thelast octet of L2TP headerfollowing format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Window Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Window Size isthe firsta 2 octetof payload data.unsigned integer. If absent, theP bit is set, this packet should receive preferential treatment at the LAC in its queuing for transmission to the client. LCP echo requests used aspeer must assume akeepaliveWindow Size of 4 for its transmit window. The remote peer may send thelink, for instance, should generally be sent from the LNS with this bit set. Without it, a temporary interval of congestionspecified number ofthe transmission queues could result in the interference with keepaliveTownsley, et al. Standards Track [Page 23] INTERNET DRAFT L2TP February 1999 control messagesand unnecessary loss of the link. 5.4 Control Message Types Control message and AVP types defined in this specification exist under Vendor ID 0, indicating IETF defined behavior. The actual message and AVP semantics are defined in the next section.before it must wait for an acknowledgment. Thissection includes tables that summarize all currently defined message andAVPtypes. Note that while anMUST NOT be hidden (the H-bit MUST be 0). The M-bit for this AVPmay legally occur under more than one typeMUST be set to 0. The Length ofcontrol message, an AVP's specific interpretationthis AVP isunique to the specific control message. Each message type entry in the table below indicates:8. Challenge (SCCRP, SCCRQ) The Challenge AVP, Attribute Type 11, indicates that theinteger value assignedissuing peer wishes to authenticate themessage type; the message type abbreviation Valencia expires June 1999 [Page 22] INTERNET DRAFT October 1998 used in the AVP Summary Table of Sec. 5.5; and the full name of the message type.tunnel endpoints using a CHAP- style authentication mechanism. Theinteger value assigned to each message type is placed in theAttribute Value fieldof the Message Type AVP. Thisfor this AVPMUST behas thefirst AVP in a message. The currently defined control message types, grouped by function, are: Control Connection Managementfollowing format: 0 1 2 3 0 1(SCCRQ) Start-Control-Connection-Request2(SCCRP) Start-Control-Connection-Reply3(SCCCN) Start-Control-Connection-Connected4(StopCCN) Stop-Control-Connection-Notification5(reserved)6Hello Call Management7(OCRQ) Outgoing-Call-Request8(OCRP) Outgoing-Call-Reply9(OCCN) Outgoing-Call-Connected 10 (ICRQ) Incoming-Call-Request 11 (ICRP) Incoming-Call-Reply 12 (ICCN) Incoming-Call-Connected 13 (reserved) 14 (CDN) Call-Disconnect-Notify Error Reporting 15 (WEN) WAN-Error-Notify PPP Session Control 16 (SLI) Set-Link-Info 5.5 AVP Summary The following table lists all standard L2TP attributes currently defined. The "Attr" column indicates the integer value assigned to this attribute. The "M" column indicates the setting0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Challenge ... (arbitrary number ofthe "Mandatory" bitoctets) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Challenge is one or more octets oftherandom data. This AVPheadermay be hidden (the H-bit may be 0 or 1). The M-bit foreach attribute.this AVP MUST be set to 1. The"Len" field indicates the sizeLength (before hiding) ofthe AVP including the AVP header. A "+" inthiscolumn indicates that the length varies depending uponAVP is 6 plus the length of theactual contents of the value field.Challenge. Challenge Response (SCCCN, SCCRP) The"(usage)" listResponse AVP, Attribute Type 13, provides a response to a challenge received. The Attribute Value field foreach entry indicates the message types that utilize eachthis AVP(See command table of Sec. 5.4). An abbreviation shown in mixed or upper case letters indicates thathas thecorrespondingfollowing format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Response ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... (16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Response is a 16 octet value reflecting the CHAP-style [RFC1994] response to the challenge. This AVP MUST be present inthis message type; All lower case indicates that the AVP may optionally appear in this message type. Some AVPs MUST be present only whenan SCCRP or SCCCN if acorresponding optional AVP is present, these AVPs are shown in lower case as well. Valencia expires June 1999challenge was Townsley, et al. Standards Track [Page23]24] INTERNET DRAFTOctober 1998 A brief summary ofL2TP February 1999 received in thetype and contentspreceeding SCCRQ or SCCRP. For purposes of the ID valuefield for each attribute is also given for each entry. Refer to the individual message type descriptions that appearinSection 6 for further details abouttheuseCHAP response calculation, the value ofa particularthe Message Type AVPin a particularfor this messagetype. This tableisprovided only as a convenient overview of AVPs, individual messageused (e.g. 2 for an SCCRP, and 3 for an SCCCN). This AVPdescriptions always enjoy prioritymay be hidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST be set tosummary descriptions provided in1. The Length (before hiding) of thistable. Attr M LenAVP is 22. 4.3.4 Call Management AVPs Q.931 Cause Code (CDN) The Q.931 Cause Code AVP, AttributeName (usage) 0 1 8 MessageType(ALL MESSAGES) 16-bit integer value indicating the message type, as defined12, is used to give additional information intable above. MUST be the firstcase of unsolicited call disconnection. The Attribute Value field for this AVPin each messagehas the following format: 0 1 2 3 0 110+ Result Code (CDN, StopCCN) 16-bit Integer value indicating result of corresponding request or reason for issuing a request, 16-bit integer General Error code and an optional ASCII string error message. See Result and General Error code tables below.2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8Protocol Version (SCCRP, SCCRQ) 8-bit L2TP Protocol and Revision numbers 39 0 110 Framing Capabilities (SCCRP, SCCRQ) 32-bit bitmask indicating supported framing types (e.g., synchronous and asynchronous)2 3 41 10 Bearer Capabilities (sccrp, sccrq) 32-bit bitmask indicating supported bearer types (e.g., analog and digital)50 14 Tie Breaker (sccrq) 8 octet value used to break control connection establishment collisions60 8 Firmware Revision (sccrp, sccrq) 16-bit integer representing vendor's firmware revision71 6+ Host Name (SCCRP, SCCRQ) ASCII string name (e.g., DNS name) of issuer80 6+ Vendor Name (sccrp, sccrq) ASCII string describing issuing device9 0 18 Assigned Tunnel ID (SCCRP, SCCRQ, StopCCN) 16-bit integer tunnel ID assigned by sender 10 1 8 Receive Window Size (iccn, icrp, occn, ocrq, sccrp, sccrq) 16-bit integer receive window size offered by sender for a given call or control session 11 1 6+ Challenge (sccrp, sccrq) 1 or more octet value issued by sender wishing to authenticate Valencia expires June 1999 [Page 24] INTERNET DRAFT October 1998 control session peer 12 1 9+ Q.931+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Cause Code(cdn) 16-bit cause| Cause Msg | Advisory Msg... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Cause Code is the returned Q.931 Cause code,1 octet cause message,andoptional ASCII advisoryCause Msg is the returned Q.931 message13 1 22 Challenge Response (scccn, sccrp) 16 octet CHAP type responsecode (e.g., DISCONNECT) associated with the Cause Code. Both values are returned in their native ITU encodings [DSS1]. An additional ASCII text Advisory Message may also be included (presence indicated by the AVP Length) topeer's Challenge 14 1 8further explain the reason for disconnecting. This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for this AVP MUST be set to 1. The Length of this AVP is 9, plus the size of the Advisory Message. AssignedCallSession ID (CDN, ICRP, ICRQ, OCRP, OCRQ)16-bit integerThe Assigned Session ID AVP, Attribute Type 14, encodes the ID being assigned toa callthis session bysender 15 1 10 Call Serial Number (ICRQ, OCRQ) 1 or more octet identifier assigned to a call 16 1 10 Minimum BPS (OCRQ) 32-bit integer indicating lowest acceptable line speed for call 17 1 10 Maximum BPS (OCRQ) 32-bit integer indicating highest acceptable line speed for call 18 1 10 Bearer Type (icrq, OCRQ) Indicates bearer type (i.e., analogthe LAC ordigital)LNS. The Attribute Value field forcall 19this AVP has the following format: 0 110 Framing Type (ICCN, OCCN, OCRQ) Indicates framing type (i.e., synchronous or asynchronous) for call 200 1 2 3 4 5 6 7 8Packet Processing Delay (iccn, icrp, occn, ocrq) 16-bit integer estimate of processing time of full window of received packets by sender 21 1 6+ Dialed Number (icrq, OCRQ) ASCII string phone number called or to be called 22 1 6+ Dialing Number (icrq) ASCII string phone number of caller 23 1 6+ Sub-Address (icrq, ocrq) ASCII string containing additional dialing information 24 1 10 (Tx) Connect Speed (ICCN, OCCN) 32-bit integer representing actual (or transmit) line speed of connection 259 010 Physical Channel1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Session ID(icrq, ocrp) 32-bit vendor specific physical device identifier used for call 26 0 6+ Initial Received LCP CONFREQ (iccn) Octet string containing initial CONFREQ received from client 27 0 6+ Last Sent LCP CONFREQ (iccn) Octet string containing final CONFREQ sent to client Valencia expires June 1999| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Townsley, et al. Standards Track [Page 25] INTERNET DRAFTOctober 1998 28 0 6+ Last Received LCP CONFREQ (iccn) Octet string containing final CONFREQ received from client 29 0 8 Proxy Authen Type (iccn) 16-bit integer code indicating client authentication type negotiated (e.g., PAP, CHAP) 30 0 6+ Proxy Authen Name (iccn) ASCII string containing name returned by client in authentication response 31 0 6+ Proxy Authen Challenge (iccn) Octet string Challenge presented by LAC to client 32 0 8 Proxy AuthenL2TP February 1999 The Assigned Session ID(iccn) 16-bit integer of which low order octetisID presented to client with Challenge. High ordera 2 octetmust be 0. 33 0 6+ Proxy Authen Response (iccn) Octet string CHAP response or ASCII string password depending on authentication typenon-zero unsigned integer. The Assigned Session ID is used34 1 32 Call Errors (WEN) A reserved 16-bit word set to 0 followed by 6 32-bit integer connection error counters 35 1 16 ACCM (SLI) A reserved 16-bit word setto0 followed by 2 32-bit bitmasks containing Sendmultiplex andReceive ACCM values respectively 36 1 6+ Random Vector (all messages) Variable length octet string containingdemultiplex data sent over arandom sequence of values used to accomplishtunnel between theoptional "hiding" of other AVP values (See "H" bit descriptionLNS and LAC. The L2TP peer MUST place this value inSec. 5.7). 37 0 6+ Private Groupthe Session ID(iccn) Variable length octet value used byheader field of all control and data messages that it subsequently transmits over theLAC or LNS to indicatetunnel that belong to thiscallsession. Before the Assigned Session ID AVP istoreceived from a peer, messages MUST beassociatedsent to that peer with aparticular customer group. 38 0 10 Rx Connect Speed (iccn, occn) 32-bit integer representing actual receive line speedSession ID ofconnection. Suggests possibility0 in the header ofasymmetric connection. 39 1 6 Sequencing Required (iccn, occn) If present, indicates toall control messages. In theLNS that it MUST NOT dynamically disable sequencing. 5.6 Result and Error Code Summary The StopCCN andCDNmessage types contain a Result Code AVP which indicates the result ofcontrol message, thepreviously requested operation. The Result Code can indicate that additional information pertainingsame Assigned Session ID AVP first sent toan error situation can be found in the Error Code field of the Result Valencia expires June 1999 [Page 26] INTERNET DRAFT October 1998 Code AVP. The meaning oftheresult codereceiving peer istabulated underused, permitting thespecific type of message containingpeer to identify theresult. Each 16-bit Result Codeappropriate tunnel even if CDN isimmediately followed (in the same AVP) by a 16-bit General Error code value. General error codes pertain to types of errors which are not specific to any particular L2TP request, but rather to protocol or message format errors. Ifsent before anL2TP reply indicates in its Result Code that a general error occurred, the General Error value shouldAssigned Session ID is received. This AVP may be hidden (the H-bit may beexamined to determine what the error was. The currently defined General Error codes and their meanings are:0- No general error 1 - No control connection exists yetor 1). The M-bit for thisLAC-LNS pair 2 -AVP MUST be set to 1. The Lengthis wrong 3 - One(before hiding) of this AVP is 8. Call Serial Number (ICRQ, OCRQ) The Call Serial Number AVP, Attribute Type 15, encodes an identifier assigned by thefield values was out of rangeLAC orreserved field was non-zero 4 - Insufficient resourcesLNS tohandlethisoperation now 5 -call. TheCall ID is invalid inAttribute Value field for thiscontext 6 - A generic vendor-specific error occurred inAVP has theLAC 7 - Try another. If LACfollowing format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Call Serial Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Call Serial Number isaware of other possible LNS destinations, it should try one of them. This can be useda 32 bit value. The Call Serial Number is intended toguidebe anLAC based on LNS policy,easy reference forinstance, the existence of multilink PPP bundles. If the lengthadministrators on both ends ofthe Result Code AVP specifies that the Value field is more than four octets in length, the remaining octets after the General Error Code fielda tunnel to use when investigating call failure problems. Call Serial Numbers should be set to progressively increasing values, which arean arbitrary string providing further (possibly human readable) text associated with the condition. Human readable text in all error messages MUSTlikely to beprovided in the UTF-8 charset using the Default Language [18]. Generally, whenunique for aGeneral Error Codesignificant period of6 is used, additional information about the error willtime across all interconnected LNSs and LACs. This AVP may beincluded in the Optional Message field that follows the Error Code field in the Result Code AVP. 5.7 Hiding ofhidden (the H-bit may be 0 or 1). The M-bit for this AVPvaluesMUST be set to 1. TheH ("Hidden") bit in the headerLength (before hiding) ofeachthis AVPin a control message provides a mechanism to indicate to the receiving peer whether the contents of the AVP are hidden or present in cleartext. This feature can be used to hide sensitive control message data such as user passwords or user ID's.is 10. Minimum BPS (OCRQ) TheH bit MUST NOT be set in the Random Vector AVP or MessageMinimum BPS AVP, Attribute TypeAVP. The H bit MUST only be set if a shared secret exists between the peers on either end of the tunnel. AVPs involved in the establishment of the tunnel, or reporting errors involved in the establishment of the tunnel MUST NOT be hidden. These AVPs are the "Host Name" AVP in the SCCRQ and SCCRP message, the "Assigned Tunnel ID" in the SCCRQ, SCCRP, and StopCCN message and the "Result Code" in the StopCCN message. If the H bit is set in any AVP(s) in a given command message, a Random Vector AVP must also be present in the message and MUST precede16, encodes thefirst AVP having an H bit of 1. Valencia expires June 1999lowest Townsley, et al. Standards Track [Page27]26] INTERNET DRAFTOctober 1998L2TP February 1999 acceptable line speed for this call. Thelength of theAttribute Value field for this AVPvalue to be hidden is first encoded inhas theform of a Hidden AVP Subformat as follows:following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Length of Original Value | Original Value ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ...Minimum BPS |Padding ...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Length ThisThe Minimum BPS islength ofa 32 bit value indicates theOriginal Value to be obscuredspeed inoctets. Original Value Value of hiddenbits per second. This AVPthat is tomay beobscured. Padding Random additional octets used to obscure length of the Original Value.hidden (the H-bit may be 0 or 1). Theresulting subformat MAYM-bit for this AVP MUST bepadded to a multiple of 16 octets in length. For example, if the Original Valueset tobe obscured is a string containing 6 characters (e.g. password 'foobar'), then 8 + n * 16 octets of padding would be applied. Padding does NOT alter the value placed in the1. The Length (before hiding) ofthe Original Value, only the length of thethis AVPitself. Next, An MD5 hashisperformed on the concatenation of: - the 2 octet10. Maximum BPS (OCRQ) The Maximum BPS AVP, Attributenumber ofType 17, encodes the highest acceptable line speed for this call. The Attribute Value field for this AVP(in network order) -has theshared authentication secret - an arbitrary length random vectorfollowing format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Maximum BPS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Maximum BPS is a 32 bit valueofindicates therandom vector used in this hash is passedspeed inthe value field of a Random Vector AVP.bits per second. ThisRandom VectorAVPmustmay beplaced in the message by the sender before anyhiddenAVPs. The same random vector(the H-bit may beused0 or 1). The M-bit formore than one hiddenthis AVPin the same message. If a different random vector is used for the hidingMUST be set to 1. The Length (before hiding) ofsubsequent AVPs then a new Random Vectorthis AVPmust be placed inis 10. Bearer Type (ICRQ, OCRQ) The Bearer Type AVP, Attribute Type 18, encodes thecommand message beforebearer type for thefirstincoming or outgoing call. The Attribute Value field for this AVPto which it applies.has the following format: Townsley, et al. Standards Track [Page 27] INTERNET DRAFT L2TP February 1999 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 for future Bearer Types |A|D| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheMD5 hash valueBearer Type isthen XORed witha 32-bit bit mask, which indicates thefirst 16 octet or less segmentbearer capability of theHidden AVP Subformat and placed incall (ICRQ) or required for theValue field ofcall (OCRQ). If set, bit A indicates that theHidden AVP.call refers to an analog channel. If set, bit D indicates that theHidden AVP Subformat is less than 16 octets,call refers to a digital channel. Both may be set, indicating that theSubformat is transformed as ifcall was either indistinguishable, or can be placed on either type of channel. Bits in the Value fieldhad been padded to 16 octets before the XOR, butof this AVP MUST only be set by theactual octets presentLNS for an OCRQ if it was set in theSubformat are modified, and the length of theBearer Capabilities AVPis not altered. Ifreceived from theSubformatLAC during control connection establishment. It islonger than 16 octets,valid to set neither the A nor D bits in an ICRQ. Such asecond one-way MD5 hash is calculatedsetting may indicate that the call was not received over astream of octets consisting ofphysical link (e.g if theshared secret followed byLAC and PPP are located in theresultsame subsystem). This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST be set to 1. The Length (before hiding) ofthe first XOR. That hashthis AVP isXORed with10. Framing Type (ICCN, OCCN, OCRQ) The Framing Type AVP, Attribute Type 19, encodes thesecond 16 octetframing type for the incoming orless segment ofoutgoing call. The Attribute Value field for this AVP has theSubformat and placed infollowing format: 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 for future Framing Types |A|S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Framing Type is a 32-bit mask, which indicates thecorresponding octetstype of PPP framing requested for an OCRQ, or theValue fieldtype of PPP framing negotiated for an OCCN or ICCN. The framing type MAY be used as an indication to PPP on theHidden AVP. Valencia expires June 1999LNS as to what link options to use for LCP negotiation [RFC1662]. Bit A indicates that asynchronous framing. Bit S indicates that synchronous framing. For an OCRQ, both may be set, indicating that either type of framing may be used. Townsley, et al. Standards Track [Page 28] INTERNET DRAFTOctober 1998 If necessary,L2TP February 1999 Bits in the Value field of thisoperation is repeated, withAVP MUST only be set by theshared secret used along with each XOR result to generate the next hash to XOR the next segment of the value with. The method is taken from the book "Network Security" by Kaufman, Perlman and Speciner [4] pages 109-110. A more precise explanation of the method follows: Call the shared secret S, the Random Vector RV, and the Attribute Value AV, Break the value field into 16-octet chunks p1, p2, etc. with the last one padded at the end with random data to a 16-octet boundary. Call the ciphertext blocks c(1), c(2), etc. We'll need intermediate values b1, b2, etc. b1 = MD5(AV + S + RA) c(1) = p1 xor b1 b2 = MD5(S + c(1)) c(2) = p2 xor b2 . . . . . . bi = MD5(S + c(i-1)) c(i) = pi xor bi The String will contain c(1)+c(2)+...+c(i) where + denotes concatenation. On receipt,LNS for an OCRQ if it was set in therandom vector is takenFraming Capabilities AVP received from thelast Random VectorLAC during control connection establishment. This AVPencountered in the message prior to themay be hidden (the H-bit may be 0 or 1). The M-bit for this AVPtoMUST beunhidden.set to 1. Theabove processLength (before hiding) of this AVP isthen reversed10. Called Number (ICRQ, OCRQ) The Called Number AVP, Attribute Type 21, encodes the telephone number toyieldbe called for an OCRQ, and theoriginal value. For more details on this hiding method, consult RFC 2058 [8].Called number for an ICRQ. TheRandom VectorAttribute Value field for this AVP has the following format:Random Vector0 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 + String length | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|36Called Number... (arbitrary number of octets) |Random Octet String ...+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheRandom Vector AVP may be used in any message type. The Attribute value is 36 and it is marked mandatory. ItCalled Number isused to enable the hiding ofan ASCII string. Contact between thevaluesadministrator ofarbitrary AVPs. It MUST precede any AVP containing an AVP withtheH bit set but it MUST NOT itself haveLAC and theH bit set. More than one Random Vector AVPLNS mayappear in a message, in which case the one most closely preceding an AVP with the H bit set pertainsbe necessary tothat AVP. The Random Octet String iscoordinate interpretation of therandom vectorvalueto useneeded incomputing the MD5 hash to retrieve the original value of a hiddenthis AVP. Thisstring canAVP may beof arbitrary length, although a random vector of at least 16 octets is recommended.hidden (the H-bit may be 0 or 1). Theonly AVP that the Random VectorM-bit for this AVP MUSTNOT precede is the Message Typebe set to 1. The Length (before hiding) of this AVP(whichisalways6 plus thefirst AVP in a message). Valencia expires June 1999 [Page 29] INTERNET DRAFT October 1998 6.0 Control Connection Protocol Specification Control Connection messages are used to establish and clear user sessions. The first setlength ofControl Connection messages are used to maintainthecontrol connection itself.Called Number. Calling Number (ICRQ) Thecontrol connection is initiated by an LAC or LNS after establishing the underlying tunnel- over-media connection. 6.0.1 Control Connection Collision ForCalling Number AVP, Attribute Type 22, encodes thecase where an LAC and LNS both initiate tunnels to each other concurrently, and whereoriginating number for theLAC and LNS both determine that a single tunnel suffices (generally because of media characteristic considerations, for instance, whether individual tunnels are needed to gain QOS guarantees for each tunnel), a "tie breaker" may be undertaken.incoming call. Thedetails of breaking a tie are documented withAttribute Value field for this AVP has thetunnel establishment messages (Sec. 6.1). 6.0.2 Reliable Deliveryfollowing format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Calling Number... (arbitrary number ofControl Messages Since L2TP may run across media where packets may be lost,octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Calling Number is anL2TP peer sending a control message will retransmitASCII string. Contact between thecontrol message after deciding that its remote peer has not received it. The reliable transport mechanism built into L2TP is essentially a lower layer transport service;administrator of theNrLAC andNs fields ofthecontrol message header belongLNS may be necessary to coordinate interpretation of the value in thistransport layer.AVP. This AVP may be hidden (the H-bit may be 0 or 1). Thehigher layer functions ofM-bit for Townsley, et al. Standards Track [Page 29] INTERNET DRAFT L2TPare not concerned with retransmission or ordering of control messages. Each tunnel maintains a queue of control messages toFebruary 1999 this AVP MUST betransmittedset tothe peer.1. Themessage at the frontLength (before hiding) ofthe queue is sent with a given Ns value, andthis AVP isheld until a control message arrives from the peer in which6 plus theNr field indicates receiptlength ofthis message. After a fixed (a recommended default is 1 second) or adaptive (see Appendix D) timeout interval expires without receiving such an acknowledgment,thecontrol message packet is retransmitted.Calling Number. Sub-Address (ICRQ, OCRQ) Theretransmitted packet contains the same Ns value, but the Nr value MUST be updated with the current value of Sr to reflect any packets received in the interim. Each subsequent retranmission of a packet MUST employ an exponential backoff interval. Thus, ifSub-Address AVP, Attribute Type 23, encodes additional dialing information. The Attribute Value field for this AVP has thefirst retransmission occurred afterfollowing format: 0 1second, the next retransmisssion should occur after2seconds has elapsed, then3 0 1 2 3 4seconds, etc. An implementation MAY place a cap upon the maximum interval between retransmissions. This cap MUST be no less than5 6 7 8seconds per retransmission. If no peer response is detected after several retransmissions (a recommended default9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sub-Address ... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Sub-Address is5),an ASCII string. Contact between thetunneladministrator of the LAC andall sessions within MUSTthe LNS may becleared. When a tunnel is being shut down for reasons other than lossnecessary to coordinate interpretation ofconnectivity,thestate and reliable delivery mechanisms MUSTvalue in this AVP. This AVP may bemaintained and operatedhidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST be set to 1. The Length (before hiding) of this AVP is 6 plus thefull retransmission interval after the final message exchange has occurred. This permits reliable deliverylength ofclosing messages in environments where these closing messages might be dropped. Valencia expires June 1999 [Page 30] INTERNET DRAFT October 1998 A peer MUST NOT withhold acknowledgmentthe Sub-Address. (Tx) Connect Speed (ICCN, OCCN) The (Tx) Connect Speed BPS AVP, Attribute Type 24, encodes the speed ofpackets as a techniquethe facility chosen forflow controlling control messages. An L2TP implementation is expected to be able to keep up with incoming control messages, possibly responding to some with errors reflecting an inability to honortherequested action. A sliding window mechanism is used, by default,connection attempt. The Attribute Value field forcontrol message transmission.this AVP has the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Thedefault(Tx) Connect Speed BPS isto permit four control messages to be outstanding on a given tunnel. Consider two peers A & B. Suppose A specifies a Receive Window Size AVP witha 4 octet valueof Nindicating the speed in bits per second. When theStart-Control-Connection-Request or -Reply packets. Boptional Rx Connect Speed AVP isnow allowed to have up to N outstanding control messages. Once N have been sent, however, it must wait for an acknowledgment that advancespresent, thewindow before sending new control messages. An implementation may support a receive window of only 1 (i.e., by sending out a Receive Window Size AVP with avalueof 1), but MUST accept a window of up to 4in this AVP represents the transmit connect speed, fromits peer. Unlike payload sessions, a valuethe perspective of0 fortheReceive Window SizeLAC (e.g. data flowing from the LAC to the remote system). When the optional Rx Connect Speed AVP isinvalid for a control session. When transmitting control messages, an implementation SHOULD utilize a slow start methodNOT present, the connection speed between the remote system andwindow adjustment procedure as described in Appendix B. The transport layer at a receiving peerLAC isresponsible for making sure that control messages are delivered in orderassumed tothe higher layerbe symmetric andthat duplicate messages are not delivered tois represented by thehigher layer. Messages arriving out of ordersingle value in this AVP. Townsley, et al. Standards Track [Page 30] INTERNET DRAFT L2TP February 1999 This AVP may bequeued for in-order delivery when the missing messages are received or theyhidden (the H-bit may bediscarded, 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"0 or"empty" fields1). The M-bit for this AVP MUST besent as 0 valuesset toallow for protocol extensibility. Each control message has a header, specified in section 5.2, including an1. The Length (before hiding) of this AVPindicatingis 10. Physical Channel ID (ICRQ, OCRP) The Physical Channel ID AVP, Attribute Type 25, encodes thetype of control message, followed by zero or more AVP's appropriatevendor specific physical channel number used forthe given type of control message. Each control message is described first atablock level, and then with details of each AVP. 6.1 Start-Control-Connection-Request (SCCRQ) The Start-Control-Connection-Request is an L2TP control message used to initialize the tunnel between an LNS and an LAC. The tunnel must be initialized through the exchange of these control messages before any other L2TP messages can be issued. The establishment of the control connection is started by the initiator of the underlying tunnel. Valencia expires June 1999 [Page 31] INTERNET DRAFT October 1998 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 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 | | Receive Window Size | | Challenge | +-+-+-+-+-+-+-+-+-+-+-+-+ Start-Control-Connection-Request 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+call. TheMessage Type AVP contains aAttribute Valueof 1, indicating Start- Control-Connection-Request. The Flags indicate a mandatory option. Details associated withfield for thistunneled session follow in additional AVP's withinAVP has thepacket. Protocol Versionfollowing format: 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|2 | 0x01 | 0x00Physical Channel ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The Protocol Version AVP withinPhysical Channel ID is aStart-Control-Connection-Request packet indicates the L2TP protocol version available. The Attribute4 octet valueis 2, indicating Protocol Version, and is marked mandatory.intended to be used for logging purposes only. This AVPMUSTmay bepresent.hidden (the H-bit may be 0 or 1). TheValue field is a 16-bit hexadecimal value 0x100, indicating L2TP protocol version 1, revisionM-bit for this AVP MUST be set to 0.Valencia expires June 1999The Length (before hiding) of this AVP is 10. 4.3.5 Proxy LCP and Authentication AVPs The LAC may have answered the call and negotiated LCP with the remote system, perhaps in order to establish the system's apparent identity. In this case, these AVPs may be included to indicate the link properties the remote system initially requested, properties the remote system and LAC ultimately negotiated, as well as PPP authentication information sent and received by the LAC. This information may be used to initiate the PPP LCP and authentication systems on the LNS, allowing PPP to continue without renegotiation of LCP. Note that the LNS policy may be to enter an additional round of LCP negotiation and/or authentication if the LAC is not trusted. Initial Received LCP CONFREQ (ICCN) In the Initial Received LCP CONFREQ AVP, Attribute Type 26, provides the LNS with the Initial CONFREQ received by the LAC from the PPP Peer. The Attribute Value field for this AVP has the following format: Townsley, et al. Standards Track [Page32]31] INTERNET DRAFTOctober 1998 Framing CapabilitiesL2TP February 1999 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 3|0x00 | 0x00LCP CONFREQ... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| 0x00 |0|0|0|0|0|0|A|S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Framing Capabilities AVP withinLCP CONFREQ is aStart-Control-Connection- Request indicatescopy of thetypebody offraming thatthesenderinitial CONFREQ received, starting at the first option within the body ofthis message can provide. The Attribute value is 3, indicating Framing Capabilities, and is marked mandatory.the LCP message. This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST bepresent.set to 0. TheValue 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. ThisLength (before hiding) of this AVP is 6 plus the length of the CONFREQ. Last Sent LCP CONFREQ (ICCN) In the Last Sent LCP CONFREQ AVP, Attribute Type 26, provides thepeerLNS withan indication ofthetypes of framing that will be accepted or initiatedLast CONFREQ sent by thesender. A peer should not initiate an incoming or outgoing call with a Framing Type AVP specifying a value not advertised inLAC to theFraming CapabilitiesPPP Peer. The Attribute Value field for this AVPit received during control connection establishment. Attempts to do so will result inhas thecall being rejected. Bearer Capabilitiesfollowing format: 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 4 | 0x00|0x00LCP CONFREQ... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| 0x00 |0|0|0|0|0|0|A|D| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+TheBearer Capabilities AVP withinLCP CONFREQ is aStart-Control-Connection- Request indicatescopy of thebearer capabilities thatbody of thesenderfinal CONFREQ sent to the client to complete LCP negotiation, starting at the first option within the body ofthis message can provide for outgoing calls. The Attribute value is 4, indicating Bearer Capabilities, and is marked mandatory.the LCP message. This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST bepresent if the sender can place outgoing calls when requested.set to 0. TheValue field is a 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. ThisLength (before hiding) of this AVPprovidesis 6 plus thepeer with an indicationlength of thebearer device types supported by the hardware interfaces ofCONFREQ. Last Received LCP CONFREQ (ICCN) The Last Received LCP CONFREQ AVP, Attribute Type 28, provides thesender for outgoing calls. AnLNSshould not initiate an outgoing call specifying a value in the Bearer Type AVP for a device type not advertised inwith theBearer Capabilities AVP itLast CONFREQ receivedfrom the LAC Valencia expires June 1999 [Page 33] INTERNET DRAFT October 1998 during control connection establishment. Attempts to do so will result inby thecall being rejected. Note that an LNS that cannot act as anLACas well will not support hardware devices for handling incoming and outgoing calls and should therefore set the A and D bits infrom the PPP Peer. The Attribute Value fieldoffor this AVPto 0, or should not send the AVP at all. An LNS that can also act as an LAC and place outgoing calls should set the appropriate bits in the Value field of this AVP. Presence of this message is not a guarantee that a given outgoing call will be placed by the sender if requested, just thathas thephysical capability exists. Tie Breakerfollowing format: 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|0|0| 14 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 5 | Tie Break Value... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Value...LCP CONFREQ... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| ...(64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Tie Breaker AVP within a Start-Control-Connection-Request contains a 64-bit Value used to break ties in tunnel establishment between an LAC-LNS pair. The Attribute value is 5, indicating Tie Breaker, and is marked optional. This AVP itself is optional.The8 octet ValueLCP CONFREQ isused asa64-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 recipientcopy ofa Start-Control-Connection-Request must check to see if a Start-Control-Connection-Request has been sent tothepeer, and if so, must compare its Tie Breaker value withbody of the final CONFREQ Townsley, et al. Standards Track [Page 32] INTERNET DRAFT L2TP February 1999 receivedone. The lower value "wins", and the "loser" MUST silently discard its tunnel. In the case where a tie breaker is present on both sides, andfrom thevalue is equal, both sides MUST discard their tunnels. If a tie breaker is received, andclient to complete LCP negotiation, starting at theoutstanding Start-Control- Connection-Request had no tie breaker value,first option within theinitiator which includedbody of theTie BreakerLCP message. This AVP"wins". If neither side issues a Tie breaker, then two separate tunnels are opened. It is recommended that the Valuemay be hidden (the H-bit may be 0 or 1). The M-bit for this AVP MUST be set to 0. The Length (before hiding) of this AVP is 6 plus theMAC addresslength ofa LAN interface onthesender. If no MAC address is available, a 64-bit random numberCONFREQ. Proxy Authen Type (ICCN) The Proxy Authen Type AVP, Attribute Type 29, determines if proxy authentication should beused instead. Valencia expires June 1999 [Page 34] INTERNET DRAFT October 1998 Firmware Revision 0 1 2 3used. The Attribute Value field for this AVP has the following format: 0 12 3 4 5 6 7 8 90 1 2 3 4 5 6 7 8 9 0 1 2 3 4 56 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 6+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Firmware RevisionAuthen Type |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Authen Type is a 2 octet unsigned integer, holding: This AVP may be hidden (the H-bit may be 0 or 1). TheFirmware RevisionM-bit for this AVPwithin a Start-Control-Connection- Request indicates the firmware revision of the issuing device.MUST be set to 0. TheAttribute value is 6, indicating Firmware Revision, andLength (before hiding) of this AVP ismarked optional.8. Defined Authen Type values are: 0 - Reserved 1 - Textual username/password exchange 2 - PPP CHAP 3 - PPP PAP 4 - No Authentication 5 - Microsoft CHAP Version 1 (MSCHAPv1) This AVPitselfMUST be present if proxy authentication isoptional. The Value fieldto be utilized. If it isa 16-bit integer encoded in a vendor specific format. For devices which donothavepresent, then it is assumed that this peer cannot perform proxy authentication, requiring afirmware revision (general purpose computers running L2TP software modules, for instance), the revisionrestart of theL2TP software moduleauthentication phase at the LNS if the client has already entered this phase with the LAC (which may bereported instead. Hostdetermined by the Proxy LCP AVP if present).. Associated AVPs for each type of authentication follow. Proxy Authen Name (ICCN) The Proxy Authen Name AVP, Attribute Type 30, specifies the name of the authenticating client when using proxy authentication. Townsley, et al. Standards Track [Page 33] INTERNET DRAFT L2TP February 1999 The Attribute Value field for this AVP has the following format: 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|0|0| 6 + Host name len|0Authen Name... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| 7 | Host name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The HostAuthen NameAVP withinis aStart-Control-Connection-Request indicates the namestring of octets of arbitrary length. It contains theissuing LAC or LNS. The Attribute value is 7, indicating Host Name, and is marked mandatory.name specified in the client's authentication response. This AVPitselfMUST bepresent. This name should be as broadly unique as possible; for hosts participatingpresent inDNS [4],messages containing ahostnameProxy Authen Type AVP withfully qualified domain would be 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 2an Authen Type of 1, 2, 34 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3|0|0|0|0|0|0| 6+Vendor Name len| 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 8 | Vendor name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Vendor Nameor 5. It may be desirable to employ AVPwithin a Start-Control-Connection-Request contains a vendor specific string describinghiding for obscuring thetype of LACcleartext name. This AVP may be hidden (the H-bit may be 0 orLNS being used.1). TheAttribute value is 8, indicating Vendor Name, and is marked optional. ThisM-bit for this AVPitself is optional.MUST be set to 0. TheValueLength (before hiding) is 6 plus theindicated numberlength ofoctets representingthevendor string. Valencia expires June 1999 [Page 35] INTERNET DRAFT October 1998 Assigned Tunnel IDcleartext name. Proxy Authen Challenge (ICCN) The Proxy Authen Challenge AVP, Attribute Type 31, specifies the challenge sent by the LAC to the PPP Peer, when using proxy authentication. The Attribute Value field for this AVP has the following format: 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 9|Tunnel IDChallenge... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheAssigned Tunnel ID AVP withinChallenge is aStart-Control-Connection- Request specifies the Tunnel ID which the receiving peer MUST use in the Tunnel ID fieldstring ofall subsequent packets. The Attribute value is 9, indicating Assigned Tunnel ID, and is marked mandatory.one or more octets. This AVP MUST bepresent. Beforepresent for Proxy Authen Types 2 and 5. The Challenge field contains theAssigned Tunnel IDCHAP challenge presented to the client by the LAC. This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for this AVPis received, packetsMUST besent with a Tunnelset to 0. The Length (before hiding) of this AVP is 6, plus the length of the Challenge. Proxy Authen ID (ICCN) The Proxy Authen ID AVP, Attribute Type 32, specifies the ID value of0.the PPP Authentication that was started between the LAC and the Townsley, et al. Standards Track [Page 34] INTERNET DRAFT L2TP February 1999 PPP Peer, when proxy authentication is being used. The Attribute Valueis a 16-bit non-zero Tunnel ID value. Receive Window Size 0 1 2 3field for this AVP has the following format: 0 12 3 4 5 6 7 8 90 1 2 3 4 5 6 7 8 9 0 1 2 3 4 56 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |10Reserved |SizeID |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Receive Window Size AVP within+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ID is aStart-Control-Connection- Request specifies the receive window size being offered to2 octet unsigned integer, theremote peer.most significant octet MUST be 0. TheAttribute value is 10, indicating Receive Window Size, and is mandatory. ThisProxy Authen ID AVPitself is optional. Value is a 16-bit word indicatingMUST be present for Proxy authen types 2, 3 and 5. For 2 and 5, theoffered window size. If absent,ID field contains thepeer must assume abyte ID valueof 4 forpresented to the client by the LAC in itstransmit window. The remote peer may sendChallenge. For 3, it is thespecified numberIdentifier value ofcontrol messages before it must waitthe Authenticate-Request. This AVP may be hidden (the H-bit may be 0 or 1). The M-bit foran acknowledgment. Challengethis AVP MUST be set to 0. Proxy Authen Response (ICCN) The Proxy Authen Response AVP, Attribute Type 33, specifies the PPP Authentication response received by the LAC from the PPP Peer, when proxy authentication is used. The Attribute Value field for this AVP has the following format: 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|0|0| 6 + Challenge len|0Response... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| 11 | Challenge... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+TheChallenge AVP withinResponse is aStart-Control-Connection-Request indicates thatstring of octets. This AVP MUST be present for Proxy authen types 1, 2, 3 and 5. The Response field contains theissuing peer wishesclient's response toauthenticatethetunnel endpoints using a CHAP-style authentication mechanism. The Attribute value is 11, indicating Challenge,challenge. For Proxy authen types 2 and 5, this field contains 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. In the case of cleartext passwords, AVP hiding ismarked mandatory.recommended. This AVPis optional.may be hidden (the H-bit may be 0 or 1). TheValueM-bit for this AVP MUST be set to 0. The Length (before hiding) of this AVP isone or more octets6 plus the length ofchallenge value. Valencia expires June 1999the Response. Townsley, et al. Standards Track [Page36]35] INTERNET DRAFTOctober 1998 6.2 Start-Control-Connection-Reply (SCCRP) The Start-Control-Connection-Reply is anL2TPcontrol message sent in reply to a received Start-Control-Connection-Request message. SendingFebruary 1999 4.3.6 Call Status AVPs Call Errors (WEN) The Call Errors AVP, Attribute Type 34, is used by the LAC to send error information to the LNS. The Attribute Value field for thismessage indicates thatAVP has therequest was successful. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Start-Control-Connection-Reply | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Protocol Version | | Framing Capabilities | | Bearer Capabilities | | Firmware Revision | | Host Name | | Vendor Name | | Assigned Tunnel ID | | Receive Window Size | | Challenge | | Challenge Response | +-+-+-+-+-+-+-+-+-+-+-+-+ Start-Control-Connection-Replyfollowing format: 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|0|0| 8|0Reserved | CRC Errors (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0CRC Errors (L) |2Framing Errors (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The Message Type AVP contains a Value of 2, indicating Start- Control-Connection-Reply. The Flags indicate a 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| Framing Errors (L) | Hardware Overruns (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|1|0|0|0|0|0| 8|0Hardware Overruns (L) | Buffer Overruns (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |2Buffer Overruns (L) | Time-out Errors (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0x01Time-out Errors (L) |0x00Alignment Errors (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Alignment Errors (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheProtocol Version AVP within a Start-Control-Connection-Reply packet indicates the L2TP protocol version available. The Attribute value is 2, indicating Protocol Version, and the Value field is a 16-bit hexadecimal value 0x100, indicating L2TP protocol version 1, revision 0. This AVPfollowing fields are defined: Reserved - Not used, MUST bepresent. Valencia expires June 1999 [Page 37] INTERNET DRAFT October 1998 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 901 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 |CRC Errors - Number of PPP frames received with CRC errors since call was established Framing Errors - Number of improperly framed PPP packets received Hardware Overruns - Number of receive buffer over-runs since call was established Buffer Overruns - Number of buffer over-runs detected since call was established Time-out Errors - Number of time-outs since call was established Alignment Errors - Number of alignment errors since call was established This AVP may be hidden (the H-bit may be 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 3 | 0x00 | 0x00 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0x00 |0|0|0|0|0|0|A|S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+or 1). TheFraming CapabilitiesM-bit for this AVPwithin a Start-Control-Connection- Reply indicates the type of framing that the senderMUST be set to 1. The Length (before hiding) of thismessage can provide.AVP is 32. ACCM (SLI) Townsley, et al. Standards Track [Page 36] INTERNET DRAFT L2TP February 1999 The ACCM AVP, Attribute Type 35, is3, it is a mandatory AVP,used by theValue field is a 32-bit quantity,LNS to inform LAC of the ACCM negotiated withtwo 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. More details ontheuse ofPPP Peer by the LNS. The Attribute Value field for this AVPcan be found in Sec. 6.1. Bearer Capabilitieshas the following format: 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|0|0| 10|0Reserved |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Send ACCM (H) |4+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0x00Send ACCM (L) |0x00Receive ACCM (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0x00 |0|0|0|0|0|0|A|D|Receive ACCM (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+The Bearer Capabilities AVP withinSend ACCM and Receive ACCM are each 4 octet values preceeded by aStart-Control-Connection- Reply indicates2 octet reserved quantity. The send ACCM value should be used by thebearer capabilities thatLAC to process packets it sends on thesender of this message can provideconnection. The receive ACCM value should be used by the LAC to process incoming packets on the connection. The default values used by the LAC foroutgoing calls.both these fields are 0xFFFFFFFF. TheAttribute is 4,LAC should honor these fields unless itis a mandatory AVP,has specific configuration information to indicate that theValue field is a 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.requested mask must be modified to permit operation. This AVPMUSTmay bepresent if outgoing calls canhidden (the H-bit MAY beplaced by the sender of1 or 0). The M-bit for thismessage. More details on the useAVP MUST be set to 1. The Length of this AVPcanis 16. Private Group ID (ICCN) The Private Group ID AVP, Attribute Type 37, is used by the LAC to indicate that this call is to befound in Sec. 6.1. Firmware Revisionassociated with a particular customer group. The Attribute Value field for this AVP has the following format: 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 6|Firmware RevisionPrivate Group ID ... (arbitrary number of octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Valencia expires June 1999 [Page 38] INTERNET DRAFT October 1998TheFirmware Revision AVP withinPrivate Group ID is aStart-Control-Connection-Reply indicates the firmware revisionstring ofthe issuing device.octets of arbitrary length. TheAttribute is 6, it is not a mandatory AVP,LNS MAY treat theValue field is a 16-bit integer encodedPPP session as well as network traffic through this session in avendor specific format.special manner determined by the peer. Fordevices which do not haveexample, if the LNS is individually connected to several private networks using unregistered addresses, this AVP may be included by the LAC to indicate that afirmware revision (general purpose computers runninggiven call should be Townsley, et al. Standards Track [Page 37] INTERNET DRAFT L2TPsoftware modules, for instance),February 1999 associated with one of therevisionprivate networks. The Private Group ID is a string corresponding to a table in the LNS that defines the particular characteristics of theL2TP software moduleselected group. A LAC MAY determine the Private Group ID from a RADIUS response, local configuration, or some other source. This AVP may bereported instead. Thishidden (the H-bit MAY be 1 or 0). The M-bit for this AVP MUST be set to 0. The Length (before hiding) of this AVP isoptional. Host Name6 plus the length of the Private Group ID. Rx Connect Speed (ICCN, OCCN) The Rx Connect Speed AVP, Attribute Type 38, represents the speed of the connection from the perspective of the LAC (e.g. data flowing from the remote system to the LAC). The Attribute Value field for this AVP has the following format: 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|0|0| 6 + Host Name len | 0|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+BPS (H) |7BPS (L) |Host Name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Host Name AVP within+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ BPS is aStart-Control-Connection-Reply indicates4 octet value indicating thenamespeed in bits per second. Presence of this AVP implies that theissuing LAC or LNS. See the notes in section 6.1 concerning Host Name contents. It is encoded as the Attribute 7, mandatory,connection speed may be asymmetric with respect to theindicated number of octets representingtransmit connect speed given in thehost name string.(Tx) Connect Speed AVP. This AVPMUSTmay be hidden (the H-bit MAY bepresent. 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 01+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 6+Vendor Name len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 8 |Vendor Name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+or 0). TheVendor NameM-bit for this AVPwithin a Start-Control-Connection-Reply contains a vendor specific string describing the typeMUST be set to 0. The Length (before hiding) ofLAC or LNS being used. Itthis AVP isencoded as the10. Sequencing Required (ICCN, OCCN) The Sequencing Required AVP, Attribute8, not mandatory, withType 39, indicates to theindicated number of octets representingLNS that Sequence Numbers MUST always be present on thevendor string.data channel. This AVPis 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 9 | Tunnel ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+has no Attribute Value field. This AVP MUST NOT be hidden (the H-bit MUST be 0). TheAssigned Tunnel IDM-bit for this AVPwithin a Start-Control-Connection-Reply specifies the Tunnel ID which the receiving peerMUSTuse in all subsequent packets. It is encoded as the Attribute 9, mandatory, Valencia expires June 1999be set to 1. The Length of this AVP is 6. Townsley, et al. Standards Track [Page39]38] INTERNET DRAFTOctober 1998L2TP February 1999 5.0 Protocol Operation The necessary setup for tunneling a PPP session with L2TP consists of two steps, (1) establishing the Control Connection for a16-bit non-zeroTunnel, and (2) establishing a Session as triggered by an incoming or outgoing call request. The TunnelID value. This AVPand corresponding Control Connection MUST bepresent. Receive Window Size 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|0|0| 8established before an incoming or outgoing call is initiated. An L2TP Session MUST be established before L2TP can begin to tunnel PPP frames. Multiple Sessions may exist across a single Tunnel and multiple Tunnels may exist between the same LAC and LNS.. +-----+ +-----+ |0|~~~~~~~~~~L2TP Tunnel~~~~~~~~~~| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|10LAC |size|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Receive Window Size AVP within a Start-Control-Connection- Reply specifies the receive window size being offered to the remote peer.LNS | | #######Control Connection######## | [Remote] | | | | [System]------Call----------*============L2TP Session=============* | PPP +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | | | | | [Remote] | | | | [System]------Call----------*============L2TP Session=============* | PPP +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | | | | | | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | +-----+ +-----+ Figure 5.1 Tunneling PPP 5.1 Control Connection Establishment TheAttribute value is 10, indicating Receive Window Size, and is mandatory. This AVP itself is optional. ValueControl Connection isa 16-bit word indicating the offered window size. If absent,thepeerinitial connection that mustassume a value of 4 for its transmit window. The remote peerbe achieved between an LAC and LNS before sessions maysend the specified numberbe brought up. Establishment of the control connection includes securing the identity of the peer, as well as identifying the peer's L2TP version, framing, and bearer capabilities, etc. A three message exchange is utilized to setup the control connection. Following is a typical message exchange: LAC or LNS LAC or LNS ---------- ---------- SCCRQ -> <- SCCRP SCCCN -> <- ZLB ACK The ZLB ACK is sent if there are no further messagesbefore it must waitwaiting in queue foran 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 6 + Challenge len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 11 | Challenge... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Challenge AVP within a Start-Control-Connection-Reply indicatesthatthe peerpeer. Townsley, et al. Standards Track [Page 39] INTERNET DRAFT L2TP February 1999 5.1.1 Tunnel Authentication L2TP incorporates a simple, optional, CHAP-like [RFC1994] tunnel authentication system during control connection establishment. If an LAC or LNS wishes to authenticate thetunnel initiator usingidentity of the peer it is contacting or being contacted by, aCHAP-style authentication mechanism. ItChallenge AVP isencoded asincluded in theAttribute 11, mandatory, with at least one octet of challenge value embedded.SCCRQ or SCCRP message. Ifthisa Challenge AVP isnot present, it indicates toreceived in an SCCRQ or SCCRP, a Challenge Response AVP MUST be sent in thereceiving peer thatfollowing SCCRP or SCCCN, respectively. If thesenderexpected response and response received from a peer does notwish to authenticate that peer. Challenge 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|0|0| 22 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 13 | Response... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Response... (128 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Response AVP within a Start-Control-Connection-Reply packet provides a response to a challenge received. The Attribute value is 13, indicating Response, andmatch, establishment of theValue field istunnel MUST be disallowed. To participate in tunnel authentication, a128-bit value Valencia expires June 1999 [Page 40] INTERNET DRAFT October 1998 reflecting the CHAP-style response tosingle shared secret MUST exist between thechallenge.LAC and LNS. This is the same shared secret used for AVPmarked mandatory,hiding (see Section 4.2). See Section 4.3.3 for details on construction of the Challenge andMUSTResponse AVPs. 5.2 Session Establishment After successful control connection establishment, individual sessions may bepresent if a challenge was received and this Start-Control-Connection-Reply indicates success. For purposes ofcreated. Each session corresponds to single PPP stream between theID value inLAC and LNS. Unlike control connection establishment, session establishment is directional with respect to theCHAP response calculation,LAC and LNS. The LAC requests thevalue 2 (correspondingLNS to accept a session for an incoming call, and theValue field ofLNS requests theStart-Control- Connection-Reply AVP) MUST be used. 6.3 Start-Control-Connection-Connected (SCCCN) The Start-Control-Connection-Connected message is an L2TP control message sent in replyLAC to accept areceived Start-Control-Connection-Reply message. Thissession for placing an outgoing call. 5.2.1 Incoming Call Establishment A three messageprovides closureexchange is employed to setup thetunnel establishment process, and includessession. Following is achallenge response if the peertypical sequence of events: LAC LNS --- --- (Call Detected) ICRQ -> <- ICRP ICCN -> <- ZLB ACK The ZLB ACK is senta challengeif there are no further messages waiting inthe Start-Control-Connection-Reply message. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |queue for that peer. Townsley, et al. Standards Track [Page 40] INTERNET DRAFT L2TPControl Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Start-Control-Connection-Connected | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Challenge Response | +-+-+-+-+-+-+-+-+-+-+-+-+ Start-Control-Connection-Connected 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 3 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a Value of 3, indicating Start- Control-Connection-Connected. The Flags indicate a mandatory option. Challenge 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|0|0| 22 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 13 | Response... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Response... (128 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Challenge Response AVP within a Start-Control-Connection- Connected packet provides a response to a challenge received. The Attribute value is 13, indicating Response, and the Value fieldFebruary 1999 5.2.2 Outgoing Call Establishment A three message exchange isa 128-bit value reflecting the CHAP-style responseemployed to setup thechallenge. This AVPsession. Following ismarked mandatory, and MUST be present ifaValencia expires June 1999 [Page 41] INTERNET DRAFT October 1998 challenge was received, otherwise MUST be omitted. For purposes of the ID value in the CHAP response calculation, the value 3 (corresponding to the Value fieldtypical sequence ofthe Start-Control- Connection-Connected AVP) MUST be used. 6.4 Stop-Control-Connection-Notification (StopCCN)events: LAC LNS --- --- <- OCRQ OCRP -> (Perform Call Operation) OCCN -> <- ZLB ACK TheStop-Control-Connection-NotificationZLB ACK isan L2TP control messagesentby 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 callsif there areimplicitly cleared. The reasonno further messages waiting in queue forissuing this requestthat peer. 5.3 Forwarding PPP Frames Once tunnel establishment isindicatedcomplete, PPP frames from the remote system are received at the LAC, stripped of CRC, link framing, and transparency bytes, encapsulated in L2TP, and forwarded over theResult Code AVP. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Stop-Control-Connection-Notification| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Tunnel ID | | Result Code | +-+-+-+-+-+-+-+-+-+-+-+-+ Stop-Control-Connection-Notification 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+appropriate tunnel. TheMessage Type AVP containsLNS receives the L2TP packet, and processes the encapsulated PPP frame as if it were received on aValue of 4, indicating Stop- Control-Connection-Notification.local PPP interface. TheFlags indicatesender of amandatory option. Assigned Tunnelmessage associated with a particular session and tunnel places the Session ID0 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 9 |and Tunnel ID| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute value is 9, indicating Assigned Tunnel ID,(specified by its peer) in the Session ID andis marked mandatory. This AVP MUST be present. The ValueTunnel ID header for all outgoing messages. In this manner, PPP frames are multiplexed and demultiplexed over a single tunnel between a given LNS-LAC pair. Multiple tunnels may exist between a given LNS-LAC pair, and multiple sessions may exist within a tunnel. For the cases where a Session ID has not yet been assigned by the peer (i.e., during establishment of a new session or tunnel), the Session ID field MUST be sent as 0, and thesameAssigned Session ID AVP or Assigned Tunnel IDfirst sent to the receiving peer. ThisAVPpermitswithin thepeermessage MUST be used to identify theappropriatesession or tunneleven if Stop-Control-Connection-Notification mustwhen necessary. Similarly, for cases where the Tunnel ID has not yet been assigned from the peer, the Tunnel ID MUST be sentbefore an Assignedas 0. Thus, the value of 0 for Session ID and Tunnel ID isreceived. Valencia expires June 1999special and MUST NOT be used as an Assigned Session ID or Assigned Tunnel ID. Townsley, et al. Standards Track [Page42]41] INTERNET DRAFTOctober 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 + Message len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1 | Result Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | Optional Message ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Result Code AVP within a Stop-Control-Connection-Notification packet indicatesL2TP February 1999 5.4 Using Sequence Numbers on thereason for terminatingData Channel Sequence numbers are defined in the L2TP header for controlchannel. It is encoded as Attribute 1, indicating a Result Code AVP. This AVP is mandatorymessages andMUST be present. The Result Code is a 16-bit word. The 16-bit word following the Result Code field contains the Error Code value, whichoptionally for data messages (see Section 3.1). These are used to provide aStop-Control-Connection- Notification is always 0. Anreliable control message transport (see Section 5.8) and optional data messagecan followsequencing. Each peer maintains separate sequence numbers for theError Code field. Its presencecontrol connection andlength is indicated by the value ofeach individual data session within a tunnel. Unlike theAVP length field. Defined Result Code values are: 1 - General request to clearL2TP controlconnection 2 - General error--Error Code indicateschannel, theproblem 3 - ControlL2TP data channelalready exists 4 - Requester isdoes notauthorizedretransmit lost data messages. Sequence numbers may be provided and used toestablish a control channel 5 -detect data message loss or to reorder messages on the data channel. Theprotocol version ofLAC may request that sequence numbers be present in data messages via therequesterSequencing Required AVP (see Section 4.3.6). If this AVP isnot supported Error Code indicates highest version supported 6 - Requesterpresent during session setup, sequence numbers MUST be present at all times. If this AVP isbeing shut down 7 - Finite State Machine error 6.5 Hello The Hello messagenot present, sequencing presence isan L2TPunder controlmessage sent by either peerofa LAC-LNS control connection. This control message is used as a "keepalive" forthetunnel.LNS. Thesending of Hello messagesLNS controls enabling andthe policy fordisabling of sequence numbers by sendingthem are left up to the implementation. A peer MUST NOT "expect" Hello messagesa data message with or without sequence numbers present at any timeor interval. When a Hello is received, it MUST be ignored (after updating any effects ofduring theindicated Nr/Ns values, and being acknowleged). Since a Hello islife of acontrol message, and control messages are reliably sent by the lower level transport, this keepalive function operates by causingsession. Thus, if thetransport level to reliably deliverLAC receives amessage.data message without sequence numbers present, it MUST stop sending sequence numbers in future data messages. If the LAC receives amedia interruption has occurred,data message with sequence numbers present, it MUST begin sending sequence numbers in future outgoing data messages. If thereliable transport will be unable to deliverLNS enables sequencing after disabling it earlier in theHello across, and will cleansession, the sequence number state picks up where it left off before. The LNS may initiate disabling of sequencing at any time during thetunnel. Keepalives forsession (including thetunnel MAYfirst data message sent). It is recommended that for connections where reordering or packet loss may occur, sequence numbers always beimplemented by sending a Hello once every 60 secondsenabled during the initial negotiation stages of PPP and disabled only when and if60 seconds have passed without receivingthe risk is considered acceptable. For example, if the PPP session being tunneled is not utilizing anymessage (payloadstateful compression orcontrol, including ZLB messages) fromencryption protocols and is only carrying IP (as determined by thepeer. Hello messagesPPP NCPs that areglobal to the tunnel;established), then theCall ID fieldLNS might decide to disable sequencing as IP is tolerant to datagram loss and reordering. 5.5 Keepalive (Hello) A keepalive mechanism is employed by L2TP in order to differentiate tunnel outages from extended periods ofthese Valencia expires June 1999 [Page 43] INTERNET DRAFT October 1998no controlmessages MUST be 0. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hello | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+or data activity on a tunnel. This is accomplished by injecting Hello0 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 6 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP containscontrol messages (see Section 6.5) after aValuespecified period of6, indicating Hello The Flags indicatetime has elapsed since the last data or control message was received on amandatory option. 6.6 Outgoing-Call-Request (OCRQ) The Outgoing-Call-Request is an L2TPtunnel. As for any other control message, if the Hello messagesent byis not reliably delivered then theLNS totunnel is declared down and is reset. The transport reset mechanism along with theLAC to indicateinjection of Hello messages ensures thatan outbound call froma Townsley, et al. Standards Track [Page 42] INTERNET DRAFT L2TP February 1999 connectivity failure between the LNSis to be established. This request providesand the LACwith information required to make the call. It also provides information towill be detected at both ends of a tunnel. 5.6 Session Teardown Session teardown may be initiated by either the LACthator LNS and isused to regulate the transmission of data toaccomplished by sending a CDN control message. After theLNS for thislast sessiononce itisestablished. Thiscleared, the control connection MAY be torn down as well (and typically is). Following is an example of a typical control message exchange: LAC or LNS LAC or LNS CDN -> (Clean up) <- ZLB ACK (Clean up) 5.7 Control Connection Teardown Control connection teardown may be initiated by either the LAC or LNS and is accomplished by sending a single StopCCN control message. The receiver of a StopCCN MUST send a ZLB ACK to acknowledge receipt of thefirst inmessage and maintain enough control connection state to properly accept StopCCN retransmissions over at least a full retransmission cycle (in case the"three-way handshake" used by L2TP for establishing outgoing calls.ZLB ACK is lost). Thefirstrecommended time for a full retransmission cycle is 31 seconds (see section 5.8). Following is an example of a typical control messagerequestsexchange: LAC or LNS LAC or LNS StopCCN -> (Clean up) <- ZLB ACK (Wait) (Clean up) An implementation may shut down an entire tunnel and all sessions on thecall;tunnel by sending thesecond indicates thatStopCCN. Thus, it is not necessary to clear each session individually when tearing down thecall was successfully initiated.whole tunnel. 5.8 Reliable Delivery of Control Messages L2TP provides a lower level reliable transport service for all control messages. ThethirdNr andfinal message indicates thatNs fields of thecall was established. An LNS MUST have received a Bearer Capabilities AVP during tunnel establishment from an LAC in order to request an outgoing callcontrol message header (see section 3.1) belong tothat LAC. Valencia expires June 1999this transport. The upper level Townsley, et al. Standards Track [Page44]43] INTERNET DRAFTOctober 1998 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |L2TPControl Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Outgoing-Call-Request | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Call ID | | Call Serial Number | | Minimum BPS | | Maximum BPS | | Bearer Type | | Framing Type | | Receive Window Size | | Packet Processing Delay | | Dialed Number | | Sub-Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+ Outgoing-Call-Request 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 7 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a ValueFebruary 1999 functions of7, indicating Outgoing- Call-Request.L2TP are not concerned with retransmission or ordering of control messages. TheOutgoing-Call-Request encodesreliable control message is arequest to an LAC to establish an outgoing call. The flags indicatesliding window transport that provides control message retransmission and congestion control. Each peer maintains separate sequence number state for the control connection within amandatory option. Assigned Call 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 14 | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+tunnel. TheAssigned Call ID AVP encodesmessage sequence number, Ns, begins at 0. Each subsequent message is sent with theID being assigned to this call bynext increment of theLNS.sequence number. TheAttribute valuesequence number is14, indicating Assigned Call ID, and is marked mandatory. This AVP MUST be present.thus a free running counter represented modulo 65536. TheLAC places this valuesequence number in theCall IDheaderfieldofall commanda received message is considered less than or equal to the last received number if its value lies in the range of the last received number andpayload packets that it subsequently transmits overthetunnel that belong to this call.preceding 32767 values, inclusive. For example, if the last received sequence number was 15, then messages with sequence numbers 0 through 15, as well as 32784 through 65535, would be considered less than or equal. Such a message would be considered a duplicate of a message already received and dropped silently. All control messages take up one slot in the control message sequence number space, except the ZLB acknowledgement. Thus, Ns is not incremented after a ZLB message is sent. TheCall ID valuelast received message number, Nr, isan identifier assignedused to acknowledge messages received by an L2TP peer. It contains theLNSsequence number of the message the peer expects tothis session. Itreceive next (e.g. the last Ns of a non- ZLB message received plus 1, modulo 65536). While the Nr in a received ZLB is used tomultiplex and demultiplex dataflush messages from the local retransmit queue (see below), Nr of the next message sentover that tunnel betweenis not be updated by theLNSNs of the ZLB. The reliable transport at a receiving peer is responsible for making sure that control messages are delivered in order andLAC. Valencia expires June 1999 [Page 45] INTERNET DRAFT October 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 15 | CSN (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CSN (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Call Serial Number AVP encodes an identifier assigned by the LNS to this call. Attribute is 15, indicating Call Serial Number, and is marked mandatory. This AVP MUST be present. The Call Serial Number is intendedwithout duplication to the upper level. Messages arriving out of order may bean easy referencequeued foradministrators on both ends ofin-order delivery when the missing messages are received, or they may be discarded requiring a retransmission by the peer. Each tunnel maintains a queue of control messages touse when investigating call failure problems. Call Serial Numbers shouldbesettransmitted toprogressively increasing values,its peer. The message at the front of the queue is sent with a given Ns value, and is held until a control message arrives from the peer in whichare likely to be unique forthe Nr field indicates receipt of this message. After asignificantperiod of timeacross all interconnected LNS and LACs. Other identification information may also be prepended. 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(a recommended default is 1+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 16 | BPS (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Minimum BPS AVP encodessecond) passes without acknowledgement, thelowest acceptable line speed for this call. Attribute is 16, Minimum BPS, andmessage ismarked mandatory. This AVP MUST be present.retransmitted. TheBPSretransmitted message contains the same Ns value, but the Nr valueindicatesMUST be updated with thespeed in 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 0sequence number of the next expected message. Each subsequent retransmission of a message MUST employ an exponential backoff interval. Thus, if the first retransmission occurred after 1 second, the next retransmission should occur after 23Townsley, et al. Standards Track [Page 44] INTERNET DRAFT L2TP February 1999 seconds has elapsed, then 45 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 17 | BPS (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Maximum BPS AVP encodesseconds, etc. An implementation MAY place a cap upon thehighest acceptable line speed for this call. Attributemaximum interval between retransmissions. This cap MUST be no less than 8 seconds per retransmission. If no peer response is17, indicating Maximum BPS,detected after several retransmissions, (a recommended default is 5, but SHOULD be configurable), the tunnel and all sessions within MUST be cleared. When a tunnel ismarked mandatory. This AVPbeing shut down for reasons other than loss of connectivity, the state and reliable delivery mechanisms MUST bepresent. The BPS value indicatesmaintained and operated for theValencia expires June 1999 [Page 46] INTERNET DRAFT October 1998 speed in bits/second. Bearer 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 18 |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 forfull retransmission interval after therequested call. The Attribute is 18, indicating Bearer Type, andfinal message exchange has occurred. A sliding window mechanism ismarked mandatory. Thisused for control message transmission. Consider two peers A & B. Suppose A specifies a Receive Window Size AVPMUST be present. The Value iswith a32-bit quantity indicatingvalue of N in thebearer capability requiredSCCRQ or SCCRP messages. B is now allowed to have up to N outstanding control messages. Once N have been sent, it must wait forthis outgoing call. If set, bit A indicates that the call should be onananalog channel. If set, bit D indicatesacknowledgment that advances thecall should be on a digital channel. Bothwindow before sending new control messages. An implementation maybe set, indicating that the call can be of either type. A particular bit in the Value fieldsupport a receive window ofthis AVP MAYonlybe set1 (i.e., bythe LNS if it was set in the Bearer Capabilitiessending out a Receive Window Size AVPreceived from the LAC during control session establishment. Framing Type 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3with a value of 1), but MUST accept a window of up to 45 6 7 8 9 0 1 2 3from its peer (e.g. have the ability to send 45 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 19 |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 0messages before backing off). A value of 00|A|S| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Framing Type AVP encodes the framing typefor therequested call. AttributeReceive Window Size AVP is19, indicating Framing Type,invalid. When retransmitting control messages, a slow start andis marked mandatory. This AVP MUSTcongestion avoidance window adjustment procedure SHOULD bepresent.utilized. The32-bit field indicates the type of PPP framing to be usedrecommended procedure forthe outgoing call. If set, Bitthis is described in Appendix A. Aindicates that asynchronous framing should be used. If set, Bit S indicates that synchronous framing should be used. Both may be set, indicating that either typepeer MUST NOT withhold acknowledgment offraming may be usedmessages as a technique forthe call. A particular bit in the Value field of this AVP MAY onlyflow controlling control messages. An L2TP implementation is expected to beset by the LNS if it was set in the Framing Capabilities AVP received from the LAC duringable to keep up with incoming controlsession establishment. Valencia expires June 1999 [Page 47] INTERNET DRAFT October 1998 Receive Window Size 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 10 | Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Receive Window Size AVP encodes the window size being advertised bymessages, possibly responding to some with errors reflecting an inability to honor theLNSrequested action. Appendix B contains examples of control message transmission, acknowledgement, and retransmission. 6.0 Control Connection Protocol Specification The following control connection messages are used to establish, clear and maintain L2TP tunnels. All data is sent in network order (high order octets first). Any "reserved" or "empty" fields MUST be sent as 0 values to allow forthis call. Attributeprotocol extensibility. 6.1 Start-Control-Connection-Request (SCCRQ) Start-Control-Connection-Request (SCCRQ) is10, indicating Receive Window Size,a control message used to initialize a tunnel between an LNS and an LAC. It ismarked mandatory. This AVP is optional. The Size value indicatessent by either Townsley, et al. Standards Track [Page 45] INTERNET DRAFT L2TP February 1999 thenumber of received data packetsLAC or the LNSwill buffer for this call, which is also the maximum number of data packetsto being theLAC should send before waiting for an acknowledgment.tunnel establishement process. Theabsence of thisfollowing AVPs MUST be present in the SCCRQ: Message Type AVPindicates that Sequence and Acknowledgment Numbers are not toProtocol Version Host Name Framing Capabilities Assigned Tunnel ID The Following AVPs MAY beusedpresent in thepayload session for this call. Packet Processing Delay 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 20 | Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Packet Processing Delay AVP encodes the delay thatSCCRQ: Bearer Capabilities Receive Window Size Challenge Tie Breaker Firmware Revision Vendor Name 6.2 Start-Control-Connection-Reply (SCCRP) Start-Control-Connection-Reply (SCCRP) isexpected at the LNS in processingawindow full of packetscontrol message sentby the LAC. Attribute is 20, indicating Packet Processing Delay, and is marked mandatory. This AVP is optional. The Delay value is specifiedinunits of 1/10 seconds. Referreply toAppendix A foradescription of how this valuereceived SCCRQ message. SCCRP isdetermined and used. Dialed 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 6+Phone Number len| 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 21 | Phone Number.. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Phone Number AVP encodes the phone numberused tobe called. Attribute is 21, indicating Phone Number,indicate that the SCCRQ was accepted andis marked mandatory. This AVPestablishment of the tunnel should continue. The following AVPs MUST bepresent.present in the SCCRP: Message Type Protocol Version Framing Capabilities Host Name Assigned Tunnel ID ThePhone Number valuefollowing AVPs MAY be present in the SCCRP: Bearer Capabilities Firmware Revision Vendor Name Receive Window Size Challenge Challenge Response 6.3 Start-Control-Connection-Connected (SCCCN) Start-Control-Connection-Connected (SCCCN) is a control message sent in reply to anASCII string. Contact between the administrator of the LAC andSCCRP. SCCCN completes theLNS maytunnel establishment process. Townsley, et al. Standards Track [Page 46] INTERNET DRAFT L2TP February 1999 The following AVP MUST benecessary to coordinate the value neededpresent inthis AVP. Valencia expires June 1999 [Page 48] INTERNET DRAFT October 1998 Sub-Address 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|0|0| 6+Sub-Address len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 23 |Sub-Address ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Sub-Address AVP encodes additional dialing information. Attribute is 23, indicating Sub-Address, and is marked mandatory. This AVP is optional.the SCCCN: Message Type TheSub-Address value is an ASCII string. Contact betweenfollowing AVP MAY be present in theadministrator ofSCCCN: Challenge Response 6.4 Stop-Control-Connection-Notification (StopCCN) Stop-Control-Connection-Notification (StopCCN) is a control message sent by either the LAC or LNS to inform its peer that the tunnel is being shutdown and theLNS maycontrol connection should benecessaryclosed. In addition, all active sessions are implicitly cleared (without sending any explicit call control messages). The reason for issuing this request is indicated in the Result Code AVP. There is no explicit reply tocoordinatethevalue neededmessage, only the implicit ACK that is received by the reliable control message transport layer. The following AVPs MUST be present inthis AVP. 6.7 Outgoing-Call-Reply (OCRP)the StopCCN: Message Type Assigned Tunnel ID Result Code 6.5 Hello (HELLO) TheOutgoing-Call-ReplyHello (HELLO) message is an L2TP control message sent bythe LAC to the LNS in response toeither peer of areceived Outgoing-Call-Request message. The reply indicates that the LACLAC-LNS control connection. This control message isable to attemptused as a "keepalive" for theoutbound calltunnel. The sending of HELLO messages andalso returns certain parameters regardingthecall attempt. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Outgoing-Call-Reply | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Call ID | | Physical Channel Id | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Outgoing-Call-Reply 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 8 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP containspolicy for sending them are left up to the implementation. A peer MUST NOT expect HELLO messages at any time or interval. As with all messages sent on the control connection, the receiver will return either aValue of 8, indicating Outgoing- Call-Reply. The Outgoing-Call-ReplyZLB ACK or an (unrelated) messageencodespiggybacking theimmediate result of attempting an outgoing call request. The flags indicatenecessary acknowledgement information. Since amandatory option. Valencia expires June 1999 [Page 49] INTERNET DRAFT October 1998 Assigned Call 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 14 | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Assigned Call ID AVP encodes the ID being assigned to this call by the LAC. AttributeHELLO is14, indicating Assigned Call ID,a control message, andis marked mandatory. This AVP MUST be present. Call ID value is an identifier, unique within the tunnel, assignedcontrol messages are reliably sent by thesender to this session. The remote peer MUST placelower level transport, thisCall ID inkeepalive function operates by causing theCall ID portion of all future packets it sends associated with this session. It is usedtransport level tomultiplex and demultiplex data sent over that tunnel betweenreliably deliver a message. If a media interruption has occurred, theLNSreliable transport will be unable to deliver the HELLO across, andLAC. Physical Channel 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 25 | ID (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Physical Channel ID AVP encodeswill clean up thevendor specific physical channel number usedtunnel. Keepalives for thecall. The Attribute value is 25, indicating Physical Channel ID, and is marked optional. This AVP itselftunnel MAY be implemented by sending a HELLO if a period of time (a recommended default isoptional.60 seconds, but SHOULD be configurable) has passed without receiving any message (data or control) from the peer. Townsley, et al. Standards Track [Page 47] INTERNET DRAFT L2TP February 1999 HELLO messages are global to the tunnel. The Session IDis a 32-bit valueinnetwork byte order.a HELLO message MUST be 0. Thevalue is used for logging purposes only. 6.8 Outgoing-Call-Connected (OCCN) Outgoing-Call-ConnectedFollowing AVP MUST be present in the HELLO message: Message Type 6.6 Incoming-Call-Request (ICRQ) Incoming-Call-Request (ICRQ) isan L2TPa control message sent by the LAC to the LNS when an incoming call is detected. It is the first in a three message exchange used for establishing a session within an L2TP tunnel. ICRQ is used to indicate thatthe result ofarequested outgoing call was successful. The LAC MUST send the corresponding Outgoing-Call-Replysession is to be established between the LAC and LNSbefore sendingfor thismessage. This messagecall and provides the LNS with parameter informationtofor the session. The LAC may defer answering the call until it has received an ICRP from the LNS indicating that the session should be established. This mechanism allows the LNS to obtain sufficient information about theparticular parameters used forcall before determining whether it should be answered or not. Alternatively, the LAC may answer the call, negotiate LCP and PPP authentication, and use thecall. It providesinformation gained toallowchoose the LNS. In this case, the call has already been answered by the time the ICRP message is received; the LAC simply spoofs the "call indication" and "call answer" steps in this case. The following AVPs MUST be present in the ICRQ: Message Type Assigned Session ID Call Serial Number The following AVPs MAY be present in the ICRQ: Bearer Type Physical Channel ID Calling Number Called Number Sub-Address 6.7 Incoming-Call-Reply (ICRP) Incoming-Call-Reply (ICRP) is a control message sent by the LNS toregulatethetransmission of dataLAC in response to a received ICRQ message. It is theLACsecond in the three message exchange used forthis session. Valencia expires June 1999establishing sessions within an L2TP tunnel. Townsley, et al. Standards Track [Page50]48] INTERNET DRAFTOctober 1998 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |L2TPControl Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Outgoing-Call-Connected | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Tx) Connect Speed | | Framing Type | | Receive Window Size | | Packet Processing Delay | | Rx Connect Speed | | Sequencing Required | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Outgoing-Call-Connected 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 9 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheFebruary 1999 ICRP is used to indicate that the ICRQ was successful and for the LAC to answer the call if it has not already done so. It also allows the LNS to indicate necessary parameters for the L2TP session. The following AVPs MUST be present in the ICRP: Message TypeAVP containsAssigned Session ID 6.8 Incoming-Call-Connected (ICCN) Incoming-Call-Connected (ICCN) is aValue of 9, indicating Outgoing- Call-Connected. The Outgoing-Call-Connectedcontrol messageencodes the final result of an outgoing call request. The flags indicate a mandatory option. (Tx) Connect Speed 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 24 | BPS (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (Tx) Connect Speed BPS AVP encodes the speed ofsent by thefacility chosen forLAC to theconnection attempt. The Attribute value is 24, indicating (Tx) Connect Speed, and is marked mandatory. This AVP MUST be present. BPS isLNS in response to a32-bit value indicatingreceived ICRP message. It is thespeedthird message inbits/second. Whentheoptional Rx Connect Speed AVPthree message exchange used for establishing sessions within an L2TP tunnel. ICCN ispresent,used to indicate that thevalue in this AVP representsICRP was accepted, thetransmit connect speed, fromcall has been answered, and that theperspective of the LAC (e.g. data flowing fromL2TP session should move to theLACestablished state. It also provides additional information to theclient). WhenLNS about parameters used for theoptionalanswered call (parameters that may not always available at the time the ICRQ is issued). The following AVPs MUST be present in the ICCN: Message Type (Tx) Connect Speed Framing Type The following AVPs MAY be present in the ICCN: Initial Received LCP CONFREQ Last Sent LCP CONFREQ Last Received LCP CONFREQ Proxy Authen Type Proxy Authen Name Proxy Authen Challenge Proxy Authen ID Proxy Authen Response Private Group ID Rx Connect SpeedAVPSequencing Required 6.9 Outgoing-Call-Request (OCRQ) Outgoing-Call-Request (OCRQ) isNOT present,a control message sent by theconnection speed betweenLNS to the LAC to indicate that an outbound call from theclient andLAC isassumedto besymmetric andestablished. It isrepresented bythesingle valuefirst inthis AVP. Valencia expires June 1999a three message exchange used for establishing a session within an L2TP tunnel. Townsley, et al. Standards Track [Page51]49] INTERNET DRAFTOctober 1998 Framing 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 19 |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 AVP encodesL2TP February 1999 OCRQ is used to indicate that a session is to be established between theframing typeLNS and LAC forthe call. The Attribute value is 19, indicating Framing Type,this call andis marked mandatory. This AVP MUST be present. The bit field indicatesprovides thetype of PPP framing usedLAC with parameter information for both thecall. If set, bit A indicatesL2TP session, and the call thatasynchronous framingisbeing used. If set, bit S indicatesto be placed An LNS MUST have received a Bearer Capabilities AVP during tunnel establishment from an LAC in order to request an outgoing call to thatsynchronous framing is being used. A particular type of framing mayLAC. The following AVPs MUST beused only if it was specifiedpresent in the OCRQ: Message Type Assigned Session ID Call Serial Number Minimum BPS Maximum BPS Bearer Type Framing TypeAVP of the Outgoing-Call-Request issued by the LNS.Called Number Theframing typefollowing AVPs MAY beused as an indication to PPP on the LNS as to what link options to use for LCP (refer to "PPPpresent inHDLC-like Framing" [14]). Receive Window Size 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 10 | Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Receive Window Size AVP encodesthewindow size being offeredOCRQ: Sub-Address 6.10 Outgoing-Call-Reply (OCRP) Outgoing-Call-Reply (OCRP) is a control message sent by the LAC to the LNSfor this call. The Attribute value is 10, indicating Receive Window Size, and is marked mandatory. The Size isin response to a16-bit value indicating the number ofreceiveddata packetsOCRQ message. It is theLAC will buffersecond in a three message exchange used forthis call, whichestablishing a session within an L2TP tunnel. OCRP isalso the maximum number of data packetsused to indicate that theLNS should send before waiting for an acknowledgment. This AVPLAC ispresent only if Sequence and Acknowledgment Numbers areable to attempt the outbound call and returns certain parameters regarding the call attempt. The following AVPs MUST beusedpresent in thepayload session for this call. Packet Processing Delay 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 20 | Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Packet Processing Delay AVP encodes the delayOCRP: Message Type Assigned Session ID The following AVPs MAY be present in theLAC expects for processingOCRP: Physical Channel ID 6.11 Outgoing-Call-Connected (OCCN) Outgoing-Call-Connected (OCCN) is awindow full of packetscontrol message sent by theLNS. The Attribute Valencia expires June 1999LAC to the LNS following the OCRP and after the outgoing call has been completed. It is the final message in a three message exchange used Townsley, et al. Standards Track [Page52]50] INTERNET DRAFTOctober 1998 value is 20, indicating Packet Processing Delay, and is marked mandatory. This AVP is optional. The Delay valueL2TP February 1999 for establishing a session within an L2TP tunnel. OCCN isspecified in units of 1/10 seconds. Refer to Appendix Aused tosee a descriptionindicate that the result ofhow this value is determined and used. Rx Connect Speed 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 38 | BPS (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rx Connect Speed BPS AVP encodesa requested outgoing call was successful. It also provides information to thereceive speed ofLNS about thefacility chosen forparticular parameters obtained after theconnection attempt.call was established. TheAttribute value is 38, indicating Rxfollowing AVPs MUST be present in the OCCN: Message Type (Tx) ConnectSpeed, and is marked optional.Speed Framing Type The following AVPs MAY be present in the OCCN: Rx Connect SpeedrepresentsSequencing Required 6.12 Call-Disconnect-Notify (CDN) The Call-Disconnect-Notify (CDN) message is an L2TP control message sent by either thespeedLAC or LNS to request disconnection of a specific call within theconnection fromtunnel. Its purpose is to inform theperspectivepeer of theLAC (e.g. data flowing fromdisconnection and theclient toreason why theLAC). Presencedisconnection occurred. The peer MUST clean up any resources, and does not send back any indication ofthis AVP implies that the connection speed maysuccess or failure for such cleanup. The following AVPs MUST beasymmetric, withpresent in thetransmit connect speed givenCDN: Message Type Result Code Assigned Session ID The following AVPs MAY be present in the(Tx) Connect Speed AVP. BPSCDN: Q.931 Cause Code 6.13 WAN-Error-Notify (WEN) The WAN-Error-Notify message isa 32-bit value indicatingan L2TP control message sent by thespeedLAC to the LNS to indicate WAN error conditions (conditions that occur on the interface supporting PPP). The counters inbits/second. Sequencing Required 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|0|0| 6 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 39 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Sequencing Required AVP indicates to the LNS that Sequence Numbers MUST alwaysthis message are cumulative. This message should only bepresent, thus the ability to dynamically drop sequencing as described in section 4.2 is notsent when anavailable option. The Attribute value is 38, Sequencing Required,error occurs, andis marked mandatory.not more than once every 60 seconds. Thepresence of this AVPcounters are reset when a new call isoptional. This AVPestablished. The following AVPs MUSTNOTbe presentifin theReceive Window Size AVP is not present. There is no value field. 6.9 Incoming-Call-Request (ICRQ) Incoming-Call-RequestWEN: Message Type Townsley, et al. Standards Track [Page 51] INTERNET DRAFT L2TP February 1999 Call Errors 6.14 Set-Link-Info (SLI) The Set-Link-Info message is an L2TP control message sent by theLAC to theLNS toindicate that an inbound call is to be established fromtheLAC. This request providesLAC to set PPP-negotiated options. These options can change at any time during theLNS with parameter information forlife of theincoming call. This message iscall, thus thefirstLAC MUST be able to update its internal call information and behavior on an active PPP session. The following AVPs MUST be present in the"three-way handshake" usedSLI: Message Type ACCM 7.0 Control Connection State Machines The control messages defined in section 6 are exchanged byL2TPway of state tables defined in this section. Tables are defined forestablishingincomingcalls. The LAC may defer answering thecalluntil it has received an Incoming-Call-Reply fromplacement, outgoing call placement, as well as for initiation of theLNS Valencia expires June 1999 [Page 53] INTERNET DRAFT October 1998 indicating thattunnel itself. The state tables do not encode timeout and retransmission behavior, as this is handled in thecall should be established.underlying semantics defined in Section 5.8. 7.1 Control Connection Protocol Operation Thismechanism allows the LNS to obtain sufficient information aboutsection describes thecall before determining whetheroperation of various L2TP control connection functions and thecallControl Connection messages which are used to support them. Receipt of an invalid or malformed Control Connection message should beanswered or not. Alternatively, the LAC may answerlogged appropriately, and thecall, negotiate LCPcontrol connection should be closed andPPP authentication,restarted to ensure recovery into a known state. In several cases in the following tables, a protocol message is sent, andusethen a "clean up" occurs. Note that regardless of theinformation gainedinitiator of the tunnel destruction, the reliable delivery mechanism must be allowed tochooserun (see Section 5.8) before destroying theLNS. In this case,tunnel. This permits thecall has already been answered bytunnel management messages to be reliably delivered to thetimepeer. Appendix B.1 contains an example of lock-step tunnel establishment. 7.2 Control Connection States The L2TP control connection protocol is not distinguishable between theIncoming-Call-Reply messageLNS and LAC, but isreceived;distinguishable between theLAC simply spoofsoriginator and receiver. The originating peer is the"call indication/answer call" phase in this case. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |one which first initiates Townsley, et al. Standards Track [Page 52] INTERNET DRAFT L2TPControl Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Incoming-Call-Request | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Call ID | | Call Serial Number | | Bearer Type | | Physical Channel ID | | Dialed Number | | Dialing Number | | Sub-Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Incoming-Call-Request 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 10 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a ValueFebruary 1999 establishment of10, indicating Incoming- Call-Request. The Incoming-Call-Request message encodes an incoming call being indicated bytheLAC. The flags indicatetunnel (in amandatory option. Assigned Call 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 14 | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Assigned Call ID AVP encodes the ID being assigned totie breaker situation, thiscall by the LAC. The Attribute value is 14, indicating Assigned Call ID, andismarked mandatory. This AVP MUST be present. Thethe winner of the tie). Since either LAC or LNSplaces this value incan be theCall ID header fieldoriginator, a collision can occur. See the Tie Breaker AVP in Section 4.3.3 for a description ofall command and payload packets that belong tothiscallandare subsequently transmitted over the tunnel. The Call ID value is an identifier assigned by the Valencia expires June 1999 [Page 54]its resolution. 7.2.1 Control Connection Establishment State Event Action New State ----- ----- ------ --------- idle Local Send SCCRQ wait-ctl-reply Open request idle Receive SCCRQ, Send SCCRP wait-ctl-conn acceptable idle Receive SCCRQ, Send StopCCN, idle not acceptable Clean up idle Receive SCCRP Send StopCCN idle Clean up idle Receive SCCCN Clean up idle wait-ctl-reply Receive SCCRP, Send SCCCN, established acceptable Send tunnel-open event to waiting sessions wait-ctl-reply Receive SCCRP, Send StopCCN, idle not acceptable Clean up wait-ctl-reply Receive SCCRQ, Clean up, idle lose tie-breaker Re-queue SCCRQ for idle state wait-ctl-reply Receive SCCCN Send StopCCN idle Clean up wait-ctl-conn Receive SCCCN, Send tunnel-open established acceptable event to waiting sessions wait-ctl-conn Receive SCCCN, Send StopCCN, idle not acceptable Clean up wait-ctl-conn Receive SCCRP, Send StopCCN, idle SCCRQ Clean up Townsley, et al. Standards Track [Page 53] INTERNET DRAFTOctober 1998 LACL2TP February 1999 established Local Send tunnel-open established Open request event to waiting (new call) sessions established Admin Send StopCCN idle Tunnel Close Clean up established Receive SCCRQ, Send StopCCN idle SCCRP, SCCCN Clean up idle Receive StopCCN Clean up idle wait-ctl-reply, wait-ctl-conn, established The states associated with the LNS or LAC for control connection establishment are: idle Both initiator and recipient start from thissession. It is usedstate. An initiator transmits an SCCRQ, while a recipient remains in the idle state until receiving an SCCRQ. wait-ctl-reply The originator checks tomultiplex and demultiplex data sent over that tunnel betweensee if another connection has been requested from theLNSsame peer, andLAC. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 15 | CSN (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CSN (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Call Serial Number AVP encodes an identifier assigned byif so, handles theLAC to this call. The Attribute valuecollision situation described in Section 5.8. When an SCCRP is15, Call Serial Number, andreceived, it ismarked mandatory. This AVP MUST be present. Please refer to section 6.6examined for adescription ofcompatible version. If thecontentsversion ofthis AVP. Bearer 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 18 |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 fortheincoming call. The Attribute value is 18, Bearer Type, and is marked mandatory. This AVP is optional. The Valuereply isa 32-bit field indicatinglower than thebearer capability being used byversion sent in theincoming call. If set, bit A indicates thatrequest, thecallolder (lower) version should be used provided it ison an analog channel.supported. Ifset, bit D indicates thatthecall is on a digital channel. Itversion in the reply isvalidearlier and supported, the originator moves toset neithertheA nor D bits. Such a setting may indicate thatestablished state. If thecall wasversion is earlier and notreceived oversupported, aphysical link (e.g ifStopCCN MUST be sent to theLACpeer andPPP are located in the same subsystem). Physical Channel 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 25 | ID (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Valencia expires June 1999 [Page 55] INTERNET DRAFT October 1998 Physical Channel ID AVP encodes the vendor specific physical channel number used forthecall. The Attribute value is 25, Physical Channel ID,originator cleans up and terminates the tunnel. wait-ctl-conn This ismarked optional. The presence of this AVP is optional. ID is a 32-bit value in network byte order. The valuewhere an SCCCN isused for logging purposes only. Dialed 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 6+Phone Number len| 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 21 | Phone Number.. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Dialed Number AVP encodes the dialed number forawaited; upon receipt, theincoming call, that is, DNIS. The Attribute value is 21, Dialed Number, andchallenge response ismarked mandatory.checked. Thepresence of this AVPtunnel either isoptional. The valueestablished, or is torn down if anASCII string. Dialing 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 6+Phone Number len| 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 22 |Phone Number... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Dialing Number AVP encodes the originating number for the incoming call, that is, CLID. The Attribute value is 22, Dialing Number, and is marked mandatory. The presence of this AVP is optional. The valueauthorization failure isan ASCII string. Contact between the administrator of the LAC and the LNSdetected. established An established connection may benecessary to coordinateterminated by either a local condition or thevalue needed in this AVP. Sub-Address 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|0|0| 6+Sub-Address len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 23 |Sub-Address ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Sub-Address AVP encodes additional dialing information. The Attribute value is 23, Sub-Address, and is marked mandatory. The presencereceipt ofthis AVP is optional. The Sub-Address value is an ASCII string. Contact betweena Stop-Control-Connection- Notification. In theadministratorevent of a local termination, theLACoriginator MUST send a Stop-Control-Connection-Notification and clean up theLNS may be necessary to coordinate the value needed in this AVP. Valencia expires June 1999Townsley, et al. Standards Track [Page56]54] INTERNET DRAFTOctober 1998 6.10 Incoming-Call-Reply (ICRP) The Incoming-Call-Reply is anL2TPcontrol message sent by the LNS toFebruary 1999 tunnel. If theLAC in response tooriginator receives areceived Incoming-Call-Request message. The reply indicates that the request was successful. ItStop-Control-Connection-Notification it MUST alsoprovides information to allowclean up theLACtunnel. 7.3 Timing considerations Due toregulatethetransmission of data toreal-time nature of telephone signaling, both the LNSfor this session. Thisand LAC should be implemented with multi-threaded architectures such that messages related to multiple calls are not serialized and blocked. The call and connection state figures do not specify exceptions caused by timers. These are addressed in Section 5.8. 7.4 Incoming calls An Incoming-Call-Request message isthe second in the three-way handshake usedgenerated byL2TP for establishing incoming calls. It indicates tothe LACthatwhen an incoming call is detected (for example, an associated telephone line rings). The LAC selects a Session ID and serial number and indicates the call bearer type. Modems should always indicate analog call type. ISDN calls should indicate digital when unrestricted digital service or rate adaption is used and analog if digital modems are involved. Calling Number, Called Number, and Subaddress may beanswered. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Incoming-Call-Reply | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Assigned Call ID | | Receive Window Size | | Packet Processing Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Incoming-Call-Reply 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 11 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a Value of 11, indicating Incoming- Call-Reply. The Incoming-Call-Replyincluded in the messageencodesif they are available from the telephone network. Once the LAC sends the Incoming-Call-Request, it waits for a responsebyfrom the LNStobut it does not necessarily answer theincomingcallindication given byfrom theLAC.telephone network yet. Theflags indicate a mandatory option. Assigned Call 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 14 | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Assigned Call ID AVP encodes the ID being assignedLNS may choose not tothis call byaccept theLNS.call if: - No resources are available to handle more sessions - TheAttribute value is 14, indicating Assigned Call ID, and is marked mandatory. This AVP MUST be present.dialed, dialing, or subaddress fields do not correspond to an authorized user - TheLAC places this value inbearer service is not authorized or supported If theCall ID header field of all command and payload packets thatLNS chooses to accept the call, itsubsequently transmits overresponds with an Incoming- Call-Reply. When thetunnel that belongLAC receives the Incoming-Call-Reply, it attempts tothisconnect the call.The Call ID valueA final call connected message from the LAC to the LNS indicates that the call states for both the LAC and the LNS should enter the established state. If the call terminated before the LNS could accept it, a Call-Disconnect-Notify isan identifier assignedsent by theLNSLAC to indicate thissession. Itcondition. When the dialed-in client hangs up, the call isused to multiplexcleared normally anddemultiplex data sent over Valencia expires June 1999 [Page 57] INTERNET DRAFT October 1998 that tunnel betweenthe LAC sends a Call-Disconnect-Notify message. If the LNSand LAC. Receive Window Size 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 10 | Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+wishes to clear a call, it sends a Call-Disconnect-Notify message and cleans up its session. Townsley, et al. Standards Track [Page 55] INTERNET DRAFT L2TP February 1999 7.4.1 LAC Incoming Call States State Event Action New State ----- ----- ------ --------- idle Bearer Ring or Initiate local wait-tunnel Ready to indicate tunnel open incoming conn. idle ReceiveWindow Size AVP encodes the receive window size being offered by the LNS for this call. The Attribute value is 10,ICCN, Clean up idle ICRP, CDN wait-tunnel Bearer line drop Clean up idle or local close request wait-reply Local Clean up idle close request or Bearer line drop wait-tunnel tunnel-open Send ICRQ wait-reply wait-reply ReceiveWindow Size, and is marked mandatory.ICRP, Send ICCN established acceptable wait-reply Receive ICRP, Send CDN, idle Not acceptable Clean up wait-reply Receive ICRQ Send CDN idle Clean up wait-reply Receive CDN Clean up idle ICCN wait-reply Local Send CDN, idle close request or Clean up Bearer line drop established Receive CDN Clean up idle established Receive ICRQ, Send CDN, idle ICRP, ICCN Clean up established Bearer line Send CDN, idle drop or local Clean up close request TheSize value indicates the number of received data packets the LNS will buffer for this call, which is also the maximum number of data packetsstates associated with the LACshould send before waitingfor incoming calls are: Townsley, et al. Standards Track [Page 56] INTERNET DRAFT L2TP February 1999 idle The LAC detects anacknowledgment. This AVPincoming call on one of its interfaces. Typically this means an analog line ispresent only if Sequenceringing or an ISDN TE has detected an incoming Q.931 SETUP message. The LAC initiates its tunnel establishment state machine, andAcknowledgment Numbers aremoves tobe used ina state waiting for confirmation of the existence of a tunnel. wait-tunnel In this state thepayloadsession is waiting forthis call. Packet Processing Delay 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 20 | Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Packet Processing Delay AVP encodeseither theexpected delaycontrol connection to be opened or for verification thatoccurs at the LNS in processing a window full of packets sent bytheLAC. The Attribute value is 20, Packet Processing Delay AVP, andtunnel ismarked mandatory.already open. Once an indication that the tunnel has/was opened, session control messages may be exchanged. Thepresencefirst ofthis AVPthese isoptional.the Incoming-Call-Request. wait-reply TheDelay value is specified in units of 1/10 seconds. Refer to Appendix A to seeLAC receives either adescription of how this valueCDN message indicating the LNS isdeterminednot willing to accept the call (general error or don't accept) andused. 6.11 Incoming-Call-Connected (ICCN) The Incoming-Call-Connectedmoves back into the idle state, or an Incoming-Call-Reply message indicating the call is accepted, the LAC sends anL2TP controlIncoming-Call- Connected messagesent byand enters theLAC 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 messageestablished state. established Data is exchanged over thethird in the three-way handshake used by L2TP for establishing incoming calls. It provides a mechanism for providing the LNS with additional information about thetunnel. The callthat cannot, in general,may beobtained at the time the Incoming-Call-Request is issued bycleared following: + An event on theLAC. Valencia expires June 1999 [Page 58] INTERNET DRAFT October 1998 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Incoming-Call-Connected | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (Tx) Connect Speed | | Framing Type | | Receive Window Size | | Packet Processing Delay | | Initial Received LCP CONFREQ | | Last Sent LCP CONFREQ | | Last Received LCP CONFREQ | | Proxy authen type | | Proxy authen name | | Proxy authen challenge | | Proxy authen ID | | Proxy authen response | | Private Group ID | | Rx Connect Speed | | Sequencing Required | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Incoming-Call-Connected 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 12 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+connected interface: TheMessage Type AVP containsLAC sends aValue of 12, indicating Incoming- Call-Connected. The Incoming-Call-ConnectedCall- Disconnect-Notify messageencodes+ Receipt of aresponse by the LAC to the Incoming-Call-Reply message sent by the LAC. The flags indicate a mandatory option. (Tx) Connect Speed 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 24 | BPS (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ (Tx) Connect Speed BPS AVP encodes the speed of the facility chosen for the connection attempt.Call-disconnect-Notify message: TheAttribute value is 24, indicating (Tx) Connect Speed, and is marked mandatory. This AVP MUST be present. BPS is a 32-bit value indicating the speed in bits/second. Valencia expires June 1999 [Page 59] INTERNET DRAFT October 1998 When the optional Rx Connect Speed AVP is present, the value in this AVP represents the transmit connect speed, from the perspective of the LAC (e.g. data flowing from theLACto the client). When the optional Rx Connect Speed AVP is NOT present, the connection speed betweencleans up, disconnecting theclient andcall. + A local reason: The LACis assumed to be symmetric and is represented by the single value in this AVP. Framing 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 19 |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 AVP encodes the framing type for the call. The Attribute value is 19, Framing Type, and is marked mandatory. This AVP MUST be present. The value issends a32-bit bit field indicating the type of PPP framing used for the call. If set, bit A indicates that asynchronous framing is being used. If set, bit S indicates that synchronous framing is being used. A particular type of framing may be used only if was specified in the Value field of the Framing Capabilities AVP received from the LNS during control session establishment. The framing type MAY be used as an indication to PPP on theCall-Disconnect-Notify message. 7.4.2 LNSas to what link options to use for LCP if renegotiation is necessary (refer to "PPP in HDLC-like Framing" [14]).Incoming Call States State Event Action New State ----- ----- ------ --------- idle ReceiveWindow Size 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 10 | Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ICRQ, Send ICRP wait-connect acceptable idle ReceiveWindow Size AVP encodes the window size being offered by the LAC for this call. The Attribute value is 10,ICRQ, Send CDN, idle not acceptable Clean up idle ReceiveWindow Size, and is marked mandatory. This AVP is present only if Sequence and Acknowledgment Numbers are to be used in the payload session for this call. The 16-bit Size value indicates the number of received data packets the LAC will buffer for this call, which is also the maximum number of data packets the LNS should send before waiting for an acknowledgment. Valencia expires June 1999 [Page 60] INTERNET DRAFT October 1998 Packet Processing Delay 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 20 | Delay | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Packet Processing Delay AVP encodes the delay the LAC expects for processing a window full of packets sent by the LNS. The Attribute value is 20, Packet Processing Delay, and is marked mandatory. The presence of this AVP is optional. The 16-bit 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. Initial Received LCP CONFREQ 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|0|0| 6+LCP CONFREQ len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 26 | LCP CONFREQ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The 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 properties the client requested in its initial LCP CONFREQ request. The Attribute value is 26, Initial Received LCP CONFREQ, and is marked optional. The presence of this AVP is optional. The Value field is a copy of the body of the initial CONFREQ received, starting at the first option within this packet's body. Last Sent LCP CONFREQ 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|0|0| 6+LCP CONFREQ len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 27 | LCP CONFREQ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ See Initial Received LCP CONFREQ above for rationale. The Attribute value is 27, Last Sent LCP CONFREQ, and is marked optional. The presence of this AVP is optional. The Value field is a copy of the body of the final CONFREQ sent to the client to complete LCP negotiation, starting at the first option within this packet's body. Valencia expires June 1999 [Page 61] INTERNET DRAFT October 1998 Last Received LCP CONFREQ 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|0|0| 6+LCP CONFREQ len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 28 | LCP CONFREQ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ See Initial Received LCP CONFREQ above for rationale. The Attribute value is 28, Last Received LCP CONFREQ, and is marked optional. The presence of this AVP is optional. The Value field is a copy of the body of the final CONFREQ received from the client to complete LCP negotiation, 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 29 | Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute value is 29, Proxy Authen Type, and is optional. This AVP MUST be present if proxy authentication is to be utilized. If it is not present, then it is assumed that this peer cannot perform proxy authentication, perhaps requiring a restart of the authentication phase at the LNS if the client has already entered this phase with the LAC. The value Type is a 16-bit word, holding a value: 1 - Textual username/password exchange 2 - PPP CHAP 3 - PPP PAP 4 - None 5 - Microsoft CHAP (MSCHAP) Associated AVP's for each type of authentication follow. Proxy Authen 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|0|0| 6 + Name length | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 30 | Name... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute value is 30, Proxy Authen Name, and is marked optional. This AVP MUST be present for Proxy Authen Type values 1, 2, 3 and 5. Valencia expires June 1999 [Page 62] INTERNET DRAFT October 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 6 + Challenge len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 31 | Challenge... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute value is 31, Proxy Authen Challenge, and is marked optional. The AVP itself MUST be present for Proxy authen types 2 and 5. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 32 | ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute value is 32, Proxy Authen ID, and is marked optional. The AVP itself MUST be present for Proxy authen types 2, 3 and 5. For CHAP and MSCHAP, the ID field contains the byte ID value presented to the client by the LAC in its Challenge. For PAP, it is the Identifier value of the Authenticate-Request. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 6 + Response len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 33 | Response... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Attribute value is 33, Proxy Authen Response, and is marked optional. The AVP itself MUST be present for Proxy authen types 1, 2, 3 and 5. The Response field contains the client's response to the challenge. For Proxy authen types 2 and 5, this field contains 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. In the case of cleartext passwords, use of the AVP H bit is recommended. Valencia expires June 1999 [Page 63] INTERNET DRAFT October 1998 Private Group 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|0|0|0|0|0| 6+Private ID len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 37 | Private Group ID ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ PrivateGroup ID AVP is used by the LAC to indicate that this call is to be associated with a particular customer group. The Attribute is 37, Private Group ID, and is marked optional. The presence of this AVP is optional. The LNS MAY treat the PPP session as well as network traffic through this session specially in a manner determined by the peer. For example, if the LNS is individually connected to several private networks using unregistered addresses, this AVP may be included by the LAC to indicate that a given call should be associated with one of the private networks. The Private Group ID is a string corresponding to a table in the LNS that defines the particular characteristics of the selected group. A LAC MAY determine the Private Group ID from a RADIUS response containing the PrivateGroupID attribute [13]. Rx Connect Speed 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|0|0| 10 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 38 | BPS (H) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BPS (L) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Rx Connect Speed BPS AVP encodes the receive speed of the facility chosen for the connection attempt. The Attribute value is 38, indicating Rx Connect Speed, and is marked optional. The Rx Connect Speed represents the speed of the connection from the perspective of the LAC (e.g. data flowing from the client to the LAC). Presence of this AVP implies that the connection speed may be asymmetric, with the transmit connect speed given in the (Tx) Connect Speed AVP. BPS is a 32-bit value indicating the speed in bits/second. Valencia expires June 1999 [Page 64] INTERNET DRAFT October 1998 Sequencing Required 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|0|0| 6 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 39 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Sequencing Required AVP indicates to the LNS that Sequence Numbers MUST always be present, thus the ability to dynamically drop sequencing as described in section 4.2 is not an available option. The Attribute value is 38, Sequencing Required, and is marked mandatory. The presence of this AVP is optional. This AVP MUST NOT be present if the Receive Window Size AVP is not present. There is no value field. 6.12 Call-Disconnect-Notify (CDN) The Call-Disconnect-Notify message is an L2TP control message sent to request disconnection of a specific call within the tunnel. Its purpose is to inform the peer of the disconnection and the reason why the disconnection occurred. The peer MUST clean up any resources, and does not send back any indication of success or failure for such cleanup. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Call-Disconnect-Notify | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Result Code | | Q.931 Cause Code | | Assigned Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+ Call-Disconnect-Notify 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 14 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a Value of 14, indicating Call- Disconnect-Notify. The Call-Disconnect-Notify message encodes a disconnect indication for a specific call within the tunnel. The flags indicate a mandatory option. Valencia expires June 1999 [Page 65] INTERNET DRAFT October 1998 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|0|0|0|0|0| 10 + Message len | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1 | Result Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | Optional Message ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Result Code AVP within a Call-Disconnect-Notify message indicates the reason for the call disconnect. It is encoded as Attribute 1, indicating a Result Code AVP. This AVP is mandatory and MUST be present. The Result Code is a 16-bit word. The 16- bit word following the Result Code field contains the Error Code value. The Result Code value indicates whether the Error Code value is meaningful or not. If Error Code is not meaningful it MUST be set to 0. An optional error message can follow the Error Code field; its presence and length is indicated by the value of the AVP length field. Defined Result Code values are: 1 - Call disconnected due to loss of carrier 2 - Call disconnected for the reason indicated in Error Code. 3 - Call disconnected for administrative reasons 4 - Call failed due to no appropriate facilities being available (temporary condition) 5 - Call failed due to no appropriate facilities being available (permanent condition) 6 - Invalid destination 7 - Call failed due to no carrier detected 8 - Call failed due to detection of a busy signal 9 - Call failed due to lack of a dial tone 10 - Call was not established within time allotted by LAC 11 - Call was connected but no appropriate framing was detected Q.931 Cause 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|0|0| 9+Advisory Msg len| 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 12 | Cause Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Cause Msg |Advisory Msg...| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Q.931 Cause Code AVP is used to give additional information in case of unsolicited call disconnection. The Attribute value is 12, 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 Valencia expires June 1999 [Page 66] INTERNET DRAFT October 1998 is using Q.931/DSS1 for the call. 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 [16]. 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 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 14 | Call ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Assigned Call ID which was provided to the peer, included in the Call-Disconnect-Notify message. This permits a connection to be terminated even before the peer has provided its own Assigned Call ID (the Call ID field in the control message header is 0). The Attribute value is 14, Assigned Call ID, and is marked mandatory. This AVP MUST be present. 6.13 WAN-Error-Notify (WEN) 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 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 15 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a Value of 15, indicating WAN-Error- Notify. The WAN-Error-Notify message encodes information about line and other errors detected on the LAC's physical interface to the Valencia expires June 1999 [Page 67] INTERNET DRAFT October 1998 client. This message is sent by the LAC to the LNS. The flags indicate a mandatory option. Call Errors 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|0|0| 32 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 34 | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CRC Errors | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Framing Errors | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hardware Overruns | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Buffer Overruns | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time-out Errors | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Alignment Errors | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Call Errors AVP is used by the LAC to send error information to the LNS. The Attribute value is 34, 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 session was established Buffer Overruns - Number of buffer over-runs detected since session was established Time-out Errors - Number of time-outs since call was established Alignment Errors - Number of alignment errors since call was established 6.14 Set-Link-Info (SLI) 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. Valencia expires June 1999 [Page 68] INTERNET DRAFT October 1998 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | L2TP Control Message Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Set-Link-Info | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACCM | +-+-+-+-+-+-+-+-+-+-+-+-+-+ Set-Link-Info 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|0|0| 8 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0 | 16 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Message Type AVP contains a Value of 16, indicating Set-Link- Info. The Set-Link-Info message encodes ACCM information sent from the LNS to the LAC after it is negotiated in LCP. The flags indicate a mandatory option. ACCM 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|0|0| 16 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 35 | 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 35, ACCM, and is marked mandatory. This attribute MUST be present. 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 specific 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 Valencia expires June 1999 [Page 69] INTERNET DRAFT October 1998 retransmission 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 connection 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. In several cases in the following tables, a protocol message is sent, and then a "clean up" occurs. Note that regardless of the initiator of the tunnel destruction, the reliable delivery mechanism must be allowed to run (see 6.0.2) before destroying the tunnel. This permits the tunnel management messages to be reliably delivered to the peer. 7.2 Control Connection States Control messages are carried over the same media as the payload messages which are carried following successful connection establishment. The L2TP control connection protocol is not distinguishable between the LNS and LAC, but is distinguishable between the originator and receiver. The originating peer is the one which first initiates establishment of the tunnel (in a tie breaker situation, this is the winner of the tie). 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. 7.2.1 Control Connection Establishment State Event Action New State ----- ----- ------ --------- idle Local Send SCCRQ wait-ctl-reply Open request idle Receive SCCRQ, Send SCCRP wait-ctl-conn acceptable idle Receive SCCRQ, Send StopCCN, idle not acceptable Clean up wait-ctl-reply Receive SCCRP, Send SCCCN, established acceptable Send tunnel-open event to waiting sessions wait-ctl-reply Receive SCCRP, Send StopCCN, idle not acceptable Clean up wait-ctl-reply Receive SCCRQ, Clean up, idle Valencia expires June 1999 [Page 70] INTERNET DRAFT October 1998 lose tie-breaker Re-queue SCCRQ for idle state wait-ctl-conn Receive SCCCN, Send tunnel-open established acceptable event to waiting sessions wait-ctl-conn Receive SCCCN, Send StopCCN, idle not acceptable Clean up established Local Send tunnel-open established Open request event to waiting (new client) sessions established Admin Send StopCCN idle Tunnel Close Clean up wait-ctl-reply, wait-ctl-conn, established Receive StopCCN Clean up idle idle Both initiator and recipient start from this state. An initiator transmits a SCCRQ, while a recipient remains in the idle state until receiving a SCCRQ. wait-ctl-reply The originator checks to see if another connection has been requested from the same peer, and if so, handles the collision situation described in Section 6.0.1. When a SCCRP is received, it is examined for a compatible version. If the version of the reply is lower than the version sent 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 originator moves to the established state. If the version is earlier and not supported, a StopCCN MUST be sent to the peer and the originator cleans up and terminates the tunnel. wait-ctl-conn This is where an SCCCN is awaited; upon receipt, the challenge response is checked. The tunnel is either established, or is torn down if an authorization failure is detected. established An established connection may be terminated by either a local condition or the receipt of a Stop-Control-Connection- Notification. In the event of a local termination, the originator MUST send a Stop-Control-Connection-Notification and clean up the tunnel. If the originator receives a Stop-Control-Connection-Notification it MUST also clean up the tunnel. Valencia expires June 1999 [Page 71] INTERNET DRAFT October 1998 7.3 Timing considerations Because of the real-time nature of telephone signaling, both the LNS and LAC should be implemented with multi-threaded architectures such that messages related to multiple calls are not serialized and blocked. The 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 LAC when an associated telephone line rings. The LAC selects a Call ID and serial number and indicates the call bearer type. Modems should always indicate analog call type. ISDN calls should indicate digital when unrestricted digital service or rate adaption is used and analog if digital modems are involved. CLID, DNIS, and subaddress may be included in the message if they are available from the telephone network. Once the LAC sends the Incoming-Call-Request, it waits for a response from the LNS but it does not necessarily answer the call from the telephone network yet. The LNS may choose not to accept the call if: - No resources are available to handle more sessions - The dialed, dialing, or subaddress fields do not correspond to an authorized user - The bearer service is not authorized or supported If the LNS chooses to accept the call, it responds with an Incoming- Call-Reply which may also indicate window sizes (see Appendix B). When the LAC receives the Incoming-Call-Reply, it attempts to connect the call. A final call connected message from the LAC to the LNS indicates that the call states for both the LAC and the LNS should enter the established state. If the call terminated before the LNS could accept it, a Call-Disconnect-Notify is sent by the LAC to indicate this condition. 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-Disconnect-Notify message and cleans up its session. 7.4.1 LAC Incoming Call States State Event Action New State ----- ----- ------ --------- idle Bearer Ring or Initiate local wait-tunnel Ready to indicate tunnel open incoming conn. wait-tunnel tunnel-open Send ICRQ wait-reply wait-reply Receive ICRP, Answer call, established acceptable Send ICCN Valencia expires June 1999 [Page 72] INTERNET DRAFT October 1998 wait-reply Receive ICRP, Send CDN, idle not acceptable Clean up wait-reply Receive CDN Clean up idle wait-reply Local Send CDN, idle Close request Clean up established Receive CDN Hang up bearer, idle Clean up established Local Hang up bearer, idle Close request Send CDN, Clean up established Bearer Send CDN, idle Line drop Clean up The states associated with the LAC for incoming calls are: idle The LAC detects an incoming call on one of its interfaces. Typically this means an analog line is ringing or an ISDN TE has detected an incoming Q.931 SETUP message. The LAC initiates its tunnel establishment state machine, and moves to a state waiting for confirmation of the existence of a tunnel. wait-tunnel In this state the session is waiting for either the control tunnel to be opened or for verification that the tunnel is already open. Once an indication that the tunnel has/was opened, session control messages may be exchanged. The first of these is the Incoming- Call-Request. wait-reply Incoming-Call-Reply message indicating The LAC receives either a CDN message indicating non-willingness to accept the call (general error or don't accept) and moves back into the idle state, or an Incoming-Call-Reply message indicating the call is accepted, the LAC sends an Incoming-Call-Connected message and enters the established state. established Data is exchanged over the tunnel. The call may be cleared following: An event on the connected interface. The LAC sends a Call- Disconnect-Notify message Receipt of a Call-disconnect-Notify message. The LAC cleans up, disconnecting the call. A local reason. The LAC sends a Call-Disconnect-Notify message. Valencia expires June 1999 [Page 73] INTERNET DRAFT October 1998 7.4.2 LNS Incoming Call States State Event Action New State ----- ----- ------ --------- idle Receive ICRQ, Send ICRP wait-connect acceptable idle Receive ICRQ, Send CDN, idle not acceptable Clean up wait-connect Receive ICCN Prepare for established acceptable data wait-connect Receive ICCN Send CDN, idle not acceptable Clean up wait-connect, established Receive CDN Clean up idle established Local Send CDN, idle Close request Clean up The states associated with the LNS for incoming calls are: idle An Incoming-Call-Request message is received. If the request is not acceptable, a Call-Disconnect-Notify is sent back to the LAC and the LNS remains in the idle state. If the Incoming-Call- Request message is acceptable, an Incoming-Call-Reply is sent. The session moves to the wait-connect state. wait-connect If the session is still connected on the LAC, the LAC sends an Incoming-Call-Connected message to the LNS which then moves into established state. The LAC may send a Call-Disconnect-Notify to indicate that the incoming caller could not be 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 from the LAC or by sending a Call-Disconnect- Notify. Clean up follows on both sides regardless of the initiator. 7.5 Outgoing calls Outgoing calls are initiated by an LNS and instruct an LAC to place a call. There are three messages for outgoing calls: Outgoing-Call- Request, Outgoing-Call-Reply, and Outgoing-Call-Connected. The LNS sends an Outgoing-Call-Request specifying the dialed party phone number and subaddress as well as speed and window parameters. The LAC MUST respond to the Outgoing-Call-Request message with an Valencia expires June 1999 [Page 74] INTERNET DRAFT October 1998 Outgoing-Call-Reply message once the LAC determines that the proper facilities exist to place the call and the call is administratively authorized. For example, is this LNS allowed to dial an international call? Once the outbound call is connected, the LAC sends an Outgoing-Call-Connected message to the LNS indicating the final result of the call attempt: 7.5.1 LAC Outgoing Call States State Event Action New State ----- ----- ------ --------- idle Receive OCRQ, Send OCRP, wait-cs-answer acceptable Open bearer idle Receive OCRQ, Send CDN, idle not acceptable Clean up wait-cs-answer Bearer answer, Send OCCN established framing detected wait-cs-answer Bearer failure Send CDN, idle Clean up wait-cs-answer, established Receive CDN Hang up bearer, idle Clean up The states associated with the LAC for outgoing calls are: idle Received Outgoing-Call-Request. If this is received in error, respond with a Call-Disconnect-Notify. Otherwise, allocate a physical channel and send an Outgoing-Call-Reply. Place the outbound call and move to the wait-cs-answer state. wait-cs-answer If the call is not completed or a timer expires waiting for the call to complete, send a Call-Disconnect-Notify with the appropriate error condition set and go to idle state. If a circuit switched connection is established and framing is detected, send an Outgoing-Call-Connected indicating success and go to established state. established If a Call-Disconnect-Notify is received by the LAC, the telco call MUST be released via appropriate mechanisms and the session cleaned up. If the call is disconnected by the client or the called interface, a Call-Disconnect-Notify message MUST be sent to the LNS. The sender of the Call-Disconnect-Notify message returns to the idle state after sending of the message is complete. Valencia expires June 1999 [Page 75] INTERNET DRAFT October 1998 7.5.2 LNS Outgoing Call States State Event Action New State ----- ----- ------ --------- idle Local Initiate local wait-tunnel Open request tunnel-open wait-tunnel tunnel-open Send OCRQ wait-reply wait-reply Receive OCRP, none wait-connect acceptable wait-reply Receive OCRP, Send CDN idle not acceptable wait-connect Receive OCCN none established established, wait-connect Receive CDN Clean up idle wait-reply, wait-connect, established Local Send CDN idle Close request The states associated with the LNS for outgoing calls are: idle, wait-tunnel When an outgoing call is initiated, a tunnel is first created, much as the idle and wait-tunnel states for an LAC incoming call. Once a tunnel is established, an Outgoing-Call-Request message is sent to the LAC and the session moves into the wait-reply state. wait-reply If a Call-Disconnect-Notify is received, an error occurred, and the session is cleaned up and returns to idle. If an Outgoing- Call-Reply is received, the call is in progress and the session moves to the wait-connect state. wait-connect If a Call-Disconnect-Notify is received, the call failed; the session is cleaned up and returns to idle. If an Outgoing-Call- Connected is received, the call has succeeded and the session may now exchange data. established If a Call-Disconnect-Notify is received, the call has been terminated for the reason indicated in the Result and Cause Codes; the session moves back to the idle state. If the LNS chooses to terminate the session, it sends a Call-Disconnect-Notify to the LAC and then cleans up and idles its session. Valencia expires June 1999 [Page 76] INTERNET DRAFT October 1998 7.6 Tunnel Disconnection The disconnection of a tunnel consists of either peer issuing a Stop-Control-Connection-Notification. The sender of this Notification should wait a finite period of time for the acknowledgment of this message before releasing the control information associated with the tunnel. The recipient of this Notification should send an acknowledgment of the Notification and then release the associated control information. When to release a tunnel is an implementation issue and is not specified in this document. A particular implementation may use whatever policy is appropriate for determining when to release a control connection. Some implementations may leave a tunnel open for a period of time or perhaps indefinitely after the last user session for that tunnel is cleared. Others may choose to disconnect the tunnel immediately after the last user connection on the tunnel disconnects. 8.0 L2TP Over Specific Media L2TP tries to be self-describing, operating at a level above the particular media over which it is carried. However, some details of its connection to media are required to permit interoperable implementations. The following sections describe details needed to permit interoperability over specific media. 8.1 IP/UDP L2TP uses the registered UDP port 1701 [12]. The entire L2TP packet, including payload and L2TP header, is sent within a UDP datagram. The initiator of an L2TP tunnel picks an available source UDP port (which may or may not be 1701), and sends to the desired destination at port 1701. The recipient picks a free port on its own system (which may or may not be 1701), and sends its reply to the initiator's UDP port, setting its own UDP source port set to the free port it found. Once the source and destination ports are established, they MUST remain static for the life of the tunnel. IP fragmentation may occur as the L2TP packet travels over the IP substrate. L2TP makes no special efforts to optimize this. A LAC implementation MAY cause its LCP to negotiate for a specific MRU, which could optimize for LAC environments in which the MTU's of the path over which the L2TP packets are likely to travel have a consistent value. The default for any L2TP implementation is that UDP checksums MUST be enabled for both control and payload messages. An L2TP implementation MAY provide an option to disable UDP checksums for payload packets. It is recommended that UDP checksums always be enabled on control packets. Port 1701 is used for both L2F [2] and L2TP packets. The two types of packets may be detected by their headers; L2TP has a Vers field of Valencia expires June 1999 [Page 77] INTERNET DRAFT October 1998 2, L2F has a Vers field of 1. An L2TP implementation running on a system which does not support L2F MUST silently discard all packets whose Vers field is set to 1. To the PPP clients using an L2TP-over-UDP/IP tunnel, the PPP media has the characteristics of being able to reorder or silently drop packets. The former may break non-IP protocols being carried by PPP, especially LAN-centric ones such as bridging. The latter may break protocols which assume per-packet indication of error, such as TCP header compression. The former may be handled by using L2TP payload sequence numbers if any PPP protocol is used which cannot tolerate reordering. The latter characteristic of silently dropping packets is perhaps more problematic. If RFC 1663 reliable delivery [10] is enabled, no upper PPP protocol will encounter lost packets. If L2TP sequence numbers are enabled, L2TP can detect the packet loss. In the case of an LNS, the PPP and L2TP stacks are both present within the LNS, and packet loss signaling may occur precisely as if a packet was received with a CRC error. Where the LAC and PPP stack are co-resident, this technique also applies. Where the LAC and PPP client are physically distinct, the analogous signaling MAY be accomplished by sending a packet with a CRC error to the PPP client. Note that this would greatly increase the complexity of debugging client line problems, since the client statistics can not distinguish between true media errors and LAC-initiated ones. This technique is also not possible on all hardware. If neither RFC 1663 nor sequence numbers are enabled, each lost packet results in a 1 in 2**16 chance of a TCP segment being forwarded with incorrect contents [11]. Where the combination of the packet loss rate with this statistical exposure is unacceptable, TCP header compression SHOULD NOT be used in this configuration. In general, it is wise to remember that the L2TP/UDP/IP transport is an unreliable transport. As with any PPP media which is subject to loss, care should be taken when using protocols which are particularly sensitive this. Such protocols might include stateful compression or encryption protocols. 8.2 IP When operating in IP environments, L2TP MUST offer the UDP encapsulation described in 8.1 as its default configuration for IP operation. Other configurations (perhaps corresponding to a compressed header format) may be defined, and made available as a configurable option. 9.0 Security Considerations L2TP encounters several security issues in its operation. The general approach of L2TP to these issues is documented here. Valencia expires June 1999 [Page 78] INTERNET DRAFT October 1998 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 replay and snooping during the tunnel establishment process. This mechanism is not designed to provide any authentication beyond tunnel establishment; it is fairly simple for a malicious user who can snoop and inject packets to hijack a tunnel once an authenticated tunnel establishment has been completed successfully. In environments where some L2TP peers will be authenticated, but others not, a mechanism should be provided to control when tunnel endpoint authentication will be active. The LAC and LNS MUST share a single secret for authentication of both ends of the tunnel. Each side uses this same secret when acting as authenticatee as well as authenticator. Since a single secret it used, the tunnel authentication AVPs include differentiating values in the CHAP ID fields for each message digest calculation to guard against replay attacks. For L2TP tunnels over IP, IPSEC [17] provides very strong protection of the tunnel. This requires no modification to the L2TP protocol, and leverages extensive IETF work in this area. For L2TP tunnels over Frame Relay or other switched networks, current practice indicates that these media are much less likely to experience attacks of in-transit data. If these attacks become prevalent, either the media or the L2TP packets would have to be encrypted or authenticated. Because the shared secret used for endpoint authentication is the same shared secret used to obscure AVP contents using the H (Hidden) bit, tunnel authentication must be used in all cases where the H bit will be used. Proxy authentication involving PAP may be usable without the H bit if PAP is only carrying one-time passwords; if clear text passwords are carried in the proxy authentication, the H bit (and, by implication, tunnel authentication) should be used. To protect against exhaustive attack during tunnel authentication, no tunnel authentication response should ever be accepted if it corresponds to a challenge more than one minute old. 9.2 Client Security A more systematic method of protection in tunneled PPP environments may be achieved through client security. PPP layer encryption would provide end-to-end security for 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 carrying tunnel, as well as attacks on the LAC itself. Because both encryption and compression can occur at the PPP layer, the two can be coordinated, permitting compression to Valencia expires June 1999 [Page 79] INTERNET DRAFT October 1998 precede encryption. 9.3 Proxy Authentication The optional proxy CHAP function of L2TP can permit an entirely transparent PPP tunnel, with a single LCP and CHAP sequence being seen by the client. For cases where the LAC and the entire path to the LNS are operated by a single entity, this function may provide acceptable security. For cases where LNS-initiated authentication is required, proxy CHAP still permits an initial access decision to be made before accepting the tunnel, permitting the LNS in most cases to reject tunnel initiations rather than accept them and later disconnect. The optional proxy PAP may result in the cleartext password traversing the tunnel. Where PAP is being used in conjunction with static passwords, this may pose a significant security issue. Where PAP is only used to transport one-time passwords, such issues may be greatly mitigated. The H bit of the carrying AVP may be used to protect against this. All implementations MUST accept proxy authentication AVP's, but are free to silently discard them and initiate an entirely new authentication with the PPP client. 10.0 IANA Considerations This document contains many "magic" numbers to be maintained by the IANA. This section explains the criteria to be used by the IANA to assign additional numbers in each of these lists. Numbers may only be assigned if an appropriate IETF approved document exists that describes how the number is to be used in an interoperable fashion. All values not explicitly defined in previous sections are reserved to IANA. 10.1 AVP Attribute Type Values The Attribute type values are 16 bit values. These values define the type and the usage of the data in the AVP. 10.2 Message type values The Message type values are 16 bit values, used in the Message Type AVP to define the function of the control message. 10.3 Result code values The Result code values are 16 bit values that define possible error conditions. 10.4 Framing Capabilities & Bearer Capabilitities Framing Capabilities and Bearer Capabilitities are both 32 bit bitmasks. These bits should only be assigned to IETF Standards Valencia expires June 1999 [Page 80] INTERNET DRAFT October 1998 Track documents. 10.5 Proxy Authen Type values The Proxy Authen Type values are 16 bit values that define the type of PPP authentication that is being sent as a proxy in the session. 10.6 AVP Header bits There are four remaining reserved bits in the AVP header. These should only be assigned if absolutely necessary, and only to IETF Standards Track documents. 10.7 Message (Payload and Control) Header bits The are seven remaining reserved bits in the message header. While the message and payload headers are distinguishable via the T-bit, they share the same bit field space. Thus, assigning a bit for the control or payload header reserves the same bit position in both headers. 11.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 of Ascend Communications made valuable refinements to the protocol definition of L2TP and contributed to the editing of this document. Steve Cobb and Evan Caves redesigned the state machine tables. Barney Wolff provided a great deal of design input on the endpoint authentication mechanism. 12.0 Contacts Kory Hamzeh, Allan Rubens Ascend Communications 1275 Harbor Bay Parkway Alameda, CA 94502 kory@ascend.com acr@del.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 Valencia expires June 1999 [Page 81] INTERNET DRAFT October 1998 W. Mark Townsley Cisco Systems 7025 Kit Creek Road PO Box 14987 Research Triangle Park, NC 27709 townsley@cisco.com Gurdeep Singh Pall Microsoft Corporation Redmond, WA gurdeep@microsoft.com Bill Palter Network Alchemy, Inc 1521.5 Pacific Ave Santa Cruz, CA 95060 palter@zev.net Jeff Taarud Copper Mountain Networks, Inc. 3931 Sorrento Valley Blvd. San Diego, CA 92121 jtaarud@coppermountain.com William Verthein 3COM Corporation william_verthein@3com.com 13.0 References [1] W. Simpson, "The Point-to-Point Protocol (PPP)", RFC 1661, 07/21/1994 [2] A. Valencia, M. Littlewood, T. Kolar, "Cisco Layer Two Forwarding (Protocol) L2F", RFC 2341, May 1998 [3] K. Hamzeh, G. Pall, W. Verthein, J. Taarud, W. Little, G. Zorn, "Point-to-Point Tunneling Protocol (PPTP)",``work in progress'', October 1998 [4] P. Mockapetris, "Domain Names - Concepts and Facilities", RFC 1034, November 1987 [5] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1700, USC/Information Sciences Institute, October 1994. [6] B. Braden, D. Clark, J. Crowcroft, B. Davie, S. Deering, D. Estrin, S. Floyd, V. Jacobson, G. Minshall, C. Partridge, L. Peterson, K. Ramakrishnan, S. Shenker, J. Wroclawski, L. Zhang. Recommendations on Queue Management and Congestion Avoidance in the Internet. RFC 2309 April 1998. [7] D. Carrel, L. Grant, "The TACACS+ Protocol", draft-grant-tacacs-00.txt, Valencia expires June 1999ICRP Send CDN idle Clean up idle Receive ICCN Clean up idle wait-connect Receive ICCN Prepare for established Townsley, et al. Standards Track [Page82]57] INTERNET DRAFTOctober 1998 October 1996 [8] C. Rigney, A. Rubens, W. A. Simpson, S. Willens, "Remote Authentication Dial In User Service (RADIUS)." RFC 2058, January 1997. [9] K. Sklower, B. Lloyd, G. McGregor, D. Carr, T. Coradetti, RFC 1990, "The PPP Multilink Protocol (MP)", August 1996. [10] D. Rand, "PPP Reliable Transmission", RFC 1663, July, 1994 [11] V. Jacobson, "Compressing TCP/IP Headers for Low-Speed Serial Links", RFC 1144, February, 1990 [12] "SMI Network Management Private Enterprise Codes", ftp://ftp.isi.edu/in-notes/iana/assignments/enterprise-numbers [13] G. Zorn, D. Leifer, A. Rubens, J. Shriver, "RADIUS Attributes for Tunnel Protocol Support," draft-ietf-radius-tunnel-auth-04.txt, November 1997 [14] W. Simpson, "PPP in HDLC-like Framing", RFC 1662, 07/1994 [15] Bradner, S, "Key wordsL2TP February 1999 acceptable data wait-connect Receive ICCN Send CDN, idle not acceptable Clean up wait-connect Receive ICRQ, Send CDN idle ICRP Clean up idle, Receive CDN Clean up idle wait-connect, established wait-connect Local Send CDN, idle established Close request Clean up established Receive ICRQ, Send CDN idle ICRP, ICCN Clean up The states associated with the LNS foruse in RFCsincoming calls are: idle An Incoming-Call-Request message is received. If the request is not acceptable, a Call-Disconnect-Notify is sent back toIndicate Requirement Levels", RFC 2119, March 1997. [16] ITU-T Recommendation "Digital subscriber Signaling System No. 1 (DSS 1) - ISDN user-network interface layer 3 specification for basic call control", Rec. Q.931(I.451), March 1993. [17] S. Kent, R. Atkinson, "Security Architecture fortheInternet Protocol", ``work in progress'' draft-ietf-ipsec-arch-sec-04.txt, March 1998. [18] H. Alvestrand, "IETF Policy on Character Sets and Languages", RFC 2277, January 1998. Appendix A: Acknowledgment Timeouts L2TP uses sliding windowsLAC andtimeoutsthe LNS remains in the idle state. If the Incoming-Call- Request message is acceptable, an Incoming-Call-Reply is sent. The session moves toprovidethe wait-connect state. wait-connect If the sessionand control flow-control acrossis still connected on theunderlying medium (which may beLAC, the LAC sends aninternetwork) and to perform efficient data bufferingIncoming-Call-Connected message tokeeptheLAC-LNS data channels full without causing receive buffer overflow. L2TP requires thatLNS which then moves into established state. The LAC may send atimeoutCall-Disconnect-Notify to indicate that the incoming caller could not beusedconnected. This could happen, for example, if a telephone user accidentally places a standard voice call torecoveran LAC resulting in a handshake failure on the called modem. established The session is terminated either by receipt of a Call-Disconnect- Notify message fromdropped datathe LAC oracknowledgment packets forby sending a Call-Disconnect- Notify. Clean up follows on bothcontrolsides regardless of the initiator. 7.5 Outgoing calls Outgoing calls are initiated by an LNS anddata messages.instruct an LAC to place a call. There are three messages for outgoing calls: Outgoing-Call- Townsley, et al. Standards Track [Page 58] INTERNET DRAFT L2TP February 1999 Request, Outgoing-Call-Reply, and Outgoing-Call-Connected. Theonly real difference betweenLNS sends an Outgoing-Call-Request specifying theflow-control mechanism used fordialed party phone number, subaddress and other parameters. The LAC MUST respond to thetwoOutgoing-Call-Request messagetypes iswith an Outgoing-Call-Reply message once the LAC determines thatcontrol messages are retransmitted upon expiration oftheacknowledgment timeout in orderproper facilities exist toassure reliable transport while payload messages are never retransmitted. Because payload messages are not retransmitted,place the call and the call is administratively authorized. For example, is this LNS allowed to dial an international call? Once the outbound call is connected, the LAC sends an Outgoing-Call-Connected message to the LNS indicating theaction taken upon expirationfinal result of theacknowledgment timeout for each message type also differs. Whencall attempt: 7.5.1 LAC Outgoing Call States State Event Action New State ----- ----- ------ --------- idle Receive OCRQ, Send OCRP, wait-cs-answer acceptable Open bearer idle Receive OCRQ, Send CDN, idle not acceptable Clean up idle Receive OCRP Send CDN idle Clean up idle Receive OCCN, Clean up idle CDN wait-cs-answer Bearer answer, Send OCCN established framing detected wait-cs-answer Bearer failure Send CDN, idle Clean up wait-cs-answer Receive OCRQ, Send CDN idle OCRP, OCCN Clean up established Receive OCRQ, Send CDN idle OCRP, OCCN Clean up wait-cs-answer, Receive CDN Clean up idle established established Bearer line drop, Send CDN, idle Local close Clean up request The states associated with thetimeoutLAC fora control session expires the previously Valencia expires June 1999outgoing calls are: Townsley, et al. Standards Track [Page83]59] INTERNET DRAFTOctober 1998 transmitted control messageL2TP February 1999 idle If Outgoing-Call-Request is received in error, respond withNs value equala Call-Disconnect-Notify. Otherwise, allocate a physical channel and send an Outgoing-Call-Reply. Place the outbound call and move to thehighest in- sequence value of Nr received fromwait-cs-answer state. wait-cs-answer If thepeercall isretransmitted. The receiving peer doesnotadvance its value for the receive sequence number state, Sr, for either a control sessioncompleted orpayload session until it receivesamessage with Ns equal to its current value of Sr (excepttimer expires waiting for thesimple receiver described in Appendix C and payload packets with the R bit set). This rule assures that all subsequent acknowledgments for this session will contain an Nr value equalcall tothe Ns value of the first missing message untilcomplete, send amessageCall-Disconnect-Notify with themissing Ns valueappropriate error condition set and go to idle state. If a circuit switched connection isreceived. This rule also assures that whenestablished and framing is detected, send an Outgoing-Call-Connected indicating success and go to established state. established If apayload messageCall-Disconnect-Notify islost anywhere withinreceived by thecurrent transmit window,LAC, thepayload session acknowledgment timeout will expire, allowingtelco call MUST be released via appropriate mechanisms and thetransmitter to adjust transmission parameters such as those suggested in this appendix. According tosession cleaned up. If theabove rule for updating ofcall is disconnected by thereceiving peer's Sr value,client or theloss ofcalled interface, atransmitted payloadCall-Disconnect-Notify message(due to non- retransmission of payload messages) will cause SrMUST be sent toremain atthevalueLNS. The sender of thefirst lost payload message. In orderCall-Disconnect-Notify message returns tocausethereceiving peer to advance its value of Sr beyond that of a lost message's Ns value, upon expirationidle state after sending ofa payload session acknowledgment timeout,thesending peer MUST transmit a payloadmessage is complete. 7.5.2 LNS Outgoing Call States State Event Action New State ----- ----- ------ --------- idle Local Initiate local wait-tunnel open request tunnel-open idle Receive OCCN, Clean up idle OCRP, CDN wait-tunnel tunnel-open Send OCRQ wait-reply wait-reply Receive OCRP, none wait-connect acceptable wait-reply Receive OCRP, Send CDN idle not acceptable Clean up wait-reply Receive OCCN, Send CDN idle OCRQ Clean up wait-connect Receive OCCN none established wait-connect Receive OCRQ, Send CDN idle OCRP Clean up Townsley, et al. Standards Track [Page 60] INTERNET DRAFT L2TP February 1999 idle, Receive CDN, Clean up idle wait-reply, wait-connect, established established Receive OCRQ, Send CDN idle OCRP, OCCN Clean up wait-reply, Local Send CDN idle wait-connect, Close request Clean up established wait-tunnel Local Clean up idle Close request The states associated withR bit set and Ns value greater than or equal to Ns ofthelost message. Refer to Section 4LNS formore details on the use of the R bit. The exact implementation of the acknowledgment timeoutoutgoing calls are: idle, wait-tunnel When an outgoing call isvendor- specific. Itinitiated, a tunnel issuggested that an adaptive timeout be implemented with backoff for flow control. The timeout mechanism proposed here hasfirst created, much as thefollowing properties: Independent timeouts for each session. A device (LAC or LNS) will have to maintainidle andcalculate timeouts for every active session. An administrator-adjustable maximum timeout, MaxTimeOut, unique to each device. An adaptive timeout mechanism that compensates for changing throughput. To reduce packet processing overhead, vendors may choose not to recompute the adaptive timeoutwait-tunnel states forevery received acknowledgment. The result of this overhead reduction is that the timeout will not respond as quickly to rapid network changes. Timer backoff on timeout to reduce congestion. The backed-off timer value is limited by the configurable maximum timeout value. Timer backoff is done every timeanacknowledgment timeout occurs. In general, this mechanism has the desirable behavior of quickly backing off uponLAC incoming call. Once atimeout and of slowly decreasing the timeout value as packets are delivered without timeouts. Valencia expires June 1999 [Page 84] INTERNET DRAFT October 1998 Some definitions: Packet Processing Delay, "PPD",tunnel isthe amount of time required for each peer to process the maximum amount of data buffered in its offered receive packet window. The PPDestablished, an Outgoing-Call-Request message isthe value exchanged betweensent to the LAC andLNS whenthe session moves into the wait-reply state. wait-reply If acallCall-Disconnect-Notify isestablished. For the LNS, this number should be small. Forreceived, anLAC supporting modem connections, this number could be significant. "Sample" iserror occurred, and theactual amount of time incurred receivingsession is cleaned up and returns to idle. If anacknowledgment for a packet. The SampleOutgoing- Call-Reply ismeasured, not calculated. Round-Trip Time, "RTT",received, the call is in progress and theestimated round-trip time for an Acknowledgmentsession moves tobe received for a given transmitted packet. Whenthenetwork link iswait-connect state. wait-connect If alocal network, this delay will be minimal (if not zero). When the network linkCall-Disconnect-Notify is received, theInternet, this delay could be substantial and vary widely. RTTcall failed; the session isadaptive: it will adjustcleaned up and returns toincludeidle. If an Outgoing-Call- Connected is received, thePPDcall has succeeded andwhatever shifting network delays contribute tothetime betweensession may now exchange data. established If apacket being transmitted and receiving its acknowledgment. Adaptive Timeout, "ATO",Call-Disconnect-Notify is received, thetime that must elapse before an acknowledgment is considered lost. After a timeout,call has been terminated for thesliding window is partially closedreason indicated in the Result and Cause Codes; theATO is backed off. Packet Processing Delay (PPD) The PPD parameter issession moves back to the idle state. If the LNS chooses to terminate the session, it sends a16-bit time value exchanged duringCall-Disconnect-Notify to theCall Control phase expressed in unitsLAC and then cleans up and idles its session. 7.6 Tunnel Disconnection The disconnection oftenthsa tunnel consists of either peer issuing asecond (64 means 6.4 seconds).Stop-Control-Connection-Notification. Theprotocol only specifies thatsender of this Notification should wait a finite period of time for theparameter is exchanged, it does not specify how it is calculated.acknowledgment of this message before releasing the control information associated with the Townsley, et al. Standards Track [Page 61] INTERNET DRAFT L2TP February 1999 tunnel. Theway values for ATO are calculatedrecipient of this Notification should send an acknowledgment of the Notification and then release the associated control information. When to release a tunnel isimplementation-dependentan implementation issue andneedis notbe variable (static timeouts are allowed). If adaptive timeouts are to be used then the PPD should be exchangedspecified inthe call connect sequences.this document. Apossible way to calculate the PPD is: PPD = ((PPP_MAX_DATA_MTU - Header) * WindowSize * 8) / ConnectRate + LACFudge (for an LAC) or PPD = ((PPP_MAX_DATA_MTU - Header) * WindowSize * 8) / AvePathRate + LNSFudge (for an LNS) Headerparticular implementation may use whatever policy isthe total sizeappropriate for determining when to release a control connection. Some implementations may leave a tunnel open for a period of time or perhaps indefinitely after theL2TP and media dependent headers. MTUlast session for that tunnel is cleared. Others may choose to disconnect theoverall MTU fortunnel immediately after thelink betweenlast user connection on theLAC and LNS. WindowSize representstunnel disconnects. 8.0 L2TP Over Specific Media L2TP is self-describing, operating at a level above thenumbermedia over which it is carried. However, some details ofpackets inits connection to media are required to permit interoperable implementations. The following sections describe details needed to permit interoperability over specific media. 8.1 L2TP over UDP/IP L2TP uses thesliding window,registered UDP port 1701 [RFC1700]. The entire L2TP packet, including payload and L2TP header, isimplementation-dependent.sent within a UDP datagram. Thelatencyinitiator ofthe underlying connection path between the LAC and LNS couldan L2TP tunnel picks an available source UDP port (which may or may not beused to pick a window size sufficient1701), and sends tokeepthecurrent session's pipe full.desired destination at port 1701. Theconstant 8 converts octets to bits (assuming ConnectRate is in bits per second). LACFudge and LNSFudge arerecipient picks a free port on its own system (which may or may notrequired but canbeused1701), and sends its reply totake overall processing overhead oftheLAC or LNS into account. Ininitiator's UDP port, setting its own UDP source port to thecase offree port it found. Once thecomputed PPDsource and destination ports are established, they MUST remain static foran LNS, AvePathRate istheValencia expires June 1999 [Page 85] INTERNET DRAFT October 1998 average bit ratelife of thepath betweentunnel. IP fragmentation may occur as theLNS and LAC. Given that this number is probably very large and WindowSize is relatively small, LNSFudge will beL2TP packet travels over thedominant factorIP substrate. L2TP makes no special efforts to optimize this. A LAC implementation MAY cause its LCP to negotiate for a specific MRU, which could optimize for LAC environments in which thecomputationMTU's ofPPD. It is recommended thattheminimum value of PPD be onpath over which theorder of 0.5 second. The value of PPD is usedL2TP packets are likely toseed the adaptive algorithm with the initial RTT[n-1]travel have a consistent value.A.1 Calculating Adaptive Acknowledgment Timeout We still must decide how much time to allow for acknowledgments to return. If the timeout is set too high, we may wait an unnecessarily long timeThe default fordropped packets. If the timeoutany L2TP implementation istoo short, we may time out just before the acknowledgment arrives. The acknowledgment timeout should alsothat UDP checksums MUST bereasonableenabled for both control andresponsive to changing network conditions. The suggested adaptive algorithm detailed below is based on the TCP 1989data messages. An L2TP implementationand is explained in Richard Steven's book TCP/IP Illustrated, Volume 1 (page 300). 'n' means this iteration of the calculation, and 'n-1' refersMAY provide an option tovalues 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-