Debian Codegraph @

rfc1853.html

raw
1 <pre>Network Working Group W. Simpson
2 Request for Comments: 1853 Daydreamer
3 Category: Informational October 1995
4
5
6 <span class="h1">IP in IP Tunneling</span>
7
8
9 Status of this Memo
10
11 This memo provides information for the Internet community. It does
12 not specify an Internet standard. Distribution of this memo is
13 unlimited.
14
15
16 IESG Note:
17
18 Note that this memo is an individual effort of the author. This
19 document reflects a current informal practice in the internet. There
20 is an effort underway within the IETF Mobile-IP Working Group to
21 provide an appropriate proposed standard to address this issue.
22
23
24 Abstract
25
26 This document discusses implementation techniques for using IP
27 Protocol/Payload number 4 Encapsulation for tunneling with IP
28 Security and other protocols.
29
30
31 Table of Contents
32
33 <a href="#section-1">1</a>. Introduction .......................................... <a href="#page-2">2</a>
34
35 <a href="#section-2">2</a>. Encapsulation ......................................... <a href="#page-3">3</a>
36
37 <a href="#section-3">3</a>. Tunnel Management ..................................... <a href="#page-5">5</a>
38 <a href="#section-3.1">3.1</a> Tunnel MTU Discovery ............................ <a href="#page-5">5</a>
39 <a href="#section-3.2">3.2</a> Congestion ...................................... <a href="#page-6">6</a>
40 <a href="#section-3.3">3.3</a> Routing Failures ................................ <a href="#page-6">6</a>
41 <a href="#section-3.4">3.4</a> Other ICMP Messages ............................. <a href="#page-6">6</a>
42
43 SECURITY CONSIDERATIONS ...................................... <a href="#page-7">7</a>
44 REFERENCES ................................................... <a href="#page-7">7</a>
45 ACKNOWLEDGEMENTS ............................................. <a href="#page-8">8</a>
46 AUTHOR'S ADDRESS ............................................. <a href="#page-8">8</a>
47
48
49
50
51
52 <span class="grey">Simpson Informational [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
55
56
57 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
58
59 The IP in IP encapsulation Protocol/Payload number 4 [<a href="./rfc1700">RFC-1700</a>] has
60 long been used to bridge portions of the Internet which have disjoint
61 capabilities or policies. This document describes implementation
62 techniques used for many years by the Amateur Packet Radio network
63 for joining a large mobile network, and also by early implementations
64 of IP Security protocols.
65
66 Use of IP in IP encapsulation differs from later tunneling techniques
67 (for example, protocol numbers 98 [<a href="./rfc1241">RFC-1241</a>], 94 [<a href="#ref-IDM91a" title="&quot;IP-based protocols for mobile internetworking&quot;">IDM91a</a>], 53
68 [<a href="#ref-swIPe" title="&quot;The Architecture and Implementation of Network-Layer Security Under Unix&quot;">swIPe</a>], and 47 [<a href="./rfc1701">RFC-1701</a>]) in that it does not insert its own
69 special glue header between IP headers. Instead, the original
70 unadorned IP Header is retained, and simply wrapped in another
71 standard IP header.
72
73 This information applies principally to encapsulation of IP version
74 4. Other IP versions will be described in separate documents.
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108 <span class="grey">Simpson Informational [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
111
112
113 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Encapsulation</span>
114
115 The encapsulation technique is fairly simple. An outer IP header is
116 added before the original IP header. Between them are any other
117 headers for the path, such as security headers specific to the tunnel
118 configuration.
119
120 The outer IP header Source and Destination identify the "endpoints"
121 of the tunnel. The inner IP header Source and Destination identify
122 the original sender and recipient of the datagram.
123
124 Each header chains to the next using IP Protocol values [<a href="./rfc1700">RFC-1700</a>].
125
126 +---------------------------+
127 | Outer IP Header |
128 +---------------------------+
129 | Tunnel Headers |
130 +---------------------------+ +---------------------------+
131 | IP Header | | Inner IP Header |
132 +---------------------------+ ====&gt; +---------------------------+
133 | | | |
134 | IP Payload | | IP Payload |
135 | | | |
136 +---------------------------+ +---------------------------+
137
138 The format of IP headers is described in [<a href="./rfc791">RFC-791</a>].
139
140 Type Of Service copied from the inner IP header. Optionally,
141 another TOS may be used between cooperating peers.
142
143 This is in keeping with the transparency principle
144 that if the user was expecting a given level of
145 service, then the tunnel should provide the same
146 service. However, some tunnels may be constructed
147 specifically to provide a different level of service
148 as a matter of policy.
149
150 Identification A new number is generated for each outer IP header.
151
152 The encapsulated datagram may have already been
153 fragmented, and another level of fragmentation may
154 occur due to the tunnel encapsulation. These tunnel
155 fragments will be reassembled by the decapsulator,
156 rather than the final destination.
157
158 Reserved
159 ignored (set to zero).
160
161
162
163
164 <span class="grey">Simpson Informational [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
167
168
169 This unofficial flag has seen experimental use, and
170 while it remains in the inner IP header, does not
171 affect the tunnel.
172
173 Don't Fragment copied from the inner IP header. This allows the
174 originator to control the level of performance
175 tradeoffs. See "Tunnel MTU Discovery".
176
177 More Fragments set as required when fragmenting.
178
179 The flag is not copied for the same reason that a
180 separate Identification is used.
181
182 Time To Live the default value specified in the most recent
183 "Assigned Numbers" [<a href="./rfc1700">RFC-1700</a>]. This ensures that
184 long unanticipated tunnels do not interrupt the flow
185 of datagrams between endpoints.
186
187 The inner TTL is decremented once before
188 encapsulation, and is not affected by decapsulation.
189
190 Protocol the next header; 4 for the inner IP header, when no
191 intervening tunnel headers are in use.
192
193 Source an IP address associated with the interface used to
194 send the datagram.
195
196 Destination an IP address of the tunnel decapsulator.
197
198 Options not copied from the inner IP header. However, new
199 options particular to the path MAY be added.
200
201 Timestamp, Loose Source Route, Strict Source Route,
202 and Record Route are deliberately hidden within the
203 tunnel. Often, tunnels are constructed to overcome
204 the inadequacies of these options.
205
206 Any supported flavors of security options of the
207 inner IP header MAY affect the choice of security
208 options for the tunnel. It is not expected that
209 there be a one-to-one mapping of such options to the
210 options or security headers selected for the tunnel.
211
212
213
214
215
216
217
218
219
220 <span class="grey">Simpson Informational [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
223
224
225 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Tunnel Management</span>
226
227 It is possible that one of the routers along the tunnel interior
228 might encounter an error while processing the datagram, causing it to
229 return an ICMP [<a href="./rfc792">RFC-792</a>] error message to the encapsulator at the IP
230 Source of the tunnel. Unfortunately, ICMP only requires IP routers
231 to return 8 bytes (64 bits) of the datagram beyond the IP header.
232 This is not enough to include the entire encapsulated header. Thus,
233 it is not generally possible for an encapsulating router to
234 immediately reflect an ICMP message from the interior of a tunnel
235 back to the originating host.
236
237 However, by carefully maintaining "soft state" about its tunnels, the
238 encapsulator can return accurate ICMP messages in most cases. The
239 router SHOULD maintain at least the following soft state information
240 about each tunnel:
241
242 - Reachability of the end of the tunnel.
243 - Congestion of the tunnel.
244 - MTU of the tunnel.
245
246 The router uses the ICMP messages it receives from the interior of a
247 tunnel to update the soft state information for that tunnel. When
248 subsequent datagrams arrive that would transit the tunnel, the router
249 checks the soft state for the tunnel. If the datagram would violate
250 the state of the tunnel (such as the MTU is greater than the tunnel
251 MTU when Don't Fragment is set), the router sends an appropriate ICMP
252 error message back to the originator, but also forwards the datagram
253 into the tunnel. Forwarding the datagram despite returning the error
254 message ensures that changes in tunnel state will be learned.
255
256 Using this technique, the ICMP error messages from encapsulating
257 routers will not always match one-to-one with errors encountered
258 within the tunnel, but they will accurately reflect the state of the
259 network.
260
261
262 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Tunnel MTU Discovery</span>
263
264 When the Don't Fragment bit is set by the originator and copied into
265 the outer IP header, the proper MTU of the tunnel will be learned
266 from ICMP (Type 3 Code 4) "Datagram Too Big" errors reported to the
267 encapsulator. To support originating hosts which use this
268 capability, all implementations MUST support Path MTU Discovery
269 [RFC-1191, <a href="./rfc1435">RFC-1435</a>] within their tunnels.
270
271
272
273
274
275
276 <span class="grey">Simpson Informational [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
279
280
281 As a benefit of Tunnel MTU Discovery, any fragmentation which occurs
282 because of the size of the encapsulation header is done only once
283 after encapsulation. This prevents more than one fragmentation of a
284 single datagram, which improves processing efficiency of the path
285 routers and tunnel decapsulator.
286
287
288 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Congestion</span>
289
290 Tunnel soft state will collect indications of congestion, such as an
291 ICMP (Type 4) Source Quench in datagrams from the decapsulator
292 (tunnel peer). When forwarding another datagram into the tunnel,
293 it is appropriate to send Source Quench messages to the originator.
294
295
296 <span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Routing Failures</span>
297
298 Because the TTL is reset each time that a datagram is encapsulated,
299 routing loops within a tunnel are particularly dangerous when they
300 arrive again at the encapsulator. If the IP Source matches any of
301 its interfaces, an implementation MUST NOT further encapsulate.
302 Instead, the datagram is forwarded normally.
303
304 ICMP (Type 11) Time Exceeded messages report routing loops within the
305 tunnel itself. ICMP (Type 3) Destination Unreachable messages report
306 delivery failures to the decapsulator. This soft state MUST be
307 reported to the originator as (Type 3 Code 0) Network Unreachable.
308
309
310 <span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Other ICMP Messages</span>
311
312 Most ICMP error messages are not relevant to the use of the tunnel.
313 In particular, parameter problems are likely to be a result of
314 misconfiguration of the encapsulator, and MUST NOT be reported to the
315 originator.
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332 <span class="grey">Simpson Informational [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
335
336
337 Security Considerations
338
339 Security issues are briefly discussed in this memo. The use of
340 tunneling may obviate some older IP security options (labelling), but
341 will better support newer IP Security headers.
342
343
344 References
345
346 [<a id="ref-IDM91a">IDM91a</a>] Ioannidis, J., Duchamp, D., Maguire, G., "IP-based
347 protocols for mobile internetworking", Proceedings of
348 SIGCOMM '91, ACM, September 1991.
349
350 [<a id="ref-RFC-791">RFC-791</a>]
351 Postel, J., "Internet Protocol", STD 5, <a href="./rfc791">RFC 791</a>,
352 USC/Information Sciences Institute, September 1981.
353
354 [<a id="ref-RFC-792">RFC-792</a>]
355 Postel, J., "Internet Control Message Protocol", STD 5,
356 <a href="./rfc792">RFC 792</a>, USC/Information Sciences Institute, September
357 1981.
358
359 [<a id="ref-RFC-1191">RFC-1191</a>]
360 Mogul, J., and S. Deering, "Path MTU Discovery", <a href="./rfc1191">RFC 1191</a>,
361 DECWRL, Stanford University, November 1990.
362
363 [<a id="ref-RFC-1241">RFC-1241</a>]
364 Mills, D., and R. Woodburn, "A Scheme for an Internet
365 Encapsulation Protocol: Version 1", UDEL, July 1991.
366
367 [<a id="ref-RFC-1435">RFC-1435</a>]
368 Knowles, S., "IESG Advice from Experience with Path MTU
369 Discovery", <a href="./rfc1435">RFC 1435</a>, FTP Software, March 1993.
370
371 [<a id="ref-RFC-1700">RFC-1700</a>]
372 Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, <a href="./rfc1700">RFC</a>
373 <a href="./rfc1700">1700</a>, USC/Information Sciences Institute, October 1994.
374
375 [<a id="ref-RFC-1701">RFC-1701</a>]
376 Hanks, S., Li, T., Farinacci, D., and P. Traina, "Generic
377 Routing Encapsulation (GRE)", <a href="./rfc1701">RFC 1701</a>, October 1994.
378
379 [<a id="ref-swIPe">swIPe</a>] Ioannidis, J., and Blaze, M., "The Architecture and
380 Implementation of Network-Layer Security Under Unix", Fourth
381 Usenix Security Symposium Proceedings, October 1993.
382
383
384
385
386
387
388 <span class="grey">Simpson Informational [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc1853">RFC 1853</a> IP Tunnelling October 1995</span>
391
392
393 Acknowledgements
394
395 These implementation details of IP Tunneling are derived in large
396 part from independent work in 1990 by Phil Karn and the TCP-Group
397 hams using KA9Q NOS.
398
399 Special thanks to John Ioannidis (then of Columbia University) for
400 inspiration and experimentation which began this most recent round of
401 IP Mobility and IP Security development. Some of this text was
402 derived from [<a href="#ref-IDM91a" title="&quot;IP-based protocols for mobile internetworking&quot;">IDM91a</a>] and [<a href="#ref-swIPe" title="&quot;The Architecture and Implementation of Network-Layer Security Under Unix&quot;">swIPe</a>].
403
404 The chaining of headers was also described in "Simple Internet
405 Protocol", by Steve Deering (Xerox PARC).
406
407 The overall organization and some of this text was derived from
408 [<a href="./rfc1241">RFC-1241</a>], by David Mills (U Delaware) and Robert Woodburn (SAIC).
409
410 Some of the text on tunnel soft state was derived from "IP Address
411 Encapsulation (IPAE)", by Robert E. Gilligan, Erik Nordmark, and Bob
412 Hinden (all of Sun Microsystems).
413
414
415 Author's Address
416
417 Questions about this memo can also be directed to:
418
419 William Allen Simpson
420 Daydreamer
421 Computer Systems Consulting Services
422 1384 Fontaine
423 Madison Heights, Michigan 48071
424
425 [email protected]
426 [email protected]
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444 Simpson Informational [Page 8]
445 </pre>