Subject: Enabling mDNS in the home environment

From: Aidan Williams <[email-masked]>
Date: Mon, 24 Sep 2001 16:08:40 +1000

The current approach to mdns configuration disables mdns when DHCP is
in operation, unless the mdns-enable DHCP option is present.  This has
the effect of disabling mdns by default in the place where I think
this proposal has the most to offer -- the home.

Enabling mdns by default is unacceptable to the working group.  What I
am looking for is a way of identifying the home, so that mdns may be
enabled as often as possible in that environment.  To that end there
are some possible proposals later, but to start with I'll describe
what I think the environment of "the home" is.

======================================================================
Characteristics of mDNS (slightly different to Stuart's two):

  - the "locally scoped namespace" .local.arpa.
    I believe this namespace is useful whether multicast
    transport is used or not.

  - multicast transport
    Hosts can answer DNS requests for names they know about,
    including .local.arpa. and some.fully.qualified.name.

======================================================================
Un-interesting "home":
  - single PC, no home network, no need for mdns, nothing else to say.

A more-interesting "home" has a network with multiple PCs and a
gateway connecting them to the internet.  The "home gateway box"
contains the following:

  - DHCP server, serving dynamic private IPv4 addresses
    (could be any rfc1918 prefix, but is typically 192.168/16)

    This DHCP server does not reflect the policy of the local
    "administrator", it is "pre-configured" at the "factory".
    ISP DNS server, domain name, search list usually reflected into
    the home via the DHCP server.

    If a DHCP server like this (which is *not* configured by an admin)
    could be identified, then mDNS could be enabled in this
    environment, which would be a good thing for the reasons given
    later.

  - Network Address Port Translation (NAPT)

  - optional DNS "back end resolver"/proxy
    This is reasonably rare, because the ISP DNS server can be
    consulted via the NAT.  One less piece of software in the box.

    I don't know of a home gateway with a DNS server supporting DDNS.

  - The whole thing is a black box.

    There is no way of adding a new DHCP option (such as mdns-enable)
    to the DHCP server configuration.

  - the picture:
                                 +--------+
     --------                    |  DNS   |
             \                   | Server |
     RFC1918 |   +-------+       +--------+
     Network |== |Home-GW| ==> ISP Network
     192.168 |   +-------+     Global IP addrs
            /                  Global name space
     -------

In such an environment, the .local.arpa. namespace is helpful for
naming devices in the home.  However the name service ends up being
provided, the intuitive thing to do is to configure the name into the
device.  Globally unique DNS names aren't required for every device in
the home, and even if you had them the chances of devices serving
hosts on the global internet through the NAT are pretty slim.  In this
environment, ip addresses are non-unique/locally scoped, and so it
makes sense to have non-unique/locally scoped names as well.

======================================================================
Ways of supporting the .local.arpa. namespace in the home:

  - DDNS to a DNS server in the gateway box

    Hosts could use DDNS directly, or the DHCP server in the gateway
    box could do it.  A DHCP server could use a supplied hostname to
    populate .local.arpa. some other way too.

    Requires a home gateway vendor to implement a DNS server, and
    integrate it with DHCP or DDNS.  Multiple DNS servers in the home
    desiring to manage .local.arpa. are tricky.  How do they
    co-operate?

    DDNS isn't mandatory in draft-aboba-dhc-mini-03.txt, which is the
    nearest thing I know of to a spec for this kind of home gateway.

  - DDNS to the ISP name server (or whereever)

    An ISP serving a bunch of these NAT boxes:
      * would need to allow many hosts do DDNS updates
        (I haven't found an ISP yet willing to do DDNS)
      * Name space shared amongst many people, name collision likely.
      * PTR wouldn't make much sense, same private address is potentially
        one of many names

    I question whether most ISPs have any desire to be involved in the
    management of names and addresses for every device in the home.

  - multicast transport for DNS requests in the home

    Hosts are named already in an intuitive way.  Get hosts to answer
    requests for their names.  Hosts don't have to rely on having a
    box on the network with the right collection of features.

    A gateway could assist non-mdns hosts by doing mdns lookups on
    behalf of clients who don't know how.

  - give up and stick with NetBIOS/Appletalk
    This might be the option we end up with if we can't sort something
    out for mdns.

To me, multicast transport for DNS names in conjunction with the
.local.arpa. namespace looks like a good solution for the home.

======================================================================
Enabling multicast DNS in the home environment,
or "how can we identify the home and enable mdns in it"

 a) Heuristic: I'm on a rfc1918 network, my DNS server isn't.

    Proposal: A host would do something like:

      if my_ip in 192.168/16 &&
	 dns_server_ip not in 192.168/16
      then
	# because we are natting to a DNS server in an ISP
        enable_mdns
      fi

    This isn't perfect.  Its a heuristic.  I deliberately picked the
    more restrictive 192.168/16 because 10/8 finds wide use in ISPs,
    corporate networks, etc.

 b) treat mDNS as a replacement for NetBIOS naming

    mDNS has many similarities to NetBIOS naming.  Broadcast NetBIOS
    name resolution is enabled by default.  In administered
    environments, broadcast name resolution is disabled by virtue of a
    WINS server address and B/P/M node configuration [rfc1001.txt].

    Proposal: that mdns be disabled when NetBIOS naming is configured,
	      enabled otherwise

There is limited information which is passed from the ISP, through the
DHCP proxy in the Home-Gateway to the end host.  The next three look
at that information for ways to send a message-in-a-bottle to the host
to enable mdns.

 c) Friendly ISP: magic DNS server IP address

    Robert Elz already covered most of the aspects of this.
    I'm not thinking of specifying a multicast address as the DNS
    server IP address, but something like 127.127.127.127 (say).

    Doesn't work if there is a DNS proxy in the home gateway
    (ie if the magic addr is stripped)

    Proposal: that mdns be enabled if magic ip address is one of the
	      DNS server addresses

 d) Friendly ISP: DNS search list

    We have done this one to death on the list.  Not much support.
    Loads root (or gTLD) nameservers with lookups for .local.arpa
    on clients which don't understand.

    Proposal: mdns enabled if .local.arpa in the DNS search list

 e) Friendly ISP: set the host domain name to local.arpa

    Mosts hosts don't seem to do a lot with their domain name setting.
    Setting the domain name to the ISP domain name seems pretty
    pointless for a home network behind a gateway.  The ISP can still
    use the DNS search list to configure clients.

    Proposal: mdns enabled when a DHCP response is received with a
	      domain name of .local.arpa.

    It is probably less likely that the domain name will make it
    through the home gateway than an IP address or search list.
    A gateway should take care not to enable mdns on the ISP side,
    perhaps a restriction to private addresses may be appropriate.

    I *think* this could even be per-interface, even though the domain
    name is probably per-host configuration.

My preferences are for:

  b) on the grounds that mdns will be enabled without ISPs or
     non-technical consumers needing to do anything and will remain
     disabled in most (many?) configured environments

  e) on the grounds that ISPs can do this without needing to update
     their software

Comments?  Better ideas?

regards
	aidan
____
:wq!

to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.

---

From: Bernard Aboba <[email-masked]>
Date: Mon, 24 Sep 2001 08:44:03 -0700 (PDT)

>     (could be any rfc1918 prefix, but is typically 192.168/16)

Actually, I've most often seen 10/8 used for this. 

>     I don't know of a home gateway with a DNS server supporting DDNS.

Actually there are a few that do, including Microsoft ICS. They handle
this via integration of the DHCP server with the DNS proxy. That way the
DNS proxy doesn't have to handle dynamic update. 

>   - DDNS to a DNS server in the gateway box

The gateway DNS server probably won't support dynamic update. About the
best it can do is answer queries for RRs dynamically updated via the
built-in DHCP server. 

>     populate .local.arpa. some other way too.

I think it's unlikely that gateways will implement Dynamic Update. So the
DHCP server should be assumed to do it. Which brings up the
question: "What about IPv6, with stateless autoconfig and no DHCPv6? How
would DDNS work in this environment?"

>     desiring to manage .local.arpa. are tricky.  How do they

Integrating the built-in DHCP server with the DNS server on the gateway so
as to provide DDNS isn't much work, and so to my mind this is what the
home gateways should do. Thus in some respects the goal is to enable mDNS
when the DNS & DHCP servers *don't* support dynamic DNS. 

>     nearest thing I know of to a spec for this kind of home gateway.

It is a good idea to support DDNS, though making it mandatory might be too
strong. 

>         (I haven't found an ISP yet willing to do DDNS)

Neither have I.

>     management of names and addresses for every device in the home.

I doubt it. 

>     Proposal: that mdns be disabled when NetBIOS naming is configured,

Might there not be enterprise customers that would want to turn off *both*
NetBIOS and mDNS? In my experience, customers who are able to turn off
NetBIOS also tend to have sophisticated DNS and DHCP infrastructures,
including support for DDNS. That's why they don't feel that they need
NetBIOS -- dynamic naming is already being provided via DDNS. 

I would suspect that such customers also wouldn't need mDNS. 

>     Doesn't work if there is a DNS proxy in the home

Rather than "striping DNS servers" included in the DNS server option of
DHCP, it probably makes more sense to add them to the end of the
list. That is the kind of thing that probably should be in the mini-DHCP
spec.

> Comments?  Better ideas?

Thanks for posting this. I think you've gone through most of the
scenarios.