User Tools

Site Tools


ubiquiti:cli:mdns_repeater

Ubiquiti - CLI - mDNS Repeater

Enable Multicast DNS in the GUI:

  • is no substitute for setting the mdns property in the JSON configuration.
  • supposedly enables the mDNS reflector service, and while this seems to work for a while it does not work all the time.
  • Turning on the mDNS repeater by setting the mdns property works.

To use mDNS repeater on the USG.

The mDNS option in the controller will enable mDNS reflector.


/srv/unifi/data/sites/default/config.gateway.json
{
  "service": {
    "mdns": {
      "repeater": {
        "interface": [
          "eth1",
          "eth1.100",
          "eth1.110"
        ]
      }
    }
  }
}

NOTE: Change out the 100 and 110 for whatever VLANs you want, add more if needed.

Syntax:

'mdns repeater interface xxxxx' where xxxxx is/are the interface(s) mDNS advertisements are from as well as repeat mDNS advertisements to. That means both the source and target interfaces must be added.

Test your .json code using the json validator.

Once the config.gateway.json file is created or edited:

  • In the Controller GUI, navigate to Devices → Unifi Security Gateway → Config → Force Provision → Provision.

Once the USG comes back online you should be all set.


To identify the interfaces you're interested in using with the mdns repeater, SSH into your USG and run the show interfaces command. You can look at the interface and the corresponding IP address to determine the networks to place the repeater on. The virtual interface numbers should match your VLAN IDs from network setup.

show interfaces
 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address                        S/L  Description
---------    ----------                        ---  -----------
eth0         192.168.0.1/24                    u/u  LAN
eth0.10      192.168.10.1/24                   u/u
eth0.20      192.168.20.1/24                   u/u
eth0.33      192.168.33.1/24                   u/u
eth0.40      192.168.40.1/24                   u/u
eth0.50      192.168.50.1/24                   u/u
eth1         -                                 A/D
eth2         1.1.1.1/32                        u/u  WAN
eth3         -                                 A/D
lo           127.0.0.1/8                       u/u
             ::1/128

NOTE: Before you can SSH into your device you will need to Enable advanced features in the controller's site settings.

SSH tutorial: https://help.ubnt.com/hc/en-us/articles/218850057-Intro-to-Networking-How-to-Establish-a-Connection-Using-SSH


Troubleshooting

Alternate between enabling / disabling some of these settings may work.

Enable IGMP Snooping as it can help with multicast traffic:

  • Navigate to Settings - Networks and select a network.
  • Enable IGMP snooping.

Enable Multicast Enhancement:

  • Navigate to Settings → Wireless Networks and select a network.
  • Enable Multicast Enhancement (IGMPv3).

Enable MulticastDNS Service:

  • Navigate to Settings → Services → MDNS.
  • Enable Multicast DNS.

NOTE: Enabling the mDNS feature will enable a service on the USG that will reflect (mirror) mDNS packets into all other networks including WAN.

Ensure Firewall is not blocking:

  • Port 5353 is used for Bonjour services/discovery.

References

ubiquiti/cli/mdns_repeater.txt · Last modified: 2020/12/23 23:16 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki