Subject: [MMUSIC] ICE PRIORITY with multiple TURN servers

From: Justin Uberti <[email-masked]>
Date: Thu, 5 Jun 2014 18:08:40 -0700

Consider the case where a single endpoint has 2 TURN servers, and allocates
a relay candidate from both, from the same local IP. What should their
PRIORITY values be?

Quoth 5245, S 4.1.2:
   Each candidate for a media stream MUST have a unique
   priority that MUST be a positive integer between 1 and (2**31 - 1).

OK, so they have to have different priorities, i.e. either their type
preference or local preference must be different. But then, looking at S
4.1.2.1:
   The type preference MUST be identical for all
   candidates of the same type and MUST be different for candidates of
   different types.

Hmm, this means their local_preference must be different. But later in S
4.1.2.1:
   The local preference MUST be an integer from 0 to 65535 inclusive.
   It represents a preference for the particular IP address from which
   the candidate was obtained, in cases where an agent is multihomed.

Obviously, if they come from the same local IP, this cannot be satisfied.
What to do?

It seems like the easiest solution would be to use some of the local
preference to represent the ordering, so that both IP preference and server
preference and represented, and therefore relay candidates from IPs 1 and 2
and Turn Servers A and B would stack rank as
A1
B1
A2
B2

---

From: "Stach, Thomas" <[email-masked]>
Date: Fri, 6 Jun 2014 07:11:58 +0000

Justin,

From: mmusic [mailto:[email-masked]] On Behalf Of Justin Uberti
Sent: Freitag, 6. Juni 2014 03:09
To: [email-masked]; Mallinath Bareddy; Jiayang Liu; Eric Rescorla
Subject: [MMUSIC] ICE PRIORITY with multiple TURN servers

Consider the case where a single endpoint has 2 TURN servers, and allocates a relay candidate from both, from the same local IP. What should their PRIORITY values be?

Quoth 5245, S 4.1.2:

OK, so they have to have different priorities, i.e. either their type preference or local preference must be different. But then, looking at S 4.1.2.1<http://4.1.2.1>:
   The type preference MUST be identical for all
   candidates of the same type and MUST be different for candidates of
   different types.

Hmm, this means their local_preference must be different. But later in S 4.1.2.1<http://4.1.2.1>:
   The local preference MUST be an integer from 0 to 65535 inclusive.
   It represents a preference for the particular IP address from which
   the candidate was obtained, in cases where an agent is multihomed.

Obviously, if they come from the same local IP, this cannot be satisfied. What to do?
[TS] Well, that paragraph continues:

  When there is only a single IP address, this value SHOULD be set to
   65535.  More generally, if there are multiple candidates for a
   particular component for a particular media stream that have the same
   type, the local preference MUST be unique for each one.

So the case of two TURN servers is covered.
What you propose below is OK, but if desired you could  also rank A1, A2, B1, B2. It’s your freedom of choice.
Regards
Thomas

It seems like the easiest solution would be to use some of the local preference to represent the ordering, so that both IP preference and server preference and represented, and therefore relay candidates from IPs 1 and 2 and Turn Servers A and B would stack rank as
A1
B1
A2
B2

---

From: Justin Uberti <[email-masked]>
Date: Fri, 6 Jun 2014 15:02:47 -0700

Thanks. I think this could be made clearer in 5245 S 4.1.2.2, and address
the multiple relay server case specifically; right now, it is all about
assigning a local preference based on the network interface.

Something to think about for -bis.

On Fri, Jun 6, 2014 at 12:11 AM, Stach, Thomas <[email-masked]>
wrote:

>  Justin,
>
>
>
> *From:* mmusic [mailto:[email-masked]] *On Behalf Of *Justin
> Uberti
> *Sent:* Freitag, 6. Juni 2014 03:09
> *To:* [email-masked]; Mallinath Bareddy; Jiayang Liu; Eric Rescorla
> *Subject:* [MMUSIC] ICE PRIORITY with multiple TURN servers
>
>
>
> Consider the case where a single endpoint has 2 TURN servers, and
> allocates a relay candidate from both, from the same local IP. What should
> their PRIORITY values be?
>
>
>
> Quoth 5245, S 4.1.2:
>
> *[TS] Well, that paragraph continues:*
>
>
>

---

From: Ari Keränen <[email-masked]>
Date: Wed, 25 Jun 2014 23:57:35 +0200

Hi,

This sounds like a good and simple thing to fix in 5245bis.

I would suggest the following:

For section 4.1.2.1 
(http://tools.ietf.org/html/draft-ietf-mmusic-rfc5245bis-01#section-4.1.2.1):

OLD:
    The local preference MUST be an integer from 0 to 65535 inclusive.
    It represents a preference for the particular IP address from which
    the candidate was obtained, in cases where an agent is multihomed.
    65535 represents the highest preference, and a zero, the lowest.
    When there is only a single IP address, this value SHOULD be set to
    65535.  More generally, if there are multiple candidates for a
    particular component for a particular media stream that have the same
    type, the local preference MUST be unique for each one.  In this
    specification, this only happens for multihomed hosts. [...]

NEW:
    The local preference MUST be an integer from 0 to 65535 inclusive.
    It represents a preference for the particular IP address from which
    the candidate was obtained. 65535 represents the highest preference,
    and a zero, the lowest.  When there is only a single IP address, this
    value SHOULD be set to 65535.  More generally, if there are multiple
    candidates for a particular component for a particular media stream
    that have the same type, the local preference MUST be unique for each
    one.  In this specification, this only happens for multihomed hosts
    or if an agent is using multiple TURN servers. [...]

That is, removing first "(only) multihomed" comment and adding "multiple 
TURN servers" comment to the end.

For the following section (4.1.2.2.) we could add after the first paragraph:

    If multiple TURN servers are used, local priorities for the
    candidates obtained from the TURN servers are chosen in a similar
    fashion as for multihomed local candidates: the local preference
    value is used to indicate preference among different servers but the
    preference MUST be unique for each one.

Would that be OK?

Cheers,
Ari

On 6/7/14 12:02 AM, Justin Uberti wrote:
> Thanks. I think this could be made clearer in 5245 S 4.1.2.2, and
> address the multiple relay server case specifically; right now, it is
> all about assigning a local preference based on the network interface.
>
> On Fri, Jun 6, 2014 at 12:11 AM, Stach, Thomas <[email-masked]
> <mailto:[email-masked]>> wrote:
>
>     Justin,____
>
>     __ __
>
>     *From:*mmusic [mailto:[email-masked]
>     <mailto:[email-masked]>] *On Behalf Of *Justin Uberti
>     *To:* [email-masked] <mailto:[email-masked]>; Mallinath Bareddy;
>     Jiayang Liu; Eric Rescorla
>     *Subject:* [MMUSIC] ICE PRIORITY with multiple TURN servers____
>
>     __ __
>
>     allocates a relay candidate from both, from the same local IP. What
>     should their PRIORITY values be?____
>
>     __ __
>
>     Quoth 5245, S 4.1.2:____
>
>         Each candidate for a media stream MUST have a unique____
>
>         priority that MUST be a positive integer between 1 and (2**31 -
>     1).____
>
>     __ __
>
>     OK, so they have to have different priorities, i.e. either their
>     type preference or local preference must be different. But then,
>     looking at S 4.1.2.1 <http://4.1.2.1>:____
>
>         The type preference MUST be identical for all____
>
>         candidates of the same type and MUST be different for candidates
>     of____
>
>         different types.____
>
>     __ __
>
>     Hmm, this means their local_preference must be different. But later
>     in S 4.1.2.1 <http://4.1.2.1>:____
>
>         The local preference MUST be an integer from 0 to 65535
>     inclusive.____
>
>         It represents a preference for the particular IP address from
>     which____
>
>         the candidate was obtained, in cases where an agent is
>     multihomed.____
>
>     __ __
>
>     Obviously, if they come from the same local IP, this cannot be
>     satisfied. What to do?____
>
>     */[TS] Well, that paragraph continues:____/*
>
>     */__ __/*
>
>        When there is only a single IP address, this value SHOULD be set
>     to____
>
>         65535.  More generally, if there are multiple candidates for a____
>
>         particular component for a particular media stream that have the
>     same____
>
>         type, the local preference MUST be unique for each one. ____
>
>     __ __
>
>     So the case of two TURN servers is covered. ____
>
>     What you propose below is OK, but if desired you could  also rank
>     A1, A2, B1, B2. It’s your freedom of choice.____
>
>     Regards____
>
>     Thomas____
>
>     __ __
>
>     preference to represent the ordering, so that both IP preference and
>     server preference and represented, and therefore relay candidates
>     from IPs 1 and 2 and Turn Servers A and B would stack rank as____
>
>     A1____
>
>     B1____
>
>     A2____
>
>     B2____
>
>
>
>
> _______________________________________________
> mmusic mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/mmusic
>