Re: [homenet] Understanding DNS-SD hybrid proxying [was: Firewall hole punching]

Markus Stenberg <markus.stenberg@iki.fi> Thu, 24 November 2016 11:01 UTC

Return-Path: <markus.stenberg@iki.fi>
X-Original-To: homenet@ietfa.amsl.com
Delivered-To: homenet@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2A017129864 for <homenet@ietfa.amsl.com>; Thu, 24 Nov 2016 03:01:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.821
X-Spam-Level:
X-Spam-Status: No, score=-1.821 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] autolearn=ham autolearn_force=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 Y6iM2dMVL4wZ for <homenet@ietfa.amsl.com>; Thu, 24 Nov 2016 03:01:47 -0800 (PST)
Received: from julia1.inet.fi (mta-out1.inet.fi [62.71.2.231]) by ietfa.amsl.com (Postfix) with ESMTP id 6EFAF129860 for <homenet@ietf.org>; Thu, 24 Nov 2016 03:01:36 -0800 (PST)
Received: from [192.168.200.122] (195.20.116.1) by julia1.inet.fi (9.0.002.03-2-gbe5d057) (authenticated as stenma-47) id 5782991C03FDAD77; Thu, 24 Nov 2016 12:59:13 +0200
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
From: Markus Stenberg <markus.stenberg@iki.fi>
In-Reply-To: <87wpftp6d9.wl-jch@irif.fr>
Date: Thu, 24 Nov 2016 13:01:33 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <CA6D20C7-9DDD-4810-B456-F8D17653A2D2@iki.fi>
References: <871syc54d1.wl-jch@pps.univ-paris-diderot.fr> <CAPt1N1=eXRBh6UqGGqUSK9cH_jY5MvPcE4MFZUPe2Z48LF7bkA@mail.gmail.com> <87lgwj504t.wl-jch@irif.fr> <CAPt1N1kDCMDBEpt7QYhHtPYjaMJAzw8G81=2y2f=y0ZProeCPA@mail.gmail.com> <13675.1479346312@dooku.sandelman.ca> <3B35AF68-4792-4B2A-8277-A7B49206581F@google.com> <74143607-B81E-4D4C-89D3-4754E0DA7DE1@jisc.ac.uk> <790beb67-a62e-b7dc-b64e-a3fcecfbdb12@mtcc.com> <87zikrihl7.wl-jch@irif.fr> <2EEB3CCD-3C25-4844-95B5-DDE31F982EA2@iki.fi> <87oa17i9eq.wl-jch@irif.fr> <2DAA6FEB-8C87-42DA-9465-E740669C563A@iki.fi> <7i37iinfoa.wl-jch@irif.fr> <DC6C69E2-5709-4AC2-BF16-2ADAB21177C0@iki.fi> <87wpftp6d9.wl-jch@irif.fr>
To: Juliusz Chroboczek <jch@irif.fr>
X-Mailer: Apple Mail (2.3251)
Archived-At: <https://mailarchive.ietf.org/arch/msg/homenet/BeHYrWclID_IimMH4VsMZtaMIn0>
Cc: homenet@ietf.org
Subject: Re: [homenet] Understanding DNS-SD hybrid proxying [was: Firewall hole punching]
X-BeenThere: homenet@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: IETF Homenet WG mailing list <homenet.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/homenet>, <mailto:homenet-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/homenet/>
List-Post: <mailto:homenet@ietf.org>
List-Help: <mailto:homenet-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/homenet>, <mailto:homenet-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Nov 2016 11:01:48 -0000

> On 24 Nov 2016, at 11.36, Juliusz Chroboczek <jch@irif.fr> wrote:
> 
>>> - who merges data from multiple links?  (I'd wish that the hybrid
>>> proxies compute a minimal spanning tree and perform peer-to-peer
>>> magic, but I suspect you're generating a config file dynamically
>>> and restarting dnsmasq whenever the set of hybrid proxies changes.)
> 
>> There is no need for merging, there are only few zones. They are all in
>> DNS-SD browse/legacy browse path, and also in DNS search path. The
>> configuration is actually static in my case. The benefit of merging is
>> limited as there are only few subnets.
> 
> I'm probably just being slow, please bear with me.  There's one hybrid
> proxy on each link, right?  Each of these only learns about the mDNS
> announcements done on this particular link, right?  Dnsmasq must somehow
> get the union of all of these data, right?
> 
> So is dnsmasq speaking to localhost:54 only, and localhost:54 somehow
> learns all the data, or is dnsmasq speaking too foo:54 for all values of
> foo?  If the latter (which I suspect), how does hnetd communicate the list
> of foos to dnsmasq?

When done dynamically (i.e. by hnetd), dnsmasqs are configured to:

- forward requests for non-local zones to nodes where they are based (based on HNCP state)
- forward locally to the ohp local zones

In my static config (which is 'official' HNCP free), I just have configuration files which mirror this idea.

Cheers,

-Markus