Re: [sipcore] Happy Eyeballs for SIP

"Olle E. Johansson" <oej@edvina.net> Wed, 17 February 2016 15:39 UTC

Return-Path: <oej@edvina.net>
X-Original-To: sipcore@ietfa.amsl.com
Delivered-To: sipcore@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 98A9C1A6F87 for <sipcore@ietfa.amsl.com>; Wed, 17 Feb 2016 07:39:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.349
X-Spam-Level:
X-Spam-Status: No, score=0.349 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, HELO_EQ_SE=0.35, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iBXNWxzZ2IF3 for <sipcore@ietfa.amsl.com>; Wed, 17 Feb 2016 07:39:00 -0800 (PST)
Received: from smtp7.webway.se (smtp7.webway.se [212.3.14.205]) by ietfa.amsl.com (Postfix) with ESMTP id C37CD1A6FBC for <sipcore@ietf.org>; Wed, 17 Feb 2016 07:38:52 -0800 (PST)
Received: from [192.168.40.16] (h87-96-134-129.dynamic.se.alltele.net [87.96.134.129]) by smtp7.webway.se (Postfix) with ESMTPA id C9A0B93DE62; Wed, 17 Feb 2016 15:37:49 +0000 (UTC)
Content-Type: multipart/signed; boundary="Apple-Mail=_A00B4432-89AA-47EA-9E2D-77AC1CB307BC"; protocol="application/pkcs7-signature"; micalg="sha1"
Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\))
From: "Olle E. Johansson" <oej@edvina.net>
In-Reply-To: <69252B73-3F04-4FCF-8C47-63C7C813C2BB@vidyo.com>
Date: Wed, 17 Feb 2016 16:38:45 +0100
Message-Id: <E82DE996-7581-4BE1-A640-2B4F701BC8F8@edvina.net>
References: <878u2p66pp.fsf@hobgoblin.ariadne.com> <330D9D8A-CB91-4E84-92F4-49A7C54090B2@edvina.net> <69252B73-3F04-4FCF-8C47-63C7C813C2BB@vidyo.com>
To: Jonathan Lennox <jonathan@vidyo.com>
X-Mailer: Apple Mail (2.3112)
Archived-At: <http://mailarchive.ietf.org/arch/msg/sipcore/AgZaP76jjit-sddqDo-31Aa-Dvo>
Cc: "Dale R. Worley" <worley@ariadne.com>, Olle E Johansson <oej@edvina.net>, "sipcore@ietf.org" <sipcore@ietf.org>
Subject: Re: [sipcore] Happy Eyeballs for SIP
X-BeenThere: sipcore@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: SIP Core Working Group <sipcore.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sipcore>, <mailto:sipcore-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sipcore/>
List-Post: <mailto:sipcore@ietf.org>
List-Help: <mailto:sipcore-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sipcore>, <mailto:sipcore-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 17 Feb 2016 15:39:03 -0000

> On 15 Feb 2016, at 20:50, Jonathan Lennox <jonathan@vidyo.com> wrote:
> 
> 
>> On Feb 12, 2016, at 5:10 PM, Olle E. Johansson <oej@edvina.net <mailto:oej@edvina.net>> wrote:
>> 
>> 
>>> On 12 Feb 2016, at 20:58, Dale R. Worley <worley@ariadne.com <mailto:worley@ariadne.com>> wrote:
>>> 
>>> Is anyone considering writing up the actual use of Happy Eyeballs in a
>>> SIP context?
>>> 
>>> Does anyone have any practical experience or suggestions for what HE in
>>> SIP would be?
>> 
>> After discussing this for many years with many people this is my conclusion:
>> 
>> For connection oriented protocols - just point to existing RFC for happy eyeballs.
>> 
>> For UDP we have no solution, period. The only way is to handle this in DNS SRV
>> and have separate priorities for IPv4 and IPv6 in the order the service likes.
>> This is why we have tested DNS SRV with dual stacks in many SIPits and written the draft about 
>> dual stack issues - many IPv4 only clients crashed or failed when the first SRV priority
>> did not have IPv4 addresses at all. They also crashed when IPv6 was in various headers,
>> as documented in https://tools.ietf.org/html/draft-klatsky-dispatch-ipv6-impact-ipv4-03 <https://tools.ietf.org/html/draft-klatsky-dispatch-ipv6-impact-ipv4-03>
> 
> Most of these problems are going to be true for TCP IPv6 too, aren’t they? Happy Eyeballs doesn’t make the problem worse.  If there are buggy implementations out there, this is something that you’re presumably either going to have to have the implementers fix, or else clean up with SBCs.
Oh yeah, these problems are for locating SIP servers, the stuff you do when you
build a list. It applies to all, but is critical for UDP.

> 
>> One has to remember that the IPv4 and IPv6 address for a dual stack server may lead
>> to different servers, thus sending a UDP message at the same time to both may cause
>> multiple transactions and all kinds of interesting side effects. (Hadriel Kaplan reminded
>> me of this).
>> 
>> So the documentation on Happy Eyeballs in sip is pretty short: Don’t try this with UDP.
>> Solve the problem another way. (in fact, move to TCP/TLS as soon as you can :-) )
>> 
>> If someone has a cool solution to this UDP issue - preferably without loosing one round trip -
>> I would be more than happy to hear it!
> 
> The “may lead to different servers” issue is under the control of the person setting up the SRV records for the SIP server, though.
Yes. The reason I brought it up is that many proposals for solving this for UDP has failed
on exactly that case.

> 
> So it should be possible, I think, to say that you can set up DNS records for UDP happy eyeballs only if either 1) you personally can handle merged request detection for all requests to a target, or 2) you are a pure 3261 proxy and also can guarantee that there are no B2BUAs (that modify From tag, Call-ID, or CSeq) or Gateways downstream of you.  If this is the case, then forking the SIP request to the v4 and v6 addresses would accomplish happy eyeballs.
> 
> I don’t know if this is a large enough subset of SIP environments to be interesting, though.
I personally don’t think we should go down that road. We end up in discussions about multiple edge proxies with SIP outbound and without outbound and a large number of variations to SIP platform architectures. There are so many ways one can fail, even though there is a possibility of finding something that works. We may write “there may be other solutions to this problem, but this is our recommendation” to avoid falling into that can of worms.

What we can state is that finding the fastest network path by using something like Happy Eyeballs connection testing does not work over UDP.  

To handle UDP and dual stack clients and servers, we need to use DNS or other configuration methods. For UDP without outbound, the server side manages preferences in DNS. For UDP using SIP outbound a discovery method for edge proxys may configure one IPv4 edge proxy and one IPv6 edge proxy. Using one service DNS name with A and AAAA records will lead to problems. Animals (including cute kittens) may be harmed.

/O :-)