Skip to content

mdns: expose more Avahi configuration settings #678

Description

@troglobit

Model proposal

Currently only possible to enable/disable the mDNS responder. Here are a few proposed updates to mDNS configuration support:

  container mdns {
    description "Advertise system and services over mDNS-SD, IPv4 and IPv6.";

    leaf enabled {
      description "Globally enable or disable mDNS/SD on all interfaces.";
      type boolean;
    }

    leaf domain {
      description "LAN domain name to register host name and services in.

                   Most common is .local, but some also use .lan, or .office,
                   usually this setting can be left as-is.";
      default "local";
      type inet:domain-name;
    }

    leaf-list allow-interfaces {
      description "Interfaces to act on, can be combined with deny-interfaces.

                   By defaullt all, except loopback and point-to-pint links.";
      type if:interface-ref;
    }

    leaf-list deny-interfaces {
      description "Interfaces to ignore.

                   Other not specified interfaces will be used, except loopback
                   and point-to-point, unless combined with allow-interfaces.

                   This option takes precedence over allow-interfaces.";
      type if:interface-ref;
    }

    leaf reflector {
      description "Reflect incoming mDNS requests to local interfaces.";
      type boolean;
    }

    leaf-list reflect-filter {
      description "Filter mDNS service names to reflect.

                   Example, for AirPlay and AirTunes, use:

                     - _airplay._tcp.local
                     - _raop._tcp.local

                   For AirPrint use:

                     - _printer._tcp.local
                     - _ipp._tcp.local
                     - _pdl-datastream._tcp.local

                   By defaullt all services are reflected.";
      type string;
    }
  }

Tree view

$ yanglint -f tree ietf-inet-types@2013-07-15.yang infix-services.yang 
module: ietf-inet-types

module: infix-services
  +--rw mdns
  |  +--rw enabled?            boolean
  |  +--rw domain?             inet:domain-name
  |  +--rw allow-interfaces*   if:interface-ref
  |  +--rw deny-interfaces*    if:interface-ref
  |  +--rw reflector?          boolean
  |  +--rw reflect-filter*     string
  +--rw web
     +--rw enabled?     boolean
     +--rw console
     |  +--rw enabled?   boolean
     +--rw netbrowse
     |  +--rw enabled?   boolean
     +--rw restconf
        +--rw enabled?   boolean

Activity

  1. added
    enhancement
    triage
    on Oct 1, 2024
  2. removed
    triage
    on Oct 31, 2024
  3. troglobit commented on Nov 20, 2024

    @troglobit
    ContributorAuthor

    Stretch goal for v24.11.1

  4. changed the title [-]mdns: add support for deny-interfaces[/-] [+]mdns: expose more Avahi configuration settings[/+] on Nov 20, 2024
  5. 5 remaining items

  6. jovatn commented on Nov 25, 2024

    @jovatn
    Contributor

    I have no strong opinion on the plural or singular question. Do we have some similar setting to compare with? Perhaps "set client-if eth0" for DHCP client?

  7. troglobit commented on Nov 25, 2024

    @troglobit
    ContributorAuthor

    I spot "defaullt" in 'leaf domain' and 'leaf-list reflect-filter', is there a default for 'leaf reflector'? true or false?

    The default is false, similar to the enabled leaf. But I get what you're going for, in the case of our products maybe true would be a better default?

  8. troglobit commented on Nov 25, 2024

    @troglobit
    ContributorAuthor

    I have no strong opinion on the plural or singular question. Do we have some similar setting to compare with? Perhaps "set client-if eth0" for DHCP client?

    True, also a homegrown model, although loosely based on the IETF DHCPv6 model(s). Maybe the DHCP option list is also worth mentioning here as an example.

    Let's bring it up with the rest of the team today!

  9. troglobit commented on Nov 25, 2024

    @troglobit
    ContributorAuthor

    After taking inventory of other (IETF) models, as well as looking at the YANG 1.1 RFC, it seems singular is the way to go. However, we'll side step the issue tough and go for a container interface { allow, deny } and a presence container for the reflector.

  10. linked a pull request that will close this issueExpand mDNS settings #833on Nov 25, 2024
  11. added 5 commits that reference this issue on Dec 3, 2024
    cfcb423
    529b422
    f0aac34
    8c49c11
    80e4018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions