idnits 2.17.1 draft-ietf-mmusic-ice-sip-sdp-29.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 3 instances of too long lines in the document, the longest one being 12 characters in excess of 72. == There are 3 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. == There are 1 instance of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? -- The draft header indicates that this document obsoletes RFC5245, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: 2. The transport address from the peer for the default destination correspond to IP address values "0.0.0.0"/"::" and port value of "9". This MUST not be considered as a ICE failure by the peer agent and the ICE processing MUST continue as usual. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: 4. The transport address from the peer for the default destination is an FQDN. Regardless of the procedures used to resolve FQDN or the resolution result, this MUST not be considered as a ICE failure by the peer agent and the ICE processing MUST continue as usual. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: : is taken from RFC 4566 [RFC4566]. It is the IP address of the candidate, allowing for IPv4 addresses, IPv6 addresses, and fully qualified domain names (FQDNs). When parsing this field, an agent can differentiate an IPv4 address and an IPv6 address by presence of a colon in its value - the presence of a colon indicates IPv6. An agent generating local candidates MUST not use FQDN addresses. An agent processing remote candidates MUST ignore candidate lines that include candidates with FQDN or IP address versions that are not supported or recognized. The procedures for generation and handling of FQDN candidates, as well as, how agents indicate support for such procedures, need to be specified in an extension specification. == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (May 29, 2019) is 1793 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 1658 -- Looks like a reference, but probably isn't: '2' on line 1660 -- Looks like a reference, but probably isn't: '3' on line 1662 -- Looks like a reference, but probably isn't: '4' on line 1664 -- Looks like a reference, but probably isn't: '5' on line 1666 -- Looks like a reference, but probably isn't: '6' on line 1668 -- Looks like a reference, but probably isn't: '7' on line 1670 -- Looks like a reference, but probably isn't: '8' on line 1672 -- Looks like a reference, but probably isn't: '9' on line 1866 -- Looks like a reference, but probably isn't: '10' on line 1872 -- Looks like a reference, but probably isn't: '11' on line 1876 ** Obsolete normative reference: RFC 4091 (Obsoleted by RFC 5245) ** Obsolete normative reference: RFC 4092 (Obsoleted by RFC 5245) ** Obsolete normative reference: RFC 4566 (Obsoleted by RFC 8866) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 6336 (Obsoleted by RFC 8839) -- Obsolete informational reference (is this intentional?): RFC 5245 (Obsoleted by RFC 8445, RFC 8839) Summary: 6 errors (**), 0 flaws (~~), 7 warnings (==), 15 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 MMUSIC M. Petit-Huguenin 3 Internet-Draft Impedance Mismatch 4 Obsoletes: 5245 (if approved) S. Nandakumar 5 Intended status: Standards Track Cisco Systems 6 Expires: November 30, 2019 A. Keranen 7 Ericsson 8 May 29, 2019 10 Session Description Protocol (SDP) Offer/Answer procedures for 11 Interactive Connectivity Establishment (ICE) 12 draft-ietf-mmusic-ice-sip-sdp-29 14 Abstract 16 This document describes Session Description Protocol (SDP) Offer/ 17 Answer procedures for carrying out Interactive Connectivity 18 Establishment (ICE) between the agents. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on November 30, 2019. 37 Copyright Notice 39 Copyright (c) 2019 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 This document may contain material from IETF Documents or IETF 53 Contributions published or made publicly available before November 54 10, 2008. The person(s) controlling the copyright in some of this 55 material may not have granted the IETF Trust the right to allow 56 modifications of such material outside the IETF Standards Process. 57 Without obtaining an adequate license from the person(s) controlling 58 the copyright in such materials, this document may not be modified 59 outside the IETF Standards Process, and derivative works of it may 60 not be created outside the IETF Standards Process, except to format 61 it for publication as an RFC or to translate it into languages other 62 than English. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 67 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 68 3. SDP Offer/Answer Procedures . . . . . . . . . . . . . . . . . 4 69 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 4 70 3.2. Generic Procedures . . . . . . . . . . . . . . . . . . . 4 71 3.2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . 4 72 3.2.2. RTP/RTCP Considerations . . . . . . . . . . . . . . . 6 73 3.2.3. Determining Role . . . . . . . . . . . . . . . . . . 6 74 3.2.4. STUN Considerations . . . . . . . . . . . . . . . . . 6 75 3.2.5. Verifying ICE Support Procedures . . . . . . . . . . 6 76 3.2.6. SDP Example . . . . . . . . . . . . . . . . . . . . . 7 77 3.3. Initial Offer/Answer Exchange . . . . . . . . . . . . . . 8 78 3.3.1. Sending the Initial Offer . . . . . . . . . . . . . . 8 79 3.3.2. Sending the Initial Answer . . . . . . . . . . . . . 8 80 3.3.3. Receiving the Initial Answer . . . . . . . . . . . . 9 81 3.3.4. Concluding ICE . . . . . . . . . . . . . . . . . . . 10 82 3.4. Subsequent Offer/Answer Exchanges . . . . . . . . . . . . 10 83 3.4.1. Sending Subsequent Offer . . . . . . . . . . . . . . 10 84 3.4.2. Sending Subsequent Answer . . . . . . . . . . . . . . 13 85 3.4.3. Receiving Answer for a Subsequent Offer . . . . . . . 15 86 4. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 87 4.1. "candidate" Attribute . . . . . . . . . . . . . . . . . . 16 88 4.2. "remote-candidates" Attribute . . . . . . . . . . . . . . 19 89 4.3. "ice-lite" and "ice-mismatch" Attributes . . . . . . . . 19 90 4.4. "ice-ufrag" and "ice-pwd" Attributes . . . . . . . . . . 20 91 4.5. "ice-pacing" Attribute . . . . . . . . . . . . . . . . . 20 92 4.6. "ice-options" Attribute . . . . . . . . . . . . . . . . . 21 93 5. Keepalives . . . . . . . . . . . . . . . . . . . . . . . . . 22 94 6. SIP Considerations . . . . . . . . . . . . . . . . . . . . . 22 95 6.1. Latency Guidelines . . . . . . . . . . . . . . . . . . . 22 96 6.1.1. Offer in INVITE . . . . . . . . . . . . . . . . . . . 23 97 6.1.2. Offer in Response . . . . . . . . . . . . . . . . . . 24 98 6.2. SIP Option Tags and Media Feature Tags . . . . . . . . . 24 99 6.3. Interactions with Forking . . . . . . . . . . . . . . . . 24 100 6.4. Interactions with Preconditions . . . . . . . . . . . . . 25 101 6.5. Interactions with Third Party Call Control . . . . . . . 25 102 7. Relationship with ANAT . . . . . . . . . . . . . . . . . . . 25 103 8. Security Considerations . . . . . . . . . . . . . . . . . . . 26 104 8.1. Attacks on the Offer/Answer Exchanges . . . . . . . . . . 26 105 8.2. Insider Attacks . . . . . . . . . . . . . . . . . . . . . 26 106 8.2.1. The Voice Hammer Attack . . . . . . . . . . . . . . . 26 107 8.2.2. Interactions with Application Layer Gateways and SIP 27 108 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 109 9.1. SDP Attributes . . . . . . . . . . . . . . . . . . . . . 28 110 9.1.1. candidate Attribute . . . . . . . . . . . . . . . . . 28 111 9.1.2. remote-candidates Attribute . . . . . . . . . . . . . 29 112 9.1.3. ice-lite Attribute . . . . . . . . . . . . . . . . . 29 113 9.1.4. ice-mismatch Attribute . . . . . . . . . . . . . . . 30 114 9.1.5. ice-pwd Attribute . . . . . . . . . . . . . . . . . . 30 115 9.1.6. ice-ufrag Attribute . . . . . . . . . . . . . . . . . 31 116 9.1.7. ice-options Attribute . . . . . . . . . . . . . . . . 31 117 9.1.8. ice-pacing Attribute . . . . . . . . . . . . . . . . 32 118 9.2. Interactive Connectivity Establishment (ICE) Options 119 Registry . . . . . . . . . . . . . . . . . . . . . . . . 32 120 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 33 121 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 122 11.1. Normative References . . . . . . . . . . . . . . . . . . 33 123 11.2. Informative References . . . . . . . . . . . . . . . . . 35 124 11.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 36 125 Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 36 126 Appendix B. The remote-candidates Attribute . . . . . . . . . . 38 127 Appendix C. Why Is the Conflict Resolution Mechanism Needed? . . 39 128 Appendix D. Why Send an Updated Offer? . . . . . . . . . . . . . 40 129 Appendix E. Contributors . . . . . . . . . . . . . . . . . . . . 41 130 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 41 132 1. Introduction 134 This document describes how Interactive Connectivity Establishment 135 (ICE) is used with Session Description Protocol (SDP) offer/answer 136 [RFC3264]. The ICE specification [RFC8445] describes procedures that 137 are common to all usages of ICE and this document gives the 138 additional details needed to use ICE with SDP offer/answer. 140 2. Terminology 142 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 143 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 144 "OPTIONAL" in this document are to be interpreted as described in RFC 145 2119 [RFC2119]. 147 Readers should be familiar with the terminology defined in [RFC3264], 148 in [RFC8445] and the following: 150 Default Destination/Candidate: The default destination for a 151 component of a data stream is the transport address that would be 152 used by an agent that is not ICE aware. A default candidate for a 153 component is one whose transport address matches the default 154 destination for that component. For the RTP component, the 155 default connection address is in the "c=" line of the SDP, and the 156 port and transport protocol are in the "m=" line. For the RTCP 157 component, the address and port are indicated using the "a=rtcp" 158 attribute defined in [RFC3605], if present; otherwise, the RTCP 159 component address is same as the address of the RTP component, and 160 its port is one greater than the port of the RTP component. 162 3. SDP Offer/Answer Procedures 164 3.1. Introduction 166 [RFC8445] defines ICE candidate exchange as the process for ICE 167 agents (Initiator and Responder) to exchange their candidate 168 information required for ICE processing at the agents. For the 169 purposes of this specification, the candidate exchange process 170 corresponds to the [RFC3264] Offer/Answer protocol and the 171 terminologies offerer and answerer correspond to the initiator and 172 responder terminologies from [RFC8445] respectively. 174 Once the initiating agent has gathered, pruned and prioritized its 175 set of candidates [RFC8445], the candidate exchange with the peer 176 agent begins. 178 3.2. Generic Procedures 180 3.2.1. Encoding 182 Section 4 provides detailed rules for constructing various SDP 183 attributes defined in this specification. 185 3.2.1.1. Data Streams 187 Each data stream [RFC8445] is represented by an SDP media description 188 ("m=" section). 190 3.2.1.2. Candidates 192 With in a "m=" section, each candidate (including the default 193 candidate) associated with the data stream is represented by an SDP 194 candidate attribute. 196 Prior to nomination, the "c=" line associated with an "m=" section 197 contains the connection address of the default candidate, while the 198 "m=" line contains the port and transport protocol of the default 199 candidate for that "m=" section. 201 After nomination, the "c=" line for a given "m=" section contains the 202 connection address of the nominated candidate (the local candidate of 203 the nominated candidate pair) and the "m=" line contains the port and 204 transport protocol corresponding to the nominated candidate for that 205 "m=" section. 207 3.2.1.3. Username and Password 209 The ICE username is represented by an SDP ice-ufrag attribute and the 210 ICE password is represented by an SDP ice-pwd attribute. 212 3.2.1.4. Lite Implementations 214 An ICE lite implementation [RFC8445] MUST include an SDP ice-lite 215 attribute. A full implementation MUST NOT include that attribute. 217 3.2.1.5. ICE Extensions 219 An agent uses the SDP ice-options attribute to indicate support of 220 ICE extensions. 222 An agent compliant to this specification MUST include an SDP ice- 223 options attribute with an "ice2" attribute value. If an agent 224 receives an SDP offer or answer with ICE attributes but without the 225 "ice2" ice-options attribute value, the agent assumes that the peer 226 is compliant to [RFC5245]. 228 3.2.1.6. Inactive and Disabled Data Streams 230 If an "m=" section is marked as inactive [RFC4566], or has a 231 bandwidth value of zero [RFC4566], the agent MUST still include ICE 232 related SDP attributes. 234 If the port value associated with an "m=" section is set to zero 235 (implying a disabled stream) as defined in section 8.2 of [RFC3264], 236 the agent SHOULD NOT include ICE related SDP candidate attributes in 237 that "m=" section, unless an SDP extension specifying otherwise is 238 used. 240 3.2.2. RTP/RTCP Considerations 242 If an agent utilizes both RTP and RTCP, and separate ports are used 243 for RTP and RTCP, the agent MUST include SDP candidate attributes for 244 both the RTP and RTCP components and SDP rtcp attribute SHOULD be 245 included in the "m=" section, as described in [RFC3605] 247 In the cases where the port number for the RTCP is one higher than 248 the RTP port and RTCP component address is same as the address of the 249 RTP component, the SDP rtcp attribute MAY be omitted. 251 If the agent does not utilize RTCP, it indicates that by including 252 b=RS:0 and b=RR:0 SDP attributes, as described in [RFC3556]. 254 3.2.3. Determining Role 256 The offerer acts as the Initiating agent. The answerer acts as the 257 Responding agent. The ICE roles (controlling and controlled) are 258 determined using the procedures in [RFC8445]. 260 3.2.4. STUN Considerations 262 Once an agent has provided its local candidates to its peer in an SDP 263 offer or answer, the agent MUST be prepared to receive STUN 264 connectivity check Binding requests on those candidates. 266 3.2.5. Verifying ICE Support Procedures 268 The agents will proceed with the ICE procedures defined in [RFC8445] 269 and this specification if, for each data stream in the SDP it 270 received, the default destination for each component of that data 271 stream appears in a candidate attribute. For example, in the case of 272 RTP, the connection address, port and transport protocol are in the 273 "c=" and "m=" lines, respectively, appear in a candidate attribute 274 and the value in the rtcp attribute appears in a candidate attribute. 276 This specification provides no guidance on how an agent should 277 proceed in the cases where the above condition is not met with the 278 few exceptions noted below: 280 1. The presence of certain application layer gateways MAY modify the 281 transport address information as described in Section 8.2.2. The 282 behavior of the responding agent in such a situation is 283 implementation defined. Informally, the responding agent MAY 284 consider the mismatched transport address information as a 285 plausible new candidate learnt from the peer and continue its ICE 286 processing with that transport address included. Alternatively, 287 the responding agent MAY include an "a=ice-mismatch" attribute in 288 its answer and MAY also omit "a=candidate" attributes for such 289 data streams. 291 2. The transport address from the peer for the default destination 292 correspond to IP address values "0.0.0.0"/"::" and port value of 293 "9". This MUST not be considered as a ICE failure by the peer 294 agent and the ICE processing MUST continue as usual. 296 3. In some cases, controlling/initiator agent may receive the SDP 297 answer that may omit "a=candidate" attributes for the data 298 stream, and instead include a media level "a=ice-mismatch" 299 attribute. This signals to the offerer that the answerer 300 supports ICE, but that ICE processing was not used for this data 301 stream. In this case, ICE processing MUST be terminated for this 302 data stream and [RFC3264] procedures MUST be followed instead. 304 4. The transport address from the peer for the default destination 305 is an FQDN. Regardless of the procedures used to resolve FQDN or 306 the resolution result, this MUST not be considered as a ICE 307 failure by the peer agent and the ICE processing MUST continue as 308 usual. 310 3.2.6. SDP Example 312 The following is an example SDP message that includes ICE attributes 313 (lines folded for readability): 315 v=0 316 o=jdoe 2890844526 2890842807 IN IP4 10.0.1.1 317 s= 318 c=IN IP4 192.0.2.3 319 t=0 0 320 a=ice-options:ice2 321 a=ice-pwd:asd88fgpdd777uzjYhagZg 322 a=ice-ufrag:8hhY 323 m=audio 45664 RTP/AVP 0 324 b=RS:0 325 b=RR:0 326 a=rtpmap:0 PCMU/8000 327 a=candidate:1 1 UDP 2130706431 10.0.1.1 8998 typ host 328 a=candidate:2 1 UDP 1694498815 192.0.2.3 45664 typ srflx raddr 329 10.0.1.1 rport 8998 331 3.3. Initial Offer/Answer Exchange 333 3.3.1. Sending the Initial Offer 335 When an offerer generates the initial offer, in each "m=" section it 336 MUST include SDP candidate attributes for each available candidate 337 associated with the "m=" section. In addition, the offerer MUST 338 include an SDP ice-ufrag and an SDP ice-pwd attribute in the offer. 340 It is valid for an offer "m=" line to include no SDP candidate 341 attributes and with default destination corresponding to the IP 342 address values "0.0.0.0"/"::" and port value of "9". This implies 343 that offering agent is only going to use peer reflexive candidates or 344 that additional candidates would be provided in subsequent signaling 345 messages. 347 Note: Within the scope of this document, "Initial Offer" refers to 348 the first SDP offer that is sent in order to negotiate usage of 349 ICE. It might, or might not, be the initial SDP offer of the SDP 350 session. 352 Note: The procedures in this document only consider "m=" sections 353 associated with data streams where ICE is used. 355 3.3.2. Sending the Initial Answer 357 When an answerer receives an initial offer that indicates that the 358 offerer supports ICE, and if the answerer accepts the offer and the 359 usage of ICE, in each "m=" section within the answer, it MUST include 360 SDP candidate attributes for each available candidate associated with 361 the "m=" section. In addition, the answerer MUST include an SDP ice- 362 ufrag and an SDP ice-pwd attribute in the answer. 364 In each "m=" line, the answerer MUST use the same transport protocol 365 as was used in the offer "m=" line. If none of the candidates in the 366 "m=" line in the answer use the same transport protocol as indicated 367 in the offer "m=" line, then, in order to avoid ICE mismatch, the 368 default destination MUST be set to IP address values "0.0.0.0"/"::" 369 and port value of "9". 371 It is also valid for an answer "m=" line to include no SDP candidate 372 attributes and with default destination corresponding to the IP 373 address values "0.0.0.0"/"::" and port value of "9". This implies 374 that answering agent is only going to use peer reflexive candidates 375 or that additional candidates would be provided in subsequent 376 signaling messages. 378 Once the answerer has sent the answer, it can start performing 379 connectivity checks towards the peer candidates that were provided in 380 the offer. 382 If the offer does not indicate support of ICE, the answerer MUST NOT 383 accept the usage of ICE. If the answerer still accepts the offer, 384 the answerer MUST NOT include any ICE related SDP attributes in the 385 answer. Instead the answerer will generate the answer according to 386 normal offer/answer procedures [RFC3264]. 388 If the answerer detects a possibility of the ICE mismatch, procedures 389 described in (Section 3.2.5) are followed. 391 Note: > provides guidance on finding working 392 candidate pairs and thus preventing premature declaration of ICE 393 failure is certain scenarios such as, if the peer has not provided 394 any candidates, or if all provided candidates have failed or have 395 been discarded. 397 3.3.3. Receiving the Initial Answer 399 When an offerer receives an initial answer that indicates that the 400 answerer supports ICE, it can start performing connectivity checks 401 towards the peer candidates that were provided in the answer. 403 If the answer does not indicate that the answerer supports ICE, or if 404 the answerer included "a=ice-mismatch" attributes for all the active 405 data streams in the answer, the offerer MUST terminate the usage of 406 ICE for the entire session and [RFC3264] procedures MUST be followed 407 instead. 409 On the other hand, if the answer indicates the support for ICE but 410 includes "a=ice-mismatch" in certain active data streams, then the 411 offerer MUST terminate the usage of ICE procedures and [RFC3264] 412 procedures MUST be used instead for only these data streams. Also, 413 ICE procedures MUST be used for data streams where "a=ice-mismatch" 414 attribute was not included. 416 If the offerer detects an ICE mismatch for one or more data streams 417 in the answer, as described in (Section 3.2.5), the offerer MUST 418 terminate the usage of ICE for the entire session. The subsequent 419 actions taken by the offerer are implementation dependent and are out 420 of the scope of this specification. 422 Note: > provides guidance on finding working 423 candidate pairs and thus preventing premature declaration of ICE 424 failure is certain scenarios such as, if the peer has not provided 425 any candidates, or if all provided candidates have failed or have 426 been discarded. 428 3.3.4. Concluding ICE 430 Once the state of each check list is Completed, and if the agent is 431 the controlling agent, it nominates a candidate pair [RFC8445] and 432 checks for each data stream whether the nominated pair matches the 433 default candidate pair. If there are one or more data streams with a 434 match, and the peer did not indicate support for the 'ice2' ice- 435 option, the controlling agent MUST generate a subsequent offer 436 (Section 3.4.1), in which the connection address, port and transport 437 protocol in the "c=" and "m=" lines associated with each data stream 438 match the corresponding local information of the nominated pair for 439 that data stream. 441 However, If the support for 'ice2' ice-option is in use, the 442 nominated candidate is noted and sent in the subsequent offer/answer 443 exchange as the default candidate and no updated offer is needed to 444 fix the default candidate. 446 Also as described in [RFC8445], once the controlling agent has 447 nominated a candidate pair for a data stream, the agent MUST NOT 448 nominate another pair for that data stream during the lifetime of the 449 ICE session (i.e. until ICE is restarted). 451 3.4. Subsequent Offer/Answer Exchanges 453 Either agent MAY generate a subsequent offer at any time allowed by 454 [RFC3264]. This section defines rules for construction of subsequent 455 offers and answers. 457 Should a subsequent offer fail, ICE processing continues as if the 458 subsequent offer had never been made. 460 3.4.1. Sending Subsequent Offer 462 3.4.1.1. Procedures for All Implementations 464 3.4.1.1.1. ICE Restarts 466 An agent MAY restart ICE processing for an existing data stream 467 [RFC8445]. 469 The rules governing the ICE restart imply that setting the connection 470 address in the "c=" line to 0.0.0.0 (for IPv4)/ :: (for IPv6) will 471 cause an ICE restart. Consequently, ICE implementations MUST NOT 472 utilize this mechanism for call hold, and instead MUST use 473 "a=inactive" and "a=sendonly" as described in [RFC3264]. 475 To restart ICE, an agent MUST change both the ice-pwd and the ice- 476 ufrag for the data stream in an offer. However, it is permissible to 477 use a session-level attribute in one offer, but to provide the same 478 ice-pwd or ice-ufrag as a media-level attribute in a subsequent 479 offer. This MUST NOT be considered as ICE restart. 481 An agent sets the rest of the ice related fields in the SDP for this 482 data stream as it would in an initial offer of this data stream (see 483 Section 3.2.1). Consequently, the set of candidates MAY include 484 some, none, or all of the previous candidates for that data stream 485 and MAY include a totally new set of candidates. 487 3.4.1.1.2. Removing a Data Stream 489 If an agent removes a data stream by setting its port to zero, it 490 MUST NOT include any candidate attributes for that data stream and 491 SHOULD NOT include any other ICE-related attributes defined in 492 Section 4 for that data stream. 494 3.4.1.1.3. Adding a Data Stream 496 If an agent wishes to add a new data stream, it sets the fields in 497 the SDP for this data stream as if this was an initial offer for that 498 data stream (see Section 3.2.1). This will cause ICE processing to 499 begin for this data stream. 501 3.4.1.2. Procedures for Full Implementations 503 This section describes additional procedures for full 504 implementations, covering existing data streams. 506 3.4.1.2.1. Before Nomination 508 When an offerer sends a subsequent offer; in each "m=" section for 509 which a candidate pair has not yet been nominated, the offer MUST 510 include the same set of ICE-related information that the offerer 511 included in the previous offer or answer. The agent MAY include 512 additional candidates it did not offer previously, but which it has 513 gathered since the last offer/ answer exchange, including peer 514 reflexive candidates. 516 The agent MAY change the default destination for media. As with 517 initial offers, there MUST be a set of candidate attributes in the 518 offer matching this default destination. 520 3.4.1.2.2. After Nomination 522 Once a candidate pair has been nominated for a data stream, the 523 connection address, port and transport protocol in each "c=" and "m=" 524 line associated with that data stream MUST match the data associated 525 with the nominated pair for that data stream. In addition, the 526 offerer only includes SDP candidates representing the local 527 candidates of the nominated candidate pair. The offerer MUST NOT 528 include any other SDP candidate attributes in the subsequent offer. 530 In addition, if the agent is controlling, it MUST include the 531 "a=remote-candidates" attribute for each data stream whose check list 532 is in the completed state. The attribute contains the remote 533 candidates corresponding to the nominated pair in the valid list for 534 each component of that data stream. It is needed to avoid a race 535 condition whereby the controlling agent chooses its pairs, but the 536 updated offer beats the connectivity checks to the controlled agent, 537 which doesn't even know these pairs are valid, let alone selected. 538 See Appendix B for elaboration on this race condition. 540 3.4.1.3. Procedures for Lite Implementations 542 If the ICE state is running, a lite implementation MUST include all 543 of its candidates for each component of each data stream in 544 "a=candidate" attribute in any subsequent offer. The candidates are 545 formed identical to the procedures for initial offers. 547 A lite implementation MUST NOT add additional host candidates in a 548 subsequent offer. If an agent needs to offer additional candidates, 549 it MUST restart ICE. Similarly, the username fragments or passwords 550 MUST remain the same as used previously. If an agent needs to change 551 one of these, it MUST restart ICE for that data stream. 553 If ICE has completed for a data stream and if the agent is 554 controlled, the default destination for that data stream MUST be set 555 to the remote candidate of the candidate pair for that component in 556 the valid list. For a lite implementation, there is always just a 557 single candidate pair in the valid list for each component of a data 558 stream. Additionally, the agent MUST include a candidate attribute 559 for each default destination. 561 If ICE state is completed and if the agent is controlling (which only 562 happens when both agents are lite), the agent MUST include the 563 "a=remote-candidates" attribute for each data stream. The attribute 564 contains the remote candidates from the candidate pairs in the valid 565 list (one pair for each component of each data stream). 567 3.4.2. Sending Subsequent Answer 569 If ICE is Completed for a data stream, and the offer for that data 570 stream lacked the "a=remote-candidates" attribute, the rules for 571 construction of the answer are identical to those for the offerer, 572 except that the answerer MUST NOT include the "a=remote-candidates" 573 attribute in the answer. 575 A controlled agent will receive an offer with the "a=remote- 576 candidates" attribute for a data stream when its peer has concluded 577 ICE processing for that data stream. This attribute is present in 578 the offer to deal with a race condition between the receipt of the 579 offer, and the receipt of the Binding Response that tells the 580 answerer the candidate that will be selected by ICE. See Appendix B 581 for an explanation of this race condition. Consequently, processing 582 of an offer with this attribute depends on the winner of the race. 584 The agent forms a candidate pair for each component of the data 585 stream by: 587 o Setting the remote candidate equal to the offerer's default 588 destination for that component (i.e. the contents of the "m=" and 589 "c=" lines for RTP, and the "a=rtcp" attribute for RTCP) 591 o Setting the local candidate equal to the transport address for 592 that same component in the "a=remote-candidates" attribute in the 593 offer. 595 The agent then sees if each of these candidate pairs is present in 596 the valid list. If a particular pair is not in the valid list, the 597 check has "lost" the race. Call such a pair a "losing pair". 599 The agent finds all the pairs in the check list whose remote 600 candidates equal the remote candidate in the losing pair: 602 o If none of the pairs are In-Progress, and at least one is Failed, 603 it is most likely that a network failure, such as a network 604 partition or serious packet loss, has occurred. The agent SHOULD 605 generate an answer for this data stream as if the remote- 606 candidates attribute had not been present, and then restart ICE 607 for this stream. 609 o If at least one of the pairs is In-Progress, the agent SHOULD wait 610 for those checks to complete, and as each completes, redo the 611 processing in this section until there are no losing pairs. 613 Once there are no losing pairs, the agent can generate the answer. 614 It MUST set the default destination for media to the candidates in 615 the remote-candidates attribute from the offer (each of which will 616 now be the local candidate of a candidate pair in the valid list). 617 It MUST include a candidate attribute in the answer for each 618 candidate in the remote-candidates attribute in the offer. 620 3.4.2.1. ICE Restart 622 If the offerer in a subsequent offer requested an ICE restart for a 623 data stream, and if the answerer accepts the offer, the answerer 624 follows the procedures for generating an initial answer. 626 For a given data stream, the answerer MAY include the same candidates 627 that were used in the previous ICE session, but it MUST change the 628 SDP ice-pwd and ice-ufrag attribute values. 630 3.4.2.2. Lite Implementation specific procedures 632 If the received offer contains the remote-candidates attribute for a 633 data stream, the agent forms a candidate pair for each component of 634 the data stream by: 636 o Setting the remote candidate equal to the offerer's default 637 destination for that component (i.e., the contents of the "m=" and 638 "c=" lines for RTP, and the "a=rtcp" attribute for RTCP). 640 o Setting the local candidate equal to the transport address for 641 that same component in the "a=remote-candidates" attribute in the 642 offer. 644 The state of ICE processing for that data stream is set to Completed. 646 Furthermore, if the agent believed it was controlling, but the offer 647 contained the "a=remote-candidates" attribute, both agents believe 648 they are controlling. In this case, both would have sent updated 649 offers around the same time. 651 However, the signaling protocol carrying the offer/answer exchanges 652 will have resolved this glare condition, so that one agent is always 653 the 'winner' by having its offer received before its peer has sent an 654 offer. The winner takes the role of controlling, so that the loser 655 (the answerer under consideration in this section) MUST change its 656 role to controlled. 658 Consequently, if the agent was going to send an updated offer since, 659 based on the rules in section 8.2 of [RFC8445], it was controlling, 660 it no longer needs to. 662 Besides the potential role change, change in the Valid list, and 663 state changes, the construction of the answer is performed 664 identically to the construction of an offer. 666 3.4.3. Receiving Answer for a Subsequent Offer 668 3.4.3.1. Procedures for Full Implementations 670 There may be certain situations where the offerer receives an SDP 671 answer that lacks ICE candidates although the initial answer did. 672 One example of such an "unexpected" answer might be happen when an 673 ICE-unaware B2BUA introduces a media server during call hold using 674 3rd party call-control procedures. Omitting further details how this 675 is done, this could result in an answer being received at the holding 676 UA that was constructed by the B2BUA. With the B2BUA being ICE- 677 unaware, that answer would not include ICE candidates. 679 Receiving an answer without ICE attributes in this situation might be 680 unexpected, but would not necessarily impair the user experience. 682 When the offerer receives an answer indicating support for ICE, the 683 offer performs on of the following actions: 685 o If the offer was a restart, the agent MUST perform ICE restart 686 procedures as specified in Section 3.4.3.1.1 688 o If the offer/answer exchange removed a data stream, or an answer 689 rejected an offered data stream, an agent MUST flush the Valid 690 list for that data stream. It MUST also terminate any STUN 691 transactions in progress for that data stream. 693 o If the offer/answer exchange added a new data stream, the agent 694 MUST create a new check list for it (and an empty Valid list to 695 start of course) which in turn triggers the candidate processing 696 procedures [RFC8445]. 698 o If ICE state is running for a given data stream, the agent 699 recomputes the check list. If a pair on the new check list was 700 also on the previous check list, and its state is not Frozen, its 701 state is copied over. Otherwise, its state is set to Frozen. If 702 none of the check lists are active (meaning that the pairs in each 703 check list are Frozen), appropriate procedures in [RFC8445] are 704 performed to move candidate(s) to the Waiting state to further 705 continue ICE processing. 707 o If ICE state is completed and the SDP answer conforms to 708 Section 3.4.2, the agent MUST reman in the ICE completed state. 710 However, if the ICE support is no longer indicated in the SDP answer, 711 the agent MUST fall-back to [RFC3264] procedures and SHOULD NOT drop 712 the dialog because of the missing ICE support or unexpected answer. 713 Once the agent sends a new offer later on, it MUST perform an ICE 714 restart. 716 3.4.3.1.1. ICE Restarts 718 The agent MUST remember the nominated pair in the Valid list for each 719 component of the data stream, called the previous selected pair prior 720 to the restart. The agent will continue to send media using this 721 pair, as described in section 12 of [RFC8445]. Once these 722 destinations are noted, the agent MUST flush the valid and check 723 lists, and then recompute the check list and its states, thus 724 triggering the candidate processing procedures [RFC8445] 726 3.4.3.2. Procedures for Lite Implementations 728 If ICE is restarting for a data stream, the agent MUST start a new 729 Valid list for that data stream. It MUST remember the nominated pair 730 in the previous Valid list for each component of the data stream, 731 called the previous selected pairs, and continue to send media there 732 as described in section 12 of [RFC8445]. The state of ICE processing 733 for each data stream MUST change to Running, and the state of ICE 734 processing MUST change to Running 736 4. Grammar 738 This specification defines eight new SDP attributes -- the 739 "candidate", "remote-candidates", "ice-lite", "ice-mismatch", "ice- 740 ufrag", "ice-pwd", "ice-pacing", and "ice-options" attributes. 742 This section also provides non-normative examples of the attributes 743 defined. 745 The syntax for the attributes follow Augmented BNF as defined in 746 [RFC5234]. 748 4.1. "candidate" Attribute 750 The candidate attribute is a media-level attribute only. It contains 751 a transport address for a candidate that can be used for connectivity 752 checks. 754 candidate-attribute = "candidate" ":" foundation SP component-id SP 755 transport SP 756 priority SP 757 connection-address SP ;from RFC 4566 758 port ;port from RFC 4566 759 SP cand-type 760 [SP rel-addr] 761 [SP rel-port] 762 *(SP extension-att-name SP 763 extension-att-value) 765 foundation = 1*32ice-char 766 component-id = 1*5DIGIT 767 transport = "UDP" / transport-extension 768 transport-extension = token ; from RFC 3261 769 priority = 1*10DIGIT 770 cand-type = "typ" SP candidate-types 771 candidate-types = "host" / "srflx" / "prflx" / "relay" / token 772 rel-addr = "raddr" SP connection-address 773 rel-port = "rport" SP port 774 extension-att-name = token 775 extension-att-value = *VCHAR 776 ice-char = ALPHA / DIGIT / "+" / "/" 778 This grammar encodes the primary information about a candidate: its 779 IP address, port and transport protocol, and its properties: the 780 foundation, component ID, priority, type, and related transport 781 address: 783 : is taken from RFC 4566 [RFC4566]. It is the 784 IP address of the candidate, allowing for IPv4 addresses, IPv6 785 addresses, and fully qualified domain names (FQDNs). When parsing 786 this field, an agent can differentiate an IPv4 address and an IPv6 787 address by presence of a colon in its value - the presence of a 788 colon indicates IPv6. An agent generating local candidates MUST 789 not use FQDN addresses. An agent processing remote candidates 790 MUST ignore candidate lines that include candidates with FQDN or 791 IP address versions that are not supported or recognized. The 792 procedures for generation and handling of FQDN candidates, as well 793 as, how agents indicate support for such procedures, need to be 794 specified in an extension specification. 796 : is also taken from RFC 4566 [RFC4566]. It is the port of 797 the candidate. 799 : indicates the transport protocol for the candidate. 800 This specification only defines UDP. However, extensibility is 801 provided to allow for future transport protocols to be used with 802 ICE by extending the sub-registry "ICE Transport Protocols" under 803 "Interactive Connectivity Establishment (ICE)" registry. 805 : is composed of 1 to 32 s. It is an 806 identifier that is equivalent for two candidates that are of the 807 same type, share the same base, and come from the same STUN 808 server. The foundation is used to optimize ICE performance in the 809 Frozen algorithm as described in [RFC8445] 811 : is a positive integer between 1 and 256 (inclusive) 812 that identifies the specific component of the dta stream for which 813 this is a candidate. It MUST start at 1 and MUST increment by 1 814 for each component of a particular candidate. For data streams 815 based on RTP, candidates for the actual RTP media MUST have a 816 component ID of 1, and candidates for RTCP MUST have a component 817 ID of 2. See section 13 in [RFC8445] for additional discussion on 818 extending ICE to new data streams. 820 : is a positive integer between 1 and (2**31 - 1) 821 inclusive. The procedures for computing candidate's priority is 822 described in section 5.1.2 of [RFC8445]. 824 : encodes the type of candidate. This specification 825 defines the values "host", "srflx", "prflx", and "relay" for host, 826 server reflexive, peer reflexive, and relayed candidates, 827 respectively. Specifications for new candidate types MUST define 828 how, if at all, various steps in the ICE processing differ from 829 the ones defined by this specification. 831 and : convey transport addresses related to the 832 candidate, useful for diagnostics and other purposes. 833 and MUST be present for server reflexive, peer 834 reflexive, and relayed candidates. If a candidate is server or 835 peer reflexive, and are equal to the base 836 for that server or peer reflexive candidate. If the candidate is 837 relayed, and are equal to the mapped address 838 in the Allocate response that provided the client with that 839 relayed candidate (see Appendix B.3 of [RFC8445] for a discussion 840 of its purpose). If the candidate is a host candidate, 841 and MUST be omitted. 843 In some cases, e.g., for privacy reasons, an agent may not want to 844 reveal the related address and port. In this case the address 845 MUST be set to "0.0.0.0" (for IPv4 candidates) or "::" (for IPv6 846 candidates) and the port to zero. 848 The candidate attribute can itself be extended. The grammar allows 849 for new name/value pairs to be added at the end of the attribute. 851 Such extensions MUST be made through IETF Review or IESG Approval 852 [RFC5226] and the assignments MUST contain the specific extension and 853 a reference to the document defining the usage of the extension 855 An implementation MUST ignore any name/value pairs it doesn't 856 understand. 858 Example: SDP line for UDP server reflexive candidate attribute for the RTP component 860 a=candidate:2 1 UDP 1694498815 192.0.2.3 45664 typ srflx raddr 10.0.1.1 rport 8998 862 4.2. "remote-candidates" Attribute 864 The syntax of the "remote-candidates" attribute is defined using 865 Augmented BNF as defined in [RFC5234]. The remote-candidates 866 attribute is a media-level attribute only. 868 remote-candidate-att = "remote-candidates:" remote-candidate 869 0*(SP remote-candidate) 870 remote-candidate = component-ID SP connection-address SP port 872 The attribute contains a connection-address and port for each 873 component. The ordering of components is irrelevant. However, a 874 value MUST be present for each component of a data stream. This 875 attribute MUST be included in an offer by a controlling agent for a 876 data stream that is Completed, and MUST NOT be included in any other 877 case. 879 Example: Remote candidates SDP lines for the RTP and RTCP components: 881 a=remote-candidates:1 192.0.2.3 45664 882 a=remote-candidates:2 192.0.2.3 45665 884 4.3. "ice-lite" and "ice-mismatch" Attributes 886 The syntax of the "ice-lite" and "ice-mismatch" attributes, both of 887 which are flags, is: 889 ice-lite = "ice-lite" 890 ice-mismatch = "ice-mismatch" 892 "ice-lite" is a session-level attribute only, and indicates that an 893 agent is a lite implementation. "ice-mismatch" is a media-level 894 attribute and only reported in the answer. It indicates that the 895 offer arrived with a default destination for a media component that 896 didn't have a corresponding candidate attribute. 898 4.4. "ice-ufrag" and "ice-pwd" Attributes 900 The "ice-ufrag" and "ice-pwd" attributes convey the username fragment 901 and password used by ICE for message integrity. Their syntax is: 903 ice-pwd-att = "ice-pwd:" password 904 ice-ufrag-att = "ice-ufrag:" ufrag 905 password = 22*256ice-char 906 ufrag = 4*256ice-char 908 The "ice-pwd" and "ice-ufrag" attributes can appear at either the 909 session-level or media-level. When present in both, the value in the 910 media-level takes precedence. Thus, the value at the session-level 911 is effectively a default that applies to all data streams, unless 912 overridden by a media-level value. Whether present at the session or 913 media-level, there MUST be an ice-pwd and ice-ufrag attribute for 914 each data stream. If two data streams have identical ice-ufrag's, 915 they MUST have identical ice-pwd's. 917 The ice-ufrag and ice-pwd attributes MUST be chosen randomly at the 918 beginning of a session (the same applies when ICE is restarting for 919 an agent). 921 The ice-ufrag attribute MUST contain at least 24 bits of randomness, 922 and the ice-pwd attribute MUST contain at least 128 bits of 923 randomness. This means that the ice-ufrag attribute will be at least 924 4 characters long, and the ice-pwd at least 22 characters long, since 925 the grammar for these attributes allows for 6 bits of information per 926 character. The attributes MAY be longer than 4 and 22 characters, 927 respectively, of course, up to 256 characters. The upper limit 928 allows for buffer sizing in implementations. Its large upper limit 929 allows for increased amounts of randomness to be added over time. 930 For compatibility with the 512 character limitation for the STUN 931 username attribute value and for bandwidth conservation 932 considerations, the ice-ufrag attribute MUST NOT be longer than 32 933 characters when sending, but an implementation MUST accept up to 256 934 characters when receiving. 936 Example shows sample ice-ufrag and ice-pwd SDP lines: 938 a=ice-pwd:asd88fgpdd777uzjYhagZg 939 a=ice-ufrag:8hhY 941 4.5. "ice-pacing" Attribute 943 The "ice-pacing" is a session level attribute that indicates the 944 desired connectivity check pacing, in milliseconds, for this agent 945 (see section 14 of [RFC8445]). The syntax is: 947 ice-pacing-att = "ice-pacing:" pacing-value 948 pacing-value = 1*10DIGIT 950 Following the procedures defined in [RFC8445], a default value of 951 50ms is used for an agent when ice-pacing attribute is omitted in the 952 offer or the answer. 954 The same rule applies for ice-pacing attribute values lower than 955 50ms. This mandates that, if an agent includes the ice-pacing 956 attribute, its value MUST be greater than 50ms or else a value of 957 50ms is considered by default for that agent. 959 Also the larger of the ice-pacing attribute values between the offer 960 and the answer (determined either by the one provided in the ice- 961 pacing attribute or by picking the default value) MUST be considered 962 for a given ICE session. 964 Example shows ice-pacing value of 5 ms: 966 a=ice-pacing:5 968 4.6. "ice-options" Attribute 970 The "ice-options" attribute is a session- and media-level attribute. 971 It contains a series of tokens that identify the options supported by 972 the agent. Its grammar is: 974 ice-options = "ice-options:" ice-option-tag 975 0*(SP ice-option-tag) 976 ice-option-tag = 1*ice-char 978 The existence of an ice-option in an offer indicates that a certain 979 extension is supported by the agent and is willing to use it, if the 980 peer agent also includes the same extension in the answer. There 981 might be further extension specific negotiation needed between the 982 agents that determine how the extensions gets used in a given 983 session. The details of the negotiation procedures, if present, MUST 984 be defined by the specification defining the extension (see 985 Section 9.2). 987 Example shows 'rtp+ecn' ice-option SDP line from <>: 989 a=ice-options:rtp+ecn 991 5. Keepalives 993 All the ICE agents MUST follow the procedures defined in section 11 994 of [RFC8445] for sending keepalives. The keepalives MUST be sent 995 regardless of whether the data stream is currently inactive, 996 sendonly, recvonly, or sendrecv, and regardless of the presence or 997 value of the bandwidth attribute. An agent can determine that its 998 peer supports ICE by the presence of "a=candidate" attributes for 999 each media session. 1001 6. SIP Considerations 1003 Note that ICE is not intended for NAT traversal for SIP, which is 1004 assumed to be provided via another mechanism [RFC5626]. 1006 When ICE is used with SIP, forking may result in a single offer 1007 generating a multiplicity of answers. In that case, ICE proceeds 1008 completely in parallel and independently for each answer, treating 1009 the combination of its offer and each answer as an independent offer/ 1010 answer exchange, with its own set of local candidates, pairs, check 1011 lists, states, and so on. 1013 Once ICE processing has reached the Completed state for all peers for 1014 media streams using those candidates, the agent SHOULD wait an 1015 additional three seconds, and then it MAY cease responding to checks 1016 or generating triggered checks on that candidate. It MAY free the 1017 candidate at that time. Freeing of server reflexive candidates is 1018 never explicit; it happens by lack of a keepalive. The three-second 1019 delay handles cases when aggressive nomination is used, and the 1020 selected pairs can quickly change after ICE has completed. 1022 6.1. Latency Guidelines 1024 ICE requires a series of STUN-based connectivity checks to take place 1025 between endpoints. These checks start from the answerer on 1026 generation of its answer, and start from the offerer when it receives 1027 the answer. These checks can take time to complete, and as such, the 1028 selection of messages to use with offers and answers can affect 1029 perceived user latency. Two latency figures are of particular 1030 interest. These are the post-pickup delay and the post-dial delay. 1031 The post-pickup delay refers to the time between when a user "answers 1032 the phone" and when any speech they utter can be delivered to the 1033 caller. The post-dial delay refers to the time between when a user 1034 enters the destination address for the user and ringback begins as a 1035 consequence of having successfully started alerting the called user 1036 agent. 1038 Two cases can be considered -- one where the offer is present in the 1039 initial INVITE and one where it is in a response. 1041 6.1.1. Offer in INVITE 1043 To reduce post-dial delays, it is RECOMMENDED that the caller begin 1044 gathering candidates prior to actually sending its initial INVITE, so 1045 that the candidates can be provided in the INVITE. This can be 1046 started upon user interface cues that a call is pending, such as 1047 activity on a keypad or the phone going off-hook. 1049 On the receipt of the offer, the answerer SHOULD generate an answer 1050 in a provisional response as soon as it has completed gathering the 1051 candidates. ICE requires that a provisional response with an SDP be 1052 transmitted reliably. This can be done through the existing 1053 Provisional Response Acknowledgment (PRACK) mechanism [RFC3262] or 1054 through an ICE specific optimization, wherein, the agent retransmits 1055 the provisional response with the exponential backoff timers 1056 described in [RFC3262]. Such retransmissions MUST cease on receipt 1057 of a STUN Binding request with transport address matching candidate 1058 address for one of the data streams signaled in that SDP or on 1059 transmission of the answer in a 2xx response. If no Binding request 1060 is received prior to the last retransmit, the agent does not consider 1061 the session terminated. For the ICE lite peers , the agent MUST 1062 cease retransmitting the 18x after sending it four times since there 1063 will be no Binding request sent and the number four is arbitrarily 1064 chosen to limit the number of 18x retransmits ('poor man's version of 1065 [RFC3262]' basically). (ICE will actually work even if the peer 1066 never receives the 18x; however, experience has shown that sending it 1067 is important for middleboxes and firewall traversal). 1069 Once the answer has been sent, the agent SHOULD begin its 1070 connectivity checks. Once candidate pairs for each component of a 1071 data stream enter the valid list, the answerer can begin sending 1072 media on that data stream. 1074 However, prior to this point, any media that needs to be sent towards 1075 the caller (such as SIP early media [RFC3960]) MUST NOT be 1076 transmitted. For this reason, implementations SHOULD delay alerting 1077 the called party until candidates for each component of each data 1078 stream have entered the valid list. In the case of a PSTN gateway, 1079 this would mean that the setup message into the PSTN is delayed until 1080 this point. Doing this increases the post-dial delay, but has the 1081 effect of eliminating 'ghost rings'. Ghost rings are cases where the 1082 called party hears the phone ring, picks up, but hears nothing and 1083 cannot be heard. This technique works without requiring support for, 1084 or usage of, preconditions [RFC3312]. It also has the benefit of 1085 guaranteeing that not a single packet of media will get clipped, so 1086 that post-pickup delay is zero. If an agent chooses to delay local 1087 alerting in this way, it SHOULD generate a 180 response once alerting 1088 begins. 1090 6.1.2. Offer in Response 1092 In addition to uses where the offer is in an INVITE, and the answer 1093 is in the provisional and/or 200 OK response, ICE works with cases 1094 where the offer appears in the response. In such cases, which are 1095 common in third party call control [RFC3725], ICE agents SHOULD 1096 generate their offers in a reliable provisional response (which MUST 1097 utilize [RFC3262]), and not alert the user on receipt of the INVITE. 1098 The answer will arrive in a PRACK. This allows for ICE processing to 1099 take place prior to alerting, so that there is no post-pickup delay, 1100 at the expense of increased call setup delays. Once ICE completes, 1101 the callee can alert the user and then generate a 200 OK when they 1102 answer. The 200 OK would contain no SDP, since the offer/answer 1103 exchange has completed. 1105 Alternatively, agents MAY place the offer in a 2xx instead (in which 1106 case the answer comes in the ACK). When this happens, the callee 1107 will alert the user on receipt of the INVITE, and the ICE exchanges 1108 will take place only after the user answers. This has the effect of 1109 reducing call setup delay, but can cause substantial post-pickup 1110 delays and media clipping. 1112 6.2. SIP Option Tags and Media Feature Tags 1114 [RFC5768] specifies a SIP option tag and media feature tag for usage 1115 with ICE. ICE implementations using SIP SHOULD support this 1116 specification, which uses a feature tag in registrations to 1117 facilitate interoperability through signaling intermediaries. 1119 6.3. Interactions with Forking 1121 ICE interacts very well with forking. Indeed, ICE fixes some of the 1122 problems associated with forking. Without ICE, when a call forks and 1123 the caller receives multiple incoming data streams, it cannot 1124 determine which data stream corresponds to which callee. 1126 With ICE, this problem is resolved. The connectivity checks which 1127 occur prior to transmission of media carry username fragments, which 1128 in turn are correlated to a specific callee. Subsequent media 1129 packets that arrive on the same candidate pair as the connectivity 1130 check will be associated with that same callee. Thus, the caller can 1131 perform this correlation as long as it has received an answer. 1133 6.4. Interactions with Preconditions 1135 Quality of Service (QoS) preconditions, which are defined in 1136 [RFC3312] and [RFC4032], apply only to the transport addresses listed 1137 as the default targets for media in an offer/answer. If ICE changes 1138 the transport address where media is received, this change is 1139 reflected in an updated offer that changes the default destination 1140 for media to match ICE's selection. As such, it appears like any 1141 other re-INVITE would, and is fully treated in RFCs 3312 and 4032, 1142 which apply without regard to the fact that the destination for media 1143 is changing due to ICE negotiations occurring "in the background". 1145 Indeed, an agent SHOULD NOT indicate that QoS preconditions have been 1146 met until the checks have completed and selected the candidate pairs 1147 to be used for media. 1149 ICE also has (purposeful) interactions with connectivity 1150 preconditions [RFC5898]. Those interactions are described there. 1151 Note that the procedures described in Section 6.1 describe their own 1152 type of "preconditions", albeit with less functionality than those 1153 provided by the explicit preconditions in [RFC5898]. 1155 6.5. Interactions with Third Party Call Control 1157 ICE works with Flows I, III, and IV as described in [RFC3725]. Flow 1158 I works without the controller supporting or being aware of ICE. 1159 Flow IV will work as long as the controller passes along the ICE 1160 attributes without alteration. Flow II is fundamentally incompatible 1161 with ICE; each agent will believe itself to be the answerer and thus 1162 never generate a re-INVITE. 1164 The flows for continued operation, as described in Section 7 of 1165 [RFC3725], require additional behavior of ICE implementations to 1166 support. In particular, if an agent receives a mid-dialog re-INVITE 1167 that contains no offer, it MUST restart ICE for each data stream and 1168 go through the process of gathering new candidates. Furthermore, 1169 that list of candidates SHOULD include the ones currently being used 1170 for media. 1172 7. Relationship with ANAT 1174 [RFC4091], the Alternative Network Address Types (ANAT) Semantics for 1175 the SDP grouping framework, and [RFC4092], its usage with SIP, define 1176 a mechanism for indicating that an agent can support both IPv4 and 1177 IPv6 for a data stream, and it does so by including two "m=" lines, 1178 one for v4 and one for v6. This is similar to ICE, which allows for 1179 an agent to indicate multiple transport addresses using the candidate 1180 attribute. However, ANAT relies on static selection to pick between 1181 choices, rather than a dynamic connectivity check used by ICE. 1183 It is RECOMMENDED that ICE be used in realizing the dual-stack use- 1184 cases in agents that support ICE. 1186 8. Security Considerations 1188 8.1. Attacks on the Offer/Answer Exchanges 1190 An attacker that can modify or disrupt the offer/answer exchanges 1191 themselves can readily launch a variety of attacks with ICE. They 1192 could direct media to a target of a DoS attack, they could insert 1193 themselves into the data stream, and so on. These are similar to the 1194 general security considerations for offer/answer exchanges, and the 1195 security considerations in [RFC3264] apply. These require techniques 1196 for message integrity and encryption for offers and answers, which 1197 are satisfied by the TLS mechanism [RFC3261] when SIP is used. As 1198 such, the usage of TLS with ICE is RECOMMENDED. 1200 8.2. Insider Attacks 1202 In addition to attacks where the attacker is a third party trying to 1203 insert fake offers, answers, or STUN messages, there are several 1204 attacks possible with ICE when the attacker is an authenticated and 1205 valid participant in the ICE exchange. 1207 8.2.1. The Voice Hammer Attack 1209 The voice hammer attack is an amplification attack. In this attack, 1210 the attacker initiates sessions to other agents, and maliciously 1211 includes the connection address and port of a DoS target as the 1212 destination for media traffic signaled in the SDP. This causes 1213 substantial amplification; a single offer/answer exchange can create 1214 a continuing flood of media packets, possibly at high rates (consider 1215 video sources). This attack is not specific to ICE, but ICE can help 1216 provide remediation. 1218 Specifically, if ICE is used, the agent receiving the malicious SDP 1219 will first perform connectivity checks to the target of media before 1220 sending media there. If this target is a third-party host, the 1221 checks will not succeed, and media is never sent. 1223 Unfortunately, ICE doesn't help if it's not used, in which case an 1224 attacker could simply send the offer without the ICE parameters. 1225 However, in environments where the set of clients is known, and is 1226 limited to ones that support ICE, the server can reject any offers or 1227 answers that don't indicate ICE support. 1229 SIP User Agents (UA) [RFC3261] that are not willing to receive non- 1230 ICE answers MUST include an "ice" Option Tag in the SIP Require 1231 Header Field in their offer. UAs that rejects non-ICE offers SHOULD 1232 use a 421 response code, together with an Option Tag "ice" in the 1233 Require Header Field in the response. 1235 8.2.2. Interactions with Application Layer Gateways and SIP 1237 Application Layer Gateways (ALGs) are functions present in a Network 1238 Address Translation (NAT) device that inspect the contents of packets 1239 and modify them, in order to facilitate NAT traversal for application 1240 protocols. Session Border Controllers (SBCs) are close cousins of 1241 ALGs, but are less transparent since they actually exist as 1242 application-layer SIP intermediaries. ICE has interactions with SBCs 1243 and ALGs. 1245 If an ALG is SIP aware but not ICE aware, ICE will work through it as 1246 long as the ALG correctly modifies the SDP. A correct ALG 1247 implementation behaves as follows: 1249 o The ALG does not modify the "m=" and "c=" lines or the rtcp 1250 attribute if they contain external addresses. 1252 o If the "m=" and "c=" lines contain internal addresses, the 1253 modification depends on the state of the ALG: 1255 * If the ALG already has a binding established that maps an 1256 external port to an internal connection address and port 1257 matching the values in the "m=" and "c=" lines or rtcp 1258 attribute, the ALG uses that binding instead of creating a new 1259 one. 1261 * If the ALG does not already have a binding, it creates a new 1262 one and modifies the SDP, rewriting the "m=" and "c=" lines and 1263 rtcp attribute. 1265 Unfortunately, many ALGs are known to work poorly in these corner 1266 cases. ICE does not try to work around broken ALGs, as this is 1267 outside the scope of its functionality. ICE can help diagnose these 1268 conditions, which often show up as a mismatch between the set of 1269 candidates and the "m=" and "c=" lines and rtcp attributes. The ice- 1270 mismatch attribute is used for this purpose. 1272 ICE works best through ALGs when the signaling is run over TLS. This 1273 prevents the ALG from manipulating the SDP messages and interfering 1274 with ICE operation. Implementations that are expected to be deployed 1275 behind ALGs SHOULD provide for TLS transport of the SDP. 1277 If an SBC is SIP aware but not ICE aware, the result depends on the 1278 behavior of the SBC. If it is acting as a proper Back-to-Back User 1279 Agent (B2BUA), the SBC will remove any SDP attributes it doesn't 1280 understand, including the ICE attributes. Consequently, the call 1281 will appear to both endpoints as if the other side doesn't support 1282 ICE. This will result in ICE being disabled, and media flowing 1283 through the SBC, if the SBC has requested it. If, however, the SBC 1284 passes the ICE attributes without modification, yet modifies the 1285 default destination for media (contained in the "m=" and "c=" lines 1286 and rtcp attribute), this will be detected as an ICE mismatch, and 1287 ICE processing is aborted for the call. It is outside of the scope 1288 of ICE for it to act as a tool for "working around" SBCs. If one is 1289 present, ICE will not be used and the SBC techniques take precedence. 1291 9. IANA Considerations 1293 9.1. SDP Attributes 1295 The original ICE specification defined seven new SDP attributes per 1296 the procedures of Section 8.2.4 of [RFC4566]. The registration 1297 information from the original specification is included here with 1298 modifications to include Mux Category and also defines a new SDP 1299 attribute 'ice-pacing'. 1301 9.1.1. candidate Attribute 1303 Attribute Name: candidate 1305 Type of Attribute: media-level 1307 Subject to charset: No 1309 Purpose: This attribute is used with Interactive Connectivity 1310 Establishment (ICE), and provides one of many possible candidate 1311 addresses for communication. These addresses are validated with 1312 an end-to-end connectivity check using Session Traversal Utilities 1313 for NAT (STUN). 1315 Appropriate Values: See Section 4 of RFC XXXX. 1317 Contact Name: IESG 1319 Contact e-mail: iesg@ietf.org [1] 1321 Reference: RFCXXXX 1323 Mux Category: TRANSPORT 1325 9.1.2. remote-candidates Attribute 1327 Attribute Name: remote-candidates 1329 Type of Attribute: media-level 1331 Subject to charset: No 1333 Purpose: This attribute is used with Interactive Connectivity 1334 Establishment (ICE), and provides the identity of the remote 1335 candidates that the offerer wishes the answerer to use in its 1336 answer. 1338 Appropriate Values: See Section 4 of RFC XXXX. 1340 Contact Name: IESG 1342 Contact e-mail: iesg@ietf.org [2] 1344 Reference: RFCXXXX 1346 Mux Category: TRANSPORT 1348 9.1.3. ice-lite Attribute 1350 Attribute Name: ice-lite 1352 Type of Attribute: session-level 1354 Subject to charset: No 1356 Purpose: This attribute is used with Interactive Connectivity 1357 Establishment (ICE), and indicates that an agent has the minimum 1358 functionality required to support ICE inter-operation with a peer 1359 that has a full implementation. 1361 Appropriate Values: See Section 4 of RFC XXXX. 1363 Contact Name: IESG 1365 Contact e-mail: iesg@ietf.org [3] 1367 Reference: RFCXXXX 1369 Mux Category: NORMAL 1371 9.1.4. ice-mismatch Attribute 1373 Attribute Name: ice-mismatch 1375 Type of Attribute: media-level 1377 Subject to charset: No 1379 Purpose: This attribute is used with Interactive Connectivity 1380 Establishment (ICE), and indicates that an agent is ICE capable, 1381 but did not proceed with ICE due to a mismatch of candidates with 1382 the default destination for media signaled in the SDP. 1384 Appropriate Values: See Section 4 of RFC XXXX. 1386 Contact Name: IESG 1388 Contact e-mail: iesg@ietf.org [4] 1390 Reference: RFCXXXX 1392 Mux Category: NORMAL 1394 9.1.5. ice-pwd Attribute 1396 Attribute Name: ice-pwd 1398 Type of Attribute: session- or media-level 1400 Subject to charset: No 1402 Purpose: This attribute is used with Interactive Connectivity 1403 Establishment (ICE), and provides the password used to protect 1404 STUN connectivity checks. 1406 Appropriate Values: See Section 4 of RFC XXXX. 1408 Contact Name: IESG 1410 Contact e-mail: iesg@ietf.org [5] 1412 Reference: RFCXXXX 1414 Mux Category: TRANSPORT 1416 9.1.6. ice-ufrag Attribute 1418 Attribute Name: ice-ufrag 1420 Type of Attribute: session- or media-level 1422 Subject to charset: No 1424 Purpose: This attribute is used with Interactive Connectivity 1425 Establishment (ICE), and provides the fragments used to construct 1426 the username in STUN connectivity checks. 1428 Appropriate Values: See Section 4 of RFC XXXX. 1430 Contact Name: IESG 1432 Contact e-mail: iesg@ietf.org [6] 1434 Reference: RFCXXXX 1436 Mux Category: TRANSPORT 1438 9.1.7. ice-options Attribute 1440 Attribute Name: ice-options 1442 Long Form: ice-options 1444 Type of Attribute: session-level 1446 Subject to charset: No 1448 Purpose: This attribute is used with Interactive Connectivity 1449 Establishment (ICE), and indicates the ICE options or extensions 1450 used by the agent. 1452 Appropriate Values: See Section 4 of RFC XXXX. 1454 Contact Name: IESG 1456 Contact e-mail: iesg@ietf.org [7] 1458 Reference: RFCXXXX 1460 Mux Category: NORMAL 1462 9.1.8. ice-pacing Attribute 1464 This specification also defines a new SDP attribute, "ice-pacing" 1465 according to the following data: 1467 Attribute Name: ice-pacing 1469 Type of Attribute: session-level 1471 Subject to charset: No 1473 Purpose: This attribute is used with Interactive Connectivity 1474 Establishment (ICE) to indicate desired connectivity check pacing 1475 values. 1477 Appropriate Values: See Section 4 of RFC XXXX. 1479 Contact Name: IESG 1481 Contact e-mail: iesg@ietf.org [8] 1483 Reference: RFCXXXX 1485 Mux Category: NORMAL 1487 9.2. Interactive Connectivity Establishment (ICE) Options Registry 1489 IANA maintains a registry for ice-options identifiers under the 1490 Specification Required policy as defined in "Guidelines for Writing 1491 an IANA Considerations Section in RFCs" [RFC5226]. 1493 ICE options are of unlimited length according to the syntax in 1494 Section 4.6; however, they are RECOMMENDED to be no longer than 20 1495 characters. This is to reduce message sizes and allow for efficient 1496 parsing. ICE options are defined at the session leve.. 1498 A registration request MUST include the following information: 1500 o The ICE option identifier to be registered 1502 o Name, Email, and Address of a contact person for the registration 1504 o Organization or individuals having the change control 1506 o Short description of the ICE extension to which the option relates 1508 o Reference(s) to the specification defining the ICE option and the 1509 related extensions 1511 10. Acknowledgments 1513 A large part of the text in this document was taken from [RFC5245], 1514 authored by Jonathan Rosenberg. 1516 Some of the text in this document was taken from [RFC6336], authored 1517 by Magnus Westerlund and Colin Perkins. 1519 Many thanks to Christer Holmberg for providing text suggestions in 1520 Section 3 that aligns with [RFC8445] 1522 Thanks to Thomas Stach for text help, Roman Shpount for suggesting 1523 RTCP candidate handling and Simon Perreault for advising on IPV6 1524 address selection when candidate-address includes FQDN. 1526 Many thanks to Flemming Andreasen for shepherd review feedback. 1528 Thanks to following experts for their reviews and constructive 1529 feedback: Christer Holmberg, Adam Roach, Peter Saint-Andre and the 1530 MMUSIC WG. 1532 11. References 1534 11.1. Normative References 1536 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1537 Requirement Levels", BCP 14, RFC 2119, 1538 DOI 10.17487/RFC2119, March 1997, 1539 . 1541 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1542 A., Peterson, J., Sparks, R., Handley, M., and E. 1543 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1544 DOI 10.17487/RFC3261, June 2002, 1545 . 1547 [RFC3262] Rosenberg, J. and H. Schulzrinne, "Reliability of 1548 Provisional Responses in Session Initiation Protocol 1549 (SIP)", RFC 3262, DOI 10.17487/RFC3262, June 2002, 1550 . 1552 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 1553 with Session Description Protocol (SDP)", RFC 3264, 1554 DOI 10.17487/RFC3264, June 2002, 1555 . 1557 [RFC3312] Camarillo, G., Ed., Marshall, W., Ed., and J. Rosenberg, 1558 "Integration of Resource Management and Session Initiation 1559 Protocol (SIP)", RFC 3312, DOI 10.17487/RFC3312, October 1560 2002, . 1562 [RFC3556] Casner, S., "Session Description Protocol (SDP) Bandwidth 1563 Modifiers for RTP Control Protocol (RTCP) Bandwidth", 1564 RFC 3556, DOI 10.17487/RFC3556, July 2003, 1565 . 1567 [RFC3605] Huitema, C., "Real Time Control Protocol (RTCP) attribute 1568 in Session Description Protocol (SDP)", RFC 3605, 1569 DOI 10.17487/RFC3605, October 2003, 1570 . 1572 [RFC4032] Camarillo, G. and P. Kyzivat, "Update to the Session 1573 Initiation Protocol (SIP) Preconditions Framework", 1574 RFC 4032, DOI 10.17487/RFC4032, March 2005, 1575 . 1577 [RFC4091] Camarillo, G. and J. Rosenberg, "The Alternative Network 1578 Address Types (ANAT) Semantics for the Session Description 1579 Protocol (SDP) Grouping Framework", RFC 4091, June 2005, 1580 . 1582 [RFC4092] Camarillo, G. and J. Rosenberg, "Usage of the Session 1583 Description Protocol (SDP) Alternative Network Address 1584 Types (ANAT) Semantics in the Session Initiation Protocol 1585 (SIP)", RFC 4092, June 2005, 1586 . 1588 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 1589 Description Protocol", RFC 4566, DOI 10.17487/RFC4566, 1590 July 2006, . 1592 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 1593 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 1594 DOI 10.17487/RFC5226, May 2008, 1595 . 1597 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1598 Specifications: ABNF", STD 68, RFC 5234, 1599 DOI 10.17487/RFC5234, January 2008, 1600 . 1602 [RFC5768] Rosenberg, J., "Indicating Support for Interactive 1603 Connectivity Establishment (ICE) in the Session Initiation 1604 Protocol (SIP)", RFC 5768, DOI 10.17487/RFC5768, April 1605 2010, . 1607 [RFC6336] Westerlund, M. and C. Perkins, "IANA Registry for 1608 Interactive Connectivity Establishment (ICE) Options", 1609 RFC 6336, April 2010, 1610 . 1612 [RFC8445] Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 1613 Connectivity Establishment (ICE): A Protocol for Network 1614 Address Translator (NAT) Traversal", RFC 8445, 1615 DOI 10.17487/RFC8445, July 2018, 1616 . 1618 11.2. Informative References 1620 [draft-holmberg-ice-pac] 1621 Holmberg, C. and J. Uberti, "Interactive Connectivity 1622 Establishment Patiently Awaiting Connectivity (ICE PAC)", 1623 draft-holmberg-ice-pac-01 (work in progress), March 2019, 1624 . 1627 [RFC3725] Rosenberg, J., Peterson, J., Schulzrinne, H., and G. 1628 Camarillo, "Best Current Practices for Third Party Call 1629 Control (3pcc) in the Session Initiation Protocol (SIP)", 1630 BCP 85, RFC 3725, DOI 10.17487/RFC3725, April 2004, 1631 . 1633 [RFC3960] Camarillo, G. and H. Schulzrinne, "Early Media and Ringing 1634 Tone Generation in the Session Initiation Protocol (SIP)", 1635 RFC 3960, DOI 10.17487/RFC3960, December 2004, 1636 . 1638 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 1639 (ICE): A Protocol for Network Address Translator (NAT) 1640 Traversal for Offer/Answer Protocols", RFC 5245, 1641 DOI 10.17487/RFC5245, April 2010, 1642 . 1644 [RFC5626] Jennings, C., Ed., Mahy, R., Ed., and F. Audet, Ed., 1645 "Managing Client-Initiated Connections in the Session 1646 Initiation Protocol (SIP)", RFC 5626, 1647 DOI 10.17487/RFC5626, October 2009, 1648 . 1650 [RFC5898] Andreasen, F., Camarillo, G., Oran, D., and D. Wing, 1651 "Connectivity Preconditions for Session Description 1652 Protocol (SDP) Media Streams", RFC 5898, 1653 DOI 10.17487/RFC5898, July 2010, 1654 . 1656 11.3. URIs 1658 [1] mailto:iesg@ietf.org 1660 [2] mailto:iesg@ietf.org 1662 [3] mailto:iesg@ietf.org 1664 [4] mailto:iesg@ietf.org 1666 [5] mailto:iesg@ietf.org 1668 [6] mailto:iesg@ietf.org 1670 [7] mailto:iesg@ietf.org 1672 [8] mailto:iesg@ietf.org 1674 [9] mailto:christer.holmberg@ericsson.com 1676 [10] mailto:rshpount@turbobridge.com 1678 [11] mailto:thomass.stach@gmail.com 1680 Appendix A. Examples 1682 For the example shown in section 15 of [RFC8445] the resulting offer 1683 (message 5) encoded in SDP looks like: 1685 v=0 1686 o=jdoe 2890844526 2890842807 IN IP6 $L-PRIV-1.IP 1687 s= 1688 c=IN IP6 $NAT-PUB-1.IP 1689 t=0 0 1690 a=ice-pwd:asd88fgpdd777uzjYhagZg 1691 a=ice-ufrag:8hhY 1692 m=audio $NAT-PUB-1.PORT RTP/AVP 0 1693 b=RS:0 1694 b=RR:0 1695 a=rtpmap:0 PCMU/8000 1696 a=candidate:1 1 UDP 2130706431 $L-PRIV-1.IP $L-PRIV-1.PORT typ host 1697 a=candidate:2 1 UDP 1694498815 $NAT-PUB-1.IP $NAT-PUB-1.PORT typ 1698 srflx raddr $L-PRIV-1.IP rport $L-PRIV-1.PORT 1700 The offer, with the variables replaced with their values, will look 1701 like (lines folded for clarity): 1703 v=0 1704 o=jdoe 2890844526 2890842807 IN IP6 fe80::6676:baff:fe9c:ee4a 1705 s= 1706 c=IN IP6 2001:420:c0e0:1005::61 1707 t=0 0 1708 a=ice-pwd:asd88fgpdd777uzjYhagZg 1709 a=ice-ufrag:8hhY 1710 m=audio 45664 RTP/AVP 0 1711 b=RS:0 1712 b=RR:0 1713 a=rtpmap:0 PCMU/8000 1714 a=candidate:1 1 UDP 2130706431 fe80::6676:baff:fe9c:ee4a 8998 typ host 1715 a=candidate:2 1 UDP 1694498815 2001:420:c0e0:1005::61 45664 typ srflx raddr 1716 fe80::6676:baff:fe9c:ee4a rport 8998 1718 The resulting answer looks like: 1720 v=0 1721 o=bob 2808844564 2808844564 IN IP4 $R-PUB-1.IP 1722 s= 1723 c=IN IP4 $R-PUB-1.IP 1724 t=0 0 1725 a=ice-pwd:YH75Fviy6338Vbrhrlp8Yh 1726 a=ice-ufrag:9uB6 1727 m=audio $R-PUB-1.PORT RTP/AVP 0 1728 b=RS:0 1729 b=RR:0 1730 a=rtpmap:0 PCMU/8000 1731 a=candidate:1 1 UDP 2130706431 $R-PUB-1.IP $R-PUB-1.PORT typ host 1732 With the variables filled in: 1734 v=0 1735 o=bob 2808844564 2808844564 IN IP4 192.0.2.1 1736 s= 1737 c=IN IP4 192.0.2.1 1738 t=0 0 1739 a=ice-pwd:YH75Fviy6338Vbrhrlp8Yh 1740 a=ice-ufrag:9uB6 1741 m=audio 3478 RTP/AVP 0 1742 b=RS:0 1743 b=RR:0 1744 a=rtpmap:0 PCMU/8000 1745 a=candidate:1 1 UDP 2130706431 192.0.2.1 3478 typ host 1747 Appendix B. The remote-candidates Attribute 1749 The "a=remote-candidates" attribute exists to eliminate a race 1750 condition between the updated offer and the response to the STUN 1751 Binding request that moved a candidate into the Valid list. This 1752 race condition is shown in Figure 1. On receipt of message 4, agent 1753 L adds a candidate pair to the valid list. If there was only a 1754 single data stream with a single component, agent L could now send an 1755 updated offer. However, the check from agent R has not yet generated 1756 a response, and agent R receives the updated offer (message 7) before 1757 getting the response (message 9). Thus, it does not yet know that 1758 this particular pair is valid. To eliminate this condition, the 1759 actual candidates at R that were selected by the offerer (the remote 1760 candidates) are included in the offer itself, and the answerer delays 1761 its answer until those pairs validate. 1763 Agent L Network Agent R 1764 |(1) Offer | | 1765 |------------------------------------------>| 1766 |(2) Answer | | 1767 |<------------------------------------------| 1768 |(3) STUN Req. | | 1769 |------------------------------------------>| 1770 |(4) STUN Res. | | 1771 |<------------------------------------------| 1772 |(5) STUN Req. | | 1773 |<------------------------------------------| 1774 |(6) STUN Res. | | 1775 |-------------------->| | 1776 | |Lost | 1777 |(7) Offer | | 1778 |------------------------------------------>| 1779 |(8) STUN Req. | | 1780 |<------------------------------------------| 1781 |(9) STUN Res. | | 1782 |------------------------------------------>| 1783 |(10) Answer | | 1784 |<------------------------------------------| 1786 Figure 1: Race Condition Flow 1788 Appendix C. Why Is the Conflict Resolution Mechanism Needed? 1790 When ICE runs between two peers, one agent acts as controlled, and 1791 the other as controlling. Rules are defined as a function of 1792 implementation type and offerer/answerer to determine who is 1793 controlling and who is controlled. However, the specification 1794 mentions that, in some cases, both sides might believe they are 1795 controlling, or both sides might believe they are controlled. How 1796 can this happen? 1798 The condition when both agents believe they are controlled shows up 1799 in third party call control cases. Consider the following flow: 1801 A Controller B 1802 |(1) INV() | | 1803 |<-------------| | 1804 |(2) 200(SDP1) | | 1805 |------------->| | 1806 | |(3) INV() | 1807 | |------------->| 1808 | |(4) 200(SDP2) | 1809 | |<-------------| 1810 |(5) ACK(SDP2) | | 1811 |<-------------| | 1812 | |(6) ACK(SDP1) | 1813 | |------------->| 1815 Figure 2: Role Conflict Flow 1817 This flow is a variation on flow III of RFC 3725 [RFC3725]. In fact, 1818 it works better than flow III since it produces fewer messages. In 1819 this flow, the controller sends an offerless INVITE to agent A, which 1820 responds with its offer, SDP1. The agent then sends an offerless 1821 INVITE to agent B, which it responds to with its offer, SDP2. The 1822 controller then uses the offer from each agent to generate the 1823 answers. When this flow is used, ICE will run between agents A and 1824 B, but both will believe they are in the controlling role. With the 1825 role conflict resolution procedures, this flow will function properly 1826 when ICE is used. 1828 At this time, there are no documented flows that can result in the 1829 case where both agents believe they are controlled. However, the 1830 conflict resolution procedures allow for this case, should a flow 1831 arise that would fit into this category. 1833 Appendix D. Why Send an Updated Offer? 1835 Section 11.1 describes rules for sending media. Both agents can send 1836 media once ICE checks complete, without waiting for an updated offer. 1837 Indeed, the only purpose of the updated offer is to "correct" the SDP 1838 so that the default destination for media matches where media is 1839 being sent based on ICE procedures (which will be the highest- 1840 priority nominated candidate pair). 1842 This begs the question -- why is the updated offer/answer exchange 1843 needed at all? Indeed, in a pure offer/answer environment, it would 1844 not be. The offerer and answerer will agree on the candidates to use 1845 through ICE, and then can begin using them. As far as the agents 1846 themselves are concerned, the updated offer/answer provides no new 1847 information. However, in practice, numerous components along the 1848 signaling path look at the SDP information. These include entities 1849 performing off-path QoS reservations, NAT traversal components such 1850 as ALGs and Session Border Controllers (SBCs), and diagnostic tools 1851 that passively monitor the network. For these tools to continue to 1852 function without change, the core property of SDP -- that the 1853 existing, pre-ICE definitions of the addresses used for media -- the 1854 "m=" and "c=" lines and the rtcp attribute -- must be retained. For 1855 this reason, an updated offer must be sent. 1857 Appendix E. Contributors 1859 Following experts have contributed textual and structural 1860 improvements for this work 1862 1. Christer Holmberg 1864 * Ericsson 1866 * Email: christer.holmberg@ericsson.com [9] 1868 2. Roman Shpount 1870 * TurboBridge 1872 * rshpount@turbobridge.com [10] 1874 3. Thomas Stach 1876 * thomass.stach@gmail.com [11] 1878 Authors' Addresses 1880 Marc Petit-Huguenin 1881 Impedance Mismatch 1883 Email: marc@petit-huguenin.org 1885 Suhas Nandakumar 1886 Cisco Systems 1887 707 Tasman Dr 1888 Milpitas, CA 95035 1889 USA 1891 Email: snandaku@cisco.com 1892 Ari Keranen 1893 Ericsson 1894 Jorvas 02420 1895 Finland 1897 Email: ari.keranen@ericsson.com