-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-ietf-ice-dualstack-fairness.xml
562 lines (537 loc) · 23.4 KB
/
draft-ietf-ice-dualstack-fairness.xml
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="bcp" docName="draft-ietf-ice-dualstack-fairness-latest"
ipr="trust200902">
<front>
<title abbrev="ICE Multihomed and DualStack Guidelines">ICE
Multihomed and IPv4/IPv6 Dual Stack Guidelines</title>
<author fullname="Paal-Erik Martinsen" initials="P.E" surname="Martinsen">
<organization abbrev="Cisco">Cisco Systems, Inc.</organization>
<address>
<postal>
<street>Philip Pedersens Vei 22</street>
<city>Lysaker</city>
<region>Akershus</region>
<code>1325</code>
<country>Norway</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author fullname="Tirumaleswar Reddy" initials="T." surname="Reddy">
<organization abbrev="Cisco">Cisco Systems, Inc.</organization>
<address>
<postal>
<street>Cessna Business Park, Varthur Hobli</street>
<street>Sarjapur Marathalli Outer Ring Road</street>
<city>Bangalore</city>
<region>Karnataka</region>
<code>560103</code>
<country>India</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author fullname="Prashanth Patil" initials="P." surname="Patil">
<organization abbrev="Cisco">Cisco Systems, Inc.</organization>
<address>
<postal>
<street/>
<city>Bangalore</city>
<country>India</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date/>
<workgroup>ICE</workgroup>
<abstract>
<t>
This document provides guidelines on how to make Interactive
Connectivity Establishment (ICE) conclude faster in multihomed
and IPv4/IPv6 dual-stack scenarios where broken paths
exist. The provided guidelines are backwards compatible with
the original ICE specification.
</t>
</abstract>
</front>
<middle>
<section anchor="introduction" title="Introduction">
<t>
In multihomed and IPv4/IPv6 dual-stack environments ICE <xref
target="I-D.ietf-ice-rfc5245bis"/> would benefit by a fair
distribution of its connectivity checks across available
interfaces or IP address types. With a fair distribution of
the connectivity checks, excessive delays are avoided if a
particular network path is broken or slow. It would arguably
be better to put the interfaces or address types known to the
application last in the checklist. However, the main
motivation by ICE is to make no assumptions regarding network
topology, hence a fair distribution of the connectivity checks
is more appropriate. If an application operates in a
well-known environment is can safely override the
recommendation given in this document.
</t>
<t>
Applications should take special care to deprioritize network
interfaces known to provide unreliable connectivity when
operating in a multihomed environment. For example, certain
tunnel services might provide unreliable connectivity. Doing
so will ensure a more fair distribution of the connectivity
checks across available network interfaces on the device. The
simple guidelines presented here describe how to deprioritize
interfaces known by the application to provide unreliable
connectivity.
</t>
<t>
There is also a need to introduce better handling of
connectivity checks for different IP address families in
dual-stack IPv4/IPv6 ICE scenarios. Following the
recommendations from RFC6724 <xref target="RFC6724"/> will
lead to prioritization of IPv6 over IPv4 for the same
candidate type. Due to this, connectivity checks for
candidates of the same type (host, reflexive or relay) are
sent such that an IP address family is completely depleted
before checks from the other address family are started. This
results in user noticeable setup delays if the path for the
prioritized address family is broken.
</t>
<t>
To avoid user noticeable delays when either IPv6 or IPv4 path
is broken or excessively slow, this specification encourages
intermingling the different address families when connectivity
checks are performed. This will lead to more sustained
dual-stack IPv4/IPv6 deployment as users will no longer have
an incentive to disable IPv6. The cost is a small penalty to
the address type that otherwise would have been
prioritized. Further this document recommends to keep track of
previous known connectivity problem and assign a lower
priority to those addresses. Specific mechanisms and rules for
tracking connectivity issues are out of scope for this
document.
</t>
<t>
This document describes what parameters an agent can safely
alter to fairly order the checklist candidate pairs in
multihomed and dual-stack environments, thus affecting the
sending order of the connectivity checks. Actual values of
those parameters is an implementation detail. Dependant on the
nomination method in use, this might have an effect on what
candidate pair ends up as the active one. Ultimately it should
be up to the agent to decide what candidate pair is best
suited for transporting media.
</t>
<t>
The guidelines outlined in this specification are backward
compatible with a standard ICE implementation. This
specification only alters the values used to create the
resulting checklists in such a way that the core mechanisms
from ICE <xref target="RFC5245"/> and ICEbis <xref
target="I-D.ietf-ice-rfc5245bis" /> are still in effect.
</t>
</section>
<section anchor="notation" title="Notational Conventions">
<t>
This document uses terminology defined in <xref
target="I-D.ietf-ice-rfc5245bis"/>.
</t>
</section>
<section anchor="multihomed"
title="ICE Multihomed Recomendations">
<t>
A multihomed ICE agent can potentially send and receive
connectivity checks on all available interfaces and IP
addresses. It is possible for an interface to have several IP
addresses associated with it. To avoid unnecessary delay when
performing connectivity checks it would be beneficial to
prioritize interfaces and IP addresses known by the agent to
provide stable connectivity.
</t>
<t>
The application knowledge regarding the reliability of an
interface can also be based on simple metrics like previous
connection success/failure rates or a more static model based
on interface types like wired, wireless, cellular, virtual,
tunneled in conjunction with other operational metrics. This
would require the application to have the right permissions to
obtain such operational metrics.
</t>
<t>
Candidates from an interface known to the application to
provide unreliable connectivity should get a low candidate
priority. When to consider connectivity as unreliable is
implementation specific. Usage of ICE is not limited to VoIP
applications. What an application sees as unreliability might
be determined by a mix of how long lived the connection is,
how often setup is required and others, for now unknown,
requirements. This is purely an optimization to speed up the
ICE connectivity check phase.
</t>
<t>
If the application is unable to get any interface information
regarding type or unable to store any relevant metrics, it
should treat all interfaces as if they have reliable
connectivity. This ensures all interfaces gets their fair
chance to perform their connectivity checks.
</t>
</section>
<section title="ICE Dual Stack Recomendations">
<t>
Candidates should be prioritized such that a sequence of
candidates belonging to the same address family will be
intermingled with candidates from an alternate IP family. For
example, promoting IPv4 candidates in the presence of many
IPv6 candidates such that an IPv4 address candidate is always
present after a small sequence of IPv6 candidates, i.e.,
reordering candidates such that both IPv6 and IPv4 candidates
get a fair chance during the connectivity check phase. This
makes ICE connectivity checks more responsive to broken path
failures of an address family.
</t>
<t>
An ICE agent can choose an algorithm or a technique of its
choice to ensure that the resulting check lists have a fair
intermingled mix of IPv4 and IPv6 address families. However,
modifying the check list directly can lead to uncoordinated
local and remote check lists that result in ICE taking longer
to complete or in the worst case scenario fail. The best
approach is to set the appropriate value for local preference
in the formula for calculating the candidate priority value
described in ICE <xref target="I-D.ietf-ice-rfc5245bis"/>
section "4.1.2.1 Recommended Formula".
</t>
<t>
Implementations should prioritize IPv6 candidates by putting
some of them first in the intermingled checklist. This
increases the chance of IPv6 connectivity checks to complete
first and be ready for nomination or usage. This enables
implementations to follow the intent of <xref
target="RFC6555"/> "Happy Eyeballs: Success with Dual-Stack
Hosts". It is worth noting that the timing recommendations in
<xref target="RFC6555"/> will be overruled by how ICE paces
out its connectivity checks.
</t>
<t>
A simple formula to calculate how many IPv6 addresses to put
before any IPv4 addresses could look like:
<figure>
<artwork align="left"><![CDATA[
Hi = (N_4 + N_6) / N_4
Where Hi = Head start before intermingling starts
N_4 = Number of IPv4 addresses
N_6 = Number of IPv6 addresses
]]></artwork>
</figure>
If a host have 2 IPv4 addresses and 6 IPv6 addresses, it will
insert an IP4 address after 4 IPv6 addresses by choosing the
appropriate local preference values when calculating the pair
priorities.
</t>
</section>
<section anchor="compability" title="Compatibility">
<t>
ICE <xref target="I-D.ietf-ice-rfc5245bis"/> section "4.1.2
Prioritizing Candidates" states that the formula in section
"4.1.2.1 Recommended Formula" should be used to calculate the
candidate priority. The formula is as follows:
</t>
<t><figure>
<artwork align="left"><![CDATA[ priority = (2^24)*(type
preference) + (2^8)*(local preference) + (2^0)*(256 -
component ID) ]]></artwork>
</figure>
</t>
<t>
ICE <xref target="I-D.ietf-ice-rfc5245bis"/> section "4.1.2.2
Guidelines for Choosing Type and Local Preferences" has
guidelines for how the type preference and local preference
value should be chosen. Instead of having a static local
preference value for IPv4 and IPv6 addresses, it is possible
to choose this value dynamically in such a way that IPv4 and
IPv6 address candidate priorities end up intermingled within
the same candidate type. It is also possible to assign lower
priorities to IP addresses derived from unreliable interfaces
using the local preference value.
</t>
<t>
It is worth mentioning that <xref
target="I-D.ietf-ice-rfc5245bis"/> section "4.1.2.1
Recommended Formula" says that; "if there are multiple
candidates for a particular component for a particular media
stream that has the same type, the local preference MUST be
unique for each one".
</t>
<t>
The local type preference can be dynamically changed in such a
way that IPv4 and IPv6 address candidates end up intermingled
regardless of candidate type. This is useful if there are a
lot of IPv6 host candidates effectively blocking connectivity
checks for IPv4 server reflexive candidates.
</t>
<t>
Candidates with IP addresses from an unreliable interface
should be ordered at the end of the checklist, i.e., not
intermingled as the dual-stack candidates.
</t>
<t>
The list below shows a sorted local candidate list where the
priority is calculated in such a way that the IPv4 and IPv6
candidates are intermingled (No multihomed candidates). To
allow for earlier connectivity checks for the IPv4 server
reflexive candidates, some of the IPv6 host candidates are
demoted. This is just an example of how a candidate priorities
can be calculated to provide better fairness between IPv4 and
IPv6 candidates without breaking any of the ICE connectivity
checks.
</t>
<t><figure>
<artwork align="left"><![CDATA[
Candidate Address Component
Type Type ID Priority
-------------------------------------------
(1) HOST IPv6 (1) 2129289471
(2) HOST IPv6 (2) 2129289470
(3) HOST IPv4 (1) 2129033471
(4) HOST IPv4 (2) 2129033470
(5) HOST IPv6 (1) 2128777471
(6) HOST IPv6 (2) 2128777470
(7) HOST IPv4 (1) 2128521471
(8) HOST IPv4 (2) 2128521470
(9) HOST IPv6 (1) 2127753471
(10) HOST IPv6 (2) 2127753470
(11) SRFLX IPv6 (1) 1693081855
(12) SRFLX IPv6 (2) 1693081854
(13) SRFLX IPv4 (1) 1692825855
(14) SRFLX IPv4 (2) 1692825854
(15) HOST IPv6 (1) 1692057855
(16) HOST IPv6 (2) 1692057854
(17) RELAY IPv6 (1) 15360255
(18) RELAY IPv6 (2) 15360254
(19) RELAY IPv4 (1) 15104255
(20) RELAY IPv4 (2) 15104254
SRFLX = server reflexive
]]></artwork>
</figure>
</t>
<t>
Note that the list does not alter the component ID part of the
formula. This keeps the different components (RTP and RTCP)
close in the list. What matters is the ordering of the
candidates with component ID 1. Once the checklist is formed
for a media stream the candidate pair with component ID 1 will
be tested first. If ICE connectivity check is successful then
other candidate pairs with the same foundation will be
unfrozen (<xref target="I-D.ietf-ice-rfc5245bis"/> section
5.1.3.4. Computing States).
</t>
<t>
The local and remote agent can have different algorithms for
choosing the local preference and type preference values
without impacting the synchronization between the local and
remote check lists.
</t>
<t>
The check list is made up of candidate pairs. A candidate pair
is two candidates paired up and given a candidate pair
priority as described in <xref
target="I-D.ietf-ice-rfc5245bis"/> section 5.1.3.2. Using the
pair priority formula:
</t>
<t>
<figure>
<artwork align="left"><![CDATA[
pair priority = 2^32*MIN(G,D) + 2*MAX(G,D) + (G>D?1:0)
]]></artwork>
</figure>
</t>
<t>
Where G is the candidate priority provided by the controlling
agent and D the candidate priority provided by the controlled
agent. This ensures that the local and remote check lists are
coordinated.
</t>
<t>
Even if the two agents have different algorithms for choosing
the candidate priority value to get an intermingled set of
IPv4 and IPv6 candidates, the resulting checklist, that is a
list sorted by the pair priority value, will be identical on
the two agents.
</t>
<t>
The agent that has promoted IPv4 cautiously i.e. lower IPv4
candidate priority values compared to the other agent, will
influence the check list the most due to (2^32*MIN(G,D)) in
the formula.
</t>
<t>
These recommendations are backward compatible with a standard
ICE implementation. The resulting local and remote checklist
will still be synchronized.
</t>
<t>
Dependant of the nomination method in use the procedures
described in this document might change what candidate pair
ends up as the active one.
</t>
<t>
A test implementation of an example algorithm is available at
<xref target="ICE_dualstack_imp"/>.
</t>
</section>
<section title="IANA Considerations">
<t>
None.
</t>
</section>
<section title="Implementation Status">
<t>
[Note to RFC Editor: Please remove this section and reference to
<xref target="RFC6982"></xref> prior to publication.]
</t>
<t>
This section records the status of known implementations of
the protocol defined by this specification at the time of
posting of this Internet-Draft, and is based on a proposal
described in <xref target="RFC6982"></xref>. The description
of implementations in this section is intended to assist the
IETF in its decision processes in progressing drafts to
RFCs. Please note that the listing of any individual
implementation here does not imply endorsement by the IETF.
Furthermore, no effort has been spent to verify the
information presented here that was supplied by IETF
contributors. This is not intended as, and must not be
construed to be, a catalog of available implementations or
their features. Readers are advised to note that other
implementations may exist.
</t>
<t>
According to <xref target="RFC6982"></xref>, "this will allow
reviewers and working groups to assign due consideration to
documents that have the benefit of running code, which may
serve as evidence of valuable experimentation and feedback
that have made the implemented protocols more mature. It is up
to the individual working groups to use this information as
they see fit".
</t>
<section title="ICE-Dual Stack Fairness Test code">
<t>
<list style="hanging">
<t hangText="Organization: ">Cisco
</t>
<t hangText="Description: ">
Open-Source ICE, TURN and STUN implementation.
</t>
<t hangText="Implementation: ">
https://github.com/palerikm/ICE-DualStackFairness
</t>
<t hangText="Level of maturity: ">
Code is stable.
</t>
<t hangText="Coverage: ">
Follows the recommendations in this document
</t>
<t hangText="Licensing: ">
BSD
</t>
<t hangText="Implementation experience: ">
Straightforward as there are no compatibility issues.
</t>
<t hangText="Contact: ">
Paal-Erik Martinsen
</t>
</list>
</t>
</section>
<section title="ICE-Dual Stack Fairness Test code">
<t>
<list style="hanging">
<t hangText="Organization: ">Others
</t>
<t hangText="Description: ">
Major ICE implementations, browser based and stand-alone
ICE, TURN and STUN implementations.
</t>
<t hangText="Implementation: ">
Product specific.
</t>
<t hangText="Level of maturity: ">
Code is stable and available in the wild.
</t>
<t hangText="Coverage: ">
Implements the recommendations in this document.
</t>
<t hangText="Licensing: ">
Some open source, some close source
</t>
<t hangText="Implementation experience: ">
Already implemented in some of the implementations. This
document describes what needs to be done to achieve the
desired fairness.
</t>
</list>
</t>
</section>
</section>
<section anchor="security" title="Security Considerations">
<t>
The security considerations described in <xref
target="I-D.ietf-ice-rfc5245bis"/> are still valid. It changes
recommended values and describes how an agent could choose
those values in a safe way. In section <xref
target="multihomed"/> the agent can prioritize the network
interface based on previous network knowledge. This can
potentially be unwanted information leakage towards the remote
agent.
</t>
</section>
<section anchor="ack" title="Acknowledgements">
<t>
Authors would like to thank Dan Wing, Ari Keranen, Bernard
Aboba, Martin Thomson, Jonathan Lennox, Balint Menyhart, Ole
Troan, Simon Perreault, Ben Cambell and Mirja Kühlewind for
their comments and review.
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include="reference.I-D.ietf-ice-rfc5245bis"?>
<?rfc include="reference.RFC.5245"?>
<?rfc include="reference.RFC.6555"?>
<?Rfc include="reference.RFC.6724"?>
<?rfc include="reference.RFC.6982"?>
</references>
<references title="Informative References">
<reference anchor="ICE_dualstack_imp" target="https://github.com/palerikm/ICE-DualStackFairness">
<front>
<title>ICE DualStack Test Implementation github repo</title>
<author fullname="Paal-Erik Martinsen" initials="P.E" surname="Martinsen">
<organization abbrev="Cisco">Cisco Systems, Inc.</organization>
<address>
<postal>
<street>Philip Pedersens Vei 22</street>
<city>Lysaker</city>
<region>Akershus</region>
<code>1325</code>
<country>Norway</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date/>
</front>
</reference>
</references>
</back>
</rfc>