Debian Codegraph @

rfc2661.html

raw
1 <pre>Network Working Group W. Townsley
2 Request for Comments: 2661 A. Valencia
3 Category: Standards Track cisco Systems
4 A. Rubens
5 Ascend Communications
6 G. Pall
7 G. Zorn
8 Microsoft Corporation
9 B. Palter
10 Redback Networks
11 August 1999
12
13
14 <span class="h1">Layer Two Tunneling Protocol "L2TP"</span>
15
16 Status of this Memo
17
18 This document specifies an Internet standards track protocol for the
19 Internet community, and requests discussion and suggestions for
20 improvements. Please refer to the current edition of the "Internet
21 Official Protocol Standards" (STD 1) for the standardization state
22 and status of this protocol. Distribution of this memo is unlimited.
23
24 Copyright Notice
25
26 Copyright (C) The Internet Society (1999). All Rights Reserved.
27
28 Abstract
29
30 This document describes the Layer Two Tunneling Protocol (L2TP). STD
31 51, <a href="./rfc1661">RFC 1661</a> specifies multi-protocol access via PPP [<a href="./rfc1661" title="&quot;The Point-to-Point Protocol (PPP)&quot;">RFC1661</a>]. L2TP
32 facilitates the tunneling of PPP packets across an intervening
33 network in a way that is as transparent as possible to both end-users
34 and applications.
35
36 Table of Contents
37
38 <a href="#section-1.0">1.0</a> Introduction.......................................... <a href="#page-3">3</a>
39 <a href="#section-1.1">1.1</a> Specification of Requirements......................... <a href="#page-4">4</a>
40 <a href="#section-1.2">1.2</a> Terminology........................................... <a href="#page-4">4</a>
41 <a href="#section-2.0">2.0</a> Topology.............................................. <a href="#page-8">8</a>
42 <a href="#section-3.0">3.0</a> Protocol Overview..................................... <a href="#page-9">9</a>
43 <a href="#section-3.1">3.1</a> L2TP Header Format.................................... <a href="#page-9">9</a>
44 <a href="#section-3.2">3.2</a> Control Message Types................................. <a href="#page-11">11</a>
45 <a href="#section-4.0">4.0</a> Control Message Attribute Value Pairs................. <a href="#page-12">12</a>
46 <a href="#section-4.1">4.1</a> AVP Format............................................ <a href="#page-13">13</a>
47 <a href="#section-4.2">4.2</a> Mandatory AVPs........................................ <a href="#page-14">14</a>
48 <a href="#section-4.3">4.3</a> Hiding of AVP Attribute Values........................ <a href="#page-14">14</a>
49
50
51
52 <span class="grey">Townsley, et al. Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
55
56
57 <a href="#section-4.4">4.4</a> AVP Summary........................................... <a href="#page-17">17</a>
58 <a href="#section-4.4.1">4.4.1</a> AVPs Applicable To All Control Messages.......... <a href="#page-17">17</a>
59 <a href="#section-4.4.2">4.4.2</a> Result and Error Codes........................... <a href="#page-18">18</a>
60 <a href="#section-4.4.3">4.4.3</a> Control Connection Management AVPs............... <a href="#page-20">20</a>
61 <a href="#section-4.4.4">4.4.4</a> Call Management AVPs............................. <a href="#page-27">27</a>
62 <a href="#section-4.4.5">4.4.5</a> Proxy LCP and Authentication AVPs................ <a href="#page-34">34</a>
63 <a href="#section-4.4.6">4.4.6</a> Call Status AVPs................................. <a href="#page-39">39</a>
64 <a href="#section-5.0">5.0</a> Protocol Operation.................................... <a href="#page-41">41</a>
65 <a href="#section-5.1">5.1</a> Control Connection Establishment...................... <a href="#page-41">41</a>
66 <a href="#section-5.1.1">5.1.1</a> Tunnel Authentication............................ <a href="#page-42">42</a>
67 <a href="#section-5.2">5.2</a> Session Establishment................................. <a href="#page-42">42</a>
68 <a href="#section-5.2.1">5.2.1</a> Incoming Call Establishment...................... <a href="#page-42">42</a>
69 <a href="#section-5.2.2">5.2.2</a> Outgoing Call Establishment...................... <a href="#page-43">43</a>
70 <a href="#section-5.3">5.3</a> Forwarding PPP Frames................................. <a href="#page-43">43</a>
71 <a href="#section-5.4">5.4</a> Using Sequence Numbers on the Data Channel............ <a href="#page-44">44</a>
72 <a href="#section-5.5">5.5</a> Keepalive (Hello)..................................... <a href="#page-44">44</a>
73 <a href="#section-5.6">5.6</a> Session Teardown...................................... <a href="#page-45">45</a>
74 <a href="#section-5.7">5.7</a> Control Connection Teardown........................... <a href="#page-45">45</a>
75 <a href="#section-5.8">5.8</a> Reliable Delivery of Control Messages................. <a href="#page-46">46</a>
76 <a href="#section-6.0">6.0</a> Control Connection Protocol Specification............. <a href="#page-48">48</a>
77 <a href="#section-6.1">6.1</a> Start-Control-Connection-Request (SCCRQ).............. <a href="#page-48">48</a>
78 <a href="#section-6.2">6.2</a> Start-Control-Connection-Reply (SCCRP)................ <a href="#page-48">48</a>
79 <a href="#section-6.3">6.3</a> Start-Control-Connection-Connected (SCCCN)............ <a href="#page-49">49</a>
80 <a href="#section-6.4">6.4</a> Stop-Control-Connection-Notification (StopCCN)........ <a href="#page-49">49</a>
81 <a href="#section-6.5">6.5</a> Hello (HELLO)......................................... <a href="#page-49">49</a>
82 <a href="#section-6.6">6.6</a> Incoming-Call-Request (ICRQ).......................... <a href="#page-50">50</a>
83 <a href="#section-6.7">6.7</a> Incoming-Call-Reply (ICRP)............................ <a href="#page-51">51</a>
84 <a href="#section-6.8">6.8</a> Incoming-Call-Connected (ICCN)........................ <a href="#page-51">51</a>
85 <a href="#section-6.9">6.9</a> Outgoing-Call-Request (OCRQ).......................... <a href="#page-52">52</a>
86 <a href="#section-6.10">6.10</a> Outgoing-Call-Reply (OCRP)........................... <a href="#page-53">53</a>
87 <a href="#section-6.11">6.11</a> Outgoing-Call-Connected (OCCN)....................... <a href="#page-53">53</a>
88 <a href="#section-6.12">6.12</a> Call-Disconnect-Notify (CDN)......................... <a href="#page-53">53</a>
89 <a href="#section-6.13">6.13</a> WAN-Error-Notify (WEN)............................... <a href="#page-54">54</a>
90 <a href="#section-6.14">6.14</a> Set-Link-Info (SLI).................................. <a href="#page-54">54</a>
91 <a href="#section-7.0">7.0</a> Control Connection State Machines..................... <a href="#page-54">54</a>
92 <a href="#section-7.1">7.1</a> Control Connection Protocol Operation................. <a href="#page-55">55</a>
93 <a href="#section-7.2">7.2</a> Control Connection States............................. <a href="#page-56">56</a>
94 <a href="#section-7.2.1">7.2.1</a> Control Connection Establishment................. <a href="#page-56">56</a>
95 <a href="#section-7.3">7.3</a> Timing considerations................................. <a href="#page-58">58</a>
96 <a href="#section-7.4">7.4</a> Incoming calls........................................ <a href="#page-58">58</a>
97 <a href="#section-7.4.1">7.4.1</a> LAC Incoming Call States......................... <a href="#page-60">60</a>
98 <a href="#section-7.4.2">7.4.2</a> LNS Incoming Call States......................... <a href="#page-62">62</a>
99 <a href="#section-7.5">7.5</a> Outgoing calls........................................ <a href="#page-63">63</a>
100 <a href="#section-7.5.1">7.5.1</a> LAC Outgoing Call States......................... <a href="#page-64">64</a>
101 <a href="#section-7.5.2">7.5.2</a> LNS Outgoing Call States......................... <a href="#page-66">66</a>
102 <a href="#section-7.6">7.6</a> Tunnel Disconnection.................................. <a href="#page-67">67</a>
103 <a href="#section-8.0">8.0</a> L2TP Over Specific Media.............................. <a href="#page-67">67</a>
104 <a href="#section-8.1">8.1</a> L2TP over UDP/IP...................................... <a href="#page-68">68</a>
105
106
107
108 <span class="grey">Townsley, et al. Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
111
112
113 <a href="#section-8.2">8.2</a> IP.................................................... <a href="#page-69">69</a>
114 <a href="#section-9.0">9.0</a> Security Considerations............................... <a href="#page-69">69</a>
115 <a href="#section-9.1">9.1</a> Tunnel Endpoint Security.............................. <a href="#page-70">70</a>
116 <a href="#section-9.2">9.2</a> Packet Level Security................................. <a href="#page-70">70</a>
117 <a href="#section-9.3">9.3</a> End to End Security................................... <a href="#page-70">70</a>
118 <a href="#section-9.4">9.4</a> L2TP and IPsec........................................ <a href="#page-71">71</a>
119 <a href="#section-9.5">9.5</a> Proxy PPP Authentication.............................. <a href="#page-71">71</a>
120 <a href="#section-10.0">10.0</a> IANA Considerations.................................. <a href="#page-71">71</a>
121 <a href="#section-10.1">10.1</a> AVP Attributes....................................... <a href="#page-71">71</a>
122 <a href="#section-10.2">10.2</a> Message Type AVP Values.............................. <a href="#page-72">72</a>
123 <a href="#section-10.3">10.3</a> Result Code AVP Values............................... <a href="#page-72">72</a>
124 <a href="#section-10.3.1">10.3.1</a> Result Code Field Values........................ <a href="#page-72">72</a>
125 <a href="#section-10.3.2">10.3.2</a> Error Code Field Values......................... <a href="#page-72">72</a>
126 <a href="#section-10.4">10.4</a> Framing Capabilities &amp; Bearer Capabilities........... <a href="#page-72">72</a>
127 <a href="#section-10.5">10.5</a> Proxy Authen Type AVP Values......................... <a href="#page-72">72</a>
128 <a href="#section-10.6">10.6</a> AVP Header Bits...................................... <a href="#page-73">73</a>
129 <a href="#section-11.0">11.0</a> References........................................... <a href="#page-73">73</a>
130 <a href="#section-12.0">12.0</a> Acknowledgments...................................... <a href="#page-74">74</a>
131 <a href="#section-13.0">13.0</a> Authors' Addresses................................... <a href="#page-75">75</a>
132 <a href="#appendix-A">Appendix A</a>: Control Channel Slow Start and Congestion
133 Avoidance..................................... <a href="#page-76">76</a>
134 <a href="#appendix-B">Appendix B</a>: Control Message Examples...................... <a href="#page-77">77</a>
135 <a href="#appendix-C">Appendix C</a>: Intellectual Property Notice.................. <a href="#page-79">79</a>
136 Full Copyright Statement.................................. <a href="#page-80">80</a>
137
138 <span class="h3"><a class="selflink" id="section-1.0" href="#section-1.0">1.0</a> Introduction</span>
139
140 PPP [<a href="./rfc1661" title="&quot;The Point-to-Point Protocol (PPP)&quot;">RFC1661</a>] defines an encapsulation mechanism for transporting
141 multiprotocol packets across layer 2 (L2) point-to-point links.
142 Typically, a user obtains a L2 connection to a Network Access Server
143 (NAS) using one of a number of techniques (e.g., dialup POTS, ISDN,
144 ADSL, etc.) and then runs PPP over that connection. In such a
145 configuration, the L2 termination point and PPP session endpoint
146 reside on the same physical device (i.e., the NAS).
147
148 L2TP extends the PPP model by allowing the L2 and PPP endpoints to
149 reside on different devices interconnected by a packet-switched
150 network. With L2TP, a user has an L2 connection to an access
151 concentrator (e.g., modem bank, ADSL DSLAM, etc.), and the
152 concentrator then tunnels individual PPP frames to the NAS. This
153 allows the actual processing of PPP packets to be divorced from the
154 termination of the L2 circuit.
155
156 One obvious benefit of such a separation is that instead of requiring
157 the L2 connection terminate at the NAS (which may require a
158 long-distance toll charge), the connection may terminate at a (local)
159 circuit concentrator, which then extends the logical PPP session over
160
161
162
163
164 <span class="grey">Townsley, et al. Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
167
168
169 a shared infrastructure such as frame relay circuit or the Internet.
170 From the user's perspective, there is no functional difference between
171 having the L2 circuit terminate in a NAS directly or using L2TP.
172
173 L2TP may also solve the multilink hunt-group splitting problem.
174 Multilink PPP [<a href="./rfc1990">RFC1990</a>] requires that all channels composing a
175 multilink bundle be grouped at a single Network Access Server (NAS).
176 Due to its ability to project a PPP session to a location other than
177 the point at which it was physically received, L2TP can be used to
178 make all channels terminate at a single NAS. This allows multilink
179 operation even when the calls are spread across distinct physical
180 NASs.
181
182 This document defines the necessary control protocol for on-demand
183 creation of tunnels between two nodes and the accompanying
184 encapsulation for multiplexing multiple, tunneled PPP sessions.
185
186 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a> Specification of Requirements</span>
187
188 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
189 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
190 document are to be interpreted as described in [<a href="./rfc2119" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">RFC2119</a>].
191
192 <span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a> Terminology</span>
193
194 Analog Channel
195
196 A circuit-switched communication path which is intended to carry
197 3.1 kHz audio in each direction.
198
199 Attribute Value Pair (AVP)
200
201 The variable length concatenation of a unique Attribute
202 (represented by an integer) and a Value containing the actual
203 value identified by the attribute. Multiple AVPs make up Control
204 Messages which are used in the establishment, maintenance, and
205 teardown of tunnels.
206
207 Call
208
209 A connection (or attempted connection) between a Remote System and
210 LAC. For example, a telephone call through the PSTN. A Call
211 (Incoming or Outgoing) which is successfully established between a
212 Remote System and LAC results in a corresponding L2TP Session
213 within a previously established Tunnel between the LAC and LNS.
214 (See also: Session, Incoming Call, Outgoing Call).
215
216
217
218
219
220 <span class="grey">Townsley, et al. Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
223
224
225 Called Number
226
227 An indication to the receiver of a call as to what telephone
228 number the caller used to reach it.
229
230 Calling Number
231
232 An indication to the receiver of a call as to the telephone number
233 of the caller.
234
235 CHAP
236
237 Challenge Handshake Authentication Protocol [<a href="./rfc1994" title="&quot;PPP Challenge Handshake Authentication Protocol (CHAP)&quot;">RFC1994</a>], a PPP
238 cryptographic challenge/response authentication protocol in which
239 the cleartext password is not passed over the line.
240
241 Control Connection
242
243 A control connection operates in-band over a tunnel to control the
244 establishment, release, and maintenance of sessions and of the
245 tunnel itself.
246
247 Control Messages
248
249 Control messages are exchanged between LAC and LNS pairs,
250 operating in-band within the tunnel protocol. Control messages
251 govern aspects of the tunnel and sessions within the tunnel.
252
253 Digital Channel
254
255 A circuit-switched communication path which is intended to carry
256 digital information in each direction.
257
258 DSLAM
259
260 Digital Subscriber Line (DSL) Access Module. A network device used
261 in the deployment of DSL service. This is typically a concentrator
262 of individual DSL lines located in a central office (CO) or local
263 exchange.
264
265 Incoming Call
266
267 A Call received at an LAC to be tunneled to an LNS (see Call,
268 Outgoing Call).
269
270
271
272
273
274
275
276 <span class="grey">Townsley, et al. Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
279
280
281 L2TP Access Concentrator (LAC)
282
283 A node that acts as one side of an L2TP tunnel endpoint and is a
284 peer to the L2TP Network Server (LNS). The LAC sits between an
285 LNS and a remote system and forwards packets to and from each.
286 Packets sent from the LAC to the LNS requires tunneling with the
287 L2TP protocol as defined in this document. The connection from
288 the LAC to the remote system is either local (see: Client LAC) or
289 a PPP link.
290
291 L2TP Network Server (LNS)
292
293 A node that acts as one side of an L2TP tunnel endpoint and is a
294 peer to the L2TP Access Concentrator (LAC). The LNS is the
295 logical termination point of a PPP session that is being tunneled
296 from the remote system by the LAC.
297
298 Management Domain (MD)
299
300 A network or networks under the control of a single
301 administration, policy or system. For example, an LNS's Management
302 Domain might be the corporate network it serves. An LAC's
303 Management Domain might be the Internet Service Provider that owns
304 and manages it.
305
306 Network Access Server (NAS)
307
308 A device providing local network access to users across a remote
309 access network such as the PSTN. An NAS may also serve as an LAC,
310 LNS or both.
311
312 Outgoing Call
313
314 A Call placed by an LAC on behalf of an LNS (see Call, Incoming
315 Call).
316
317 Peer
318
319 When used in context with L2TP, peer refers to either the LAC or
320 LNS. An LAC's Peer is an LNS and vice versa. When used in context
321 with PPP, a peer is either side of the PPP connection.
322
323 POTS
324
325 Plain Old Telephone Service.
326
327
328
329
330
331
332 <span class="grey">Townsley, et al. Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
335
336
337 Remote System
338
339 An end-system or router attached to a remote access network (i.e.
340 a PSTN), which is either the initiator or recipient of a call.
341 Also referred to as a dial-up or virtual dial-up client.
342
343 Session
344
345 L2TP is connection-oriented. The LNS and LAC maintain state for
346 each Call that is initiated or answered by an LAC. An L2TP Session
347 is created between the LAC and LNS when an end-to-end PPP
348 connection is established between a Remote System and the LNS.
349 Datagrams related to the PPP connection are sent over the Tunnel
350 between the LAC and LNS. There is a one to one relationship
351 between established L2TP Sessions and their associated Calls. (See
352 also: Call).
353
354 Tunnel
355
356 A Tunnel exists between a LAC-LNS pair. The Tunnel consists of a
357 Control Connection and zero or more L2TP Sessions. The Tunnel
358 carries encapsulated PPP datagrams and Control Messages between
359 the LAC and the LNS.
360
361 Zero-Length Body (ZLB) Message
362
363 A control packet with only an L2TP header. ZLB messages are used
364 for explicitly acknowledging packets on the reliable control
365 channel.
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388 <span class="grey">Townsley, et al. Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
391
392
393 <span class="h3"><a class="selflink" id="section-2.0" href="#section-2.0">2.0</a> Topology</span>
394
395 The following diagram depicts a typical L2TP scenario. The goal is to
396 tunnel PPP frames between the Remote System or LAC Client and an LNS
397 located at a Home LAN.
398
399 [Home LAN]
400 [LAC Client]----------+ |
401 ____|_____ +--[Host]
402 | | |
403 [LAC]---------| Internet |-----[LNS]-----+
404 | |__________| |
405 _____|_____ :
406 | |
407 | PSTN |
408 [Remote]--| Cloud |
409 [System] | | [Home LAN]
410 |___________| |
411 | ______________ +---[Host]
412 | | | |
413 [LAC]-------| Frame Relay |---[LNS]-----+
414 | or ATM Cloud | |
415 |______________| :
416
417 The Remote System initiates a PPP connection across the PSTN Cloud to
418 an LAC. The LAC then tunnels the PPP connection across the Internet,
419 Frame Relay, or ATM Cloud to an LNS whereby access to a Home LAN is
420 obtained. The Remote System is provided addresses from the HOME LAN
421
422 via PPP NCP negotiation. Authentication, Authorization and Accounting
423 may be provided by the Home LAN's Management Domain as if the user
424 were connected to a Network Access Server directly.
425
426 A LAC Client (a Host which runs L2TP natively) may also participate
427 in tunneling to the Home LAN without use of a separate LAC. In this
428 case, the Host containing the LAC Client software already has a
429 connection to the public Internet. A "virtual" PPP connection is then
430 created and the local L2TP LAC Client software creates a tunnel to
431 the LNS. As in the above case, Addressing, Authentication,
432 Authorization and Accounting will be provided by the Home LAN's
433 Management Domain.
434
435
436
437
438
439
440
441
442
443
444 <span class="grey">Townsley, et al. Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
447
448
449 <span class="h3"><a class="selflink" id="section-3.0" href="#section-3.0">3.0</a> Protocol Overview</span>
450
451 L2TP utilizes two types of messages, control messages and data
452 messages. Control messages are used in the establishment, maintenance
453 and clearing of tunnels and calls. Data messages are used to
454 encapsulate PPP frames being carried over the tunnel. Control
455 messages utilize a reliable Control Channel within L2TP to guarantee
456 delivery (see <a href="#section-5.1">section 5.1</a> for details). Data messages are not
457 retransmitted when packet loss occurs.
458
459 +-------------------+
460 | PPP Frames |
461 +-------------------+ +-----------------------+
462 | L2TP Data Messages| | L2TP Control Messages |
463 +-------------------+ +-----------------------+
464 | L2TP Data Channel | | L2TP Control Channel |
465 | (unreliable) | | (reliable) |
466 +------------------------------------------------+
467 | Packet Transport (UDP, FR, ATM, etc.) |
468 +------------------------------------------------+
469
470 Figure 3.0 L2TP Protocol Structure
471
472 Figure 3.0 depicts the relationship of PPP frames and Control
473 Messages over the L2TP Control and Data Channels. PPP Frames are
474 passed over an unreliable Data Channel encapsulated first by an L2TP
475 header and then a Packet Transport such as UDP, Frame Relay, ATM,
476 etc. Control messages are sent over a reliable L2TP Control Channel
477 which transmits packets in-band over the same Packet Transport.
478
479 Sequence numbers are required to be present in all control messages
480 and are used to provide reliable delivery on the Control Channel.
481 Data Messages may use sequence numbers to reorder packets and detect
482 lost packets.
483
484 All values are placed into their respective fields and sent in
485 network order (high order octets first).
486
487 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a> L2TP Header Format</span>
488
489 L2TP packets for the control channel and data channel share a common
490 header format. In each case where a field is optional, its space does
491 not exist in the message if the field is marked not present. Note
492 that while optional on data messages, the Length, Ns, and Nr fields
493 marked as optional below, are required to be present on all control
494 messages.
495
496
497
498
499
500 <span class="grey">Townsley, et al. Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
503
504
505 This header is formatted:
506
507 0 1 2 3
508 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
509 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
510 |T|L|x|x|S|x|O|P|x|x|x|x| Ver | Length (opt) |
511 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
512 | Tunnel ID | Session ID |
513 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
514 | Ns (opt) | Nr (opt) |
515 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
516 | Offset Size (opt) | Offset pad... (opt)
517 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
518
519 Figure 3.1 L2TP Message Header
520
521 The Type (T) bit indicates the type of message. It is set to 0 for a
522 data message and 1 for a control message.
523
524 If the Length (L) bit is 1, the Length field is present. This bit
525 MUST be set to 1 for control messages.
526
527 The x bits are reserved for future extensions. All reserved bits MUST
528 be set to 0 on outgoing messages and ignored on incoming messages.
529
530 If the Sequence (S) bit is set to 1 the Ns and Nr fields are present.
531 The S bit MUST be set to 1 for control messages.
532
533 If the Offset (O) bit is 1, the Offset Size field is present. The O
534 bit MUST be set to 0 (zero) for control messages.
535
536 If the Priority (P) bit is 1, this data message should receive
537 preferential treatment in its local queuing and transmission. LCP
538 echo requests used as a keepalive for the link, for instance, should
539 generally be sent with this bit set to 1. Without it, a temporary
540 interval of local congestion could result in interference with
541 keepalive messages and unnecessary loss of the link. This feature is
542 only for use with data messages. The P bit MUST be set to 0 for all
543 control messages.
544
545 Ver MUST be 2, indicating the version of the L2TP data message header
546 described in this document. The value 1 is reserved to permit
547 detection of L2F [<a href="./rfc2341" title="&quot;Cisco Layer Two Forwarding (Protocol) L2F&quot;">RFC2341</a>] packets should they arrive intermixed with
548 L2TP packets. Packets received with an unknown Ver field MUST be
549 discarded.
550
551 The Length field indicates the total length of the message in octets.
552
553
554
555
556 <span class="grey">Townsley, et al. Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
559
560
561 Tunnel ID indicates the identifier for the control connection. L2TP
562 tunnels are named by identifiers that have local significance only.
563 That is, the same tunnel will be given different Tunnel IDs by each
564 end of the tunnel. Tunnel ID in each message is that of the intended
565 recipient, not the sender. Tunnel IDs are selected and exchanged as
566 Assigned Tunnel ID AVPs during the creation of a tunnel.
567
568 Session ID indicates the identifier for a session within a tunnel.
569 L2TP sessions are named by identifiers that have local significance
570 only. That is, the same session will be given different Session IDs
571 by each end of the session. Session ID in each message is that of the
572 intended recipient, not the sender. Session IDs are selected and
573 exchanged as Assigned Session ID AVPs during the creation of a
574 session.
575
576 Ns indicates the sequence number for this data or control message,
577 beginning at zero and incrementing by one (modulo 2**16) for each
578 message sent. See <a href="#section-5.8">Section 5.8</a> and 5.4 for more information on using
579 this field.
580
581 Nr indicates the sequence number expected in the next control message
582 to be received. Thus, Nr is set to the Ns of the last in-order
583 message received plus one (modulo 2**16). In data messages, Nr is
584 reserved and, if present (as indicated by the S-bit), MUST be ignored
585 upon receipt. See <a href="#section-5.8">section 5.8</a> for more information on using this
586 field in control messages.
587
588 The Offset Size field, if present, specifies the number of octets
589 past the L2TP header at which the payload data is expected to start.
590 Actual data within the offset padding is undefined. If the offset
591 field is present, the L2TP header ends after the last octet of the
592 offset padding.
593
594 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a> Control Message Types</span>
595
596 The Message Type AVP (see <a href="#section-4.4.1">section 4.4.1</a>) defines the specific type of
597 control message being sent. Recall from <a href="#section-3.1">section 3.1</a> that this is only
598 for control messages, that is, messages with the T-bit set to 1.
599
600
601
602
603
604
605
606
607
608
609
610
611
612 <span class="grey">Townsley, et al. Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
615
616
617 This document defines the following control message types (see
618 <a href="#section-6.1">Section 6.1</a> through 6.14 for details on the construction and use of
619 each message):
620
621 Control Connection Management
622
623 0 (reserved)
624
625 1 (SCCRQ) Start-Control-Connection-Request
626 2 (SCCRP) Start-Control-Connection-Reply
627 3 (SCCCN) Start-Control-Connection-Connected
628 4 (StopCCN) Stop-Control-Connection-Notification
629 5 (reserved)
630 6 (HELLO) Hello
631
632 Call Management
633
634 7 (OCRQ) Outgoing-Call-Request
635 8 (OCRP) Outgoing-Call-Reply
636 9 (OCCN) Outgoing-Call-Connected
637 10 (ICRQ) Incoming-Call-Request
638 11 (ICRP) Incoming-Call-Reply
639 12 (ICCN) Incoming-Call-Connected
640 13 (reserved)
641 14 (CDN) Call-Disconnect-Notify
642
643 Error Reporting
644
645 15 (WEN) WAN-Error-Notify
646
647 PPP Session Control
648
649 16 (SLI) Set-Link-Info
650
651 <span class="h3"><a class="selflink" id="section-4.0" href="#section-4.0">4.0</a> Control Message Attribute Value Pairs</span>
652
653 To maximize extensibility while still permitting interoperability, a
654 uniform method for encoding message types and bodies is used
655 throughout L2TP. This encoding will be termed AVP (Attribute-Value
656 Pair) in the remainder of this document.
657
658
659
660
661
662
663
664
665
666
667
668 <span class="grey">Townsley, et al. Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
671
672
673 <span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a> AVP Format</span>
674
675 Each AVP is encoded as:
676
677 0 1 2 3
678 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
679 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
680 |M|H| rsvd | Length | Vendor ID |
681 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
682 | Attribute Type | Attribute Value...
683 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
684 [until Length is reached]... |
685 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
686
687 The first six bits are a bit mask, describing the general attributes
688 of the AVP.
689
690 Two bits are defined in this document, the remaining are reserved for
691 future extensions. Reserved bits MUST be set to 0. An AVP received
692 with a reserved bit set to 1 MUST be treated as an unrecognized AVP.
693
694 Mandatory (M) bit: Controls the behavior required of an
695 implementation which receives an AVP which it does not recognize. If
696 the M bit is set on an unrecognized AVP within a message associated
697 with a particular session, the session associated with this message
698 MUST be terminated. If the M bit is set on an unrecognized AVP within
699 a message associated with the overall tunnel, the entire tunnel (and
700 all sessions within) MUST be terminated. If the M bit is not set, an
701 unrecognized AVP MUST be ignored. The control message must then
702 continue to be processed as if the AVP had not been present.
703
704 Hidden (H) bit: Identifies the hiding of data in the Attribute Value
705 field of an AVP. This capability can be used to avoid the passing of
706 sensitive data, such as user passwords, as cleartext in an AVP.
707 <a href="#section-4.3">Section 4.3</a> describes the procedure for performing AVP hiding.
708
709 Length: Encodes the number of octets (including the Overall Length
710 and bitmask fields) contained in this AVP. The Length may be
711 calculated as 6 + the length of the Attribute Value field in octets.
712 The field itself is 10 bits, permitting a maximum of 1023 octets of
713 data in a single AVP. The minimum Length of an AVP is 6. If the
714 length is 6, then the Attribute Value field is absent.
715
716 Vendor ID: The IANA assigned "SMI Network Management Private
717 Enterprise Codes" [<a href="./rfc1700" title="&quot;Assigned Numbers&quot;">RFC1700</a>] value. The value 0, corresponding to
718 IETF adopted attribute values, is used for all AVPs defined within
719 this document. Any vendor wishing to implement their own L2TP
720 extensions can use their own Vendor ID along with private Attribute
721
722
723
724 <span class="grey">Townsley, et al. Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
727
728
729 values, guaranteeing that they will not collide with any other
730 vendor's extensions, nor with future IETF extensions. Note that there
731 are 16 bits allocated for the Vendor ID, thus limiting this feature
732 to the first 65,535 enterprises.
733
734 Attribute Type: A 2 octet value with a unique interpretation across
735 all AVPs defined under a given Vendor ID.
736
737 Attribute Value: This is the actual value as indicated by the Vendor
738 ID and Attribute Type. It follows immediately after the Attribute
739 Type field, and runs for the remaining octets indicated in the Length
740 (i.e., Length minus 6 octets of header). This field is absent if the
741 Length is 6.
742
743 <span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a> Mandatory AVPs</span>
744
745 Receipt of an unknown AVP that has the M-bit set is catastrophic to
746 the session or tunnel it is associated with. Thus, the M bit should
747 only be defined for AVPs which are absolutely crucial to proper
748 operation of the session or tunnel. Further, in the case where the
749 LAC or LNS receives an unknown AVP with the M-bit set and shuts down
750 the session or tunnel accordingly, it is the full responsibility of
751 the peer sending the Mandatory AVP to accept fault for causing an
752 non-interoperable situation. Before defining an AVP with the M-bit
753 set, particularly a vendor-specific AVP, be sure that this is the
754 intended consequence.
755
756 When an adequate alternative exists to use of the M-bit, it should be
757 utilized. For example, rather than simply sending an AVP with the M-
758 bit set to determine if a specific extension exists, availability may
759 be identified by sending an AVP in a request message and expecting a
760 corresponding AVP in a reply message.
761
762 Use of the M-bit with new AVPs (those not defined in this document)
763 MUST provide the ability to configure the associated feature off,
764 such that the AVP is either not sent, or sent with the M-bit not set.
765
766 <span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a> Hiding of AVP Attribute Values</span>
767
768 The H bit in the header of each AVP provides a mechanism to indicate
769 to the receiving peer whether the contents of the AVP are hidden or
770 present in cleartext. This feature can be used to hide sensitive
771 control message data such as user passwords or user IDs.
772
773 The H bit MUST only be set if a shared secret exists between the LAC
774 and LNS. The shared secret is the same secret that is used for tunnel
775 authentication (see <a href="#section-5.1.1">Section 5.1.1</a>). If the H bit is set in any
776
777
778
779
780 <span class="grey">Townsley, et al. Standards Track [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
783
784
785 AVP(s) in a given control message, a Random Vector AVP must also be
786 present in the message and MUST precede the first AVP having an H bit
787 of 1.
788
789 Hiding an AVP value is done in several steps. The first step is to
790 take the length and value fields of the original (cleartext) AVP and
791 encode them into a Hidden AVP Subformat as follows:
792
793 0 1 2 3
794 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
795 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
796 | Length of Original Value | Original Attribute Value ...
797 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
798 ... | Padding ...
799 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
800
801 Length of Original Attribute Value: This is length of the Original
802 Attribute Value to be obscured in octets. This is necessary to
803 determine the original length of the Attribute Value which is lost
804 when the additional Padding is added.
805
806 Original Attribute Value: Attribute Value that is to be obscured.
807
808 Padding: Random additional octets used to obscure length of the
809 Attribute Value that is being hidden.
810
811 To mask the size of the data being hidden, the resulting subformat
812 MAY be padded as shown above. Padding does NOT alter the value placed
813 in the Length of Original Attribute Value field, but does alter the
814 length of the resultant AVP that is being created. For example, If an
815 Attribute Value to be hidden is 4 octets in length, the unhidden AVP
816 length would be 10 octets (6 + Attribute Value length). After hiding,
817 the length of the AVP will become 6 + Attribute Value length + size
818 of the Length of Original Attribute Value field + Padding. Thus, if
819 Padding is 12 octets, the AVP length will be 6 + 4 + 2 + 12 = 24
820 octets.
821
822 Next, An MD5 hash is performed on the concatenation of:
823
824 + the 2 octet Attribute number of the AVP
825 + the shared secret
826 + an arbitrary length random vector
827
828 The value of the random vector used in this hash is passed in the
829 value field of a Random Vector AVP. This Random Vector AVP must be
830 placed in the message by the sender before any hidden AVPs. The same
831 random vector may be used for more than one hidden AVP in the same
832
833
834
835
836 <span class="grey">Townsley, et al. Standards Track [Page 15]</span></pre>
837 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
838 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
839
840
841 message. If a different random vector is used for the hiding of
842 subsequent AVPs then a new Random Vector AVP must be placed in the
843 command message before the first AVP to which it applies.
844
845 The MD5 hash value is then XORed with the first 16 octet (or less)
846 segment of the Hidden AVP Subformat and placed in the Attribute Value
847 field of the Hidden AVP. If the Hidden AVP Subformat is less than 16
848 octets, the Subformat is transformed as if the Attribute Value field
849 had been padded to 16 octets before the XOR, but only the actual
850 octets present in the Subformat are modified, and the length of the
851 AVP is not altered.
852
853 If the Subformat is longer than 16 octets, a second one-way MD5 hash
854 is calculated over a stream of octets consisting of the shared secret
855 followed by the result of the first XOR. That hash is XORed with the
856 second 16 octet (or less) segment of the Subformat and placed in the
857 corresponding octets of the Value field of the Hidden AVP.
858
859 If necessary, this operation is repeated, with the shared secret used
860 along with each XOR result to generate the next hash to XOR the next
861 segment of the value with.
862
863 The hiding method was adapted from <a href="./rfc2138">RFC 2138</a> [<a href="./rfc2138" title="&quot;Remote Authentication Dial In User Service (RADIUS)&quot;">RFC2138</a>] which was taken
864 from the "Mixing in the Plaintext" section in the book "Network
865 Security" by Kaufman, Perlman and Speciner [<a href="#ref-KPS" title="&quot;Network Security: Private Communications in a Public World&quot;">KPS</a>]. A detailed
866 explanation of the method follows:
867
868 Call the shared secret S, the Random Vector RV, and the Attribute
869 Value AV. Break the value field into 16-octet chunks p1, p2, etc.
870 with the last one padded at the end with random data to a 16-octet
871 boundary. Call the ciphertext blocks c(1), c(2), etc. We will also
872 define intermediate values b1, b2, etc.
873
874 b1 = MD5(AV + S + RV) c(1) = p1 xor b1
875 b2 = MD5(S + c(1)) c(2) = p2 xor b2
876 . .
877 . .
878 . .
879 bi = MD5(S + c(i-1)) c(i) = pi xor bi
880
881 The String will contain c(1)+c(2)+...+c(i) where + denotes
882 concatenation.
883
884 On receipt, the random vector is taken from the last Random Vector
885 AVP encountered in the message prior to the AVP to be unhidden. The
886 above process is then reversed to yield the original value.
887
888
889
890
891
892 <span class="grey">Townsley, et al. Standards Track [Page 16]</span></pre>
893 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
894 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
895
896
897 <span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a> AVP Summary</span>
898
899 The following sections contain a list of all L2TP AVPs defined in
900 this document.
901
902 Following the name of the AVP is a list indicating the message types
903 that utilize each AVP. After each AVP title follows a short
904 description of the purpose of the AVP, a detail (including a graphic)
905 of the format for the Attribute Value, and any additional information
906 needed for proper use of the avp.
907
908 <span class="h4"><a class="selflink" id="section-4.4.1" href="#section-4.4.1">4.4.1</a> AVPs Applicable To All Control Messages</span>
909
910 Message Type (All Messages)
911
912 The Message Type AVP, Attribute Type 0, identifies the control
913 message herein and defines the context in which the exact meaning
914 of the following AVPs will be determined.
915
916 The Attribute Value field for this AVP has the following format:
917
918 0 1
919 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
920 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
921 | Message Type |
922 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
923
924 The Message Type is a 2 octet unsigned integer.
925
926 The Message Type AVP MUST be the first AVP in a message,
927 immediately following the control message header (defined in
928 <a href="#section-3.1">section 3.1</a>). See <a href="#section-3.2">Section 3.2</a> for the list of defined control
929 message types and their identifiers.
930
931 The Mandatory (M) bit within the Message Type AVP has special
932 meaning. Rather than an indication as to whether the AVP itself
933 should be ignored if not recognized, it is an indication as to
934 whether the control message itself should be ignored. Thus, if the
935 M-bit is set within the Message Type AVP and the Message Type is
936 unknown to the implementation, the tunnel MUST be cleared. If the
937 M-bit is not set, then the implementation may ignore an unknown
938 message type. The M-bit MUST be set to 1 for all message types
939 defined in this document. This AVP may not be hidden (the H-bit
940 MUST be 0). The Length of this AVP is 8.
941
942
943
944
945
946
947
948 <span class="grey">Townsley, et al. Standards Track [Page 17]</span></pre>
949 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
950 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
951
952
953 Random Vector (All Messages)
954
955 The Random Vector AVP, Attribute Type 36, is used to enable the
956 hiding of the Attribute Value of arbitrary AVPs.
957
958 The Attribute Value field for this AVP has the following format:
959
960 0 1 2 3
961 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
962 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
963 | Random Octet String ...
964 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
965
966 The Random Octet String may be of arbitrary length, although a
967 random vector of at least 16 octets is recommended. The string
968 contains the random vector for use in computing the MD5 hash to
969 retrieve or hide the Attribute Value of a hidden AVP (see <a href="#section-4.2">Section</a>
970 <a href="#section-4.2">4.2</a>).
971
972 More than one Random Vector AVP may appear in a message, in which
973 case a hidden AVP uses the Random Vector AVP most closely
974 preceding it. This AVP MUST precede the first AVP with the H bit
975 set.
976
977 The M-bit for this AVP MUST be set to 1. This AVP MUST NOT be
978 hidden (the H-bit MUST be 0). The Length of this AVP is 6 plus the
979 length of the Random Octet String.
980
981 <span class="h4"><a class="selflink" id="section-4.4.2" href="#section-4.4.2">4.4.2</a> Result and Error Codes</span>
982
983 Result Code (CDN, StopCCN)
984
985 The Result Code AVP, Attribute Type 1, indicates the reason for
986 terminating the control channel or session.
987
988 The Attribute Value field for this AVP has the following format:
989
990 0 1 2 3
991 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
992 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
993 | Result Code | Error Code (opt) |
994 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
995 | Error Message (opt) ...
996 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
997
998 The Result Code is a 2 octet unsigned integer. The optional Error
999 Code is a 2 octet unsigned integer. An optional Error Message can
1000 follow the Error Code field. Presence of the Error Code and
1001
1002
1003
1004 <span class="grey">Townsley, et al. Standards Track [Page 18]</span></pre>
1005 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
1006 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1007
1008
1009 Message are indicated by the AVP Length field. The Error Message
1010 contains an arbitrary string providing further (human readable)
1011 text associated with the condition. Human readable text in all
1012 error messages MUST be provided in the UTF-8 charset using the
1013 Default Language [<a href="./rfc2277" title="&quot;IETF Policy on Character Sets and Languages&quot;">RFC2277</a>].
1014
1015 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1016 this AVP MUST be set to 1. The Length is 8 if there is no Error
1017 Code or Message, 10 if there is an Error Code and no Error Message
1018 or 10 + the length of the Error Message if there is an Error Code
1019 and Message.
1020
1021 Defined Result Code values for the StopCCN message are:
1022
1023 0 - Reserved
1024 1 - General request to clear control connection
1025 2 - General error--Error Code indicates the problem
1026 3 - Control channel already exists
1027 4 - Requester is not authorized to establish a control
1028 channel
1029 5 - The protocol version of the requester is not
1030 supported
1031 Error Code indicates highest version supported
1032 6 - Requester is being shut down
1033 7 - Finite State Machine error
1034
1035 Defined Result Code values for the CDN message are:
1036
1037 0 - Reserved
1038 1 - Call disconnected due to loss of carrier
1039 2 - Call disconnected for the reason indicated
1040 in error code
1041 3 - Call disconnected for administrative reasons
1042 4 - Call failed due to lack of appropriate facilities
1043 being available (temporary condition)
1044 5 - Call failed due to lack of appropriate facilities being
1045 available (permanent condition)
1046 6 - Invalid destination
1047 7 - Call failed due to no carrier detected
1048 8 - Call failed due to detection of a busy signal
1049 9 - Call failed due to lack of a dial tone
1050 10 - Call was not established within time allotted by LAC
1051 11 - Call was connected but no appropriate framing was
1052 detected
1053
1054 The Error Codes defined below pertain to types of errors that are
1055 not specific to any particular L2TP request, but rather to
1056 protocol or message format errors. If an L2TP reply indicates in
1057
1058
1059
1060 <span class="grey">Townsley, et al. Standards Track [Page 19]</span></pre>
1061 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
1062 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1063
1064
1065 its Result Code that a general error occurred, the General Error
1066 value should be examined to determine what the error was. The
1067 currently defined General Error codes and their meanings are:
1068
1069 0 - No general error
1070 1 - No control connection exists yet for this LAC-LNS pair
1071 2 - Length is wrong
1072 3 - One of the field values was out of range or
1073 reserved field was non-zero
1074 4 - Insufficient resources to handle this operation now
1075 5 - The Session ID is invalid in this context
1076 6 - A generic vendor-specific error occurred in the LAC
1077 7 - Try another. If LAC is aware of other possible LNS
1078 destinations, it should try one of them. This can be
1079 used to guide an LAC based on LNS policy, for instance,
1080 the existence of multilink PPP bundles.
1081 8 - Session or tunnel was shutdown due to receipt of an unknown
1082 AVP with the M-bit set (see <a href="#section-4.2">section 4.2</a>). The Error Message
1083 SHOULD contain the attribute of the offending AVP in (human
1084 readable) text form.
1085
1086 When a General Error Code of 6 is used, additional information
1087 about the error SHOULD be included in the Error Message field.
1088
1089 <span class="h4"><a class="selflink" id="section-4.4.3" href="#section-4.4.3">4.4.3</a> Control Connection Management AVPs</span>
1090
1091 Protocol Version (SCCRP, SCCRQ)
1092
1093 The Protocol Version AVP, Attribute Type 2, indicates the L2TP
1094 protocol version of the sender.
1095
1096 The Attribute Value field for this AVP has the following format:
1097
1098 0 1
1099 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1100 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1101 | Ver | Rev |
1102 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1103
1104 The Ver field is a 1 octet unsigned integer containing the value
1105 1. Rev field is a 1 octet unsigned integer containing 0. This
1106 pertains to L2TP protocol version 1, revision 0. Note this is not
1107 the same version number that is included in the header of each
1108 message.
1109
1110 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1111 this AVP MUST be set to 1. The Length of this AVP is 8.
1112
1113
1114
1115
1116 <span class="grey">Townsley, et al. Standards Track [Page 20]</span></pre>
1117 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
1118 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1119
1120
1121 Framing Capabilities (SCCRP, SCCRQ)
1122
1123 The Framing Capabilities AVP, Attribute Type 3, provides the peer
1124 with an indication of the types of framing that will be accepted
1125 or requested by the sender.
1126
1127 The Attribute Value field for this AVP has the following format:
1128
1129 0 1 2 3
1130 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
1131 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1132 | Reserved for future framing type definitions |A|S|
1133 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1134
1135 The Attribute Value field is a 32-bit mask, with two bits defined.
1136 If bit A is set, asynchronous framing is supported. If bit S is
1137 set, synchronous framing is supported.
1138
1139 A peer MUST NOT request an incoming or outgoing call with a
1140 Framing Type AVP specifying a value not advertised in the Framing
1141 Capabilities AVP it received during control connection
1142 establishment. Attempts to do so will result in the call being
1143 rejected.
1144
1145 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1146 this AVP MUST be set to 1. The Length (before hiding) is 10.
1147
1148 Bearer Capabilities (SCCRP, SCCRQ)
1149
1150 The Bearer Capabilities AVP, Attribute Type 4, provides the peer
1151 with an indication of the bearer device types supported by the
1152 hardware interfaces of the sender for outgoing calls.
1153
1154 The Attribute Value field for this AVP has the following format:
1155
1156 0 1 2 3
1157 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
1158 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1159 | Reserved for future bearer type definitions |A|D|
1160 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1161
1162 This is a 32-bit mask, with two bits defined. If bit A is set,
1163 analog access is supported. If bit D is set, digital access is
1164 supported.
1165
1166
1167
1168
1169
1170
1171
1172 <span class="grey">Townsley, et al. Standards Track [Page 21]</span></pre>
1173 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
1174 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1175
1176
1177 An LNS should not request an outgoing call specifying a value in
1178 the Bearer Type AVP for a device type not advertised in the Bearer
1179 Capabilities AVP it received from the LAC during control
1180 connection establishment. Attempts to do so will result in the
1181 call being rejected.
1182
1183 This AVP MUST be present if the sender can place outgoing calls
1184 when requested.
1185
1186 Note that an LNS that cannot act as an LAC as well will not
1187 support hardware devices for handling incoming and outgoing calls
1188 and should therefore set the A and D bits of this AVP to 0, or
1189 should not send the AVP at all. An LNS that can also act as an LAC
1190 and place outgoing calls should set A or D as appropriate.
1191 Presence of this message is not a guarantee that a given outgoing
1192 call will be placed by the sender if requested, just that the
1193 physical capability exists.
1194
1195 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1196 this AVP MUST be set to 1. The Length (before hiding) is 10.
1197
1198 Tie Breaker (SCCRQ)
1199
1200 The Tie Breaker AVP, Attribute Type 5, indicates that the sender
1201 wishes a single tunnel to exist between the given LAC-LNS pair.
1202
1203 The Attribute Value field for this AVP has the following format:
1204
1205 0 1 2 3
1206 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
1207 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1208 | Tie Break Value...
1209 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1210 ...(64 bits) |
1211 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1212
1213 The Tie Breaker Value is an 8 octet value that is used to choose a
1214 single tunnel where both LAC and LNS request a tunnel
1215 concurrently. The recipient of a SCCRQ must check to see if a
1216 SCCRQ has been sent to the peer, and if so, must compare its Tie
1217 Breaker value with the received one. The lower value "wins", and
1218 the "loser" MUST silently discard its tunnel. In the case where a
1219 tie breaker is present on both sides, and the value is equal, both
1220 sides MUST discard their tunnels.
1221
1222
1223
1224
1225
1226
1227
1228 <span class="grey">Townsley, et al. Standards Track [Page 22]</span></pre>
1229 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
1230 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1231
1232
1233 If a tie breaker is received, and an outstanding SCCRQ had no tie
1234 breaker value, the initiator which included the Tie Breaker AVP
1235 "wins". If neither side issues a tie breaker, then two separate
1236 tunnels are opened.
1237
1238 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1239 this AVP MUST be set to 0. The Length of this AVP is 14.
1240
1241 Firmware Revision (SCCRP, SCCRQ)
1242
1243 The Firmware Revision AVP, Attribute Type 6, indicates the
1244 firmware revision of the issuing device.
1245
1246 The Attribute Value field for this AVP has the following format:
1247
1248 0 1
1249 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1250 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1251 | Firmware Revision |
1252 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1253
1254 The Firmware Revision is a 2 octet unsigned integer encoded in a
1255 vendor specific format.
1256
1257 For devices which do not have a firmware revision (general purpose
1258 computers running L2TP software modules, for instance), the
1259 revision of the L2TP software module may be reported instead.
1260
1261 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1262 this AVP MUST be set to 0. The Length (before hiding) is 8.
1263
1264 Host Name (SCCRP, SCCRQ)
1265
1266 The Host Name AVP, Attribute Type 7, indicates the name of the
1267 issuing LAC or LNS.
1268
1269 The Attribute Value field for this AVP has the following format:
1270
1271 0 1 2 3
1272 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
1273 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1274 | Host Name ... (arbitrary number of octets)
1275 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1276
1277 The Host Name is of arbitrary length, but MUST be at least 1
1278 octet.
1279
1280
1281
1282
1283
1284 <span class="grey">Townsley, et al. Standards Track [Page 23]</span></pre>
1285 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
1286 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1287
1288
1289 This name should be as broadly unique as possible; for hosts
1290 participating in DNS [<a href="./rfc1034" title="&quot;Domain Names - Concepts and Facilities&quot;">RFC1034</a>], a hostname with fully qualified
1291 domain would be appropriate.
1292
1293 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1294 this AVP MUST be set to 1. The Length of this AVP is 6 plus the
1295 length of the Host Name.
1296
1297 Vendor Name (SCCRP, SCCRQ)
1298
1299 The Vendor Name AVP, Attribute Type 8, contains a vendor specific
1300 (possibly human readable) string describing the type of LAC or LNS
1301 being used.
1302
1303 The Attribute Value field for this AVP has the following format:
1304
1305 0 1 2 3
1306 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
1307 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1308 | Vendor Name ...(arbitrary number of octets)
1309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1310
1311 The Vendor Name is the indicated number of octets representing the
1312 vendor string. Human readable text for this AVP MUST be provided
1313 in the UTF-8 charset using the Default Language [<a href="./rfc2277" title="&quot;IETF Policy on Character Sets and Languages&quot;">RFC2277</a>].
1314
1315 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1316 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1317 is 6 plus the length of the Vendor Name.
1318
1319 Assigned Tunnel ID (SCCRP, SCCRQ, StopCCN)
1320
1321 The Assigned Tunnel ID AVP, Attribute Type 9, encodes the ID being
1322 assigned to this tunnel by the sender.
1323
1324 The Attribute Value field for this AVP has the following format:
1325
1326 0 1
1327 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1328 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1329 | Assigned Tunnel ID |
1330 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1331
1332 The Assigned Tunnel ID is a 2 octet non-zero unsigned integer.
1333
1334 The Assigned Tunnel ID AVP establishes a value used to multiplex
1335 and demultiplex multiple tunnels between the LNS and LAC. The L2TP
1336 peer MUST place this value in the Tunnel ID header field of all
1337
1338
1339
1340 <span class="grey">Townsley, et al. Standards Track [Page 24]</span></pre>
1341 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
1342 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1343
1344
1345 control and data messages that it subsequently transmits over the
1346 associated tunnel. Before the Assigned Tunnel ID AVP is received
1347 from a peer, messages MUST be sent to that peer with a Tunnel ID
1348 value of 0 in the header of all control messages.
1349
1350 In the StopCCN control message, the Assigned Tunnel ID AVP MUST be
1351 the same as the Assigned Tunnel ID AVP first sent to the receiving
1352 peer, permitting the peer to identify the appropriate tunnel even
1353 if a StopCCN is sent before an Assigned Tunnel ID AVP is received.
1354
1355 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1356 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1357 is 8.
1358
1359 Receive Window Size (SCCRQ, SCCRP)
1360
1361 The Receive Window Size AVP, Attribute Type 10, specifies the
1362 receive window size being offered to the remote peer.
1363
1364 The Attribute Value field for this AVP has the following format:
1365
1366 0 1
1367 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1368 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1369 | Window Size |
1370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1371
1372 The Window Size is a 2 octet unsigned integer.
1373
1374 If absent, the peer must assume a Window Size of 4 for its
1375 transmit window. The remote peer may send the specified number of
1376 control messages before it must wait for an acknowledgment.
1377
1378 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1379 this AVP MUST be set to 1. The Length of this AVP is 8.
1380
1381 Challenge (SCCRP, SCCRQ)
1382
1383 The Challenge AVP, Attribute Type 11, indicates that the issuing
1384 peer wishes to authenticate the tunnel endpoints using a CHAP-
1385 style authentication mechanism.
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396 <span class="grey">Townsley, et al. Standards Track [Page 25]</span></pre>
1397 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
1398 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1399
1400
1401 The Attribute Value field for this AVP has the following format:
1402
1403 0 1 2 3
1404 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
1405 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1406 | Challenge ... (arbitrary number of octets)
1407 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1408
1409 The Challenge is one or more octets of random data.
1410
1411 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1412 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1413 is 6 plus the length of the Challenge.
1414
1415 Challenge Response (SCCCN, SCCRP)
1416
1417 The Response AVP, Attribute Type 13, provides a response to a
1418 challenge received.
1419
1420 The Attribute Value field for this AVP has the following format:
1421
1422 0 1 2 3
1423 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
1424 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1425 | Response ...
1426 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1427
1428 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1429
1430 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1431 ... (16 octets) |
1432 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1433
1434 The Response is a 16 octet value reflecting the CHAP-style
1435 [<a href="./rfc1994" title="&quot;PPP Challenge Handshake Authentication Protocol (CHAP)&quot;">RFC1994</a>] response to the challenge.
1436
1437 This AVP MUST be present in an SCCRP or SCCCN if a challenge was
1438 received in the preceding SCCRQ or SCCRP. For purposes of the ID
1439 value in the CHAP response calculation, the value of the Message
1440 Type AVP for this message is used (e.g. 2 for an SCCRP, and 3 for
1441 an SCCCN).
1442
1443 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1444 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1445 is 22.
1446
1447
1448
1449
1450
1451
1452 <span class="grey">Townsley, et al. Standards Track [Page 26]</span></pre>
1453 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
1454 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1455
1456
1457 <span class="h4"><a class="selflink" id="section-4.4.4" href="#section-4.4.4">4.4.4</a> Call Management AVPs</span>
1458
1459 Q.931 Cause Code (CDN)
1460
1461 The Q.931 Cause Code AVP, Attribute Type 12, is used to give
1462 additional information in case of unsolicited call disconnection.
1463
1464 The Attribute Value field for this AVP has the following format:
1465
1466 0 1 2 3
1467 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
1468 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1469 | Cause Code | Cause Msg | Advisory Msg...
1470 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1471
1472 Cause Code is the returned Q.931 Cause code, and Cause Msg is the
1473 returned Q.931 message code (e.g., DISCONNECT) associated with the
1474 Cause Code. Both values are returned in their native ITU
1475 encodings [<a href="#ref-DSS1" title="&quot;Digital subscriber Signaling System No. 1 (DSS 1) - ISDN user-network interface layer 3 specification for basic call control&quot;">DSS1</a>]. An additional ASCII text Advisory Message may
1476 also be included (presence indicated by the AVP Length) to further
1477 explain the reason for disconnecting.
1478
1479 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1480 this AVP MUST be set to 1. The Length of this AVP is 9, plus the
1481 size of the Advisory Message.
1482
1483 Assigned Session ID (CDN, ICRP, ICRQ, OCRP, OCRQ)
1484
1485 The Assigned Session ID AVP, Attribute Type 14, encodes the ID
1486 being assigned to this session by the sender.
1487
1488 The Attribute Value field for this AVP has the following format:
1489
1490 0 1
1491 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1492 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1493 | Assigned Session ID |
1494 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1495
1496 The Assigned Session ID is a 2 octet non-zero unsigned integer.
1497
1498 The Assigned Session ID AVP is establishes a value used to
1499 multiplex and demultiplex data sent over a tunnel between the LNS
1500 and LAC. The L2TP peer MUST place this value in the Session ID
1501 header field of all control and data messages that it subsequently
1502 transmits over the tunnel that belong to this session. Before the
1503
1504
1505
1506
1507
1508 <span class="grey">Townsley, et al. Standards Track [Page 27]</span></pre>
1509 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
1510 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1511
1512
1513 Assigned Session ID AVP is received from a peer, messages MUST be
1514 sent to that peer with a Session ID of 0 in the header of all
1515 control messages.
1516
1517 In the CDN control message, the same Assigned Session ID AVP first
1518 sent to the receiving peer is used, permitting the peer to
1519 identify the appropriate tunnel even if CDN is sent before an
1520 Assigned Session ID is received.
1521
1522 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1523 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1524 is 8.
1525
1526 Call Serial Number (ICRQ, OCRQ)
1527
1528 The Call Serial Number AVP, Attribute Type 15, encodes an
1529 identifier assigned by the LAC or LNS to this call.
1530
1531 The Attribute Value field for this AVP has the following format:
1532
1533 0 1 2 3
1534 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
1535 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1536 | Call Serial Number |
1537 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1538
1539 The Call Serial Number is a 32 bit value.
1540
1541 The Call Serial Number is intended to be an easy reference for
1542 administrators on both ends of a tunnel to use when investigating
1543 call failure problems. Call Serial Numbers should be set to
1544 progressively increasing values, which are likely to be unique for
1545 a significant period of time across all interconnected LNSs and
1546 LACs.
1547
1548 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1549 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1550 is 10.
1551
1552 Minimum BPS (OCRQ)
1553
1554 The Minimum BPS AVP, Attribute Type 16, encodes the lowest
1555 acceptable line speed for this call.
1556
1557
1558
1559
1560
1561
1562
1563
1564 <span class="grey">Townsley, et al. Standards Track [Page 28]</span></pre>
1565 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
1566 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1567
1568
1569 The Attribute Value field for this AVP has the following format:
1570
1571 0 1 2 3
1572 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
1573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1574 | Minimum BPS |
1575 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1576
1577 The Minimum BPS is a 32 bit value indicates the speed in bits per
1578 second.
1579
1580 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1581 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1582 is 10.
1583
1584 Maximum BPS (OCRQ)
1585
1586 The Maximum BPS AVP, Attribute Type 17, encodes the highest
1587 acceptable line speed for this call.
1588
1589 The Attribute Value field for this AVP has the following format:
1590
1591 0 1 2 3
1592 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
1593 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1594 | Maximum BPS |
1595 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1596
1597 The Maximum BPS is a 32 bit value indicates the speed in bits per
1598 second.
1599
1600 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1601 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1602 is 10.
1603
1604 Bearer Type (ICRQ, OCRQ)
1605
1606 The Bearer Type AVP, Attribute Type 18, encodes the bearer type
1607 for the incoming or outgoing call.
1608
1609 The Attribute Value field for this AVP has the following format:
1610
1611 0 1 2 3
1612 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
1613 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1614 | Reserved for future Bearer Types |A|D|
1615 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1616
1617
1618
1619
1620 <span class="grey">Townsley, et al. Standards Track [Page 29]</span></pre>
1621 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
1622 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1623
1624
1625 The Bearer Type is a 32-bit bit mask, which indicates the bearer
1626 capability of the call (ICRQ) or required for the call (OCRQ). If
1627 set, bit A indicates that the call refers to an analog channel. If
1628 set, bit D indicates that the call refers to a digital channel.
1629 Both may be set, indicating that the call was either
1630 indistinguishable, or can be placed on either type of channel.
1631
1632 Bits in the Value field of this AVP MUST only be set by the LNS
1633 for an OCRQ if it was set in the Bearer Capabilities AVP received
1634 from the LAC during control connection establishment.
1635
1636 It is valid to set neither the A nor D bits in an ICRQ. Such a
1637 setting may indicate that the call was not received over a
1638 physical link (e.g if the LAC and PPP are located in the same
1639 subsystem).
1640
1641 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1642 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1643 is 10.
1644
1645 Framing Type (ICCN, OCCN, OCRQ)
1646
1647 The Framing Type AVP, Attribute Type 19, encodes the framing type
1648 for the incoming or outgoing call.
1649
1650 The Attribute Value field for this AVP has the following format:
1651
1652 0 1 2 3
1653 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
1654 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1655 | Reserved for future Framing Types |A|S|
1656 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1657
1658 The Framing Type is a 32-bit mask, which indicates the type of PPP
1659 framing requested for an OCRQ, or the type of PPP framing
1660 negotiated for an OCCN or ICCN. The framing type MAY be used as an
1661 indication to PPP on the LNS as to what link options to use for
1662 LCP negotiation [<a href="./rfc1662" title="&quot;PPP in HDLC-like Framing&quot;">RFC1662</a>].
1663
1664 Bit A indicates asynchronous framing. Bit S indicates synchronous
1665 framing. For an OCRQ, both may be set, indicating that either type
1666 of framing may be used.
1667
1668 Bits in the Value field of this AVP MUST only be set by the LNS
1669 for an OCRQ if it was set in the Framing Capabilities AVP received
1670 from the LAC during control connection establishment.
1671
1672
1673
1674
1675
1676 <span class="grey">Townsley, et al. Standards Track [Page 30]</span></pre>
1677 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
1678 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1679
1680
1681 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1682 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1683 is 10.
1684
1685 Called Number (ICRQ, OCRQ)
1686
1687 The Called Number AVP, Attribute Type 21, encodes the telephone
1688 number to be called for an OCRQ, and the Called number for an
1689 ICRQ.
1690
1691 The Attribute Value field for this AVP has the following format:
1692
1693 0 1 2 3
1694 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
1695 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1696 | Called Number... (arbitrary number of octets) |
1697 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1698
1699 The Called Number is an ASCII string. Contact between the
1700 administrator of the LAC and the LNS may be necessary to
1701 coordinate interpretation of the value needed in this AVP.
1702
1703 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1704 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1705 is 6 plus the length of the Called Number.
1706
1707 Calling Number (ICRQ)
1708
1709 The Calling Number AVP, Attribute Type 22, encodes the originating
1710 number for the incoming call.
1711
1712 The Attribute Value field for this AVP has the following format:
1713
1714 0 1 2 3
1715 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
1716 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1717 | Calling Number... (arbitrary number of octets) |
1718 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1719
1720 Calling Number is an ASCII string. Contact between the
1721 administrator of the LAC and the LNS may be necessary to
1722 coordinate interpretation of the value in this AVP.
1723
1724 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1725 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1726 is 6 plus the length of the Calling Number.
1727
1728
1729
1730
1731
1732 <span class="grey">Townsley, et al. Standards Track [Page 31]</span></pre>
1733 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
1734 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1735
1736
1737 Sub-Address (ICRQ, OCRQ)
1738
1739 The Sub-Address AVP, Attribute Type 23, encodes additional dialing
1740 information.
1741
1742 The Attribute Value field for this AVP has the following format:
1743
1744 0 1 2 3
1745 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
1746 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1747 | Sub-Address ... (arbitrary number of octets) |
1748 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1749
1750 The Sub-Address is an ASCII string. Contact between the
1751 administrator of the LAC and the LNS may be necessary to
1752 coordinate interpretation of the value in this AVP.
1753
1754 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1755 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1756 is 6 plus the length of the Sub-Address.
1757
1758 (Tx) Connect Speed (ICCN, OCCN)
1759
1760 The (Tx) Connect Speed BPS AVP, Attribute Type 24, encodes the
1761 speed of the facility chosen for the connection attempt.
1762
1763 The Attribute Value field for this AVP has the following format:
1764
1765 0 1 2 3
1766 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
1767 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1768 | BPS |
1769 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1770
1771 The (Tx) Connect Speed BPS is a 4 octet value indicating the speed
1772 in bits per second.
1773
1774 When the optional Rx Connect Speed AVP is present, the value in
1775 this AVP represents the transmit connect speed, from the
1776 perspective of the LAC (e.g. data flowing from the LAC to the
1777 remote system). When the optional Rx Connect Speed AVP is NOT
1778 present, the connection speed between the remote system and LAC is
1779 assumed to be symmetric and is represented by the single value in
1780 this AVP.
1781
1782 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1783 this AVP MUST be set to 1. The Length (before hiding) of this AVP
1784 is 10.
1785
1786
1787
1788 <span class="grey">Townsley, et al. Standards Track [Page 32]</span></pre>
1789 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
1790 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1791
1792
1793 Rx Connect Speed (ICCN, OCCN)
1794
1795 The Rx Connect Speed AVP, Attribute Type 38, represents the speed
1796 of the connection from the perspective of the LAC (e.g. data
1797 flowing from the remote system to the LAC).
1798
1799 The Attribute Value field for this AVP has the following format:
1800
1801 0 1 2 3
1802 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
1803 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1804 | BPS (H) | BPS (L) |
1805 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1806
1807 BPS is a 4 octet value indicating the speed in bits per second.
1808
1809 Presence of this AVP implies that the connection speed may be
1810 asymmetric with respect to the transmit connect speed given in the
1811 (Tx) Connect Speed AVP.
1812
1813 This AVP may be hidden (the H-bit MAY be 1 or 0). The M-bit for
1814 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1815 is 10.
1816
1817 Physical Channel ID (ICRQ, OCRP)
1818
1819 The Physical Channel ID AVP, Attribute Type 25, encodes the vendor
1820 specific physical channel number used for a call.
1821
1822 The Attribute Value field for this AVP has the following format:
1823
1824 0 1 2 3
1825 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
1826 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1827 | Physical Channel ID |
1828 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1829
1830 Physical Channel ID is a 4 octet value intended to be used for
1831 logging purposes only.
1832
1833 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1834 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1835 is 10.
1836
1837
1838
1839
1840
1841
1842
1843
1844 <span class="grey">Townsley, et al. Standards Track [Page 33]</span></pre>
1845 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
1846 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1847
1848
1849 Private Group ID (ICCN)
1850
1851 The Private Group ID AVP, Attribute Type 37, is used by the LAC to
1852 indicate that this call is to be associated with a particular
1853 customer group.
1854
1855 The Attribute Value field for this AVP has the following format:
1856
1857 0 1 2 3
1858 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
1859 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1860 | Private Group ID ... (arbitrary number of octets) |
1861 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1862
1863 The Private Group ID is a string of octets of arbitrary length.
1864
1865 The LNS MAY treat the PPP session as well as network traffic
1866 through this session in a special manner determined by the peer.
1867 For example, if the LNS is individually connected to several
1868 private networks using unregistered addresses, this AVP may be
1869 included by the LAC to indicate that a given call should be
1870 associated with one of the private networks.
1871
1872 The Private Group ID is a string corresponding to a table in the
1873 LNS that defines the particular characteristics of the selected
1874 group. A LAC MAY determine the Private Group ID from a RADIUS
1875 response, local configuration, or some other source.
1876
1877 This AVP may be hidden (the H-bit MAY be 1 or 0). The M-bit for
1878 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1879 is 6 plus the length of the Private Group ID.
1880
1881 Sequencing Required (ICCN, OCCN)
1882
1883 The Sequencing Required AVP, Attribute Type 39, indicates to the
1884 LNS that Sequence Numbers MUST always be present on the data
1885 channel.
1886
1887 This AVP has no Attribute Value field.
1888
1889 This AVP MUST NOT be hidden (the H-bit MUST be 0). The M-bit for
1890 this AVP MUST be set to 1. The Length of this AVP is 6.
1891
1892 <span class="h4"><a class="selflink" id="section-4.4.5" href="#section-4.4.5">4.4.5</a> Proxy LCP and Authentication AVPs</span>
1893
1894 The LAC may have answered the call and negotiated LCP with the
1895 remote system, perhaps in order to establish the system's apparent
1896 identity. In this case, these AVPs may be included to indicate the
1897
1898
1899
1900 <span class="grey">Townsley, et al. Standards Track [Page 34]</span></pre>
1901 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
1902 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1903
1904
1905 link properties the remote system initially requested, properties
1906 the remote system and LAC ultimately negotiated, as well as PPP
1907 authentication information sent and received by the LAC. This
1908 information may be used to initiate the PPP LCP and authentication
1909 systems on the LNS, allowing PPP to continue without renegotiation
1910 of LCP. Note that the LNS policy may be to enter an additional
1911 round of LCP negotiation and/or authentication if the LAC is not
1912 trusted.
1913
1914 Initial Received LCP CONFREQ (ICCN)
1915
1916 In the Initial Received LCP CONFREQ AVP, Attribute Type 26,
1917 provides the LNS with the Initial CONFREQ received by the LAC from
1918 the PPP Peer.
1919
1920 The Attribute Value field for this AVP has the following format:
1921
1922 0 1 2 3
1923 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
1924 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1925 | LCP CONFREQ... (arbitrary number of octets) |
1926 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1927
1928 LCP CONFREQ is a copy of the body of the initial CONFREQ received,
1929 starting at the first option within the body of the LCP message.
1930
1931 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1932 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1933 is 6 plus the length of the CONFREQ.
1934
1935 Last Sent LCP CONFREQ (ICCN)
1936
1937 In the Last Sent LCP CONFREQ AVP, Attribute Type 27, provides the
1938 LNS with the Last CONFREQ sent by the LAC to the PPP Peer.
1939
1940 The Attribute Value field for this AVP has the following format:
1941
1942 0 1 2 3
1943 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
1944 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1945 | LCP CONFREQ... (arbitrary number of octets) |
1946 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1947
1948 The LCP CONFREQ is a copy of the body of the final CONFREQ sent to
1949 the client to complete LCP negotiation, starting at the first
1950 option within the body of the LCP message.
1951
1952
1953
1954
1955
1956 <span class="grey">Townsley, et al. Standards Track [Page 35]</span></pre>
1957 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
1958 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
1959
1960
1961 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1962 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1963 is 6 plus the length of the CONFREQ.
1964
1965 Last Received LCP CONFREQ (ICCN)
1966
1967 The Last Received LCP CONFREQ AVP, Attribute Type 28, provides the
1968 LNS with the Last CONFREQ received by the LAC from the PPP Peer.
1969
1970 The Attribute Value field for this AVP has the following format:
1971
1972 0 1 2 3
1973 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
1974 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1975 | LCP CONFREQ... (arbitrary number of octets) |
1976 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1977
1978 The LCP CONFREQ is a copy of the body of the final CONFREQ
1979 received from the client to complete LCP negotiation, starting at
1980 the first option within the body of the LCP message.
1981
1982 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
1983 this AVP MUST be set to 0. The Length (before hiding) of this AVP
1984 is 6 plus the length of the CONFREQ.
1985
1986 Proxy Authen Type (ICCN)
1987
1988 The Proxy Authen Type AVP, Attribute Type 29, determines if proxy
1989 authentication should be used.
1990
1991 The Attribute Value field for this AVP has the following format:
1992
1993 0 1
1994 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1995 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1996 | Authen Type |
1997 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1998
1999 Authen Type is a 2 octet unsigned integer, holding:
2000
2001 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
2002 this AVP MUST be set to 0. The Length (before hiding) of this AVP
2003 is 8.
2004
2005
2006
2007
2008
2009
2010
2011
2012 <span class="grey">Townsley, et al. Standards Track [Page 36]</span></pre>
2013 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
2014 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2015
2016
2017 Defined Authen Type values are:
2018 0 - Reserved
2019 1 - Textual username/password exchange
2020 2 - PPP CHAP
2021 3 - PPP PAP
2022 4 - No Authentication
2023 5 - Microsoft CHAP Version 1 (MSCHAPv1)
2024
2025 This AVP MUST be present if proxy authentication is to be
2026 utilized. If it is not present, then it is assumed that this
2027 peer cannot perform proxy authentication, requiring
2028 a restart of the authentication phase at the LNS if the client
2029 has already entered this phase with the
2030 LAC (which may be determined by the Proxy LCP AVP if present).
2031
2032 Associated AVPs for each type of authentication follow.
2033
2034 Proxy Authen Name (ICCN)
2035
2036 The Proxy Authen Name AVP, Attribute Type 30, specifies the name
2037 of the authenticating client when using proxy authentication.
2038
2039 The Attribute Value field for this AVP has the following format:
2040
2041 0 1 2 3
2042 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
2043 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2044 | Authen Name... (arbitrary number of octets) |
2045 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2046
2047 Authen Name is a string of octets of arbitrary length. It
2048 contains the name specified in the client's authentication
2049 response.
2050
2051 This AVP MUST be present in messages containing a Proxy Authen
2052 Type AVP with an Authen Type of 1, 2, 3 or 5. It may be desirable
2053 to employ AVP hiding for obscuring the cleartext name.
2054
2055 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
2056 this AVP MUST be set to 0. The Length (before hiding) is 6 plus
2057 the length of the cleartext name.
2058
2059 Proxy Authen Challenge (ICCN)
2060
2061 The Proxy Authen Challenge AVP, Attribute Type 31, specifies the
2062 challenge sent by the LAC to the PPP Peer, when using proxy
2063 authentication.
2064
2065
2066
2067
2068 <span class="grey">Townsley, et al. Standards Track [Page 37]</span></pre>
2069 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
2070 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2071
2072
2073 The Attribute Value field for this AVP has the following format:
2074
2075 0 1 2 3
2076 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
2077 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2078 | Challenge... (arbitrary number of octets) |
2079 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2080
2081 The Challenge is a string of one or more octets.
2082
2083 This AVP MUST be present for Proxy Authen Types 2 and 5. The
2084 Challenge field contains the CHAP challenge presented to the
2085 client by the LAC.
2086
2087 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
2088 this AVP MUST be set to 0. The Length (before hiding) of this AVP
2089 is 6, plus the length of the Challenge.
2090
2091 Proxy Authen ID (ICCN)
2092
2093 The Proxy Authen ID AVP, Attribute Type 32, specifies the ID value
2094 of the PPP Authentication that was started between the LAC and the
2095 PPP Peer, when proxy authentication is being used.
2096
2097 The Attribute Value field for this AVP has the following format:
2098
2099 0 1
2100 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
2101 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2102 | Reserved | ID |
2103 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2104
2105 ID is a 2 octet unsigned integer, the most significant octet MUST
2106 be 0.
2107
2108 The Proxy Authen ID AVP MUST be present for Proxy authen types 2,
2109 3 and 5. For 2 and 5, the ID field contains the byte ID value
2110 presented to the client by the LAC in its Challenge. For 3, it is
2111 the Identifier value of the Authenticate-Request.
2112
2113 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
2114 this AVP MUST be set to 0.
2115
2116 Proxy Authen Response (ICCN)
2117
2118 The Proxy Authen Response AVP, Attribute Type 33, specifies the
2119 PPP Authentication response received by the LAC from the PPP Peer,
2120 when proxy authentication is used.
2121
2122
2123
2124 <span class="grey">Townsley, et al. Standards Track [Page 38]</span></pre>
2125 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
2126 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2127
2128
2129 The Attribute Value field for this AVP has the following format:
2130
2131 0 1 2 3
2132 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
2133 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2134 | Response... (arbitrary number of octets) |
2135 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2136
2137 The Response is a string of octets.
2138
2139 This AVP MUST be present for Proxy authen types 1, 2, 3 and 5. The
2140 Response field contains the client's response to the challenge.
2141 For Proxy authen types 2 and 5, this field contains the response
2142 value received by the LAC. For types 1 or 3, it contains the clear
2143 text password received from the client by the LAC. In the case of
2144 cleartext passwords, AVP hiding is recommended.
2145
2146 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
2147 this AVP MUST be set to 0. The Length (before hiding) of this AVP
2148 is 6 plus the length of the Response.
2149
2150 <span class="h4"><a class="selflink" id="section-4.4.6" href="#section-4.4.6">4.4.6</a> Call Status AVPs</span>
2151
2152 Call Errors (WEN)
2153
2154 The Call Errors AVP, Attribute Type 34, is used by the LAC to send
2155 error information to the LNS.
2156
2157 The Attribute Value field for this AVP has the following format:
2158
2159 0 1 2 3
2160 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
2161 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2162 | Reserved | CRC Errors (H) |
2163 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2164 | CRC Errors (L) | Framing Errors (H) |
2165 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2166 | Framing Errors (L) | Hardware Overruns (H) |
2167 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2168 | Hardware Overruns (L) | Buffer Overruns (H) |
2169 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2170 | Buffer Overruns (L) | Time-out Errors (H) |
2171 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2172 | Time-out Errors (L) | Alignment Errors (H) |
2173 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2174 | Alignment Errors (L) |
2175 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2176
2177
2178
2179
2180 <span class="grey">Townsley, et al. Standards Track [Page 39]</span></pre>
2181 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
2182 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2183
2184
2185 The following fields are defined:
2186
2187 Reserved - Not used, MUST be 0
2188 CRC Errors - Number of PPP frames received with CRC errors
2189 since call was established
2190 Framing Errors - Number of improperly framed PPP packets
2191 received
2192 Hardware Overruns - Number of receive buffer over-runs since
2193 call was established
2194 Buffer Overruns - Number of buffer over-runs detected since
2195 call was established
2196 Time-out Errors - Number of time-outs since call was
2197 established
2198 Alignment Errors - Number of alignment errors since call was
2199 established
2200
2201 This AVP may be hidden (the H-bit may be 0 or 1). The M-bit for
2202 this AVP MUST be set to 1. The Length (before hiding) of this AVP
2203 is 32.
2204
2205 ACCM (SLI)
2206
2207 The ACCM AVP, Attribute Type 35, is used by the LNS to inform LAC
2208 of the ACCM negotiated with the PPP Peer by the LNS.
2209
2210 The Attribute Value field for this AVP has the following format:
2211
2212 0 1 2 3
2213 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
2214 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2215 | Reserved | Send ACCM (H) |
2216 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2217 | Send ACCM (L) | Receive ACCM (H) |
2218 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2219 | Receive ACCM (L) |
2220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2221
2222 Send ACCM and Receive ACCM are each 4 octet values preceded by a 2
2223 octet reserved quantity. The send ACCM value should be used by the
2224 LAC to process packets it sends on the connection. The receive
2225 ACCM value should be used by the LAC to process incoming packets
2226 on the connection. The default values used by the LAC for both
2227 these fields are 0xFFFFFFFF. The LAC should honor these fields
2228 unless it has specific configuration information to indicate that
2229 the requested mask must be modified to permit operation.
2230
2231 This AVP may be hidden (the H-bit MAY be 1 or 0). The M-bit for
2232 this AVP MUST be set to 1. The Length of this AVP is 16.
2233
2234
2235
2236 <span class="grey">Townsley, et al. Standards Track [Page 40]</span></pre>
2237 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
2238 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2239
2240
2241 <span class="h3"><a class="selflink" id="section-5.0" href="#section-5.0">5.0</a> Protocol Operation</span>
2242
2243 The necessary setup for tunneling a PPP session with L2TP consists of
2244 two steps, (1) establishing the Control Connection for a Tunnel, and
2245 (2) establishing a Session as triggered by an incoming or outgoing
2246 call request. The Tunnel and corresponding Control Connection MUST be
2247 established before an incoming or outgoing call is initiated. An L2TP
2248 Session MUST be established before L2TP can begin to tunnel PPP
2249 frames. Multiple Sessions may exist across a single Tunnel and
2250 multiple Tunnels may exist between the same LAC and LNS.
2251
2252 +-----+ +-----+
2253 | |~~~~~~~~~~L2TP Tunnel~~~~~~~~~~| |
2254 | LAC | | LNS |
2255 | #######Control Connection######## |
2256 [Remote] | | | |
2257 [System]------Call----------*============L2TP Session=============* |
2258 PPP +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2259 | | | |
2260 [Remote] | | | |
2261 [System]------Call----------*============L2TP Session=============* |
2262 PPP +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2263 | | | |
2264 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
2265 +-----+ +-----+
2266
2267 Figure 5.1 Tunneling PPP
2268
2269 <span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a> Control Connection Establishment</span>
2270
2271 The Control Connection is the initial connection that must be
2272 achieved between an LAC and LNS before sessions may be brought up.
2273 Establishment of the control connection includes securing the
2274 identity of the peer, as well as identifying the peer's L2TP version,
2275 framing, and bearer capabilities, etc.
2276
2277 A three message exchange is utilized to setup the control connection.
2278 Following is a typical message exchange:
2279
2280 LAC or LNS LAC or LNS
2281 ---------- ----------
2282 SCCRQ -&gt;
2283 &lt;- SCCRP
2284 SCCCN -&gt;
2285 &lt;- ZLB ACK
2286
2287 The ZLB ACK is sent if there are no further messages waiting in queue
2288 for that peer.
2289
2290
2291
2292 <span class="grey">Townsley, et al. Standards Track [Page 41]</span></pre>
2293 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
2294 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2295
2296
2297 <span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a> Tunnel Authentication</span>
2298
2299 L2TP incorporates a simple, optional, CHAP-like [<a href="./rfc1994" title="&quot;PPP Challenge Handshake Authentication Protocol (CHAP)&quot;">RFC1994</a>] tunnel
2300 authentication system during control connection establishment. If an
2301 LAC or LNS wishes to authenticate the identity of the peer it is
2302 contacting or being contacted by, a Challenge AVP is included in the
2303 SCCRQ or SCCRP message. If a Challenge AVP is received in an SCCRQ or
2304 SCCRP, a Challenge Response AVP MUST be sent in the following SCCRP
2305 or SCCCN, respectively. If the expected response and response
2306 received from a peer does not match, establishment of the tunnel MUST
2307 be disallowed.
2308
2309 To participate in tunnel authentication, a single shared secret MUST
2310 exist between the LAC and LNS. This is the same shared secret used
2311 for AVP hiding (see <a href="#section-4.3">Section 4.3</a>). See <a href="#section-4.4.3">Section 4.4.3</a> for details on
2312 construction of the Challenge and Response AVPs.
2313
2314 <span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a> Session Establishment</span>
2315
2316 After successful control connection establishment, individual
2317 sessions may be created. Each session corresponds to single PPP
2318 stream between the LAC and LNS. Unlike control connection
2319 establishment, session establishment is directional with respect to
2320 the LAC and LNS. The LAC requests the LNS to accept a session for an
2321 incoming call, and the LNS requests the LAC to accept a session for
2322 placing an outgoing call.
2323
2324 <span class="h4"><a class="selflink" id="section-5.2.1" href="#section-5.2.1">5.2.1</a> Incoming Call Establishment</span>
2325
2326 A three message exchange is employed to setup the session. Following
2327 is a typical sequence of events:
2328
2329 LAC LNS
2330 --- ---
2331 (Call
2332 Detected)
2333
2334 ICRQ -&gt;
2335 &lt;- ICRP
2336 ICCN -&gt;
2337 &lt;- ZLB ACK
2338
2339 The ZLB ACK is sent if there are no further messages waiting in queue
2340 for that peer.
2341
2342
2343
2344
2345
2346
2347
2348 <span class="grey">Townsley, et al. Standards Track [Page 42]</span></pre>
2349 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
2350 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2351
2352
2353 <span class="h4"><a class="selflink" id="section-5.2.2" href="#section-5.2.2">5.2.2</a> Outgoing Call Establishment</span>
2354
2355 A three message exchange is employed to setup the session. Following
2356 is a typical sequence of events:
2357
2358 LAC LNS
2359 --- ---
2360 &lt;- OCRQ
2361 OCRP -&gt;
2362
2363 (Perform
2364 Call
2365 Operation)
2366
2367 OCCN -&gt;
2368 &lt;- ZLB ACK
2369
2370 The ZLB ACK is sent if there are no further messages waiting in queue
2371 for that peer.
2372
2373 <span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a> Forwarding PPP Frames</span>
2374
2375 Once tunnel establishment is complete, PPP frames from the remote
2376 system are received at the LAC, stripped of CRC, link framing, and
2377 transparency bytes, encapsulated in L2TP, and forwarded over the
2378 appropriate tunnel. The LNS receives the L2TP packet, and processes
2379 the encapsulated PPP frame as if it were received on a local PPP
2380 interface.
2381
2382 The sender of a message associated with a particular session and
2383 tunnel places the Session ID and Tunnel ID (specified by its peer) in
2384 the Session ID and Tunnel ID header for all outgoing messages. In
2385 this manner, PPP frames are multiplexed and demultiplexed over a
2386 single tunnel between a given LNS-LAC pair. Multiple tunnels may
2387 exist between a given LNS-LAC pair, and multiple sessions may exist
2388 within a tunnel.
2389
2390 The value of 0 for Session ID and Tunnel ID is special and MUST NOT
2391 be used as an Assigned Session ID or Assigned Tunnel ID. For the
2392 cases where a Session ID has not yet been assigned by the peer (i.e.,
2393 during establishment of a new session or tunnel), the Session ID
2394 field MUST be sent as 0, and the Assigned Session ID AVP within the
2395 message MUST be used to identify the session. Similarly, for cases
2396 where the Tunnel ID has not yet been assigned from the peer, the
2397 Tunnel ID MUST be sent as 0 and Assigned Tunnel ID AVP used to
2398 identify the tunnel.
2399
2400
2401
2402
2403
2404 <span class="grey">Townsley, et al. Standards Track [Page 43]</span></pre>
2405 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
2406 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2407
2408
2409 <span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a> Using Sequence Numbers on the Data Channel</span>
2410
2411 Sequence numbers are defined in the L2TP header for control messages
2412 and optionally for data messages (see <a href="#section-3.1">Section 3.1</a>). These are used to
2413 provide a reliable control message transport (see <a href="#section-5.8">Section 5.8</a>) and
2414 optional data message sequencing. Each peer maintains separate
2415 sequence numbers for the control connection and each individual data
2416 session within a tunnel.
2417
2418 Unlike the L2TP control channel, the L2TP data channel does not use
2419 sequence numbers to retransmit lost data messages. Rather, data
2420 messages may use sequence numbers to detect lost packets and/or
2421 restore the original sequence of packets that may have been reordered
2422 during transport. The LAC may request that sequence numbers be
2423 present in data messages via the Sequencing Required AVP (see <a href="#section-4.4.6">Section</a>
2424 <a href="#section-4.4.6">4.4.6</a>). If this AVP is present during session setup, sequence numbers
2425 MUST be present at all times. If this AVP is not present, sequencing
2426 presence is under control of the LNS. The LNS controls enabling and
2427 disabling of sequence numbers by sending a data message with or
2428 without sequence numbers present at any time during the life of a
2429 session. Thus, if the LAC receives a data message without sequence
2430 numbers present, it MUST stop sending sequence numbers in future data
2431 messages. If the LAC receives a data message with sequence numbers
2432 present, it MUST begin sending sequence numbers in future outgoing
2433 data messages. If the LNS enables sequencing after disabling it
2434 earlier in the session, the sequence number state picks up where it
2435 left off before.
2436
2437 The LNS may initiate disabling of sequencing at any time during the
2438 session (including the first data message sent). It is recommended
2439 that for connections where reordering or packet loss may occur,
2440 sequence numbers always be enabled during the initial negotiation
2441 stages of PPP and disabled only when and if the risk is considered
2442 acceptable. For example, if the PPP session being tunneled is not
2443 utilizing any stateful compression or encryption protocols and is
2444 only carrying IP (as determined by the PPP NCPs that are
2445 established), then the LNS might decide to disable sequencing as IP
2446 is tolerant to datagram loss and reordering.
2447
2448 <span class="h3"><a class="selflink" id="section-5.5" href="#section-5.5">5.5</a> Keepalive (Hello)</span>
2449
2450 A keepalive mechanism is employed by L2TP in order to differentiate
2451 tunnel outages from extended periods of no control or data activity
2452 on a tunnel. This is accomplished by injecting Hello control messages
2453 (see <a href="#section-6.5">Section 6.5</a>) after a specified period of time has elapsed since
2454 the last data or control message was received on a tunnel. As for any
2455 other control message, if the Hello message is not reliably delivered
2456 then the tunnel is declared down and is reset. The transport reset
2457
2458
2459
2460 <span class="grey">Townsley, et al. Standards Track [Page 44]</span></pre>
2461 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
2462 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2463
2464
2465 mechanism along with the injection of Hello messages ensures that a
2466 connectivity failure between the LNS and the LAC will be detected at
2467 both ends of a tunnel.
2468
2469 <span class="h3"><a class="selflink" id="section-5.6" href="#section-5.6">5.6</a> Session Teardown</span>
2470
2471 Session teardown may be initiated by either the LAC or LNS and is
2472 accomplished by sending a CDN control message. After the last session
2473 is cleared, the control connection MAY be torn down as well (and
2474 typically is). Following is an example of a typical control message
2475 exchange:
2476
2477 LAC or LNS LAC or LNS
2478
2479 CDN -&gt;
2480 (Clean up)
2481
2482 &lt;- ZLB ACK
2483 (Clean up)
2484
2485 <span class="h3"><a class="selflink" id="section-5.7" href="#section-5.7">5.7</a> Control Connection Teardown</span>
2486
2487 Control connection teardown may be initiated by either the LAC or LNS
2488 and is accomplished by sending a single StopCCN control message. The
2489 receiver of a StopCCN MUST send a ZLB ACK to acknowledge receipt of
2490 the message and maintain enough control connection state to properly
2491 accept StopCCN retransmissions over at least a full retransmission
2492 cycle (in case the ZLB ACK is lost). The recommended time for a full
2493 retransmission cycle is 31 seconds (see <a href="#section-5.8">section 5.8</a>). Following is an
2494 example of a typical control message exchange:
2495
2496 LAC or LNS LAC or LNS
2497
2498 StopCCN -&gt;
2499 (Clean up)
2500
2501 &lt;- ZLB ACK
2502 (Wait)
2503 (Clean up)
2504
2505 An implementation may shut down an entire tunnel and all sessions on
2506 the tunnel by sending the StopCCN. Thus, it is not necessary to clear
2507 each session individually when tearing down the whole tunnel.
2508
2509
2510
2511
2512
2513
2514
2515
2516 <span class="grey">Townsley, et al. Standards Track [Page 45]</span></pre>
2517 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
2518 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2519
2520
2521 <span class="h3"><a class="selflink" id="section-5.8" href="#section-5.8">5.8</a> Reliable Delivery of Control Messages</span>
2522
2523 L2TP provides a lower level reliable transport service for all
2524 control messages. The Nr and Ns fields of the control message header
2525 (see <a href="#section-3.1">section 3.1</a>) belong to this transport. The upper level
2526 functions of L2TP are not concerned with retransmission or ordering
2527 of control messages. The reliable control message is a sliding window
2528 transport that provides control message retransmission and congestion
2529 control. Each peer maintains separate sequence number state for the
2530 control connection within a tunnel.
2531
2532 The message sequence number, Ns, begins at 0. Each subsequent message
2533 is sent with the next increment of the sequence number. The sequence
2534 number is thus a free running counter represented modulo 65536. The
2535 sequence number in the header of a received message is considered
2536 less than or equal to the last received number if its value lies in
2537 the range of the last received number and the preceding 32767 values,
2538 inclusive. For example, if the last received sequence number was 15,
2539 then messages with sequence numbers 0 through 15, as well as 32784
2540 through 65535, would be considered less than or equal. Such a message
2541 would be considered a duplicate of a message already received and
2542 ignored from processing. However, in order to ensure that all
2543 messages are acknowledged properly (particularly in the case of a
2544 lost ZLB ACK message), receipt of duplicate messages MUST be
2545 acknowledged by the reliable transport. This acknowledgement may
2546 either piggybacked on a message in queue, or explicitly via a ZLB
2547 ACK.
2548
2549 All control messages take up one slot in the control message sequence
2550 number space, except the ZLB acknowledgement. Thus, Ns is not
2551 incremented after a ZLB message is sent.
2552
2553 The last received message number, Nr, is used to acknowledge messages
2554 received by an L2TP peer. It contains the sequence number of the
2555 message the peer expects to receive next (e.g. the last Ns of a non-
2556 ZLB message received plus 1, modulo 65536). While the Nr in a
2557 received ZLB is used to flush messages from the local retransmit
2558 queue (see below), Nr of the next message sent is not be updated by
2559 the Ns of the ZLB.
2560
2561 The reliable transport at a receiving peer is responsible for making
2562 sure that control messages are delivered in order and without
2563 duplication to the upper level. Messages arriving out of order may be
2564 queued for in-order delivery when the missing messages are received,
2565 or they may be discarded requiring a retransmission by the peer.
2566
2567
2568
2569
2570
2571
2572 <span class="grey">Townsley, et al. Standards Track [Page 46]</span></pre>
2573 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
2574 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2575
2576
2577 Each tunnel maintains a queue of control messages to be transmitted
2578 to its peer. The message at the front of the queue is sent with a
2579 given Ns value, and is held until a control message arrives from the
2580 peer in which the Nr field indicates receipt of this message. After a
2581 period of time (a recommended default is 1 second) passes without
2582 acknowledgement, the message is retransmitted. The retransmitted
2583 message contains the same Ns value, but the Nr value MUST be updated
2584 with the sequence number of the next expected message.
2585
2586 Each subsequent retransmission of a message MUST employ an
2587 exponential backoff interval. Thus, if the first retransmission
2588 occurred after 1 second, the next retransmission should occur after 2
2589 seconds has elapsed, then 4 seconds, etc. An implementation MAY place
2590 a cap upon the maximum interval between retransmissions. This cap
2591 MUST be no less than 8 seconds per retransmission. If no peer
2592 response is detected after several retransmissions, (a recommended
2593 default is 5, but SHOULD be configurable), the tunnel and all
2594 sessions within MUST be cleared.
2595
2596 When a tunnel is being shut down for reasons other than loss of
2597 connectivity, the state and reliable delivery mechanisms MUST be
2598 maintained and operated for the full retransmission interval after
2599 the final message exchange has occurred.
2600
2601 A sliding window mechanism is used for control message transmission.
2602 Consider two peers A &amp; B. Suppose A specifies a Receive Window Size
2603 AVP with a value of N in the SCCRQ or SCCRP messages. B is now
2604 allowed to have up to N outstanding control messages. Once N have
2605 been sent, it must wait for an acknowledgment that advances the
2606 window before sending new control messages. An implementation may
2607 support a receive window of only 1 (i.e., by sending out a Receive
2608 Window Size AVP with a value of 1), but MUST accept a window of up to
2609 4 from its peer (e.g. have the ability to send 4 messages before
2610 backing off). A value of 0 for the Receive Window Size AVP is
2611 invalid.
2612
2613 When retransmitting control messages, a slow start and congestion
2614 avoidance window adjustment procedure SHOULD be utilized. The
2615 recommended procedure for this is described in <a href="#appendix-A">Appendix A</a>.
2616
2617 A peer MUST NOT withhold acknowledgment of messages as a technique
2618 for flow controlling control messages. An L2TP implementation is
2619 expected to be able to keep up with incoming control messages,
2620 possibly responding to some with errors reflecting an inability to
2621 honor the requested action.
2622
2623 <a href="#appendix-B">Appendix B</a> contains examples of control message transmission,
2624 acknowledgement, and retransmission.
2625
2626
2627
2628 <span class="grey">Townsley, et al. Standards Track [Page 47]</span></pre>
2629 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
2630 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2631
2632
2633 <span class="h3"><a class="selflink" id="section-6.0" href="#section-6.0">6.0</a> Control Connection Protocol Specification</span>
2634
2635 The following control connection messages are used to establish,
2636 clear and maintain L2TP tunnels. All data is sent in network order
2637 (high order octets first). Any "reserved" or "empty" fields MUST be
2638 sent as 0 values to allow for protocol extensibility.
2639
2640 <span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a> Start-Control-Connection-Request (SCCRQ)</span>
2641
2642 Start-Control-Connection-Request (SCCRQ) is a control message used to
2643 initialize a tunnel between an LNS and an LAC. It is sent by either
2644 the LAC or the LNS to being the tunnel establishment process.
2645
2646 The following AVPs MUST be present in the SCCRQ:
2647
2648 Message Type AVP
2649 Protocol Version
2650 Host Name
2651 Framing Capabilities
2652 Assigned Tunnel ID
2653
2654 The Following AVPs MAY be present in the SCCRQ:
2655
2656 Bearer Capabilities
2657 Receive Window Size
2658 Challenge
2659 Tie Breaker
2660 Firmware Revision
2661 Vendor Name
2662
2663 <span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a> Start-Control-Connection-Reply (SCCRP)</span>
2664
2665 Start-Control-Connection-Reply (SCCRP) is a control message sent in
2666 reply to a received SCCRQ message. SCCRP is used to indicate that the
2667 SCCRQ was accepted and establishment of the tunnel should continue.
2668
2669 The following AVPs MUST be present in the SCCRP:
2670
2671 Message Type
2672 Protocol Version
2673 Framing Capabilities
2674 Host Name
2675 Assigned Tunnel ID
2676
2677
2678
2679
2680
2681
2682
2683
2684 <span class="grey">Townsley, et al. Standards Track [Page 48]</span></pre>
2685 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
2686 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2687
2688
2689 The following AVPs MAY be present in the SCCRP:
2690
2691 Bearer Capabilities
2692 Firmware Revision
2693 Vendor Name
2694 Receive Window Size
2695 Challenge
2696 Challenge Response
2697
2698 <span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a> Start-Control-Connection-Connected (SCCCN)</span>
2699
2700 Start-Control-Connection-Connected (SCCCN) is a control message sent
2701 in reply to an SCCRP. SCCCN completes the tunnel establishment
2702 process.
2703
2704 The following AVP MUST be present in the SCCCN:
2705
2706 Message Type
2707
2708 The following AVP MAY be present in the SCCCN:
2709
2710 Challenge Response
2711
2712 <span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a> Stop-Control-Connection-Notification (StopCCN)</span>
2713
2714 Stop-Control-Connection-Notification (StopCCN) is a control message
2715 sent by either the LAC or LNS to inform its peer that the tunnel is
2716 being shutdown and the control connection should be closed. In
2717 addition, all active sessions are implicitly cleared (without sending
2718 any explicit call control messages). The reason for issuing this
2719 request is indicated in the Result Code AVP. There is no explicit
2720 reply to the message, only the implicit ACK that is received by the
2721 reliable control message transport layer.
2722
2723 The following AVPs MUST be present in the StopCCN:
2724
2725 Message Type
2726 Assigned Tunnel ID
2727 Result Code
2728
2729 <span class="h3"><a class="selflink" id="section-6.5" href="#section-6.5">6.5</a> Hello (HELLO)</span>
2730
2731 The Hello (HELLO) message is an L2TP control message sent by either
2732 peer of a LAC-LNS control connection. This control message is used as
2733 a "keepalive" for the tunnel.
2734
2735
2736
2737
2738
2739
2740 <span class="grey">Townsley, et al. Standards Track [Page 49]</span></pre>
2741 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
2742 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2743
2744
2745 The sending of HELLO messages and the policy for sending them are
2746 left up to the implementation. A peer MUST NOT expect HELLO messages
2747 at any time or interval. As with all messages sent on the control
2748 connection, the receiver will return either a ZLB ACK or an
2749 (unrelated) message piggybacking the necessary acknowledgement
2750 information.
2751
2752 Since a HELLO is a control message, and control messages are reliably
2753 sent by the lower level transport, this keepalive function operates
2754 by causing the transport level to reliably deliver a message. If a
2755 media interruption has occurred, the reliable transport will be
2756 unable to deliver the HELLO across, and will clean up the tunnel.
2757
2758 Keepalives for the tunnel MAY be implemented by sending a HELLO if a
2759 period of time (a recommended default is 60 seconds, but SHOULD be
2760 configurable) has passed without receiving any message (data or
2761 control) from the peer.
2762
2763 HELLO messages are global to the tunnel. The Session ID in a HELLO
2764 message MUST be 0.
2765
2766 The Following AVP MUST be present in the HELLO message:
2767
2768 Message Type
2769
2770 <span class="h3"><a class="selflink" id="section-6.6" href="#section-6.6">6.6</a> Incoming-Call-Request (ICRQ)</span>
2771
2772 Incoming-Call-Request (ICRQ) is a control message sent by the LAC to
2773 the LNS when an incoming call is detected. It is the first in a three
2774 message exchange used for establishing a session within an L2TP
2775 tunnel.
2776
2777 ICRQ is used to indicate that a session is to be established between
2778 the LAC and LNS for this call and provides the LNS with parameter
2779 information for the session. The LAC may defer answering the call
2780 until it has received an ICRP from the LNS indicating that the
2781 session should be established. This mechanism allows the LNS to
2782 obtain sufficient information about the call before determining
2783 whether it should be answered or not. Alternatively, the LAC may
2784 answer the call, negotiate LCP and PPP authentication, and use the
2785 information gained to choose the LNS. In this case, the call has
2786 already been answered by the time the ICRP message is received; the
2787 LAC simply spoofs the "call indication" and "call answer" steps in
2788 this case.
2789
2790
2791
2792
2793
2794
2795
2796 <span class="grey">Townsley, et al. Standards Track [Page 50]</span></pre>
2797 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
2798 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2799
2800
2801 The following AVPs MUST be present in the ICRQ:
2802
2803 Message Type
2804 Assigned Session ID
2805 Call Serial Number
2806
2807 The following AVPs MAY be present in the ICRQ:
2808
2809 Bearer Type
2810 Physical Channel ID
2811 Calling Number
2812 Called Number
2813 Sub-Address
2814
2815 <span class="h3"><a class="selflink" id="section-6.7" href="#section-6.7">6.7</a> Incoming-Call-Reply (ICRP)</span>
2816
2817 Incoming-Call-Reply (ICRP) is a control message sent by the LNS to
2818 the LAC in response to a received ICRQ message. It is the second in
2819 the three message exchange used for establishing sessions within an
2820 L2TP tunnel.
2821
2822 ICRP is used to indicate that the ICRQ was successful and for the LAC
2823 to answer the call if it has not already done so. It also allows the
2824 LNS to indicate necessary parameters for the L2TP session.
2825
2826 The following AVPs MUST be present in the ICRP:
2827
2828 Message Type
2829 Assigned Session ID
2830
2831 <span class="h3"><a class="selflink" id="section-6.8" href="#section-6.8">6.8</a> Incoming-Call-Connected (ICCN)</span>
2832
2833 Incoming-Call-Connected (ICCN) is a control message sent by the LAC
2834 to the LNS in response to a received ICRP message. It is the third
2835 message in the three message exchange used for establishing sessions
2836 within an L2TP tunnel.
2837
2838 ICCN is used to indicate that the ICRP was accepted, the call has
2839 been answered, and that the L2TP session should move to the
2840 established state. It also provides additional information to the
2841 LNS about parameters used for the answered call (parameters that may
2842 not always available at the time the ICRQ is issued).
2843
2844 The following AVPs MUST be present in the ICCN:
2845
2846 Message Type
2847 (Tx) Connect Speed
2848 Framing Type
2849
2850
2851
2852 <span class="grey">Townsley, et al. Standards Track [Page 51]</span></pre>
2853 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
2854 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2855
2856
2857 The following AVPs MAY be present in the ICCN:
2858
2859 Initial Received LCP CONFREQ
2860 Last Sent LCP CONFREQ
2861 Last Received LCP CONFREQ
2862 Proxy Authen Type
2863 Proxy Authen Name
2864 Proxy Authen Challenge
2865 Proxy Authen ID
2866 Proxy Authen Response
2867 Private Group ID
2868 Rx Connect Speed
2869 Sequencing Required
2870
2871 <span class="h3"><a class="selflink" id="section-6.9" href="#section-6.9">6.9</a> Outgoing-Call-Request (OCRQ)</span>
2872
2873 Outgoing-Call-Request (OCRQ) is a control message sent by the LNS to
2874 the LAC to indicate that an outbound call from the LAC is to be
2875 established. It is the first in a three message exchange used for
2876 establishing a session within an L2TP tunnel.
2877
2878 OCRQ is used to indicate that a session is to be established between
2879 the LNS and LAC for this call and provides the LAC with parameter
2880 information for both the L2TP session, and the call that is to be
2881 placed
2882
2883 An LNS MUST have received a Bearer Capabilities AVP during tunnel
2884 establishment from an LAC in order to request an outgoing call to
2885 that LAC.
2886
2887 The following AVPs MUST be present in the OCRQ:
2888
2889 Message Type
2890 Assigned Session ID
2891 Call Serial Number
2892 Minimum BPS
2893 Maximum BPS
2894 Bearer Type
2895 Framing Type
2896 Called Number
2897
2898 The following AVPs MAY be present in the OCRQ:
2899
2900 Sub-Address
2901
2902
2903
2904
2905
2906
2907
2908 <span class="grey">Townsley, et al. Standards Track [Page 52]</span></pre>
2909 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
2910 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2911
2912
2913 <span class="h3"><a class="selflink" id="section-6.10" href="#section-6.10">6.10</a> Outgoing-Call-Reply (OCRP)</span>
2914
2915 Outgoing-Call-Reply (OCRP) is a control message sent by the LAC to
2916 the LNS in response to a received OCRQ message. It is the second in a
2917 three message exchange used for establishing a session within an L2TP
2918 tunnel.
2919
2920 OCRP is used to indicate that the LAC is able to attempt the outbound
2921 call and returns certain parameters regarding the call attempt.
2922
2923 The following AVPs MUST be present in the OCRP:
2924
2925 Message Type
2926 Assigned Session ID
2927
2928 The following AVPs MAY be present in the OCRP:
2929
2930 Physical Channel ID
2931
2932 <span class="h3"><a class="selflink" id="section-6.11" href="#section-6.11">6.11</a> Outgoing-Call-Connected (OCCN)</span>
2933
2934 Outgoing-Call-Connected (OCCN) is a control message sent by the LAC
2935 to the LNS following the OCRP and after the outgoing call has been
2936 completed. It is the final message in a three message exchange used
2937 for establishing a session within an L2TP tunnel.
2938
2939 OCCN is used to indicate that the result of a requested outgoing call
2940 was successful. It also provides information to the LNS about the
2941 particular parameters obtained after the call was established.
2942
2943 The following AVPs MUST be present in the OCCN:
2944
2945 Message Type
2946 (Tx) Connect Speed
2947 Framing Type
2948
2949 The following AVPs MAY be present in the OCCN:
2950
2951 Rx Connect Speed
2952 Sequencing Required
2953
2954 <span class="h3"><a class="selflink" id="section-6.12" href="#section-6.12">6.12</a> Call-Disconnect-Notify (CDN)</span>
2955
2956 The Call-Disconnect-Notify (CDN) message is an L2TP control message
2957 sent by either the LAC or LNS to request disconnection of a specific
2958 call within the tunnel. Its purpose is to inform the peer of the
2959
2960
2961
2962
2963
2964 <span class="grey">Townsley, et al. Standards Track [Page 53]</span></pre>
2965 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
2966 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
2967
2968
2969 disconnection and the reason why the disconnection occurred. The peer
2970 MUST clean up any resources, and does not send back any indication of
2971 success or failure for such cleanup.
2972
2973 The following AVPs MUST be present in the CDN:
2974
2975 Message Type
2976 Result Code
2977 Assigned Session ID
2978
2979 The following AVPs MAY be present in the CDN:
2980
2981 Q.931 Cause Code
2982
2983 <span class="h3"><a class="selflink" id="section-6.13" href="#section-6.13">6.13</a> WAN-Error-Notify (WEN)</span>
2984
2985 The WAN-Error-Notify message is an L2TP control message sent by the
2986 LAC to the LNS to indicate WAN error conditions (conditions that
2987 occur on the interface supporting PPP). The counters in this message
2988 are cumulative. This message should only be sent when an error
2989 occurs, and not more than once every 60 seconds. The counters are
2990 reset when a new call is established.
2991
2992 The following AVPs MUST be present in the WEN:
2993
2994 Message Type
2995 Call Errors
2996
2997 <span class="h3"><a class="selflink" id="section-6.14" href="#section-6.14">6.14</a> Set-Link-Info (SLI)</span>
2998
2999 The Set-Link-Info message is an L2TP control message sent by the LNS
3000 to the LAC to set PPP-negotiated options. These options can change
3001 at any time during the life of the call, thus the LAC MUST be able to
3002 update its internal call information and behavior on an active PPP
3003 session.
3004
3005 The following AVPs MUST be present in the SLI:
3006
3007 Message Type
3008 ACCM
3009
3010 <span class="h3"><a class="selflink" id="section-7.0" href="#section-7.0">7.0</a> Control Connection State Machines</span>
3011
3012 The control messages defined in <a href="#section-6">section 6</a> are exchanged by way of
3013 state tables defined in this section. Tables are defined for incoming
3014 call placement, outgoing call placement, as well as for initiation of
3015
3016
3017
3018
3019
3020 <span class="grey">Townsley, et al. Standards Track [Page 54]</span></pre>
3021 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
3022 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3023
3024
3025 the tunnel itself. The state tables do not encode timeout and
3026 retransmission behavior, as this is handled in the underlying
3027 semantics defined in <a href="#section-5.8">Section 5.8</a>.
3028
3029 <span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a> Control Connection Protocol Operation</span>
3030
3031 This section describes the operation of various L2TP control
3032 connection functions and the Control Connection messages which are
3033 used to support them.
3034
3035 Receipt of an invalid or unrecoverable malformed control message
3036 should be logged appropriately and the control connection cleared to
3037 ensure recovery to a known state. The control connection may then be
3038 restarted by the initiator.
3039
3040 An invalid control message is defined as a message which contains a
3041 Message Type that is marked mandatory (see <a href="#section-4.4.1">Section 4.4.1</a>) and is
3042 unknown to the implementation, or a control message that is received
3043 in an improper sequence (e.g. an SCCCN sent in reply to an SCCRQ).
3044
3045 Examples of a malformed control message include one that has an
3046 invalid value in its header, contains an AVP that is formatted
3047 incorrectly or whose value is out of range, or a message that is
3048 missing a required AVP. A control message with a malformed header
3049 should be discarded. A control message with an invalid AVP should
3050 look to the M-bit for that AVP to determine whether the error is
3051 recoverable or not.
3052
3053 A malformed yet recoverable non-mandatory (M-bit is not set) AVP
3054 within a control message should be treated in a similar manner as an
3055 unrecognized non-mandatory AVP. Thus, if a malformed AVP is received
3056 with the M-bit set, the session or tunnel should be terminated with a
3057 proper Result or Error Code sent. If the M-bit is not set, the AVP
3058 should be ignored (with the exception of logging a local error
3059 message) and the message accepted.
3060
3061 This MUST NOT be considered a license to send malformed AVPs, but
3062 simply a guide towards how to handle an improperly formatted message
3063 if one is received. It is impossible to list all potential
3064 malformations of a given message and give advice for each. That said,
3065 one example of a recoverable, malformed AVP might be if the Rx
3066 Connect Speed AVP, attribute 38, is received with a length of 8
3067 rather than 10 and the BPS given in 2 octets rather than 4. Since the
3068 Rx Connect Speed is non-mandatory, this condition should not be
3069 considered catastrophic. As such, the control message should be
3070 accepted as if the AVP had not been received (with the exception of a
3071 local error message being logged).
3072
3073
3074
3075
3076 <span class="grey">Townsley, et al. Standards Track [Page 55]</span></pre>
3077 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
3078 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3079
3080
3081 In several cases in the following tables, a protocol message is sent,
3082 and then a "clean up" occurs. Note that regardless of the initiator
3083 of the tunnel destruction, the reliable delivery mechanism must be
3084 allowed to run (see <a href="#section-5.8">Section 5.8</a>) before destroying the tunnel. This
3085 permits the tunnel management messages to be reliably delivered to
3086 the peer.
3087
3088 <a href="#appendix-B.1">Appendix B.1</a> contains an example of lock-step tunnel establishment.
3089
3090 <span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a> Control Connection States</span>
3091
3092 The L2TP control connection protocol is not distinguishable between
3093 the LNS and LAC, but is distinguishable between the originator and
3094 receiver. The originating peer is the one which first initiates
3095 establishment of the tunnel (in a tie breaker situation, this is the
3096 winner of the tie). Since either LAC or LNS can be the originator, a
3097 collision can occur. See the Tie Breaker AVP in <a href="#section-4.4.3">Section 4.4.3</a> for a
3098 description of this and its resolution.
3099
3100 <span class="h4"><a class="selflink" id="section-7.2.1" href="#section-7.2.1">7.2.1</a> Control Connection Establishment</span>
3101
3102 State Event Action New State
3103 ----- ----- ------ ---------
3104 idle Local Send SCCRQ wait-ctl-reply
3105 Open request
3106
3107 idle Receive SCCRQ, Send SCCRP wait-ctl-conn
3108 acceptable
3109
3110 idle Receive SCCRQ, Send StopCCN, idle
3111 not acceptable Clean up
3112
3113 idle Receive SCCRP Send StopCCN idle
3114 Clean up
3115
3116 idle Receive SCCCN Clean up idle
3117
3118 wait-ctl-reply Receive SCCRP, Send SCCCN, established
3119 acceptable Send tunnel-open
3120 event to waiting
3121 sessions
3122
3123 wait-ctl-reply Receive SCCRP, Send StopCCN, idle
3124 not acceptable Clean up
3125
3126 wait-ctl-reply Receive SCCRQ, Clean up, idle
3127 lose tie-breaker Re-queue SCCRQ
3128 for idle state
3129
3130
3131
3132 <span class="grey">Townsley, et al. Standards Track [Page 56]</span></pre>
3133 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
3134 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3135
3136
3137 wait-ctl-reply Receive SCCCN Send StopCCN idle
3138 Clean up
3139
3140 wait-ctl-conn Receive SCCCN, Send tunnel-open established
3141 acceptable event to waiting
3142 sessions
3143
3144 wait-ctl-conn Receive SCCCN, Send StopCCN, idle
3145 not acceptable Clean up
3146
3147 wait-ctl-conn Receive SCCRP, Send StopCCN, idle
3148 SCCRQ Clean up
3149
3150 established Local Send tunnel-open established
3151 Open request event to waiting
3152 (new call) sessions
3153
3154 established Admin Send StopCCN idle
3155 Tunnel Close Clean up
3156
3157 established Receive SCCRQ, Send StopCCN idle
3158 SCCRP, SCCCN Clean up
3159
3160 idle Receive StopCCN Clean up idle
3161 wait-ctl-reply,
3162 wait-ctl-conn,
3163 established
3164
3165 The states associated with the LNS or LAC for control connection
3166 establishment are:
3167
3168 idle
3169 Both initiator and recipient start from this state. An initiator
3170 transmits an SCCRQ, while a recipient remains in the idle state
3171 until receiving an SCCRQ.
3172
3173 wait-ctl-reply
3174 The originator checks to see if another connection has been
3175 requested from the same peer, and if so, handles the collision
3176 situation described in <a href="#section-5.8">Section 5.8</a>.
3177
3178 When an SCCRP is received, it is examined for a compatible
3179 version. If the version of the reply is lower than the version
3180 sent in the request, the older (lower) version should be used
3181 provided it is supported. If the version in the reply is earlier
3182 and supported, the originator moves to the established state. If
3183
3184
3185
3186
3187
3188 <span class="grey">Townsley, et al. Standards Track [Page 57]</span></pre>
3189 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
3190 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3191
3192
3193 the version is earlier and not supported, a StopCCN MUST be sent
3194 to the peer and the originator cleans up and terminates the
3195 tunnel.
3196
3197 wait-ctl-conn
3198 This is where an SCCCN is awaited; upon receipt, the challenge
3199 response is checked. The tunnel either is established, or is torn
3200 down if an authorization failure is detected.
3201
3202 established
3203 An established connection may be terminated by either a local
3204 condition or the receipt of a Stop-Control-Connection-
3205 Notification. In the event of a local termination, the originator
3206 MUST send a Stop-Control-Connection-Notification and clean up the
3207 tunnel.
3208
3209 If the originator receives a Stop-Control-Connection-Notification
3210 it MUST also clean up the tunnel.
3211
3212 <span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a> Timing considerations</span>
3213
3214 Due to the real-time nature of telephone signaling, both the LNS and
3215 LAC should be implemented with multi-threaded architectures such that
3216 messages related to multiple calls are not serialized and blocked.
3217 The call and connection state figures do not specify exceptions
3218 caused by timers. These are addressed in <a href="#section-5.8">Section 5.8</a>.
3219
3220 <span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a> Incoming calls</span>
3221
3222 An Incoming-Call-Request message is generated by the LAC when an
3223 incoming call is detected (for example, an associated telephone line
3224 rings). The LAC selects a Session ID and serial number and indicates
3225 the call bearer type. Modems should always indicate analog call type.
3226 ISDN calls should indicate digital when unrestricted digital service
3227 or rate adaption is used and analog if digital modems are involved.
3228 Calling Number, Called Number, and Subaddress may be included in the
3229 message if they are available from the telephone network.
3230
3231 Once the LAC sends the Incoming-Call-Request, it waits for a response
3232 from the LNS but it does not necessarily answer the call from the
3233 telephone network yet. The LNS may choose not to accept the call if:
3234
3235 - No resources are available to handle more sessions
3236 - The dialed, dialing, or subaddress fields do not correspond to
3237 an authorized user
3238 - The bearer service is not authorized or supported
3239
3240
3241
3242
3243
3244 <span class="grey">Townsley, et al. Standards Track [Page 58]</span></pre>
3245 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
3246 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3247
3248
3249 If the LNS chooses to accept the call, it responds with an Incoming-
3250 Call-Reply. When the LAC receives the Incoming-Call-Reply, it
3251 attempts to connect the call. A final call connected message from
3252 the LAC to the LNS indicates that the call states for both the LAC
3253 and the LNS should enter the established state. If the call
3254 terminated before the LNS could accept it, a Call-Disconnect-Notify
3255 is sent by the LAC to indicate this condition.
3256
3257 When the dialed-in client hangs up, the call is cleared normally and
3258 the LAC sends a Call-Disconnect-Notify message. If the LNS wishes to
3259 clear a call, it sends a Call-Disconnect-Notify message and cleans up
3260 its session.
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300 <span class="grey">Townsley, et al. Standards Track [Page 59]</span></pre>
3301 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
3302 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3303
3304
3305 <span class="h4"><a class="selflink" id="section-7.4.1" href="#section-7.4.1">7.4.1</a> LAC Incoming Call States</span>
3306
3307 State Event Action New State
3308 ----- ----- ------ ---------
3309 idle Bearer Ring or Initiate local wait-tunnel
3310 Ready to indicate tunnel open
3311 incoming conn.
3312
3313 idle Receive ICCN, Clean up idle
3314 ICRP, CDN
3315
3316 wait-tunnel Bearer line drop Clean up idle
3317 or local close
3318 request
3319
3320 wait-tunnel tunnel-open Send ICRQ wait-reply
3321
3322 wait-reply Receive ICRP, Send ICCN established
3323 acceptable
3324
3325 wait-reply Receive ICRP, Send CDN, idle
3326 Not acceptable Clean up
3327
3328 wait-reply Receive ICRQ Send CDN idle
3329 Clean up
3330
3331 wait-reply Receive CDN Clean up idle
3332 ICCN
3333
3334 wait-reply Local Send CDN, idle
3335 close request or Clean up
3336 Bearer line drop
3337
3338 established Receive CDN Clean up idle
3339
3340 established Receive ICRQ, Send CDN, idle
3341 ICRP, ICCN Clean up
3342
3343 established Bearer line Send CDN, idle
3344 drop or local Clean up
3345 close request
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356 <span class="grey">Townsley, et al. Standards Track [Page 60]</span></pre>
3357 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
3358 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3359
3360
3361 The states associated with the LAC for incoming calls are:
3362
3363 idle
3364 The LAC detects an incoming call on one of its interfaces.
3365 Typically this means an analog line is ringing or an ISDN TE has
3366 detected an incoming Q.931 SETUP message. The LAC initiates its
3367 tunnel establishment state machine, and moves to a state waiting
3368 for confirmation of the existence of a tunnel.
3369
3370 wait-tunnel
3371 In this state the session is waiting for either the control
3372 connection to be opened or for verification that the tunnel is
3373 already open. Once an indication that the tunnel has/was opened,
3374 session control messages may be exchanged. The first of these is
3375 the Incoming-Call-Request.
3376
3377 wait-reply
3378 The LAC receives either a CDN message indicating the LNS is not
3379 willing to accept the call (general error or don't accept) and
3380 moves back into the idle state, or an Incoming-Call-Reply message
3381 indicating the call is accepted, the LAC sends an Incoming-Call-
3382 Connected message and enters the established state.
3383
3384 established
3385 Data is exchanged over the tunnel. The call may be cleared
3386 following:
3387 + An event on the connected interface: The LAC sends a Call-
3388 Disconnect-Notify message
3389 + Receipt of a Call-Disconnect-Notify message: The LAC cleans
3390 up, disconnecting the call.
3391 + A local reason: The LAC sends a Call-Disconnect-Notify
3392 message.
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412 <span class="grey">Townsley, et al. Standards Track [Page 61]</span></pre>
3413 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
3414 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3415
3416
3417 <span class="h4"><a class="selflink" id="section-7.4.2" href="#section-7.4.2">7.4.2</a> LNS Incoming Call States</span>
3418
3419 State Event Action New State
3420 ----- ----- ------ ---------
3421 idle Receive ICRQ, Send ICRP wait-connect
3422 acceptable
3423
3424 idle Receive ICRQ, Send CDN, idle
3425 not acceptable Clean up
3426
3427 idle Receive ICRP Send CDN idle
3428 Clean up
3429
3430 idle Receive ICCN Clean up idle
3431
3432 wait-connect Receive ICCN Prepare for established
3433 acceptable data
3434
3435 wait-connect Receive ICCN Send CDN, idle
3436 not acceptable Clean up
3437
3438 wait-connect Receive ICRQ, Send CDN idle
3439 ICRP Clean up
3440
3441 idle, Receive CDN Clean up idle
3442 wait-connect,
3443 established
3444
3445 wait-connect Local Send CDN, idle
3446 established Close request Clean up
3447
3448 established Receive ICRQ, Send CDN idle
3449 ICRP, ICCN Clean up
3450
3451 The states associated with the LNS for incoming calls are:
3452
3453 idle
3454 An Incoming-Call-Request message is received. If the request is
3455 not acceptable, a Call-Disconnect-Notify is sent back to the LAC
3456 and the LNS remains in the idle state. If the Incoming-Call-
3457 Request message is acceptable, an Incoming-Call-Reply is sent. The
3458 session moves to the wait-connect state.
3459
3460 wait-connect
3461 If the session is still connected on the LAC, the LAC sends an
3462 Incoming-Call-Connected message to the LNS which then moves into
3463 established state. The LAC may send a Call-Disconnect-Notify to
3464 indicate that the incoming caller could not be connected. This
3465
3466
3467
3468 <span class="grey">Townsley, et al. Standards Track [Page 62]</span></pre>
3469 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
3470 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3471
3472
3473 could happen, for example, if a telephone user accidentally places
3474 a standard voice call to an LAC resulting in a handshake failure
3475 on the called modem.
3476
3477 established
3478 The session is terminated either by receipt of a Call-Disconnect-
3479 Notify message from the LAC or by sending a Call-Disconnect-
3480 Notify. Clean up follows on both sides regardless of the
3481 initiator.
3482
3483 <span class="h3"><a class="selflink" id="section-7.5" href="#section-7.5">7.5</a> Outgoing calls</span>
3484
3485 Outgoing calls are initiated by an LNS and instruct an LAC to place a
3486 call. There are three messages for outgoing calls: Outgoing-Call-
3487 Request, Outgoing-Call-Reply, and Outgoing-Call-Connected. The LNS
3488 sends an Outgoing-Call-Request specifying the dialed party phone
3489 number, subaddress and other parameters. The LAC MUST respond to the
3490 Outgoing-Call-Request message with an Outgoing-Call-Reply message
3491 once the LAC determines that the proper facilities exist to place the
3492 call and the call is administratively authorized. For example, is
3493 this LNS allowed to dial an international call? Once the outbound
3494 call is connected, the LAC sends an Outgoing-Call-Connected message
3495 to the LNS indicating the final result of the call attempt:
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524 <span class="grey">Townsley, et al. Standards Track [Page 63]</span></pre>
3525 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
3526 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3527
3528
3529 <span class="h4"><a class="selflink" id="section-7.5.1" href="#section-7.5.1">7.5.1</a> LAC Outgoing Call States</span>
3530
3531 State Event Action New State
3532 ----- ----- ------ ---------
3533 idle Receive OCRQ, Send OCRP, wait-cs-answer
3534 acceptable Open bearer
3535
3536 idle Receive OCRQ, Send CDN, idle
3537 not acceptable Clean up
3538
3539 idle Receive OCRP Send CDN idle
3540 Clean up
3541
3542 idle Receive OCCN, Clean up idle
3543 CDN
3544
3545 wait-cs-answer Bearer answer, Send OCCN established
3546 framing detected
3547
3548 wait-cs-answer Bearer failure Send CDN, idle
3549 Clean up
3550
3551 wait-cs-answer Receive OCRQ, Send CDN idle
3552 OCRP, OCCN Clean up
3553
3554 established Receive OCRQ, Send CDN idle
3555 OCRP, OCCN Clean up
3556
3557 wait-cs-answer, Receive CDN Clean up idle
3558 established
3559
3560 established Bearer line drop, Send CDN, idle
3561 Local close Clean up
3562 request
3563
3564 The states associated with the LAC for outgoing calls are:
3565
3566 idle
3567 If Outgoing-Call-Request is received in error, respond with a
3568 Call-Disconnect-Notify. Otherwise, allocate a physical channel and
3569 send an Outgoing-Call-Reply. Place the outbound call and move to
3570 the wait-cs-answer state.
3571
3572 wait-cs-answer
3573 If the call is not completed or a timer expires waiting for the
3574 call to complete, send a Call-Disconnect-Notify with the
3575 appropriate error condition set and go to idle state. If a circuit
3576
3577
3578
3579
3580 <span class="grey">Townsley, et al. Standards Track [Page 64]</span></pre>
3581 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
3582 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3583
3584
3585 switched connection is established and framing is detected, send
3586 an Outgoing-Call-Connected indicating success and go to
3587 established state.
3588
3589 established
3590 If a Call-Disconnect-Notify is received by the LAC, the telco call
3591 MUST be released via appropriate mechanisms and the session
3592 cleaned up. If the call is disconnected by the client or the
3593 called interface, a Call-Disconnect-Notify message MUST be sent to
3594 the LNS. The sender of the Call-Disconnect-Notify message returns
3595 to the idle state after sending of the message is complete.
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636 <span class="grey">Townsley, et al. Standards Track [Page 65]</span></pre>
3637 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
3638 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3639
3640
3641 <span class="h4"><a class="selflink" id="section-7.5.2" href="#section-7.5.2">7.5.2</a> LNS Outgoing Call States</span>
3642
3643 State Event Action New State
3644 ----- ----- ------ ---------
3645 idle Local Initiate local wait-tunnel
3646 open request tunnel-open
3647
3648 idle Receive OCCN, Clean up idle
3649 OCRP, CDN
3650
3651 wait-tunnel tunnel-open Send OCRQ wait-reply
3652
3653 wait-reply Receive OCRP, none wait-connect
3654 acceptable
3655
3656 wait-reply Receive OCRP, Send CDN idle
3657 not acceptable Clean up
3658
3659 wait-reply Receive OCCN, Send CDN idle
3660 OCRQ Clean up
3661
3662 wait-connect Receive OCCN none established
3663
3664 wait-connect Receive OCRQ, Send CDN idle
3665 OCRP Clean up
3666
3667 idle, Receive CDN, Clean up idle
3668 wait-reply,
3669 wait-connect,
3670 established
3671
3672 established Receive OCRQ, Send CDN idle
3673 OCRP, OCCN Clean up
3674
3675 wait-reply, Local Send CDN idle
3676 wait-connect, Close request Clean up
3677 established
3678
3679 wait-tunnel Local Clean up idle
3680 Close request
3681
3682 The states associated with the LNS for outgoing calls are:
3683
3684 idle, wait-tunnel
3685 When an outgoing call is initiated, a tunnel is first created,
3686 much as the idle and wait-tunnel states for an LAC incoming call.
3687 Once a tunnel is established, an Outgoing-Call-Request message is
3688 sent to the LAC and the session moves into the wait-reply state.
3689
3690
3691
3692 <span class="grey">Townsley, et al. Standards Track [Page 66]</span></pre>
3693 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
3694 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3695
3696
3697 wait-reply
3698 If a Call-Disconnect-Notify is received, an error occurred, and
3699 the session is cleaned up and returns to idle. If an Outgoing-
3700 Call-Reply is received, the call is in progress and the session
3701 moves to the wait-connect state.
3702
3703 wait-connect
3704 If a Call-Disconnect-Notify is received, the call failed; the
3705 session is cleaned up and returns to idle. If an Outgoing-Call-
3706 Connected is received, the call has succeeded and the session may
3707 now exchange data.
3708
3709 established
3710 If a Call-Disconnect-Notify is received, the call has been
3711 terminated for the reason indicated in the Result and Cause Codes;
3712 the session moves back to the idle state. If the LNS chooses to
3713 terminate the session, it sends a Call-Disconnect-Notify to the
3714 LAC and then cleans up and idles its session.
3715
3716 <span class="h3"><a class="selflink" id="section-7.6" href="#section-7.6">7.6</a> Tunnel Disconnection</span>
3717
3718 The disconnection of a tunnel consists of either peer issuing a
3719 Stop-Control-Connection-Notification. The sender of this Notification
3720 should wait a finite period of time for the acknowledgment of this
3721 message before releasing the control information associated with the
3722 tunnel. The recipient of this Notification should send an
3723 acknowledgment of the Notification and then release the associated
3724 control information.
3725
3726 When to release a tunnel is an implementation issue and is not
3727 specified in this document. A particular implementation may use
3728 whatever policy is appropriate for determining when to release a
3729 control connection. Some implementations may leave a tunnel open for
3730 a period of time or perhaps indefinitely after the last session for
3731 that tunnel is cleared. Others may choose to disconnect the tunnel
3732 immediately after the last user connection on the tunnel disconnects.
3733
3734 <span class="h3"><a class="selflink" id="section-8.0" href="#section-8.0">8.0</a> L2TP Over Specific Media</span>
3735
3736 L2TP is self-describing, operating at a level above the media over
3737 which it is carried. However, some details of its connection to media
3738 are required to permit interoperable implementations. The following
3739 sections describe details needed to permit interoperability over
3740 specific media.
3741
3742
3743
3744
3745
3746
3747
3748 <span class="grey">Townsley, et al. Standards Track [Page 67]</span></pre>
3749 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
3750 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3751
3752
3753 <span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a> L2TP over UDP/IP</span>
3754
3755 L2TP uses the registered UDP port 1701 [<a href="./rfc1700" title="&quot;Assigned Numbers&quot;">RFC1700</a>]. The entire L2TP
3756 packet, including payload and L2TP header, is sent within a UDP
3757 datagram. The initiator of an L2TP tunnel picks an available source
3758 UDP port (which may or may not be 1701), and sends to the desired
3759 destination address at port 1701. The recipient picks a free port on
3760 its own system (which may or may not be 1701), and sends its reply to
3761 the initiator's UDP port and address, setting its own source port to
3762 the free port it found. Once the source and destination ports and
3763 addresses are established, they MUST remain static for the life of
3764 the tunnel.
3765
3766 It has been suggested that having the recipient choose an arbitrary
3767 source port (as opposed to using the destination port in the packet
3768 initiating the tunnel, i.e., 1701) may make it more difficult for
3769 L2TP to traverse some NAT devices. Implementors should consider the
3770 potential implication of this before before choosing an arbitrary
3771 source port.
3772
3773 IP fragmentation may occur as the L2TP packet travels over the IP
3774 substrate. L2TP makes no special efforts to optimize this. A LAC
3775 implementation MAY cause its LCP to negotiate for a specific MRU,
3776 which could optimize for LAC environments in which the MTU's of the
3777 path over which the L2TP packets are likely to travel have a
3778 consistent value.
3779
3780 The default for any L2TP implementation is that UDP checksums MUST be
3781 enabled for both control and data messages. An L2TP implementation
3782 MAY provide an option to disable UDP checksums for data messages. It
3783 is recommended that UDP checksums always be enabled on control
3784 packets.
3785
3786 Port 1701 is used for both L2F [<a href="./rfc2341" title="&quot;Cisco Layer Two Forwarding (Protocol) L2F&quot;">RFC2341</a>] and L2TP packets. The
3787 Version field in each header may be used to discriminate between the
3788 two packet types (L2F uses a value of 1, and the L2TP version
3789 described in this document uses a value of 2). An L2TP implementation
3790 running on a system which does not support L2F MUST silently discard
3791 all L2F packets.
3792
3793 To the PPP clients using an L2TP-over-UDP/IP tunnel, the PPP link has
3794 the characteristic of being able to reorder or silently drop packets.
3795 The former may break non-IP protocols being carried by PPP,
3796 especially LAN-centric ones such as bridging. The latter may break
3797 protocols which assume per-packet indication of error, such as TCP
3798 header compression. Sequencing may be handled by using L2TP data
3799 message sequence numbers if any protocol being transported by the PPP
3800
3801
3802
3803
3804 <span class="grey">Townsley, et al. Standards Track [Page 68]</span></pre>
3805 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
3806 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3807
3808
3809 tunnel cannot tolerate reordering. The sequence dependency
3810 characteristics of individual protocols are outside the scope of this
3811 document.
3812
3813 Allowing packets to be dropped silently is perhaps more problematic
3814 with some protocols. If PPP reliable delivery [<a href="./rfc1663" title="&quot;PPP Reliable Transmission&quot;">RFC1663</a>] is enabled,
3815 no upper PPP protocol will encounter lost packets. If L2TP sequence
3816 numbers are enabled, L2TP can detect the packet loss. In the case of
3817 an LNS, the PPP and L2TP stacks are both present within the LNS, and
3818 packet loss signaling may occur precisely as if a packet was received
3819 with a CRC error. Where the LAC and PPP stack are co-resident, this
3820 technique also applies. Where the LAC and PPP client are physically
3821 distinct, the analogous signaling MAY be accomplished by sending a
3822 packet with a CRC error to the PPP client. Note that this would
3823 greatly increase the complexity of debugging client line problems,
3824 since the client statistics could not distinguish between true media
3825 errors and LAC-initiated ones. Further, this technique is not
3826 possible on all hardware.
3827
3828 If VJ compression is used, and neither PPP reliable delivery nor
3829 sequence numbers are enabled, each lost packet results in a 1 in
3830 2**16 chance of a TCP segment being forwarded with incorrect contents
3831 [<a href="./rfc1144" title="&quot;Compressing TCP/IP Headers for Low-Speed Serial Links&quot;">RFC1144</a>]. Where the combination of the packet loss rate with this
3832 statistical exposure is unacceptable, TCP header compression SHOULD
3833 NOT be used.
3834
3835 In general, it is wise to remember that the L2TP/UDP/IP transport is
3836 an unreliable transport. As with any PPP media that is subject to
3837 loss, care should be taken when using protocols that are particularly
3838 loss-sensitive. Such protocols include compression and encryption
3839 protocols that employ history.
3840
3841 <span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a> IP</span>
3842
3843 When operating in IP environments, L2TP MUST offer the UDP
3844 encapsulation described in 8.1 as its default configuration for IP
3845 operation. Other configurations (perhaps corresponding to a
3846 compressed header format) MAY be defined and made available as a
3847 configurable option.
3848
3849 <span class="h3"><a class="selflink" id="section-9.0" href="#section-9.0">9.0</a> Security Considerations</span>
3850
3851 L2TP encounters several security issues in its operation. The
3852 general approach of L2TP to these issues is documented here.
3853
3854
3855
3856
3857
3858
3859
3860 <span class="grey">Townsley, et al. Standards Track [Page 69]</span></pre>
3861 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
3862 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3863
3864
3865 <span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a> Tunnel Endpoint Security</span>
3866
3867 The tunnel endpoints may optionally perform an authentication
3868 procedure of one another during tunnel establishment. This
3869 authentication has the same security attributes as CHAP, and has
3870 reasonable protection against replay and snooping during the tunnel
3871 establishment process. This mechanism is not designed to provide any
3872 authentication beyond tunnel establishment; it is fairly simple for a
3873 malicious user who can snoop the tunnel stream to inject packets once
3874 an authenticated tunnel establishment has been completed
3875 successfully.
3876
3877 For authentication to occur, the LAC and LNS MUST share a single
3878 secret. Each side uses this same secret when acting as authenticatee
3879 as well as authenticator. Since a single secret is used, the tunnel
3880 authentication AVPs include differentiating values in the CHAP ID
3881 fields for each message digest calculation to guard against replay
3882 attacks.
3883
3884 The Assigned Tunnel ID and Assigned Session ID (See <a href="#section-4.4.3">Section 4.4.3</a>)
3885 SHOULD be selected in an unpredictable manner rather than
3886 sequentially or otherwise. Doing so will help deter hijacking of a
3887 session by a malicious user who does not have access to packet traces
3888 between the LAC and LNS.
3889
3890 <span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a> Packet Level Security</span>
3891
3892 Securing L2TP requires that the underlying transport make available
3893 encryption, integrity and authentication services for all L2TP
3894 traffic. This secure transport operates on the entire L2TP packet
3895 and is functionally independent of PPP and the protocol being carried
3896 by PPP. As such, L2TP is only concerned with confidentiality,
3897 authenticity, and integrity of the L2TP packets between its tunnel
3898
3899 endpoints (the LAC and LNS), not unlike link-layer encryption being
3900 concerned only about protecting the confidentiality of traffic
3901 between its physical endpoints.
3902
3903 <span class="h3"><a class="selflink" id="section-9.3" href="#section-9.3">9.3</a> End to End Security</span>
3904
3905 Protecting the L2TP packet stream via a secure transport does, in
3906 turn, also protect the data within the tunneled PPP packets while
3907 transported from the LAC to the LNS. Such protection should not be
3908 considered a substitution for end-to-end security between
3909 communicating hosts or applications.
3910
3911
3912
3913
3914
3915
3916 <span class="grey">Townsley, et al. Standards Track [Page 70]</span></pre>
3917 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
3918 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3919
3920
3921 <span class="h3"><a class="selflink" id="section-9.4" href="#section-9.4">9.4</a> L2TP and IPsec</span>
3922
3923 When running over IP, IPsec provides packet-level security via ESP
3924 and/or AH. All L2TP control and data packets for a particular tunnel
3925 appear as homogeneous UDP/IP data packets to the IPsec system.
3926
3927 In addition to IP transport security, IPsec defines a mode of
3928 operation that allows tunneling of IP packets. The packet level
3929 encryption and authentication provided by IPsec tunnel mode and that
3930 provided by L2TP secured with IPsec provide an equivalent level of
3931 security for these requirements.
3932
3933 IPsec also defines access control features that are required of a
3934 compliant IPsec implementation. These features allow filtering of
3935 packets based upon network and transport layer characteristics such
3936 as IP address, ports, etc. In the L2TP tunneling model, analogous
3937 filtering is logically performed at the PPP layer or network layer
3938 above L2TP. These network layer access control features may be
3939 handled at the LNS via vendor-specific authorization features based
3940 upon the authenticated PPP user, or at the network layer itself by
3941 using IPsec transport mode end-to-end between the communicating
3942 hosts. The requirements for access control mechanisms are not a part
3943 of the L2TP specification and as such are outside the scope of this
3944 document.
3945
3946 <span class="h3"><a class="selflink" id="section-9.5" href="#section-9.5">9.5</a> Proxy PPP Authentication</span>
3947
3948 L2TP defines AVPs that MAY be exchanged during session establishment
3949 to provide forwarding of PPP authentication information obtained at
3950 the LAC to the LNS for validation (see <a href="#section-4.4.5">Section 4.4.5</a>). This implies a
3951 direct trust relationship of the LAC on behalf of the LNS. If the
3952 LNS chooses to implement proxy authentication, it MUST be able to be
3953 configured off, requiring a new round a PPP authentication initiated
3954 by the LNS (which may or may not include a new round of LCP
3955 negotiation).
3956
3957 <span class="h3"><a class="selflink" id="section-10.0" href="#section-10.0">10.0</a> IANA Considerations</span>
3958
3959 This document defines a number of "magic" numbers to be maintained by
3960 the IANA. This section explains the criteria to be used by the IANA
3961 to assign additional numbers in each of these lists. The following
3962 subsections describe the assignment policy for the namespaces defined
3963 elsewhere in this document.
3964
3965 <span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a> AVP Attributes</span>
3966
3967 As defined in <a href="#section-4.1">Section 4.1</a>, AVPs contain vendor ID, Attribute and
3968 Value fields. For vendor ID value of 0, IANA will maintain a registry
3969
3970
3971
3972 <span class="grey">Townsley, et al. Standards Track [Page 71]</span></pre>
3973 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
3974 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
3975
3976
3977 of assigned Attributes and in some case also values. Attributes 0-39
3978 are assigned as defined in <a href="#section-4.4">Section 4.4</a>. The remaining values are
3979 available for assignment through IETF Consensus [<a href="./rfc2434">RFC 2434</a>].
3980
3981 <span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a> Message Type AVP Values</span>
3982
3983 As defined in <a href="#section-4.4.1">Section 4.4.1</a>, Message Type AVPs (Attribute Type 0)
3984 have an associated value maintained by IANA. Values 0-16 are defined
3985 in <a href="#section-3.2">Section 3.2</a>, the remaining values are available for assignment via
3986 IETF Consensus [<a href="./rfc2434">RFC 2434</a>]
3987
3988 <span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a> Result Code AVP Values</span>
3989
3990 As defined in <a href="#section-4.4.2">Section 4.4.2</a>, Result Code AVPs (Attribute Type 1)
3991 contain three fields. Two of these fields (the Result Code and Error
3992 Code fields) have associated values maintained by IANA.
3993
3994 <span class="h4"><a class="selflink" id="section-10.3.1" href="#section-10.3.1">10.3.1</a> Result Code Field Values</span>
3995
3996 The Result Code AVP may be included in CDN and StopCCN messages. The
3997 allowable values for the Result Code field of the AVP differ
3998 depending upon the value of the Message Type AVP. For the StopCCN
3999 message, values 0-7 are defined in <a href="#section-4.4.2">Section 4.4.2</a>; for the StopCCN
4000 message, values 0-11 are defined in the same section. The remaining
4001 values of the Result Code field for both messages are available for
4002 assignment via IETF Consensus [<a href="./rfc2434">RFC 2434</a>].
4003
4004 <span class="h4"><a class="selflink" id="section-10.3.2" href="#section-10.3.2">10.3.2</a> Error Code Field Values</span>
4005
4006 Values 0-7 are defined in <a href="#section-4.4.2">Section 4.4.2</a>. Values 8-32767 are
4007 available for assignment via IETF Consensus [<a href="./rfc2434">RFC 2434</a>]. The remaining
4008 values of the Error Code field are available for assignment via First
4009 Come First Served [<a href="./rfc2434">RFC 2434</a>].
4010
4011 <span class="h3"><a class="selflink" id="section-10.4" href="#section-10.4">10.4</a> Framing Capabilities &amp; Bearer Capabilities</span>
4012
4013 The Framing Capabilities AVP and Bearer Capabilities AVPs (defined in
4014 <a href="#section-4.4.3">Section 4.4.3</a>) both contain 32-bit bitmasks. Additional bits should
4015 only be defined via a Standards Action [<a href="./rfc2434">RFC 2434</a>].
4016
4017 <span class="h3"><a class="selflink" id="section-10.5" href="#section-10.5">10.5</a> Proxy Authen Type AVP Values</span>
4018
4019 The Proxy Authen Type AVP (Attribute Type 29) has an associated value
4020 maintained by IANA. Values 0-5 are defined in <a href="#section-4.4.5">Section 4.4.5</a>, the
4021 remaining values are available for assignment via First Come First
4022 Served [<a href="./rfc2434">RFC 2434</a>].
4023
4024
4025
4026
4027
4028 <span class="grey">Townsley, et al. Standards Track [Page 72]</span></pre>
4029 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
4030 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4031
4032
4033 <span class="h3"><a class="selflink" id="section-10.6" href="#section-10.6">10.6</a> AVP Header Bits</span>
4034
4035 There are four remaining reserved bits in the AVP header. Additional
4036 bits should only be assigned via a Standards Action [<a href="./rfc2434">RFC 2434</a>].
4037
4038 <span class="h3"><a class="selflink" id="section-11.0" href="#section-11.0">11.0</a> References</span>
4039
4040 [<a id="ref-DSS1">DSS1</a>] ITU-T Recommendation, "Digital subscriber Signaling System
4041 No. 1 (DSS 1) - ISDN user-network interface layer 3
4042 specification for basic call control", Rec. Q.931(I.451),
4043 May 1998
4044
4045 [<a id="ref-KPS">KPS</a>] Kaufman, C., Perlman, R., and Speciner, M., "Network
4046 Security: Private Communications in a Public World",
4047 Prentice Hall, March 1995, ISBN 0-13-061466-1
4048
4049 [<a id="ref-RFC791">RFC791</a>] Postel, J., "Internet Protocol", STD 5, <a href="./rfc791">RFC 791</a>, September
4050 1981.
4051
4052 [<a id="ref-RFC1034">RFC1034</a>] Mockapetris, P., "Domain Names - Concepts and Facilities",
4053 STD 13, <a href="./rfc1034">RFC 1034</a>, November 1987.
4054
4055 [<a id="ref-RFC1144">RFC1144</a>] Jacobson, V., "Compressing TCP/IP Headers for Low-Speed
4056 Serial Links", <a href="./rfc1144">RFC 1144</a>, February 1990.
4057
4058 [<a id="ref-RFC1661">RFC1661</a>] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51,
4059 <a href="./rfc1661">RFC 1661</a>, July 1994.
4060
4061 [<a id="ref-RFC1662">RFC1662</a>] Simpson, W., "PPP in HDLC-like Framing", STD 51, <a href="./rfc1662">RFC 1662</a>,
4062 July 1994.
4063
4064 [<a id="ref-RFC1663">RFC1663</a>] Rand, D., "PPP Reliable Transmission", <a href="./rfc1663">RFC 1663</a>, July 1994.
4065
4066 [<a id="ref-RFC1700">RFC1700</a>] Reynolds, J. and J. Postel, "Assigned Numbers", STD 2, <a href="./rfc1700">RFC</a>
4067 <a href="./rfc1700">1700</a>, October 1994. See also:
4068 <a href="http://www.iana.org/numbers.html">http://www.iana.org/numbers.html</a>
4069 [<a href="./rfc1990">RFC1990</a>] Sklower, K., Lloyd, B., McGregor, G., Carr, D. and T.
4070 Coradetti, "The PPP Multilink Protocol (MP)", <a href="./rfc1990">RFC 1990</a>,
4071 August 1996.
4072
4073 [<a id="ref-RFC1994">RFC1994</a>] Simpson, W., "PPP Challenge Handshake Authentication
4074 Protocol (CHAP)", <a href="./rfc1994">RFC 1994</a>, August 1996.
4075
4076 [<a id="ref-RFC1918">RFC1918</a>] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G.
4077 and E. Lear, "Address Allocation for Private Internets",
4078 <a href="https://www.rfc-editor.org/bcp/bcp5">BCP 5</a>, <a href="./rfc1918">RFC 1918</a>, February 1996.
4079
4080
4081
4082
4083
4084 <span class="grey">Townsley, et al. Standards Track [Page 73]</span></pre>
4085 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span>
4086 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4087
4088
4089 [<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
4090 Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
4091
4092 [<a id="ref-RFC2138">RFC2138</a>] Rigney, C., Rubens, A., Simpson, W. and S. Willens, "Remote
4093 Authentication Dial In User Service (RADIUS)", <a href="./rfc2138">RFC 2138</a>,
4094 April 1997.
4095
4096 [<a id="ref-RFC2277">RFC2277</a>] Alvestrand, H., "IETF Policy on Character Sets and
4097 Languages", <a href="https://www.rfc-editor.org/bcp/bcp18">BCP 18</a>, <a href="./rfc2277">RFC 2277</a>, January 1998.
4098
4099 [<a id="ref-RFC2341">RFC2341</a>] Valencia, A., Littlewood, M. and T. Kolar, "Cisco Layer Two
4100 Forwarding (Protocol) L2F", <a href="./rfc2341">RFC 2341</a>, May 1998.
4101
4102 [<a id="ref-RFC2401">RFC2401</a>] Kent, S. and R. Atkinson, "Security Architecture for the
4103 Internet Protocol", <a href="./rfc2401">RFC 2401</a>, November 1998.
4104
4105 [<a id="ref-RFC2434">RFC2434</a>] Narten, T. and H. Alvestrand, "Guidelines for Writing an
4106 IANA Considerations Section in RFCs", <a href="https://www.rfc-editor.org/bcp/bcp26">BCP 26</a>, <a href="./rfc2434">RFC 2434</a>,
4107 October 1998.
4108
4109 [<a id="ref-RFC2637">RFC2637</a>] Hamzeh, K., Pall, G., Verthein, W., Taarud, J., Little, W.
4110 and G. Zorn, "Point-to-Point Tunneling Protocol (PPTP)",
4111 <a href="./rfc2637">RFC 2637</a>, July 1999.
4112
4113 [<a id="ref-STEVENS">STEVENS</a>] Stevens, W. Richard, "TCP/IP Illustrated, Volume I The
4114 Protocols", Addison-Wesley Publishing Company, Inc., March
4115 1996, ISBN 0-201-63346-9
4116
4117 <span class="h3"><a class="selflink" id="section-12.0" href="#section-12.0">12.0</a> Acknowledgments</span>
4118
4119 The basic concept for L2TP and many of its protocol constructs were
4120 adopted from L2F [<a href="./rfc2341" title="&quot;Cisco Layer Two Forwarding (Protocol) L2F&quot;">RFC2341</a>] and PPTP [PPTP]. Authors of these are A.
4121 Valencia, M. Littlewood, T. Kolar, K. Hamzeh, G. Pall, W. Verthein,
4122 J. Taarud, W. Little, and G. Zorn.
4123
4124 Dory Leifer made valuable refinements to the protocol definition of
4125 L2TP and contributed to the editing of this document.
4126
4127 Steve Cobb and Evan Caves redesigned the state machine tables.
4128
4129 Barney Wolff provided a great deal of design input on the endpoint
4130 authentication mechanism.
4131
4132 John Bray, Greg Burns, Rich Garrett, Don Grosser, Matt Holdrege,
4133 Terry Johnson, Dory Leifer, and Rich Shea provided valuable input and
4134 review at the 43rd IETF in Orlando, FL., which led to improvement of
4135 the overall readability and clarity of this document.
4136
4137
4138
4139
4140 <span class="grey">Townsley, et al. Standards Track [Page 74]</span></pre>
4141 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span>
4142 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4143
4144
4145 <span class="h3"><a class="selflink" id="section-13.0" href="#section-13.0">13.0</a> Authors' Addresses</span>
4146
4147 Gurdeep Singh Pall
4148 Microsoft Corporation
4149 Redmond, WA
4150
4151 EMail: [email protected]
4152
4153
4154 Bill Palter
4155 RedBack Networks, Inc
4156 1389 Moffett Park Drive
4157 Sunnyvale, CA 94089
4158
4159 EMail: [email protected]
4160
4161
4162 Allan Rubens
4163 Ascend Communications
4164 1701 Harbor Bay Parkway
4165 Alameda, CA 94502
4166
4167 EMail: [email protected]
4168
4169
4170 W. Mark Townsley
4171 cisco Systems
4172 7025 Kit Creek Road
4173 PO Box 14987
4174 Research Triangle Park, NC 27709
4175
4176 EMail: [email protected]
4177
4178
4179 Andrew J. Valencia
4180 cisco Systems
4181 170 West Tasman Drive
4182 San Jose CA 95134-1706
4183
4184 EMail: [email protected]
4185
4186
4187 Glen Zorn
4188 Microsoft Corporation
4189 One Microsoft Way
4190 Redmond, WA 98052
4191
4192 EMail: [email protected]
4193
4194
4195
4196 <span class="grey">Townsley, et al. Standards Track [Page 75]</span></pre>
4197 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span>
4198 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4199
4200
4201 Appendix A: Control Channel Slow Start and Congestion Avoidance
4202
4203 Although each side has indicated the maximum size of its receive
4204 window, it is recommended that a slow start and congestion avoidance
4205 method be used to transmit control packets. The methods described
4206 here are based upon the TCP congestion avoidance algorithm as
4207 described in <a href="#section-21.6">section 21.6</a> of TCP/IP Illustrated, Volume I, by W.
4208 Richard Stevens [<a href="#ref-STEVENS" title="&quot;TCP/IP Illustrated, Volume I The Protocols&quot;">STEVENS</a>].
4209
4210 Slow start and congestion avoidance make use of several variables.
4211 The congestion window (CWND) defines the number of packets a sender
4212 may send before waiting for an acknowledgment. The size of CWND
4213 expands and contracts as described below. Note however, that CWND is
4214 never allowed to exceed the size of the advertised window obtained
4215 from the Receive Window AVP (in the text below, it is assumed any
4216 increase will be limited by the Receive Window Size). The variable
4217 SSTHRESH determines when the sender switches from slow start to
4218 congestion avoidance. Slow start is used while CWND is less than
4219 SSHTRESH.
4220
4221 A sender starts out in the slow start phase. CWND is initialized to
4222 one packet, and SSHTRESH is initialized to the advertised window
4223 (obtained from the Receive Window AVP). The sender then transmits
4224 one packet and waits for its acknowledgement (either explicit or
4225 piggybacked). When the acknowledgement is received, the congestion
4226 window is incremented from one to two. During slow start, CWND is
4227 increased by one packet each time an ACK (explicit ZLB or
4228 piggybacked) is received. Increasing CWND by one on each ACK has the
4229 effect of doubling CWND with each round trip, resulting in an
4230 exponential increase. When the value of CWND reaches SSHTRESH, the
4231 slow start phase ends and the congestion avoidance phase begins.
4232
4233 During congestion avoidance, CWND expands more slowly. Specifically,
4234 it increases by 1/CWND for every new ACK received. That is, CWND is
4235 increased by one packet after CWND new ACKs have been received.
4236 Window expansion during the congestion avoidance phase is effectively
4237 linear, with CWND increasing by one packet each round trip.
4238
4239 When congestion occurs (indicated by the triggering of a
4240 retransmission) one half of the CWND is saved in SSTHRESH, and CWND
4241 is set to one. The sender then reenters the slow start phase.
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252 <span class="grey">Townsley, et al. Standards Track [Page 76]</span></pre>
4253 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span>
4254 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4255
4256
4257 Appendix B: Control Message Examples
4258
4259 B.1: Lock-step tunnel establishment
4260
4261 In this example, an LAC establishes a tunnel, with the exchange
4262 involving each side alternating in sending messages. This example
4263 shows the final acknowledgment explicitly sent within a ZLB ACK
4264 message. An alternative would be to piggyback the acknowledgement
4265 within a message sent as a reply to the ICRQ or OCRQ that will likely
4266 follow from the side that initiated the tunnel.
4267
4268 LAC or LNS LNS or LAC
4269 ---------- ----------
4270
4271 SCCRQ -&gt;
4272 Nr: 0, Ns: 0
4273 &lt;- SCCRP
4274 Nr: 1, Ns: 0
4275 SCCCN -&gt;
4276 Nr: 1, Ns: 1
4277 &lt;- ZLB
4278 Nr: 2, Ns: 1
4279
4280 B.2: Lost packet with retransmission
4281
4282 An existing tunnel has a new session requested by the LAC. The ICRP
4283 is lost and must be retransmitted by the LNS. Note that loss of the
4284 ICRP has two impacts: not only does it keep the upper level state
4285 machine from progressing, but it also keeps the LAC from seeing a
4286 timely lower level acknowledgment of its ICRQ.
4287
4288 LAC LNS
4289 --- ---
4290
4291 ICRQ -&gt;
4292 Nr: 1, Ns: 2
4293
4294 (packet lost) &lt;- ICRP
4295 Nr: 3, Ns: 1
4296
4297 (pause; LAC's timer started first, so fires first)
4298
4299 ICRQ -&gt;
4300 Nr: 1, Ns: 2
4301
4302 (Realizing that it has already seen this packet,
4303 the LNS discards the packet and sends a ZLB)
4304
4305
4306
4307
4308 <span class="grey">Townsley, et al. Standards Track [Page 77]</span></pre>
4309 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-78" ></span>
4310 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4311
4312
4313 &lt;- ZLB
4314 Nr: 3, Ns: 2
4315
4316 (LNS's retransmit timer fires)
4317
4318 &lt;- ICRP
4319 Nr: 3, Ns: 1
4320 ICCN -&gt;
4321 Nr: 2, Ns: 3
4322
4323 &lt;- ZLB
4324 Nr: 4, Ns: 2
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364 <span class="grey">Townsley, et al. Standards Track [Page 78]</span></pre>
4365 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-79" ></span>
4366 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4367
4368
4369 Appendix C: Intellectual Property Notice
4370
4371 The IETF takes no position regarding the validity or scope of any
4372 intellectual property or other rights that might be claimed to
4373 pertain to the implementation or use of the technology described in
4374 this document or the extent to which any license under such rights
4375 might or might not be available; neither does it represent that it
4376 has made any effort to identify any such rights. Information on the
4377 IETF's procedures with respect to rights in standards-track and
4378 standards-related documentation can be found in <a href="https://www.rfc-editor.org/bcp/bcp11">BCP-11</a>. Copies of
4379 claims of rights made available for publication and any assurances of
4380 licenses to be made available, or the result of an attempt made to
4381 obtain a general license or permission for the use of such
4382 proprietary rights by implementers or users of this specification can
4383 be obtained from the IETF Secretariat."
4384
4385 The IETF invites any interested party to bring to its attention any
4386 copyrights, patents or patent applications, or other proprietary
4387 rights which may cover technology that may be required to practice
4388 this standard. Please address the information to the IETF Executive
4389 Director.
4390
4391 The IETF has been notified of intellectual property rights claimed in
4392 regard to some or all of the specification contained in this
4393 document. For more information consult the online list of claimed
4394 rights.
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420 <span class="grey">Townsley, et al. Standards Track [Page 79]</span></pre>
4421 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-80" ></span>
4422 <span class="grey"><a href="./rfc2661">RFC 2661</a> L2TP August 1999</span>
4423
4424
4425 Full Copyright Statement
4426
4427 Copyright (C) The Internet Society (1999). All Rights Reserved.
4428
4429 This document and translations of it may be copied and furnished to
4430 others, and derivative works that comment on or otherwise explain it
4431 or assist in its implementation may be prepared, copied, published
4432 and distributed, in whole or in part, without restriction of any
4433 kind, provided that the above copyright notice and this paragraph are
4434 included on all such copies and derivative works. However, this
4435 document itself may not be modified in any way, such as by removing
4436 the copyright notice or references to the Internet Society or other
4437 Internet organizations, except as needed for the purpose of
4438 developing Internet standards in which case the procedures for
4439 copyrights defined in the Internet Standards process must be
4440 followed, or as required to translate it into languages other than
4441 English.
4442
4443 The limited permissions granted above are perpetual and will not be
4444 revoked by the Internet Society or its successors or assigns.
4445
4446 This document and the information contained herein is provided on an
4447 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
4448 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
4449 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
4450 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
4451 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
4452
4453 Acknowledgement
4454
4455 Funding for the RFC Editor function is currently provided by the
4456 Internet Society.
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476 Townsley, et al. Standards Track [Page 80]
4477 </pre>