Re: [rtcweb] NAT behavior heuristics

"Muthu Arul Mozhi Perumal (mperumal)" <mperumal@cisco.com> Fri, 03 August 2012 07:58 UTC

Return-Path: <mperumal@cisco.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 191A721F8D1B for <rtcweb@ietfa.amsl.com>; Fri, 3 Aug 2012 00:58:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uau6d9Cy4+nP for <rtcweb@ietfa.amsl.com>; Fri, 3 Aug 2012 00:58:57 -0700 (PDT)
Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by ietfa.amsl.com (Postfix) with ESMTP id DCD5A21F8D3C for <rtcweb@ietf.org>; Fri, 3 Aug 2012 00:58:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=mperumal@cisco.com; l=3995; q=dns/txt; s=iport; t=1343980737; x=1345190337; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PMZ6CPcAD9XuZKYhay0R80T12gMzQ2I+DOFCjD5Vygg=; b=WzwHyrgpBKS2NPKB6J8DrGu/0tlNzQqYr0ZQyrvjRew1AZW+dmKIbqdM 603VyMm4kacDE7Gp0g+f/+vm5h/t4ajyAo9L+/4sATfQO/+VXKLsIWwTY JkE6wszkzIdxKOa9WAvnBa+Chwc1MbP7LfLgn7cZkb2AlQnNxl/aw3+6e 4=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EAMiDG1CtJV2Z/2dsb2JhbABFuSWBB4IgAQEBBAEBAQ8BJzQLDAQCAQgRBAEBCxQJBycLFAkIAgQBDQUIGodrC5x5oDWLRwUWhglgA5ZcjROBZoJfgVYH
X-IronPort-AV: E=Sophos;i="4.77,705,1336348800"; d="scan'208";a="108125911"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-8.cisco.com with ESMTP; 03 Aug 2012 07:58:56 +0000
Received: from xhc-rcd-x14.cisco.com (xhc-rcd-x14.cisco.com [173.37.183.88]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id q737wull007394 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 3 Aug 2012 07:58:56 GMT
Received: from xmb-rcd-x02.cisco.com ([169.254.4.113]) by xhc-rcd-x14.cisco.com ([173.37.183.88]) with mapi id 14.02.0298.004; Fri, 3 Aug 2012 02:58:56 -0500
From: "Muthu Arul Mozhi Perumal (mperumal)" <mperumal@cisco.com>
To: Martin Thomson <martin.thomson@gmail.com>, "Dan Wing (dwing)" <dwing@cisco.com>
Thread-Topic: [rtcweb] NAT behavior heuristics
Thread-Index: AQHNcQLmZq9mQPoftU6IiiFi63YLnpdHtxfQ
Date: Fri, 03 Aug 2012 07:58:55 +0000
Message-ID: <E721D8C6A2E1544DB2DEBC313AF54DE203E59C1A@xmb-rcd-x02.cisco.com>
References: <038b01cd70d6$8c5bc870$a5135950$@com> <CABkgnnW+pCnDZuYHDj6=7xdqRwM6AO48RrC1xhMrvFZbUBgtyw@mail.gmail.com>
In-Reply-To: <CABkgnnW+pCnDZuYHDj6=7xdqRwM6AO48RrC1xhMrvFZbUBgtyw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.65.76.102]
x-tm-as-product-ver: SMEX-10.2.0.1135-7.000.1014-19082.002
x-tm-as-result: No--40.231500-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] NAT behavior heuristics
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 03 Aug 2012 07:58:58 -0000

|We might want to consider other options for things like power saving
|in addition to this.  One option that springs to mind is the ability
|to explicitly shut down streams that aren't in use and pay the price
|for warm-up.  

I think that can be done by slightly tweaking the consent freshness test in draft-muthu-behave-consent-freshness-01. We can also combine it with the session liveness test and optimize everything. Here is the algorithm I have in mind:

The browser starts two timers after ICE concludes:
- A consent timer t1 for 15 sec (configurable in the browser)
- A liveness timer t2 for 5 sec (configurable by the JS)

When t1 expires:
If nothing except consent freshness request(s) was sent in the last x sec then 
   goto power_saving_mode.
Else // We has been sending media on the candidate pair.
   If a STUN transaction isn't already active then 
      Send a consent freshness request.
   If the transaction fails then 
      goto power_saving_mode.
   Else // The transaction succeeds
      Reset t1.
         
When t2 expires:
If nothing was received since the last liveness test then 
   If a STUN transaction isn't already active then
      Send a liveness request. 
   If the transaction fails then
      Notify the JS.
   Else // The transaction succeeds
      Reset t2.
      
power_saving_mode:
   Stop sending everything on that candidate pair. 
   Stop both timers.
   Notify the JS. 

Notes:
The JS is responsible for restarting ICE in the power_saving_mode.
Consent freshness and liveness requests are STUN binding requests.
The default value for t1 is the same as the default for ICE keepalives (section 10 of RFC5245).
The default value for x is 60 sec (configurable by the JS).

By carefully choose t1, t2 and x we can:
1. Make it work for existing NATs.
2. Interoperate with existing ICE/ICE-lite implementations.
3. Save battery.
4. Achieve good user experience.

Comments welcome.

Muthu

|-----Original Message-----
|From: rtcweb-bounces@ietf.org [mailto:rtcweb-bounces@ietf.org] On Behalf Of Martin Thomson
|Sent: Friday, August 03, 2012 4:32 AM
|To: Dan Wing (dwing)
|Cc: rtcweb@ietf.org
|Subject: Re: [rtcweb] NAT behavior heuristics
|
|I assume that this applies only to the NAT that doesn't exist yet and
|that we will have to live with status quo (and the current keep-alive
|recommendations) until PCP becomes bountiful.
|
|We might want to consider other options for things like power saving
|in addition to this.  One option that springs to mind is the ability
|to explicitly shut down streams that aren't in use and pay the price
|for warm-up.  Optimizations to candidate pair select at warm-up might
|be handy in this case.
|
|On 2 August 2012 10:45, Dan Wing <dwing@cisco.com> wrote:
|> In today's RTCWEB meeting I said that NAT heuristics do not work reliably,
|> especially if a NAT is busy (high CPU or lots of ports consumed), but there
|> are other situations with a NAT that cause heuristics to be inaccurate.  The
|> IETF document regarding this is http://tools.ietf.org/html/rfc5780, and be
|> sure to read its Applicability Statement in Section 1,
|> http://tools.ietf.org/html/rfc5780#section-1.
|>
|> An explicit protocol, such Port Control Protocol (PCP, draft-ietf-pcp-base)
|> is the only reliable way to communicate with a NAT and reduce application
|> keepalive traffic.  Several of us have noticed the need to document exactly
|> how PCP can be reliably used to reduce UDP keepalive traffic.  We will write
|> down those details before the next IETF, probably in an Internet Draft.
|>
|> -d
|>
|>
|> _______________________________________________
|> rtcweb mailing list
|> rtcweb@ietf.org
|> https://www.ietf.org/mailman/listinfo/rtcweb
|_______________________________________________
|rtcweb mailing list
|rtcweb@ietf.org
|https://www.ietf.org/mailman/listinfo/rtcweb