Debian Codegraph @

rfc1134.html

raw
1 <pre>Network Working Group D. Perkins
2 Request for Comments: 1134 CMU
3 November 1989
4
5
6 <span class="h1">The Point-to-Point Protocol: A Proposal for Multi-Protocol</span>
7 <span class="h1">Transmission of Datagrams Over Point-to-Point Links</span>
8
9
10 Table of Contents
11
12 Status of this Memo ................................... <a href="#page-2">2</a>
13 Abstract .............................................. <a href="#page-2">2</a>
14 <a href="#section-1">1</a>. Introduction ....................................... <a href="#page-2">2</a>
15 <a href="#section-1.1">1.1</a> Motivation ........................................ <a href="#page-2">2</a>
16 <a href="#section-1.2">1.2</a> Overview of PPP ................................... <a href="#page-3">3</a>
17 <a href="#section-1.3">1.3</a> Organization of the document ...................... <a href="#page-4">4</a>
18 <a href="#section-2">2</a>. Physical Layer Requirements ........................ <a href="#page-4">4</a>
19 <a href="#section-3">3</a>. The Data Link Layer ................................ <a href="#page-4">4</a>
20 <a href="#section-3.1">3.1</a> Frame Format ...................................... <a href="#page-5">5</a>
21 <a href="#section-4">4</a>. The PPP Link Control Protocol (LCP) ................ <a href="#page-8">8</a>
22 <a href="#section-4.1">4.1</a> The LCP Automaton ................................. <a href="#page-9">9</a>
23 <a href="#section-4.1.1">4.1.1</a> Overview ........................................ <a href="#page-9">9</a>
24 <a href="#section-4.1.2">4.1.2</a> State Diagram ................................... <a href="#page-10">10</a>
25 <a href="#section-4.1.3">4.1.3</a> State Transition Table .......................... <a href="#page-12">12</a>
26 <a href="#section-4.1.4">4.1.4</a> Events .......................................... <a href="#page-12">12</a>
27 <a href="#section-4.1.5">4.1.5</a> Actions ......................................... <a href="#page-14">14</a>
28 <a href="#section-4.1.6">4.1.6</a> States .......................................... <a href="#page-16">16</a>
29 <a href="#section-4.2">4.2</a> Loop Avoidance .................................... <a href="#page-19">19</a>
30 <a href="#section-4.3">4.3</a> Packet Format ..................................... <a href="#page-19">19</a>
31 <a href="#section-4.3.1">4.3.1</a> Configure-Request ............................... <a href="#page-21">21</a>
32 <a href="#section-4.3.2">4.3.2</a> Configure-Ack ................................... <a href="#page-21">21</a>
33 <a href="#section-4.3.3">4.3.3</a> Configure-Nak ................................... <a href="#page-22">22</a>
34 <a href="#section-4.3.4">4.3.4</a> Configure-Reject ................................ <a href="#page-24">24</a>
35 <a href="#section-4.3.5">4.3.5</a> Terminate-Request and Terminate-Ack ............. <a href="#page-25">25</a>
36 <a href="#section-4.3.6">4.3.6</a> Code-Reject ..................................... <a href="#page-26">26</a>
37 <a href="#section-4.3.7">4.3.7</a> Protocol-Reject ................................. <a href="#page-27">27</a>
38 <a href="#section-4.3.8">4.3.8</a> Echo-Request and Echo-Reply ..................... <a href="#page-28">28</a>
39 <a href="#section-4.3.9">4.3.9</a> Discard-Request ................................. <a href="#page-29">29</a>
40 <a href="#section-4.4">4.4</a> Configuration Options ............................. <a href="#page-30">30</a>
41 <a href="#section-4.4.1">4.4.1</a> Format .......................................... <a href="#page-31">31</a>
42 <a href="#section-5">5</a>. A PPP Network Control Protocol (NCP) for IP ........ <a href="#page-32">32</a>
43 <a href="#section-5.1">5.1</a> Sending IP Datagrams .............................. <a href="#page-33">33</a>
44 APPENDICES ............................................ <a href="#page-33">33</a>
45 <a href="#appendix-A">A</a>. Asynchronous HDLC .................................. <a href="#page-33">33</a>
46 <a href="#appendix-B">B</a>. Fast Frame Check Sequence (FCS) Implementation ..... <a href="#page-35">35</a>
47 <a href="#appendix-B.1">B.1</a> FCS Computation Method ............................ <a href="#page-35">35</a>
48 <a href="#appendix-B.2">B.2</a> Fast FCS table generator .......................... <a href="#page-36">36</a>
49
50
51
52 <span class="grey">Perkins [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
55
56
57 REFERENCES ............................................ <a href="#page-37">37</a>
58 AUTHOR'S ADDRESS ...................................... <a href="#page-38">38</a>
59
60 Status of this Memo
61
62 This memo defines a proposed protocol for the Internet community.
63
64 This proposal is the product of the Point-to-Point Protocol Working
65 Group of the Internet Engineering Task Force (IETF). Comments on this
66 memo should be submitted to the IETF Point-to-Point Protocol Working
67 Group chair by January 15, 1990. Comments will be reviewed at the
68 February 1990 IETF meeting, with the goal of advancing PPP to draft
69 standard status. Distribution of this memo is unlimited.
70
71 Abstract
72
73 The Point-to-Point Protocol (PPP) provides a method for transmitting
74 datagrams over serial point-to-point links. PPP is composed of three
75 parts:
76
77 1. A method for encapsulating datagrams over serial links.
78
79 2. An extensible Link Control Protocol (LCP).
80
81 3. A family of Network Control Protocols (NCP) for establishing
82 and configuring different network-layer protocols.
83
84 This document defines the encapsulation scheme, the basic LCP, and an
85 NCP for establishing and configuring the Internet Protocol (IP)
86 (called the IP Control Protocol, IPCP).
87
88 The options and facilities used by the LCP and the IPCP are defined
89 in separate documents. Control protocols for configuring and
90 utilizing other network-layer protocols besides IP (e.g., DECNET,
91 OSI) are expected to be developed as needed.
92
93 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
94
95 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Motivation</span>
96
97 In the last few years, the Internet has seen explosive growth in the
98 number of hosts supporting TCP/IP. The vast majority of these hosts
99 are connected to Local Area Networks (LANs) of various types,
100 Ethernet being the most common. Most of the other hosts are
101 connected through Wide Area Networks (WANs) such as X.25 style Public
102 Data Networks (PDNs). Relatively few of these hosts are connected
103 with simple point-to-point (i.e., serial) links. Yet, point-to-point
104 links are among the oldest methods of data communications and almost
105
106
107
108 <span class="grey">Perkins [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
111
112
113 every host supports point-to-point connections. For example,
114 asynchronous RS-232-C [<a href="#ref-1" title="&quot;Interface Between Data Terminal Equipment and Data Communications Equipment Employing Serial Binary Data Interchange&quot;">1</a>] interfaces are essentially ubiquitous.
115
116 One reason for the small number of point-to-point IP links is the
117 lack of a standard encapsulation protocol. There are plenty of non-
118 standard (and at least one defacto standard) encapsulation protocols
119 available, but there is not one which has been agreed upon as an
120 Internet Standard. By contrast, standard encapsulation schemes do
121 exist for the transmission of datagrams over most popular LANs.
122
123 One purpose of this memo is to remedy this problem. But even more
124 importantly, the Point-to-Point Protocol proposes more than just an
125 encapsulation scheme. Point-to-Point links tend to exacerbate many
126 problems with the current family of network protocols. For instance,
127 assignment and management of IP addresses, which is a problem even in
128 LAN environments, is especially difficult over switched point-to-
129 point circuits (e.g., dialups).
130
131 Some additional issues addressed by PPP include asynchronous
132 (start/stop) and bit-oriented synchronous encapsulation, network
133 protocol multiplexing, link configuration, link quality testing,
134 error detection, and option negotiation for such capabilities as
135 network-layer address negotiation and data compression negotiation.
136
137 PPP addresses these issues by providing an extensible Link Control
138 Protocol (LCP) and a family of Network Control Protocols (NCP) to
139 negotiate optional configuration parameters and facilities.
140
141 <span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Overview of PPP</span>
142
143 PPP has three main components:
144
145 1. A method for encapsulating datagrams over serial links. PPP
146 uses HDLC as a basis for encapsulating datagrams over point-
147 to-point links.
148
149 2. An extensible Link Control Protocol (LCP) to establish,
150 configure, and test the data-link connection.
151
152 3. A family of Network Control Protocols (NCP) for establishing
153 and configuring different network-layer protocols. PPP is
154 designed to allow the simultaneous use of multiple network-
155 layer protocols.
156
157 In order to establish communications over a point-to-point link, the
158 originating PPP would first send LCP packets to configure and test
159 the data link. After the link has been establish and optional
160 facilities have been negotiated as needed by the LCP, the originating
161
162
163
164 <span class="grey">Perkins [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
167
168
169 PPP would send NCP packets to choose and configure one or more
170 network-layer protocols. Once each of the chosen network-layer
171 protocols has been configured, datagrams from each network-layer
172 protocol can be sent over the link.
173
174 The link will remain configured for communications until explicit LCP
175 or NCP packets close the link down, or until some external event
176 occurs (e.g., inactivity timer expires or user intervention).
177
178 <span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. Organization of the document</span>
179
180 This memo is divided into several sections. <a href="#section-2">Section 2</a> discusses the
181 physical-layer requirements of PPP. <a href="#section-3">Section 3</a> describes the Data
182 Link Layer including the PPP frame format and data link encapsulation
183 scheme. <a href="#section-4">Section 4</a> specifies the LCP including the connection
184 establishment and option negotiation procedures. <a href="#section-5">Section 5</a> specifies
185 the IP Control Protocol (IPCP), which is the NCP for the Internet
186 Protocol, and describes the encapsulation of IP datagrams within PPP
187 packets. <a href="#appendix-A">Appendix A</a> summarizes important features of asynchronous
188 HDLC, and <a href="#appendix-B">Appendix B</a> describes an efficient table-lookup algorithm
189 for fast Frame Check Sequence (FCS) computation.
190
191 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Physical Layer Requirements</span>
192
193 The Point-to-Point Protocol is capable of operating across any
194 DTE/DCE interface (e.g., EIA RS-232-C, EIA RS-422, EIA RS-423 and
195 CCITT V.35). The only absolute requirement imposed by PPP is the
196 provision of a duplex circuit, either dedicated or switched, which
197 can operate in either an asynchronous (start/stop) or synchronous
198 bit-serial mode, transparent to PPP Data Link Layer frames. PPP does
199 not impose any restrictions regarding transmission rate, other than
200 those imposed by the particular DTE/DCE interface in use.
201
202 PPP does not require the use of modem control signals, such as
203 Request To Send (RTS), Clear To Send (CTS), Data Carrier Detect
204 (DCD), and Data Terminal Ready (DTR). However, using such signals
205 when available can allow greater functionality and performance.
206
207 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. The Data Link Layer</span>
208
209 The Point-to-Point Protocol uses the principles, terminology, and
210 frame structure of the International Organization For
211 Standardization's (ISO) High-level Data Link Control (HDLC)
212 procedures (ISO 3309-1979 [<a href="#ref-2" title="&quot;Data Communication - High-level Data Link Control Procedures - Frame Structure&quot;">2</a>]), as modified by ISO 3309:1984/PDAD1
213 "Addendum 1: Start/stop transmission" [<a href="#ref-5" title="&quot;Information Processing Systems - Data Communication - High-level Data Link Control Procedures - Frame structure - Addendum 1: Start/stop Transmission&quot;">5</a>]. ISO 3309-1979 specifies
214 the HDLC frame structure for use in synchronous environments. ISO
215 3309:1984/PDAD1 specifies proposed modifications to ISO 3309-1979 to
216 allow its use in asynchronous environments.
217
218
219
220 <span class="grey">Perkins [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
223
224
225 The PPP control procedures use the definitions and Control field
226 encodings standardized in ISO 4335-1979 [<a href="#ref-3" title="&quot;Data Communication - High-level Data Link Control Procedures - Elements of Procedures&quot;">3</a>] and ISO 4335-
227 1979/Addendum 1-1979 [<a href="#ref-4" title="&quot;Data Communication - High-Level Data Link Control Procedures - Elements of Procedures - Addendum 1&quot;">4</a>]. The PPP frame structure is also consistent
228 with CCITT Recommendation X.25 LAPB [<a href="#ref-6" title="&quot;Interface Between Data Terminal Equipment (DTE) and Data Circuit Terminating Equipment (DCE) for Terminals Operating in the Packet Mode on Public Data Networks&quot;">6</a>], since that too is based on
229 HDLC.
230
231 Note: ISO 3309:1984/PDAD1 is a Proposed Draft standard. At
232 present, it seems that ISO 3309:1984/PDAD1 is stable and likely to
233 become an International Standard. Therefore, we feel comfortable
234 about using it before it becomes an International Standard. The
235 progress of this proposal should be tracked and encouraged by the
236 Internet community.
237
238 The purpose of this memo is not to document what is already
239 standardized in ISO 3309. We assume that the reader is already
240 familiar with HDLC, or has access to a copy of [<a href="#ref-2" title="&quot;Data Communication - High-level Data Link Control Procedures - Frame Structure&quot;">2</a>] or [<a href="#ref-6" title="&quot;Interface Between Data Terminal Equipment (DTE) and Data Circuit Terminating Equipment (DCE) for Terminals Operating in the Packet Mode on Public Data Networks&quot;">6</a>]. Instead,
241 this paper attempts to give a concise summary and point out specific
242 options and features used by PPP. Since "Addendum 1: Start/stop
243 transmission", is not yet standardized and widely available, it is
244 summarized in <a href="#appendix-A">Appendix A</a>.
245
246 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Frame Format</span>
247
248 A summary of the standard PPP frame structure is shown below. The
249 fields are transmitted from left to right.
250
251 +----------+---------+---------+----------+------------
252 | Flag | Address | Control | Protocol | Information
253 | 01111110 | 1111111 | 0000011 | 16 bits | *
254 +----------+---------+---------+----------+------------
255 ---+---------+----------+
256 | FCS | Flag |
257 | 16 bits | 01111110 |
258 ---+---------+----------+
259
260 This figure does not include start/stop bits (for asynchronous links)
261 or any bits or octets inserted for transparency. When asynchronous
262 links are used, all octets are transmitted with one start bit, eight
263 bits of data, and one stop bit. There is no provision in either PPP
264 or ISO 3309:1984/PDAD1 for seven bit asynchronous links.
265
266 To remain consistent with standard Internet practice, and avoid
267 confusion for people used to reading RFCs, all binary numbers in the
268 following descriptions are in Most Significant Bit to Least
269 Significant Bit order, reading from left to right, unless otherwise
270 indicated. Note that this is contrary to standard ISO and CCITT
271 practice which orders bits as transmitted (i.e., network bit order).
272 Keep this in mind when comparing this document with the international
273
274
275
276 <span class="grey">Perkins [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
279
280
281 standards documents.
282
283 Flag Sequence
284
285 The Flag Sequence is a single octet and indicates the beginning or
286 end of a frame. The Flag Sequence consists of the binary sequence
287 01111110 (hexadecimal 0x7e).
288
289 Address Field
290
291 The Address field is a single octet and contains the binary
292 sequence 11111111 (hexadecimal 0xff), the All-Stations address.
293 PPP does not assign individual station addresses. The All-
294 Stations address should always be recognized and received. Frames
295 with other Addresses should be silently discarded.
296
297 Control Field
298
299 The Control field is a single octet and contains the binary
300 sequence 00000011 (hexadecimal 0x03), the Unnumbered Information
301 (UI) command with the P/F bit is set to zero. Frames with other
302 Control field values should be silently discarded.
303
304 Protocol Field
305
306 The Protocol field is two octets and its value identifies the
307 protocol encapsulated in the Information field of the frame. The
308 most up-to-date values of the Protocol field are specified in the
309 most recent "Assigned Numbers" RFC [<a href="#ref-11" title="&quot;Assigned Numbers&quot;">11</a>]. Initial values are also
310 listed below.
311
312 Protocol field values in the "cxxx" range identify datagrams as
313 belonging to the Link Control Protocol (LCP) or associated
314 protocols. Values in the "8xxx" range identify datagrams belonging
315 to the family of Network Control Protocols (NCP). Values in the
316 "0xxx" range identify the network protocol of specific datagrams.
317
318 This Protocol field is defined by PPP and is not a field defined
319 by HDLC. However, the Protocol field is consistent with the ISO
320 3309 extension mechanism for Address fields. All Protocols MUST be
321 odd; the least significant bit of the least significant octet MUST
322 equal "1". Also, all Protocols MUST be assigned such that the
323 least significant bit of the most significant octet equals "0".
324 Frames received which don't comply with these rules should be
325 considered as having an unrecognized Protocol, and should be
326 handled as specified by the LCP. The Protocol field is
327 transmitted and received most significant octet first.
328
329
330
331
332 <span class="grey">Perkins [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
335
336
337 The Protocol field is initially assigned as follows:
338
339 Value (in hex) Protocol
340
341 0001 to 001f reserved (transparency inefficient)
342 0021 Internet Protocol
343 0023 * ISO CLNP
344 0025 * Xerox NS IDP
345 0027 * DECnet Phase IV
346 0029 * Appletalk
347 002b * Novell IPX
348 002d * Van Jacobson Compressed TCP/IP 1
349 002f * Van Jacobson Compressed TCP/IP 2
350
351 8021 Internet Protocol Control Protocol
352 8023 * ISO CLNP Control Protocol
353 8025 * Xerox NS IDP Control Protocol
354 8027 * DECnet Phase IV Control Protocol
355 8029 * Appletalk Control Protocol
356 802b * Novell IPX Control Protocol
357 802d * Reserved
358 802f * Reserved
359
360 c021 Link Control Protocol
361 c023 * User/Password Authentication Protocol
362
363 * Reserved for future use; not described in this document.
364
365 Information Field
366
367 The Information field is zero or more octets. The Information
368 field contains the datagram for the protocol specified in the
369 Protocol field. The end of the Information field is found by
370 locating the closing Flag Sequence and allowing two octets for the
371 Frame Check Sequence field. The default maximum length of the
372 Information field is 1500 octets. By prior agreement, consenting
373 PPP implementations may use other values for the maximum
374 Information field length.
375
376 On transmission, the Information field may be padded with an
377 arbitrary number of octets up to the maximum length. It is the
378 responsibility of each protocol to disambiguate padding characters
379 from real information.
380
381 Frame Check Sequence (FCS) Field
382
383 The Frame Check Sequence field is normally 16 bits (two octets).
384 By prior agreement, consenting PPP implementations may use a 32-
385
386
387
388 <span class="grey">Perkins [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
391
392
393 bit (four-octet) FCS for improved error detection.
394
395 The FCS field is calculated over all bits of the Address, Control,
396 Protocol and Information fields not including any start and stop
397 bits (asynchronous) and any bits (synchronous) or octets
398 (asynchronous) inserted for transparency. This does not include
399 the Flag Sequences or FCS field. The FCS is transmitted with the
400 coefficient of the highest term first.
401
402 For more information on the specification of the FCS, see ISO 3309
403 or CCITT X.25.
404
405 Note: A fast, table-driven implementation of the 16-bit FCS
406 algorithm is shown in <a href="#appendix-B">Appendix B</a>. This implementation is based
407 on [<a href="#ref-7" title="&quot;Byte-wise CRC Calculations&quot;">7</a>] and [<a href="#ref-8" title="&quot;A Fast CRC&quot;">8</a>].
408
409 Modifications to the Basic Frame Format
410
411 The Link Control Protocol can negotiate modifications to the
412 standard PPP frame structure. However, modified frames will
413 always be clearly distinguishable from standard frames.
414
415 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. The PPP Link Control Protocol (LCP)</span>
416
417 The Link Control Protocol (LCP) provides a method of establishing,
418 configuring, maintaining and terminating the point-to-point
419 connection. LCP goes through four distinct phases:
420
421 Phase 1: Link Establishment and Configuration Negotiation
422
423 Before any network-layer datagrams (e.g., IP) may be exchanged,
424 LCP must first open the connection through an exchange of
425 Configure packets. This exchange is complete, and the Open state
426 entered, once a Configure-Ack packet (described below) has been
427 both sent and received. Any non-LCP packets received before this
428 exchange is complete are silently discarded.
429
430 It is important to note that LCP handles configuration only of the
431 link; LCP does not handle configuration of individual network-
432 layer protocols. In particular, all Configuration Parameters
433 which are independent of particular network-layer protocols are
434 configured by LCP. All Configuration Options are assumed to be at
435 default values unless altered by the configuration exchange.
436
437 Phase 2: Link Quality Determination
438
439 LCP allows an optional Link Quality Determination phase following
440 transition to the LCP Open state. In this phase, the link is
441
442
443
444 <span class="grey">Perkins [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
447
448
449 tested to determine if the link quality is sufficient to bring up
450 network-layer protocols. This phase is completely optional. LCP
451 may delay transmission of network-layer protocol information until
452 this phase is completed.
453
454 The procedure for Link Quality Determination is unspecified and
455 may vary from implementation to implementation, or because of
456 user-configured parameters, but only so long as the procedure
457 doesn't violate other aspects of LCP. One suggested method is to
458 use LCP Echo-Request and Echo-Reply packets.
459
460 What is important is that this phase may persist for any length of
461 time. Therefore, implementations should avoid fixed timeouts when
462 waiting for their peers to advance to phase 3.
463
464 Phase 3: Network-Layer Protocol Configuration Negotiation
465
466 Once LCP has finished the Link Quality Determination phase,
467 network-layer protocols may be separately configured by the
468 appropriate Network Control Protocols (NCP), and may be brought up
469 and taken down at any time. If LCP closes the link, it informs
470 the network-layer protocols so that they may take appropriate
471 action.
472
473 Phase 4: Link Termination
474
475 LCP may terminate the link at any time. This will usually be done
476 at the request of a human user, but may happen because of a
477 physical event such as the loss of carrier, or the expiration of
478 an idle-period timer.
479
480 <span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. The LCP Automation</span>
481
482 <span class="h4"><a class="selflink" id="section-4.1.1" href="#section-4.1.1">4.1.1</a>. Overview</span>
483
484 LCP is specified by a number of packet formats and a finite-state
485 automation. This section presents an overview of the LCP automation,
486 followed by a representation of it as both a state diagram and a
487 state transition table.
488
489 There are three classes of LCP packets:
490
491 1. Link Establishment packets used to establish and configure a
492 link, (e.g., Configure-Request, Configure-Ack, Configure-Nak
493 and Configure-Reject)
494
495 2. Link Termination packets used to terminate a link, (e.g.,
496 Terminate-Request and Terminate-Ack)
497
498
499
500 <span class="grey">Perkins [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
503
504
505 3. Link Maintenance packets used to manage and debug a link,
506 (e.g., Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply
507 and Discard-Request)
508
509 The finite-state automation is defined by events, state transitions
510 and actions. Events include receipt of external commands such as
511 Open and Close, expiration of the Restart timer, and receipt of
512 packets from a LCP peer. Actions include the starting of the Restart
513 timer and transmission of packets.
514
515 <span class="h4"><a class="selflink" id="section-4.1.2" href="#section-4.1.2">4.1.2</a>. State Diagram</span>
516
517 The state diagram which follows describes the sequence of events for
518 reaching agreement on Configuration Options (opening the PPP
519 connection) and for later closing of the connection. The state
520 machine is initially in the Closed state (1). Once the Open state
521 (6) has been reached, both ends of the link have met the requirement
522 of having both sent and received a Configure-Ack packet.
523
524 In the state diagram, events are shown above horizontal lines.
525 Actions are shown below horizontal lines. Two types of LCP packets -
526 Configure-Naks and Configure-Rejects - are not differentiated in the
527 state diagram. As will be described later, these packets do indeed
528 serve different, though similar, functions. However, at the level of
529 detail of this state diagram, they always cause the same transition.
530
531 Since a more detailed specification of the LCP automation is given in
532 a state transition table in the following section, implementation
533 should be done by consulting it rather than this state diagram.
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556 <span class="grey">Perkins [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
559
560
561 +------------------------------+
562 | |
563 V |
564 +---2---+ PO +---1---+ RTA +---7---+ |
565 | |&lt;-------------| |&lt;-----------| | |
566 |Listen | |Closed | |Closing| |
567 RCR | | C | | PLD | | |
568 +----| |-----&gt;+------&gt;| |&lt;---Any | |&lt;--+ |
569 |scr +-------+ ^ +-------+ State +-------+ | |
570 | | AO | ^ | TO | |
571 | +-----------+ --- | | +----&gt;+ |
572 | | SCR | C | str ^ |
573 | C | RCN/TO | +----------------+ | |
574 | -- | +--------&gt;+&lt;--------+ | str | |
575 | | | scr | | | |
576 | +---3---+ V TO +---4---+ +-------+ | |
577 | | |&lt;-----+&lt;------| |&lt;-----------| | | |
578 | | Req- | scr | Ack- | scn | Good | | |
579 | | Sent | RCA | Rcvd | RCR | Req? | | |
580 | | |-------------&gt;| |-----------&gt;| | | |
581 | +-------+ +-------+ +-------+ | |
582 | | ^ | | |
583 | RCR | +&lt;--------+ | | |
584 | --- | | | TO RCN --- | | |
585 | | | --- +---------+ +-----+ sca | | |
586 | V | scn scr | | scr | V | |
587 | +-------+ +---5---+ | +---6---+ C | |
588 +---&gt;| |-------------&gt;| |&lt;--+ | |---+ |
589 | Good | sca | Ack- | | Open | str |
590 | Req? | RCR | Sent | RCA | | |
591 | |&lt;-------------| |-----------&gt;| | |
592 +-------+ +-------+ +-------+ |
593 ^ | | |
594 | RCR | | RTR |
595 +---------------------------------------+ +--------+
596 scr sta
597
598 Events Actions
599 RCR - Receive-Configure-Request scr - Send Configure-Request
600 RCA - Receive-Configure-Ack sca - Send Configure-Ack
601 RCN - Receive-Configure-Nak or Reject scn - Send Configure-Nak or
602 RTR - Receive-Terminate-Req Reject
603 RTA - Receive-Terminate-Ack str - Send Terminate-Req
604 AO - Active-Open sta - Sent Terminate-Ack
605 PO - Passive-Open
606 C - Close
607 TO - Timeout
608 PLD - Physical-Layer-Down
609
610
611
612 <span class="grey">Perkins [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
615
616
617 <span class="h4"><a class="selflink" id="section-4.1.3" href="#section-4.1.3">4.1.3</a>. State Transition Table</span>
618
619 The complete state transition table follows. States are indicated
620 horizontally, and events are read vertically. State transitions and
621 actions are represented in the form action/new-state. Two actions
622 caused by the same event are represented as action1&amp;action2.
623
624 | State
625 | 1 2 3 4 5 6 7
626 Events| Closed Listen Req-Sent Ack-Rcvd Ack-Sent Open Closing
627 ------+-------------------------------------------------------------
628 AO | scr/3 scr/3 3 4 5 6 scr/3
629 PO | 2 2 2* 4 5 6 sta/3*
630 C | 1 1 1* 1 str/7 str/7 7
631 TO | 1 2 scr/3 scr/3 scr/3 6 str/7*
632 PLD | 1 1 1 1 1 1 1
633 RCR+ | sta/1 scr&amp;sca/5 sca/5 sca/6 sca/5 scr&amp;sca/5 7
634 RCR- | sta/1 scr&amp;scn/3 scn/3 scn/4 scn/3 scr&amp;scn/3 7
635 RCA | sta/1 sta/2 4 scr/3 6 scr/3 7
636 RCN | sta/1 sta/2 scr/3 scr/3 scr/5 scr/3 7
637 RTR | sta/1 sta/2 sta/3 sta/3 sta/3 sta/1 sta/7
638 RTA | 1 2 3 3 3 1 1
639 RCJ | 1 2 1 1 1 1 1
640 RUC | scj/1 scj/1 scj/1 scj/1 scj/1 scj/1 1 scj/1
641 RER | sta/1 sta/2 3 4 5 ser/1 7
642
643 Notes:
644 RCR+ - Receive-Configure-Request (Good)
645 RCR- - Receive-Configure-Request (Bad)
646 RCJ - Receive-Code-Reject
647 RUC - Receive-Unknown-Code
648 RER - Receive-Echo-Request
649 scj - Send-Code-Reject
650 ser - Send-Echo-Reply
651 * - Special attention necessary, see detailed text
652
653 <span class="h4"><a class="selflink" id="section-4.1.4" href="#section-4.1.4">4.1.4</a>. Events</span>
654
655 Transitions and actions in the LCP state machine are caused by
656 events. Some events are caused by commands executed at the local end
657 (e.g., Active-Open, Passive-Open, and Close), others are caused by
658 the receipt of packets from the remote end (e.g., Receive- Configure-
659 Request, Receive-Configure-Ack, Receive-Configure-Nak, Receive-
660 Terminate-Request and Receive-Terminate-Ack), and still others are
661 caused by the expiration of the Restart timer started as the result
662 of other events (e.g., Timeout).
663
664 Following is a list of LCP events.
665
666
667
668 <span class="grey">Perkins [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
671
672
673 Active-Open (AO)
674
675 The Active-Open event indicates the local execution of an Active-
676 Open command by the network administrator (human or program).
677 When this event occurs, LCP should immediately attempt to open the
678 connection by exchanging configuration packets with the LCP peer.
679
680 Passive-Open (PO)
681
682 The Passive-Open event is similar to the Active-Open event.
683 However, instead of immediately exchanging configuration packets,
684 LCP should wait for the peer to send the first packet. This will
685 only happen after an Active-Open event in the LCP peer.
686
687 Close (C)
688
689 The Close event indicates the local execution of a Close command.
690 When this event occurs, LCP should immediately attempt to close
691 the connection.
692
693 Timeout (TO)
694
695 The Timeout event indicates the expiration of the LCP Restart
696 timer. The LCP Restart timer is started as the result of other
697 LCP events.
698
699 The Restart timer is used to time out transmissions of Configure-
700 Request and Terminate-Request packets. Expiration of the Restart
701 timer causes a Timeout event, which triggers the corresponding
702 Configure-Request or Terminate-Request packet to be retransmitted.
703 The Restart timer MUST be configurable, but should default to
704 three (3) seconds.
705
706 Receive-Configure-Request (RCR)
707
708 The Receive-Configure-Request event occurs when a Configure-
709 Request packet is received from the LCP peer. The Configure-
710 Request packet indicates the desire to open a LCP connection and
711 may specify Configuration Options. The Configure-Request packet
712 is more fully described in a later section.
713
714 Receive-Configure-Ack (RCA)
715
716 The Receive-Configure-Ack event occurs when a valid Configure-Ack
717 packet is received from the LCP peer. The Configure-Ack packet is
718 a positive response to a Configure-Request packet.
719
720
721
722
723
724 <span class="grey">Perkins [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
727
728
729 Receive-Configure-Nak (RCN)
730
731 The Receive-Configure-Nak event occurs when a valid Configure-Nak
732 or Configure-Reject packet is received from the LCP peer. The
733 Configure-Nak and Configure-Reject packets are negative responses
734 to a Configure-Request packet.
735
736 Receive-Terminate-Request (RTR)
737
738 The Receive-Terminate-Request event occurs when a Terminate-
739 Request packet is received from the LCP peer. The Terminate-
740 Request packet indicates the desire to close the LCP connection.
741
742 Receive-Terminate-Ack (RTA)
743
744 The Receive-Terminate-Ack event occurs when a Terminate-Ack packet
745 is received from the LCP peer. The Terminate-Ack packet is a
746 response to a Terminate-Request packet.
747
748 Receive-Code-Reject (RCJ)
749
750 The Receive-Code-Reject event occurs when a Code-Reject packet is
751 received from the LCP peer. The Code-Reject packet communicates
752 an error that immediately closes the connection.
753
754 Receive-Unknown-Code (RUC)
755
756 The Receive-Unknown-Code event occurs when an un-interpretable
757 packet is received from the LCP peer. The Code-Reject packet is a
758 response to an unknown packet.
759
760 Receive-Echo-Request (RER)
761
762 The Receive-Echo-Request event occurs when a Echo-Request, Echo-
763 Reply, or Discard-Request packet is received from the LCP peer.
764 The Echo-Reply packet is a response to a Echo-Request packet.
765 There is no reply to a Discard-Request.
766
767 Physical-Layer-Down (PLD)
768
769 The Physical-Layer-Down event occurs when the Physical Layer
770 indicates that it is down.
771
772 <span class="h4"><a class="selflink" id="section-4.1.5" href="#section-4.1.5">4.1.5</a>. Actions</span>
773
774 Actions in the LCP state machine are caused by events and typically
775 indicate the transmission of packets and/or the starting or stopping
776 of the Restart timer. Following is a list of LCP actions.
777
778
779
780 <span class="grey">Perkins [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
783
784
785 Send-Configure-Request (scr)
786
787 The Send-Configure-Request action transmits a Configure-Request
788 packet. This indicates the desire to open a LCP connection with a
789 specified set of Configuration Options. The Restart timer is
790 started after the Configure-Request packet is transmitted, to
791 guard against packet loss.
792
793 Send-Configure-Ack (sca)
794
795 The Send-Configure-Ack action transmits a Configure-Ack packet.
796 This acknowledges the receipt of a Configure-Request packet with
797 an acceptable set of Configuration Options.
798
799 Send-Configure-Nak (scn)
800
801 The Send-Configure-Nak action transmits a Configure-Nak or
802 Configure-Reject packet, as appropriate. This negative response
803 reports the receipt of a Configure-Request packet with an
804 unacceptable set of Configuration Options. Configure-Nak packets
805 are used to refuse a Configuration Option value, and to suggest a
806 new, acceptable value. Configure-Reject packets are used to
807 refuse all negotiation about a Configuration Option, typically
808 because it is not recognized or implemented. The use of
809 Configure-Nak vs. Configure-Reject is more fully described in the
810 section on LCP Packet Formats.
811
812 Send-Terminate-Req (str)
813
814 The Send-Terminate-Request action transmits a Terminate-Request
815 packet. This indicates the desire to close a LCP connection. The
816 Restart timer is started after the Terminate-Request packet is
817 transmitted, to guard against packet loss.
818
819 Send-Terminate-Ack (sta)
820
821 The Send-Terminate-Request action transmits a Terminate-Ack
822 packet. This acknowledges the receipt of a Terminate-Request
823 packet or otherwise confirms the belief that a LCP connection is
824 Closed.
825
826 Send-Code-Reject (scj)
827
828 The Send-Code-Reject action transmits a Code-Reject packet. This
829 indicates the receipt of an unknown type of packet. This is an
830 unrecoverable error which causes immediate transitions to the
831 Closed state on both ends of the link.
832
833
834
835
836 <span class="grey">Perkins [Page 15]</span></pre>
837 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
838 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
839
840
841 Send-Echo-Reply (ser)
842
843 The Send-Echo-Reply action transmits an Echo-Reply packet. This
844 acknowledges the receipt of an Echo-Request packet.
845
846 <span class="h4"><a class="selflink" id="section-4.1.6" href="#section-4.1.6">4.1.6</a>. States</span>
847
848 Following is a more detailed description of each LCP state.
849
850 Closed (1)
851
852 The initial and final state is the Closed state. In the Closed
853 state the connection is down and there is no attempt to open it;
854 all connection requests from peers are rejected. Physical-Layer-
855 Down events always cause an immediate transition to the Closed
856 state.
857
858 There are two events which cause a transition out of the Closed
859 state, Active-Open and Passive-Open. Upon an Active-Open event, a
860 Configure-Request is transmitted, the Restart timer is started,
861 and the Request-Sent state is entered. Upon a Passive-Open event,
862 the Listen state is entered immediately. Upon receipt of any
863 packet, with the exception of a Terminate-Ack, a Terminate-Ack is
864 sent. Terminate-Acks are silently discarded to avoid creating a
865 loop.
866
867 The Restart timer is not running in the Closed state.
868
869 The Physical Layer connection may be disconnected at any time when
870 in the LCP Closed state.
871
872 Listen (2)
873
874 The Listen state is similar to the Closed state in that the
875 connection is down and there is no attempt to open it. However,
876 peer connection requests are no longer rejected.
877
878 Upon receipt of a Configure-Request, a Configure-Request is
879 immediately transmitted and the Restart timer is started. The
880 received Configuration Options are examined and the proper
881 response is sent. If a Configure-Ack is sent, the Ack-Sent state
882 is entered. Otherwise, if a Configure-Nak or Configure-Reject is
883 sent, the Request-Sent state is entered. In either case, LCP
884 exits its passive state, and begins to actively open the
885 connection. Terminate-Ack packets are sent in response to either
886 Configure-Ack or Configure-Nak packets,
887
888 The Restart timer is not running in the Listen state.
889
890
891
892 <span class="grey">Perkins [Page 16]</span></pre>
893 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
894 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
895
896
897 Request-Sent (3)
898
899 In the Request-Sent state an active attempt is made to open the
900 connection. A Configure-Request has been sent and the Restart
901 timer is running, but a Configure-Ack has not yet been received
902 nor has one been sent.
903
904 Upon receipt of a Configure-Ack, the Ack-Received state is
905 immediately entered. Upon receipt of a Configure-Nak or
906 Configure-Reject, the Configure-Request Configuration Options are
907 adjusted appropriately, a new Configure-Request is transmitted,
908 and the Restart timer is restarted. Similarly, upon the
909 expiration of the Restart timer, a new Configure-Request is
910 transmitted and the Restart timer is restarted. Upon receipt of a
911 Configure-Request, the Configuration Options are examined and if
912 acceptable, a Configure-Ack is sent and the Ack-Sent state is
913 entered. If the Configuration Options are unacceptable, a
914 Configure-Nak or Configure-Reject is sent as appropriate.
915
916 Since there is an outstanding Configure-Request in the Request-
917 Sent state, special care must be taken to implement the Passive-
918 Open and Close events; otherwise, it is possible for the LCP peer
919 to think the connection is open. Processing of either event
920 should be postponed until there is reasonable assurance that the
921 peer is not open. In particular, the Restart timer should be
922 allowed to expire.
923
924 Ack-Received (4)
925
926 In the Ack-Received state, a Configure-Request has been sent and a
927 Configure-Ack has been received. The Restart timer is still
928 running since a Configure-Ack has not yet been transmitted.
929
930 Upon receipt of a Configure-Request with acceptable Configuration
931 Options, a Configure-Ack is transmitted, the Restart timer is
932 stopped and the Open state is entered. If the Configuration
933 Options are unacceptable, a Configure-Nak or Configure-Reject is
934 sent as appropriate. Upon the expiration of the Restart timer, a
935 new Configure-Request is transmitted, the Restart timer is
936 restarted, and the state machine returns to the Request-Sent
937 state.
938
939 Ack-Sent (5)
940
941 In the Ack-Sent state, a Configure-Ack and a Configure-Request
942 have been sent but a Configure-Ack has not yet been received. The
943 Restart timer is always running in the Ack-Sent state.
944
945
946
947
948 <span class="grey">Perkins [Page 17]</span></pre>
949 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
950 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
951
952
953 Upon receipt of a Configure-Ack, the Restart timer is stopped and
954 the Open state is entered. Upon receipt of a Configure-Nak or
955 Configure-Reject, the Configure-Request Configuration Options are
956 adjusted appropriately, a new Configure-Request is transmitted,
957 and the Restart timer is restarted. Upon the expiration of the
958 Restart timer, a new Configure-Request is transmitted, the Restart
959 timer is restarted, and the state machine returns to the Request-
960 Sent state.
961
962 Open (6)
963
964 In the Open state, a connection exists and data may be
965 communicated over the link. The Restart timer is not running in
966 the Open state.
967
968 In normal operation, only two events cause transitions out of the
969 Open state. Upon receipt of a Close command, a Terminate-Request
970 is transmitted, the Restart timer is started, and the Closing
971 state is entered. Upon receipt of a Terminate-Request, a
972 Terminate-Ack is transmitted and the Closed state is entered.
973 Upon receipt of an Echo-Request, an Echo-Reply is transmitted.
974 Similarly, Echo-Reply and Discard-Request packets are silently
975 discarded or processed as expected. All other events cause
976 immediate transitions out of the Open state and should be handled
977 as if the state machine were in the Listen state.
978
979 Closing (7)
980
981 In the Closing state, an active attempt is made to close the
982 connection. A Terminate-Request has been sent and the Restart
983 timer is running, but a Terminate-Ack has not yet been received.
984
985 Upon receipt of a Terminate-Ack, the Closed state is immediately
986 entered. Upon the expiration of the Restart timer, a new
987 Terminate-Request is transmitted and the Restart timer is
988 restarted. After the Restart timer has expired Max-Restart times,
989 this action may be skipped, and the Closed state may be entered.
990 Max-Restart MUST be a configurable parameter.
991
992 Since there is an outstanding Terminate-Request in the Closing
993 state, special care must be taken to implement the Passive-Open
994 event; otherwise, it is possible for the LCP peer to think the
995 connection is open. Processing of the Passive-Open event should
996 be postponed until there is reasonable assurance that the peer is
997 not open. In particular, the implementation should wait until the
998 state machine would normally transition to the Closed state
999 because of a Receive-Terminate-Ack event or Max-Restart Timeout
1000 events.
1001
1002
1003
1004 <span class="grey">Perkins [Page 18]</span></pre>
1005 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
1006 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1007
1008
1009 <span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Loop Avoidance</span>
1010
1011 Note that the protocol makes a reasonable attempt at avoiding
1012 Configuration Option negotiation loops. However, the protocol does
1013 NOT guarantee that loops will not happen. As with any negotiation,
1014 it is possible to configure two PPP implementations with conflicting
1015 policies that will never converge. It is also possible to configure
1016 policies which do converge, but which take significant time to do so.
1017 Implementors should keep this in mind and should implement loop
1018 detection mechanisms or higher level timeouts. If a timeout is
1019 implemented, it MUST be configurable.
1020
1021 For example, implementations could take care to avoid Configure-
1022 Request or Terminate-Request livelocks by using a Max-Retries
1023 counter. A Configure-Request livelock could occur when an
1024 originating PPP sends and re-sends a C-R without receiving a reply
1025 (e.g., the receiving PPP entity may have died). A Terminate-Request
1026 livelock could occur when the originating PPP sends and re-sends a
1027 T-R without receiving a Terminate-Ack (e.g., the T-A may have been
1028 lost, but the remote PPP may have already terminated). Max-Retries
1029 indicates the number of packet retransmissions that are allowed
1030 before there is reasonable assurance that a livelock situation
1031 exists. Max-Retries MUST also be configurable, but should default to
1032 ten (10) retransmissions.
1033
1034 <span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a> Packet Format</span>
1035
1036 Exactly one Link Control Protocol packet is encapsulated in the
1037 Information field of PPP Data Link Layer frames where the Protocol
1038 field indicates type hex c021 (Link Control Protocol).
1039
1040 A summary of the Link Control Protocol packet format is shown below.
1041 The fields are transmitted from left to right.
1042
1043 0 1 2 3
1044 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1045 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1046 | Code | Identifier | Length |
1047 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1048 | Data ...
1049 +-+-+-+-+
1050
1051 Code
1052
1053 The Code field is one octet and identifies the kind of LCP packet.
1054 LCP Codes are assigned as follows:
1055
1056
1057
1058
1059
1060 <span class="grey">Perkins [Page 19]</span></pre>
1061 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
1062 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1063
1064
1065 1 Configure-Request
1066 2 Configure-Ack
1067 3 Configure-Nak
1068 4 Configure-Reject
1069 5 Terminate-Request
1070 6 Terminate-Ack
1071 7 Code-Reject
1072 8 Protocol-Reject
1073 9 Echo-Request
1074 10 Echo-Reply
1075 11 Discard-Request
1076
1077 Identifier
1078
1079 The Identifier field is one octet and aids in matching requests
1080 and replies.
1081
1082 Length
1083
1084 The Length field is two octets and indicates the length of the LCP
1085 packet including the Code, Identifier, Length and Data fields.
1086 Octets outside the range of the Length field should be treated as
1087 Data Link Layer padding and should be ignored on reception.
1088
1089 Data
1090
1091 The Data field is zero or more octets as indicated by the Length
1092 field. The format of the Data field is determined by the Code
1093 field.
1094
1095 Regardless of which Configuration Options are enabled, all LCP
1096 packets are always sent in the full, standard form, as if no
1097 Configuration Options were enabled. This ensures that LCP
1098 Configure-Request packets are always recognizable even when one end
1099 of the link mistakenly believes the link to be Open.
1100
1101 This document describes Version 1 of the Link Control Protocol. In
1102 the interest of simplicity, there is no version field in the LCP
1103 packet. If a new version of LCP is necessary in the future, the
1104 intention is that a new Data Link Layer Protocol field value should
1105 be used to differentiate Version 1 LCP from all other versions. A
1106 correctly functioning Version 1 LCP implementation will always
1107 respond to unknown Protocols (including other versions) with an
1108 easily recognizable Version 1 packet, thus providing a deterministic
1109 fallback mechanism for implementations of other versions.
1110
1111
1112
1113
1114
1115
1116 <span class="grey">Perkins [Page 20]</span></pre>
1117 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
1118 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1119
1120
1121 <span class="h4"><a class="selflink" id="section-4.3.1" href="#section-4.3.1">4.3.1</a>. Configure-Request</span>
1122
1123 Description
1124
1125 A LCP implementation wishing to open a connection MUST transmit a
1126 LCP packet with the Code field set to 1 (Configure-Request) and
1127 the Options field filled with any desired changes to the default
1128 link Configuration Options.
1129
1130 Upon reception of a Configure-Request, an appropriate reply MUST
1131 be transmitted.
1132
1133 A summary of the Configure-Request packet format is shown below. The
1134 fields are transmitted from left to right.
1135
1136 0 1 2 3
1137 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1138 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1139 | Code | Identifier | Length |
1140 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1141 | Options ...
1142 +-+-+-+-+
1143
1144 Code
1145
1146 1 for Configure-Request.
1147
1148 Identifier
1149
1150 The Identifier field should be changed on each transmission. On
1151 reception, the Identifier field should be copied into the
1152 Identifier field of the appropriate reply packet.
1153
1154 Options
1155
1156 The options field is variable in length and contains the list of
1157 zero or more Configuration Options that the sender desires to
1158 negotiate. All Configuration Options are always negotiated
1159 simultaneously. The format of Configuration Options is further
1160 described in a later section.
1161
1162 <span class="h4"><a class="selflink" id="section-4.3.2" href="#section-4.3.2">4.3.2</a>. Configure-Ack</span>
1163
1164 Description
1165
1166 If every Configuration Option received in a Configure-Request is
1167 both recognizable and acceptable, then a LCP implementation should
1168 transmit a LCP packet with the Code field set to 2 (Configure-
1169
1170
1171
1172 <span class="grey">Perkins [Page 21]</span></pre>
1173 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
1174 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1175
1176
1177 Ack), the Identifier field copied from the received Configure-
1178 Request, and the Options field copied from the received
1179 Configure-Request. The acknowledged Configuration Options MUST
1180 NOT be reordered or modified in any way.
1181
1182 On reception of a Configure-Ack, the Identifier field must match
1183 that of the last transmitted Configure-Request, or the packet is
1184 invalid. Additionally, the Configuration Options in a Configure-
1185 Ack must match those of the last transmitted Configure-Request, or
1186 the packet is invalid. Invalid packets should be silently
1187 discarded.
1188
1189 Reception of a valid Configure-Ack indicates that all
1190 Configuration Options sent in the last Configure-Request are
1191 acceptable.
1192
1193 A summary of the Configure-Ack packet format is shown below. The
1194 fields are transmitted from left to right.
1195
1196 0 1 2 3
1197 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1198 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1199 | Code | Identifier | Length |
1200 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1201 | Options ...
1202 +-+-+-+-+
1203
1204 Code
1205
1206 2 for Configure-Ack.
1207
1208 Identifier
1209
1210 The Identifier field is a copy of the Identifier field of the
1211 Configure-Request which caused this Configure-Ack.
1212
1213 Options
1214
1215 The Options field is variable in length and contains the list of
1216 zero or more Configuration Options that the sender is
1217 acknowledging. All Configuration Options are always acknowledged
1218 simultaneously.
1219
1220 <span class="h4"><a class="selflink" id="section-4.3.3" href="#section-4.3.3">4.3.3</a>. Configure-Nak</span>
1221
1222 Description
1223
1224 If every element of the received Configuration Options is
1225
1226
1227
1228 <span class="grey">Perkins [Page 22]</span></pre>
1229 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
1230 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1231
1232
1233 recognizable but some are not acceptable, then a LCP
1234 implementation should transmit a LCP packet with the Code field
1235 set to 3 (Configure-Nak), the Identifier field copied from the
1236 received Configure-Request, and the Options field filled with only
1237 the unacceptable Configuration Options from the Configure-Request.
1238 All acceptable Configuration Options should be filtered out of the
1239 Configure-Nak, but otherwise the Configuration Options from the
1240 Configure-Request MUST NOT be reordered. Each of the nak'd
1241 Configuration Options MUST be modified to a value acceptable to
1242 the Configure-Nak sender. Finally, an implementation may be
1243 configured to require the negotiation of a specific option. If
1244 that option is not listed, then that option may be appended to the
1245 list of nak'd Configuration Options in order to request the remote
1246 end to list that option in its next Configure-Request packet. The
1247 appended option must include a value acceptable to the Configure-
1248 Nak sender.
1249
1250 On reception of a Configure-Nak, the Identifier field must match
1251 that of the last transmitted Configure-Request, or the packet is
1252 invalid and should be silently discarded.
1253
1254 Reception of a valid Configure-Nak indicates that a new
1255 Configure-Request should be sent with the Configuration Options
1256 modified as specified in the Configure-Nak.
1257
1258 A summary of the Configure-Nak packet format is shown below. The
1259 fields are transmitted from left to right.
1260
1261 0 1 2 3
1262 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1263 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1264 | Code | Identifier | Length |
1265 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1266 | Options ...
1267 +-+-+-+-+
1268
1269 Code
1270
1271 3 for Configure-Nak.
1272
1273 Identifier
1274
1275 The Identifier field is a copy of the Identifier field of the
1276 Configure-Request which caused this Configure-Nak.
1277
1278 Options
1279
1280 The Options field is variable in length and contains the list of
1281
1282
1283
1284 <span class="grey">Perkins [Page 23]</span></pre>
1285 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
1286 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1287
1288
1289 zero or more Configuration Options that the sender is nak'ing.
1290 All Configuration Options are always nak'd simultaneously.
1291
1292 <span class="h4"><a class="selflink" id="section-4.3.4" href="#section-4.3.4">4.3.4</a>. Configure-Reject</span>
1293
1294 Description
1295
1296 If some Configuration Options received in a Configure-Request are
1297 not recognizable or are not acceptable for negotiation (as
1298 configured by a network manager), then a LCP implementation should
1299 transmit a LCP packet with the Code field set to 4 (Configure-
1300 Reject), the Identifier field copied from the received Configure-
1301 Request, and the Options field filled with only the unrecognized
1302 Configuration Options from the Configure-Request. All
1303 recognizable and negotiable Configuration Options must be filtered
1304 out of the Configure-Reject, but otherwise the Configuration
1305 Options MUST not be reordered.
1306
1307 On reception of a Configure-Reject, the Identifier field must
1308 match that of the last transmitted Configure-Request, or the
1309 packet is invalid. Additionally, the Configuration Options in a
1310 Configure-Reject must be a proper subset of those in the last
1311 transmitted Configure-Request, or the packet is invalid. Invalid
1312 packets should be silently discarded.
1313
1314 Reception of a Configure-Reject indicates that a new Configure-
1315 Request should be sent which does not include any of the
1316 Configuration Options listed in the Configure-Reject.
1317
1318 A summary of the Configure-Reject packet format is shown below. The
1319 fields are transmitted from left to right.
1320
1321 0 1 2 3
1322 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1323 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1324 | Code | Identifier | Length |
1325 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1326 | Options ...
1327 +-+-+-+-+
1328
1329 Code
1330
1331 4 for Configure-Reject.
1332
1333 Identifier
1334
1335 The Identifier field is a copy of the Identifier field of the
1336 Configure-Request which caused this Configure-Reject.
1337
1338
1339
1340 <span class="grey">Perkins [Page 24]</span></pre>
1341 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
1342 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1343
1344
1345 Options
1346
1347 The Options field is variable in length and contains the list of
1348 zero or more Configuration Options that the sender is rejecting.
1349 All Configuration Options are always rejected simultaneously.
1350
1351 <span class="h4"><a class="selflink" id="section-4.3.5" href="#section-4.3.5">4.3.5</a>. Terminate-Request and Terminate-Ack</span>
1352
1353 Description
1354
1355 LCP includes Terminate-Request and Terminate-Ack Codes in order to
1356 provide a mechanism for closing a connection.
1357
1358 A LCP implementation wishing to close a connection should transmit
1359 a LCP packet with the Code field set to 5 (Terminate-Request) and
1360 the Data field filled with any desired data. Terminate-Request
1361 packets should continue to be sent until Terminate-Ack is
1362 received, the Physical Layer indicates that it has gone down, or a
1363 sufficiently large number have been transmitted such that the
1364 remote end is down with reasonable certainty.
1365
1366 Upon reception of a Terminate-Request, a LCP packet MUST be
1367 transmitted with the Code field set to 6 (Terminate-Ack), the
1368 Identifier field copied from the Terminate-Request packet, and the
1369 Data field filled with any desired data.
1370
1371 Reception of an unelicited Terminate-Ack indicates that the
1372 connection has been closed.
1373
1374 A summary of the Terminate-Request and Terminate-Ack packet formats
1375 is shown below. The fields are transmitted from left to right.
1376
1377 0 1 2 3
1378 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1379 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1380 | Code | Identifier | Length |
1381 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1382 | Data ...
1383 +-+-+-+-+
1384
1385 Code
1386
1387 5 for Terminate-Request;
1388
1389 6 for Terminate-Ack.
1390
1391
1392
1393
1394
1395
1396 <span class="grey">Perkins [Page 25]</span></pre>
1397 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
1398 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1399
1400
1401 Identifier
1402
1403 The Identifier field is one octet and aids in matching requests
1404 and replies.
1405
1406 Data
1407
1408 The Data field is zero or more octets and contains uninterpreted
1409 data for use by the sender. The data may consist of any binary
1410 value and may be of any length from zero to the established value
1411 for the peer's MRU.
1412
1413 <span class="h4"><a class="selflink" id="section-4.3.6" href="#section-4.3.6">4.3.6</a>. Code-Reject</span>
1414
1415 Description
1416
1417 Reception of a LCP packet with an unknown Code indicates that one
1418 of the communicating LCP implementations is faulty or incomplete.
1419 This error MUST be reported back to the sender of the unknown Code
1420 by transmitting a LCP packet with the Code field set to 7 (Code-
1421 Reject), and the inducing packet copied to the Rejected-Packet
1422 field.
1423
1424 Upon reception of a Code-Reject, a LCP implementation should make
1425 an immediate transition to the Closed state, and should report the
1426 error, since it is unlikely that the situation can be rectified
1427 automatically.
1428
1429 A summary of the Code-Reject packet format is shown below. The
1430 fields are transmitted from left to right.
1431
1432 0 1 2 3
1433 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1434 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1435 | Code | Identifier | Length |
1436 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1437 | Rejected-Packet ...
1438 +-+-+-+-+-+-+-+-+
1439
1440 Code
1441
1442 7 for Code-Reject.
1443
1444 Identifier
1445
1446 The Identifier field is one octet and is for use by the
1447 transmitter.
1448
1449
1450
1451
1452 <span class="grey">Perkins [Page 26]</span></pre>
1453 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
1454 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1455
1456
1457 Rejected-Packet
1458
1459 The Rejected-Packet field contains a copy of the LCP packet which
1460 is being rejected. It begins with the rejected Code field; it
1461 does not include any PPP Data Link Layer headers. The Rejected-
1462 Packet should be truncated to comply with the established value of
1463 the peer's MRU.
1464
1465 <span class="h4"><a class="selflink" id="section-4.3.7" href="#section-4.3.7">4.3.7</a>. Protocol-Reject</span>
1466
1467 Description
1468
1469 Reception of a PPP frame with an unknown Data Link Layer Protocol
1470 indicates that the remote end is attempting to use a protocol
1471 which is unsupported at the local end. This typically occurs when
1472 the remote end attempts to configure a new, but unsupported
1473 protocol. If the LCP state machine is in the Open state, then
1474 this error MUST be reported back to the sender of the unknown
1475 protocol by transmitting a LCP packet with the Code field set to 8
1476 (Protocol-Reject), the Rejected-Protocol field set to the received
1477 Protocol, and the Data field filled with any desired data.
1478
1479 Upon reception of a Protocol-Reject, a LCP implementation should
1480 stop transmitting frames of the indicated protocol.
1481
1482 Protocol-Reject packets may only be sent in the LCP Open state.
1483 Protocol-Reject packets received in any state other than the LCP
1484 Open state should be discarded and no further action should be
1485 taken.
1486
1487 A summary of the Protocol-Reject packet format is shown below. The
1488 fields are transmitted from left to right.
1489
1490 0 1 2 3
1491 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1492 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1493 | Code | Identifier | Length |
1494 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1495 | Rejected-Protocol | Rejected-Information ...
1496 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1497
1498 Code
1499
1500 8 for Protocol-Reject.
1501
1502 Identifier
1503
1504 The Identifier field is one octet and is for use by the
1505
1506
1507
1508 <span class="grey">Perkins [Page 27]</span></pre>
1509 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
1510 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1511
1512
1513 transmitter.
1514
1515 Rejected-Protocol
1516
1517 The Rejected-Protocol field is two octets and contains the
1518 Protocol of the Data Link Layer frame which is being rejected.
1519
1520 Rejected-Information
1521
1522 The Rejected-Information field contains a copy from the frame
1523 which is being rejected. It begins with the Information field,
1524 and does not include any PPP Data Link Layer headers or the FCS.
1525 The Rejected-Information field should be truncated to comply with
1526 the established value of the peer's MRU.
1527
1528 <span class="h4"><a class="selflink" id="section-4.3.8" href="#section-4.3.8">4.3.8</a>. Echo-Request and Echo-Reply</span>
1529
1530 Description
1531
1532 LCP includes Echo-Request and Echo-Reply Codes in order to provide
1533 a Data Link Layer loopback mechanism for use in exercising both
1534 directions of the link. This is useful as an aid in debugging,
1535 link quality determination, performance testing, and for numerous
1536 other functions.
1537
1538 An Echo-Request sender transmits a LCP packet with the Code field
1539 set to 9 (Echo-Request) and the Data field filled with any desired
1540 data, up to but not exceeding the receivers established MRU.
1541
1542 Upon reception of an Echo-Request, a LCP packet MUST be
1543 transmitted with the Code field set to 10 (Echo-Reply), the
1544 Identifier field copied from the received Echo-Request, and the
1545 Data field copied from the Echo-Request, truncating as necessary
1546 to avoid exceeding the peer's established MRU.
1547
1548 Echo-Request and Echo-Reply packets may only be sent in the LCP
1549 Open state. Echo-Request and Echo-Reply packets received in any
1550 state other than the LCP Open state should be discarded and no
1551 further action should be taken.
1552
1553 A summary of the Echo-Request and Echo-Reply packet formats is shown
1554 below. The fields are transmitted from left to right.
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564 <span class="grey">Perkins [Page 28]</span></pre>
1565 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
1566 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1567
1568
1569 0 1 2 3
1570 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1571 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1572 | Code | Identifier | Length |
1573 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1574 | Magic-Number |
1575 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1576 | Data ...
1577 +-+-+-+-+
1578
1579 Code
1580
1581 9 for Echo-Request;
1582
1583 10 for Echo-Reply.
1584
1585 Identifier
1586
1587 The Identifier field is one octet and aids in matching Echo-
1588 Requests and Echo-Replies.
1589
1590 Magic-Number
1591
1592 The Magic-Number field is four octets and aids in detecting
1593 loopbacked links. Unless modified by a Configuration Option, the
1594 Magic-Number MUST always be transmitted as zero and MUST always be
1595 ignored on reception. Further use of the Magic-Number is beyond
1596 the scope of this discussion.
1597
1598 Data
1599
1600 The Data field is zero or more octets and contains uninterpreted
1601 data for use by the sender. The data may consist of any binary
1602 value and may be of any length from zero to the established value
1603 for the peer's MRU.
1604
1605 <span class="h4"><a class="selflink" id="section-4.3.9" href="#section-4.3.9">4.3.9</a>. Discard-Request</span>
1606
1607 Description
1608
1609 LCP includes a Discard-Request Code in order to provide a Data
1610 Link Layer data sink mechanism for use in exercising the local to
1611 remote direction of the link. This is useful as an aid in
1612 debugging, performance testing, and and for numerous other
1613 functions.
1614
1615 A discard sender transmits a LCP packet with the Code field set to
1616 11 (Discard-Request) and the Data field filled with any desired
1617
1618
1619
1620 <span class="grey">Perkins [Page 29]</span></pre>
1621 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
1622 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1623
1624
1625 data, up to but not exceeding the receivers established MRU.
1626
1627 A discard receiver MUST simply throw away an Discard-Request that
1628 it receives.
1629
1630 Discard-Request packets may only be sent in the LCP Open state.
1631
1632 A summary of the Discard-Request packet formats is shown below. The
1633 fields are transmitted from left to right.
1634
1635 0 1 2 3
1636 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1637 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1638 | Code | Identifier | Length |
1639 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1640 | Magic-Number |
1641 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1642 | Data ...
1643 +-+-+-+-+
1644
1645 Code
1646
1647 11 for Discard-Request.
1648
1649 Identifier
1650
1651 The Identifier field is one octet and is for use by the Discard-
1652 Request transmitter.
1653
1654 Magic-Number
1655
1656 The Magic-Number field is four octets and aids in detecting
1657 loopbacked links. Unless modified by a configuration option, the
1658 Magic-Number MUST always be transmitted as zero and MUST always be
1659 ignored on reception. Further use of the Magic-Number is beyond
1660 the scope of this discussion.
1661
1662 Data
1663
1664 The Data field is zero or more octets and contains uninterpreted
1665 data for use by the sender. The data may consist of any binary
1666 value and may be of any length from zero to the established value
1667 for the peer's MRU.
1668
1669 <span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Configuration Options</span>
1670
1671 LCP Configuration Options allow modifications to the standard
1672 characteristics of a point-to-point link to be negotiated.
1673
1674
1675
1676 <span class="grey">Perkins [Page 30]</span></pre>
1677 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
1678 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1679
1680
1681 Negotiable modifications include such things as the maximum receive
1682 unit, async control character mapping, the link authentication
1683 method, the link encryption method, etc.. The Configuration Options
1684 themselves are described in separate documents. If a Configuration
1685 Option is not included in a Configure-Request packet, the default
1686 value for that Configuration Option is assumed.
1687
1688 The end of the list of Configuration Options is indicated by the end
1689 of the LCP packet.
1690
1691 Unless otherwise specified, a specific Configuration Options should
1692 be listed no more than once in a Configuration Options list.
1693 Specific Configuration Options may override this general rule and may
1694 be listed more than once. The effect of this is Configuration Option
1695 specific and is specified by each such Configuration Option.
1696
1697 Also unless otherwise specified, all Configuration Options apply in a
1698 half-duplex fashion. When negotiated, they apply to only one
1699 direction of the link, typically in the receive direction when
1700 interpreted from the point of view of the Configure-Request sender.
1701
1702 <span class="h4"><a class="selflink" id="section-4.4.1" href="#section-4.4.1">4.4.1</a>. Format</span>
1703
1704 A summary of the Configuration Option format is shown below. The
1705 fields are transmitted from left to right.
1706
1707 0 1
1708 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
1709 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1710 | Type | Length | Data ...
1711 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1712
1713 Type
1714
1715 The Type field is one octet and indicates the type of
1716 Configuration Option. The most up-to-date values of the Type
1717 field are specified in the most recent "Assigned Numbers" RFC
1718 [<a href="#ref-11" title="&quot;Assigned Numbers&quot;">11</a>].
1719
1720 Length
1721
1722 The Length field is one octet and indicates the length of this
1723 Configuration Option including the Type, Length and Data fields.
1724 If a negotiable Configuration Option is received in a Configure-
1725 Request but with an invalid Length, a Configure-Nak should be
1726 transmitted which includes the desired Configuration Option with
1727 an appropriate Length and Data.
1728
1729
1730
1731
1732 <span class="grey">Perkins [Page 31]</span></pre>
1733 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
1734 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1735
1736
1737 Data
1738
1739 The Data field is zero or more octets and indicates the value or
1740 other information for this Configuration Option. The format and
1741 length of the Data field is determined by the Type and Length
1742 fields.
1743
1744 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. A PPP Network Control Protocol (NCP) for IP</span>
1745
1746 The IP Control Protocol (IPCP) is responsible for configuring,
1747 enabling, and disabling the IP protocol modules on both ends of the
1748 point-to-point link. As with the Link Control Protocol, this is
1749 accomplished through an exchange of packets. IPCP packets may not be
1750 exchanged until LCP has reached the network-layer Protocol
1751 Configuration Negotiation phase. Likewise, IP datagrams may not be
1752 exchanged until IPCP has first opened the connection.
1753
1754 The IP Control Protocol is exactly the same as the Link Control
1755 Protocol with the following exceptions:
1756
1757 Data Link Layer Protocol Field
1758
1759 Exactly one IP Control Protocol packet is encapsulated in the
1760 Information field of PPP Data Link Layer frames where the Protocol
1761 field indicates type hex 8021 (IP Control Protocol).
1762
1763 Code field
1764
1765 Only Codes 1 through 7 (Configure-Request, Configure-Ack,
1766 Configure-Nak, Configure-Reject, Terminate-Request, Terminate-Ack
1767 and Code-Reject) are used. Other Codes should be treated as
1768 unrecognized and should result in Code-Rejects.
1769
1770 Timeouts
1771
1772 IPCP packets may not be exchanged until the Link Control Protocol
1773 has reached the network-layer Protocol Configuration Negotiation
1774 phase. An implementation should be prepared to wait for Link
1775 Quality testing to finish before timing out waiting for a
1776 Configure-Ack or other response. It is suggested that an
1777 implementation give up only after user intervention or a
1778 configurable amount of time.
1779
1780 Configuration Option Types
1781
1782 The IPCP has a separate set of Configuration Options. The most
1783 up-to-date values of the type field are specified in the most
1784 recent "Assigned Numbers" RFC [<a href="#ref-11" title="&quot;Assigned Numbers&quot;">11</a>].
1785
1786
1787
1788 <span class="grey">Perkins [Page 32]</span></pre>
1789 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
1790 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1791
1792
1793 <span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Sending IP Datagrams</span>
1794
1795 Before any IP packets may be communicated, both the Link Control
1796 Protocol and the IP Control Protocol must reach the Open state.
1797
1798 Exactly one IP packet is encapsulated in the Information field of PPP
1799 Data Link Layer frames where the Protocol field indicates type hex
1800 0021 (Internet Protocol).
1801
1802 The maximum length of an IP packet transmitted over a PPP link is the
1803 same as the maximum length of the Information field of a PPP data
1804 link layer frame. Larger IP datagrams must be fragmented as
1805 necessary. If a system wishes to avoid fragmentation and reassembly,
1806 it should use the TCP Maximum Segment Size option [<a href="#ref-12" title="&quot;The TCP Maximum Segment Size Option and Related Topics&quot;">12</a>], or a similar
1807 mechanism, to discourage others from sending large datagrams.
1808
1809 <span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">A</a>. Asynchronous HDLC</span>
1810
1811 This appendix summarizes the modifications to ISO 3309-1979 proposed
1812 in ISO 3309:1984/PDAD1. These modifications allow HDLC to be used
1813 with 8-bit asynchronous links.
1814
1815 Transmission Considerations
1816
1817 Each octet is delimited by a start and a stop element.
1818
1819 Flag Sequence
1820
1821 The Flag Sequence is a single octet and indicates the beginning or
1822 end of a frame. The Flag Sequence consists of the binary sequence
1823 01111110 (hexadecimal 0x7e).
1824
1825 Transparency
1826
1827 On asynchronous links, a character stuffing procedure is used.
1828 The Control Escape octet is defined as binary 01111101
1829 (hexadecimal 0x7d) where the bit positions are numbered 87654321
1830 (not 76543210, BEWARE).
1831
1832 After FCS computation, the transmitter examines the entire frame
1833 between the two Flag Sequences. Each Flag Sequence, Control
1834 Escape octet and octet with value less than hexadecimal 0x20 is
1835 replaced by a two character sequence consisting of the Control
1836 Escape octet and the original octet with bit 6 complemented (i.e.,
1837 exclusive-or'd with hexadecimal 0x20).
1838
1839 Prior to FCS computation, the receiver examines the entire frame
1840 between the two Flag Sequences. For each Control Escape octet,
1841
1842
1843
1844 <span class="grey">Perkins [Page 33]</span></pre>
1845 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
1846 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1847
1848
1849 that octet is removed and bit 6 of the following octet is
1850 complemented. A Control Escape octet immediately preceding the
1851 closing Flag Sequence indicates an invalid frame.
1852
1853 Note: The inclusion of all octets less than hexadecimal 0x20
1854 allows all ASCII control characters [<a href="#ref-10" title="&quot;Internet Protocol&quot;">10</a>] excluding DEL (Delete)
1855 to be transparently communicated through almost all known data
1856 communications equipment.
1857
1858 A few examples may make this more clear. Packet data is
1859 transmitted on the link as follows:
1860
1861 0x7e is encoded as 0x7d, 0x5e.
1862 0x7d is encoded as 0x7d, 0x5d.
1863 0x01 is encoded as 0x7d, 0x21.
1864
1865 Aborting a Transmission
1866
1867 On asynchronous links, frames may be aborted by transmitting a "0"
1868 stop bit where a "1" bit is expected (framing error) or by
1869 transmitting a Control Escape octet followed immediately by a
1870 closing Flag Sequence.
1871
1872 Inter-frame Time Fill
1873
1874 On asynchronous links, inter-octet and inter-frame time fill
1875 should be accomplished by transmitting continuous "1" bits (mark-
1876 hold state).
1877
1878 Note: On asynchronous links, inter-frame time fill can be
1879 viewed as extended inter-octet time fill. Doing so can save
1880 one octet for every frame, decreasing delay and increasing
1881 bandwidth. This is possible since a Flag Sequence may serve as
1882 both a frame close and a frame begin. After having received
1883 any frame, an idle receiver will always be in a frame begin
1884 state.
1885
1886 Robust transmitters should avoid using this trick over-
1887 zealously since the price for decreased delay is decreased
1888 reliability. Noisy links may cause the receiver to receive
1889 garbage characters and interpret them as part of an incoming
1890 frame. If the transmitter does not transmit a new opening Flag
1891 Sequence before sending the next frame, then that frame will be
1892 appended to the noise characters causing an invalid frame (with
1893 high reliability). Transmitters should avoid this by
1894 transmitting an open Flag Sequence whenever "appreciable time"
1895 has elapsed since the prior closing Flag Sequence. It is
1896 suggested that implementations will achieve the best results by
1897
1898
1899
1900 <span class="grey">Perkins [Page 34]</span></pre>
1901 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
1902 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1903
1904
1905 always sending an opening Flag Sequence if the new frame is not
1906 back-to-back with the last. The maximum value for "appreciable
1907 time" is likely to be no greater than the typing rate of a slow
1908 to average typist, say 1 second.
1909
1910 <span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">B</a>. Fast Frame Check Sequence (FCS) Implementation</span>
1911
1912 <span class="h3"><a class="selflink" id="appendix-B.1" href="#appendix-B.1">B.1</a>. FCS Computation Method</span>
1913
1914 The following code provides a table lookup computation for
1915 calculating the Frame Check Sequence as data arrives at the
1916 interface. The table is created by the code in <a href="#section-2">section 2</a>.
1917
1918 /*
1919 * FCS lookup table as calculated by the table generator in <a href="#section-2">section 2</a>.
1920 */
1921 static unsigned short fcstab[256] = {
1922 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
1923 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
1924 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
1925 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
1926 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
1927 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
1928 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
1929 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
1930 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
1931 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
1932 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
1933 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
1934 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
1935 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
1936 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
1937 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
1938 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
1939 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
1940 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
1941 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
1942 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
1943 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
1944 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
1945 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
1946 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
1947 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
1948 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
1949 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
1950 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
1951 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
1952 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
1953
1954
1955
1956 <span class="grey">Perkins [Page 35]</span></pre>
1957 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
1958 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
1959
1960
1961 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
1962 };
1963
1964 #define PPPINITFCS 0xffff /* Initial FCS value */
1965 #define PPPGOODFCS 0xf0b8 /* Good final FCS value */
1966
1967
1968 /*
1969 * Calculate a new fcs given the current fcs and the new data.
1970 */
1971 unsigned short pppfcs(fcs, cp, len)
1972 register unsigned short fcs;
1973 register unsigned char *cp;
1974 register int len;
1975 {
1976 while (len--)
1977 fcs = (fcs &gt;&gt; 8) ^ fcstab[(fcs ^ *cp++) &amp; 0xff];
1978
1979 return (fcs);
1980 }
1981
1982 <span class="h3"><a class="selflink" id="appendix-B.2" href="#appendix-B.2">B.2</a>. Fast FCS table generator</span>
1983
1984 The following code creates the lookup table used to calculate the
1985 FCS.
1986
1987 /*
1988 * Generate a FCS table for the HDLC FCS.
1989 *
1990 * Drew D. Perkins at Carnegie Mellon University.
1991 *
1992 * Code liberally borrowed from Mohsen Banan and D. Hugh Redelmeier.
1993 */
1994
1995 /*
1996 * The HDLC polynomial: x**0 + x**5 + x**12 + x**16 (0x8408).
1997 */
1998 #define P 0x8408
1999
2000
2001 main()
2002 {
2003 register unsigned int b, v;
2004 register int i;
2005
2006 printf("static unsigned short fcstab[256] = {");
2007 for (b = 0; ; ) {
2008 if (b % 8 == 0)
2009
2010
2011
2012 <span class="grey">Perkins [Page 36]</span></pre>
2013 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
2014 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
2015
2016
2017 printf("0);
2018
2019 v = b;
2020 for (i = 8; i--; )
2021 v = v &amp; 1 ? (v &gt;&gt; 1) ^ P : v &gt;&gt; 1;
2022
2023 printf("0x%04x", v &amp; 0xFFFF);
2024
2025 if (++b == 256)
2026 break;
2027 printf(",");
2028 }
2029 printf("0;0);
2030 }
2031
2032
2033 References
2034
2035 [<a id="ref-1">1</a>] Electronic Industries Association, "Interface Between Data
2036 Terminal Equipment and Data Communications Equipment Employing
2037 Serial Binary Data Interchange", EIA Standard RS-232-C, August
2038 1969.
2039
2040 [<a id="ref-2">2</a>] International Organization For Standardization, "Data
2041 Communication - High-level Data Link Control Procedures - Frame
2042 Structure", ISO Standard 3309-1979, 1979.
2043
2044 [<a id="ref-3">3</a>] International Organization For Standardization, "Data
2045 Communication - High-level Data Link Control Procedures -
2046 Elements of Procedures", ISO Standard 4335-1979, 1979.
2047
2048 [<a id="ref-4">4</a>] International Organization For Standardization, "Data
2049 Communication - High-Level Data Link Control Procedures -
2050 Elements of Procedures - Addendum 1", ISO Standard 4335-
2051 1979/Addendum 1, 1979.
2052
2053 [<a id="ref-5">5</a>] International Organization For Standardization, "Information
2054 Processing Systems - Data Communication - High-level Data Link
2055 Control Procedures - Frame structure - Addendum 1: Start/stop
2056 Transmission", Proposed Draft International Standard ISO
2057 3309:1983/PDAD1, 1984.
2058
2059 [<a id="ref-6">6</a>] International Telecommunication Union, CCITT Recommendation X.25,
2060 "Interface Between Data Terminal Equipment (DTE) and Data Circuit
2061 Terminating Equipment (DCE) for Terminals Operating in the Packet
2062 Mode on Public Data Networks", CCITT Red Book, Volume VIII,
2063 Fascicle VIII.3, Rec. X.25., October 1984.
2064
2065
2066
2067
2068 <span class="grey">Perkins [Page 37]</span></pre>
2069 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
2070 <span class="grey"><a href="./rfc1134">RFC 1134</a> PPP November 1989</span>
2071
2072
2073 [<a id="ref-7">7</a>] Perez, "Byte-wise CRC Calculations", IEEE Micro, June 1983.
2074 Morse, G., "Calculating CRC's by Bits and Bytes", Byte, September
2075 1986.
2076
2077 [<a id="ref-8">8</a>] LeVan, J., "A Fast CRC", Byte, November 1987.
2078
2079 [<a id="ref-9">9</a>] American National Standards Institute, "American National
2080 Standard Code for Information Interchange", ANSI X3.4-1977, 1977.
2081
2082 [<a id="ref-10">10</a>] Postel, J., "Internet Protocol", <a href="./rfc791">RFC 791</a>, USC/Information
2083 Sciences Institute, September 1981.
2084
2085 [<a id="ref-11">11</a>] Reynolds, J.K., and J. Postel, "Assigned Numbers", <a href="./rfc1010">RFC 1010</a>,
2086 USC/Information Sciences Institute, May 1987.
2087
2088 [<a id="ref-12">12</a>] Postel, J., "The TCP Maximum Segment Size Option and Related
2089 Topics", <a href="./rfc879">RFC 879</a>, USC/Information Sciences Institute, November
2090 1983.
2091
2092 Security Considerations
2093
2094 Security issues are not addressed in this memo.
2095
2096 Author's Address
2097
2098 This proposal is the product of the Point-to-Point Protocol Working
2099 Group of the Internet Engineering Task Force (IETF). The working
2100 group can be contacted via the chair:
2101
2102 Russ Hobby
2103 UC Davis
2104 Computing Services
2105 Davis, CA 95616
2106
2107 Phone: (916) 752-0236
2108
2109 EMail: [email protected]
2110
2111 Acknowledgments
2112
2113 Many people spent significant time helping to develop the Point-to-
2114 Point Protocol. The complete list of people is too numerous to list,
2115 but the following people deserve special thanks: Ken Adelman (TGV),
2116 Craig Fox (NSC), Phill Gross (NRI), Russ Hobby (UC Davis), David
2117 Kaufman (Proteon), John LoVerso (Xylogics), Bill Melohn (Sun
2118 Microsystems), Mike Patton (MIT), Drew Perkins (CMU), Greg Satz
2119 (cisco systems) and Asher Waldfogel (Wellfleet).
2120
2121
2122
2123
2124 Perkins [Page 38]
2125 </pre>