1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
Network Working Group C. Partridge
Request for Comments: 1809 BBN Systems and Technologies
Category: Informational June 1995
Using the Flow Label Field in IPv6
Status of this Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
Abstract
The purpose of this memo is to distill various opinions and
suggestions of the End-to-End Research Group regarding the handling
of Flow Labels into a set of suggestions for IPv6. This memo is for
information purposes only and is not one of the IPv6 specifications.
Distribution of this memo is unlimited.
Introduction
This memo originated as the report of a discussion at an End-to-End
Research Group meeting in November 1994. At that meeting the group
discussed several issues regarding how to manage flow identifiers in
IPv6. A report of the meeting was then circulated to the IPv6
community. Feedback from that community resulted in changes to this
memo and in changes to the IPv6 specification to fix some minor
problems the End-to-End Group had raised.
While many of the ideas in this memo have found their way into the
IPv6 specification, the explanation of why various design decisions
were made have not. This memo is intended to provide some additional
context for interested parties.
Brief Description of the Flow Label
The current draft of the IPv6 specification states that every IPv6
header contains a 24-bit Flow Label. (Originally the specification
called for a 28-bit Flow ID field, which included the flow label and
a 4-bit priority field. The priority field is now distinct, for
reasons discussed at the end of this memo).
Partridge Informational [Page 1]
^L
RFC 1809 June 1995
The Flow Label is a pseudo-random number between 1 and FFFFFF (hex)
that is unique when combined with the source address. The zero Flow
Label is reserved to say that no Flow Label is being used. The
specification requires that a source must not reuse a Flow Label
value until all state information for the previous use of the Flow
Label has been flushed from all routers in the internet.
The specification further requires that all datagrams with the same
(non-zero) Flow Label must have the same Destination Address, Hop-
by-Hop Options header, Routing Header and Source Address contents.
The notion is that by simply looking up the Flow Label in a table,
the router can decide how to route and forward the datagram without
examining the rest of the header.
Flow Label Issues
The IPv6 specification originally left open a number of questions, of
which these three were among the most important:
1. What should a router do if a datagram with a (non-zero)
Flow Label arrives and the router has no state for that
Flow Label?
2. How does an internet flush old Flow Labels?
3. Which datagrams should carry (non-zero) Flow Labels?
This memo summarizes the End-to-End Group's attempts to answer these
questions.
What Does a Router Do With Flow Labels for Which It Has No State?
If a datagram with a non-zero Flow Label arrives at a router and the
router discovers it has no state information for that Flow Label,
what is the correct thing for the router to do?
The IPv6 specification allows routers to ignore Flow Labels and also
allows for the possibility that IPv6 datagrams may carry flow setup
information in their options. Unknown Flow Labels may also occur if
a router crashes and loses its state. During a recovery period, the
router will receive datagrams with Flow Labels it does not know, but
this is arguably not an error, but rather a part of the recovery
period. Finally, if the controversial suggestion that each TCP
connection be assigned a separate Flow Label is adopted, it may be
necessary to manage Flow Labels using an LRU cache (to avoid Flow
Label cache overflow in routers), in which case an active but
infrequently used flow's state may have been intentionally discarded.
Partridge Informational [Page 2]
^L
RFC 1809 June 1995
In any case, it is clear that treating this situation as an error
and, say dropping the datagram and sending an ICMP message, is
inappropriate. Indeed, it seems likely that in most cases, simply
forwarding the datagram as one would a datagram with a zero Flow
Label would give better service to the flow than dropping the
datagram.
Of course, there will be situations in which routing the datagram as
if its Flow Label were zero will cause the wrong result. An example
is a router which has two paths to the datagram's destination, one
via a high-bandwidth satellite link and the other via a low-bandwidth
terrestrial link. A high bandwidth flow obviously should be routed
via the high-bandwidth link, but if the router loses the flow state,
the router may route the traffic via the low-bandwidth link, with the
potential for the flow's traffic to swamp the low-bandwidth link. It
seems likely, however, these situations will be exceptions rather
than the rule. So it seems reasonable to handle these situations
using options that indicate that if the flow state is absent, the
datagram needs special handling. (The options may be Hop-by-Hop or
only handled at some routers, depending on the flow's needs).
It would clearly be desirable to have some method for signalling to
end systems that the flow state has been lost and needs to be
refreshed. One possibility is to add a state-lost bit to the Flow
Label field, however there is sensitivity to eating into the precious
24-bits of the field. Other possibilities include adding options to
the datagram to indicate its Flow Label was unknown or sending an
ICMP message back to the flow source.
In summary, the view is that the default rule should be that if a
router receives a datagram with an unknown Flow Label, it treats the
datagram as if the Flow Label is zero. As part of forwarding, the
router will examine any hop-by-hop options and learn if the the
datagram requires special handling. The options could include simply
the information that the datagram is to be dropped if the Flow Label
is unknown or could contain the flow state the router should have.
There is clearly room here for experimentation with option design.
Flushing Old Flow Labels
The flow mechanism assumes that state associated with a given Flow
Label is somehow deposited in routers, so they know how to handle
datagrams that carry the Flow Label. A serious problem is how to
flush Flow Labels that are no longer being used (stale Flow Labels)
from the routers.
Stale Flow Labels can happen a number of ways, even if we assume that
the source always sends a message deleting a Flow Label when the
Partridge Informational [Page 3]
^L
RFC 1809 June 1995
source finishes using a Flow. An internet may have partioned since
the flow was created. Or the deletion message may be lost before
reaching all routers. Furthermore, the source may crash before it
can send out a Flow Label deletion message. The point here is that
we cannot expect the source (or, for the same reasons, a third party)
always to clear out stale Flow Labels. Rather, routers will have to
find some mechanism to flush Flow Labels themselves.
The obvious mechanism is to use a timer. Routers should discard Flow
Labels whose state has not been refreshed within some period of time.
At the same time, a source that crashes must observe a quiet time,
during which it creates no flows, until it knows that all Flow Labels
from its previous life must have expired. (Sources can avoid quiet
time restrictions by keeping information about active Flow Labels in
stable storage that survives crashes). This is precisely how TCP
initial sequence numbers are managed and it seems the same mechanism
should work well for Flow Labels.
Exactly how the Flow Label and its state should be refreshed needs
some study. There are two obvious options. The source could
periodically send out a special refresh message (such as an RSVP Path
message) to explicitly refresh the Flow Label and its state. Or, the
router could treat every datagram that carries the Flow Label as an
implicit refresh or sources could send explicit refresh options. The
choice is between periodically handling a special update message and
doing an extra computation on each datagram (namely noting in the
Flow Label's entry that the Flow Label has been refreshed).
Which Datagrams Should Carry (Non-Zero) Flow Labels?
Interestingly, this is the problem on which the least progress has
been made.
There were some points of basic agreement. Small exchanges of data
should have a zero Flow Label, because it is not worth creating a
flow for a few datagrams. Real-time flows must obviously always have
a Flow Label, since flows are a primary reason Flow Labels were
created. The issue is what to do with peers sending large amounts of
best effort traffic (e.g., TCP connections). Some people want all
long-term TCP connections to use Flow Labels, others do not.
The argument in favor of using Flow Labels on individual TCP
connections is that even if the source does not request special
service, a network provider's routers may be able to recognize a
large amount of traffic and use the Flow Label field to establish a
special route that gives the TCP connection better service (e.g.,
lower delay or bigger bandwidth). Another argument is to assist in
efficient demux at the receiver (i.e., IP and TCP demuxing could be
Partridge Informational [Page 4]
^L
RFC 1809 June 1995
done once).
An argument against using Flow Labels in individual TCP connections
is that it changes how we handling route caches in routers.
Currently one can cache a route for a destination host, regardless of
how many different sources are sending to that destination host.
I.e., if five sources each have two TCP connections sending data to a
server, one cache entry containing the route to the server handles
all ten TCPs' traffic. Putting Flow Labels in each datagram changes
the cache into a Flow Label cache, in which there is a cache entry
for every TCP connection. So there's a potential for cache
explosion. There are ways to alleviate this problem, such as
managing the Flow Label cache as an LRU cache, in which infrequently
used Flow Labels get discarded (and then recovered later). It is not
clear, however, whether this will cause cache thrashing.
Observe that there is no easy compromise between these positions.
One cannot, for instance, let the application decide whether to use a
Flow Label. Those who want different Flow Labels for every TCP
connection assume that they may optimize a route without the
application's knowledge. And forcing all applications to use Flow
Labels will force routing vendors to deal with the cache explosion
issue, even if we later discover that we don't want to optimize
individual TCP connections.
Note about the Priority Field
The original IPv6 specification combined the Priority and Flow Label
fields and allowed flows to redefine the means of different values of
the Priority field. During its discussions, the End-to-End group
realized this meant that if a router forwarded a datagram with an
unknown Flow Label it had to ignore the Priority field, because the
priority values might have been redefined. (For instance, the
priorities might have been inverted). The IPv6 community concluded
this behavior was undesirable. Indeed, it seems likely that when the
Flow Label are unknown, the router will be able to give much better
service if it use the Priority field to make a more informed routing
decision. So the Priority field is now a distinct field, unaffected
by the Flow Label.
Acknowledgements
I would like to acknowledge the assistance of the members of the
End-To-End Research Group, chaired by Bob Braden, whose discussions
produced this memo. I would also like to particularly thank Deborah
Estrin for her help in putting this memo together. Also thanks to
Richard Fox, Noel Chiappa, and Tony Li for insightful comments on the
draft.
Partridge Informational [Page 5]
^L
RFC 1809 June 1995
Security Considerations
Security issues are not discussed in this memo.
Author's Address
Craig Partridge
BBN Systems and Technologies
10 Moulton St.
Cambridge, MA 02138
EMail: craig@aland.bbn.com
Partridge Informational [Page 6]
^L
|